diff --git a/CHANGELOG.md b/CHANGELOG.md index 3920d62..f4cdf5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ ## CHANGELOG +## v1.1.3 + +### Added: + +* "session_key" and "user_identity" fields to JWT, allowing developers to assign unique session and user IDs to V-SDK sessions from separate, external systems + +### Enhanced: + +* Rendering video in Chrome and Edge to remove WebGC console warning + +### Fixed: + +* Bug where sendToAll generated unintended errors +* Issue where SDK clients were automatically muted when joining the second meeting in a session after leaving the first + ## v1.1.0 ### Added: diff --git a/dist/index.esm.js b/dist/index.esm.js old mode 100755 new mode 100644 index 2367603..6504a34 --- a/dist/index.esm.js +++ b/dist/index.esm.js @@ -1 +1 @@ -function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;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,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(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 u(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}(J),X=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}(),Q=function(e){function t(r,n){void 0===n&&(n=X.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 m(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}(X),Z=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t}(Q))(Y),$=new x((function(e){return e.complete()}));function ee(e){return e?function(e){return new x((function(t){return e.schedule((function(){return t.complete()}))}))}(e):$}function te(e){return e&&"function"==typeof e.schedule}var re,ne=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=_e++;return ve[t]=!0,fe.then((function(){return ye(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){ye(e)}(r),t.scheduled=void 0)},t}(J),ge=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(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}(Ve);function Fe(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),je(L,e)}function Ge(){return Fe(1)}function Be(){for(var e=[],t=0;t1?n.next(Array.prototype.slice.call(arguments)):n.next(e)}),n,r)}))}function ze(e,t,r){return r?ze(e,t).pipe(Ae((function(e){return w(e)?r.apply(void 0,e):r(e)}))):new x((function(r){var n,o=function(){for(var e=[],t=0;t=0}function Ye(){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 x?e[0]:Fe(r)(ie(e,n))}function Xe(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function Qe(e,t){return function(r){return r.lift(new Ze(e,t))}}var Ze=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new $e(e,this.predicate,this.thisArg))},e}(),$e=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 m(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}(k);function et(e,t,r){return[Qe(t,r)(new x(Pe(e))),Qe(Xe(t,r))(new x(Pe(e)))]}function tt(){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 pt(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}(k),pt=function(e,t){this.time=e,this.notification=t};function ht(e){return function(t){return 0===e?ee():t.lift(new _t(e))}}var _t=function(){function e(e){if(this.total=e,this.total<0)throw new Ie}return e.prototype.call=function(e,t){return t.subscribe(new ft(e,this.total))},e}(),ft=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return m(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}(k);function vt(e){return function(t){return t.lift(new yt(e))}}var yt=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new Et(e,this.value))},e}(),Et=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return m(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(k);function gt(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?je((function(){return e}),t,r):("number"==typeof t&&(r=t),je((function(){return e}),r))}function bt(){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}(Te),Ut=function(e,t){return e===t||"function"==typeof t&&e===t.toString()},Vt=function(){for(var e=arguments.length,t=Array(e),r=0;r=t.length?r(new zt(a,h,new qt(void 0,e[h]))):Xt(e[h],t[h],r,n,a,h,s);for(;h=0?(Xt(e[o],t[o],r,n,a,o,s),f=Jt(f,c)):Xt(e[o],void 0,r,n,a,o,s)})),f.forEach((function(e){Xt(void 0,t[e],r,n,a,e,s)}))}s.length=s.length-1}else e!==t&&("number"===u&&isNaN(e)&&isNaN(t)||r(new Wt(a,e,t)))}function Qt(e,t,r,n){return n=n||[],Xt(e,t,(function(e){e&&n.push(e)}),r),n.length?n:void 0}function Zt(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,RESET_SOCKET:()=>({})}),Qr=ir("CONNECT_TO_MEDIA_STREAM"),Zr=ir("RECEIVE_PAYLOAD_FROM_MEDIA_SDK"),{setAudioEncodeStatus:$r,setAudioDecodeStatus:en,setVideoEncodeStatus:tn,setVideoDecodeStatus:rn,setSharingEncodeStatus:nn,setSharingDecodeStatus:on,setMediaConstraints:sn,resetMedia:an}=Cr("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","RESET_MEDIA");function cn(e,t,...r){return e(jt.of(...r||[]),t,null)}function un(...e){const t=(...t)=>Ye(...e.map(e=>{const r=e(...t);if(!r)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 r.pipe(st((e,t)=>(setTimeout(()=>{throw e},0),t)))}));try{Object.defineProperty(t,"name",{value:"combineEpics(".concat(e.map(e=>e.name||"").join(", "),")")})}catch(e){}return t}function dn(...e){return un(...e.flatMap(e=>Object.values(e)))}function ln(e,t){return e.pipe(Vt("".concat(jr)),Qe(e=>e.payload.evt===t))}function pn(e,t){return e.pipe(Vt("".concat(xr)),Qe(e=>e.payload.event===t))}function hn(e,t){return e.pipe(Vt("".concat(jr),"".concat(Br)),Qe(e=>e.payload.evt===t))}function _n(e,t){return e.pipe(Vt("".concat(Zr)),Qe(e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t))}var fn="undefined"!=typeof window&&window,vn="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,yn="undefined"!=typeof global&&global,En=fn||yn||vn;function gn(e,t){return void 0===t&&(t=null),new Cn({method:"GET",url:e,headers:t})}function bn(e,t,r){return new Cn({method:"POST",url:e,body:t,headers:r})}function Sn(e,t){return new Cn({method:"DELETE",url:e,headers:t})}function mn(e,t,r){return new Cn({method:"PUT",url:e,body:t,headers:r})}function In(e,t,r){return new Cn({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!En)throw new Error("RxJS could not find any global context (window, self, global)")}();var An=Ae((function(e,t){return e.response}));function On(e,t){return An(new Cn({method:"GET",url:e,responseType:"json",headers:t}))}var Cn=function(e){function t(t){var r=e.call(this)||this,n={async:!0,createXHR:function(){return this.crossDomain?function(){if(En.XMLHttpRequest)return new En.XMLHttpRequest;if(En.XDomainRequest)return new En.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(En.XMLHttpRequest)return new En.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 En.ActiveXObject(e))break}catch(e){}return new En.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 m(t,e),t.prototype._subscribe=function(e){return new Tn(e,this.request)},t.create=((r=function(e){return new t(e)}).get=gn,r.post=bn,r.delete=Sn,r.put=mn,r.patch=In,r.getJSON=On,r),t}(x),Tn=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")||En.FormData&&r.body instanceof En.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 m(t,e),t.prototype.next=function(e){this.done=!0;var t,r=this.xhr,n=this.request,o=this.destination;try{t=new wn(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 u=this.xhr=e.createXHR();this.setupEvents(u,e),r?u.open(n,o,i,r,s):u.open(n,o,i),i&&(u.timeout=e.timeout,u.responseType=e.responseType),"withCredentials"in u&&(u.withCredentials=!!e.withCredentials),this.setHeaders(u,a),c?u.send(c):u.send()}catch(e){this.error(e)}},t.prototype.serializeBody=function(e,t){if(!e||"string"==typeof e)return e;if(En.FormData&&e instanceof En.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 Dn(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)},En.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 Rn("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 Rn("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}(k),wn=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=Nn(this.responseType,t)},Rn=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=Nn(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function Nn(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 Dn=function(e,t){return Rn.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},Pn=Cn.create;const Mn={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 Password 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."}},kn=Mn.default;let Un,Vn,Ln;function jn(e,t){return t in kn?kn[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"}(Un||(Un={})),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"}(Vn||(Vn={})),function(e){e[e.LEAVESUBREASON_WAITINGROOMFAILOVER=1]="LEAVESUBREASON_WAITINGROOMFAILOVER"}(Ln||(Ln={}));const Hn={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},xn={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"},Fn={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}},Gn={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 Bn(e,t){return Object.keys(e).find(r=>e[r]===t)}let Wn;function Kn(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(Wn)o=Wn;else{const e=Object.keys(Fn[3e3]);n.forEach(t=>{const r=function(e){return"en-US"===e&&(e="default"),Mn[e]||Mn.default}(t);o[t]={},e.forEach(e=>{o[t][e]=r[e]})}),Wn=o}return n.forEach(n=>{if(r)return;const i=Bn(o[n],t);i&&(r={key:i,value:Fn[e][i]})}),r||(r={key:"apac.errorcodes_fail",value:200}),r}if(200===e){const n=Bn({"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:Fn[e][n]}:{key:"apac.errorcodes_fail",value:200},r}if(void 0!==Fn[e]){const t=Fn[e],n=Object.keys(t)[0];r={key:n,value:t[n]}}if(r)return r;const n=Bn(Hn,e),o=xn[n];return o?{key:o,value:e}:{key:"apac.errorcodes_fail",value:200}}(e,t),o=jn(r,r);return r!==o?{reason:o,errorCode:n}:{reason:kn[r],errorCode:n}}function qn(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==Gn[r]){const e=Gn[r],n=Object.keys(e)[0];t={key:n,value:e[n]}}if(t){const{key:r,value:n}=t,o=jn(r,r);return r!==o?Object.assign({},e,{reason:o,errorCode:n}):Object.assign({},e,{reason:kn[r],errorCode:n})}const n=Kn(r);return Object.assign({},e,{reason:n.reason,errorCode:n.errorCode})}var zn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Jn(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 Yn=Jn((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,u=function(e){return e.replace(c,a)},d=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,d)},p=function(e){return l(u(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(u>>>12&63)+(void 0!==a?o.charAt(u>>>6&63):"=")+(void 0!==c?o.charAt(63&u):"=")}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("")},b=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 b(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},m=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(b(e))}(m(e))};t.Uint8Array&&(f=function(e){return Uint8Array.from(S(m(e)),(function(e){return e.charCodeAt(0)}))});if(t.Base64={VERSION:"2.6.4",atob:S,btoa:l,fromBase64:I,toBase64:_,utob:u,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:zn)}));function Xn(e){return Yn.Base64.encode(e,!0)}function Qn(e){return Yn.Base64.decode(e)}const Zn={"-":"+",_:"/",".":"="};function $n(e){const t=e.replace(/[-_.]/g,e=>Zn[e]);return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const eo=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount"],to={bChime:"bAllowPlayChimeForEnterOrExit",topic:e=>({meetingTopic:Qn(e)})},ro=ir("GET_MEETING_INFO"),no=ir("GET_INSTANT_MEETING_INFO"),oo=(ir("LOGON_ZOOM_DOMAIN"),ir("VERIFY_ZOOM_RECAPTCHA"),ir("LOGON_THIRD_PARTY_DOMAIN"),ir("PING_RWC_SERVER")),io=ir("MEETING_FAILOVER"),so=ir("LEAVE_MEETING"),ao=ir("END_MEETING"),{setMeetingInfo:co,setWindownOpen:uo,setAppidSignature:lo,setZak:po,setTkMtkguid:ho,setPingRwcTimestamp:_o,setInMeetingInfo:fo,setMeetingAttribute:vo,resetMeeting:yo,setIsHost:Eo,setIsCohost:go,setMeetingIsOnHold:bo,setIsMeetingReset:So,setAudioVideoBeforeOnHold:mo,setCurrentUserAudioBeforeReset:Io,setIsCurrentUserMutedBeforeReset:Ao,setMeetingStatus:Oo,setMeetingRegion:Co,setIsCurrentUserStartVideoBeforeReset:To,setJoinMeetingTimeStamp:wo,setIsEnableQos:Ro}=(ir("REGISTER_WEBINAR"),Cr({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(eo.some(t=>void 0!==e[t])){let t=e;return Object.keys(to).some(t=>void 0!==e[t])&&(t=Object.keys(e).reduce((t,r)=>{const n=to[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}));function No(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 Do,Po,Mo,ko,Uo,Vo;!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"}(Do||(Do={})),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"}(Po||(Po={})),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"}(Mo||(Mo={})),function(e){e.CDN="CDN",e.Global="Global",e.CN="CN"}(ko||(ko={})),function(e){e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed"}(Uo||(Uo={})),function(e){e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory"}(Vo||(Vo={}));const Lo=Xn("{}");class jo{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=Xn("zoom-storage-".concat(e)),this.localStorageKey=Xn("zoom-local-storage"),this.memoryCache={},this.sessionCache=JSON.parse(Qn(sessionStorage.getItem(this.sessionStorageKey)||Lo)),this.localCache=JSON.parse(Qn(localStorage.getItem(this.localStorageKey)||Lo))}static init(e){this.instance=new jo(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:Vo.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:Vo.LocalStorage}:{value:this.memoryCache[e],type:Vo.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case Vo.SessionStorage:{const r=this.sessionCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.sessionCache[e]=n,this.flushValue(Vo.SessionStorage)),n}case Vo.LocalStorage:{const r=this.localCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.localCache[e]=n,this.flushValue(Vo.LocalStorage)),n}case Vo.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 Vo.SessionStorage:delete this.sessionCache[e],this.flushValue(Vo.SessionStorage);break;case Vo.LocalStorage:delete this.localCache[e],this.flushValue(Vo.LocalStorage);break;case Vo.Memory:delete this.memoryCache[e]}}flushValue(e){e===Vo.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,Xn(JSON.stringify(this.sessionCache))):e===Vo.LocalStorage&&localStorage.setItem(this.localStorageKey,Xn(JSON.stringify(this.localCache)))}}function Ho(){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 xo(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}function Fo(){return"object"==typeof WebAssembly&&"function"==typeof Worker}jo.instance=void 0;const Go=()=>"function"==typeof AudioWorklet,Bo=()=>xo(),Wo=()=>!xo()&&!Fo(),Ko=()=>/arm/i.test(navigator.userAgent),qo=()=>/\bCrOS\b/.test(navigator.userAgent),zo=()=>qo()&&Ko(),Jo=()=>!navigator||!navigator.hardwareConcurrency||zo()&&navigator.hardwareConcurrency<=4||qo()&&!Ko()&&navigator.hardwareConcurrency<4||/\bCrKey\b/.test(navigator.userAgent)||"function"!=typeof OffscreenCanvas||"function"!=typeof requestAnimationFrame||"function"!=typeof SharedArrayBuffer?1:(zo()&&navigator.hardwareConcurrency>4||qo()&&!Ko()&&navigator.hardwareConcurrency,9);let Yo,Xo;!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"}(Yo||(Yo={})),function(e){e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM"}(Xo||(Xo={}));const Qo=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 Zo,$o;!function(e){e.WebclientOpt="WEB-CLIENT_OPT",e.WebclientWebinarToken="WEB-CLIENT_WEBINAR_TOKEN",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"}(Zo||(Zo={})),($o||($o={})).WebclientDeviceId="WEBCLIENT_DEVICE_ID";const ei=(window.crypto||window.msCrypto).subtle,ti=Zo.WebclientIVState,ri=Object.keys(Qo).map(e=>Qo[e].sessionType);class ni{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),jo.set(ti,{},Vo.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new ni(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(xo()||!Fo())&&r===Xo.AES_GCM,this.gcmSessionKey=$n(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=$n(t);return i.set(s,0),i.set(o,s.length),i=i.subarray(0,s.length+4),ei.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!0,["sign"]).then(e=>ei.sign({name:"HMAC"},e,i)).then(e=>ei.importKey("raw",e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))}getNextIV(e){const t=jo.get(ti);return void 0===t[e]?(t[e]=0,jo.set(ti,t,Vo.SessionStorage)):jo.set(ti,t=>u(u({},t),{},{[e]:t[e]+1}),Vo.SessionStorage)}resetIVState(){const e=jo.get(ti);if(void 0===e);else{const t=Object.keys(e).filter(e=>ri.indexOf(e)>-1);t.length>0&&(t.forEach(t=>{e[t]+=1e6}),jo.set(ti,e,Vo.SessionStorage))}}static resetIV(){if(void 0===this.instance)throw new Error("reset before intialize");this.instance.resetIVState()}static beginEncrypt({text:e,type:t}){const r=new Uint8Array(0);if(this.instance&&this.instance.isGCMEnabled){const n=16,o=this.instance.getNextIV(t.sessionType),i=new ArrayBuffer(16),s=new Uint8Array(i);new DataView(i).setUint32(0,o,!0);let a=null;return a="BO_BROADCAST"===t.sessionType?this.instance.gcmMainSessionKey:this.instance.gcmSessionKey,this.instance.beginCrypto(a,this.instance.zoomId,t.gcmType).then(t=>{const o=(new TextEncoder).encode(e);return ei.encrypt({name:"AES-GCM",iv:s,additionalData:r,tagLength:8*n},t,o)}).then(e=>{const t=1+s.byteLength+2+r.byteLength+4+e.byteLength,o=new ArrayBuffer(t);new Uint8Array(o)[0]=s.length,new Uint8Array(o,1,s.byteLength).set(s),new DataView(o).setUint16(1+s.byteLength,r.length,!0),new Uint8Array(o,3+s.byteLength).set(r),new DataView(o).setUint32(1+s.byteLength+2+r.byteLength,e.byteLength-n,!0),new Uint8Array(o,1+s.byteLength+2+r.byteLength+4).set(new Uint8Array(e));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(Xn(e))}static beginDecrypt({decryptedText:e,type:t,zoomId:r}){if(this.instance&&this.instance.isGCMEnabled){const n=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 ei.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 t=new TextDecoder("utf-8");return Promise.resolve({message:t.decode($n(e))})}}}let oi;ni.instance=void 0,function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(oi||(oi={}));class ii{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)}))}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){return{seq:this.sendMessageToRwg({evt:4105,body:{bRecord:e}})}}expel(e){return{seq:this.sendMessageToRwg({evt:4107,body:{userId: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,t=!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,r=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:u({},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){return{seq:r?this.sendMessageToRwg({evt:4135,body:{text:e,destNodeID:t,sn:r}}):this.sendMessageToRwg({evt:4135,body:{text:e,destNodeID:t}})}}assignCC(e,t){return{seq:this.sendMessageToRwg({evt:4137,body:{id:e,bCCEditor:t}})}}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,t){return{seq:this.sendMessageToRwg({evt:4147,body:{id:e,bOn:t}})}}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(e=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}})}}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){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:t,bCallme:r}})}}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(e=1,t,r){return{seq:this.sendMessageToRwg({evt:12289,body:{id:e,size:t,bOn:r}})}}unsubscribeVideo(e=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){return{seq:this.sendMessageToRwg({evt:16415,body:{id:e,size:t}})}}unsubscribeSharing(e){return{seq:this.sendMessageToRwg({evt:16417,seq:1,body:{id:e}})}}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){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,boOn:!1}})}}stopSharing(e){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,bOn:!0}})}}lockSharing(e){return{seq:this.sendMessageToRwg({evt:4169,body:{lockShare:e}})}}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:u({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}})}}}class si extends ii{static createAgent(){return this.rwgInstance||(this.rwgInstance=new si),this.rwgInstance}}si.rwgInstance=null;class ai extends ii{static getInstance(){return this.instance||(this.instance=new ai),this.instance}}ai.instance=null;const ci=Zo.WebclientIVState;class ui{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new ui),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:{[Yo.AUDIO_ENCODE]:jo.get(ci)&&jo.get(ci)[Yo.AUDIO_ENCODE],[Yo.VIDEO_ENCODE]:jo.get(ci)&&jo.get(ci)[Yo.VIDEO_ENCODE],[Yo.SHARING_ENCODE]:jo.get(ci)&&jo.get(ci)[Yo.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(si.createAgent())}}setAssetsAndConstraint(e,t){var r;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=(e=>({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),this.onMediaSDKCallback=this.onMediaSDKCallback.bind(this),null===(r=this.instance)||void 0===r||r.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){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}connect({svcUrl:e,meetingNumber:t,conId:r,e2eEncrypt:n,isViewOnly:o,currentUserId:i,isWebinar:s,enableQos:a}){var c,u,d;this.svcUrl=e,this.meetingNumber=t,this.confId=r;const l=((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(Bo()?"j":"s","&cid=").concat(r)}))(e,t,r);this.mediaSocketAddress=l,this.currentUserId=i;const p=Jo();var h,_,f,v,y,E,g,b,S,m;(Fo()?null===(h=this.instance)||void 0===h||h.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkletPath:null===(_=this.mediaWorkersPath)||void 0===_?void 0:_.audioWorkletPath,e2eEncrypt:n,isEnableListenInitEvent:!0}):null===(f=this.instance)||void 0===f||f.setPropsBeforeInit({callback:this.onMediaSDKCallback,e2eEncrypt:n,isEnableListenInitEvent:!0}),!0===(null===(c=this.constraints)||void 0===c?void 0:c.audio)&&Fo())&&((s||Go())&&(null===(S=this.instance)||void 0===S||S.initAudioDecode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a)),!Go()||s&&o||null===(m=this.instance)||void 0===m||m.initAudioEncode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a));!0===(null===(u=this.constraints)||void 0===u?void 0:u.video)&&Fo()&&(null===(v=this.instance)||void 0===v||v.initVideoDecode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p),s&&o||null===(y=this.instance)||void 0===y||y.initVideoEncode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p)),!0===(null===(d=this.constraints)||void 0===d?void 0:d.screen)&&(Fo()?(null===(E=this.instance)||void 0===E||E.initSharingDecode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p),s&&o||null===(g=this.instance)||void 0===g||g.initSharingEncode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p)):null===(b=this.instance)||void 0===b||b.initSharingDecode(l.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;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(22,{CaptureAudio:n,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t},speakerInfo:{defaultDeviceId:r}})}leaveComputerAudio(){var e;null===(e=this.instance)||void 0===e||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,u,d){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:d,waterMarkText:u,zone:r})}stopRenderVideo(e,t,r,n,o=!1){var i;null===(i=this.instance)||void 0===i||i.Notify_MeidaSDK(2,{canvas:e,userId:t,RGBA:n,doNotClean:o,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,r=!1,n=""){var o;this.receivedSharingCanvas=t,null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(23,{width:0,height:0,ssrc:e,canvas:t,enableWaterMark:r,waterMarkText:n})}stopRenderSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(24,{})}switchSharingSource(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(36,{ssrc:e})}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,u({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=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=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}(e,["dimension"]);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(27,u(u({},r),n))}startDesktopSharing(e,t,r,n=!0){var o;this.sharingCanvas=document.querySelector("#".concat(t)),null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(30,{mode:n,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,Jo())}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})}}let di,li;ui.agentInstance=void 0,function(e){e.Expel="expel",e.Promote="promote",e.Depromote="depromote",e.MemberChange="memberChange",e.RaiseHand="raisehand",e.LowerHand="lowerhand",e.PutdownHands="putdownhands"}(di||(di={})),function(e){e[e.AttendeeToAllPanelist=1]="AttendeeToAllPanelist",e[e.PanelistToAttendee=3]="PanelistToAttendee"}(li||(li={}));const pi=["CONNECTED","DISCONNECTED","POOL","CONNFAIL","OnlineMembers","GroupChange","RosterChange","WebinarQA","Message"];class hi{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;pi.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 hi),this.agentInstance}onXmppCallback(e,t){this.callbackList.length>0&&this.callbackList.forEach(r=>r(e,t))}registerCallback(e){this.callbackList.push(e)}unregisterCallback(e){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}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;pi.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}}function _i(e){return j(Ae((t,r)=>e(t,r)),Qe(e=>null!=e))}function fi(e){return j(je((t,r)=>e(t,r)||$))}function vi(e){return j(At((t,r)=>e(t,r)||$))}hi.agentInstance=void 0;const yi={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},Ei={["".concat(7937)]:()=>({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 gi(e=yi){return t=>new x(r=>{const n=new Map;let o=0,i=null;const{period:s,rules:a}=e;let c=null;i||(i=((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}})(()=>{o=0},s));const u=Object.keys(Ei),d=t.subscribe({next(e){if(e&&e.evt&&null!==i){o+=1;const{evt:t,body:i}=e,s=String(t);if(u.indexOf(s)>=0)if(c){const e=n.get(s);if(e)e.onThrottle(i);else{const e=Ei[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=Ei[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()=>{d.unsubscribe(),i&&(i(),i=null),o=0}})}var bi;!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"}(bi||(bi={}));const Si={success:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",fail:["JOIN_MEETING_FAILED"]},mi={[bi.ConnectionChange]:[{event:"JOIN_MEETING_SUCCESS",payload:()=>({state:Uo.Connected})},{event:"RECONNECTING_MEETING",payload:e=>u({state:Uo.Reconnecting},e)},{event:"LEAVING_MEETING",payload:e=>u({state:Uo.Closed},e)}],[bi.OnHoldChange]:[{event:"MEETING_IN_WAITING_ROOM",payload:e=>({isOnHold:e})}],[bi.UserAdd]:[{event:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"ADD_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[bi.UserUpdate]:[{event:"UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[bi.UserRemove]:[{event:"REMOVE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[bi.AttendeeUpdate]:[{event:"UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",payload:e=>e}]};let Ii;!function(e){e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change"}(Ii||(Ii={}));const Ai={[Ii.ChatOnMessage]:[{event:"CHAT_RECEIVE_MESSAGE_EVENTS",payload:e=>e}],[Ii.ChatPrivilegeChange]:[{event:"CHAT_PRIVILEGE_CHANGE",payload:e=>e}]};let Oi,Ci,Ti;!function(e){e.OnRecordingChange="on-recording-change",e.OnLocalRecordingChange="on-local-recording-change"}(Oi||(Oi={})),function(e){e.Started="Started",e.Stopped="Stopped"}(Ci||(Ci={})),function(e){e.Stopped="Stopped",e.Started="Started",e.Paused="Paused"}(Ti||(Ti={}));const wi={[Oi.OnRecordingChange]:[{event:"START_RECORDING_SUCCESS",payload:()=>({state:Ci.Started})},{event:"STOP_RECORDING_SUCCESS",payload:()=>({state:Ci.Stopped})}],[Oi.OnLocalRecordingChange]:[{event:"LOCAL_RECORDING_CHANGE",payload:e=>{const t={};return Array.isArray(e)?e.forEach(e=>{t[e.id]=e.bLocalRecordStatus}):t[e.id]=e.bLocalRecordStatus,t}}]};let Ri,Ni,Di,Pi;!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"}(Ri||(Ri={})),function(e){e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed"}(Ni||(Ni={})),function(e){e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk"}(Di||(Di={})),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"}(Pi||(Pi={}));const Mi=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"});let ki,Ui,Vi,Li,ji,Hi,xi,Fi,Gi,Bi,Wi;!function(e){e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare"}(ki||(ki={})),function(e){e.Sharing="sharing",e.Paused="paused",e.End="ended"}(Ui||(Ui={})),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"}(Vi||(Vi={})),function(e){e.Active="Active",e.Inactive="Inactive"}(Li||(Li={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted"}(ji||(ji={})),function(e){e.Active="Active",e.Inactive="Inactive"}(Hi||(Hi={})),function(e){e.Success="Success",e.Failed="Failed",e.Initial="Initial"}(xi||(xi={})),function(e){e.Started="Started",e.Stopped="Stopped",e.Failed="Failed"}(Fi||(Fi={})),function(e){e.Approved="Approved",e.Rejected="Rejected"}(Gi||(Gi={})),function(e){e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture"}(Bi||(Bi={})),function(e){e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change"}(Wi||(Wi={}));const Ki={[Wi.DeviceChange]:[{event:"MEDIA_DEVICE_CHANGE",payload:()=>({})}],[Wi.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"})}]},qi={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 zi;!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"}(zi||(zi={}));const Ji={[zi.VideoActiveChange]:[{event:"RECEIVE_VIDEO_ACTIVE_INDICATION",payload:e=>({state:e.bVideoOn?Li.Active:Li.Inactive,userId:e.userId})}],[zi.VideoCapturingChange]:[{event:"VIDEO_CAPTURE_START_SUCCESS",payload:()=>({state:Fi.Started})},{event:"VIDEO_CAPTURE_STOP_RESULT",payload:e=>({state:(null==e?void 0:e.failed)?Fi.Failed:Fi.Stopped})}],[zi.VideoMutedChange]:[{event:"RECEIVE_VIDEO_MUTE_INDICATION",payload:e=>({state:e.isVideoMuted?ji.Muted:ji.Unmuted,userId:e.id})}],[zi.AskForStartVideoConsent]:[{event:"ASK_FOR_START_VIDEO_CONSENT",payload:e=>({state:e.isVideoMuted?ji.Muted:ji.Unmuted,userId:e.id})}],[zi.VideoSpotlightChange]:[{event:"VIDEO_SPOTLIGHT_CHANGE",payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map(e=>({userId:e}))})}],[zi.VideoDimensionChange]:[{event:"RECEIVE_VIDEO_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[zi.VideoFollowHostOrder]:[{event:"VIDEO_FOLLOW_HOST_ORDER_CHANGE",payload:e=>({isFollowHostOrder:e.bOn})}],[zi.VideoHostLayoutChange]:[{event:"VIDEO_HOST_DRAG_LAYOUT_CHANGE",payload:e=>Array.isArray(e.layout)?e.layout.map(e=>({userId:e})):[]}],[zi.PeerVideoStateChange]:[{event:"VIDEO_NEW_USER_START",payload:e=>u({action:"Start"},e)},{event:"VIDEO_OLD_USER_STOP",payload:e=>u({action:"Stop"},e)}]};let Yi;!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"}(Yi||(Yi={}));const Xi={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"}},Qi={[Yi.ActiveSpeaker]:[{event:"AUDIO_ACTIVE_SPEAKER",payload:e=>e}],[Yi.UnmuteAudioConsent]:[{event:"AUDIO_UNMUTE_CONSENT",payload:e=>({reason:e})}],[Yi.CurrentAudioChange]:[{event:"AUDIO_CURRENT_USER_JOIN_BY_PHONE",payload:()=>({action:"join",type:"phone"})},{event:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",payload:()=>({action:"join",type:"computer"})},{event:"AUDIO_CURRENT_USER_LEAVE_AUDIO",payload:()=>({action:"leave"})},{event:"AUDIO_CURRENT_USER_MUTED",payload:({source:e})=>({action:"muted",source:e})},{event:"AUDIO_CURRENT_USER_UNMUTED",payload:({source:e})=>({action:"unmuted",source:e})}],[Yi.DialoutStateChange]:[{event:"AUDIO_DIALOUT_RESULT_CODE",payload:e=>e}],[Yi.MergeAudio]:[{event:"AUDIO_MERGE_AUDIO_INDICATION",payload:e=>e}],[Yi.AutoPlayFailed]:[{event:"AUDIO_AUTO_PLAY_FAILED",payload:()=>{}}]};let Zi;!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"}(Zi||(Zi={}));const $i={[Zi.ShareActiveChange]:[{event:"SHARE_ACTIVE_INDICATION",payload:e=>({state:e.isActive?"Active":"Inactive",userId:e.activeUserId})}],[Zi.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})}],[Zi.SharePassiveStop]:[{event:"SHARE_VIDEO_STREAMS_END",payload:()=>({reason:Bi.StopScreenCapture})},{event:"SHARE_PASSIVE_STOP_SHARE",payload:()=>({reason:Bi.PrivilegeChange})}],[Zi.SharePeerStateChange]:[{event:"SHARE_NEW_USER_ADD",payload:e=>({userId:e.id,action:"Start"})},{event:"SHARE_USER_REMOVE",payload:e=>({userId:e.id,action:"Stop"})}],[Zi.ShareContentChange]:[{event:"SHARE_AUTO_CHANGE_SOURCE",payload:e=>e}],[Zi.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?Gi.Approved:Gi.Rejected})}],[Zi.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[Zi.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[Zi.SharePrivilegeChange]:[{event:"SHARE_PRIVILEGE_CHANGE",payload:e=>({privilege:e})}]},es="INVALID_OPERATION",ts="INVALID_PARAMETERS";let rs;!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"}(rs||(rs={}));const ns={[rs.InviteToJoin]:[{event:"BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",payload:e=>e}],[rs.RoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_COUTDOWN",payload:e=>e}],[rs.RoomTimeUp]:[{event:"BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",payload:e=>e}],[rs.ClosingRoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",payload:e=>e}],[rs.BroadcastMessage]:[{event:"BREAKOUT_ROOM_BROADCAST_MESSAGE",payload:e=>e}],[rs.AskForHelp]:[{event:"BREAKOUT_ROOM_ASK_HELP_REQUEST",payload:e=>e}],[rs.AskForHelpResponse]:[{event:"BREAKOUT_ROOM_ASK_HELP_RESPONSE",payload:e=>e}],[rs.RoomStateChange]:[{event:"BREAKOUT_ROOM_ATTRIBUTE_INDICATION",payload:e=>({status:e.controlStatus})}],[rs.MainSessionUserUpdate]:[{event:"BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE",payload:()=>({})}]},os=u(u(u(u(u(u(u(u(u(u({},mi),{"closed-caption-message":[{event:"CC_RECEIVE_MESSAGE",payload:e=>e}]}),Ai),wi),Qi),Ji),{"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}]}),$i),Ki),ns),is=(ss=ss||Object.create(null),{on:function(e,t){(ss[e]||(ss[e]=[])).push(t)},off:function(e,t){ss[e]&&ss[e].splice(ss[e].indexOf(t)>>>0,1)},emit:function(e,t){(ss[e]||[]).slice().map((function(e){e(t)})),(ss["*"]||[]).slice().map((function(r){r(e,t)}))}});var ss;const as=new Map,cs=new Array,us=(e,t)=>{is.emit(e,t)},ds=e=>new Promise((t,r)=>{e.fail&&e.fail.length>0?tt(qe(is,e.success).pipe(ht(1)),Ye(...e.fail.map(e=>qe(is,e).pipe(ht(1),je(t=>ae({type:e,payload:t})))))).subscribe(e=>t(e),e=>{"object"==typeof e.payload?r(u({type:e.type},e.payload)):void 0===e.payload?r({type:e.type}):r(e)}):qe(is,e.success).pipe(ht(1)).subscribe(e=>t(e))}),ls=(e,t,r=1e4)=>new Promise((n,o)=>{let i=$;"string"==typeof e?i=qe(is,e).pipe(ht(1)):(i=qe(is,e.event),e.operations&&(i=e.operations.reduce((e,t)=>e.pipe(t),i))),tt(i,ot(r).pipe(gt(ae("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"})})}),ps=(e,t)=>void 0!==t?qe(is,e).pipe(ht(t)):qe(is,e),hs=()=>{cs.forEach(e=>{e.unsubscribe()}),cs.length=0,as.clear()};var _s=Jn((function(e,t){var r;r=function(){function e(){for(var e=0,t={};e1&&void 0!==arguments[1]?arguments[1]:0,r=(bs[e[t+0]]+bs[e[t+1]]+bs[e[t+2]]+bs[e[t+3]]+"-"+bs[e[t+4]]+bs[e[t+5]]+"-"+bs[e[t+6]]+bs[e[t+7]]+"-"+bs[e[t+8]]+bs[e[t+9]]+"-"+bs[e[t+10]]+bs[e[t+11]]+bs[e[t+12]]+bs[e[t+13]]+bs[e[t+14]]+bs[e[t+15]]).toLowerCase();if(!gs(r))throw TypeError("Stringified UUID is invalid");return r}(n)}const{WebclientIsOnHold:Is,WebclientOpt:As,WebclientParticipantId:Os,WebclientZoomId:Cs,WebclientWebinarToken:Ts}=Zo,{WebclientDeviceId:ws}=$o;let Rs,Ns,Ds,Ps,Ms,ks,Us;!function(e){e.Closed="closed",e.Connecting="connecting",e.Connected="connected"}(Rs||(Rs={})),function(e){e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually"}(Ns||(Ns={})),function(e){e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(Ds||(Ds={})),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"}(Ps||(Ps={})),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"}(Ms||(Ms={})),function(e){e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO"}(ks||(ks={})),function(e){e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom"}(Us||(Us={}));const Vs=si.createAgent();let Ls;var js=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(Vt("".concat(Mr)),Nt(t),Qe(([,e])=>"closed"===e.socket.zoomSocketStatus),vi(([,e])=>{const{socket:{retryCount:t,rwgServerList:r},meeting:n,breakoutRoom:o}=e;let i;if(n.zlkJwtToken)i=function({passWord:e,meetingNumber:t,userName:r,topic:n,trackAuth:o,tid:i,meetingId:s,ts:a,auth:c,lang:u,retryCount:d,rwgServerList:l,cv:p,zlkJwtToken:h}){const _=_s.get("_zm_mtk_guid");let f=jo.get(ws);if(f||(f=ms(),jo.set(ws,f,Vo.LocalStorage)),l.length>d){const v=l[d];let y={dn2:Xn(r),topic:Xn(n),auth:c,browser:Ho(),trackAuth:o,mid:s,tid:i,lang:u,ts:a,"ZM-CID":f,_ZM_MTG_TRACK_ID:_||"",iccv:p,cfs:0,zlkJwtToken:h};""!==e&&(y=Object.assign(y,{mpwd:Xn(e)})),v.rwcAuth?y=Object.assign(y,{rwcAuth:v.rwcAuth}):v.rwcToken&&(y=Object.assign(y,{rwcToken:v.rwcToken}));let E=2;return Bo()?E=1:Wo()&&(E=0),y=Object.assign(y,{as_type:E}),[{key:As,queryKey:"opt"},{key:Os,queryKey:"participantID"},{key:Cs,queryKey:"zoomid"}].forEach(e=>{const t=jo.get(e.key);void 0!==t&&(y[e.queryKey]=t)}),"wss://".concat(v.rwg,"/instantsdk/").concat(t,"?").concat(new URLSearchParams(y).toString())}return null}(u(u({},n),{},{retryCount:t,rwgServerList:r}));else{let e=u(u({},n),{},{retryCount:t,rwgServerList:r});if(o&&o.currentRoom.status===Ms.Joining){const{currentRoom:{boId:t,boConfId:r,boToken:n}}=o;e=u(u({},e),{},{bid:t,botk:n,confID:r})}i=function({isHost:e,isOriginHost:t,passWord:r,meetingNumber:n,userName:o,zak:i,trackAuth:s,tid:a,sign:c,meetingId:u,ts:d,auth:l,lang:p,tk:h,retryCount:_,rwgServerList:f,userEmail:v,cv:y,bid:E,botk:g,confID:b}){const S=_s.get("_zm_mtk_guid");let m=jo.get(ws);if(m||(m=ms(),jo.set(ws,m,Vo.LocalStorage)),f.length>_){const I=f[_];let A={dn2:Xn(o),auth:l,sign:c,browser:Ho(),trackAuth:s,mid:u,tid:a,email:v,lang:p,zak:i||"",tk:h||"",ts:d,"ZM-CID":m,_ZM_MTG_TRACK_ID:S||"",jscv:y,cfs:0};e&&t||""===r||(A=Object.assign(A,{mpwd:r})),I.rwcAuth?A=Object.assign(A,{rwcAuth:I.rwcAuth}):I.rwcToken&&(A=Object.assign(A,{rwcToken:I.rwcToken}));let O=2;return Bo()?O=1:Wo()&&(O=0),A=Object.assign(A,{as_type:O}),[{key:Is,queryKey:"cfs"},{key:As,queryKey:"opt"},{key:Os,queryKey:"participantID"},{key:Cs,queryKey:"zoomid"},{key:Ts,queryKey:"tk"}].forEach(e=>{const t=jo.get(e.key);void 0!==t&&(A[e.queryKey]=t)}),E&&g&&b&&Object.assign(A,{bid:Xn(E),botk:g,confID:b}),"wss://".concat(I.rwg,"/wc/api/").concat(n,"?").concat(new URLSearchParams(A).toString())}return null}(e)}if(i){const e=(s=i,Vs.connect(s),Ls=new K,ze(e=>Vs.on(oi.Message,e),e=>Vs.off(oi.Message,e),e=>e.data).subscribe(Ls),Ls);return Ye(e.pipe(Qe(e=>"string"==typeof e),Ae(e=>JSON.parse(e)),gi(),_i(e=>0===e.evt?void(e.body&&"invalid parameters!"===e.body.test&&us("JOIN_MEETING_FAILED",Kn(Hn.INVALID_PARAMETER))):jr(e)),bt(Wr(Rs.Connecting))),e.pipe(Qe(e=>e instanceof ArrayBuffer),Ae(e=>Hr(e))))}var s})),connectedZoomSocketEpic:(e,t)=>e.pipe(Vt("".concat(Mr)),At(()=>{const[e,r,n]=[oi.Open,oi.Close,oi.Error].map(e=>ze(t=>Vs.on(e,t),t=>Vs.on(e,t)));return Ye(e.pipe(je(()=>Ye(se(Wr(Rs.Connected)),ot(6e4).pipe(Nt(t),Qe(([,e])=>"initial"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(us("RECONNECTING_MEETING",{reason:Mo.Failover}),io())))))),r.pipe(Nt(t),Qe(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(us("RECONNECTING_MEETING",{reason:Mo.Failover}),io()))),n.pipe(Nt(t),fi(([,e])=>{const{meeting:{meetingStatus:t,isMeetingReset:r},socket:{retryCount:n}}=e;return"initial"===t?ke([qr(n+1),Ur({retry:!0})]):r?void 0:(us("RECONNECTING_MEETING",{reason:Mo.Failover}),se(io()))})))})),disconnectZoomSocketEpic:e=>e.pipe(Vt("".concat(Ur)),je(e=>e.payload&&e.payload.retry?se(Mr()).pipe(ut(1e3),bt(Wr(Rs.Closed))):se(Wr(Rs.Closed))),ut(100),Tt(()=>{var e;Vs.close(),null===(e=Ls)||void 0===e||e.complete()}))});const Hs=hi.getInstance();let xs;var Fs=Object.freeze({__proto__:null,loadWebIMEpic:(e,t)=>e.pipe(Vt("".concat(Lr)),Nt(t),je(([,e])=>{const{media:{assetsPath:t}}=e;return ke(new Promise((e,r)=>{No("".concat(t,"/webim.min.js"),()=>{e("")},()=>{r()})})).pipe(vt(Jr(!0)),st(e=>se(Jr(!1))))})),connectXMPPSocketEpic:(e,t)=>e.pipe(Vt("".concat(kr)),Nt(t),Qe(([,e])=>"closed"===e.socket.xmppSocketStatus),vi(([,t])=>{const{meeting:{svcUrl:r,meetingNumber:n,conId:o,jid:i,userName:s},socket:{isXmppSDKLoaded:a}}=t,c=Fo()&&Go()?3:2;let u=se(a);return!1===a&&(u=e.pipe(Vt("".concat(Jr)),ht(1))),u.pipe(je(e=>{return e?(t={svcUrl:r,meetingNumber:n,conId:o,jid:i,userName:s,clientCap:c},Hs.connect(t),xs=new K,ze(e=>Hs.registerCallback(e),e=>Hs.unregisterCallback(e),(e,t)=>({event:e,data:t})).subscribe(xs),xs).pipe(Ae(e=>xr(e)),bt(zr(Rs.Connecting))):ae("webim load fail");var t}))})),connectedXmppSocketEpic:(e,t)=>e.pipe(Vt("".concat(zr)),Qe(e=>e.payload===Rs.Connecting),vi(()=>{if(xs){const e=xs.pipe(Qe(e=>"CONNECTED"===e.event)),r=xs.pipe(Qe(e=>"DISCONNECTED"===e.event));return Ye(e.pipe(je(()=>se(zr(Rs.Connected)))),r.pipe(Nt(t),Qe(([,e])=>"closed"!==e.socket.xmppSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(us("RECONNECTING_MEETING",{reason:Mo.Failover}),io()))))}})),disconnectXmppSocketEpic:e=>e.pipe(Vt("".concat(Vr)),vt(zr(Rs.Closed)),Tt(()=>{var e;Hs.disconnect(),null===(e=xs)||void 0===e||e.complete()}))});const Gs=ai.getInstance();let Bs;var Ws=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(Vt("".concat(Fr)),Nt(t),Qe(([,e])=>"closed"===e.socket.mainSessionSocketStatus),At(([,e])=>{const{meeting:{svcUrl:t,meetingNumber:r,conId:n}}=e;return(e=>(Gs.connect(e),Bs=new K,ze(e=>Gs.on(oi.Message,e),e=>Gs.off(oi.Message,e)).pipe(Ae(e=>e.data)).subscribe(Bs),Bs))(function(e,t,r){return"wss://".concat(e,"/wc/media/").concat(t,"?type=m&cid=").concat(r,"&mode=2")}(t,r,n)).pipe(Ae(e=>JSON.parse(e)),Qe(e=>0!==e.evt),gi(),Ae(e=>Br(e)),bt(Yr(Rs.Connecting)))})),connectedMainSessionSocketEpic:(e,t)=>e.pipe(Vt("".concat(Fr)),At(()=>{const[e,r,n]=[oi.Open,oi.Close,oi.Error].map(e=>ze(t=>Gs.on(e,t),t=>Gs.on(e,t)));return Ye(e.pipe(vt(Yr(Rs.Connected))),r.pipe(Nt(t),Qe(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus),Ae(()=>(us("RECONNECTING_MEETING",{reason:Mo.Failover}),io()))),n.pipe(Ae(()=>(us("RECONNECTING_MEETING",{reason:Mo.Failover}),io()))))})),disconnectMainSessionSocketEpic:e=>e.pipe(Vt("".concat(Gr)),vt(Yr(Rs.Closed)),Tt(()=>{var e;Gs.close(),null===(e=Bs)||void 0===e||e.complete()}))});function Ks(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:Zs(e)?2:$s(e)?3:0}function Xs(e,t){return 2===Ys(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qs(e,t,r){var n=Ys(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function Zs(e){return Oa&&e instanceof Map}function $s(e){return Ca&&e instanceof Set}function ea(e){return e.o||e.t}function ta(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Pa(e);delete t[Na];for(var r=Da(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=na),Object.freeze(e),t&&Js(e,(function(e,t){return ra(t,!0)}),!0))}function na(){Ks(2)}function oa(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function ia(e){var t=Ma[e];return t||Ks(19,e),t}function sa(){return Ia}function aa(e,t){t&&(ia("Patches"),e.u=[],e.s=[],e.v=t)}function ca(e){ua(e),e.p.forEach(la),e.p=null}function ua(e){e===Ia&&(Ia=e.l)}function da(e){return Ia={p:[],l:Ia,h:e,m:!0,_:0}}function la(e){var t=e[Na];0===t.i||1===t.i?t.j():t.g=!0}function pa(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.O||ia("ES5").S(t,e,n),n?(r[Na].P&&(ca(t),Ks(4)),zs(e)&&(e=ha(t,e),t.l||fa(t,e)),t.u&&ia("Patches").M(r[Na],e,t.u,t.s)):e=ha(t,r,[]),ca(t),t.u&&t.v(t.u,t.s),e!==wa?e:void 0}function ha(e,t,r){if(oa(t))return t;var n=t[Na];if(!n)return Js(t,(function(o,i){return _a(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return fa(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=ta(n.k):n.o;Js(3===n.i?new Set(o):o,(function(t,i){return _a(e,n,o,t,i,r)})),fa(e,o,!1),r&&e.u&&ia("Patches").R(n,r,e.u,e.s)}return n.o}function _a(e,t,r,n,o,i){if(qs(o)){var s=ha(e,o,i&&t&&3!==t.i&&!Xs(t.D,n)?i.concat(n):void 0);if(Qs(r,n,s),!qs(s))return;e.m=!1}if(zs(o)&&!oa(o)){if(!e.h.N&&e._<1)return;ha(e,o),t&&t.A.l||fa(e,o)}}function fa(e,t,r){void 0===r&&(r=!1),e.h.N&&e.m&&ra(t,r)}function va(e,t){var r=e[Na];return(r?ea(r):e)[t]}function ya(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 Ea(e){e.P||(e.P=!0,e.l&&Ea(e.l))}function ga(e){e.o||(e.o=ta(e.t))}function ba(e,t,r){var n=Zs(t)?ia("MapSet").T(t,r):$s(t)?ia("MapSet").F(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:sa(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=ka;r&&(o=[n],i=Ua);var s=Proxy.revocable(o,i),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(t,r):ia("ES5").J(t,r);return(r?r.A:sa()).p.push(n),n}function Sa(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ta(e)}var ma,Ia,Aa="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Oa="undefined"!=typeof Map,Ca="undefined"!=typeof Set,Ta="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,wa=Aa?Symbol.for("immer-nothing"):((ma={})["immer-nothing"]=!0,ma),Ra=Aa?Symbol.for("immer-draftable"):"__$immer_draftable",Na=Aa?Symbol.for("immer-state"):"__$immer_state",Da="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Pa=Object.getOwnPropertyDescriptors||function(e){var t={};return Da(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Ma={},ka={get:function(e,t){if(t===Na)return e;var r=ea(e);if(!Xs(r,t))return function(e,t,r){var n,o=ya(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||!zs(n)?n:n===va(e.t,t)?(ga(e),e.o[t]=ba(e.A.h,n,e)):n},has:function(e,t){return t in ea(e)},ownKeys:function(e){return Reflect.ownKeys(ea(e))},set:function(e,t,r){var n=ya(ea(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(e.D[t]=!0,!e.P){if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,va(ea(e),t))&&(void 0!==r||Xs(e.t,t)))return!0;ga(e),Ea(e)}return e.o[t]=r,!0},deleteProperty:function(e,t){return void 0!==va(e.t,t)||t in e.t?(e.D[t]=!1,ga(e),Ea(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=ea(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(){Ks(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ks(12)}},Ua={};Js(ka,(function(e,t){Ua[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ua.deleteProperty=function(e,t){return ka.deleteProperty.call(this,e[0],t)},Ua.set=function(e,t,r){return ka.set.call(this,e[0],t,r,e[0])};var Va=new(function(){function e(e){this.O=Ta,this.N=!1,"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var t=e.prototype;return t.produce=function(e,t,r){if("function"==typeof e&&"function"!=typeof t){var n=t;t=e;var o=this;return function(e){var r=this;void 0===e&&(e=n);for(var i=arguments.length,s=Array(i>1?i-1:0),a=1;a1?r-1:0),i=1;i=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}var o=ia("Patches").$;return qs(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(r+1))}))},e}()),La=Va.produce;Va.produceWithPatches.bind(Va),Va.setAutoFreeze.bind(Va),Va.setUseProxies.bind(Va),Va.applyPatches.bind(Va),Va.createDraft.bind(Va),Va.finishDraft.bind(Va);const ja={zoomSocketStatus:Rs.Closed,isXmppSDKLoaded:!1,xmppSocketStatus:Rs.Closed,mainSessionSocketStatus:Rs.Closed,retryCount:0,rwgServerList:[]},Ha=Pr({["".concat(Wr)]:La((e,{payload:t})=>{e.zoomSocketStatus=t}),["".concat(Kr)]:La((e,{payload:t})=>{const{rwgServerList:r}=e;r.find(e=>e===t.rwg)||r.push(t)}),["".concat(qr)]:La((e,{payload:t})=>{e.retryCount=t}),["".concat(zr)]:La((e,{payload:t})=>{e.xmppSocketStatus=t}),["".concat(Jr)]:La((e,{payload:t})=>{e.isXmppSDKLoaded=t}),["".concat(Yr)]:La((e,{payload:t})=>{e.mainSessionSocketStatus=t}),["".concat(Xr)]:()=>ja},ja),xa=dn(js,Fs,Ws),{setAttendeesList:Fa,setXmppAttendeeList:Ga,setIsAdmitAllSilentUsers:Ba,resetParticipants:Wa,addFailoverAttendees:Ka,removeFailoverAttendees:qa,setClearRaiseHand:za,setClearAttendeeFeedback:Ja}=Cr({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:()=>({})});let Ya,Xa,Qa;!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"}(Ya||(Ya={})),function(e){e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee"}(Xa||(Xa={})),function(e){e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323"}(Qa||(Qa={}));const Za=e=>(e&Qa.Phone)===Qa.Phone,$a=e=>e===Ya.ViewOnlyCanTalk,ec=e=>(e&Ya.ViewOnly)===Ya.ViewOnly,tc={id:"userId",type:e=>Za(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>{return{userRole:e,isHost:(t=e,(t&Ya.Host)===Ya.Host)};var t},dn2:e=>({displayName:Qn(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest"};var rc=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>ln(e,7937).pipe(Ae(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=tc[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)),Nt(t),je(([e,t])=>{const r=[Fa(e)],{meeting:{userId:n},participants:{attendeesList:o,failoverAttendeesList:i}}=t;if(e.add){const t=e.add.find(e=>e.userId===n);void 0!==t&&us("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const o=e.add.filter(e=>e.userId!==n);if(o.length>0){const e=o.filter(e=>!$a(e.userRole)).map(e=>{const t=i.find(t=>t.zoomID===e.zoomID);return t?u(u({},e),{},{source:t.isOnHold?"on hold":"failover"}):e}),t=e.filter(e=>!!e.source).map(e=>({zoomID:e.zoomID}));r.push(qa(t)),us("ADD_USER_PARTICIPANT_ATTRIBUTE",e)}}if(e.update){const t=e.update.find(e=>e.userId===n);void 0!==t&&us("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const r=e.update.filter(e=>e.userId!==n);r.length>0&&us("UPDATE_USER_PARTICIPANT_ATTRIBUTE",r)}if(e.remove){const t=e.remove.map(e=>{const t=o.find(t=>t.userId===e.userId);return t?2===e.action&&1===e.nUserStatus?t.bHold?(r.push(Ka({zoomID:t.zoomID,isOnHold:!0})),u(u({},e),{},{reason:"on hold"})):(r.push(Ka({zoomID:t.zoomID,isOnHold:!1})),u(u({},e),{},{reason:"failover"})):e:null}).filter(e=>!!e);us("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t)}return ke(r)})),receiveUserListFromXMPPEpic:e=>pn(e,"POOL").pipe(Qe(e=>e.payload.data.action===di.MemberChange),Tt(e=>{us("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.payload.data.data)}),Ae(e=>Ga(e.payload.data.data))),handleAdmitAllSilentUsersEpic:e=>ln(e,7951).pipe(Tt(e=>{!1===e.payload.body.bStarted&&us("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)}),Ae(e=>Ba(e.payload.body.bStarted))),handleKVUpdateIndicationEpic:e=>ln(e,7946).pipe(Qe(e=>["bRaiseHand","feedback"].indexOf(e.payload.body.key)>-1&&0===e.payload.body.value),Ae(e=>(us("UPDATE_USER_PARTICIPANT_ATTRIBUTE",{}),void 0!==e.payload.body.bRaiseHand?za():Ja())))});const nc={attendeesList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},oc=Pr({["".concat(Fa)]:La((e,{payload:t})=>{void 0!==t.add&&t.add.length>0&&t.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):$a(t.userRole)?e.allowTalkAttendeesList.push(t):e.attendeesList.push(t)}}),void 0!==t.update&&t.update.length>0&&t.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!==t.remove&&t.remove.length>0&&t.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(Ga)]:La((e,{payload:t})=>{e.xmppAttendeeList=t.map(e=>u(u({},e),{},{displayName:e.name,userId:Number(e.node),userRole:Number(e.role)}))}),["".concat(Ba)]:La((e,{payload:t})=>{e.isAdmitAllSilentUsers=t}),["".concat(za)]:La(e=>{e.attendeesList.forEach(e=>{!0===e.bRaiseHand&&(e.bRaiseHand=!1)})}),["".concat(Ja)]:La(e=>{e.attendeesList.forEach(e=>{e.feedback>0&&(e.feedback=0)})}),["".concat(Ka)]:La((e,{payload:t})=>{e.failoverAttendeesList.push(t)}),["".concat(qa)]:La((e,{payload:t})=>{t.forEach(t=>{const r=e.failoverAttendeesList.findIndex(e=>e.zoomID===t.zoomID);-1!==r&&e.failoverAttendeesList.splice(r,1)})}),["".concat(Wa)]:()=>nc},nc);function ic(e,t){return e===t}function sc(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:ic,r=null,n=null;return function(){return sc(t,r,arguments)||(n=e.apply(null,arguments)),r=arguments,n}}));const uc=({participants:{attendeesList:e}})=>e,dc=({meeting:{userId:e}})=>e,lc=cc([dc,uc],(e,t)=>t.find(t=>t.userId===e)),pc=cc([lc],e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost)),hc=cc([lc],e=>null==e?void 0:e.isHost),_c=cc([({participants:{xmppAttendeeList:e}})=>e],e=>e.filter(e=>e.userRole===Xa.Attendee)),fc=cc([uc],e=>e.filter(e=>e.bHold&&!e.bid)),vc=cc([uc,({breakoutRoom:e})=>e&&e.controlStatus,({breakoutRoom:e})=>e&&e.currentRoom.status],(e,t,r)=>t!==Ds.InProgress&&t!==Ds.Closing||r!==Ms.InRoom?e.filter(e=>!e.bHold&&!e.bid):e.filter(e=>!e.bHold)),yc=cc([vc],e=>e.find(e=>e.isHost)),Ec=cc([vc],e=>e.filter(e=>e.bCoHost)),gc=dn(rc),{setAsnIds:bc,setIsCanUnmute:Sc,setDialoutSequence:mc,setDialoutResultCode:Ic,setIsAllowToTalk:Ac,setIsHostMuteAll:Oc,setIsActiveOperation:Cc,setAudioSsrc:Tc,setIsMutedUponEntry:wc,setIsUserGrantCaptureAudio:Rc,setIsMicrophoneForbidden:Nc,setWebrtcRestartCount:Dc,setMicrophoneList:Pc,setSpeakerList:Mc,setActiveMicrophone:kc,setActiveSpeaker:Uc,setCanPlayAudio:Vc,resetAudio:Lc,setIsComputerAudioLoading:jc}=Cr("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"),{setSharePrivilege:Hc,setShareActiveNode:xc,setIsReceiveSharing:Fc,setIsChromeExtensionInstalled:Gc,setIsScreenShareForbidden:Bc,setShareDimension:Wc,setShareStatus:Kc,setShareSsrc:qc,setShareQuality:zc,setReceivedShareDimension:Jc,setIsRemoteControlApproved:Yc,setIsGrabRemoteControl:Xc,setIsVerifiedSharingRenderCanvasAfterFailover:Qc,setIsVerifiedSharingCaptureCanvasAfterFailover:Zc,setIsSdkGrabControl:$c,resetShare:eu}=Cr("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","RESET_SHARE"),{setVideoSsrc:tu,setActiveVideoId:ru,setCameraList:nu,setActiveCamera:ou,setIsCurrentUserStartedVideo:iu,setSpotlightVideo:su,setIsCaptureForbidden:au,setVideoMaxQuality:cu,setCaptureCanvasList:uu,setIsVideoMuted:du,setIsCaptureCameraLoading:lu,setIsCameraTaken:pu,setIsVerifiedVideoRenderCanvasAfterFailover:hu,setIsVerifiedVideoCaptureCanvasAfterFailover:_u,resetVideo:fu,setReceivedVideoDimension:vu,addSubscribedVideoId:yu,removeSubscribedVideoId:Eu,setIsFollowHostVideoLayout:gu,setHostDragLayout:bu,addRenderedVideoId:Su,removeRenderedVideoId:mu}=Cr("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"),{setTempSetting:Iu,setSetting:Au,setQuestionList:Ou,setQuestionUpVoted:Cu,resetQa:Tu}=Cr("SET_TEMP_SETTING","SET_SETTING","SET_QUESTION_LIST","SET_QUESTION_UP_VOTED","SET_SELF_LIVE_ANSWER","RESET_QA"),{setChatPrivilege:wu,addChatMessageHistory:Ru,resetChat:Nu,setIsAllowAttendeeChat:Du}=Cr("SET_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT"),{setCcEditorInfo:Pu,setTempSendCcText:Mu,setTempReceiveCcText:ku,setGatewayInfoList:Uu,resetClosedCaption:Vu}=Cr("SET_CC_EDITOR_INFO","SET_TEMP_SEND_CC_TEXT","SET_TEMP_RECEIVE_CC_TEXT","SET_GATEWAY_INFO_LIST","RESET_CLOSED_CAPTION"),{addBreakoutRooms:Lu,setBreakoutRoomAllocationPattern:ju,setBreakoutRoomSequenceId:Hu,setMeetingElapsedTime:xu,setStartRoomElapsedTime:Fu,setBreakoutRoomOptions:Gu,setBreakoutRoomControlStatus:Bu,setBreakoutRooms:Wu,setCurrentBreakoutRoom:Ku,setBreakoutRoomAttendeeStatus:qu,setBreakoutRoomConfId:zu,setBreakoutRoomToken:Ju,resetBreakoutRoom:Yu,setBreakoutRoomClosingRoomTime:Xu,setBreakoutRoomBroadcastMessage:Qu,setBreakoutRoomHostReplyType:Zu,setBreakoutRoomHostReplyRequestId:$u,setMainSessionAttendeeList:ed,setIsHugeBreakoutRoom:td,setBreakoutRoomUpdatedUserRoleCount:rd,setBreakoutRoomPreAssignedRoomList:nd}=Cr("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"),od=(e,t)=>{if(e.result){const{result:{mn:r,ts:n,auth:o,track_auth:i,mid:s,tid:a,encryptedRWC:c,meetingOptions:u}}=e,{lang:d,password:l,topic:p,zlk:h,cv:_,userName:f}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:n,auth:o,passWord:l,trackAuth:i,encryptedRWC:JSON.parse(c||"{}"),meetingOptions:JSON.parse(u||"{}"),topic:p,userName:jo.get(Zo.WebclientUserName)||f,cv:_,zlkJwtToken:h,lang:d}}return e},id=(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())},sd=(e,t=!1)=>{const{socket:{zoomSocketStatus:r,xmppSocketStatus:n,mainSessionSocketStatus:o},meeting:{meetingStatus:i}}=e,s=[Oo("closed")];if("joined"===i){const t=ui.getInstance(),r=si.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||(jo.clearSession(),ni.destroy()),r!==Rs.Closed&&s.push(Ur()),n!==Rs.Closed&&s.push(Vr()),o!==Rs.Closed&&s.push(Gr()),t){const t=lc(e);s.push(yo({audio:null==t?void 0:t.audio,muted:null==t?void 0:t.muted,video:null==t?void 0:t.bVideoOn}))}else s.push(yo({audio:!1,muted:!0,video:!1}));return s.push(Xr(),an(),Wa(),Lc(),eu(),fu(),Tu(),Nu(),Vu(),Yu()),s},ad=(e,...t)=>ls({event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",operations:[Ae(t=>t.find(t=>t.userId===e)),Qe(e=>!!e),ht(1)]},...t),cd=(cc([vc,({share:{isReceiveSharing:e}})=>e,({share:{activeNodeId:e}})=>e],(e=[],t,r)=>t?e.find(e=>e.userId===r&&!0===e.sharerOn):null),cc([vc],e=>e.filter(e=>e.sharerOn))),ud=si.createAgent();var dd=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>ln(e,7938).pipe(Qe(e=>void 0!==e.payload.body.lockShare),Nt(t),Tt(([e,t])=>{const{share:{sharePrivilege:r}}=t,{payload:{body:{lockShare:n}}}=e;r!==n&&us("SHARE_PRIVILEGE_CHANGE",n)}),Ae(([e])=>Hc(e.payload.body.lockShare))),shareSSrcEpic:e=>ln(e,20227).pipe(Ae(e=>qc(e.payload.body.ssrc))),shareStatusChangeEpic:(e,t)=>ln(e,20225).pipe(Nt(t),Ae(([e,t])=>{const{share:{isReceiveSharing:r,activeNodeId:n,shareQuality:o}}=t,{payload:{body:i}}=e;return r&&1===i.bStatus?(ud.unsubscribeSharing(n),ud.subscribeSharing(i.activeNodeID,o),ui.getInstance().switchSharingSource(i.ssrc),us("SHARE_AUTO_CHANGE_SOURCE",{userId:i.activeNodeID})):1===i.bStatus?us("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!0}):r&&us("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!1}),xc(i)})),handleChromeExtensionEpic:e=>_n(e,Ri.CheckChromeSharingExtensionResponse).pipe(Ae(e=>(us("SHARE_CHECK_CHROME_SHARING_EXTENSION",e.payload.data),Gc(e.payload.data)))),handleSDKShareSuccessEpic:(e,t)=>_n(e,Ri.DesktopSharingCaptureSuccess).pipe(Nt(t),Ae(([,e])=>{const{meeting:{userId:t}}=e;return ud.startSharing(t),Bc(!1)})),handleSDKShareErrorEpic:e=>_n(e,[Ri.DesktopSharingError,Ri.DesktopSharingChromeExtensionUninstalled,Ri.DesktopSharingPermissionDenied,Ri.DesktopSharingSystemError]).pipe(_i(e=>{if([Ri.DesktopSharingPermissionDenied,Ri.DesktopSharingSystemError].includes(e.payload.type))return Bc(!0);us("SHARE_START_DESKTOP_SHARE_FAILED",{reason:""})})),handleSDKShareDimensionChangeEpic:e=>_n(e,Ri.CurrentDesktopSharingWidthHeight).pipe(Qe(e=>!!e.payload.data),Ae(e=>{us("SHARE_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return ui.getInstance().ajustmentSharingCanvas(t,r),Wc(e.payload.data)})),handleSDKReceivedShareSizeChangeEpic:(e,t)=>_n(e,Ri.SharingDecodeMaxSize).pipe(Qe(e=>!!e.payload.data),Nt(t),_i(([e,t])=>{const{share:{shareQuality:r,activeNodeId:n}}=t,{payload:{data:{size:o}}}=e,i=Number(o);if(r!==i)return ud.subscribeSharing(n,i),zc(i)})),handleRWGShareOriginalDimensionEpic:e=>ln(e,20226).pipe(Tt(e=>{us("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.body);const{payload:{body:{width:t,height:r}}}=e;ui.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Ae(e=>Jc(e.payload.body))),handleSDKShareOriginalDimensionEpic:e=>_n(e,Ri.SharingPara).pipe(Tt(e=>{us("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;ui.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Ae(e=>Jc(e.payload.data))),handleSDKStopShareEpic:(e,t)=>_n(e,Ri.UserStopDesktopSharing).pipe(Nt(t),Ae(([,e])=>{const{meeting:{userId:t},share:{status:r}}=e;return r!==Ui.End&&(ud.stopSharing(t),us("SHARE_VIDEO_STREAMS_END")),Kc(Ui.End)})),handleRWGCurrentUserShareChangeEpic:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([e,t])=>{const{meeting:{userId:r}}=t,n=e.payload.body.update;return n&&n.length>0&&n.findIndex(e=>e.id===r&&void 0!==e.bShareOn)>-1}),je(([e,t])=>{const{meeting:{userId:r},share:{status:n,isReceiveSharing:o,activeNodeId:i}}=t,{payload:{body:{update:s}}}=e,a=s.find(e=>e.id===r&&!1===e.bShareOn),c=s.find(e=>e.id===r&&!0===e.bShareOn),u=[],d=ui.getInstance();return a&&n!==Ui.End&&(ud.stopSharing(r),d.stopDesktopSharing(),u.push(Kc(Ui.End)),us("SHARE_PASSIVE_STOP_SHARE")),c&&n===Ui.End&&(o&&(d.stopRenderSharing(),ud.unsubscribeSharing(i),u.push(Fc(!1))),u.push(Kc(Ui.Sharing))),ke(u)})),handleMultipleShareChangeEpic:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([e,t])=>{const{meeting:{userId:r}}=t,n=e.payload.body.update;return n&&n.length>0&&n.findIndex(e=>e.id!==r&&void 0!==e.bShareOn)>-1}),fi(([t,r])=>{const{payload:{body:{update:n}}}=t,{share:{activeNodeId:o,isReceiveSharing:i,shareQuality:s}}=r,a=cd(r),c=n.filter(e=>!0===e.bShareOn&&!1===e.bSharePause),u=n.filter(e=>!1===e.bShareOn);if(c.length>0&&c.forEach(e=>{-1===a.findIndex(t=>t.userId===e.id)&&us("SHARE_NEW_USER_ADD",e)}),u.length>0&&(u.forEach(e=>{us("SHARE_USER_REMOVE",e)}),i&&u.some(e=>e.id===o)))return tt(ln(e,20225).pipe(ht(1),gt($)),ot(50).pipe(gt(ae("timeout")))).pipe(st(()=>{const e=a.filter(e=>e.userId!==o);if(e.length>0){const t=e[0],{userId:r}=t;return ud.unsubscribeSharing(o),ud.subscribeSharing(r,s),ui.getInstance().switchSharingSource(r),us("SHARE_AUTO_CHANGE_SOURCE",{userId:r}),se(xc({activeNodeID:r,bStatus:1,ssrc:r}))}return $}))})),handleRequestRemoteControlEpic:(e,t)=>ln(e,16391).pipe(Nt(t),Qe(([e,t])=>{const{meeting:{userId:r}}=t;return e.payload.body.id===r}),Ae(([e])=>{const{payload:{body:{bOn:t}}}=e;return us("SHARE_REMOTE_CONTROL_APPROVE",t),Yc(t)})),handleGrabRemoteControlEpic:(e,t)=>ln(e,16395).pipe(Nt(t),Qe(([e,t])=>e.payload.body.id===t.meeting.userId),Ae(([e])=>{const{payload:{body:{bOn:t}}}=e;return ui.getInstance().updateRemoteControlProperties({isControllerNow:t}),us("SHARE_GRAB_REMOTE_CONTROL_CHANGE",t),Xc(t)})),handleSDKRemoteControlEpic:e=>_n(e,[Ri.StartRemoteControlSuccess,Ri.StartRemoteControlFailed,Ri.CancelRemoteControlSuccess]).pipe(_i(e=>e.payload.type===Ri.StartRemoteControlSuccess?(us("SHARE_REMOTE_CONTROL_SUCCESS"),$c(!0)):e.payload.type===Ri.CancelRemoteControlSuccess?$c(!1):void(e.payload.type===Ri.StartRemoteControlFailed&&us("SHARE_REMOTE_CONTROL_FAILED")))),handleRemoteControlClipboardEpic:e=>_n(e,[Ri.RemoteControlCopiedTextNotify,Ri.RemoteControlPasteTextLengthOverflow]).pipe(Tt(e=>{if(e.payload.type===Ri.RemoteControlCopiedTextNotify){const{payload:{data:t}}=e;us("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{content:t.data,x:t.x,y:t.y})}else us("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{error:"length of pasted text is too long"})}),gt($))});const ld={ssrc:0,status:Ui.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:ki.OnlyHost,activeNodeId:0,activeSsrc:0,shareQuality:1,isRemoteSharingActive:!1,isReceiveSharing:!1,isRemoteControlApproved:!1,isGrabRemoteControl:!1,isSDKGrabControl:!1,isChromeExtensionInstalled:!1,isScreenShareForbidden:!1},pd=Pr({["".concat(Hc)]:La((e,{payload:t})=>{e.sharePrivilege=t}),["".concat(xc)]:La((e,{payload:t})=>{e.isRemoteSharingActive=1===t.bStatus,e.activeNodeId=t.activeNodeID,e.activeSsrc=t.ssrc}),["".concat(Fc)]:La((e,{payload:t})=>{e.isReceiveSharing=t}),["".concat(Gc)]:La((e,{payload:t})=>{e.isChromeExtensionInstalled=t}),["".concat(Wc)]:La((e,{payload:t})=>{e.shareDimension=u({},t)}),["".concat(Kc)]:La((e,{payload:t})=>{e.status=t}),["".concat(qc)]:La((e,{payload:t})=>{e.ssrc=t}),["".concat(zc)]:La((e,{payload:t})=>{e.shareQuality=t}),["".concat(Jc)]:La((e,{payload:t})=>{e.receivedShareDimension=u({},t)}),["".concat(Yc)]:La((e,{payload:t})=>{e.isRemoteControlApproved=t}),["".concat(Xc)]:La((e,{payload:t})=>{e.isGrabRemoteControl=t}),["".concat(Qc)]:La((e,{payload:t})=>{e.isVerifiedRenderCanvasAfterFailover=t}),["".concat(Zc)]:La((e,{payload:t})=>{e.isVerifiedCaptureCanvasAfterFailover=t}),["".concat($c)]:La((e,{payload:t})=>{e.isSDKGrabControl=t}),["".concat(eu)]:()=>u(u({},ld),{},{isVerifiedRenderCanvasAfterFailover:!1,isVerifiedCaptureCanvasAfterFailover:!1})},ld),hd=dn(dd),_d=si.createAgent(),fd=(e,t)=>e.pipe(Vt("".concat(oo)),Nt(t),Qe(([,e])=>void 0!==e.meeting.encryptedRWC),vi(([,e])=>{const{meeting:{encryptedRWC:t,ts:r,auth:n,meetingNumber:o},breakoutRoom:i}=e;if(t)return ke(Object.keys(t).map(e=>{const s=t[e];let a=void 0;return a=i&&i.currentRoom.boConfId?id(e,o,s,r,n,i.currentRoom.boConfId):id(e,o,s,r,n),{url:a,domain:e,rwcToken:s}})).pipe(je(e=>Pn(e.url).pipe(je(t=>{let r={};return r=t.response?u(u({},t.response),{},{fromNginx:!1}):{rwg:e.domain,rwcToken:e.rwcToken,fromNginx:!0},ke([Kr(r),Mr()])}),st(()=>$))),bt(_o(performance.now())))}));var vd=Object.freeze({__proto__:null,pingRWCEpic:fd,joinMeetingSuccessfulEpic:(e,t)=>ln(e,4098).pipe(Nt(t),vi(([e,t])=>{const{payload:{body:{res:r,userID:n,zoomID:o,mn:i,participantID:s,hugeBO:a,elapsed:c,disableAqos:u}}}=e,{meeting:{pingRWCTimestamp:d,isWebinar:l,userEmail:p,userName:h,isMeetingReset:_,meetingOptions:f},media:{mediaConstraints:v,assetsPath:y},breakoutRoom:E}=t;if(Un.CONF_SUCCESS===r){const{WebclientParticipantId:t,WebclientUserId:r,WebclientZoomId:g,WebclientUserEmail:b,WebclientUserName:S}=Zo;jo.set(r,n,Vo.SessionStorage),jo.set(g,o,Vo.SessionStorage),jo.set(t,s,Vo.SessionStorage),p&&jo.set(b,p,Vo.SessionStorage),jo.set(S,h,Vo.SessionStorage),_d.sendRWGConnectionPerformance("WCL_M, JMCT(".concat(performance.now()-d,")"));const m=[fo(e.payload.body),wo(performance.now())];return ui.getInstance().init(),_&&(m.push(So(!1)),void 0!==v&&void 0!==y&&m.push(Qr())),l&&m.push(kr()),E&&(f&&!0===f.isBO100Enabled&&m.push(td(a)),E.currentRoom.boConfId&&m.push(Fr()),void 0!==c&&m.push(xu(c))),void 0!==u&&m.push(Ro(!u)),us("JOIN_MEETING_SUCCESS",{meetingNumber:i}),ke(m)}return Un.CONF_FAIL_CONFLOCKED===r?us("JOIN_MEETING_FAILED",qn(r)):Un.CONF_FAIL_CONF_USER_FULL===r?us("JOIN_MEETING_FAILED",Object.assign({},qn(r),{lmUrl:e.payload.body.lmURL})):(Un.CONF_FAIL_MEETING_OVER===r||Un.CONF_RESULT_MMR_IB_REJECT===r||Un.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===r||[Un.CONF_FAIL_HAS_BEEN_REMOVED,Un.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(r),us("JOIN_MEETING_FAILED",qn(r))),ke(sd(t,!1))})),handleMeetingAttributeChangeEpic:(e,t)=>ln(e,7938).pipe(Nt(t),Ae(([e,t])=>{const{payload:{body:r}}=e,{meeting:{zoomId:n,encType:o}}=t;if(void 0!==r.encryptKey&&ni.init(n,r.encryptKey,o),void 0!==r.gatewayKey){const e=ui.getInstance(),[,t,n]=r.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:n&&$n(n)}])}return us("UPDATE_MEETING_ATTRIBUTE",r),vo(r)})),handleMeetingEndEpic:(e,t)=>ln(e,7939).pipe(Nt(t),je(([e,t])=>{const{payload:{body:r}}=e;if(void 0!==r.reason){if(Vn.LEAVEREASON_RECONNECT===r.reason)return Ln.LEAVESUBREASON_WAITINGROOMFAILOVER===r.subReason?us("RECONNECTING_MEETING",{reason:Mo.OnHold}):us("RECONNECTING_MEETING",{reason:Mo.Failover}),se(io());Vn.LEAVEREASON_KICKEDBYHOST===r.reason?us("LEAVING_MEETING",{reason:"kicked by host"}):Vn.LEAVEREASON_ENDBYHOST!==r.reason&&Vn.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING!==r.reason||us("LEAVING_MEETING",{reason:"ended by host"})}return t.meeting.isMeetingReset?$:ke(sd(t,!1))})),meetingFailoverEpic:(e,t)=>e.pipe(Vt("".concat(io)),Nt(t),je(([,e])=>{const t=sd(e,!0),r=function(e){if(e){const{meeting:{apiKey:t,signature:r,meetingNumber:n,userId:o,userName:i,lang:s,passWord:a,userEmail:c,sdkUrl:u,sdkOrigin:d,proxy:l,cv:p,zak:h}}=e;return{apiKey:t,signature:r,meetingNumber:n,userId:o,userName:i,lang:s,passWord:a,userEmail:c,sdkUrl:u,sdkOrigin:d,proxy:l,cv:p,ztk:h}}return null}(e);let n=se(ro(r)).pipe(ut(1e3));if(e.meeting.zlkJwtToken){const t=function(e){if(e){const{meeting:{topic:t,passWord:r,userName:n,zlkJwtToken:o,lang:i,cv:s}}=e;return{topic:t,passWord:r,userName:n,zlkJwtToken:o,lang:i,cv:s}}return null}(e),r=Object.assign({},{topic:null==t?void 0:t.topic,password:null==t?void 0:t.passWord,userName:null==t?void 0:t.userName,zlk:null==t?void 0:t.zlkJwtToken,lang:null==t?void 0:t.lang,cv:null==t?void 0:t.cv});n=se(no(r)).pipe(ut(1e3))}return Be(ke(t),n)})),hostChangeEpic:e=>hn(e,7940).pipe(Tt(e=>{us("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)}),Ae(e=>Eo(e.payload.body))),cohostChangeEpic:e=>hn(e,7941).pipe(Tt(e=>{us("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)}),Ae(e=>go(e.payload.body))),setMeetingOptEpic:e=>hn(e,7945).pipe(Tt(e=>{const{payload:{body:{opt:t}}}=e;jo.set(Zo.WebclientOpt,t,Vo.SessionStorage)}),gt($)),setMeetingOnHoldEpic:(e,t)=>ln(e,7942).pipe(Tt(e=>{const{payload:{body:{bHold:t}}}=e;jo.set(Zo.WebclientIsOnHold,t?1:0,Vo.SessionStorage),us("MEETING_IN_WAITING_ROOM",t)}),Nt(t),je(([e,t])=>{const r=[bo(e.payload.body.bHold)];if(e.payload.body.bHold){const e=lc(t);if(e){r.push(mo({audio:e.audio,video:e.bVideoOn,muted:e.muted}));const n=ui.getInstance();if("computer"===e.audio&&(n.leaveComputerAudio(),_d.joinOrLeaveVoip(!1)),e.bVideoOn&&n.stopCaptureVideo(),e.sharerOn&&(_d.stopSharing(e.userId),n.stopDesktopSharing(),r.push(Kc(Ui.End))),t.video&&t.video.subscribedVideoList.length>0&&t.video.subscribedVideoList.forEach(e=>{_d.unsubscribeVideo(e)}),t.share&&t.share.isReceiveSharing){const e=t.share.activeNodeId;t.share.isRemoteControlApproved&&(_d.sharingRequestRemoteControl(e,!1),n.stopRemoteControl()),_d.unsubscribeSharing(e),n.stopRenderSharing()}}}return ke(r)})),setMeetingDataCenterRegionEpic:e=>ln(e,7954).pipe(Ae(e=>Co(e.payload.body))),claimHostResponseEpic:e=>ln(e,4216).pipe(Tt(e=>{us("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)}),gt($)),leaveMeetingEpic:(e,t)=>e.pipe(Vt("".concat(so),"".concat(ao)),Nt(t),je(([e,t])=>(e.type==="".concat(so)?(_d.leaveMeeting(),us("LEAVING_MEETING",{})):e.type==="".concat(ao)&&(_d.endMeeting(),us("LEAVING_MEETING",{})),ke(sd(t,!1))))),versionUpgradeEpic:e=>ln(e,2).pipe(Tt(e=>{console.warn("Upgrade to latest version to optimize meeting experience")}),gt($)),versionBlockEpic:e=>ln(e,1).pipe(Tt(e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=qn(1e3);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,()=>t);r.reason=e}us("JOIN_MEETING_FAILED",r)}),gt($))});let yd=window.WEB_ENDPOINT||"zoom.us",Ed="https://".concat(yd,"/wc/lsdk");const gd="https://dmogdx0jrul3u.cloudfront.net/".concat("2.0.0","/lib/core"),bd="https://source.zoom.us/".concat("2.0.0","/lib/core"),Sd="https://jssdk.zoomus.cn/".concat("2.0.0","/lib/core");let md=0;const Id={meetingStatus:"initial",isWindowOpen:!1,apiKey:"",signature:"",lang:"en-US",tk:"",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:null,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,enableQos:!0},Ad=Pr({["".concat(co)]:La((e,{payload:t})=>{Object.assign(e,t)}),["".concat(uo)]:La((e,{payload:t})=>{e.isWindowOpen=t}),["".concat(lo)]:La((e,{payload:t})=>{e.apiKey=t.apiKey,e.signature=t.signature,e.lang=t.language}),["".concat(po)]:La((e,{payload:t})=>{e.zak=t}),["".concat(ho)]:La((e,{payload:t})=>{e.tk=t.tk,e.mtkGuid=t.mtkGuid}),["".concat(_o)]:La((e,{payload:t})=>{e.pingRWCTimestamp=t}),["".concat(fo)]:La((e,{payload:t})=>{e.confId=t.confID,e.conId=t.conID,e.e2eEncrypt=t.e2eEncrypt,e.meetingNumber=parseInt(t.mn,10),e.zoomId=t.zoomID,e.meetingStatus="joined",e.jid=t.jid,e.xtoken=t.xtoken,e.groups=t.groups,e.svcUrl=t.svcUrl,e.encType=t.encType,e.userGUID=t.userGUID,e.userId=t.userID,e.role=t.role,e.participantID=t.participantID}),["".concat(vo)]:La((e,{payload:t})=>{Object.assign(e,t)}),["".concat(Eo)]:La((e,{payload:t})=>{e.isHost=t}),["".concat(go)]:La((e,{payload:t})=>{e.isCoHost=t}),["".concat(bo)]:La((e,{payload:t})=>{e.isOnHold=t}),["".concat(So)]:La((e,{payload:t})=>{e.isMeetingReset=t}),["".concat(mo)]:La((e,{payload:t})=>{e.audioVideoBeforeOnHold=t}),["".concat(Io)]:La((e,{payload:t})=>{e.currentUserAudioBeforeReset=t}),["".concat(Ao)]:La((e,{payload:t})=>{e.isCurrentUserMutedBeforeReset=t}),["".concat(Oo)]:La((e,{payload:t})=>{e.meetingStatus=t}),["".concat(Co)]:La((e,{payload:t})=>{e.region=t.region,e.network=t.network}),["".concat(To)]:La((e,{payload:t})=>{e.isCurrentUserStartVideoBeforeReset=t}),["".concat(wo)]:La((e,{payload:t})=>{e.joinMeetingTimeStamp=t}),["".concat(Ro)]:La((e,{payload:t})=>{e.enableQos=t}),["".concat(yo)]:La((e,{payload:t})=>{Object.assign(e,u(u({},Id),{},{isMeetingReset:!0,currentUserAudioBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.audio:t.audio,isCurrentUserMutedBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.muted:t.muted,isCurrentUserStartVideoBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.video:t.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}))})},Id),Od=dn(vd,{meetingInfoEpic:(e,t)=>e.pipe(Vt("".concat(no)),At(e=>{const r=Object.assign({},e.payload,{password:Xn(e.payload.password),topic:Xn(e.payload.topic)});return((e,t,r="zoomsdkjsonpcallback")=>new x(n=>{md++;const o="".concat(r).concat(md),i=document.createElement("script");Object.keys(t).forEach(e=>void 0===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()}}))(Ed,r).pipe(st(e=>se({status:!1,result:e.toString(),errorCode:-3e3})),je(r=>{const[n,o]=et(se(r),e=>!0===e.status&&void 0!==e.result);return o.subscribe(e=>{e.state||(3e3===e.errorCode&&"Meeting password is incorrect"===e.errorMessage?us("JOIN_MEETING_FAILED",Kn(3004)):-3e3===e.errorCode?us("JOIN_MEETING_FAILED",{reason:"connection error"}):3e3===e.errorCode?us("JOIN_MEETING_FAILED",{reason:e.errorMessage,errorCode:200}):300===e.errorCode?us("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?us("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?us("JOIN_MEETING_FAILED",{reason:"The token is expired or more than 2 days or ineffective.",errorCode:200}):124===e.errorCode&&us("JOIN_MEETING_FAILED",{reason:"Verify JWT failed",errorCode:200}))}),n.pipe(fi(r=>{if(!0===r.status){const{result:{mid:n}}=r;return jo.init(n),Be(se(co(od(r,e.payload))),cn(fd,t,oo()))}}))}))}))}),Cd={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0},Td=Pr({["".concat(en)]:La((e,{payload:t})=>{e.audioDecodeStatus=t}),["".concat($r)]:La((e,{payload:t})=>{e.audioEncodeStatus=t}),["".concat(on)]:La((e,{payload:t})=>{e.sharingDecodeStatus=t}),["".concat(nn)]:La((e,{payload:t})=>{e.sharingEncodeStatus=t}),["".concat(rn)]:La((e,{payload:t})=>{e.videoDecodeStatus=t}),["".concat(tn)]:La((e,{payload:t})=>{e.videoEncodeStatus=t}),["".concat(sn)]:La((e,{payload:t})=>{e.mediaConstraints=t.mediaConstraints,e.assetsPath=t.assetsPath}),["".concat(an)]:e=>u(u({},Cd),{},{mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath})},Cd),wd=(e,t,r)=>We(...[t,r].map((t,r)=>{if("initial"!==t)return ke(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return tt(ps("".concat(e.toUpperCase(),"_").concat(t,"_SUCCESS"),1).pipe(vt(!0)),ps("".concat(e.toUpperCase(),"_").concat(t,"_FAIL"),1).pipe(vt(!1)))}})),Rd=()=>ke(navigator.mediaDevices.enumerateDevices()).pipe(Ae(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 Nd(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 Dd=si.createAgent();var Pd=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>ln(e,12033).pipe(Nt(t),Ae(([e,t])=>{const{participants:{attendeesList:r,allowTalkAttendeesList:n}}=t,o=e.payload.body,i={};return o&&([...r,...n].forEach(e=>{for(let t=1;t<=3;t++){const r="asn".concat(t),{userId:n,displayName:s}=e;if(void 0!==o[r]&&n===o[r]){i[r]={userId:n,displayName:s};break}}}),us("AUDIO_ACTIVE_SPEAKER",Object.values(i))),bc(i)})),unmuteConsentAfterSpotlighted:(e,t)=>ln(e,16135).pipe(Nt(t),Tt(([e,t])=>{const{payload:{body:{id:r,bLeadershipOn:n}}}=e,{audio:{bCanUnmute:o}}=t,i=lc(t);if(i){const{isHost:e,bCoHost:t,userId:s,audio:a,muted:c}=i,u=e||t;n&&s>>10==r>>10&&(null!==a&&""!==a&&!0!==c||!u&&!o||us("AUDIO_UNMUTE_CONSENT",Di.Spotlight))}}),gt($)),unmuteConsentEpic:(e,t)=>ln(e,12037).pipe(Nt(t),Tt(([,e])=>{const t=lc(e);null!==(null==t?void 0:t.audio)&&""!==(null==t?void 0:t.audio)&&1==(null==t?void 0:t.muted)&&us("AUDIO_UNMUTE_CONSENT",Di.Unmute)}),gt($)),setAudioAttributeEpic:(e,t)=>ln(e,7938).pipe(Qe(e=>["bCanUnmute","bMutedAll","bMutedUponEntry"].some(t=>void 0!==e.payload.body[t])),_i(e=>{if(void 0!==e.payload.body.bCanUnmute)return Sc(e.payload.body.bCanUnmute);if(void 0!==e.payload.body.bMutedAll){const r=lc(t.value);if(("computer"===(null==r?void 0:r.audio)||"phone"===(null==r?void 0:r.audio))&&0==r.muted)return Oc(e.payload.body.bMutedAll)}return void 0!==e.payload.body.bMutedUponEntry?wc(e.payload.body.bMutedUponEntry):void 0})),currentUserAudioChangeEpic:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([,e])=>e.socket.zoomSocketStatus===Rs.Connected),fi(([e,t])=>{if(e.payload.body.update&&e.payload.body.update.some(e=>void 0!==e.audio||void 0!==e.muted)){const r=lc(t),n=e.payload.body.update,[o,i]=et(ke(n),e=>e.id===(null==r?void 0:r.userId));i.subscribe(e=>{us("AUDIO_PARTICIPANT_AUDIO_UPDATE",e)});const{audio:{isActiveOperation:s,isMutedAll:a},audio:{activeMicrophone:c,activeSpeaker:u,audioSsrc:d}}=t,l=ec(r.userRole);return o.pipe(Tt(e=>{e.audio!==(null==r?void 0:r.audio)&&(""===e.audio?us("AUDIO_CURRENT_USER_LEAVE_AUDIO"):"computer"===e.audio?ui.getInstance().joinComputerAudio(d,c,u,!l):"phone"===e.audio&&("computer"===(null==r?void 0:r.audio)&&(ui.getInstance().leaveComputerAudio(),Dd.joinOrLeaveVoip(!1)),us("AUDIO_CURRENT_USER_JOIN_BY_PHONE"))),(null==r?void 0:r.audio)&&""!==(null==r?void 0:r.audio)&&e.muted!==(null==r?void 0:r.muted)&&(!0===e.muted?us("AUDIO_CURRENT_USER_MUTED",{source:s?"active":a?"passive(mute all)":"passive(mute one)"}):!1===e.muted&&us("AUDIO_CURRENT_USER_UNMUTED",{source:s?"active":"passive"}))}),Qe(e=>""!==(null==r?void 0:r.audio)&&e.muted!==(null==r?void 0:r.muted)),gt(se(Cc(!1),Oc(!1))))}})),handleDialOutEpic:(e,t)=>ln(e,8198).pipe(Nt(t),Qe(([e,t])=>e.payload.seq==t.audio.dialout.sequence),Tt(([e])=>{const t=e.payload.body.result;us("AUDIO_DIALOUT_RESULT_CODE",{code:t}),t===Pi.Success?us("AUDIO_DIALOUT_RESULT_SUCCESS"):-1===[Pi.Calling,Pi.Ringing,Pi.Accepted,Pi.Success].indexOf(t)&&us("DIALOUT_FAIL")}),Ae(([e])=>Ic(e.payload.body.result))),handleDialouCancelEpic:e=>ln(e,8200).pipe(Tt(e=>{const t=e.payload.body.result;[0,11].indexOf(t)>-1?us("AUDIO_DIALOUT_CANCEL_SUCCESS"):us("DIALOUT_CANCEL_FAIL",t)}),Qe(e=>0===e.payload.body.result||11===e.payload.body.result),vt(Ic(-1))),handleAllowToTalkEpic:(e,t)=>ln(e,12036).pipe(Nt(t),fi(([e,t])=>{const r=lc(t),{media:{audioEncodeStatus:n},audio:{audioSsrc:o,activeMicrophone:i,activeSpeaker:s}}=t,{promoterID:a,bAllowTalk:c}=e.payload.body;if((null==r?void 0:r.userId)===a){const e=ui.getInstance();if(c){let t=se(!0);return"success"!==n&&(e.enableAudioEncode(),t=tt(ps("AUDIO_ENCODE_SUCCESS",1).pipe(vt(!0)),ps("AUDIO_ENCODE_FAIL",1).pipe(vt(!1)))),t.pipe(Tt(t=>{t&&(e.joinComputerAudio(o,i,s,!0),us("AUDIO_UNMUTE_CONSENT",Di.AllowToTalk))}),vt(Ac(!0)))}return Dd.mute(a,!0),e.leaveComputerAudio(),ot(300).pipe(Tt(()=>{e.joinComputerAudio(o,i,s,!1)}),vt(Ac(!1)))}})),handleAllowToTalkResponseEpic:e=>ln(e,8205).pipe(Tt(e=>{us("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)}),gt($)),handleAttendeePromoteDepromote:(e,t)=>pn(e,"POOL").pipe(Qe(e=>e.payload.data.action===di.Depromote||e.payload.data.action===di.Promote),Nt(t),Tt(([e,t])=>{const r=lc(t);"phone"===(null==r?void 0:r.audio)?Dd.audioDrop(r.userId):"computer"===(null==r?void 0:r.audio)&&(e.payload.data.action,di.Promote)}),gt($)),setAudioSSRCEpic:(e,t)=>ln(e,12035).pipe(Nt(t),je(([e,t])=>{const{meeting:{currentUserAudioBeforeReset:r},media:{audioDecodeStatus:n,audioEncodeStatus:o}}=t,{payload:{body:{ssrc:i}}}=e;let s=void 0;const a=lc(t);if(a&&"computer"===r&&""===a.audio){const e=ec(a.userRole);s=wd("audio",e?"success":o,n).pipe(Qe(([e,t])=>e&&t),Tt(()=>{Dd.joinOrLeaveVoip(!0)}),vt(Io(void 0)))}return s?Ye(se(Tc(i)),s):se(Tc(i))})),handleMergeAudioEpic:(e,t)=>ln(e,7952).pipe(At(e=>ps("AUDIO_CURRENT_USER_JOIN_BY_PHONE",1).pipe(Nt(t),Tt(([,t])=>{const{BindStatus:r,nOperatorUserId:n}=e.payload.body,o=t.participants.attendeesList.find(e=>e.userId===n);!0===r&&us("AUDIO_MERGE_AUDIO_INDICATION",{operatorName:null==o?void 0:o.displayName,operatorUserId:n,operatorRole:null==o?void 0:o.userRole})})))),handleUserGrantAudioCaptureEpic:(e,t)=>_n(e,Ri.UserGrantCaptureAudio).pipe(Nt(t),je(([,e])=>{us("AUDIO_CURRENT_USER_JOIN_BY_VOIP");const t=lc(e),{meeting:{isCurrentUserMutedBeforeReset:r},audio:{bMutedUponEntry:n,isUserGrantCaptureAudio:o}}=e,i=[Rc(!0)];return t&&(!0===t.muted&&Dd.mute(t.userId,!0),(!0===r||!o&&!t.isHost&&n)&&(Dd.mute(t.userId,!0),r&&i.push(Ao(void 0)))),ke(i)})),handleUserForbiddenMicrophoneEpic:e=>_n(e,Ri.UserForbiddedCaptureAudio).pipe(Tt(()=>{us("USER_FORBIDDEN_MICROPHONE")}),vt(Nc(!0))),handleAudioSocketErrorEpic:e=>_n(e,Ri.AudioWebsocketBroken).pipe(Tt(()=>{us("ESTABLISH_AUDIO_STREAM_ERROR")}),gt($)),handleAudioZeroDataEpic:(e,t)=>_n(e,Ri.AudioZeroData).pipe(Nt(t),_i(([,e])=>{const{audio:{webrtcRestartCount:t,activeMicrophone:r}}=e;if(t<3)return ui.getInstance().restoreWebRTC(r),Dc(t+1)})),handleAutoPlayEpic:(e,t)=>e.pipe(Vt("".concat(Vc)),Qe(e=>!1===e.payload),je(()=>(us("AUDIO_AUTO_PLAY_FAILED"),tt(qe(document,"click").pipe(ht(1)),qe(document,"touchend").pipe(ht(1))).pipe(Nt(t),Tt(([,e])=>{const{audio:{audioSsrc:t,activeMicrophone:r,activeSpeaker:n}}=e,o=lc(e),i=ec(o.userRole);ui.getInstance().joinComputerAudio(t,r,n,!i),Dd.joinOrLeaveVoip(!0)}),vt(Vc(!0))))))});const Md={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},kd=Pr({["".concat(bc)]:La((e,{payload:t})=>{e.asnIds=u({},t)}),["".concat(Sc)]:La((e,{payload:t})=>{e.bCanUnmute=t}),["".concat(mc)]:La((e,{payload:t})=>{const{dialout:r}=e;r.sequence=t}),["".concat(Ic)]:La((e,{payload:t})=>{const{dialout:r}=e;r.returnCode=t}),["".concat(Ac)]:La((e,{payload:t})=>{e.isAllowToTalk=t}),["".concat(Cc)]:La((e,{payload:t})=>{e.isActiveOperation=t}),["".concat(Oc)]:La((e,{payload:t})=>{e.isMutedAll=t}),["".concat(Tc)]:La((e,{payload:t})=>{e.audioSsrc=t}),["".concat(wc)]:La((e,{payload:t})=>{e.bMutedUponEntry=t}),["".concat(Rc)]:La((e,{payload:t})=>{e.isUserGrantCaptureAudio=t}),["".concat(Nc)]:La((e,{payload:t})=>{e.isMicrophoneForbidden=t}),["".concat(Dc)]:La((e,{payload:t})=>{e.webrtcRestartCount=t}),["".concat(Pc)]:La((e,{payload:t})=>{e.microphoneDevicesList=t}),["".concat(Mc)]:La((e,{payload:t})=>{e.speakerDevicesList=t}),["".concat(kc)]:La((e,{payload:t})=>{e.activeMicrophone=t}),["".concat(Uc)]:La((e,{payload:t})=>{e.activeSpeaker=t}),["".concat(Vc)]:La((e,{payload:t})=>{e.canPlayAudio=t}),["".concat(Lc)]:({dialout:{returnCode:e}})=>u(u({},Md),{},{dialout:u(u({},Md.dialout),{},{returnCode:e})}),["".concat(jc)]:La((e,{payload:t})=>{e.isComputerAudioLoading=t})},Md),Ud=dn(Pd),Vd=e=>4294966272&e,Ld=si.createAgent(),jd=ui.getInstance();var Hd=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>_n(e,Ri.StartVideoCaptureSuccess).pipe(Nt(t),_i(([,e])=>{const{video:{cameraDevicesList:t,activeCamera:r},meeting:{userId:n}}=e;return t.length<1?(us("CAN_NOT_DETECT_CAMERA",{reason:"Cannot detect camera devices"}),void jd.stopCaptureVideo()):"default"===r||t.some(e=>e.deviceId===r)?void Ld.muteAttendeeVideo(n,!1):(us("CAN_NOT_FIND_CAMERA",{reason:"cannot find target camera"}),void jd.stopCaptureVideo())})),startVideoResponse:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([e,t])=>{var r,n,o,i;const s=dc(t);return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id)===s}),Qe(([e,t])=>{var r,n,o,i;return!0===(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.bVideoOn)}),_i(()=>(us("VIDEO_CAPTURE_START_SUCCESS"),iu(!0)))),handleForbiddenCaptureVideoEpic:e=>_n(e,Ri.UserForbiddedCaptureVideo).pipe(Tt(()=>us("VIDEO_USER_FORBIDDEN_CAPTURE")),vt(au(!0))),handleCameraIsTakenByOtherProgramsEpic:e=>_n(e,Ri.UserCameraIsTakenByOtherPrograms).pipe(Tt(()=>us("VIDEO_CAMERA_IS_TAKEN",{reason:"User camera is taken by other programs."})),vt(pu(!0))),handleVideoSocketErrorEpic:e=>_n(e,Ri.VideoWebsocketBroken).pipe(Tt(()=>{us("VIDEO_ESTABLISH_STREAM_ERROR",{reason:"Video websocket broken."})}),gt($)),handleStopVideoCaptureFailedEpic:e=>_n(e,Ri.StopVideoCaptureFailed).pipe(Tt(()=>{us("VIDEO_CAPTURE_STOP_RESULT",{failed:!0,reason:"Unknown."})}),gt($)),handleStopVideoCaptureSuccessEpic:(e,t)=>_n(e,Ri.StopVideoCaptureSuccess).pipe(Nt(t),_i(([,e])=>{const{meeting:{userId:t},video:{isCurrentUserStartedVideo:r}}=e;r||us("VIDEO_CAPTURE_STOP_RESULT"),Ld.muteAttendeeVideo(t,!0)})),stopVideoResponse:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([e,t])=>{var r,n,o,i;const s=dc(t);return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id)===s}),Qe(([e,t])=>{var r,n,o,i;return!1===(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.bVideoOn)}),_i(()=>(us("VIDEO_CAPTURE_STOP_RESULT"),iu(!1)))),receiveVideoMuteIndication:(e,t)=>ln(e,16133).pipe(Nt(t),Qe(([e,t])=>{var r,n;return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n?void 0:n.id)===dc(t)}),_i(([e,t])=>{const{id:r,bVideoMute:n}=e.payload.body;return us("RECEIVE_VIDEO_MUTE_INDICATION",{id:r,isVideoMuted:n}),!0===n&&jd.stopCaptureVideo(),!1===n&&us("ASK_FOR_START_VIDEO_CONSENT",{id:r,isVideoMuted:n}),du(n)})),receiveVideoActiveIndication:e=>ln(e,16129).pipe(Ae(e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,n=Vd(t);return us("RECEIVE_VIDEO_ACTIVE_INDICATION",{bVideoOn:r,userId:n}),ru({bVideoOn:r,userId:n})})),receiveVideoSsrcIndication:(e,t)=>ln(e,16131).pipe(Qe(e=>void 0!==e.payload.body.ssrc),Nt(t),At(([e,t])=>{const{meeting:{isCurrentUserStartVideoBeforeReset:r},media:{videoEncodeStatus:n},video:{captureCanvasList:o,activeCamera:i,isVerifiedVideoCaptureCanvasAfterFailover:s}}=t,{payload:{body:{ssrc:a}}}=e;let c=void 0;const u=lc(t);return u&&!0===r&&!0!==u.bVideoOn&&(c=wd("video",n,"success").pipe(Qe(([e,t])=>e&&t),je(()=>{const e=[iu(void 0)];return!1===s&&(Array.isArray(o)?o.forEach(e=>{Nd(document.querySelector("#".concat(e)))}):Nd(document.querySelector("#".concat(o))),e.push(_u(!0))),ui.getInstance().startCaptureVideo(a,i,640,360),ke(e)}))),c?Ye(se(tu(a)),c):se(tu(a))})),receiveVideoDecodeMaxSizeEpic:e=>_n(e,Ri.VideoDecodeMaxSize).pipe(Qe(e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data}),fi(e=>{const{size:t}=e.payload.data;return se(cu(t))})),spotlightVideoResponseEpic:e=>ln(e,16135).pipe(Ae(e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,n=[];return t&&n.push(Vd(r)),us("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),su(n)})),handleGroupLayoutIndicationEpic:(e,t)=>ln(e,7958).pipe(Nt(t),Ae(([e,t])=>{const{payload:{body:r}}=e;let n=[];r&&r.group_list&&r.group_list[0]&&(n=r.group_list[0].map(e=>e.id));const o=vc(t);return n=n.filter(e=>o.findIndex(t=>t.userId===e)>=0),us("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),su(n)})),handleCurrentVideoResolution:e=>_n(e,Ri.CurrentVideoResolution).pipe(_i(e=>(us("VIDEO_RENDER_START_SUCCESS"),us("RECEIVE_VIDEO_DIMENSION_CHANGE",e.payload.data),vu(e.payload.data)))),handleMeetingVideoAttributeEpic:e=>ln(e,7938).pipe(Qe(e=>void 0!==e.payload.body.bFollowHostVideo),Ae(e=>(us("VIDEO_FOLLOW_HOST_ORDER_CHANGE",{bOn:e.payload.body.bFollowHostVideo}),gu(e.payload.body.bFollowHostVideo)))),handleHostDragLayoutIndicationEpic:(e,t)=>ln(e,7957).pipe(Nt(t),Ae(([e,t])=>{const{video:{isFollowHostVideoLayout:r}}=t,{payload:{body:n}}=e,o=n&&n.drag_list&&n.drag_list.map(e=>e.id);return r&&us("VIDEO_HOST_DRAG_LAYOUT_CHANGE",{layout:o}),bu(o)})),handlePeerVideoStateChangeEpic:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([e,t])=>{const{meeting:{userId:r},video:{subscribedVideoList:n}}=t,o=e.payload.body.update,i=e.payload.body.remove;return o&&o.length>0&&o.findIndex(e=>e.id!==r&&(void 0!==e.bVideoOn||e.bHold))>-1||i&&i.some(e=>n.includes(e.id))}),Tt(([e,t])=>{const{payload:{body:{remove:r,update:n}}}=e,{video:{subscribedVideoList:o}}=t,i=fc(t);if(r&&r.length>0&&r.filter(e=>o.includes(e.id)).forEach(e=>{us("VIDEO_OLD_USER_STOP",{userId:e.id})}),n&&n.length>0){const e=n.filter(e=>void 0!==e.bVideoOn).filter(e=>-1===i.findIndex(t=>t.userId===e.id)),t=n.filter(e=>!0===e.bHold);t.length>0&&t.filter(e=>o.includes(e.id)).forEach(e=>{us("VIDEO_OLD_USER_STOP",{userId:e.id})}),e.forEach(e=>{e.bVideoOn?us("VIDEO_NEW_USER_START",{userId:e.id}):us("VIDEO_OLD_USER_STOP",{userId:e.id})})}}),gt($))});const xd={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:[]},Fd=Pr({["".concat(tu)]:La((e,{payload:t})=>{e.videoSsrc=t}),["".concat(nu)]:La((e,{payload:t})=>{e.cameraDevicesList=t}),["".concat(ou)]:La((e,{payload:t})=>{e.activeCamera=t}),["".concat(ru)]:La((e,{payload:t})=>{e.activeVideoId=t.userId}),["".concat(iu)]:La((e,{payload:t})=>{e.isCurrentUserStartedVideo=t}),["".concat(su)]:La((e,{payload:t})=>{e.spotlightUserList=t}),["".concat(au)]:La((e,{payload:t})=>{e.isCaptureForbidden=t}),["".concat(cu)]:La((e,{payload:t})=>{e.receivedVideoMaxQuality=t}),["".concat(uu)]:La((e,{payload:t})=>{let r=t;Array.isArray(t)||(r=[t]),e.captureCanvasList=r}),["".concat(du)]:La((e,{payload:t})=>{e.isVideoMuted=t}),["".concat(lu)]:La((e,{payload:t})=>{e.isCaptureCameraLoading=t}),["".concat(pu)]:La((e,{payload:t})=>{e.isCameraTaken=t}),["".concat(_u)]:La((e,{payload:t})=>{e.isVerifiedVideoCaptureCanvasAfterFailover=t}),["".concat(hu)]:La((e,{payload:t})=>{e.isVerifiedVideoRenderCanvasAfterFailover=t}),["".concat(fu)]:e=>u(u({},xd),{},{captureCanvasList:e.captureCanvasList,activeCamera:e.activeCamera,isVerifiedVideoCaptureCanvasAfterFailover:!1,isVerifiedVideoRenderCanvasAfterFailover:!1}),["".concat(vu)]:La((e,{payload:t})=>{e.receivedVideoDimension=t}),["".concat(yu)]:La((e,{payload:t})=>{e.subscribedVideoList.includes(t)||e.subscribedVideoList.push(t)}),["".concat(Eu)]:La((e,{payload:t})=>{const r=e.subscribedVideoList.indexOf(t);r>=0&&e.subscribedVideoList.splice(r,1)}),["".concat(Su)]:La((e,{payload:t})=>{-1===e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key)&&e.renderedVideoList.push(u({},t))}),["".concat(mu)]:La((e,{payload:t})=>{const r=e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key);r>=0&&e.renderedVideoList.splice(r,1)}),["".concat(gu)]:La((e,{payload:t})=>{e.isFollowHostVideoLayout=t}),["".concat(bu)]:La((e,{payload:t})=>{e.hostDragLayout=t})},xd),Gd=dn(Hd),{InitSuccessVideo:Bd,InitSuccessAudio:Wd,InitSuccessSharing:Kd,InitFailedVideo:qd,InitFailedAudio:zd,InitFailedSharing:Jd}=Ri;let Yd;const Xd=new z(un(Od,xa,gc,dn(Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(Vt("".concat(Qr)),Nt(t),Qe(([,e])=>void 0!==e.media.assetsPath&&void 0!==e.media.mediaConstraints),Tt(([,e])=>{const{media:{assetsPath:r,mediaConstraints:n},meeting:{enableQos:o}}=e;Yd=ui.getInstance(),r&&n&&Yd.setAssetsAndConstraint(r,n);const i=lc(e);let s;s=i?se(i):ps("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1).pipe(de(ge),Nt(t),Ae(([,e])=>lc(e))),s.pipe(Nt(t)).subscribe(([e,t])=>{const{meeting:{svcUrl:r,meetingNumber:n,conId:i,e2eEncrypt:s,userId:a,isWebinar:c}}=t;var u;e&&(null===(u=Yd)||void 0===u||u.connect({svcUrl:r,meetingNumber:n,conId:i,e2eEncrypt:s,isViewOnly:ec(e.userRole),currentUserId:a,isWebinar:c,enableQos:o}))})}),At(()=>ze(e=>{var t;return null===(t=Yd)||void 0===t?void 0:t.registerCallback(e)},e=>{var t;return null===(t=Yd)||void 0===t?void 0:t.unregisterCallback(e)},(e,t)=>({type:e,data:t})).pipe(Ae(e=>Zr(e))))),connectedMediaStreamEpic:e=>_n(e,[Bd,Wd,Kd,qd,zd,Jd]).pipe(fi(e=>{const{payload:{type:t,data:r}}=e;if(t===Wd||t===zd){if(r===Ni.EncodeSuccess)return us("AUDIO_ENCODE_SUCCESS"),se($r("success"));if(r===Ni.DecodeSuccess)return us("AUDIO_DECODE_SUCCESS"),se(en("success"));if(r===Ni.EncodeFailed)return us("AUDIO_ENCODE_FAIL"),se($r("failed"));if(r===Ni.DecodeFailed)return us("AUDIO_DECODE_FAIL"),se(en("failed"))}else if(t===Bd||t===qd){if(r===Ni.EncodeSuccess)return us("VIDEO_ENCODE_SUCCESS"),se(tn("success"));if(r===Ni.DecodeSuccess)return us("VIDEO_DECODE_SUCCESS"),se(rn("success"));if(r===Ni.EncodeFailed)return us("VIDEO_ENCODE_FAIL"),se(tn("failed"));if(r===Ni.DecodeFailed)return us("VIDEO_DECODE_FAIL"),se(rn("failed"))}else if(t===Kd||t===Jd){if(r===Ni.EncodeSuccess)return us("SHARING_ENCODE_SUCCESS"),se(nn("success"));if(r===Ni.DecodeSuccess)return us("SHARING_DECODE_SUCCESS"),se(on("success"));if(r===Ni.EncodeFailed)return us("SHARING_ENCODE_FAIL"),se(nn("failed"));if(r===Ni.DecodeFailed)return us("SHARING_DECODE_FAIL"),se(on("failed"));if(t===Kd&&void 0===r)return us("SHARING_DECODE_SUCCESS"),se(on("success"))}})),mediaDeviceUpdateEpic:(e,t)=>_n(e,[Bd,Wd]).pipe(vi(()=>{if("object"==typeof navigator.mediaDevices)return Ye(Rd(),Ye(_n(e,Ri.StartVideoCaptureSuccess),qe(navigator.mediaDevices,"devicechange"),_n(e,Ri.UserGrantCaptureAudio)).pipe(je(()=>Rd().pipe(Tt(()=>{us("MEDIA_DEVICE_CHANGE")}))))).pipe(Nt(t),je(([e,t])=>{const r=[Pc(e.microphones),Mc(e.speakers),nu(e.cameras)];if(t.audio){const{audio:{activeMicrophone:i,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:c}}=t,{microphones:u,speakers:d}=e,l=a.filter(e=>-1===u.findIndex(t=>t.deviceId===e.deviceId)),p=c.filter(e=>-1===d.findIndex(t=>t.deviceId===e.deviceId));var n,o;l.length>0&&l[0].deviceId===i&&(null===(n=Yd)||void 0===n||n.changeMicrophone("default"),r.push(kc("default"))),p.length>0&&p[0].deviceId===s&&(null===(o=Yd)||void 0===o||o.changeSpeaker("default"),r.push(Uc("default")))}return ke(r)}))})),sendUserNodeListToMediaSDKEpic:e=>ln(e,7937).pipe(Tt(e=>{const{payload:{body:t}}=e,r=ui.getInstance();t.add&&r.sendUserNodeList(t.add.map(e=>({userid:e.id,sn:e.zoomID&&$n(e.zoomID)}))),t.remove&&r.sendUserNodeList(t.remove.map(e=>({userid:e.id,bremove:!0})))}),gt($)),handleMediaSdkGcmIVResponseEpic:e=>_n(e,Ri.AesGcmIvResponse).pipe(Tt(e=>{const{payload:{data:{workerType:t,iv:r}}}=e,n=jo.get(Zo.WebclientIVState);if(n){const e=u(u({},n),{},{[t]:r});jo.set(Zo.WebclientIVState,e,Vo.SessionStorage)}}),gt($))})))),Qd=(e,t,r)=>Xd.pipe(je(n=>n(e,t,r))),Zd={meeting:Ad,socket:Ha,participants:oc,media:Td},$d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Z.constructor,r=new t(Z.SchedulerAction),n=new K,o=void 0,i=function(t){o=t;var i=(new K).pipe(de(r)),s=(new K).pipe(de(r)),a=new jt(i),c=new Ht(s,o.getState());return n.pipe(Ae((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})),je((function(e){return ke(e).pipe(mt(r),de(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}(),el=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||b;function tl(e){return function(e){for(var t=Object.keys(e),r={},n=0;ne.userId===t);if(o.findIndex(e=>e===pl.Attendee)>-1&&(i=_c(r).find(e=>e.userId===t)),!i)return Promise.reject({type:ts,reason:"no matching user"});{const{meeting:{userId:e}}=n.getState();for(let r=0;r{if(this[il][e]&&void 0===o.getState()[e]){const{epic:t,reducer:r,Client:n}=this[il][e];o.injectReducer(e,r),o.injectEpic(t);const i=new n(o);this.modules.set(e,i)}}),(null==n?void 0:n.audio)&&void 0===o.getState().audio&&(o.injectReducer("audio",kd),o.injectEpic(Ud)),(null==n?void 0:n.video)&&void 0===o.getState().video&&(o.injectReducer("video",Fd),o.injectEpic(Gd)),(null==n?void 0:n.screen)&&void 0===o.getState().share&&(o.injectReducer("share",pd),o.injectEpic(hd))}return n(lo({apiKey:e,signature:t,language:s})),n(sn({mediaConstraints:r&&r.constraints||{},assetsPath:i})),new Promise((e,t)=>{No(c,()=>{e("")},()=>{t({type:ts,reason:"depedent assets are not accessible"})})})}on(e,t){((e,t)=>{const r=os[e];if(r){const n=as.get(e);if(n)n.push(t),as.set(e,n);else{const n=[t];as.set(e,n);const o=Ye(...r.map(e=>{const{event:t,payload:r}=e;return qe(is,t).pipe(Ae(e=>r(e)),de(ge))})).subscribe(t=>{const r=as.get(e);r&&r.forEach(e=>{e(t)})});cs.push(o)}}})(e,t)}off(e,t){((e,t)=>{if(os[e]){const r=as.get(e);if(Array.isArray(r)){const n=r.findIndex(e=>e===t);n>-1&&(r.splice(n,1),as.set(e,r))}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[nl]:e,[ol]:t}=this;return"connected"===e().socket.zoomSocketStatus&&t(so()),Promise.resolve("")}end(){const{[nl]:e,[ol]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(ao()),ot(500).pipe(Tt(()=>{hs()}),vt("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[rl].getState(),{meeting:{bAllowAttendeeRename:n}}=r,o=lc(r),i=ec(o.userRole),s=pc(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 El.rename(t,Xn(e),Xn(o.displayName)),ad(t,t=>t.displayName===e);{const n=_c(r).find(e=>e.userId===t);return n?(hi.getInstance().rename(n.jid,e),ls("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",t=>{const r=t.find(e=>e.jid===n.jid);return r&&r.name===e})):Promise.reject({type:ts,reason:"no matching user"})}}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})}return e===o.displayName?Promise.resolve():s||n?(El.rename(o.userId,Xn(e),Xn(o.displayName)),ls("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t=>t.displayName===e)):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host disallow rename themselves"})}makeHost(e){return El.assignHost(e,!1),ad(e,e=>!0===e.isHost)}makeCoHost(e){const t=this[rl].getState(),r=vc(t).find(t=>t.userId===e);return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:ts,reason:"user:[".concat(e,"] is already co-host ")}):(El.assignHost(e,!0),ad(e,e=>!0===e.bCoHost))}revokeCoHost(e){const t=this[rl].getState(),r=vc(t).find(t=>t.userId===e);return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:ts,reason:"user:[".concat(e,"] is not a co-host")}):(El.revokeCoHost(e),ad(e,e=>!1===e.bCoHost))}isHost(){const e=this[rl].getState(),t=lc(e);return!!t&&t.isHost}isCoHost(){const e=this[rl].getState(),t=lc(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[nl]();return e}getCurrentUserInfo(){const e=this[rl].getState(),t=lc(e);if(t){const r={userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:Za(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,sharePause:t.sharerPause,feedback:t.feedback};if(e.meeting.isWebinar&&ec(t.userRole)){const{participants:{allowTalkAttendeesList:n}}=e,o=n.find(e=>e.userId===t.userId),i=!!o;Object.assign(r,{isAllowToTalk:i}),o&&Object.assign(r,{audio:o.audio,muted:o.muted})}return r}return null}getParticipantsList(){const e=this[rl].getState(),{meeting:{isWebinar:t,meetingStatus:r}}=e,n=lc(e);return"joined"!==r||!n||n.bHold||t&&ec(n.userRole)?[]:vc(e).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,isPhoneUser:Za(e.userType),bRaiseHand:e.bRaiseHand,bHold:e.bHold,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause,feedback:e.feedback}))}getMeetingHost(){const e=this[nl](),{meeting:{isWebinar:t}}=e;if(t){const t=lc(e);if(t&&!ec(t.userRole)){const t=yc(e);if(t)return{userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:Za(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,feedback:t.feedback}}}else{const t=yc(e);if(t)return{userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:Za(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,feedback:t.feedback}}return null}getMeetingInfo(){const{meeting:{meetingStatus:e,isOnHold:t,meetingNumber:r,passWord:n,userName:o,userEmail:i,meetingTopic:s,encType:a,region:c,network:u,topic:d,zlkJwtToken:l,userId:p}}=this[nl](),h="joined"===e&&!t;if(l)return{topic:d,password:n,userName:o,isInMeeting:h,userId:p};{let e="";return 0===a?e="None":1===a?e="AES ECB":2===a&&(e="AES GCM"),{meetingNumber:r,password:n,userName:o,userEmail:i,meetingTopic:s,encryptionType:e,region:c,network:u,isInMeeting:h,userId:p}}}}).prototype,"end",[dl,cl],Object.getOwnPropertyDescriptor(yl.prototype,"end"),yl.prototype),d(yl.prototype,"changeName",[cl],Object.getOwnPropertyDescriptor(yl.prototype,"changeName"),yl.prototype),d(yl.prototype,"makeHost",[_l,dl,cl],Object.getOwnPropertyDescriptor(yl.prototype,"makeHost"),yl.prototype),d(yl.prototype,"makeCoHost",[fl,dl,cl],Object.getOwnPropertyDescriptor(yl.prototype,"makeCoHost"),yl.prototype),d(yl.prototype,"revokeCoHost",[vl,dl,cl],Object.getOwnPropertyDescriptor(yl.prototype,"revokeCoHost"),yl.prototype),yl);!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"}(gl||(gl={})),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"}(bl||(bl={}));const ml=[gl.All,gl.Host,gl.NoOne,gl.EveryonePublicly],Il=[gl.NoAttendee,gl.All,gl.AllPanelist],Al={userId:bl.All,displayName:"Everyone",isHost:!1,isCoHost:!1},Ol={userId:bl.Panelist,displayName:"All panelists"},Cl={userId:bl.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};var Tl=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>pn(e,"Message").pipe(Nt(t),je(([e,t])=>{const{payload:{data:{sn:r,senderName:n,senderJid:o,receiver:i,text:s}}}=e,a=lc(t),c=_c(t),{meeting:{jid:u,userId:d},participants:{xmppAttendeeList:l}}=t;return ni.beginDecrypt({decryptedText:s,type:Qo.XMPP_CHAT,zoomId:r}).then(({message:e})=>{var t;let r=null,s=null,p=null;a&&ec(a.userRole)&&u===i?(r=l.find(e=>e.jid===o),s=d,p=a.displayName):(r=c.find(e=>e.jid===o),s=bl.Panelist,p="All panelists");const h={message:e,sender:{name:n,userId:(null===(t=r)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:p,userId:s},timestamp:(new Date).getTime()};return us("CHAT_RECEIVE_MESSAGE_EVENTS",h),Ru(h)})})),receiveChatMessageFromRWGEpic:(e,t)=>ln(e,7944).pipe(Nt(t),fi(([e,t])=>{const{meeting:{bIbDisableChat:r,isWebinar:n},participants:{attendeesList:o}}=t,{payload:{body:{attendeeNodeID:i,sn:s,destNodeID:a,text:c,senderName:u}}}=e,d=lc(t),l=_c(t);if(d){const e=ec(null==d?void 0:d.userRole)&&i===d.userId;if(!r&&!e){let e,t=s;if(!s){const e=o.find(e=>e.userId===a);e&&(t=e.zoomID)}if(i===bl.SilentModeUsers){const t={message:Qn(c),sender:{name:"Host",userId:a},receiver:{name:"Everyone (in Waiting Room)",userId:i},timestamp:(new Date).getTime()};e=Promise.resolve(t)}else e=ni.beginDecrypt({decryptedText:c,zoomId:t,type:Qo.RWG_CHAT}).then(({message:e})=>{const t=o.find(e=>e.userId===a),r=u?Qn(u):null==t?void 0:t.displayName;let s="";if(i===bl.All)s=n?"All panelists and attendees":"Everyone";else if(i===bl.Panelist)s="All panelists";else if(n&&l.findIndex(e=>e.userId===i)>-1)s=l.find(e=>e.userId===i).displayName;else{const e=o.find(e=>e.userId===i);e&&(s=e.displayName)}return{message:e,sender:{name:r,userId:a,avatar:null==t?void 0:t.avatar},receiver:{name:s,userId:i},timestamp:(new Date).getTime()}});return e.then(e=>(us("CHAT_RECEIVE_MESSAGE_EVENTS",e),Ru(e)))}}})),changePrivilegeResponse:(e,t)=>ln(e,7938).pipe(Qe(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)}),Nt(t),Ae(([e,t])=>{const{payload:{body:{chatPriviledge:r,bAllowAttendeeChat:n}}}=e,{chat:{chatPrivilege:o}}=t;return void 0!==n?(us("CHAT_PRIVILEGE_CHANGE",!0===n?{chatPrivilege:o}:{chatPrivilege:gl.NoAttendee}),Du(n)):(us("CHAT_PRIVILEGE_CHANGE",{chatPrivilege:r}),wu(r))}))});const wl={chatHistory:[],chatPrivilege:gl.All,isAllowAttendeeChat:!0},Rl=Pr({["".concat(Ru)]:La((e,{payload:t})=>{e.chatHistory.push(t)}),["".concat(wu)]:La((e,{payload:t})=>{e.chatPrivilege=t}),["".concat(Du)]:La((e,{payload:t})=>{e.isAllowAttendeeChat=t}),["".concat(Nu)]:()=>u({},wl)},wl);function Nl(e,t,r){if(null==r?void 0:r.host)return[yc(e),...Ec(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=[yc(e),...Ec(e),...e.participants.attendeesList.filter(e=>!(e.bCoHost||e.isHost))];if(null==r?void 0:r.includeAttendee){const t=_c(e).filter(e=>!Za(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 Dl;const Pl=si.createAgent(),Ml=hi.getInstance();let kl=(d((Dl=class extends al{constructor(...e){super(...e),this.getHistory=()=>this[nl]().chat.chatHistory.map(e=>u({},e))}send(e,t){if(!e)return Promise.reject({type:ts,reason:"Text is empty"});const{[nl]:r,[ol]:n}=this,o=r(),i=lc(o),s=function(e,t){if(t===bl.All)return Al;if(t===bl.Panelist)return Ol;if(t===bl.SilentModeUsers)return Cl;{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?void 0:e.zoomID)||!(null==t?void 0:t.displayName)||n===e.userId)return{type:ts,reason:"invalid target user"};const{chat:{chatPrivilege:o},meeting:{isWebinar:i}}=r,s=pc(r),a=t.isHost||t.bCoHost;if(!s)if(i&&ec(e.userRole)){if(o===gl.NoAttendee||o===gl.AllPanelist&&n!==bl.Panelist||o===gl.All&&n!==bl.All&&n!==bl.Panelist)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"}}else if(o===gl.NoAttendee||o===gl.Host&&!a||n===bl.SilentModeUsers||o===gl.EveryonePublicly&&n!==bl.All&&!a)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"};return null})(i,s,o);if(a)return Promise.reject(a);const{meeting:{isWebinar:c,encType:u}}=o,d=u===Xo.AES_GCM;let l=Promise.resolve();return t===bl.SilentModeUsers?Pl.chat(Xn(e),t):l=ni.beginEncrypt({text:e,type:Qo.RWG_CHAT}).then(e=>{c?s.userRole===Xa.Attendee?(Ml.sendWebinarMsg(e,s.jid,bl.IndividualCcPanelist,d),Pl.chat(e,bl.Panelist,null==i?void 0:i.zoomID)):ec(i.userRole)&&t===bl.Panelist?Ml.sendWebinarMsg(e,null,bl.Panelist,d):bl.All!==t&&bl.Panelist!==t&&s.userRole===Xa.Attendee||Pl.chat(e,t,null==i?void 0:i.zoomID):Pl.chat(e,t,null==i?void 0:i.zoomID)}),l.then(()=>{const t={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:(new Date).getTime()};return n(Ru(t)),us("CHAT_RECEIVE_MESSAGE_EVENTS",t),t})}setPrivilege(e){const t=this[nl](),{meeting:{isWebinar:r},chat:{chatPrivilege:n}}=t;return n===e?Promise.resolve(""):!r&&!ml.includes(e)||r&&!Il.includes(e)?Promise.reject({type:ts,reason:"invalid privilege value of parameter"}):(Pl.setChatPriviledge(e),ls("CHAT_PRIVILEGE_CHANGE",t=>t.chatPrivilege===e))}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[nl]();return t?e:gl.NoAttendee}getReceivers(){const e=this[nl](),{chat:{chatPrivilege:t,isAllowAttendeeChat:r},meeting:{isWebinar:n}}=e;if(!r)return[];const o=lc(e);if(o)if(n){if(!ec(o.userRole))return Nl(e,o.userId,{includeAttendee:!0});if(t===gl.All)return[Ol,Al];if(t===gl.AllPanelist)return[Ol];if(t===gl.NoAttendee)return[]}else{const r=pc(e);if(t===gl.All||r){const t=Nl(e,o.userId);return[Al,...t]}if(t===gl.Host)return Nl(e,o.userId,{host:!0});if(t===gl.EveryonePublicly){const t=Nl(e,o.userId,{host:!0});return[Al,...t]}if(t===gl.NoOne)return[]}return[]}}).prototype,"send",[cl],Object.getOwnPropertyDescriptor(Dl.prototype,"send"),Dl.prototype),d(Dl.prototype,"setPrivilege",[ul,cl],Object.getOwnPropertyDescriptor(Dl.prototype,"setPrivilege"),Dl.prototype),Dl);const Ul=dn(Tl);let Vl;!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"}(Vl||(Vl={}));const Ll=(e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{meeting:{bIbDisableShare:s},share:{sharePrivilege:a,ssrc:c,isChromeExtensionInstalled:d,isVerifiedCaptureCanvasAfterFailover:l},media:{sharingEncodeStatus:p}}=i;if(s)return Promise.reject({type:es,reason:"information barrier"});const h=pc(i),_=cd(i);if(a===ki.OnlyHost&&!h)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can start screen share"});if(a===ki.HostGrab&&!h&&_.length>0)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can grab screen share"});const f=lc(i);if(!0===(null==f?void 0:f.sharerOn))return Promise.reject({type:es,reason:"you have already started screen share."});let v=se(!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&&!d&&(o.checkChromeSharingExtension(),v=ps("SHARE_CHECK_CHROME_SHARING_EXTENSION",1)),t.id||(t.id="__ZOOM_SDK_SHARE_CANVAS_@__".replace("@","".concat(Math.floor(1e4*Math.random())))),We([wd("sharing",p,"success"),v]).subscribe(([e,r])=>{const[i]=e;if(i&&r){!1===l&&(Nd(t),n(Zc(!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)),o.startDesktopSharing(c,t.id,"__ZOOM_SDK_SHARING_VIDEO__")}}),new Promise((e,t)=>{tt(ps("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1),ps("SHARE_CHECK_CHROME_SHARING_EXTENSION").pipe(Qe(e=>!e),ht(1),gt(ae({reason:"required extension",extensionUrl:"https://chrome.google.com/webstore/detail/zoom-scheduler/kgjfgplpablkjnlkjmjdecgdpfankdle"}))),ps("SHARE_START_DESKTOP_SHARE_FAILED",1).pipe(gt(ae({reason:"user deny screen share"})))).subscribe(r=>{!0===r.sharerOn?e(""):t({type:"INTERNAL_ERROR"})},e=>{t(u({type:es},e))})})},jl=cc([vc],e=>e.filter(e=>e.bVideoOn));var Hl,xl,Fl,Gl,Bl,Wl,Kl,ql,zl,Jl,Yl,Xl,Ql,Zl,$l,ep,tp,rp,np,op,ip,sp,ap,cp;let up=(Hl=ll("audio"),xl=ll("audio"),Fl=ll("audio"),Gl=ll("audio"),Bl=ll("audio"),Wl=ll("audio"),Kl=ll("video"),ql=ll("video"),zl=ll("video"),Jl=ll("video"),Yl=ll("video"),Xl=ll("video"),Ql=ll("video"),Zl=ll("video"),$l=ll("share"),ep=ll("share"),tp=ll("share"),rp=ll("share"),np=ll("share"),op=ll("share"),ip=ll("share"),sp=ll("share"),dp="isShareOptionLocked",ap=function(e,t,r){const n=r.value;r.value=function(...e){const t=this[rl];if(t){const{meeting:{meetingOptions:e}}=t.getState();if(!0===e[dp])return Promise.reject({type:"OPERATION_LOCKED",reason:"".concat(dp," is locked")})}return n.apply(this,e)}},d((cp=class extends al{constructor(e){super(e),this[rl].dispatch(Qr()),this[sl]={store:e,mediaAgent:ui.getInstance(),rwgAgent:si.createAgent()}}startAudio(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n}=e,o=t(),i=lc(o);if("computer"===(null==i?void 0:i.audio))return Promise.resolve();if("phone"===(null==i?void 0:i.audio))return Promise.reject({type:es,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:t,canPlayAudio:s},media:{audioDecodeStatus:a,audioEncodeStatus:c}}=o;if(t)return Promise.reject({type:es,reason:"Computer audio has been loading, please wait."});if(i){r(jc(!0));const{userRole:t}=i,o=ec(t);wd("audio",o&&!e?"success":c,a).subscribe(([e,t])=>{if(e&&t){let e=s?Promise.resolve():function(){const e=document.createElement("audio");return e.muted=!1,e.volume=.1,e.src=URL.createObjectURL(Mi),e.play()}();void 0===e&&(e=Promise.resolve()),e.then(()=>{n.joinOrLeaveVoip(!0)}).catch(()=>{r(Vc(!1))})}})}return"failed"===c||"failed"===a?(r(jc(!1)),Promise.reject({type:"INTERNAL_ERROR",reason:"audio encode or decode error"})):new Promise((e,t)=>{tt(ps(Xi.JoinComputerAudio.success,1),Ye(...Xi.JoinComputerAudio.fail.map(e=>ps(e,1).pipe(je(()=>ae({type:"INSUFFICIENT_PRIVILEGES",reason:e}))))),ot(3e4).pipe(je(()=>ae({type:"OPERATION_TIMEOUT"})))).subscribe(()=>{r(jc(!1)),e("")},e=>{n.joinOrLeaveVoip(!1),r(jc(!1)),t(e)})})}})(this[sl])}stopAudio(){return(e=>{const{store:{getState:t,dispatch:r},mediaAgent:n,rwgAgent:o}=e,i=t(),{audio:{isComputerAudioLoading:s}}=i,a=lc(i);return s?Promise.reject({type:es,reason:"Computer audio has not finished joining, please wait."}):"computer"===(null==a?void 0:a.audio)?(n.leaveComputerAudio(),o.joinOrLeaveVoip(!1),r(Dc(0)),ls("AUDIO_CURRENT_USER_LEAVE_AUDIO")):Promise.resolve("")})(this[sl])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=lc(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:es,reason:"no audio joined"}):!0===(null==a?void 0:a.muted)?Promise.resolve(""):(n(Cc(!0)),o.mute(a.userId,!0),ls("AUDIO_CURRENT_USER_MUTED").then(()=>(i.muteAudio(),"")));if(pc(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:es,reason:"no audio joined"}):!1===n.muted?(o.mute(t,!0),ls("AUDIO_PARTICIPANT_AUDIO_UPDATE",e=>e.id===t&&1==e.muted)):Promise.resolve(""):Promise.reject({type:ts,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[sl],e)}unmuteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=lc(s);if(void 0===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:es,reason:"no audio joined"}):!1===(null==a?void 0:a.muted)?Promise.resolve(""):(n(Cc(!0)),s.audio.bCanUnmute?(o.mute(a.userId,!1),ls("AUDIO_CURRENT_USER_UNMUTED").then(()=>(i.unmuteAudio(),""))):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host not allow unmute themselves"}));if(pc(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:es,reason:"no audio joined"}):(!0===n.muted&&o.mute(t,!1),Promise.resolve("")):Promise.reject({type:ts,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[sl],e)}switchMicrophone(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{microphoneDevicesList:i,activeMicrophone:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeMicrophone(t),n(kc(t))),Promise.resolve(""))})(this[sl],e)}switchSpeaker(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{speakerDevicesList:i,activeSpeaker:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeSpeaker(t),n(Uc(t))),Promise.resolve(""))})(this[sl],e)}getMicList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.microphoneDevicesList]:[]})(this[sl])}getSpeakerList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.speakerDevicesList]:[]})(this[sl])}isAudioMuted(e){return(({store:{getState:e}},t)=>{const r=e(),{meeting:{isWebinar:n}}=r;let o=null;return void 0===t?o=lc(r):(o=r.participants.attendeesList.find(e=>e.userId===t),n&&!o&&(o=r.participants.xmppAttendeeList.find(e=>e.userId===t))),!!o&&!!o.muted})(this[sl],e)}getActiveMicrophone(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeMicrophone:null})(this[sl])}getActiveSpeaker(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeSpeaker:null})(this[sl])}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:u,isCaptureCameraLoading:d,isCurrentUserStartedVideo:l,isVideoMuted:p}}=i;return l?Promise.reject({type:es,reason:"Video is started"}):d?Promise.reject({type:es,reason:"Camera is starting,please wait."}):p&&!pc(i)?Promise.reject({type:es,reason:"Video is muted by the host"}):(n(lu(!0)),wd("video",a,s).subscribe(([e])=>{if(e){const{cameraId:e=u,captureWidth:r=640,captureHeight:i=360,videoDOMId:s}=t||{};o.startCaptureVideo(c,e,r,i,s),u!==e&&n(ou(e))}else n(lu(!1))}),ds(qi).then(()=>{n(pu(!1)),n(au(!1))}).finally(()=>{n(lu(!1))}))})(this[sl],e)}stopVideo(){return(e=>{const{store:{getState:t},mediaAgent:r}=e,{video:{isCaptureCameraLoading:n,isCurrentUserStartedVideo:o}}=t();return n?Promise.reject({type:es,reason:"Camera is starting,please wait."}):o?(r.stopCaptureVideo(),ls("VIDEO_CAPTURE_STOP_RESULT",e=>!0!==(null==e?void 0:e.failed))):Promise.reject({type:es,reason:"carmera is closed"})})(this[sl])}switchCamera(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{video:{cameraDevicesList:s,isCurrentUserStartedVideo:a}}=i;return-1===s.map(e=>e.deviceId).indexOf(t)?Promise.reject({type:ts,reason:"Cannot find cameraDeviceId in camera devices list."}):(a&&o.changeCamera(t),n(ou(t)),Promise.resolve())})(this[sl],e)}renderVideo(e,t,r,n,o,i,s,a){return((e,t,r,n,o,i,s,a,c,u)=>{const{store:{getState:d,dispatch:l},mediaAgent:p,rwgAgent:h}=e,_=d(),{meeting:{userId:f},video:{subscribedVideoList:v}}=_;if(!t)return Promise.reject({type:ts,reason:"Received canvas is falsy"});if(v.length>=9)return Promise.reject({type:es,reason:"subscribe video counts greater than maximum size (".concat(9,")")});if(-1===jl(_).findIndex(e=>e.userId===r))return Promise.reject({type:ts,reason:"user is not send video"});const{media:{videoDecodeStatus:y},video:{isVerifiedVideoRenderCanvasAfterFailover:E}}=_;return t.id||(t.id="__ZOOM_SDK_VIDEO_CANVAS_@__".replace("@","".concat(Math.floor(1e4*Math.random())))),wd("video","success",y).subscribe(([e])=>{if(e){let e=t;!1===E&&(e=Nd(t),l(hu(!0)));const u=r===f,d=c||"__ZOOM_SDK_VIDEO_ZONE__";p.renderVideo(e.id,r,d,n,o,i,s,a,u,"",!1),v.includes(r)||(h.subscribeVideo(r,a,!1),l(yu(r))),l(Su({userId:r,key:d}))}}),"failed"===y?Promise.reject({type:"INTERNAL_ERROR",reason:"Video decode status is failed"}):Promise.resolve("")})(this[sl],e,t,r,n,o,i,s,a)}stopRenderVideo(e,t,r,n,o=!1){return((e,t,r,n,o,i=!1)=>{const{store:{getState:s,dispatch:a},mediaAgent:c,rwgAgent:u}=e,d=s(),{video:{subscribedVideoList:l,renderedVideoList:p}}=d;if(!t||!t.id)return Promise.reject({type:ts,reason:"canvas is falsy"});if(l.includes(r)){let e=o;e||(e={R:0,G:0,B:0,A:0});const s=n||"__ZOOM_SDK_VIDEO_ZONE__";p.find(e=>e.userId===r&&e.key===s)&&(c.stopRenderVideo(t.id,r,s,e,i),1==p.filter(e=>e.userId===r).length&&(u.unsubscribeVideo(r),a(Eu(r))),a(mu({userId:r,key:s})))}return Promise.resolve("")})(this[sl],e,t,r,n,o)}updateVideoCanvasDimension(e,t,r){return((e,t,r,n)=>{const{mediaAgent:o}=e;return t&&t.id?(o.updateRenderedVideoCanvasDimension(t.id,r,n),Promise.resolve("")):Promise.reject({type:ts,reason:"canvas is falsy"})})(this[sl],e,t,r)}adjustRenderedVideoPosition(e,t,r,n,o,i,s){return((e,t,r,n,o,i,s,a)=>{const{store:{getState:c},mediaAgent:u}=e;if(!t||!t.id)return Promise.reject({type:ts,reason:"canvas is falsy"});const{video:{subscribedVideoList:d}}=c();return d.includes(r)?(u.adjustRenderedVideoPosition(t.id,r,a||"__ZOOM_SDK_VIDEO_ZONE__",i,s,n,o),Promise.resolve("")):Promise.reject({type:ts,reason:"userId is not correct"})})(this[sl],e,t,r,n,o,i,s)}clearVideoCanvas(e,t){return((e,t,r)=>{const{mediaAgent:n}=e;if(!t||!t.id)return Promise.reject({type:ts,reason:"canvas is falsy"});let o=r;return o||(o={R:0,G:0,B:0,A:0}),n.clearVideoCanvas(t.id,o),Promise.resolve("")})(this[sl],e,t)}isCapturingVideo(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCurrentUserStartedVideo})(this[sl])}isCameraTaken(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCameraTaken})(this[sl])}isCaptureForbidden(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCaptureForbidden})(this[sl])}getCameraList(){return(e=>{const{store:{getState:t}}=e,r=t();if(!r.video)return[];const{video:{cameraDevicesList:n}}=r;return n.map(e=>Object.assign({},e))})(this[sl])}getActiveCamera(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeCamera:""})(this[sl])}getActiveVideoId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeVideoId:0})(this[sl])}getVideoMaxQuality(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.receivedVideoMaxQuality:Vi.Video_90P})(this[sl])}getReceivedVideoDimension(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.receivedVideoDimension:null})(this[sl])}isSupportMultipleVideos(){return"function"==typeof OffscreenCanvas&&"function"==typeof SharedArrayBuffer}startShareView(e,t){return((e,t,r,n)=>{const{store:{getState:o,dispatch:i},mediaAgent:s,rwgAgent:a}=e,{share:{isReceiveSharing:c,isRemoteSharingActive:u,activeNodeId:d,activeSsrc:l,shareQuality:p,status:h,isVerifiedRenderCanvasAfterFailover:_},media:{sharingDecodeStatus:f}}=o();if(!t||r!==d)return Promise.reject({type:ts,reason:""});if(!u||c||h!==Ui.End)return Promise.reject({type:es,reason:""});return wd("sharing","success",f).subscribe(([,e])=>{if(e){let e=t;!1===_&&(e=Nd(t),i(Qc(!0))),i(Fc(!0)),a.subscribeSharing(r,p),s.renderSharing(l,e,!1,n)}}),"failed"===f?Promise.reject({type:"INTERNAL_ERROR",reason:""}):ls("SHARE_RECEIVED_DIMENSION_CHANGE",e=>!!e,6e4)})(this[sl],e,t)}stopShareView(){return(e=>{const{store:{dispatch:t,getState:r},rwgAgent:n,mediaAgent:o}=e,{share:{isReceiveSharing:i,activeNodeId:s}}=r();return i?(o.stopRenderSharing(),n.unsubscribeSharing(s),t(Fc(!1)),Promise.resolve("")):Promise.resolve("")})(this[sl])}switchShareView(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),{share:{isReceiveSharing:a,activeNodeId:c,isRemoteControlApproved:u,isGrabRemoteControl:d,shareQuality:l}}=s;return a?t===c?Promise.resolve(""):cd(s).findIndex(e=>e.userId===c)>-1?(u&&(d&&o.subscribeGrabRemoteControl(c,!1),o.sharingRequestRemoteControl(c,!1)),o.unsubscribeSharing(c),o.subscribeSharing(t,l),i.switchSharingSource(t),n(xc({bStatus:1,activeNodeID:t,ssrc:t})),Promise.resolve("")):Promise.reject({type:ts,reason:"no matching user id"}):Promise.reject({type:es})})(this[sl],e)}updateSharingCanvasDimension(e,t){return((e,t,r)=>{const{store:{getState:n},mediaAgent:o}=e,i=n(),{share:{isReceiveSharing:s}}=i;return s&&o.updateRenderedSharingDimension(t,r),Promise.resolve("")})(this[sl],e,t)}startShareScreen(e){return Ll(this[sl],e)}stopShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n,mediaAgent:o}=e,{share:{status:i},meeting:{userId:s}}=t();return i===Ui.End?Promise.resolve(""):(r(Kc(Ui.End)),n.stopSharing(s),o.stopDesktopSharing(),ls("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!1===e.sharerOn))})(this[sl])}pauseShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n,mediaAgent:o}=e,{share:{status:i}}=t();return i===Ui.Sharing?(n.pauseSharing(),o.pauseDesktopSharing(),ls("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerPause).then(()=>(r(Kc(Ui.Paused)),""))):Promise.reject({type:es})})(this[sl])}resumeShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n,mediaAgent:o}=e,{share:{status:i}}=t();return i===Ui.Paused?(n.resumeSharing(),o.resumeDesktopSharing(),ls("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerOn&&!1===e.sharerPause).then(()=>(r(Kc(Ui.Sharing)),""))):Promise.reject({type:es})})(this[sl])}lockShare(e){return((e,t)=>((e,t)=>{const{store:{getState:r},rwgAgent:n}=e,{share:{sharePrivilege:o}}=r();return o===t?Promise.resolve(""):Object.values(ki).includes(t)?(n.lockSharing(t),ls("UPDATE_MEETING_ATTRIBUTE",e=>e.lockShare===t)):Promise.reject({type:ts})})(e,t?ki.OnlyHost:ki.HostGrab))(this[sl],e)}getShareUserList(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?cd(r).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause})):[]})(this[sl])}getActiveShareUserId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share&&r.share.isRemoteSharingActive?r.share.activeNodeId:0})(this[sl])}isReceiveSharing(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.share&&r.share.isReceiveSharing})(this[sl])}getSharedContentDimension(){return(e=>{const{store:{getState:t}}=e,r=t();if(r.share){if(r.share.status!==Ui.End)return u({},r.share.shareDimension);{const{share:{receivedShareDimension:e}}=r;return{width:e.width,height:e.height}}}return null})(this[sl])}getShareStatus(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?r.share.status:null})(this[sl])}}).prototype,"startAudio",[cl,Hl],Object.getOwnPropertyDescriptor(cp.prototype,"startAudio"),cp.prototype),d(cp.prototype,"stopAudio",[cl,xl],Object.getOwnPropertyDescriptor(cp.prototype,"stopAudio"),cp.prototype),d(cp.prototype,"muteAudio",[cl,Fl],Object.getOwnPropertyDescriptor(cp.prototype,"muteAudio"),cp.prototype),d(cp.prototype,"unmuteAudio",[cl,Gl],Object.getOwnPropertyDescriptor(cp.prototype,"unmuteAudio"),cp.prototype),d(cp.prototype,"switchMicrophone",[cl,Bl],Object.getOwnPropertyDescriptor(cp.prototype,"switchMicrophone"),cp.prototype),d(cp.prototype,"switchSpeaker",[cl,Wl],Object.getOwnPropertyDescriptor(cp.prototype,"switchSpeaker"),cp.prototype),d(cp.prototype,"startVideo",[cl,Kl],Object.getOwnPropertyDescriptor(cp.prototype,"startVideo"),cp.prototype),d(cp.prototype,"stopVideo",[cl,ql],Object.getOwnPropertyDescriptor(cp.prototype,"stopVideo"),cp.prototype),d(cp.prototype,"switchCamera",[cl,zl],Object.getOwnPropertyDescriptor(cp.prototype,"switchCamera"),cp.prototype),d(cp.prototype,"renderVideo",[cl,Jl],Object.getOwnPropertyDescriptor(cp.prototype,"renderVideo"),cp.prototype),d(cp.prototype,"stopRenderVideo",[cl,Yl],Object.getOwnPropertyDescriptor(cp.prototype,"stopRenderVideo"),cp.prototype),d(cp.prototype,"updateVideoCanvasDimension",[cl,Xl],Object.getOwnPropertyDescriptor(cp.prototype,"updateVideoCanvasDimension"),cp.prototype),d(cp.prototype,"adjustRenderedVideoPosition",[cl,Ql],Object.getOwnPropertyDescriptor(cp.prototype,"adjustRenderedVideoPosition"),cp.prototype),d(cp.prototype,"clearVideoCanvas",[cl,Zl],Object.getOwnPropertyDescriptor(cp.prototype,"clearVideoCanvas"),cp.prototype),d(cp.prototype,"startShareView",[cl,$l],Object.getOwnPropertyDescriptor(cp.prototype,"startShareView"),cp.prototype),d(cp.prototype,"stopShareView",[cl,ep],Object.getOwnPropertyDescriptor(cp.prototype,"stopShareView"),cp.prototype),d(cp.prototype,"switchShareView",[cl,tp],Object.getOwnPropertyDescriptor(cp.prototype,"switchShareView"),cp.prototype),d(cp.prototype,"updateSharingCanvasDimension",[cl,rp],Object.getOwnPropertyDescriptor(cp.prototype,"updateSharingCanvasDimension"),cp.prototype),d(cp.prototype,"startShareScreen",[cl,np],Object.getOwnPropertyDescriptor(cp.prototype,"startShareScreen"),cp.prototype),d(cp.prototype,"stopShareScreen",[cl,op],Object.getOwnPropertyDescriptor(cp.prototype,"stopShareScreen"),cp.prototype),d(cp.prototype,"pauseShareScreen",[cl,ip],Object.getOwnPropertyDescriptor(cp.prototype,"pauseShareScreen"),cp.prototype),d(cp.prototype,"resumeShareScreen",[cl,sp],Object.getOwnPropertyDescriptor(cp.prototype,"resumeShareScreen"),cp.prototype),d(cp.prototype,"lockShare",[ul,ap,cl],Object.getOwnPropertyDescriptor(cp.prototype,"lockShare"),cp.prototype),cp);var dp,lp;const pp={chat:{epic:Ul,reducer:Rl,Client:kl}},hp=si.createAgent();let _p=(d((lp=class extends Sl{constructor(e){super(e),this.mediaStream=void 0,this[il]=pp}getMediaStream(){return void 0===this.mediaStream&&(this.mediaStream=new up(this[rl])),this.mediaStream}joinInstant(e,t,r,n,o){const{[nl]:i,[ol]:s}=this,{meeting:{lang:a,meetingStatus:c},socket:{zoomSocketStatus:u}}=i();return t?"initial"===c&&"closed"===u?(s(no({topic:e,password:o||"",userName:r,zlk:t,lang:a,cv:n})),ds(Si)):Promise.reject({type:es,reason:"duplicated operation"}):Promise.reject({type:es,reason:"invalid signature"})}removeUser(e){const t=this[rl].getState(),{participants:{attendeesList:r}}=t;return r.find(t=>t.userId===e)?(hp.expel(e),ls("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t=>t.some(t=>t.userId===e))):Promise.reject({type:ts,reason:"no matched user"})}}).prototype,"removeUser",[ul,cl],Object.getOwnPropertyDescriptor(lp.prototype,"removeUser"),lp.prototype),lp);class fp{constructor(e){this.instant=void 0,this.context=void 0,this.script=void 0,this.mic=void 0,this.instant=0,this.context=e,this.mic=null,this.script=e.createScriptProcessor(2048,1,1),this.script.onaudioprocess=e=>{const t=e.inputBuffer.getChannelData(0);let r,n=0;for(r=0;re.stop()),this.audioStream=null,this.isAudioStarted=!1}async toggleMicIsMuted(e){if(e){if(!this.audioContext){const e=window.AudioContext||window.webkitAudioContext;this.audioContext=new e}this.inputMicDetector=new fp(this.audioContext),this.inputMicDetector.connectToSource(this.audioStream)}else this.inputMicDetector&&this.inputMicDetector.stop(),this.inputMicDetector=null;this.isMicUnmuted=e}getAudioConstraints(){return{audio:""===this.deviceId||{deviceId:this.deviceId},video:!1}}}const yp={width:{min:1024,ideal:1280,max:1920},height:{min:576,ideal:720,max:1080},aspectRatio:{ideal:1.777777778}};class Ep{constructor(e=""){this.isVideoStarted=void 0,this.videoStream=void 0,this.deviceId=void 0,this.isVideoStarted=!1,this.videoStream=null,this.deviceId=e}async start(e){if(!e)throw new Error("Video DOM element is falsy");if(this.isVideoStarted||this.videoStream)throw new Error("VideoAlreadyStartedError");const t=async t=>{if(!t||"OverconstrainedError"!==t.name&&"ConstraintNotSatisfiedError"!==t.name)throw t;console.log("Warning: detected ".concat(t.name," -- trying to fall back to lower aspect ratio"));try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints(!0));return this.tryPlayVideo(e,t)}catch(e){throw e}};try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints());return this.tryPlayVideo(e,t)}catch(e){return t(e)}}async stop(){if(!this.videoStream||!this.isVideoStarted)throw new Error("VideoNotStartedError");this.videoStream.getVideoTracks().forEach(e=>e.stop()),this.videoStream=null,this.isVideoStarted=!1}getVideoConstraints(e=!1){let t=yp;return e?t=""===this.deviceId||{deviceId:this.deviceId}:""!==this.deviceId&&(t.deviceId=this.deviceId),{audio:!1,video:t}}async tryPlayVideo(e,t){if(!e)throw new Error("Video DOM element is falsy");try{this.videoStream=t,e.srcObject=this.videoStream,await e.play(),this.isVideoStarted=!0}catch(e){throw e}}}class gp{static createClient(){if(!this.meetingClient){const e=function(){const e=[$d],t=f(tl(),el(function(){for(var e=arguments.length,t=new Array(e),r=0;r{void 0===t.asyncReducers[e]&&(t.asyncReducers[e]=r,t.replaceReducer(tl(t.asyncReducers)))},t.injectEpic=e=>{Xd.next(e)},$d.run(Qd),t}();this.meetingClient=new _p(e)}return this.meetingClient}static destroyClient(){this.meetingClient&&(this.meetingClient.leave().then(()=>{ot(500).subscribe(()=>{hs()})}),this.meetingClient=null)}static checkSystemRequirements(){return{audio:Fo()&&Go(),video:Fo()&&void 0!==navigator.mediaDevices,screen:Fo()&&void 0!==(navigator.mediaDevices&&navigator.mediaDevices).getDisplayMedia}}static getDevices(e){return e?navigator.mediaDevices.enumerateDevices():navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(e=>(e.getTracks().forEach(e=>e.stop()),navigator.mediaDevices.enumerateDevices()))}static createLocalAudioTrack(e=""){return new vp(e)}static createLocalVideoTrack(e=""){return new Ep(e)}}gp.meetingClient=void 0,gp.VERSION="2.0.0";var bp,Sp,mp="https://dmogdx0jrul3u.cloudfront.net/videosdk/".concat("1.1.0","/lib"),Ip="https://source.zoom.us/videosdk/".concat("1.1.0","/lib"),Ap="https://jssdk.zoomus.cn/videosdk/".concat("1.1.0","/lib"),Op=Symbol("stream"),Cp=function(){function t(r){e(this,t),this[Op]=void 0,this[Op]=r}return r(t,[{key:"startAudio",value:function(){return this[Op].startAudio()}},{key:"stopAudio",value:function(){return this[Op].stopAudio()}},{key:"muteAudio",value:function(e){return this[Op].muteAudio(e)}},{key:"unmuteAudio",value:function(e){return this[Op].unmuteAudio(e)}},{key:"isAudioMuted",value:function(e){return this[Op].isAudioMuted(e)}},{key:"getMicList",value:function(){return this[Op].getMicList()}},{key:"getSpeakerList",value:function(){return this[Op].getSpeakerList()}},{key:"getActiveMicrophone",value:function(){return this[Op].getActiveMicrophone()}},{key:"getActiveSpeaker",value:function(){return this[Op].getActiveSpeaker()}},{key:"switchMicrophone",value:function(e){return this[Op].switchMicrophone(e)}},{key:"switchSpeaker",value:function(e){return this[Op].switchSpeaker(e)}},{key:"startVideo",value:function(e){return this[Op].startVideo(e)}},{key:"stopVideo",value:function(){return this[Op].stopVideo()}},{key:"renderVideo",value:function(e,t,r,n,o,i,s,a){return this[Op].renderVideo(e,t,r,n,o,i,s,a)}},{key:"stopRenderVideo",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this[Op].stopRenderVideo(e,t,r,n,o)}},{key:"updateVideoCanvasDimension",value:function(e,t,r){return this[Op].updateVideoCanvasDimension(e,t,r)}},{key:"adjustRenderedVideoPosition",value:function(e,t,r,n,o,i,s){return this[Op].adjustRenderedVideoPosition(e,t,r,n,o,i,s)}},{key:"clearVideoCanvas",value:function(e,t){return this[Op].clearVideoCanvas(e,t)}},{key:"getCameraList",value:function(){return this[Op].getCameraList()}},{key:"switchCamera",value:function(e){return this[Op].switchCamera(e)}},{key:"isCapturingVideo",value:function(){return this[Op].isCapturingVideo()}},{key:"isCameraTaken",value:function(){return this[Op].isCameraTaken()}},{key:"getActiveVideoId",value:function(){return this[Op].getActiveVideoId()}},{key:"getActiveCamera",value:function(){return this[Op].getActiveCamera()}},{key:"isCaptureForbidden",value:function(){return this[Op].isCaptureForbidden()}},{key:"getVideoMaxQuality",value:function(){return this[Op].getVideoMaxQuality()}},{key:"getReceivedVideoDimension",value:function(){return this[Op].getReceivedVideoDimension()}},{key:"isSupportMultipleVideos",value:function(){return this[Op].isSupportMultipleVideos()}},{key:"startShareView",value:function(e,t){return this[Op].startShareView(e,t)}},{key:"stopShareView",value:function(){return this[Op].stopShareView()}},{key:"startShareScreen",value:function(e){return this[Op].startShareScreen(e)}},{key:"pauseShareScreen",value:function(){return this[Op].pauseShareScreen()}},{key:"resumeShareScreen",value:function(){return this[Op].resumeShareScreen()}},{key:"stopShareScreen",value:function(){return this[Op].stopShareScreen()}},{key:"lockShare",value:function(e){return this[Op].lockShare(e)}},{key:"isShareLocked",value:function(){return this[Op].isShareLocked()}},{key:"getActiveShareUserId",value:function(){return this[Op].getActiveShareUserId()}}]),t}(),Tp=Symbol("chat"),wp=function(){function t(r){e(this,t),this[Tp]=void 0,this[Tp]=r}return r(t,[{key:"send",value:function(e,t){return this[Tp].send(e,t)}},{key:"sendToAll",value:function(e){return this[Tp].send(e,gl.All)}},{key:"setPrivilege",value:function(e){return this[Tp].setPrivilege(e)}},{key:"getPrivilege",value:function(){return this[Tp].getPrivilege()}},{key:"getReceivers",value:function(){return this[Tp].getReceivers().map((function(e){return i({isManager:e.isCoHost},s(e,["isCoHost"]))}))}}]),t}(),Rp=function(e){return"string"==typeof e&&e.length>0},Np=Symbol("Client"),Dp=function(){function t(){e(this,t),this[Np]=void 0,this.stream=void 0,this.chat=void 0,this[Np]=gp.createClient()}return r(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Global",r=arguments.length>2?arguments[2]:void 0,n="";switch(t){case"Global":n=Ip;break;case"CN":n=Ap;break;case"CDN":n=mp;break;default:n=t}return this[Np].init("","",{language:e,dependentAssets:n,constraints:i({},gp.checkSystemRequirements()),additionalFeatures:["chat"],webEndpoint:r||"zoom.us"})}},{key:"join",value:function(e,t,r,n){return Rp(e)&&Rp(t)&&Rp(r)?e.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of topic is 200"}):r.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of username is 200"}):!n||Rp(n)&&!void/^([!@#$%^&*?=]|\w|\d){1,10}$/gi.test(n)?this[Np].joinInstant(e,t,r,"1.1.0",n):Promise.reject({type:"INVALID_PARAMETERS",reason:"Password can contain English characters, numbers and special characters like !@#$%^&*?=, and the max length of password is 10"}):Promise.reject({type:"INVALID_PARAMETERS",reason:"topic, token and userName must be string and required"})}},{key:"leave",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?this[Np].end():this[Np].leave()}},{key:"getSessionInfo",value:function(){var e=this[Np].getMeetingInfo();return{isInMeeting:e.isInMeeting||!1,password:e.password||"",topic:e.topic,userName:e.userName,userId:e.userId}}},{key:"on",value:function(e,t){this[Np].on(e,t)}},{key:"off",value:function(e,t){this[Np].off(e,t)}},{key:"getMediaStream",value:function(){return this.stream||(this.stream=new Cp(this[Np].getMediaStream())),this.stream}},{key:"getChatClient",value:function(){return this.chat||(this.chat=new wp(this[Np].getFeatureModule("chat"))),this.chat}},{key:"coverntUser",value:function(e){return{userId:e.userId,avatar:e.avatar||"",displayName:e.displayName,isHost:e.isHost,isManager:e.isCoHost||!1,audio:e.audio,muted:e.muted,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharerPause:e.sharerPause}}},{key:"getCurrentUserInfo",value:function(){var e=this[Np].getCurrentUserInfo();if(e)return this.coverntUser(e)}},{key:"getUser",value:function(e){var t=this[Np].getParticipantsList().find((function(t){return t.userId===e}));if(t)return this.coverntUser(t)}},{key:"getAllUser",value:function(){var e=this;return this[Np].getParticipantsList().map((function(t){return e.coverntUser(t)}))}},{key:"changeName",value:function(e,t){return this[Np].changeName(e,t)}},{key:"makeHost",value:function(e){return this[Np].makeHost(e)}},{key:"makeManager",value:function(e){return this[Np].makeCoHost(e)}},{key:"revokeManager",value:function(e){return this[Np].revokeCoHost(e)}},{key:"removeUser",value:function(e){return this[Np].removeUser(e)}},{key:"isHost",value:function(){return this[Np].isHost()}},{key:"isManager",value:function(){return this[Np].isCoHost()}}]),t}(),Pp=function(){function t(){e(this,t)}return r(t,null,[{key:"createClient",value:function(){return this.videoClient||(this.videoClient=new Dp),this.videoClient}},{key:"destroyClient",value:function(){this.videoClient&&(this.videoClient.leave(),this.videoClient=null)}},{key:"checkSystemRequirements",value:function(){return gp.checkSystemRequirements()}},{key:"getDevices",value:function(e){return gp.getDevices(e)}},{key:"createLocalAudioTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return gp.createLocalAudioTrack(e)}},{key:"createLocalVideoTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return gp.createLocalVideoTrack(e)}}]),t}();Pp.videoClient=void 0,Pp.VERSION="1.1.0",function(e){e[e.All=1]="All",e[e.NoOne=4]="NoOne",e[e.EveryonePublicly=5]="EveryonePublicly"}(bp||(bp={})),function(e){e[e.All=0]="All"}(Sp||(Sp={}));export default Pp;export{Sp as ChatMsgType,bp as ChatPrivilege,Uo as ConnectionState,Bi as PassiveStopShareReason,ki as SharePrivilege,Ui as ShareStatus,Li as VideoActiveState,Fi as VideoCapturingState,Vi as VideoQuality}; +function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;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,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(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 d(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}(J),X=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=X.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 m(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}(X),Q=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t}(Z))(Y),$=new x((function(e){return e.complete()}));function ee(e){return e?function(e){return new x((function(t){return e.schedule((function(){return t.complete()}))}))}(e):$}function te(e){return e&&"function"==typeof e.schedule}var re,ne=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=_e++;return ve[t]=!0,fe.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}(J),ge=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(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(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(Te);function je(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),Ue(L,e)}function He(){return je(1)}function xe(){for(var e=[],t=0;t1?n.next(Array.prototype.slice.call(arguments)):n.next(e)}),n,r)}))}function We(e,t,r){return r?We(e,t).pipe(Ae((function(e){return w(e)?r.apply(void 0,e):r(e)}))):new x((function(r){var n,o=function(){for(var e=[],t=0;t=0}function qe(){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 x?e[0]:je(r)(ie(e,n))}function ze(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function Je(e,t){return function(r){return r.lift(new Ye(e,t))}}var Ye=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Xe(e,this.predicate,this.thisArg))},e}(),Xe=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 m(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}(k);function Ze(e,t,r){return[Je(t,r)(new x(Pe(e))),Je(ze(t,r))(new x(Pe(e)))]}function Qe(){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 dt(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(de.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(de.createComplete()),this.unsubscribe()},t}(k),dt=function(e,t){this.time=e,this.notification=t};function ut(e){return function(t){return 0===e?ee():t.lift(new lt(e))}}var lt=function(){function e(e){if(this.total=e,this.total<0)throw new Ie}return e.prototype.call=function(e,t){return t.subscribe(new pt(e,this.total))},e}(),pt=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return m(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}(k);function ht(e){return function(t){return t.lift(new _t(e))}}var _t=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new ft(e,this.value))},e}(),ft=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return m(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(k);function vt(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?Ue((function(){return e}),t,r):("number"==typeof t&&(r=t),Ue((function(){return e}),r))}function Et(){for(var e=[],t=0;t0){var s=i.indexOf(r);-1!==s&&i.splice(s,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}(Te),Pt=function(e,t){return e===t||"function"==typeof t&&e===t.toString()},Mt=function(){for(var e=arguments.length,t=Array(e),r=0;r=t.length?r(new Wt(a,h,new Bt(void 0,e[h]))):zt(e[h],t[h],r,n,a,h,s);for(;h=0?(zt(e[o],t[o],r,n,a,o,s),f=Kt(f,c)):zt(e[o],void 0,r,n,a,o,s)})),f.forEach((function(e){zt(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 Ft(a,e,t)))}function Jt(e,t,r,n){return n=n||[],zt(e,t,(function(e){e&&n.push(e)}),r),n.length?n:void 0}function Yt(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,RESET_SOCKET:()=>({})}),Jr=rr("CONNECT_TO_MEDIA_STREAM"),Yr=rr("RECEIVE_PAYLOAD_FROM_MEDIA_SDK"),{setAudioEncodeStatus:Xr,setAudioDecodeStatus:Zr,setVideoEncodeStatus:Qr,setVideoDecodeStatus:$r,setSharingEncodeStatus:en,setSharingDecodeStatus:tn,setMediaConstraints:rn,resetMedia:nn}=Ir("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","RESET_MEDIA");function on(e,t,...r){return e(Ut.of(...r||[]),t,null)}function sn(...e){const t=(...t)=>qe(...e.map(e=>{const r=e(...t);if(!r)throw new TypeError(`combineEpics: one of the provided Epics "${e.name||""}" does not return a stream. Double check you're not missing a return statement!`);return r.pipe(nt((e,t)=>(setTimeout(()=>{throw e},0),t)))}));try{Object.defineProperty(t,"name",{value:`combineEpics(${e.map(e=>e.name||"").join(", ")})`})}catch(e){}return t}function an(...e){return sn(...e.flatMap(e=>Object.values(e)))}function cn(e,t){return e.pipe(Mt(""+Ur),Je(e=>e.payload.evt===t))}function dn(e,t){return e.pipe(Mt(""+Lr),Je(e=>e.payload.event===t))}function un(e,t){return e.pipe(Mt(""+Ur,""+xr),Je(e=>e.payload.evt===t))}function ln(e,t){return e.pipe(Mt(""+Yr),Je(e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t))}var pn="undefined"!=typeof window&&window,hn="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,_n="undefined"!=typeof global&&global,fn=pn||_n||hn;function vn(e,t){return void 0===t&&(t=null),new In({method:"GET",url:e,headers:t})}function En(e,t,r){return new In({method:"POST",url:e,body:t,headers:r})}function yn(e,t){return new In({method:"DELETE",url:e,headers:t})}function gn(e,t,r){return new In({method:"PUT",url:e,body:t,headers:r})}function Sn(e,t,r){return new In({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!fn)throw new Error("RxJS could not find any global context (window, self, global)")}();var bn=Ae((function(e,t){return e.response}));function mn(e,t){return bn(new In({method:"GET",url:e,responseType:"json",headers:t}))}var In=function(e){function t(t){var r=e.call(this)||this,n={async:!0,createXHR:function(){return this.crossDomain?function(){if(fn.XMLHttpRequest)return new fn.XMLHttpRequest;if(fn.XDomainRequest)return new fn.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(fn.XMLHttpRequest)return new fn.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 fn.ActiveXObject(e))break}catch(e){}return new fn.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 m(t,e),t.prototype._subscribe=function(e){return new An(e,this.request)},t.create=((r=function(e){return new t(e)}).get=vn,r.post=En,r.delete=yn,r.put=gn,r.patch=Sn,r.getJSON=mn,r),t}(x),An=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")||fn.FormData&&r.body instanceof fn.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 m(t,e),t.prototype.next=function(e){this.done=!0;var t,r=this.xhr,n=this.request,o=this.destination;try{t=new On(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(fn.FormData&&e instanceof fn.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 wn(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)},fn.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 Cn("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 Cn("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}(k),On=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=Tn(this.responseType,t)},Cn=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=Tn(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function Tn(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 wn=function(e,t){return Cn.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},Rn=In.create;const Nn={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 Password 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."}},Dn=Nn.default;let Pn,Mn,kn;function Un(e,t){return t in Dn?Dn[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"}(Pn||(Pn={})),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"}(Mn||(Mn={})),function(e){e[e.LEAVESUBREASON_WAITINGROOMFAILOVER=1]="LEAVESUBREASON_WAITINGROOMFAILOVER"}(kn||(kn={}));const Vn={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},Ln={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"},jn={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}},Hn={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 xn(e,t){return Object.keys(e).find(r=>e[r]===t)}let Fn;function Gn(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(Fn)o=Fn;else{const e=Object.keys(jn[3e3]);n.forEach(t=>{const r=function(e){return"en-US"===e&&(e="default"),Nn[e]||Nn.default}(t);o[t]={},e.forEach(e=>{o[t][e]=r[e]})}),Fn=o}return n.forEach(n=>{if(r)return;const i=xn(o[n],t);i&&(r={key:i,value:jn[e][i]})}),r||(r={key:"apac.errorcodes_fail",value:200}),r}if(200===e){const n=xn({"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:jn[e][n]}:{key:"apac.errorcodes_fail",value:200},r}if(void 0!==jn[e]){const t=jn[e],n=Object.keys(t)[0];r={key:n,value:t[n]}}if(r)return r;const n=xn(Vn,e),o=Ln[n];return o?{key:o,value:e}:{key:"apac.errorcodes_fail",value:200}}(e,t),o=Un(r,r);return r!==o?{reason:o,errorCode:n}:{reason:Dn[r],errorCode:n}}function Bn(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==Hn[r]){const e=Hn[r],n=Object.keys(e)[0];t={key:n,value:e[n]}}if(t){const{key:r,value:n}=t,o=Un(r,r);return r!==o?Object.assign({},e,{reason:o,errorCode:n}):Object.assign({},e,{reason:Dn[r],errorCode:n})}const n=Gn(r);return Object.assign({},e,{reason:n.reason,errorCode:n.errorCode})}var Wn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Kn(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 qn=Kn((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,E=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))}},y=function(e){return e.replace(v,E)},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("")},S=t.atob&&"function"==typeof t.atob?function(e){return t.atob(e)}:function(e){return e.replace(/\S{1,4}/g,g)},b=function(e){return S(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},m=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},I=function(e){return function(e){return y(S(e))}(m(e))};t.Uint8Array&&(f=function(e){return Uint8Array.from(b(m(e)),(function(e){return e.charCodeAt(0)}))});if(t.Base64={VERSION:"2.6.3",atob:b,btoa:l,fromBase64:I,toBase64:_,utob:d,encode:_,encodeURI:function(e){return _(e,!0)},btou:y,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:Wn)}));function zn(e){return qn.Base64.encode(e,!0)}function Jn(e){return qn.Base64.decode(e)}const Yn={"-":"+",_:"/",".":"="};function Xn(e){const t=e.replace(/[-_.]/g,e=>Yn[e]);return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const Zn=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount"],Qn={bChime:"bAllowPlayChimeForEnterOrExit",topic:e=>({meetingTopic:Jn(e)})},$n=rr("GET_MEETING_INFO"),eo=rr("GET_INSTANT_MEETING_INFO"),to=(rr("LOGON_ZOOM_DOMAIN"),rr("VERIFY_ZOOM_RECAPTCHA"),rr("LOGON_THIRD_PARTY_DOMAIN"),rr("PING_RWC_SERVER")),ro=rr("MEETING_FAILOVER"),no=rr("LEAVE_MEETING"),oo=rr("END_MEETING"),{setMeetingInfo:io,setWindownOpen:so,setAppidSignature:ao,setZak:co,setTkMtkguid:uo,setPingRwcTimestamp:lo,setInMeetingInfo:po,setMeetingAttribute:ho,resetMeeting:_o,setIsHost:fo,setIsCohost:vo,setMeetingIsOnHold:Eo,setIsMeetingReset:yo,setAudioVideoBeforeOnHold:go,setCurrentUserAudioBeforeReset:So,setIsCurrentUserMutedBeforeReset:bo,setMeetingStatus:mo,setMeetingRegion:Io,setIsCurrentUserStartVideoBeforeReset:Ao,setJoinMeetingTimeStamp:Oo,setIsEnableQos:Co}=(rr("REGISTER_WEBINAR"),Ir({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(Zn.some(t=>e&&void 0!==e[t])){let t=e;return Object.keys(Qn).some(t=>void 0!==e[t])&&(t=Object.keys(e).reduce((t,r)=>{const n=Qn[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}));function To(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 wo,Ro,No,Do,Po,Mo;!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"}(wo||(wo={})),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"}(Ro||(Ro={})),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"}(No||(No={})),function(e){e.CDN="CDN",e.Global="Global",e.CN="CN"}(Do||(Do={})),function(e){e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed"}(Po||(Po={})),function(e){e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory"}(Mo||(Mo={}));const ko=zn("{}");class Uo{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=zn("zoom-storage-"+e),this.localStorageKey=zn("zoom-local-storage"),this.memoryCache={},this.sessionCache=JSON.parse(Jn(sessionStorage.getItem(this.sessionStorageKey)||ko)),this.localCache=JSON.parse(Jn(localStorage.getItem(this.localStorageKey)||ko))}static init(e){this.instance=new Uo(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:Mo.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:Mo.LocalStorage}:{value:this.memoryCache[e],type:Mo.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case Mo.SessionStorage:{const r=this.sessionCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.sessionCache[e]=n,this.flushValue(Mo.SessionStorage)),n}case Mo.LocalStorage:{const r=this.localCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.localCache[e]=n,this.flushValue(Mo.LocalStorage)),n}case Mo.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 Mo.SessionStorage:delete this.sessionCache[e],this.flushValue(Mo.SessionStorage);break;case Mo.LocalStorage:delete this.localCache[e],this.flushValue(Mo.LocalStorage);break;case Mo.Memory:delete this.memoryCache[e]}}flushValue(e){e===Mo.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,zn(JSON.stringify(this.sessionCache))):e===Mo.LocalStorage&&localStorage.setItem(this.localStorageKey,zn(JSON.stringify(this.localCache)))}}function Vo(){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 "+(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 Lo(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}function jo(){return"object"==typeof WebAssembly&&"function"==typeof Worker}Uo.instance=void 0;const Ho=()=>"function"==typeof AudioWorklet,xo=()=>Lo(),Fo=()=>!Lo()&&!jo(),Go=()=>/arm/i.test(navigator.userAgent),Bo=()=>/\bCrOS\b/.test(navigator.userAgent),Wo=()=>Bo()&&Go(),Ko=()=>!navigator||!navigator.hardwareConcurrency||Wo()&&navigator.hardwareConcurrency<=4||Bo()&&!Go()&&navigator.hardwareConcurrency<4||/\bCrKey\b/.test(navigator.userAgent)||"function"!=typeof OffscreenCanvas||"function"!=typeof requestAnimationFrame||"function"!=typeof SharedArrayBuffer?1:(Wo()&&navigator.hardwareConcurrency>4||Bo()&&!Go()&&navigator.hardwareConcurrency,9);let qo,zo;!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"}(qo||(qo={})),function(e){e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM"}(zo||(zo={}));const Jo=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 Yo,Xo;!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"}(Yo||(Yo={})),(Xo||(Xo={})).WebclientDeviceId="WEBCLIENT_DEVICE_ID";const Zo=(window.crypto||window.msCrypto).subtle,Qo=Yo.WebclientIVState,$o=Object.keys(Jo).map(e=>Jo[e].sessionType);class ei{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),Uo.set(Qo,{},Mo.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new ei(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(Lo()||!jo())&&r===zo.AES_GCM,this.gcmSessionKey=Xn(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=Xn(t);return i.set(s,0),i.set(o,s.length),i=i.subarray(0,s.length+4),Zo.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!0,["sign"]).then(e=>Zo.sign({name:"HMAC"},e,i)).then(e=>Zo.importKey("raw",e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))}getNextIV(e){const t=Uo.get(Qo);return void 0===t[e]?(t[e]=0,Uo.set(Qo,t,Mo.SessionStorage)):Uo.set(Qo,t=>d(d({},t),{},{[e]:t[e]+1}),Mo.SessionStorage)}resetIVState(){const e=Uo.get(Qo);if(void 0===e);else{const t=Object.keys(e).filter(e=>$o.indexOf(e)>-1);t.length>0&&(t.forEach(t=>{e[t]+=1e6}),Uo.set(Qo,e,Mo.SessionStorage))}}static resetIV(){if(void 0===this.instance)throw new Error("reset before intialize");this.instance.resetIVState()}static beginEncrypt({text:e,type:t}){const r=new Uint8Array(0);if(this.instance&&this.instance.isGCMEnabled){const n=16,o=this.instance.getNextIV(t.sessionType),i=new ArrayBuffer(16),s=new Uint8Array(i);new DataView(i).setUint32(0,o,!0);let a=null;return a="BO_BROADCAST"===t.sessionType?this.instance.gcmMainSessionKey:this.instance.gcmSessionKey,this.instance.beginCrypto(a,this.instance.zoomId,t.gcmType).then(t=>{const o=(new TextEncoder).encode(e);return Zo.encrypt({name:"AES-GCM",iv:s,additionalData:r,tagLength:8*n},t,o)}).then(e=>{const t=1+s.byteLength+2+r.byteLength+4+e.byteLength,o=new ArrayBuffer(t);new Uint8Array(o)[0]=s.length,new Uint8Array(o,1,s.byteLength).set(s),new DataView(o).setUint16(1+s.byteLength,r.length,!0),new Uint8Array(o,3+s.byteLength).set(r),new DataView(o).setUint32(1+s.byteLength+2+r.byteLength,e.byteLength-n,!0),new Uint8Array(o,1+s.byteLength+2+r.byteLength+4).set(new Uint8Array(e));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(zn(e))}static beginDecrypt({decryptedText:e,type:t,zoomId:r}){if(this.instance&&this.instance.isGCMEnabled){const n=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 Zo.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:"[This is an encrypted message]",iv:i,aad:c}))}{const t=new TextDecoder("utf-8");return Promise.resolve({message:t.decode(Xn(e))})}}}let ti;ei.instance=void 0,function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(ti||(ti={}));class ri{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){return{seq:this.sendMessageToRwg({evt:4105,body:{bRecord:e}})}}expel(e){return{seq:this.sendMessageToRwg({evt:4107,body:{userId: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,t=!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,r=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:d({},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}})}}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,t){return{seq:this.sendMessageToRwg({evt:4147,body:{id:e,bOn:t}})}}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(e=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}})}}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){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:t,bCallme:r}})}}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(e=1,t,r){return{seq:this.sendMessageToRwg({evt:12289,body:{id:e,size:t,bOn:r}})}}unsubscribeVideo(e=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){return{seq:this.sendMessageToRwg({evt:16415,body:{id:e,size:t}})}}unsubscribeSharing(e){return{seq:this.sendMessageToRwg({evt:16417,seq:1,body:{id:e}})}}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){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,boOn:!1}})}}stopSharing(e){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,bOn:!0}})}}lockSharing(e){return{seq:this.sendMessageToRwg({evt:4169,body:{lockShare:e}})}}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:d({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}})}}}class ni extends ri{static createAgent(){return this.rwgInstance||(this.rwgInstance=new ni),this.rwgInstance}}ni.rwgInstance=null;class oi extends ri{static getInstance(){return this.instance||(this.instance=new oi),this.instance}}oi.instance=null;const ii=Yo.WebclientIVState;class si{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new si),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:{[qo.AUDIO_ENCODE]:Uo.get(ii)&&Uo.get(ii)[qo.AUDIO_ENCODE],[qo.VIDEO_ENCODE]:Uo.get(ii)&&Uo.get(ii)[qo.VIDEO_ENCODE],[qo.SHARING_ENCODE]:Uo.get(ii)&&Uo.get(ii)[qo.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(ni.createAgent())}}setAssetsAndConstraint(e,t){var r;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=(e=>({audioWorkerPath:e+"/js_audio_process.min.js",audioWorkletPath:e+"/js_audio_worklet.min.js",audioWasm:e+"/audio.encode.wasm",videoWorkerPath:e+"/video_s.min.js",videoMtWorkerPath:e+"/video_m.min.js",videoWasm:e+"/video.decode.wasm",videoMtWasm:e+"/video.mt.wasm",sharingWorkerPath:e+"/sharing_s.min.js",sharingMtWorkerPath:e+"/sharing_m.min.js",videoSIMDWorkerPath:e+"/video_simd.min.js",videoSIMDWasm:e+"/video.simd.wasm",sharingSIMDWorkerPath:e+"/sharing_simd.min.js",videoMSIMDWasm:e+"/video.mtsimd.wasm",sharingMSIMDWorkerPath:e+"/sharing_mtsimd.min.js",videoMSIMDWorkerPath:e+"/video_mtsimd.min.js",audioSIMDWorkletPath:e+"/audio_simd.min.js",audioSIMDWasm:e+"/audio.simd.wasm"}))(this.assetsPath),this.onMediaSDKCallback=this.onMediaSDKCallback.bind(this),null===(r=this.instance)||void 0===r||r.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){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}connect({svcUrl:e,meetingNumber:t,conId:r,e2eEncrypt:n,isViewOnly:o,currentUserId:i,isWebinar:s,enableQos:a}){var c,d,u;this.svcUrl=e,this.meetingNumber=t,this.confId=r;const l=((e,t,r)=>({videoSocketAddress:`wss://${e}/wc/media/${t}?type=v&cid=${r}`,audioSocketAddress:`wss://${e}/wc/media/${t}?type=a&cid=${r}`,sharingSocketAddress:`wss://${e}/wc/media/${t}?type=${xo()?"j":"s"}&cid=${r}`}))(e,t,r);this.mediaSocketAddress=l,this.currentUserId=i;const p=Ko();var h,_,f,v,E,y,g,S,b,m;(jo()?null===(h=this.instance)||void 0===h||h.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkletPath:null===(_=this.mediaWorkersPath)||void 0===_?void 0:_.audioWorkletPath,e2eEncrypt:n,isEnableListenInitEvent:!0}):null===(f=this.instance)||void 0===f||f.setPropsBeforeInit({callback:this.onMediaSDKCallback,e2eEncrypt:n,isEnableListenInitEvent:!0}),!0===(null===(c=this.constraints)||void 0===c?void 0:c.audio)&&jo())&&((s||Ho())&&(null===(b=this.instance)||void 0===b||b.initAudioDecode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a)),!Ho()||s&&o||null===(m=this.instance)||void 0===m||m.initAudioEncode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a));!0===(null===(d=this.constraints)||void 0===d?void 0:d.video)&&jo()&&(null===(v=this.instance)||void 0===v||v.initVideoDecode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p),s&&o||null===(E=this.instance)||void 0===E||E.initVideoEncode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p)),!0===(null===(u=this.constraints)||void 0===u?void 0:u.screen)&&(jo()?(null===(y=this.instance)||void 0===y||y.initSharingDecode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p),s&&o||null===(g=this.instance)||void 0===g||g.initSharingEncode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p)):null===(S=this.instance)||void 0===S||S.initSharingDecode(l.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;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(22,{CaptureAudio:n,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t},speakerInfo:{defaultDeviceId:r}})}leaveComputerAudio(){var e;null===(e=this.instance)||void 0===e||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,o=!1){var i;null===(i=this.instance)||void 0===i||i.Notify_MeidaSDK(2,{canvas:e,userId:t,RGBA:n,doNotClean:o,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,r=!1,n=""){var o;this.receivedSharingCanvas=t,null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(23,{width:0,height:0,ssrc:e,canvas:t,enableWaterMark:r,waterMarkText:n})}stopRenderSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(24,{})}switchSharingSource(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(36,{ssrc:e})}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,d({socketURL:"wss://"+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=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=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}(e,["dimension"]);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(27,d(d({},r),n))}startDesktopSharing(e,t,r,n=!0){var o;this.sharingCanvas=document.querySelector("#"+t),null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(30,{mode:n,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,Ko())}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})}}var ai;si.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"}(ai||(ai={}));const ci={success:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",fail:["JOIN_MEETING_FAILED"]},di={[ai.ConnectionChange]:[{event:"JOIN_MEETING_SUCCESS",payload:()=>({state:Po.Connected})},{event:"RECONNECTING_MEETING",payload:e=>d({state:Po.Reconnecting},e)},{event:"LEAVING_MEETING",payload:e=>d({state:Po.Closed},e)}],[ai.OnHoldChange]:[{event:"MEETING_IN_WAITING_ROOM",payload:e=>({isOnHold:e})}],[ai.UserAdd]:[{event:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"ADD_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[ai.UserUpdate]:[{event:"UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[ai.UserRemove]:[{event:"REMOVE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[ai.AttendeeUpdate]:[{event:"UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",payload:e=>e}]};let ui;!function(e){e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change",e.ChatDeleteMessage="chat-delete-message"}(ui||(ui={}));const li={[ui.ChatOnMessage]:[{event:"CHAT_RECEIVE_MESSAGE_EVENTS",payload:e=>e}],[ui.ChatPrivilegeChange]:[{event:"CHAT_PRIVILEGE_CHANGE",payload:e=>e}],[ui.ChatDeleteMessage]:[{event:"CHAT_DELETE_MESSAGE_REPONSE",payload:e=>e}]};let pi,hi,_i;!function(e){e.OnRecordingChange="on-recording-change",e.OnLocalRecordingChange="on-local-recording-change"}(pi||(pi={})),function(e){e.Started="Started",e.Stopped="Stopped"}(hi||(hi={})),function(e){e.Stopped="Stopped",e.Started="Started",e.Paused="Paused"}(_i||(_i={}));const fi={[pi.OnRecordingChange]:[{event:"START_RECORDING_SUCCESS",payload:()=>({state:hi.Started})},{event:"STOP_RECORDING_SUCCESS",payload:()=>({state:hi.Stopped})}],[pi.OnLocalRecordingChange]:[{event:"LOCAL_RECORDING_CHANGE",payload:e=>{const t={};return Array.isArray(e)?e.forEach(e=>{t[e.id]=e.bLocalRecordStatus}):t[e.id]=e.bLocalRecordStatus,t}}]};let vi,Ei,yi,gi;!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"}(vi||(vi={})),function(e){e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed"}(Ei||(Ei={})),function(e){e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk"}(yi||(yi={})),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"}(gi||(gi={}));const Si=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"});let bi,mi,Ii,Ai,Oi,Ci,Ti,wi,Ri,Ni,Di;!function(e){e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare"}(bi||(bi={})),function(e){e.Sharing="sharing",e.Paused="paused",e.End="ended"}(mi||(mi={})),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"}(Ii||(Ii={})),function(e){e.Active="Active",e.Inactive="Inactive"}(Ai||(Ai={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted"}(Oi||(Oi={})),function(e){e.Active="Active",e.Inactive="Inactive"}(Ci||(Ci={})),function(e){e.Success="Success",e.Failed="Failed",e.Initial="Initial"}(Ti||(Ti={})),function(e){e.Started="Started",e.Stopped="Stopped",e.Failed="Failed"}(wi||(wi={})),function(e){e.Approved="Approved",e.Rejected="Rejected"}(Ri||(Ri={})),function(e){e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture"}(Ni||(Ni={})),function(e){e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change"}(Di||(Di={}));const Pi={[Di.DeviceChange]:[{event:"MEDIA_DEVICE_CHANGE",payload:()=>({})}],[Di.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"})}]},Mi={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 ki;!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"}(ki||(ki={}));const Ui={[ki.VideoActiveChange]:[{event:"RECEIVE_VIDEO_ACTIVE_INDICATION",payload:e=>({state:e.bVideoOn?Ai.Active:Ai.Inactive,userId:e.userId})}],[ki.VideoCapturingChange]:[{event:"VIDEO_CAPTURE_START_SUCCESS",payload:()=>({state:wi.Started})},{event:"VIDEO_CAPTURE_STOP_RESULT",payload:e=>({state:(null==e?void 0:e.failed)?wi.Failed:wi.Stopped})}],[ki.VideoMutedChange]:[{event:"RECEIVE_VIDEO_MUTE_INDICATION",payload:e=>({state:e.isVideoMuted?Oi.Muted:Oi.Unmuted,userId:e.id})}],[ki.AskForStartVideoConsent]:[{event:"ASK_FOR_START_VIDEO_CONSENT",payload:e=>({state:e.isVideoMuted?Oi.Muted:Oi.Unmuted,userId:e.id})}],[ki.VideoSpotlightChange]:[{event:"VIDEO_SPOTLIGHT_CHANGE",payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map(e=>({userId:e}))})}],[ki.VideoDimensionChange]:[{event:"RECEIVE_VIDEO_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[ki.VideoFollowHostOrder]:[{event:"VIDEO_FOLLOW_HOST_ORDER_CHANGE",payload:e=>({isFollowHostOrder:e.bOn})}],[ki.VideoHostLayoutChange]:[{event:"VIDEO_HOST_DRAG_LAYOUT_CHANGE",payload:e=>Array.isArray(e.layout)?e.layout.map(e=>({userId:e})):[]}],[ki.PeerVideoStateChange]:[{event:"VIDEO_NEW_USER_START",payload:e=>d({action:"Start"},e)},{event:"VIDEO_OLD_USER_STOP",payload:e=>d({action:"Stop"},e)}]};let Vi;!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"}(Vi||(Vi={}));const Li={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"}},ji={[Vi.ActiveSpeaker]:[{event:"AUDIO_ACTIVE_SPEAKER",payload:e=>e}],[Vi.UnmuteAudioConsent]:[{event:"AUDIO_UNMUTE_CONSENT",payload:e=>({reason:e})}],[Vi.CurrentAudioChange]:[{event:"AUDIO_CURRENT_USER_JOIN_BY_PHONE",payload:()=>({action:"join",type:"phone"})},{event:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",payload:()=>({action:"join",type:"computer"})},{event:"AUDIO_CURRENT_USER_LEAVE_AUDIO",payload:()=>({action:"leave"})},{event:"AUDIO_CURRENT_USER_MUTED",payload:({source:e})=>({action:"muted",source:e})},{event:"AUDIO_CURRENT_USER_UNMUTED",payload:({source:e})=>({action:"unmuted",source:e})}],[Vi.DialoutStateChange]:[{event:"AUDIO_DIALOUT_RESULT_CODE",payload:e=>e}],[Vi.MergeAudio]:[{event:"AUDIO_MERGE_AUDIO_INDICATION",payload:e=>e}],[Vi.AutoPlayFailed]:[{event:"AUDIO_AUTO_PLAY_FAILED",payload:()=>{}}]};let Hi;!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"}(Hi||(Hi={}));const xi={[Hi.ShareActiveChange]:[{event:"SHARE_ACTIVE_INDICATION",payload:e=>({state:e.isActive?"Active":"Inactive",userId:e.activeUserId})}],[Hi.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})}],[Hi.SharePassiveStop]:[{event:"SHARE_VIDEO_STREAMS_END",payload:()=>({reason:Ni.StopScreenCapture})},{event:"SHARE_PASSIVE_STOP_SHARE",payload:()=>({reason:Ni.PrivilegeChange})}],[Hi.SharePeerStateChange]:[{event:"SHARE_NEW_USER_ADD",payload:e=>({userId:e.id,action:"Start"})},{event:"SHARE_USER_REMOVE",payload:e=>({userId:e.id,action:"Stop"})}],[Hi.ShareContentChange]:[{event:"SHARE_AUTO_CHANGE_SOURCE",payload:e=>e}],[Hi.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?Ri.Approved:Ri.Rejected})}],[Hi.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[Hi.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[Hi.SharePrivilegeChange]:[{event:"SHARE_PRIVILEGE_CHANGE",payload:e=>({privilege:e})}]},Fi="INVALID_OPERATION",Gi="INVALID_PARAMETERS";let Bi;!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"}(Bi||(Bi={}));const Wi={[Bi.InviteToJoin]:[{event:"BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",payload:e=>e}],[Bi.RoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_COUTDOWN",payload:e=>e}],[Bi.RoomTimeUp]:[{event:"BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",payload:e=>e}],[Bi.ClosingRoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",payload:e=>e}],[Bi.BroadcastMessage]:[{event:"BREAKOUT_ROOM_BROADCAST_MESSAGE",payload:e=>e}],[Bi.AskForHelp]:[{event:"BREAKOUT_ROOM_ASK_HELP_REQUEST",payload:e=>e}],[Bi.AskForHelpResponse]:[{event:"BREAKOUT_ROOM_ASK_HELP_RESPONSE",payload:e=>e}],[Bi.RoomStateChange]:[{event:"BREAKOUT_ROOM_ATTRIBUTE_INDICATION",payload:e=>({status:e.controlStatus})}],[Bi.MainSessionUserUpdate]:[{event:"BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE",payload:()=>({})}]},Ki=d(d(d(d(d(d(d(d(d(d({},di),{"closed-caption-message":[{event:"CC_RECEIVE_MESSAGE",payload:e=>e}]}),li),fi),ji),Ui),{"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}]}),xi),Pi),Wi),qi=(zi=zi||Object.create(null),{on:function(e,t){(zi[e]||(zi[e]=[])).push(t)},off:function(e,t){zi[e]&&zi[e].splice(zi[e].indexOf(t)>>>0,1)},emit:function(e,t){(zi[e]||[]).slice().map((function(e){e(t)})),(zi["*"]||[]).slice().map((function(r){r(e,t)}))}});var zi;const Ji=new Map,Yi=new Array,Xi=(e,t)=>{qi.emit(e,t)},Zi=e=>new Promise((t,r)=>{e.fail&&e.fail.length>0?Qe(Be(qi,e.success).pipe(ut(1)),qe(...e.fail.map(e=>Be(qi,e).pipe(ut(1),Ue(t=>ae({type:e,payload:t})))))).subscribe(e=>t(e),e=>{"object"==typeof e.payload?r(d({type:e.type},e.payload)):void 0===e.payload?r({type:e.type}):r(e)}):Be(qi,e.success).pipe(ut(1)).subscribe(e=>t(e))}),Qi=(e,t,r=1e4)=>new Promise((n,o)=>{let i=$;"string"==typeof e?i=Be(qi,e).pipe(ut(1)):(i=Be(qi,e.event),e.operations&&(i=e.operations.reduce((e,t)=>e.pipe(t),i))),Qe(i,tt(r).pipe(vt(ae("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"})})}),$i=(e,t)=>void 0!==t?Be(qi,e).pipe(ut(t)):Be(qi,e),es=()=>{Yi.forEach(e=>{e.unsubscribe()}),Yi.length=0,Ji.clear()},{setAttendeesList:ts,setXmppAttendeeList:rs,setIsAdmitAllSilentUsers:ns,resetParticipants:os,addFailoverAttendees:is,removeFailoverAttendees:ss,setClearRaiseHand:as,setClearAttendeeFeedback:cs}=Ir({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:()=>({})});function ds(e,t){return e===t}function us(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:ds,r=null,n=null;return function(){return us(t,r,arguments)||(n=e.apply(null,arguments)),r=arguments,n}}));const hs=({participants:{attendeesList:e}})=>e;let _s,fs,vs;!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"}(_s||(_s={})),function(e){e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee"}(fs||(fs={})),function(e){e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323"}(vs||(vs={}));const Es=e=>(e&vs.Phone)===vs.Phone,ys=e=>e===_s.ViewOnlyCanTalk,gs=e=>(e&_s.ViewOnly)===_s.ViewOnly;let Ss,bs,ms,Is,As,Os;!function(e){e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually"}(Ss||(Ss={})),function(e){e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(bs||(bs={})),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"}(ms||(ms={})),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"}(Is||(Is={})),function(e){e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO"}(As||(As={})),function(e){e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom"}(Os||(Os={}));const Cs=ps([({meeting:{userId:e}})=>e,hs],(e,t)=>t.find(t=>t.userId===e)),Ts=ps([Cs],e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost)),ws=ps([Cs],e=>null==e?void 0:e.isHost),Rs=ps([({participants:{xmppAttendeeList:e}})=>e],e=>e.filter(e=>e.userRole===fs.Attendee)),Ns=ps([hs],e=>e.filter(e=>e.bHold&&!e.bid)),Ds=ps([hs,({breakoutRoom:e})=>e&&e.controlStatus,({breakoutRoom:e})=>e&&e.currentRoom.status],(e,t,r)=>t!==bs.InProgress&&t!==bs.Closing||r!==Is.InRoom?e.filter(e=>!e.bHold&&!e.bid):e.filter(e=>!e.bHold)),Ps=ps([Ds],e=>e.find(e=>e.isHost)),Ms=ps([Ds],e=>e.filter(e=>e.bCoHost));let ks;!function(e){e.Closed="closed",e.Connecting="connecting",e.Connected="connected"}(ks||(ks={}));const{setAsnIds:Us,setIsCanUnmute:Vs,setDialoutSequence:Ls,setDialoutResultCode:js,setIsAllowToTalk:Hs,setIsHostMuteAll:xs,setIsActiveOperation:Fs,setAudioSsrc:Gs,setIsMutedUponEntry:Bs,setIsUserGrantCaptureAudio:Ws,setIsMicrophoneForbidden:Ks,setWebrtcRestartCount:qs,setMicrophoneList:zs,setSpeakerList:Js,setActiveMicrophone:Ys,setActiveSpeaker:Xs,setCanPlayAudio:Zs,resetAudio:Qs,setIsComputerAudioLoading:$s}=Ir("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"),{setSharePrivilege:ea,setShareActiveNode:ta,setIsReceiveSharing:ra,setIsChromeExtensionInstalled:na,setIsScreenShareForbidden:oa,setShareDimension:ia,setShareStatus:sa,setShareSsrc:aa,setShareQuality:ca,setReceivedShareDimension:da,setIsRemoteControlApproved:ua,setIsGrabRemoteControl:la,setIsVerifiedSharingRenderCanvasAfterFailover:pa,setIsVerifiedSharingCaptureCanvasAfterFailover:ha,setIsSdkGrabControl:_a,resetShare:fa}=Ir("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","RESET_SHARE"),{setVideoSsrc:va,setActiveVideoId:Ea,setCameraList:ya,setActiveCamera:ga,setIsCurrentUserStartedVideo:Sa,setSpotlightVideo:ba,setIsCaptureForbidden:ma,setVideoMaxQuality:Ia,setCaptureCanvasList:Aa,setIsVideoMuted:Oa,setIsCaptureCameraLoading:Ca,setIsCameraTaken:Ta,setIsVerifiedVideoRenderCanvasAfterFailover:wa,setIsVerifiedVideoCaptureCanvasAfterFailover:Ra,resetVideo:Na,setReceivedVideoDimension:Da,addSubscribedVideoId:Pa,removeSubscribedVideoId:Ma,setIsFollowHostVideoLayout:ka,setHostDragLayout:Ua,addRenderedVideoId:Va,removeRenderedVideoId:La,setIsSupportHdVideo:ja,setHighDefinitionVideoId:Ha}=Ir("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"),{setTempSetting:xa,setSetting:Fa,setQuestionList:Ga,setQuestionUpVoted:Ba,resetQa:Wa}=Ir("SET_TEMP_SETTING","SET_SETTING","SET_QUESTION_LIST","SET_QUESTION_UP_VOTED","SET_SELF_LIVE_ANSWER","RESET_QA"),{setChatPrivilege:Ka,addChatMessageHistory:qa,resetChat:za,setIsAllowAttendeeChat:Ja,setLatestChatMessageId:Ya,removeChatMessage:Xa}=Ir("SET_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT","SET_LATEST_CHAT_MESSAGE_ID","REMOVE_CHAT_MESSAGE"),{setCcEditorInfo:Za,setTempSendCcText:Qa,setTempReceiveCcText:$a,setGatewayInfoList:ec,resetClosedCaption:tc}=Ir("SET_CC_EDITOR_INFO","SET_TEMP_SEND_CC_TEXT","SET_TEMP_RECEIVE_CC_TEXT","SET_GATEWAY_INFO_LIST","RESET_CLOSED_CAPTION"),{addBreakoutRooms:rc,setBreakoutRoomAllocationPattern:nc,setBreakoutRoomSequenceId:oc,setMeetingElapsedTime:ic,setStartRoomElapsedTime:sc,setBreakoutRoomOptions:ac,setBreakoutRoomControlStatus:cc,setBreakoutRooms:dc,setCurrentBreakoutRoom:uc,setBreakoutRoomAttendeeStatus:lc,setBreakoutRoomConfId:pc,setBreakoutRoomToken:hc,resetBreakoutRoom:_c,setBreakoutRoomClosingRoomTime:fc,setBreakoutRoomBroadcastMessage:vc,setBreakoutRoomHostReplyType:Ec,setBreakoutRoomHostReplyRequestId:yc,setMainSessionAttendeeList:gc,setIsHugeBreakoutRoom:Sc,setBreakoutRoomUpdatedUserRoleCount:bc,setBreakoutRoomPreAssignedRoomList:mc}=Ir("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"),Ic=(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}}=e,{lang:l,password:p,topic:h,zlk:_,cv:f,userName:v}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:n,auth:o,passWord:p,trackAuth:i,customerKey:d,encryptedRWC:JSON.parse(c||"{}"),meetingOptions:JSON.parse(u||"{}"),topic:h,userName:Uo.get(Yo.WebclientUserName)||v,cv:f,zlkJwtToken:_,lang:l}}return e},Ac=(e,t,r,n,o,i)=>{const s={ts:n,auth:o,rwcToken:r,dmz:1};return i&&Object.assign(s,{confID:i}),`https://${e}/wc/ping/${t}?${new URLSearchParams(s).toString()}`},Oc=(e,t=!1)=>{const{socket:{zoomSocketStatus:r,xmppSocketStatus:n,mainSessionSocketStatus:o},meeting:{meetingStatus:i}}=e,s=[mo("closed")];if("joined"===i){const t=si.getInstance(),r=ni.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||(Uo.clearSession(),sessionStorage.clear(),ei.destroy()),r!==ks.Closed&&s.push(Pr()),n!==ks.Closed&&s.push(Mr()),o!==ks.Closed&&s.push(Hr()),t){const t=Cs(e);s.push(_o({audio:null==t?void 0:t.audio,muted:null==t?void 0:t.muted,video:null==t?void 0:t.bVideoOn}))}else s.push(_o({audio:!1,muted:void 0,video:!1}));return s.push(zr(),nn(),os(),Qs(),fa(),Na(),Wa(),za(),tc(),_c()),s},Cc=(e,...t)=>Qi({event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",operations:[Ae(t=>t.find(t=>t.userId===e)),Je(e=>!!e),ut(1)]},...t);function Tc(e){return j(Ae((t,r)=>e(t,r)),Je(e=>null!=e))}function wc(e){return j(Ue((t,r)=>e(t,r)||$))}function Rc(e){return j(bt((t,r)=>e(t,r)||$))}const Nc={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},Dc={7937:()=>({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 Pc(e=Nc){return t=>new x(r=>{const n=new Map;let o=0,i=null;const{period:s,rules:a}=e;let c=null;i||(i=((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}})(()=>{o=0},s));const d=Object.keys(Dc),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=Dc[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=Dc[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}})}ps([Ds,({share:{isReceiveSharing:e}})=>e,({share:{activeNodeId:e}})=>e],(e=[],t,r)=>t?e.find(e=>e.userId===r&&!0===e.sharerOn):null);const Mc=ps([Ds],e=>e.filter(e=>e.sharerOn)),kc=ni.createAgent();var Uc=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>cn(e,7938).pipe(Je(e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.lockShare)}),Tt(t),At(([e,t])=>{const{share:{sharePrivilege:r}}=t,{payload:{body:{lockShare:n}}}=e;r!==n&&Xi("SHARE_PRIVILEGE_CHANGE",n)}),Ae(([e])=>ea(e.payload.body.lockShare))),shareSSrcEpic:e=>cn(e,20227).pipe(Ae(e=>aa(e.payload.body.ssrc))),shareStatusChangeEpic:(e,t)=>cn(e,20225).pipe(Tt(t),Ae(([e,t])=>{const{share:{isReceiveSharing:r,activeNodeId:n,shareQuality:o}}=t,{payload:{body:i}}=e;return r&&1===i.bStatus?(kc.unsubscribeSharing(n),kc.subscribeSharing(i.activeNodeID,o),si.getInstance().switchSharingSource(i.ssrc),Xi("SHARE_AUTO_CHANGE_SOURCE",{userId:i.activeNodeID})):1===i.bStatus?Xi("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!0}):r&&Xi("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!1}),ta(i)})),handleChromeExtensionEpic:e=>ln(e,vi.CheckChromeSharingExtensionResponse).pipe(Ae(e=>(Xi("SHARE_CHECK_CHROME_SHARING_EXTENSION",e.payload.data),na(e.payload.data)))),handleSDKShareSuccessEpic:(e,t)=>ln(e,vi.DesktopSharingCaptureSuccess).pipe(Tt(t),Ae(([,e])=>{const{meeting:{userId:t}}=e;return kc.startSharing(t),oa(!1)})),handleSDKShareErrorEpic:e=>ln(e,[vi.DesktopSharingError,vi.DesktopSharingChromeExtensionUninstalled,vi.DesktopSharingPermissionDenied,vi.DesktopSharingSystemError]).pipe(Tc(e=>{if([vi.DesktopSharingPermissionDenied,vi.DesktopSharingSystemError].includes(e.payload.type))return oa(!0);Xi("SHARE_START_DESKTOP_SHARE_FAILED",{reason:""})})),handleSDKShareDimensionChangeEpic:e=>ln(e,vi.CurrentDesktopSharingWidthHeight).pipe(Je(e=>!!e.payload.data),Ae(e=>{Xi("SHARE_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return si.getInstance().ajustmentSharingCanvas(t,r),ia(e.payload.data)})),handleSDKReceivedShareSizeChangeEpic:(e,t)=>ln(e,vi.SharingDecodeMaxSize).pipe(Je(e=>!!e.payload.data),Tt(t),Tc(([e,t])=>{const{share:{shareQuality:r,activeNodeId:n}}=t,{payload:{data:{size:o}}}=e,i=Number(o);if(r!==i)return kc.subscribeSharing(n,i),ca(i)})),handleRWGShareOriginalDimensionEpic:e=>cn(e,20226).pipe(At(e=>{Xi("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.body);const{payload:{body:{width:t,height:r}}}=e;si.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Ae(e=>da(e.payload.body))),handleSDKShareOriginalDimensionEpic:e=>ln(e,vi.SharingPara).pipe(At(e=>{Xi("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;si.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Ae(e=>da(e.payload.data))),handleSDKStopShareEpic:(e,t)=>ln(e,vi.UserStopDesktopSharing).pipe(Tt(t),Ae(([,e])=>{const{meeting:{userId:t},share:{status:r}}=e;return r!==mi.End&&(kc.stopSharing(t),Xi("SHARE_VIDEO_STREAMS_END")),sa(mi.End)})),handleRWGCurrentUserShareChangeEpic:(e,t)=>cn(e,7937).pipe(Tt(t),Je(([e,t])=>{const{meeting:{userId:r}}=t,n=e.payload.body.update;return n&&n.length>0&&n.findIndex(e=>e.id===r&&void 0!==e.bShareOn)>-1}),Ue(([e,t])=>{const{meeting:{userId:r},share:{status:n,isReceiveSharing:o,activeNodeId:i}}=t,{payload:{body:{update:s}}}=e,a=s.find(e=>e.id===r&&!1===e.bShareOn),c=s.find(e=>e.id===r&&!0===e.bShareOn),d=[],u=si.getInstance();return a&&n!==mi.End&&(kc.stopSharing(r),u.stopDesktopSharing(),d.push(sa(mi.End)),Xi("SHARE_PASSIVE_STOP_SHARE")),c&&n===mi.End&&(o&&(u.stopRenderSharing(),kc.unsubscribeSharing(i),d.push(ra(!1))),d.push(sa(mi.Sharing))),ke(d)})),handleMultipleShareChangeEpic:(e,t)=>cn(e,7937).pipe(Tt(t),Je(([e,t])=>{const{meeting:{userId:r}}=t,n=e.payload.body.update;return n&&n.length>0&&n.findIndex(e=>e.id!==r&&void 0!==e.bShareOn)>-1}),wc(([t,r])=>{const{payload:{body:{update:n}}}=t,{share:{activeNodeId:o,isReceiveSharing:i,shareQuality:s}}=r,a=Mc(r),c=n.filter(e=>!0===e.bShareOn&&!1===e.bSharePause),d=n.filter(e=>!1===e.bShareOn);if(c.length>0&&c.forEach(e=>{-1===a.findIndex(t=>t.userId===e.id)&&Xi("SHARE_NEW_USER_ADD",e)}),d.length>0&&(d.forEach(e=>{Xi("SHARE_USER_REMOVE",e)}),i&&d.some(e=>e.id===o)))return Qe(cn(e,20225).pipe(ut(1),vt($)),tt(50).pipe(vt(ae("timeout")))).pipe(nt(()=>{const e=a.filter(e=>e.userId!==o);if(e.length>0){const t=e[0],{userId:r}=t;return kc.unsubscribeSharing(o),kc.subscribeSharing(r,s),si.getInstance().switchSharingSource(r),Xi("SHARE_AUTO_CHANGE_SOURCE",{userId:r}),se(ta({activeNodeID:r,bStatus:1,ssrc:r}))}return $}))})),handleRequestRemoteControlEpic:(e,t)=>cn(e,16391).pipe(Tt(t),Je(([e,t])=>{const{meeting:{userId:r}}=t;return e.payload.body.id===r}),Ae(([e])=>{const{payload:{body:{bOn:t}}}=e;return Xi("SHARE_REMOTE_CONTROL_APPROVE",t),ua(t)})),handleGrabRemoteControlEpic:(e,t)=>cn(e,16395).pipe(Tt(t),Je(([e,t])=>e.payload.body.id===t.meeting.userId),Ae(([e])=>{const{payload:{body:{bOn:t}}}=e;return si.getInstance().updateRemoteControlProperties({isControllerNow:t}),Xi("SHARE_GRAB_REMOTE_CONTROL_CHANGE",t),la(t)})),handleSDKRemoteControlEpic:e=>ln(e,[vi.StartRemoteControlSuccess,vi.StartRemoteControlFailed,vi.CancelRemoteControlSuccess]).pipe(Tc(e=>e.payload.type===vi.StartRemoteControlSuccess?(Xi("SHARE_REMOTE_CONTROL_SUCCESS"),_a(!0)):e.payload.type===vi.CancelRemoteControlSuccess?_a(!1):void(e.payload.type===vi.StartRemoteControlFailed&&Xi("SHARE_REMOTE_CONTROL_FAILED")))),handleRemoteControlClipboardEpic:e=>ln(e,[vi.RemoteControlCopiedTextNotify,vi.RemoteControlPasteTextLengthOverflow]).pipe(At(e=>{if(e.payload.type===vi.RemoteControlCopiedTextNotify){const{payload:{data:t}}=e;Xi("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{content:t.data,x:t.x,y:t.y})}else Xi("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{error:"length of pasted text is too long"})}),vt($))});function Vc(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:Bc(e)?2:Wc(e)?3:0}function Fc(e,t){return 2===xc(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Gc(e,t,r){var n=xc(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function Bc(e){return vd&&e instanceof Map}function Wc(e){return Ed&&e instanceof Set}function Kc(e){return e.o||e.t}function qc(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ad(e);delete t[bd];for(var r=Id(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=Jc),Object.freeze(e),t&&Hc(e,(function(e,t){return zc(t,!0)}),!0)),e}function Jc(){Vc(2)}function Yc(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Xc(e){var t=Od[e];return t||Vc(18,e),t}function Zc(){return _d}function Qc(e,t){t&&(Xc("Patches"),e.u=[],e.s=[],e.v=t)}function $c(e){ed(e),e.p.forEach(rd),e.p=null}function ed(e){e===_d&&(_d=e.l)}function td(e){return _d={p:[],l:_d,h:e,m:!0,_:0}}function rd(e){var t=e[bd];0===t.i||1===t.i?t.j():t.g=!0}function nd(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.O||Xc("ES5").S(t,e,n),n?(r[bd].P&&($c(t),Vc(4)),jc(e)&&(e=od(t,e),t.l||sd(t,e)),t.u&&Xc("Patches").M(r[bd],e,t.u,t.s)):e=od(t,r,[]),$c(t),t.u&&t.v(t.u,t.s),e!==gd?e:void 0}function od(e,t,r){if(Yc(t))return t;var n=t[bd];if(!n)return Hc(t,(function(o,i){return id(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return sd(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=qc(n.k):n.o;Hc(3===n.i?new Set(o):o,(function(t,i){return id(e,n,o,t,i,r)})),sd(e,o,!1),r&&e.u&&Xc("Patches").R(n,r,e.u,e.s)}return n.o}function id(e,t,r,n,o,i){if(Lc(o)){var s=od(e,o,i&&t&&3!==t.i&&!Fc(t.D,n)?i.concat(n):void 0);if(Gc(r,n,s),!Lc(s))return;e.m=!1}if(jc(o)&&!Yc(o)){if(!e.h.F&&e._<1)return;od(e,o),t&&t.A.l||sd(e,o)}}function sd(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&zc(t,r)}function ad(e,t){var r=e[bd];return(r?Kc(r):e)[t]}function cd(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 dd(e){e.P||(e.P=!0,e.l&&dd(e.l))}function ud(e){e.o||(e.o=qc(e.t))}function ld(e,t,r){var n=Bc(t)?Xc("MapSet").N(t,r):Wc(t)?Xc("MapSet").T(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:Zc(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=Cd;r&&(o=[n],i=Td);var s=Proxy.revocable(o,i),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(t,r):Xc("ES5").J(t,r);return(r?r.A:Zc()).p.push(n),n}function pd(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return qc(e)}var hd,_d,fd="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),vd="undefined"!=typeof Map,Ed="undefined"!=typeof Set,yd="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,gd=fd?Symbol.for("immer-nothing"):((hd={})["immer-nothing"]=!0,hd),Sd=fd?Symbol.for("immer-draftable"):"__$immer_draftable",bd=fd?Symbol.for("immer-state"):"__$immer_state",md=""+Object.prototype.constructor,Id="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ad=Object.getOwnPropertyDescriptors||function(e){var t={};return Id(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Od={},Cd={get:function(e,t){if(t===bd)return e;var r=Kc(e);if(!Fc(r,t))return function(e,t,r){var n,o=cd(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||!jc(n)?n:n===ad(e.t,t)?(ud(e),e.o[t]=ld(e.A.h,n,e)):n},has:function(e,t){return t in Kc(e)},ownKeys:function(e){return Reflect.ownKeys(Kc(e))},set:function(e,t,r){var n=cd(Kc(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var o=ad(Kc(e),t),i=null==o?void 0:o[bd];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||Fc(e.t,t)))return!0;ud(e),dd(e)}return e.o[t]===r&&"number"!=typeof r||(e.o[t]=r,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==ad(e.t,t)||t in e.t?(e.D[t]=!1,ud(e),dd(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Kc(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(){Vc(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Vc(12)}},Td={};Hc(Cd,(function(e,t){Td[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Td.deleteProperty=function(e,t){return Cd.deleteProperty.call(this,e[0],t)},Td.set=function(e,t,r){return Cd.set.call(this,e[0],t,r,e[0])};var wd=new(function(){function e(e){var t=this;this.O=yd,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}}var o=Xc("Patches").$;return Lc(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(r+1))}))},e}()),Rd=wd.produce;wd.produceWithPatches.bind(wd),wd.setAutoFreeze.bind(wd),wd.setUseProxies.bind(wd),wd.applyPatches.bind(wd),wd.createDraft.bind(wd),wd.finishDraft.bind(wd);const Nd={ssrc:0,status:mi.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:bi.OnlyHost,activeNodeId:0,activeSsrc:0,shareQuality:1,isRemoteSharingActive:!1,isReceiveSharing:!1,isRemoteControlApproved:!1,isGrabRemoteControl:!1,isSDKGrabControl:!1,isChromeExtensionInstalled:!1,isScreenShareForbidden:!1},Dd=Rr({[""+ea]:Rd((e,{payload:t})=>{e.sharePrivilege=t}),[""+ta]:Rd((e,{payload:t})=>{e.isRemoteSharingActive=1===t.bStatus,e.activeNodeId=t.activeNodeID,e.activeSsrc=t.ssrc}),[""+ra]:Rd((e,{payload:t})=>{e.isReceiveSharing=t}),[""+na]:Rd((e,{payload:t})=>{e.isChromeExtensionInstalled=t}),[""+ia]:Rd((e,{payload:t})=>{e.shareDimension=d({},t)}),[""+sa]:Rd((e,{payload:t})=>{e.status=t}),[""+aa]:Rd((e,{payload:t})=>{e.ssrc=t}),[""+ca]:Rd((e,{payload:t})=>{e.shareQuality=t}),[""+da]:Rd((e,{payload:t})=>{e.receivedShareDimension=d({},t)}),[""+ua]:Rd((e,{payload:t})=>{e.isRemoteControlApproved=t}),[""+la]:Rd((e,{payload:t})=>{e.isGrabRemoteControl=t}),[""+pa]:Rd((e,{payload:t})=>{e.isVerifiedRenderCanvasAfterFailover=t}),[""+ha]:Rd((e,{payload:t})=>{e.isVerifiedCaptureCanvasAfterFailover=t}),[""+_a]:Rd((e,{payload:t})=>{e.isSDKGrabControl=t}),[""+fa]:()=>d(d({},Nd),{},{isVerifiedRenderCanvasAfterFailover:!1,isVerifiedCaptureCanvasAfterFailover:!1})},Nd),Pd=an(Uc),Md=ni.createAgent(),kd=(e,t)=>e.pipe(Mt(""+to),Tt(t),Je(([,e])=>void 0!==e.meeting.encryptedRWC),Rc(([,e])=>{const{meeting:{encryptedRWC:t,ts:r,auth:n,meetingNumber:o},breakoutRoom:i}=e;if(t)return ke(Object.keys(t).map(e=>{const s=t[e];let a=void 0;return a=i&&i.currentRoom.boConfId?Ac(e,o,s,r,n,i.currentRoom.boConfId):Ac(e,o,s,r,n),{url:a,domain:e,rwcToken:s}})).pipe(Ue(e=>Rn(e.url).pipe(Ue(t=>{let r={};return r=t.response?d(d({},t.response),{},{fromNginx:!1}):{rwg:e.domain,rwcToken:e.rwcToken,fromNginx:!0},ke([Gr(r),Nr()])}),nt(()=>$))),Et(lo(performance.now())))}));var Ud=Object.freeze({__proto__:null,pingRWCEpic:kd,joinMeetingSuccessfulEpic:(e,t)=>cn(e,4098).pipe(Tt(t),Rc(([e,t])=>{const{payload:{body:{res:r,userID:n,zoomID:o,mn:i,participantID:s,hugeBO:a,elapsed:c,disableAqos:d,meetingtoken:u}}}=e,{meeting:{pingRWCTimestamp:l,isWebinar:p,userEmail:h,userName:_,isMeetingReset:f,meetingOptions:v},media:{mediaConstraints:E,assetsPath:y},breakoutRoom:g}=t;if(Pn.CONF_SUCCESS===r){const{WebclientParticipantId:t,WebclientUserId:r,WebclientZoomId:S,WebclientUserEmail:b,WebclientUserName:m,WebclientMeetingToken:I}=Yo;Uo.set(r,n,Mo.SessionStorage),Uo.set(S,o,Mo.SessionStorage),Uo.set(t,s,Mo.SessionStorage),h&&Uo.set(b,h,Mo.SessionStorage),Uo.set(m,_,Mo.SessionStorage),u&&Uo.set(I,u,Mo.SessionStorage),Md.sendRWGConnectionPerformance(`WCL_M, JMCT(${performance.now()-l})`);const A=[po(e.payload.body),Oo(performance.now())];return si.getInstance().init(),f&&(A.push(yo(!1)),void 0!==E&&void 0!==y&&A.push(Jr())),p&&A.push(Dr()),g&&(v&&!0===v.isBO100Enabled&&A.push(Sc(a)),g.currentRoom.boConfId&&A.push(jr()),void 0!==c&&A.push(ic(c))),void 0!==d&&A.push(Co(!d)),Xi("JOIN_MEETING_SUCCESS",{meetingNumber:i}),ke(A)}return Pn.CONF_FAIL_CONFLOCKED===r?Xi("JOIN_MEETING_FAILED",Bn(r)):Pn.CONF_FAIL_CONF_USER_FULL===r?Xi("JOIN_MEETING_FAILED",Object.assign({},Bn(r),{lmUrl:e.payload.body.lmURL})):(Pn.CONF_FAIL_MEETING_OVER===r||Pn.CONF_RESULT_MMR_IB_REJECT===r||Pn.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===r||[Pn.CONF_FAIL_HAS_BEEN_REMOVED,Pn.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(r),Xi("JOIN_MEETING_FAILED",Bn(r))),ke(Oc(t,!1))})),handleMeetingAttributeChangeEpic:(e,t)=>cn(e,7938).pipe(Tt(t),Ae(([e,t])=>{const{payload:{body:r}}=e,{meeting:{zoomId:n,encType:o}}=t;if(void 0!==(null==r?void 0:r.encryptKey)&&ei.init(n,r.encryptKey,o),void 0!==(null==r?void 0:r.gatewayKey)){const e=si.getInstance(),[,t,n]=r.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:n&&Xn(n)}])}return Xi("UPDATE_MEETING_ATTRIBUTE",r),ho(r)})),handleMeetingEndEpic:(e,t)=>cn(e,7939).pipe(Tt(t),Ue(([e,t])=>{const{payload:{body:r}}=e;if(void 0!==r.reason){if(Mn.LEAVEREASON_RECONNECT===r.reason)return kn.LEAVESUBREASON_WAITINGROOMFAILOVER===r.subReason?Xi("RECONNECTING_MEETING",{reason:No.OnHold}):Xi("RECONNECTING_MEETING",{reason:No.Failover}),se(ro());Mn.LEAVEREASON_KICKEDBYHOST===r.reason?Xi("LEAVING_MEETING",{reason:"kicked by host"}):Mn.LEAVEREASON_ENDBYHOST!==r.reason&&Mn.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING!==r.reason||Xi("LEAVING_MEETING",{reason:"ended by host"})}return t.meeting.isMeetingReset?$:ke(Oc(t,!1))})),meetingFailoverEpic:(e,t)=>e.pipe(Mt(""+ro),Tt(t),Ue(([,e])=>{const t=Oc(e,!0);let r;if(e.meeting.zlkJwtToken){const t=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}(e),n={topic:null==t?void 0:t.topic,password:null==t?void 0:t.passWord,userName:null==t?void 0:t.userName,zlk:null==t?void 0:t.zlkJwtToken,lang:null==t?void 0:t.lang,cv:null==t?void 0:t.cv,customerKey:null==t?void 0:t.customerKey};r=se(eo(n)).pipe(st(1e3))}else{const t=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(Yo.WebclientZak),tk:h||sessionStorage.getItem(Yo.WebclientTk)}}(e);r=se($n(t)).pipe(st(1e3))}return xe(ke(t),r)})),hostChangeEpic:e=>un(e,7940).pipe(At(e=>{Xi("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)}),Ae(e=>fo(e.payload.body))),cohostChangeEpic:e=>un(e,7941).pipe(At(e=>{Xi("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)}),Ae(e=>vo(e.payload.body))),setMeetingOptEpic:e=>un(e,7945).pipe(At(e=>{const{payload:{body:{opt:t}}}=e;Uo.set(Yo.WebclientOpt,t,Mo.SessionStorage)}),vt($)),setMeetingOnHoldEpic:(e,t)=>cn(e,7942).pipe(At(e=>{const{payload:{body:{bHold:t}}}=e;Uo.set(Yo.WebclientIsOnHold,t?1:0,Mo.SessionStorage),Xi("MEETING_IN_WAITING_ROOM",t)}),Tt(t),Ue(([e,t])=>{const r=[Eo(e.payload.body.bHold)];if(e.payload.body.bHold){const e=Cs(t);if(e){r.push(go({audio:e.audio,video:e.bVideoOn,muted:e.muted}));const n=si.getInstance();if("computer"===e.audio&&(n.leaveComputerAudio(),Md.joinOrLeaveVoip(!1)),e.bVideoOn&&n.stopCaptureVideo(),e.sharerOn&&(Md.stopSharing(e.userId),n.stopDesktopSharing(),r.push(sa(mi.End))),t.video&&t.video.subscribedVideoList.length>0&&t.video.subscribedVideoList.forEach(e=>{Md.unsubscribeVideo(e)}),t.share&&t.share.isReceiveSharing){const e=t.share.activeNodeId;t.share.isRemoteControlApproved&&(Md.sharingRequestRemoteControl(e,!1),n.stopRemoteControl()),Md.unsubscribeSharing(e),n.stopRenderSharing()}}}return ke(r)})),setMeetingDataCenterRegionEpic:e=>cn(e,7954).pipe(Ae(e=>Io(e.payload.body))),claimHostResponseEpic:e=>cn(e,4216).pipe(At(e=>{Xi("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)}),vt($)),leaveMeetingEpic:(e,t)=>e.pipe(Mt(""+no,""+oo),Tt(t),Ue(([e,t])=>(e.type===""+no?(Md.leaveMeeting(),Xi("LEAVING_MEETING",{})):e.type===""+oo&&(Md.endMeeting(),Xi("LEAVING_MEETING",{})),ke(Oc(t,!1))))),versionUpgradeEpic:e=>cn(e,2).pipe(At(()=>{console.warn("Upgrade to latest version to optimize meeting experience")}),vt($)),versionBlockEpic:e=>cn(e,1).pipe(At(e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=Bn(1e3);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,()=>t);r.reason=e}Xi("JOIN_MEETING_FAILED",r)}),vt($))});let Vd,Ld,jd=window.WEB_ENDPOINT||"zoom.us",Hd=`https://${jd}/wc/lsdk`;!function(e){e.Expel="expel",e.Promote="promote",e.Depromote="depromote",e.MemberChange="memberChange",e.RaiseHand="raisehand",e.LowerHand="lowerhand",e.PutdownHands="putdownhands"}(Vd||(Vd={})),function(e){e[e.AttendeeToAllPanelist=1]="AttendeeToAllPanelist",e[e.PanelistToAttendee=3]="PanelistToAttendee"}(Ld||(Ld={}));const xd=["CONNECTED","DISCONNECTED","POOL","CONNFAIL","OnlineMembers","GroupChange","RosterChange","WebinarQA","Message"];class Fd{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;xd.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 Fd),this.agentInstance}onXmppCallback(e,t){this.callbackList.length>0&&this.callbackList.forEach(r=>r(e,t))}registerCallback(e){this.callbackList.push(e)}unregisterCallback(e){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}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;xd.forEach(t=>{e.on(t,e=>{this.onXmppCallback(t,e)})})}const c=`wss://${r}/wc/media/${n}?type=x&cid=${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}}Fd.agentInstance=void 0;let Gd=0;var Bd=Kn((function(e,t){var r;r=function(){function e(){for(var e=0,t={};ee.pipe(Mt(""+kr),Tt(t),Ue(([,e])=>{const{media:{assetsPath:t}}=e;return ke(new Promise((e,r)=>{To(t+"/webim.min.js",()=>{e("")},()=>{r()})})).pipe(ht(Kr(!0)),nt(e=>se(Kr(!1))))})),connectXMPPSocketEpic:(e,t)=>e.pipe(Mt(""+Dr),Tt(t),Je(([,e])=>"closed"===e.socket.xmppSocketStatus),Rc(([,t])=>{const{meeting:{svcUrl:r,meetingNumber:n,conId:o,jid:i,userName:s},socket:{isXmppSDKLoaded:a}}=t,c=jo()&&Ho()?11:10;let d=se(a);return!1===a&&(d=e.pipe(Mt(""+Kr),ut(1))),d.pipe(Ue(e=>{return e?(t={svcUrl:r,meetingNumber:n,conId:o,jid:i,userName:s,clientCap:c},nu.connect(t),ou=new K,We(e=>nu.registerCallback(e),e=>nu.unregisterCallback(e),(e,t)=>({event:e,data:t})).subscribe(ou),ou).pipe(Ae(e=>Lr(e)),Et(Wr(ks.Connecting))):ae("webim load fail");var t}))})),connectedXmppSocketEpic:(e,t)=>e.pipe(Mt(""+Wr),Je(e=>e.payload===ks.Connecting),Rc(()=>{if(ou){const e=ou.pipe(Je(e=>"CONNECTED"===e.event)),r=ou.pipe(Je(e=>"DISCONNECTED"===e.event));return qe(e.pipe(Ue(()=>se(Wr(ks.Connected)))),r.pipe(Tt(t),Je(([,e])=>"closed"!==e.socket.xmppSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(Xi("RECONNECTING_MEETING",{reason:No.Failover}),ro()))))}})),disconnectXmppSocketEpic:e=>e.pipe(Mt(""+Mr),ht(Wr(ks.Closed)),At(()=>{var e;nu.disconnect(),null===(e=ou)||void 0===e||e.complete()}))});const su={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:null,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,enableQos:!0},au=Rr({[""+io]:Rd((e,{payload:t})=>{Object.assign(e,t)}),[""+so]:Rd((e,{payload:t})=>{e.isWindowOpen=t}),[""+ao]:Rd((e,{payload:t})=>{e.apiKey=t.apiKey,e.signature=t.signature,e.lang=t.language}),[""+co]:Rd((e,{payload:t})=>{e.zak=t}),[""+uo]:Rd((e,{payload:t})=>{e.tk=t.tk,e.mtkGuid=t.mtkGuid}),[""+lo]:Rd((e,{payload:t})=>{e.pingRWCTimestamp=t}),[""+po]:Rd((e,{payload:t})=>{e.confId=t.confID,e.conId=t.conID,e.e2eEncrypt=t.e2eEncrypt,e.meetingNumber=parseInt(t.mn,10),e.zoomId=t.zoomID,e.meetingStatus="joined",e.jid=t.jid,e.xtoken=t.xtoken,e.groups=t.groups,e.svcUrl=t.svcUrl,e.encType=t.encType,e.userGUID=t.userGUID,e.userId=t.userID,e.role=t.role,e.participantID=t.participantID}),[""+ho]:Rd((e,{payload:t})=>{Object.assign(e,t)}),[""+fo]:Rd((e,{payload:t})=>{e.isHost=t}),[""+vo]:Rd((e,{payload:t})=>{e.isCoHost=t}),[""+Eo]:Rd((e,{payload:t})=>{e.isOnHold=t}),[""+yo]:Rd((e,{payload:t})=>{e.isMeetingReset=t}),[""+go]:Rd((e,{payload:t})=>{e.audioVideoBeforeOnHold=t}),[""+So]:Rd((e,{payload:t})=>{e.currentUserAudioBeforeReset=t}),[""+bo]:Rd((e,{payload:t})=>{e.isCurrentUserMutedBeforeReset=t}),[""+mo]:Rd((e,{payload:t})=>{e.meetingStatus=t}),[""+Io]:Rd((e,{payload:t})=>{e.region=t.region,e.network=t.network}),[""+Ao]:Rd((e,{payload:t})=>{e.isCurrentUserStartVideoBeforeReset=t}),[""+Oo]:Rd((e,{payload:t})=>{e.joinMeetingTimeStamp=t}),[""+Co]:Rd((e,{payload:t})=>{e.enableQos=t}),[""+_o]:Rd((e,{payload:t})=>{Object.assign(e,d(d({},su),{},{isMeetingReset:!0,currentUserAudioBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.audio:t.audio,isCurrentUserMutedBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.muted:t.muted,isCurrentUserStartVideoBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.video:t.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}))})},su),cu=an(Ud,{meetingInfoEpic:(e,t)=>e.pipe(Mt(""+eo),bt(e=>{const r=Object.assign({},e.payload,{password:zn(e.payload.password),topic:zn(e.payload.topic)});return((e,t,r="zoomsdkjsonpcallback")=>new x(n=>{Gd++;const o=`${r}${Gd}`,i=document.createElement("script");Object.keys(t).forEach(e=>(void 0===t[e]||null===t[e])&&delete t[e]),i.src=`${e}?${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()}}))(Hd,r).pipe(nt(e=>se({status:!1,result:e.toString(),errorCode:-3e3})),Ue(r=>{const[n,o]=Ze(se(r),e=>!0===e.status&&void 0!==e.result);return o.subscribe(e=>{e.state||(3e3===e.errorCode&&"Meeting password is incorrect"===e.errorMessage?Xi("JOIN_MEETING_FAILED",Gn(3004)):-3e3===e.errorCode?Xi("JOIN_MEETING_FAILED",{reason:"connection error"}):3e3===e.errorCode?Xi("JOIN_MEETING_FAILED",{reason:e.errorMessage,errorCode:200}):300===e.errorCode?Xi("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?Xi("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?Xi("JOIN_MEETING_FAILED",{reason:"The token is expired or more than 2 days or ineffective.",errorCode:200}):124===e.errorCode&&Xi("JOIN_MEETING_FAILED",{reason:"Verify JWT failed",errorCode:200}))}),n.pipe(wc(r=>{if(!0===r.status){const{result:{mid:n}}=r;return Uo.init(n),xe(se(io(Ic(r,e.payload))),on(kd,t,to()))}}))}))}))}),du=ni.createAgent();let uu;var lu=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(Mt(""+Nr),Tt(t),Je(([,e])=>"closed"===e.socket.zoomSocketStatus),Rc(([,e])=>{const{socket:{retryCount:t,rwgServerList:r},meeting:n,breakoutRoom:o}=e;let i;if(n.zlkJwtToken)i=function({passWord:e,meetingNumber:t,userName:r,topic:n,trackAuth:o,tid:i,meetingId:s,ts:a,auth:c,lang:d,retryCount:u,rwgServerList:l,cv:p,customerKey:h,zlkJwtToken:_}){const f=Bd.get("_zm_mtk_guid");let v=Uo.get(ru);if(v||(v=Yd(),Uo.set(ru,v,Mo.LocalStorage)),l.length>u){const E=l[u];let y={dn2:zn(r),topic:zn(n),auth:c,browser:Vo(),trackAuth:o,mid:s,tid:i,lang:d,ts:a,"ZM-CID":v,_ZM_MTG_TRACK_ID:f||"",iccv:p,customer_key:zn(h),cfs:0,zlkJwtToken:_};""!==e&&(y=Object.assign(y,{mpwd:zn(e)})),E.rwcAuth?y=Object.assign(y,{rwcAuth:E.rwcAuth}):E.rwcToken&&(y=Object.assign(y,{rwcToken:E.rwcToken}));let g=2;return xo()?g=1:Fo()&&(g=0),y=Object.assign(y,{as_type:g}),[{key:Qd,queryKey:"opt"},{key:$d,queryKey:"participantID"},{key:eu,queryKey:"zoomid"}].forEach(e=>{const t=Uo.get(e.key);void 0!==t&&(y[e.queryKey]=t)}),`wss://${E.rwg}/instantsdk/${t}?${new URLSearchParams(y).toString()}`}return null}(d(d({},n),{},{retryCount:t,rwgServerList:r}));else{let e=d(d({},n),{},{retryCount:t,rwgServerList:r});if(o&&o.currentRoom.status===Is.Joining){const{currentRoom:{boId:t,boConfId:r,boToken:n}}=o;e=d(d({},e),{},{bid:t,botk:n,confID:r})}i=function({isHost:e,isOriginHost:t,passWord:r,meetingNumber:n,userName:o,zak:i,trackAuth:s,tid:a,sign:c,meetingId:d,ts:u,auth:l,lang:p,tk:h,retryCount:_,rwgServerList:f,userEmail:v,cv:E,bid:y,botk:g,confID:S,customerKey:b}){const m=Bd.get("_zm_mtk_guid");let I=Uo.get(ru);if(I||(I=Yd(),Uo.set(ru,I,Mo.LocalStorage)),f.length>_){const A=f[_];let O={dn2:zn(o),auth:l,sign:c,browser:Vo(),trackAuth:s,mid:d,tid:a,email:v,lang:p,zak:i||"",tk:h||"",customer_key:zn(b),ts:u,"ZM-CID":I,_ZM_MTG_TRACK_ID:m||"",jscv:E,cfs:0};e&&t||""===r||(O=Object.assign(O,{mpwd:r})),A.rwcAuth?O=Object.assign(O,{rwcAuth:A.rwcAuth}):A.rwcToken&&(O=Object.assign(O,{rwcToken:A.rwcToken}));let C=2;return xo()?C=1:Fo()&&(C=0),O=Object.assign(O,{as_type:C}),[{key:Zd,queryKey:"cfs"},{key:Qd,queryKey:"opt"},{key:$d,queryKey:"participantID"},{key:eu,queryKey:"zoomid"},{key:tu,queryKey:"tk"}].forEach(e=>{const t=Uo.get(e.key);void 0!==t&&(O[e.queryKey]=t)}),y&&g&&S&&Object.assign(O,{bid:zn(y),botk:g,confID:S}),`wss://${A.rwg}/wc/api/${n}?${new URLSearchParams(O).toString()}`}return null}(e)}if(i){const e=(s=i,du.connect(s),uu=new K,We(e=>du.on(ti.Message,e),e=>du.off(ti.Message,e),e=>e.data).subscribe(uu),uu);return qe(e.pipe(Je(e=>"string"==typeof e),Ae(e=>JSON.parse(e)),Pc(),Tc(e=>{if(0!==e.evt||!e.body||"invalid parameters!"!==e.body.test)return Ur(e);Xi("JOIN_MEETING_FAILED",Gn(Vn.INVALID_PARAMETER))}),Et(Fr(ks.Connecting))),e.pipe(Je(e=>e instanceof ArrayBuffer),Ae(e=>Vr(e))))}var s})),connectedZoomSocketEpic:(e,t)=>e.pipe(Mt(""+Nr),bt(()=>{const[e,r,n]=[ti.Open,ti.Close,ti.Error].map(e=>We(t=>du.on(e,t),t=>du.on(e,t)));return qe(e.pipe(Ue(()=>qe(se(Fr(ks.Connected)),tt(6e4).pipe(Tt(t),Je(([,e])=>"initial"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(Xi("RECONNECTING_MEETING",{reason:No.Failover}),ro())))))),r.pipe(Tt(t),Je(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(Xi("RECONNECTING_MEETING",{reason:No.Failover}),ro()))),n.pipe(Tt(t),wc(([,e])=>{const{meeting:{meetingStatus:t,isMeetingReset:r},socket:{retryCount:n}}=e;return"initial"===t?ke([Br(n+1),Pr({retry:!0})]):r?void 0:(Xi("RECONNECTING_MEETING",{reason:No.Failover}),se(ro()))})))})),disconnectZoomSocketEpic:e=>e.pipe(Mt(""+Pr),Ue(e=>e.payload&&e.payload.retry?se(Nr()).pipe(st(1e3),Et(Fr(ks.Closed))):se(Fr(ks.Closed))),st(100),At(()=>{var e;du.close(),null===(e=uu)||void 0===e||e.complete()}))});const pu=oi.getInstance();let hu;var _u=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(Mt(""+jr),Tt(t),Je(([,e])=>"closed"===e.socket.mainSessionSocketStatus),bt(([,e])=>{const{meeting:{svcUrl:t,meetingNumber:r,conId:n}}=e;return(e=>(pu.connect(e),hu=new K,We(e=>pu.on(ti.Message,e),e=>pu.off(ti.Message,e)).pipe(Ae(e=>e.data)).subscribe(hu),hu))(function(e,t,r){return`wss://${e}/wc/media/${t}?type=m&cid=${r}&mode=2`}(t,r,n)).pipe(Ae(e=>JSON.parse(e)),Je(e=>0!==e.evt),Pc(),Ae(e=>xr(e)),Et(qr(ks.Connecting)))})),connectedMainSessionSocketEpic:(e,t)=>e.pipe(Mt(""+jr),bt(()=>{const[e,r,n]=[ti.Open,ti.Close,ti.Error].map(e=>We(t=>pu.on(e,t),t=>pu.on(e,t)));return qe(e.pipe(ht(qr(ks.Connected))),r.pipe(Tt(t),Je(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus),Ae(()=>(Xi("RECONNECTING_MEETING",{reason:No.Failover}),ro()))),n.pipe(Ae(()=>(Xi("RECONNECTING_MEETING",{reason:No.Failover}),ro()))))})),disconnectMainSessionSocketEpic:e=>e.pipe(Mt(""+Hr),ht(qr(ks.Closed)),At(()=>{var e;pu.close(),null===(e=hu)||void 0===e||e.complete()}))});const fu={zoomSocketStatus:ks.Closed,isXmppSDKLoaded:!1,xmppSocketStatus:ks.Closed,mainSessionSocketStatus:ks.Closed,retryCount:0,rwgServerList:[]},vu=Rr({[""+Fr]:Rd((e,{payload:t})=>{e.zoomSocketStatus=t}),[""+Gr]:Rd((e,{payload:t})=>{const{rwgServerList:r}=e;r.find(e=>e===t.rwg)||r.push(t)}),[""+Br]:Rd((e,{payload:t})=>{e.retryCount=t}),[""+Wr]:Rd((e,{payload:t})=>{e.xmppSocketStatus=t}),[""+Kr]:Rd((e,{payload:t})=>{e.isXmppSDKLoaded=t}),[""+qr]:Rd((e,{payload:t})=>{e.mainSessionSocketStatus=t}),[""+zr]:()=>fu},fu),Eu=an(lu,iu,_u),yu={id:"userId",type:e=>Es(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>{return{userRole:e,isHost:(t=e,(t&_s.Host)===_s.Host)};var t},dn2:e=>({displayName:Jn(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest"};var gu=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>cn(e,7937).pipe(Ae(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=yu[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)),Tt(t),Ue(([e,t])=>{const r=[ts(e)],{meeting:{userId:n},participants:{attendeesList:o,failoverAttendeesList:i}}=t;if(e.add){const t=e.add.find(e=>e.userId===n);void 0!==t&&Xi("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const o=e.add.filter(e=>e.userId!==n);if(o.length>0){const e=o.filter(e=>!ys(e.userRole)).map(e=>{const t=i.find(t=>t.zoomID===e.zoomID);return t?d(d({},e),{},{source:t.isOnHold?"on hold":"failover"}):e}),t=e.filter(e=>!!e.source).map(e=>({zoomID:e.zoomID}));r.push(ss(t)),Xi("ADD_USER_PARTICIPANT_ATTRIBUTE",e)}}if(e.update){const t=e.update.find(e=>e.userId===n);void 0!==t&&Xi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const r=e.update.filter(e=>e.userId!==n);r.length>0&&Xi("UPDATE_USER_PARTICIPANT_ATTRIBUTE",r)}if(e.remove){const t=e.remove.map(e=>{const t=o.find(t=>t.userId===e.userId);return t?2===e.action&&1===e.nUserStatus?t.bHold?(r.push(is({zoomID:t.zoomID,isOnHold:!0})),d(d({},e),{},{reason:"on hold"})):(r.push(is({zoomID:t.zoomID,isOnHold:!1})),d(d({},e),{},{reason:"failover"})):e:null}).filter(e=>!!e);Xi("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t)}return ke(r)})),receiveUserListFromXMPPEpic:e=>dn(e,"POOL").pipe(Je(e=>e.payload.data.action===Vd.MemberChange),At(e=>{Xi("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.payload.data.data)}),Ae(e=>rs(e.payload.data.data))),handleAdmitAllSilentUsersEpic:e=>cn(e,7951).pipe(At(e=>{!1===e.payload.body.bStarted&&Xi("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)}),Ae(e=>ns(e.payload.body.bStarted))),handleKVUpdateIndicationEpic:e=>cn(e,7946).pipe(Je(e=>["bRaiseHand","feedback"].indexOf(e.payload.body.key)>-1&&0===e.payload.body.value),Ae(e=>(Xi("UPDATE_USER_PARTICIPANT_ATTRIBUTE",{}),void 0!==e.payload.body.bRaiseHand?as():cs())))});const Su={attendeesList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},bu=Rr({[""+ts]:Rd((e,{payload:t})=>{void 0!==t.add&&t.add.length>0&&t.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):ys(t.userRole)?e.allowTalkAttendeesList.push(t):e.attendeesList.push(t)}}),void 0!==t.update&&t.update.length>0&&t.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!==t.remove&&t.remove.length>0&&t.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)}})}),[""+rs]:Rd((e,{payload:t})=>{e.xmppAttendeeList=t.map(e=>d(d({},e),{},{displayName:e.name,userId:Number(e.node),userRole:Number(e.role)}))}),[""+ns]:Rd((e,{payload:t})=>{e.isAdmitAllSilentUsers=t}),[""+as]:Rd(e=>{e.attendeesList.forEach(e=>{!0===e.bRaiseHand&&(e.bRaiseHand=!1)})}),[""+cs]:Rd(e=>{e.attendeesList.forEach(e=>{e.feedback>0&&(e.feedback=0)})}),[""+is]:Rd((e,{payload:t})=>{e.failoverAttendeesList.push(t)}),[""+ss]:Rd((e,{payload:t})=>{t.forEach(t=>{const r=e.failoverAttendeesList.findIndex(e=>e.zoomID===t.zoomID);-1!==r&&e.failoverAttendeesList.splice(r,1)})}),[""+os]:()=>Su},Su),mu=an(gu),Iu={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0},Au=Rr({[""+Zr]:Rd((e,{payload:t})=>{e.audioDecodeStatus=t}),[""+Xr]:Rd((e,{payload:t})=>{e.audioEncodeStatus=t}),[""+tn]:Rd((e,{payload:t})=>{e.sharingDecodeStatus=t}),[""+en]:Rd((e,{payload:t})=>{e.sharingEncodeStatus=t}),[""+$r]:Rd((e,{payload:t})=>{e.videoDecodeStatus=t}),[""+Qr]:Rd((e,{payload:t})=>{e.videoEncodeStatus=t}),[""+rn]:Rd((e,{payload:t})=>{e.mediaConstraints=t.mediaConstraints,e.assetsPath=t.assetsPath}),[""+nn]:e=>d(d({},Iu),{},{mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath})},Iu),Ou=(e,t,r)=>Fe(...[t,r].map((t,r)=>{if("initial"!==t)return ke(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return Qe($i(`${e.toUpperCase()}_${t}_SUCCESS`,1).pipe(ht(!0)),$i(`${e.toUpperCase()}_${t}_FAIL`,1).pipe(ht(!1)))}})),Cu=()=>ke(navigator.mediaDevices.enumerateDevices()).pipe(Ae(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 Tu(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 wu=ni.createAgent();var Ru=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>cn(e,12033).pipe(Tt(t),Ae(([e,t])=>{const{participants:{attendeesList:r,allowTalkAttendeesList:n}}=t,o=e.payload.body,i={};return o&&([...r,...n].forEach(e=>{for(let t=1;t<=3;t++){const r="asn"+t,{userId:n,displayName:s}=e;if(void 0!==o[r]&&n===o[r]){i[r]={userId:n,displayName:s};break}}}),Xi("AUDIO_ACTIVE_SPEAKER",Object.values(i))),Us(i)})),unmuteConsentAfterSpotlighted:(e,t)=>cn(e,16135).pipe(Tt(t),At(([e,t])=>{const{payload:{body:{id:r,bLeadershipOn:n}}}=e,{audio:{bCanUnmute:o}}=t,i=Cs(t);if(i){const{isHost:e,bCoHost:t,userId:s,audio:a,muted:c}=i,d=e||t;n&&s>>10==r>>10&&(null!==a&&""!==a&&!0!==c||!d&&!o||Xi("AUDIO_UNMUTE_CONSENT",yi.Spotlight))}}),vt($)),unmuteConsentEpic:(e,t)=>cn(e,12037).pipe(Tt(t),At(([,e])=>{const t=Cs(e);null!==(null==t?void 0:t.audio)&&""!==(null==t?void 0:t.audio)&&1==(null==t?void 0:t.muted)&&Xi("AUDIO_UNMUTE_CONSENT",yi.Unmute)}),vt($)),setAudioAttributeEpic:(e,t)=>cn(e,7938).pipe(Je(e=>e.payload.body&&["bCanUnmute","bMutedAll","bMutedUponEntry"].some(t=>void 0!==e.payload.body[t])),Tc(e=>{if(void 0!==e.payload.body.bCanUnmute)return Vs(e.payload.body.bCanUnmute);if(void 0!==e.payload.body.bMutedAll){const r=Cs(t.value);if(("computer"===(null==r?void 0:r.audio)||"phone"===(null==r?void 0:r.audio))&&0==r.muted)return xs(e.payload.body.bMutedAll)}return void 0!==e.payload.body.bMutedUponEntry?Bs(e.payload.body.bMutedUponEntry):void 0})),currentUserAudioChangeEpic:(e,t)=>cn(e,7937).pipe(Tt(t),Je(([,e])=>e.socket.zoomSocketStatus===ks.Connected),wc(([e,t])=>{if(e.payload.body.update&&e.payload.body.update.some(e=>void 0!==e.audio||void 0!==e.muted)){const r=t.meeting.userId,n=e.payload.body.update,[o,i]=Ze(ke(n),e=>e.id===r);i.subscribe(e=>{Xi("AUDIO_PARTICIPANT_AUDIO_UPDATE",e)});const{audio:{isActiveOperation:s,isMutedAll:a},audio:{activeMicrophone:c,activeSpeaker:d,audioSsrc:u}}=t;let l=Cs(t);!l&&e.payload.body.add&&e.payload.body.add.length>0&&(l=e.payload.body.add.find(e=>e.id===r),l&&(l.userRole=l.role));const p=gs(l.userRole);return o.pipe(At(e=>{var t,r,n,o;if(e.audio!==(null===(t=l)||void 0===t?void 0:t.audio))if(""===e.audio)Xi("AUDIO_CURRENT_USER_LEAVE_AUDIO");else if("computer"===e.audio)si.getInstance().joinComputerAudio(u,c,d,!p);else if("phone"===e.audio){var i;"computer"===(null===(i=l)||void 0===i?void 0:i.audio)&&(si.getInstance().leaveComputerAudio(),wu.joinOrLeaveVoip(!1)),Xi("AUDIO_CURRENT_USER_JOIN_BY_PHONE")}(null===(r=l)||void 0===r?void 0:r.audio)&&""!==(null===(n=l)||void 0===n?void 0:n.audio)&&e.muted!==(null===(o=l)||void 0===o?void 0:o.muted)&&(!0===e.muted?Xi("AUDIO_CURRENT_USER_MUTED",{source:s?"active":a?"passive(mute all)":"passive(mute one)"}):!1===e.muted&&Xi("AUDIO_CURRENT_USER_UNMUTED",{source:s?"active":"passive"}))}),Je(e=>{var t,r;return""!==(null===(t=l)||void 0===t?void 0:t.audio)&&e.muted!==(null===(r=l)||void 0===r?void 0:r.muted)}),vt(se(Fs(!1),xs(!1))))}})),handleDialOutEpic:(e,t)=>cn(e,8198).pipe(Tt(t),Je(([e,t])=>e.payload.seq==t.audio.dialout.sequence),At(([e])=>{const t=e.payload.body.result;Xi("AUDIO_DIALOUT_RESULT_CODE",{code:t}),t===gi.Success?Xi("AUDIO_DIALOUT_RESULT_SUCCESS"):-1===[gi.Calling,gi.Ringing,gi.Accepted,gi.Success].indexOf(t)&&Xi("DIALOUT_FAIL")}),Ae(([e])=>js(e.payload.body.result))),handleDialouCancelEpic:e=>cn(e,8200).pipe(At(e=>{const t=e.payload.body.result;[0,11].indexOf(t)>-1?Xi("AUDIO_DIALOUT_CANCEL_SUCCESS"):Xi("DIALOUT_CANCEL_FAIL",t)}),Je(e=>0===e.payload.body.result||11===e.payload.body.result),ht(js(-1))),handleAllowToTalkEpic:(e,t)=>cn(e,12036).pipe(Tt(t),wc(([e,t])=>{const r=Cs(t),{media:{audioEncodeStatus:n},audio:{audioSsrc:o,activeMicrophone:i,activeSpeaker:s}}=t,{promoterID:a,bAllowTalk:c}=e.payload.body;if((null==r?void 0:r.userId)===a){const e=si.getInstance();if(c){let t=se(!0);return"success"!==n&&(e.enableAudioEncode(),t=Qe($i("AUDIO_ENCODE_SUCCESS",1).pipe(ht(!0)),$i("AUDIO_ENCODE_FAIL",1).pipe(ht(!1)))),t.pipe(At(t=>{t&&(e.joinComputerAudio(o,i,s,!0),Xi("AUDIO_UNMUTE_CONSENT",yi.AllowToTalk))}),ht(Hs(!0)))}return wu.mute(a,!0),e.leaveComputerAudio(),tt(300).pipe(At(()=>{e.joinComputerAudio(o,i,s,!1)}),ht(Hs(!1)))}})),handleAllowToTalkResponseEpic:e=>cn(e,8205).pipe(At(e=>{Xi("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)}),vt($)),handleAttendeePromoteDepromote:(e,t)=>dn(e,"POOL").pipe(Je(e=>e.payload.data.action===Vd.Depromote||e.payload.data.action===Vd.Promote),Tt(t),At(([e,t])=>{const r=Cs(t);"phone"===(null==r?void 0:r.audio)?wu.audioDrop(r.userId):"computer"===(null==r?void 0:r.audio)&&(e.payload.data.action,Vd.Promote)}),vt($)),setAudioSSRCEpic:(e,t)=>cn(e,12035).pipe(Tt(t),Ue(([e,t])=>{const{meeting:{currentUserAudioBeforeReset:r},media:{audioDecodeStatus:n,audioEncodeStatus:o}}=t,{payload:{body:{ssrc:i}}}=e;let s=void 0;const a=Cs(t);if(a&&"computer"===r&&""===a.audio){const e=gs(a.userRole);s=Ou("audio",e?"success":o,n).pipe(Je(([e,t])=>e&&t),At(()=>{wu.joinOrLeaveVoip(!0)}),ht(So(void 0)))}return s?qe(se(Gs(i)),s):se(Gs(i))})),handleMergeAudioEpic:(e,t)=>cn(e,7952).pipe(bt(e=>$i("AUDIO_CURRENT_USER_JOIN_BY_PHONE",1).pipe(Tt(t),At(([,t])=>{const{BindStatus:r,nOperatorUserId:n}=e.payload.body,o=t.participants.attendeesList.find(e=>e.userId===n);!0===r&&Xi("AUDIO_MERGE_AUDIO_INDICATION",{operatorName:null==o?void 0:o.displayName,operatorUserId:n,operatorRole:null==o?void 0:o.userRole})})))),handleUserGrantAudioCaptureEpic:(e,t)=>ln(e,vi.UserGrantCaptureAudio).pipe(Tt(t),Ue(([,e])=>{Xi("AUDIO_CURRENT_USER_JOIN_BY_VOIP");const t=Cs(e),{meeting:{isCurrentUserMutedBeforeReset:r},audio:{bMutedUponEntry:n,isUserGrantCaptureAudio:o}}=e,i=[Ws(!0)];return t&&(!0===t.muted&&wu.mute(t.userId,!0),(!0===r||!o&&!t.isHost&&n)&&(wu.mute(t.userId,!0),r&&i.push(bo(void 0)))),ke(i)})),handleUserForbiddenMicrophoneEpic:e=>ln(e,vi.UserForbiddedCaptureAudio).pipe(At(()=>{Xi("USER_FORBIDDEN_MICROPHONE")}),ht(Ks(!0))),handleAudioSocketErrorEpic:e=>ln(e,vi.AudioWebsocketBroken).pipe(At(()=>{Xi("ESTABLISH_AUDIO_STREAM_ERROR")}),vt($)),handleAudioZeroDataEpic:(e,t)=>ln(e,vi.AudioZeroData).pipe(Tt(t),Tc(([,e])=>{const{audio:{webrtcRestartCount:t,activeMicrophone:r}}=e;if(t<3)return si.getInstance().restoreWebRTC(r),qs(t+1)})),handleAutoPlayEpic:(e,t)=>e.pipe(Mt(""+Zs),Je(e=>!1===e.payload),Ue(()=>(Xi("AUDIO_AUTO_PLAY_FAILED"),Qe(Be(document,"click").pipe(ut(1)),Be(document,"touchend").pipe(ut(1))).pipe(Tt(t),At(([,e])=>{const{audio:{audioSsrc:t,activeMicrophone:r,activeSpeaker:n}}=e,o=Cs(e),i=gs(o.userRole);si.getInstance().joinComputerAudio(t,r,n,!i),wu.joinOrLeaveVoip(!0)}),ht(Zs(!0))))))});const Nu={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},Du=Rr({[""+Us]:Rd((e,{payload:t})=>{e.asnIds=d({},t)}),[""+Vs]:Rd((e,{payload:t})=>{e.bCanUnmute=t}),[""+Ls]:Rd((e,{payload:t})=>{const{dialout:r}=e;r.sequence=t}),[""+js]:Rd((e,{payload:t})=>{const{dialout:r}=e;r.returnCode=t}),[""+Hs]:Rd((e,{payload:t})=>{e.isAllowToTalk=t}),[""+Fs]:Rd((e,{payload:t})=>{e.isActiveOperation=t}),[""+xs]:Rd((e,{payload:t})=>{e.isMutedAll=t}),[""+Gs]:Rd((e,{payload:t})=>{e.audioSsrc=t}),[""+Bs]:Rd((e,{payload:t})=>{e.bMutedUponEntry=t}),[""+Ws]:Rd((e,{payload:t})=>{e.isUserGrantCaptureAudio=t}),[""+Ks]:Rd((e,{payload:t})=>{e.isMicrophoneForbidden=t}),[""+qs]:Rd((e,{payload:t})=>{e.webrtcRestartCount=t}),[""+zs]:Rd((e,{payload:t})=>{e.microphoneDevicesList=t}),[""+Js]:Rd((e,{payload:t})=>{e.speakerDevicesList=t}),[""+Ys]:Rd((e,{payload:t})=>{e.activeMicrophone=t}),[""+Xs]:Rd((e,{payload:t})=>{e.activeSpeaker=t}),[""+Zs]:Rd((e,{payload:t})=>{e.canPlayAudio=t}),[""+Qs]:({dialout:{returnCode:e}})=>d(d({},Nu),{},{dialout:d(d({},Nu.dialout),{},{returnCode:e})}),[""+$s]:Rd((e,{payload:t})=>{e.isComputerAudioLoading=t})},Nu),Pu=an(Ru),Mu=e=>4294966272&e,ku=ni.createAgent(),Uu=si.getInstance();var Vu=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>ln(e,vi.StartVideoCaptureSuccess).pipe(Tt(t),Tc(([,e])=>{const{video:{cameraDevicesList:t,activeCamera:r},meeting:{userId:n}}=e;return t.length<1?(Xi("CAN_NOT_DETECT_CAMERA",{reason:"Cannot detect camera devices"}),void Uu.stopCaptureVideo()):"default"===r||t.some(e=>e.deviceId===r)?void ku.muteAttendeeVideo(n,!1):(Xi("CAN_NOT_FIND_CAMERA",{reason:"cannot find target camera"}),void Uu.stopCaptureVideo())})),startVideoResponse:(e,t)=>cn(e,7937).pipe(Tt(t),Je(([e,t])=>{var r,n,o,i;const s=t.meeting.userId;return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id)===s}),Je(([e])=>{var t,r,n,o;return!0===(null==e||null===(t=e.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)}),Tc(()=>(Xi("VIDEO_CAPTURE_START_SUCCESS"),Sa(!0)))),handleForbiddenCaptureVideoEpic:e=>ln(e,vi.UserForbiddedCaptureVideo).pipe(At(()=>Xi("VIDEO_USER_FORBIDDEN_CAPTURE")),ht(ma(!0))),handleCameraIsTakenByOtherProgramsEpic:e=>ln(e,vi.UserCameraIsTakenByOtherPrograms).pipe(At(()=>Xi("VIDEO_CAMERA_IS_TAKEN",{reason:"User camera is taken by other programs."})),ht(Ta(!0))),handleVideoSocketErrorEpic:e=>ln(e,vi.VideoWebsocketBroken).pipe(At(()=>{Xi("VIDEO_ESTABLISH_STREAM_ERROR",{reason:"Video websocket broken."})}),vt($)),handleStopVideoCaptureFailedEpic:e=>ln(e,vi.StopVideoCaptureFailed).pipe(At(()=>{Xi("VIDEO_CAPTURE_STOP_RESULT",{failed:!0,reason:"Unknown."})}),vt($)),handleStopVideoCaptureSuccessEpic:(e,t)=>ln(e,vi.StopVideoCaptureSuccess).pipe(Tt(t),Tc(([,e])=>{const{meeting:{userId:t},video:{isCurrentUserStartedVideo:r}}=e;r||Xi("VIDEO_CAPTURE_STOP_RESULT"),ku.muteAttendeeVideo(t,!0)})),stopVideoResponse:(e,t)=>cn(e,7937).pipe(Tt(t),Je(([e,t])=>{var r,n,o,i;const s=t.meeting.userId;return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id)===s}),Je(([e])=>{var t,r,n,o;return!1===(null==e||null===(t=e.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)}),Tc(()=>(Xi("VIDEO_CAPTURE_STOP_RESULT"),Sa(!1)))),receiveVideoMuteIndication:(e,t)=>cn(e,16133).pipe(Tt(t),Je(([e,t])=>{var r,n;return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n?void 0:n.id)===t.meeting.userId}),Tc(([e])=>{const{id:t,bVideoMute:r}=e.payload.body;return Xi("RECEIVE_VIDEO_MUTE_INDICATION",{id:t,isVideoMuted:r}),!0===r&&Uu.stopCaptureVideo(),!1===r&&Xi("ASK_FOR_START_VIDEO_CONSENT",{id:t,isVideoMuted:r}),Oa(r)})),receiveVideoActiveIndication:e=>cn(e,16129).pipe(Ae(e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,n=Mu(t);return Xi("RECEIVE_VIDEO_ACTIVE_INDICATION",{bVideoOn:r,userId:n}),Ea({bVideoOn:r,userId:n})})),receiveVideoSsrcIndication:(e,t)=>cn(e,16131).pipe(Je(e=>void 0!==e.payload.body.ssrc),Tt(t),bt(([e,t])=>{const{meeting:{isCurrentUserStartVideoBeforeReset:r},media:{videoEncodeStatus:n},video:{captureCanvasList:o,activeCamera:i,isVerifiedVideoCaptureCanvasAfterFailover:s}}=t,{payload:{body:{ssrc:a}}}=e;let c=void 0;const d=Cs(t);return d&&!0===r&&!0!==d.bVideoOn&&(c=Ou("video",n,"success").pipe(Je(([e,t])=>e&&t),Ue(()=>{const e=[Sa(void 0)];return!1===s&&(Array.isArray(o)?o.forEach(e=>{Tu(document.querySelector("#"+e))}):Tu(document.querySelector("#"+o)),e.push(Ra(!0))),si.getInstance().startCaptureVideo(a,i,640,360),ke(e)}))),c?qe(se(va(a)),c):se(va(a))})),receiveVideoDecodeMaxSizeEpic:e=>ln(e,vi.VideoDecodeMaxSize).pipe(Je(e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data}),wc(e=>{const{size:t}=e.payload.data;return se(Ia(t))})),spotlightVideoResponseEpic:e=>cn(e,16135).pipe(Ae(e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,n=[];return t&&n.push(Mu(r)),Xi("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),ba(n)})),handleGroupLayoutIndicationEpic:(e,t)=>cn(e,7958).pipe(Tt(t),Ae(([e,t])=>{const{payload:{body:r}}=e;let n=[];r&&r.group_list&&r.group_list[0]&&(n=r.group_list[0].map(e=>e.id));const o=Ds(t);return n=n.filter(e=>o.findIndex(t=>t.userId===e)>=0),Xi("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),ba(n)})),handleCurrentVideoResolution:e=>ln(e,vi.CurrentVideoResolution).pipe(Tc(e=>(Xi("VIDEO_RENDER_START_SUCCESS"),Xi("RECEIVE_VIDEO_DIMENSION_CHANGE",e.payload.data),Da(e.payload.data)))),handleMeetingVideoAttributeEpic:e=>cn(e,7938).pipe(Je(e=>{const{payload:{body:t}}=e;return void 0!==(null==t?void 0:t.bFollowHostVideo)||void 0!==(null==t?void 0:t.VideoHd)}),Ae(e=>{const{payload:{body:{bFollowHostVideo:t,VideoHd:r}}}=e;return void 0!==t?(Xi("VIDEO_FOLLOW_HOST_ORDER_CHANGE",{bOn:t}),ka(t)):ja(1===r)})),handleHostDragLayoutIndicationEpic:(e,t)=>cn(e,7957).pipe(Tt(t),Ae(([e,t])=>{const{video:{isFollowHostVideoLayout:r}}=t,{payload:{body:n}}=e,o=n&&n.drag_list&&n.drag_list.map(e=>e.id);return r&&Xi("VIDEO_HOST_DRAG_LAYOUT_CHANGE",{layout:o}),Ua(o)})),handlePeerVideoStateChangeEpic:(e,t)=>cn(e,7937).pipe(Tt(t),Je(([e,t])=>{const{meeting:{userId:r},video:{subscribedVideoList:n}}=t,o=e.payload.body.update,i=e.payload.body.remove;return o&&o.length>0&&o.findIndex(e=>e.id!==r&&(void 0!==e.bVideoOn||e.bHold))>-1||i&&i.some(e=>n.includes(e.id))}),At(([e,t])=>{const{payload:{body:{remove:r,update:n}}}=e,{video:{subscribedVideoList:o}}=t,i=Ns(t);if(r&&r.length>0&&r.filter(e=>o.includes(e.id)).forEach(e=>{Xi("VIDEO_OLD_USER_STOP",{userId:e.id})}),n&&n.length>0){const e=n.filter(e=>void 0!==e.bVideoOn).filter(e=>-1===i.findIndex(t=>t.userId===e.id)),t=n.filter(e=>!0===e.bHold);t.length>0&&t.filter(e=>o.includes(e.id)).forEach(e=>{Xi("VIDEO_OLD_USER_STOP",{userId:e.id})}),e.forEach(e=>{e.bVideoOn?Xi("VIDEO_NEW_USER_START",{userId:e.id}):Xi("VIDEO_OLD_USER_STOP",{userId:e.id})})}}),vt($))});const Lu={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},ju=Rr({[""+va]:Rd((e,{payload:t})=>{e.videoSsrc=t}),[""+ya]:Rd((e,{payload:t})=>{e.cameraDevicesList=t}),[""+ga]:Rd((e,{payload:t})=>{e.activeCamera=t}),[""+Ea]:Rd((e,{payload:t})=>{e.activeVideoId=t.userId}),[""+Sa]:Rd((e,{payload:t})=>{e.isCurrentUserStartedVideo=t}),[""+ba]:Rd((e,{payload:t})=>{e.spotlightUserList=t}),[""+ma]:Rd((e,{payload:t})=>{e.isCaptureForbidden=t}),[""+Ia]:Rd((e,{payload:t})=>{e.receivedVideoMaxQuality=t}),[""+Aa]:Rd((e,{payload:t})=>{let r=t;Array.isArray(t)||(r=[t]),e.captureCanvasList=r}),[""+Oa]:Rd((e,{payload:t})=>{e.isVideoMuted=t}),[""+Ca]:Rd((e,{payload:t})=>{e.isCaptureCameraLoading=t}),[""+Ta]:Rd((e,{payload:t})=>{e.isCameraTaken=t}),[""+Ra]:Rd((e,{payload:t})=>{e.isVerifiedVideoCaptureCanvasAfterFailover=t}),[""+wa]:Rd((e,{payload:t})=>{e.isVerifiedVideoRenderCanvasAfterFailover=t}),[""+Da]:Rd((e,{payload:t})=>{e.receivedVideoDimension=t}),[""+Pa]:Rd((e,{payload:t})=>{e.subscribedVideoList.includes(t)||e.subscribedVideoList.push(t)}),[""+Ma]:Rd((e,{payload:t})=>{const r=e.subscribedVideoList.indexOf(t);r>=0&&e.subscribedVideoList.splice(r,1)}),[""+Va]:Rd((e,{payload:t})=>{-1===e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key&&e.canvasId===t.canvasId)&&e.renderedVideoList.push(d({},t))}),[""+La]:Rd((e,{payload:t})=>{const r=e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key&&e.canvasId===t.canvasId);r>=0&&e.renderedVideoList.splice(r,1)}),[""+ka]:Rd((e,{payload:t})=>{e.isFollowHostVideoLayout=t}),[""+Ua]:Rd((e,{payload:t})=>{e.hostDragLayout=t}),[""+ja]:Rd((e,{payload:t})=>{e.isSupportHDVideo=t}),[""+Ha]:Rd((e,{payload:t})=>{e.highDefinitionVideoId=t}),[""+Na]:e=>d(d({},Lu),{},{captureCanvasList:e.captureCanvasList,activeCamera:e.activeCamera,isVerifiedVideoCaptureCanvasAfterFailover:!1,isVerifiedVideoRenderCanvasAfterFailover:!1})},Lu),Hu=an(Vu),{InitSuccessVideo:xu,InitSuccessAudio:Fu,InitSuccessSharing:Gu,InitFailedVideo:Bu,InitFailedAudio:Wu,InitFailedSharing:Ku}=vi;let qu;const zu=new z(sn(cu,Eu,mu,an(Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(Mt(""+Jr),Tt(t),Je(([,e])=>void 0!==e.media.assetsPath&&void 0!==e.media.mediaConstraints),At(([,e])=>{const{media:{assetsPath:r,mediaConstraints:n},meeting:{enableQos:o}}=e;qu=si.getInstance(),r&&n&&qu.setAssetsAndConstraint(r,n);const i=Cs(e);let s;s=i?se(i):$i("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1).pipe(ue(ge),Tt(t),Ae(([,e])=>Cs(e))),s.pipe(Tt(t)).subscribe(([e,t])=>{const{meeting:{svcUrl:r,meetingNumber:n,conId:i,e2eEncrypt:s,userId:a,isWebinar:c}}=t;var d;e&&(null===(d=qu)||void 0===d||d.connect({svcUrl:r,meetingNumber:n,conId:i,e2eEncrypt:s,isViewOnly:gs(e.userRole),currentUserId:a,isWebinar:c,enableQos:o}))})}),bt(()=>We(e=>{var t;return null===(t=qu)||void 0===t?void 0:t.registerCallback(e)},e=>{var t;return null===(t=qu)||void 0===t?void 0:t.unregisterCallback(e)},(e,t)=>({type:e,data:t})).pipe(Ae(e=>Yr(e))))),connectedMediaStreamEpic:e=>ln(e,[xu,Fu,Gu,Bu,Wu,Ku]).pipe(wc(e=>{const{payload:{type:t,data:r}}=e;if(t===Fu||t===Wu){if(r===Ei.EncodeSuccess)return Xi("AUDIO_ENCODE_SUCCESS"),se(Xr("success"));if(r===Ei.DecodeSuccess)return Xi("AUDIO_DECODE_SUCCESS"),se(Zr("success"));if(r===Ei.EncodeFailed)return Xi("AUDIO_ENCODE_FAIL"),se(Xr("failed"));if(r===Ei.DecodeFailed)return Xi("AUDIO_DECODE_FAIL"),se(Zr("failed"))}else if(t===xu||t===Bu){if(r===Ei.EncodeSuccess)return Xi("VIDEO_ENCODE_SUCCESS"),se(Qr("success"));if(r===Ei.DecodeSuccess)return Xi("VIDEO_DECODE_SUCCESS"),se($r("success"));if(r===Ei.EncodeFailed)return Xi("VIDEO_ENCODE_FAIL"),se(Qr("failed"));if(r===Ei.DecodeFailed)return Xi("VIDEO_DECODE_FAIL"),se($r("failed"))}else if(t===Gu||t===Ku){if(r===Ei.EncodeSuccess)return Xi("SHARING_ENCODE_SUCCESS"),se(en("success"));if(r===Ei.DecodeSuccess)return Xi("SHARING_DECODE_SUCCESS"),se(tn("success"));if(r===Ei.EncodeFailed)return Xi("SHARING_ENCODE_FAIL"),se(en("failed"));if(r===Ei.DecodeFailed)return Xi("SHARING_DECODE_FAIL"),se(tn("failed"));if(t===Gu&&void 0===r)return Xi("SHARING_DECODE_SUCCESS"),se(tn("success"))}})),mediaDeviceUpdateEpic:(e,t)=>ln(e,[xu,Fu]).pipe(Rc(()=>{if("object"==typeof navigator.mediaDevices)return qe(Cu(),qe(ln(e,vi.StartVideoCaptureSuccess),Be(navigator.mediaDevices,"devicechange"),ln(e,vi.UserGrantCaptureAudio)).pipe(Ue(()=>Cu().pipe(At(()=>{Xi("MEDIA_DEVICE_CHANGE")}))))).pipe(Tt(t),Ue(([e,t])=>{const r=[zs(e.microphones),Js(e.speakers),ya(e.cameras)];if(t.audio){const{audio:{activeMicrophone:i,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:c}}=t,{microphones:d,speakers:u}=e,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 n,o;l.length>0&&l[0].deviceId===i&&(null===(n=qu)||void 0===n||n.changeMicrophone("default"),r.push(Ys("default"))),p.length>0&&p[0].deviceId===s&&(null===(o=qu)||void 0===o||o.changeSpeaker("default"),r.push(Xs("default")))}return ke(r)}))})),sendUserNodeListToMediaSDKEpic:e=>cn(e,7937).pipe(At(e=>{const{payload:{body:t}}=e,r=si.getInstance();t.add&&r.sendUserNodeList(t.add.map(e=>({userid:e.id,sn:e.zoomID&&Xn(e.zoomID)}))),t.remove&&r.sendUserNodeList(t.remove.map(e=>({userid:e.id,bremove:!0})))}),vt($)),handleMediaSdkGcmIVResponseEpic:e=>ln(e,vi.AesGcmIvResponse).pipe(At(e=>{const{payload:{data:{workerType:t,iv:r}}}=e,n=Uo.get(Yo.WebclientIVState);if(n){const e=d(d({},n),{},{[t]:r});Uo.set(Yo.WebclientIVState,e,Mo.SessionStorage)}}),vt($))})))),Ju=(e,t,r)=>zu.pipe(Ue(n=>n(e,t,r))),Yu={meeting:au,socket:vu,participants:bu,media:Au},Xu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Q.constructor,r=new t(Q.SchedulerAction),n=new K,o=void 0,i=function(t){o=t;var i=(new K).pipe(ue(r)),s=(new K).pipe(ue(r)),a=new Ut(i),c=new Vt(s,o.getState());return n.pipe(Ae((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})),Ue((function(e){return ke(e).pipe(gt(r),ue(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}(),Zu=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||S;function Qu(e){return function(e){for(var t=Object.keys(e),r={},n=0;ne.userId===t);if(o.findIndex(e=>e===cl.Attendee)>-1&&(i=Rs(r).find(e=>e.userId===t)),!i)return Promise.reject({type:Gi,reason:"no matching user"});{const{meeting:{userId:e}}=n.getState();for(let r=0;r{if(this[rl][e]&&void 0===o.getState()[e]){const{epic:t,reducer:r,Client:n}=this[rl][e];o.injectReducer(e,r),o.injectEpic(t);const i=new n(o);this.modules.set(e,i)}}),(null==n?void 0:n.audio)&&void 0===o.getState().audio&&(o.injectReducer("audio",Du),o.injectEpic(Pu)),(null==n?void 0:n.video)&&void 0===o.getState().video&&(o.injectReducer("video",ju),o.injectEpic(Hu)),(null==n?void 0:n.screen)&&void 0===o.getState().share&&(o.injectReducer("share",Dd),o.injectEpic(Pd))}return n(ao({apiKey:e,signature:t,language:s})),n(rn({mediaConstraints:r&&r.constraints||{},assetsPath:i})),new Promise((e,t)=>{To(c,()=>{e("")},()=>{t({type:Gi,reason:"depedent assets are not accessible"})})})}on(e,t){((e,t)=>{const r=Ki[e];if(r){const n=Ji.get(e);if(n)n.push(t),Ji.set(e,n);else{const n=[t];Ji.set(e,n);const o=qe(...r.map(e=>{const{event:t,payload:r}=e;return Be(qi,t).pipe(Ae(e=>r(e)),ue(ge))})).subscribe(t=>{const r=Ji.get(e);r&&r.forEach(e=>{e(t)})});Yi.push(o)}}})(e,t)}off(e,t){((e,t)=>{if(Ki[e]){const r=Ji.get(e);if(Array.isArray(r)){const n=r.findIndex(e=>e===t);n>-1&&(r.splice(n,1),Ji.set(e,r))}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[el]:e,[tl]:t}=this;return"connected"===e().socket.zoomSocketStatus&&t(no()),Promise.resolve("")}end(){const{[el]:e,[tl]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(oo()),tt(500).pipe(At(()=>{es()}),ht("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[$u].getState(),{meeting:{bAllowAttendeeRename:n}}=r,o=Cs(r),i=gs(o.userRole),s=Ts(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 fl.rename(t,zn(e),zn(o.displayName)),Cc(t,t=>t.displayName===e);{const n=Rs(r).find(e=>e.userId===t);return n?(Fd.getInstance().rename(n.jid,e),Qi("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",t=>{const r=t.find(e=>e.jid===n.jid);return r&&r.name===e})):Promise.reject({type:Gi,reason:"no matching user"})}}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})}return e===o.displayName?Promise.resolve():s||n?(fl.rename(o.userId,zn(e),zn(o.displayName)),Qi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t=>t.displayName===e)):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host disallow rename themselves"})}makeHost(e){return fl.assignHost(e,!1),Cc(e,e=>!0===e.isHost)}makeCoHost(e){const t=this[$u].getState(),r=Ds(t).find(t=>t.userId===e);return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:Gi,reason:`user:[${e}] is already co-host `}):(fl.assignHost(e,!0),Cc(e,e=>!0===e.bCoHost))}revokeCoHost(e){const t=this[$u].getState(),r=Ds(t).find(t=>t.userId===e);return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:Gi,reason:`user:[${e}] is not a co-host`}):(fl.revokeCoHost(e),Cc(e,e=>!1===e.bCoHost))}isHost(){const e=this[$u].getState(),t=Cs(e);return!!t&&t.isHost}isCoHost(){const e=this[$u].getState(),t=Cs(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[el]();return e}getCurrentUserInfo(){const e=this[$u].getState(),t=Cs(e);if(t){const r={userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:Es(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,sharePause:t.sharerPause,feedback:t.feedback};if(e.meeting.isWebinar&&gs(t.userRole)){const{participants:{allowTalkAttendeesList:n}}=e,o=n.find(e=>e.userId===t.userId),i=!!o;Object.assign(r,{isAllowToTalk:i}),o&&Object.assign(r,{audio:o.audio,muted:o.muted})}return r}return null}getParticipantsList(){const e=this[$u].getState(),{meeting:{meetingStatus:t}}=e,r=Cs(e);return"joined"===t&&r&&!r.bHold?Ds(e).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,isPhoneUser:Es(e.userType),bRaiseHand:e.bRaiseHand,bHold:e.bHold,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause,feedback:e.feedback})):[]}getMeetingHost(){const e=this[el](),t=Ps(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:Es(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,encType:a,region:c,network:d,topic:u,zlkJwtToken:l,userId:p}}=this[el](),h="joined"===e&&!t;if(l)return{topic:u,password:n,userName:o,isInMeeting:h,userId:p};{let e="";return 0===a?e="None":1===a?e="AES ECB":2===a&&(e="AES GCM"),{meetingNumber:r,password:n,userName:o,userEmail:i,meetingTopic:s,encryptionType:e,region:c,network:d,isInMeeting:h,userId:p}}}}).prototype,"end",[sl,ol],Object.getOwnPropertyDescriptor(_l.prototype,"end"),_l.prototype),u(_l.prototype,"changeName",[ol],Object.getOwnPropertyDescriptor(_l.prototype,"changeName"),_l.prototype),u(_l.prototype,"makeHost",[ll,sl,ol],Object.getOwnPropertyDescriptor(_l.prototype,"makeHost"),_l.prototype),u(_l.prototype,"makeCoHost",[pl,sl,ol],Object.getOwnPropertyDescriptor(_l.prototype,"makeCoHost"),_l.prototype),u(_l.prototype,"revokeCoHost",[hl,sl,ol],Object.getOwnPropertyDescriptor(_l.prototype,"revokeCoHost"),_l.prototype),_l);!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"}(vl||(vl={})),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"}(El||(El={})),function(e){e[e.None=0]="None",e[e.Delete=1]="Delete",e[e.Modify=2]="Modify"}(yl||(yl={})),function(e){e[e.Success=0]="Success",e[e.Delete=1]="Delete",e[e.Block=3]="Block"}(gl||(gl={}));const bl=[vl.All,vl.Host,vl.NoOne,vl.EveryonePublicly],ml=[vl.NoAttendee,vl.All,vl.AllPanelist],Il={userId:El.All,displayName:"Everyone",isHost:!1,isCoHost:!1},Al={userId:El.Panelist,displayName:"All panelists"},Ol={userId:El.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};var Cl=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>dn(e,"Message").pipe(Tt(t),Ue(([e,t])=>{const{payload:{data:{sn:r,senderName:n,senderJid:o,receiver:i,text:s,type:a}}}=e,c=Cs(t),d=Rs(t),{meeting:{jid:u,userId:l},participants:{xmppAttendeeList:p}}=t;return ei.beginDecrypt({decryptedText:s,type:Jo.XMPP_CHAT,zoomId:r}).then(({message:e})=>{var t;let r=null,s=0,h="";c&&gs(c.userRole)&&u===i?(r=p.find(e=>e.jid===o),s=l,h=c.displayName):a===El.Panelist&&(r=d.find(e=>e.jid===o),s=El.Panelist,h=Al.displayName);const _={message:e,sender:{name:n,userId:(null===(t=r)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:h,userId:s},timestamp:(new Date).getTime()};return Xi("CHAT_RECEIVE_MESSAGE_EVENTS",_),qa(_)})})),receiveChatMessageFromRWGEpic:(e,t)=>cn(e,7944).pipe(Tt(t),Ue(([e,t])=>{const{meeting:{bIbDisableChat:r,isWebinar:n},participants:{attendeesList:o}}=t,{payload:{body:{attendeeNodeID:i,sn:s,destNodeID:a,text:c,senderName:d,msgID:u}}}=e,l=Cs(t),p=Rs(t);if(l){const e=gs(null==l?void 0:l.userRole)&&i===l.userId&&!u;if(!r&&!e){let e,t=s;if(!s){const e=o.find(e=>e.userId===a);e&&(t=e.zoomID)}if(i===El.SilentModeUsers){const t=Jn(c),r={id:u,message:t,sender:{name:"Host",userId:a},receiver:{name:"Everyone (in Waiting Room)",userId:i},timestamp:(new Date).getTime()};e=Promise.resolve(r)}else e=ei.beginDecrypt({decryptedText:c,zoomId:t,type:Jo.RWG_CHAT}).then(({message:e})=>{const t=o.find(e=>e.userId===a),r=d?Jn(d):null==t?void 0:t.displayName;let s="";if(i===El.All)s=n?"All panelists and attendees":"Everyone";else if(i===El.Panelist)s="All panelists";else if(n&&p.findIndex(e=>e.userId===i)>-1)s=p.find(e=>e.userId===i).displayName;else{const e=o.find(e=>e.userId===i);e&&(s=e.displayName)}return{id:u,message:e,sender:{name:r,userId:a,avatar:null==t?void 0:t.avatar},receiver:{name:s,userId:i},timestamp:(new Date).getTime()}});return e.then(e=>(Xi("CHAT_RECEIVE_MESSAGE_EVENTS",e),qa(e)))}}return $})),changePrivilegeResponse:(e,t)=>cn(e,7938).pipe(Je(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)}),Tt(t),Ae(([e,t])=>{const{payload:{body:{chatPriviledge:r,bAllowAttendeeChat:n}}}=e,{chat:{chatPrivilege:o}}=t;return void 0!==n?(Xi("CHAT_PRIVILEGE_CHANGE",!0===n?{chatPrivilege:o}:{chatPrivilege:vl.NoAttendee}),Ja(n)):(Xi("CHAT_PRIVILEGE_CHANGE",{chatPrivilege:r}),Ka(r))})),chatResponseEpic:(e,t)=>cn(e,4136).pipe(Tt(t),Ue(([e,t])=>{const{payload:{body:{result:r,destNodeID:n,msgID:o}}}=e,{meeting:{userId:i}}=t;return r===gl.Success?(Xi("CHAT_MESSAGE_RESPONSE",{msgId:o,receiverId:n}),se(Ya({destNodeID:n,msgID:o,userId:i}))):r===gl.Delete||r===gl.Block?se(Xa({msgId:o})):$})),chatCmdResponseEpic:e=>cn(e,4238).pipe(Ue(e=>{const{payload:{body:{bSuccess:t,cmd:r,msgID:n}}}=e,o=[];if(t)switch(r){case yl.Delete:o.push(Xa({msgId:n})),Xi("CHAT_DELETE_MESSAGE_REPONSE",{id:n})}return ke(o)})),chatCmdIndicationEpic:e=>cn(e,7960).pipe(Ue(e=>{const{payload:{body:{cmd:t,msgID:r}}}=e,n=[];switch(t){case yl.Delete:n.push(Xa({msgId:r})),Xi("CHAT_DELETE_MESSAGE_REPONSE",{id:r})}return ke(n)}))});const Tl={chatHistory:[],chatPrivilege:vl.All,isAllowAttendeeChat:!0},wl=Rr({[""+qa]:Rd((e,{payload:t})=>{e.chatHistory.push(t)}),[""+Ka]:Rd((e,{payload:t})=>{e.chatPrivilege=t}),[""+Ja]:Rd((e,{payload:t})=>{e.isAllowAttendeeChat=t}),[""+Ya]:Rd((e,{payload:t})=>{const{destNodeID:r,msgID:n,userId:o}=t;for(let t=e.chatHistory.length-1;t>=0;t--){const i=e.chatHistory[t];if(!i.id&&i.sender.userId===o&&[El.All,El.Panelist,r].includes(i.receiver.userId)){i.id=n;break}}}),[""+Xa]:Rd((e,{payload:t})=>{const{msgId:r}=t,n=e.chatHistory.findIndex(e=>e.id===r);n>=0&&e.chatHistory.splice(n,1)}),[""+za]:()=>d({},Tl)},Tl);function Rl(e,t,r){if(null==r?void 0:r.host)return[Ps(e),...Ms(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=[Ps(e),...Ms(e),...e.participants.attendeesList.filter(e=>!(e.bCoHost||e.isHost))];if(null==r?void 0:r.includeAttendee){const t=Rs(e).filter(e=>!Es(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 Nl;const Dl=ni.createAgent(),Pl=Fd.getInstance(),Ml=e=>{const{text:t,destId:r,sn:n,attendeeId:o}=e;return ei.beginEncrypt({text:t,type:Jo.RWG_CHAT}).then(e=>{Dl.chat(e,r,n,o)})};let kl=(u((Nl=class extends ul{send(e,t){if(!e)return Promise.reject({type:Gi,reason:"Text is empty"});const{[el]:r,[tl]:n}=this,o=r(),i=Cs(o),s=function(e,t){if(t===El.All)return Il;if(t===El.Panelist)return Al;if(t===El.SilentModeUsers)return Ol;{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?void 0:e.zoomID)||!(null==t?void 0:t.displayName)||n===e.userId)return{type:Gi,reason:"invalid target user"};const{chat:{chatPrivilege:o},meeting:{isWebinar:i}}=r,s=Ts(r),a=t.isHost||t.bCoHost;if(!s)if(i&&gs(e.userRole)){if(o===vl.NoAttendee||o===vl.AllPanelist&&n!==El.Panelist||o===vl.All&&n!==El.All&&n!==El.Panelist)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"}}else if(o===vl.NoAttendee||o===vl.Host&&!a||n===El.SilentModeUsers||o===vl.EveryonePublicly&&n!==El.All&&!a)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"};return null})(i,s,o);if(a)return Promise.reject(a);const{meeting:{isWebinar:c,encType:u}}=o,l=u===zo.AES_GCM;let p=Promise.resolve(),h=!1;return t===El.SilentModeUsers?Dl.chat(zn(e),t):c?s.userRole===fs.Attendee?8==(8&s.clientCap)?p=Ml({text:e,destId:El.IndividualCcPanelist,sn:null==i?void 0:i.zoomID,attendeeId:t}):(p=Ml({text:e,destId:El.Panelist,sn:null==i?void 0:i.zoomID,attendeeId:t}).then(()=>(e=>{const{text:t,jid:r,isGCMEnabled:n}=e;return ei.beginEncrypt({text:t,type:Jo.XMPP_CHAT}).then(e=>{Pl.sendWebinarMsg(e,r,El.IndividualCcPanelist,n)})})({text:e,jid:s.jid,isGCMEnabled:l})),h=!0):s&&(p=Ml({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID})):p=Ml({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID}),p.then(()=>{const r={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:(new Date).getTime()};return n(qa(r)),h?(Xi("CHAT_RECEIVE_MESSAGE_EVENTS",r),r):Qi("CHAT_MESSAGE_RESPONSE",e=>({ret:[e.receiverId,El.All,El.Panelist].includes(t)||e.receiverId===El.IndividualCcPanelist?0:-1,body:e})).then(e=>{const{msgId:t}=e,n=d({id:t},r);return Xi("CHAT_RECEIVE_MESSAGE_EVENTS",n),n})})}setPrivilege(e){const t=this[el](),{meeting:{isWebinar:r},chat:{chatPrivilege:n}}=t;return n===e?Promise.resolve(""):!r&&!bl.includes(e)||r&&!ml.includes(e)?Promise.reject({type:Gi,reason:"invalid privilege value of parameter"}):(Dl.setChatPriviledge(e),Qi("CHAT_PRIVILEGE_CHANGE",t=>t.chatPrivilege===e))}deleteMessage(e){const t=this[el](),{chat:{chatHistory:r},meeting:{meetingOptions:n,userId:o}}=t;if(null==n?void 0:n.isEnableDeleteChatMsg){const n=Ts(t),i=r.find(t=>t.id===e);if(i){const{sender:t}=i;if(n)Dl.chatCmdReq(e,yl.Delete);else{if(t.userId!==o)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"can not delete message"});Dl.chatCmdReq(e,yl.Delete)}return Qi("CHAT_DELETE_MESSAGE_REPONSE",t=>t.id===e).then(()=>({id:e}))}return Promise.reject({type:Gi,reason:"msgId is wrong"})}return Promise.reject({type:Fi,reason:"can not delete messages"})}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[el]();return t?e:vl.NoAttendee}getReceivers(){const e=this[el](),{chat:{chatPrivilege:t,isAllowAttendeeChat:r},meeting:{isWebinar:n}}=e;if(!r)return[];const o=Cs(e);if(o)if(n){if(!gs(o.userRole)){const t=Rl(e,o.userId,{includeAttendee:!0});return[Al,Il,...t]}if(t===vl.All)return[Al,Il];if(t===vl.AllPanelist)return[Al];if(t===vl.NoAttendee)return[]}else{const r=Ts(e);if(t===vl.All||r){const t=Rl(e,o.userId);return[Il,...t]}if(t===vl.Host)return Rl(e,o.userId,{host:!0});if(t===vl.EveryonePublicly){const t=Rl(e,o.userId,{host:!0});return[Il,...t]}if(t===vl.NoOne)return[]}return[]}getHistory(){return this[el]().chat.chatHistory.map(e=>d({},e))}isAllowToDeleteMessages(){const e=this[el](),{meeting:{meetingOptions:t}}=e;return null==t?void 0:t.isEnableDeleteChatMsg}}).prototype,"send",[ol],Object.getOwnPropertyDescriptor(Nl.prototype,"send"),Nl.prototype),u(Nl.prototype,"setPrivilege",[il,ol],Object.getOwnPropertyDescriptor(Nl.prototype,"setPrivilege"),Nl.prototype),u(Nl.prototype,"deleteMessage",[ol],Object.getOwnPropertyDescriptor(Nl.prototype,"deleteMessage"),Nl.prototype),Nl);const Ul=an(Cl),Vl=(e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{meeting:{bIbDisableShare:s},share:{sharePrivilege:a,ssrc:c,isChromeExtensionInstalled:u,isVerifiedCaptureCanvasAfterFailover:l},media:{sharingEncodeStatus:p}}=i;if(s)return Promise.reject({type:Fi,reason:"information barrier"});const h=Ts(i),_=Mc(i);if(a===bi.OnlyHost&&!h)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can start screen share"});if(a===bi.HostGrab&&!h&&_.length>0)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can grab screen share"});const f=Cs(i);if(!0===(null==f?void 0:f.sharerOn))return Promise.reject({type:Fi,reason:"you have already started screen share."});let v=se(!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&&!u&&(o.checkChromeSharingExtension(),v=$i("SHARE_CHECK_CHROME_SHARING_EXTENSION",1)),t.id||(t.id="__ZOOM_SDK_SHARE_CANVAS_@__".replace("@",""+Math.floor(1e4*Math.random()))),Fe([Ou("sharing",p,"success"),v]).subscribe(([e,r])=>{const[i]=e;if(i&&r){!1===l&&(Tu(t),n(ha(!0)));let e=document.querySelector("#__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)),o.startDesktopSharing(c,t.id,"__ZOOM_SDK_SHARING_VIDEO__")}}),new Promise((e,t)=>{Qe($i("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1),$i("SHARE_CHECK_CHROME_SHARING_EXTENSION").pipe(Je(e=>!e),ut(1),vt(ae({reason:"required extension",extensionUrl:"https://chrome.google.com/webstore/detail/zoom-scheduler/kgjfgplpablkjnlkjmjdecgdpfankdle"}))),$i("SHARE_START_DESKTOP_SHARE_FAILED",1).pipe(vt(ae({reason:"user deny screen share"})))).subscribe(r=>{!0===r.sharerOn?e(""):t({type:"INTERNAL_ERROR"})},e=>{t(d({type:Fi},e))})})},Ll=ps([Ds],e=>e.filter(e=>e.bVideoOn));var jl,Hl,xl,Fl,Gl,Bl,Wl,Kl,ql,zl,Jl,Yl,Xl,Zl,Ql,$l,ep,tp,rp,np,op,ip,sp,ap;let cp=(jl=al("audio"),Hl=al("audio"),xl=al("audio"),Fl=al("audio"),Gl=al("audio"),Bl=al("audio"),Wl=al("video"),Kl=al("video"),ql=al("video"),zl=al("video"),Jl=al("video"),Yl=al("video"),Xl=al("video"),Zl=al("video"),Ql=al("share"),$l=al("share"),ep=al("share"),tp=al("share"),rp=al("share"),np=al("share"),op=al("share"),ip=al("share"),dp="isShareOptionLocked",sp=function(e,t,r){const n=r.value;r.value=function(...e){const t=this[$u];if(t){const{meeting:{meetingOptions:e}}=t.getState();if(!0===e[dp])return Promise.reject({type:"OPERATION_LOCKED",reason:dp+" is locked"})}return n.apply(this,e)}},u((ap=class extends ul{constructor(e){super(e),this[$u].dispatch(Jr()),this[nl]={store:e,mediaAgent:si.getInstance(),rwgAgent:ni.createAgent()}}startAudio(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n}=e,o=t(),i=Cs(o);if("computer"===(null==i?void 0:i.audio))return Promise.resolve();if("phone"===(null==i?void 0:i.audio))return Promise.reject({type:Fi,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:t,canPlayAudio:s},media:{audioDecodeStatus:a,audioEncodeStatus:c}}=o;if(t)return Promise.reject({type:Fi,reason:"Computer audio has been loading, please wait."});if(i){r($s(!0));const{userRole:t}=i,o=gs(t);Ou("audio",o&&!e?"success":c,a).subscribe(([e,t])=>{if(e&&t){let e=s?Promise.resolve():function(){const e=document.createElement("audio");return e.muted=!1,e.volume=.1,e.src=URL.createObjectURL(Si),e.play()}();void 0===e&&(e=Promise.resolve()),e.then(()=>{n.joinOrLeaveVoip(!0)}).catch(()=>{r(Zs(!1))})}})}return"failed"===c||"failed"===a?(r($s(!1)),Promise.reject({type:"INTERNAL_ERROR",reason:"audio encode or decode error"})):new Promise((e,t)=>{Qe($i(Li.JoinComputerAudio.success,1),qe(...Li.JoinComputerAudio.fail.map(e=>$i(e,1).pipe(Ue(()=>ae({type:"INSUFFICIENT_PRIVILEGES",reason:e}))))),tt(3e4).pipe(Ue(()=>ae({type:"OPERATION_TIMEOUT"})))).subscribe(()=>{r($s(!1)),e("")},e=>{n.joinOrLeaveVoip(!1),r($s(!1)),t(e)})})}})(this[nl])}stopAudio(){return(e=>{const{store:{getState:t,dispatch:r},mediaAgent:n,rwgAgent:o}=e,i=t(),{audio:{isComputerAudioLoading:s}}=i,a=Cs(i);return s?Promise.reject({type:Fi,reason:"Computer audio has not finished joining, please wait."}):"computer"===(null==a?void 0:a.audio)?(n.leaveComputerAudio(),o.joinOrLeaveVoip(!1),r(qs(0)),Qi("AUDIO_CURRENT_USER_LEAVE_AUDIO")):Promise.resolve("")})(this[nl])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=Cs(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:Fi,reason:"no audio joined"}):!0===(null==a?void 0:a.muted)?Promise.resolve(""):(n(Fs(!0)),o.mute(a.userId,!0),Qi("AUDIO_CURRENT_USER_MUTED").then(()=>(i.muteAudio(),"")));if(Ts(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:Fi,reason:"no audio joined"}):!1===n.muted?(o.mute(t,!0),Qi("AUDIO_PARTICIPANT_AUDIO_UPDATE",e=>e.id===t&&1==e.muted)):Promise.resolve(""):Promise.reject({type:Gi,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[nl],e)}unmuteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=Cs(s);if(void 0===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:Fi,reason:"no audio joined"}):!1===(null==a?void 0:a.muted)?Promise.resolve(""):(n(Fs(!0)),s.audio.bCanUnmute?(o.mute(a.userId,!1),Qi("AUDIO_CURRENT_USER_UNMUTED").then(()=>(i.unmuteAudio(),""))):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host not allow unmute themselves"}));if(Ts(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:Fi,reason:"no audio joined"}):(!0===n.muted&&o.mute(t,!1),Promise.resolve("")):Promise.reject({type:Gi,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[nl],e)}switchMicrophone(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{microphoneDevicesList:i,activeMicrophone:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeMicrophone(t),n(Ys(t))),Promise.resolve(""))})(this[nl],e)}switchSpeaker(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{speakerDevicesList:i,activeSpeaker:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeSpeaker(t),n(Xs(t))),Promise.resolve(""))})(this[nl],e)}getMicList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.microphoneDevicesList]:[]})(this[nl])}getSpeakerList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.speakerDevicesList]:[]})(this[nl])}isAudioMuted(e){return(({store:{getState:e}},t)=>{const r=e(),{meeting:{isWebinar:n}}=r;let o=null;return void 0===t?o=Cs(r):(o=r.participants.attendeesList.find(e=>e.userId===t),n&&!o&&(o=r.participants.xmppAttendeeList.find(e=>e.userId===t))),!!o&&!!o.muted})(this[nl],e)}getActiveMicrophone(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeMicrophone:null})(this[nl])}getActiveSpeaker(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeSpeaker:null})(this[nl])}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}}=i;return l?Promise.reject({type:Fi,reason:"Video is started"}):u?Promise.reject({type:Fi,reason:"Camera is starting,please wait."}):p&&!Ts(i)?Promise.reject({type:Fi,reason:"Video is muted by the host"}):(n(Ca(!0)),Ou("video",a,s).subscribe(([e])=>{if(e){const{cameraId:e=d,captureWidth:r=640,captureHeight:i=360,videoDOMId:s}=t||{};o.startCaptureVideo(c,e,r,i,s),d!==e&&n(ga(e))}else n(Ca(!1))}),Zi(Mi).then(()=>{n(Ta(!1)),n(ma(!1))}).finally(()=>{n(Ca(!1))}))})(this[nl],e)}stopVideo(){return(e=>{const{store:{getState:t},mediaAgent:r}=e,{video:{isCaptureCameraLoading:n,isCurrentUserStartedVideo:o}}=t();return n?Promise.reject({type:Fi,reason:"Camera is starting,please wait."}):o?(r.stopCaptureVideo(),Qi("VIDEO_CAPTURE_STOP_RESULT",e=>!0!==(null==e?void 0:e.failed))):Promise.reject({type:Fi,reason:"carmera is closed"})})(this[nl])}switchCamera(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{video:{cameraDevicesList:s,isCurrentUserStartedVideo:a}}=i;return-1===s.map(e=>e.deviceId).indexOf(t)?Promise.reject({type:Gi,reason:"Cannot find cameraDeviceId in camera devices list."}):(a&&o.changeCamera(t),n(ga(t)),Promise.resolve())})(this[nl],e)}renderVideo(e,t,r,n,o,i,s,a){return((e,t,r,n,o,i,s,a,c,d)=>{const{store:{getState:u,dispatch:l},mediaAgent:p,rwgAgent:h}=e,_=u(),{meeting:{userId:f},video:{subscribedVideoList:v}}=_;if(!t)return Promise.reject({type:Gi,reason:"Received canvas is falsy"});if(!v.includes(r)&&v.length>=9)return Promise.reject({type:Fi,reason:"subscribe video counts greater than maximum size (9)"});if(-1===Ll(_).findIndex(e=>e.userId===r))return Promise.reject({type:Gi,reason:"user is not send video"});const{media:{videoDecodeStatus:E}}=_;return t.id||(t.id="__ZOOM_SDK_VIDEO_CANVAS_@__".replace("@",""+Math.floor(1e4*Math.random()))),Ou("video","success",E).subscribe(([e])=>{if(e){const{video:{isVerifiedVideoRenderCanvasAfterFailover:e,highDefinitionVideoId:d,isSupportHDVideo:_,renderedVideoList:E}}=u();let y=t;!1===e&&(y=Tu(t),l(wa(!0)));const g=r===f,S=c||"__ZOOM_SDK_VIDEO_ZONE__";let b=a;a===Ii.Video_720P&&(_?d?d!==r&&(console.warn("Web Video SDK only supports subscribing one 720P video stream, will downgrade to 360P stream"),b=Ii.Video_360P):l(Ha(r)):(console.warn("Can not subscribe 720P video stream,will downgrade to 360P stream"),b=Ii.Video_360P)),E.some(e=>e.userId===r&&e.key===S&&e.canvasId===y.id)||p.renderVideo(y.id,r,S,n,o,i,s,b,g,"",!1),r===d&&b===Ii.Video_720P||h.subscribeVideo(r,b,!1),v.includes(r)||l(Pa(r)),d===r&&b!==Ii.Video_720P&&l(Ha(void 0)),l(Va({userId:r,key:S,canvasId:y.id}))}}),"failed"===E?Promise.reject({type:"INTERNAL_ERROR",reason:"Video decode status is failed"}):Promise.resolve("")})(this[nl],e,t,r,n,o,i,s,a)}stopRenderVideo(e,t,r,n,o=!1){return((e,t,r,n,o,i=!1)=>{const{store:{getState:s,dispatch:a},mediaAgent:c,rwgAgent:d}=e,u=s(),{video:{subscribedVideoList:l,renderedVideoList:p,highDefinitionVideoId:h}}=u;if(!t||!t.id)return Promise.reject({type:Gi,reason:"canvas is falsy"});if(l.includes(r)){let e=o;e||(e={R:0,G:0,B:0,A:0});const s=n||"__ZOOM_SDK_VIDEO_ZONE__";p.find(e=>e.userId===r&&e.key===s)&&(c.stopRenderVideo(t.id,r,s,e,i),1==p.filter(e=>e.userId===r).length&&(d.unsubscribeVideo(r),a(Ma(r)),h===r&&a(Ha(void 0))),a(La({userId:r,key:s,canvasId:t.id})))}return Promise.resolve("")})(this[nl],e,t,r,n,o)}updateVideoCanvasDimension(e,t,r){return((e,t,r,n)=>{const{mediaAgent:o}=e;return t&&t.id?(o.updateRenderedVideoCanvasDimension(t.id,r,n),Promise.resolve("")):Promise.reject({type:Gi,reason:"canvas is falsy"})})(this[nl],e,t,r)}adjustRenderedVideoPosition(e,t,r,n,o,i,s){return((e,t,r,n,o,i,s,a)=>{const{store:{getState:c},mediaAgent:d}=e;if(!t||!t.id)return Promise.reject({type:Gi,reason:"canvas is falsy"});const{video:{subscribedVideoList:u}}=c();return u.includes(r)?(d.adjustRenderedVideoPosition(t.id,r,a||"__ZOOM_SDK_VIDEO_ZONE__",i,s,n,o),Promise.resolve("")):Promise.reject({type:Gi,reason:"userId is not correct"})})(this[nl],e,t,r,n,o,i,s)}clearVideoCanvas(e,t){return((e,t,r)=>{const{mediaAgent:n}=e;if(!t||!t.id)return Promise.reject({type:Gi,reason:"canvas is falsy"});let o=r;return o||(o={R:0,G:0,B:0,A:0}),n.clearVideoCanvas(t.id,o),Promise.resolve("")})(this[nl],e,t)}isCapturingVideo(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCurrentUserStartedVideo})(this[nl])}isCameraTaken(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCameraTaken})(this[nl])}isCaptureForbidden(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCaptureForbidden})(this[nl])}getCameraList(){return(e=>{const{store:{getState:t}}=e,r=t();if(!r.video)return[];const{video:{cameraDevicesList:n}}=r;return n.map(e=>Object.assign({},e))})(this[nl])}getActiveCamera(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeCamera:""})(this[nl])}getActiveVideoId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeVideoId:0})(this[nl])}getVideoMaxQuality(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.receivedVideoMaxQuality:Ii.Video_90P})(this[nl])}getReceivedVideoDimension(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.receivedVideoDimension:null})(this[nl])}isSupportMultipleVideos(){return"function"==typeof OffscreenCanvas&&"function"==typeof SharedArrayBuffer}isSupportHDVideo(){return(e=>{var t;const{store:{getState:r}}=e;return null===(t=r().video)||void 0===t?void 0:t.isSupportHDVideo})(this[nl])}startShareView(e,t){return((e,t,r,n)=>{const{store:{getState:o,dispatch:i},mediaAgent:s,rwgAgent:a}=e,{share:{isReceiveSharing:c,isRemoteSharingActive:d,activeNodeId:u,activeSsrc:l,shareQuality:p,status:h,isVerifiedRenderCanvasAfterFailover:_},media:{sharingDecodeStatus:f}}=o();if(!t||r!==u)return Promise.reject({type:Gi,reason:""});if(!d||c||h!==mi.End)return Promise.reject({type:Fi,reason:""});return Ou("sharing","success",f).subscribe(([,e])=>{if(e){let e=t;!1===_&&(e=Tu(t),i(pa(!0))),i(ra(!0)),a.subscribeSharing(r,p),s.renderSharing(l,e,!1,n)}}),"failed"===f?Promise.reject({type:"INTERNAL_ERROR",reason:""}):Qi("SHARE_RECEIVED_DIMENSION_CHANGE",e=>!!e,6e4)})(this[nl],e,t)}stopShareView(){return(e=>{const{store:{dispatch:t,getState:r},rwgAgent:n,mediaAgent:o}=e,{share:{isReceiveSharing:i,activeNodeId:s}}=r();return i?(o.stopRenderSharing(),n.unsubscribeSharing(s),t(ra(!1)),Promise.resolve("")):Promise.resolve("")})(this[nl])}switchShareView(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),{share:{isReceiveSharing:a,activeNodeId:c,isRemoteControlApproved:d,isGrabRemoteControl:u,shareQuality:l}}=s;return a?t===c?Promise.resolve(""):Mc(s).findIndex(e=>e.userId===c)>-1?(d&&(u&&o.subscribeGrabRemoteControl(c,!1),o.sharingRequestRemoteControl(c,!1)),o.unsubscribeSharing(c),o.subscribeSharing(t,l),i.switchSharingSource(t),n(ta({bStatus:1,activeNodeID:t,ssrc:t})),Promise.resolve("")):Promise.reject({type:Gi,reason:"no matching user id"}):Promise.reject({type:Fi})})(this[nl],e)}updateSharingCanvasDimension(e,t){return((e,t,r)=>{const{store:{getState:n},mediaAgent:o}=e,i=n(),{share:{isReceiveSharing:s}}=i;return s&&o.updateRenderedSharingDimension(t,r),Promise.resolve("")})(this[nl],e,t)}startShareScreen(e){return Vl(this[nl],e)}stopShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n,mediaAgent:o}=e,{share:{status:i},meeting:{userId:s}}=t();return i===mi.End?Promise.resolve(""):(r(sa(mi.End)),n.stopSharing(s),o.stopDesktopSharing(),Qi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!1===e.sharerOn))})(this[nl])}pauseShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n,mediaAgent:o}=e,{share:{status:i}}=t();return i===mi.Sharing?(n.pauseSharing(),o.pauseDesktopSharing(),Qi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerPause).then(()=>(r(sa(mi.Paused)),""))):Promise.reject({type:Fi})})(this[nl])}resumeShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n,mediaAgent:o}=e,{share:{status:i}}=t();return i===mi.Paused?(n.resumeSharing(),o.resumeDesktopSharing(),Qi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerOn&&!1===e.sharerPause).then(()=>(r(sa(mi.Sharing)),""))):Promise.reject({type:Fi})})(this[nl])}lockShare(e){return((e,t)=>((e,t)=>{const{store:{getState:r},rwgAgent:n}=e,{share:{sharePrivilege:o}}=r();return o===t?Promise.resolve(""):Object.values(bi).includes(t)?(n.lockSharing(t),Qi("UPDATE_MEETING_ATTRIBUTE",e=>e.lockShare===t)):Promise.reject({type:Gi})})(e,t?bi.OnlyHost:bi.HostGrab))(this[nl],e)}getShareUserList(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?Mc(r).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause})):[]})(this[nl])}getActiveShareUserId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share&&r.share.isRemoteSharingActive?r.share.activeNodeId:0})(this[nl])}isReceiveSharing(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.share&&r.share.isReceiveSharing})(this[nl])}getSharedContentDimension(){return(e=>{const{store:{getState:t}}=e,r=t();if(r.share){if(r.share.status!==mi.End)return d({},r.share.shareDimension);{const{share:{receivedShareDimension:e}}=r;return{width:e.width,height:e.height}}}return null})(this[nl])}getShareStatus(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?r.share.status:null})(this[nl])}}).prototype,"startAudio",[ol,jl],Object.getOwnPropertyDescriptor(ap.prototype,"startAudio"),ap.prototype),u(ap.prototype,"stopAudio",[ol,Hl],Object.getOwnPropertyDescriptor(ap.prototype,"stopAudio"),ap.prototype),u(ap.prototype,"muteAudio",[ol,xl],Object.getOwnPropertyDescriptor(ap.prototype,"muteAudio"),ap.prototype),u(ap.prototype,"unmuteAudio",[ol,Fl],Object.getOwnPropertyDescriptor(ap.prototype,"unmuteAudio"),ap.prototype),u(ap.prototype,"switchMicrophone",[ol,Gl],Object.getOwnPropertyDescriptor(ap.prototype,"switchMicrophone"),ap.prototype),u(ap.prototype,"switchSpeaker",[ol,Bl],Object.getOwnPropertyDescriptor(ap.prototype,"switchSpeaker"),ap.prototype),u(ap.prototype,"startVideo",[ol,Wl],Object.getOwnPropertyDescriptor(ap.prototype,"startVideo"),ap.prototype),u(ap.prototype,"stopVideo",[ol,Kl],Object.getOwnPropertyDescriptor(ap.prototype,"stopVideo"),ap.prototype),u(ap.prototype,"switchCamera",[ol,ql],Object.getOwnPropertyDescriptor(ap.prototype,"switchCamera"),ap.prototype),u(ap.prototype,"renderVideo",[ol,zl],Object.getOwnPropertyDescriptor(ap.prototype,"renderVideo"),ap.prototype),u(ap.prototype,"stopRenderVideo",[ol,Jl],Object.getOwnPropertyDescriptor(ap.prototype,"stopRenderVideo"),ap.prototype),u(ap.prototype,"updateVideoCanvasDimension",[ol,Yl],Object.getOwnPropertyDescriptor(ap.prototype,"updateVideoCanvasDimension"),ap.prototype),u(ap.prototype,"adjustRenderedVideoPosition",[ol,Xl],Object.getOwnPropertyDescriptor(ap.prototype,"adjustRenderedVideoPosition"),ap.prototype),u(ap.prototype,"clearVideoCanvas",[ol,Zl],Object.getOwnPropertyDescriptor(ap.prototype,"clearVideoCanvas"),ap.prototype),u(ap.prototype,"startShareView",[ol,Ql],Object.getOwnPropertyDescriptor(ap.prototype,"startShareView"),ap.prototype),u(ap.prototype,"stopShareView",[ol,$l],Object.getOwnPropertyDescriptor(ap.prototype,"stopShareView"),ap.prototype),u(ap.prototype,"switchShareView",[ol,ep],Object.getOwnPropertyDescriptor(ap.prototype,"switchShareView"),ap.prototype),u(ap.prototype,"updateSharingCanvasDimension",[ol,tp],Object.getOwnPropertyDescriptor(ap.prototype,"updateSharingCanvasDimension"),ap.prototype),u(ap.prototype,"startShareScreen",[ol,rp],Object.getOwnPropertyDescriptor(ap.prototype,"startShareScreen"),ap.prototype),u(ap.prototype,"stopShareScreen",[ol,np],Object.getOwnPropertyDescriptor(ap.prototype,"stopShareScreen"),ap.prototype),u(ap.prototype,"pauseShareScreen",[ol,op],Object.getOwnPropertyDescriptor(ap.prototype,"pauseShareScreen"),ap.prototype),u(ap.prototype,"resumeShareScreen",[ol,ip],Object.getOwnPropertyDescriptor(ap.prototype,"resumeShareScreen"),ap.prototype),u(ap.prototype,"lockShare",[il,sp,ol],Object.getOwnPropertyDescriptor(ap.prototype,"lockShare"),ap.prototype),ap);var dp,up;const lp={chat:{epic:Ul,reducer:wl,Client:kl}},pp=ni.createAgent();let hp=(u((up=class extends Sl{constructor(e){super(e),this.mediaStream=void 0,this[rl]=lp}getMediaStream(){return void 0===this.mediaStream&&(this.mediaStream=new cp(this[$u])),this.mediaStream}joinInstant(e,t,r,n,o){const{[el]:i,[tl]:s}=this,{meeting:{lang:a,meetingStatus:c},socket:{zoomSocketStatus:d}}=i();return t?"initial"===c&&"closed"===d?(s(eo({topic:e,password:o||"",userName:r,zlk:t,lang:a,cv:n})),Zi(ci)):Promise.reject({type:Fi,reason:"duplicated operation"}):Promise.reject({type:Fi,reason:"invalid signature"})}removeUser(e){const t=this[$u].getState(),{participants:{attendeesList:r}}=t;return r.find(t=>t.userId===e)?(pp.expel(e),Qi("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t=>t.some(t=>t.userId===e))):Promise.reject({type:Gi,reason:"no matched user"})}}).prototype,"removeUser",[il,ol],Object.getOwnPropertyDescriptor(up.prototype,"removeUser"),up.prototype),up);class _p{constructor(e){this.instant=void 0,this.context=void 0,this.script=void 0,this.mic=void 0,this.instant=0,this.context=e,this.mic=null,this.script=e.createScriptProcessor(2048,1,1),this.script.onaudioprocess=e=>{const t=e.inputBuffer.getChannelData(0);let r,n=0;for(r=0;re.stop()),this.audioStream=null,this.isAudioStarted=!1}async toggleMicIsMuted(e){if(e){if(!this.audioContext){const e=window.AudioContext||window.webkitAudioContext;this.audioContext=new e}this.inputMicDetector=new _p(this.audioContext),this.inputMicDetector.connectToSource(this.audioStream)}else this.inputMicDetector&&this.inputMicDetector.stop(),this.inputMicDetector=null;this.isMicUnmuted=e}getAudioConstraints(){return{audio:""===this.deviceId||{deviceId:this.deviceId},video:!1}}}const vp={width:{min:1024,ideal:1280,max:1920},height:{min:576,ideal:720,max:1080},aspectRatio:{ideal:1.777777778}};class Ep{constructor(e=""){this.isVideoStarted=void 0,this.videoStream=void 0,this.deviceId=void 0,this.isVideoStarted=!1,this.videoStream=null,this.deviceId=e}async start(e){if(!e)throw new Error("Video DOM element is falsy");if(this.isVideoStarted||this.videoStream)throw new Error("VideoAlreadyStartedError");const t=async t=>{if(!t||"OverconstrainedError"!==t.name&&"ConstraintNotSatisfiedError"!==t.name)throw t;console.log(`Warning: detected ${t.name} -- trying to fall back to lower aspect ratio`);try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints(!0));return this.tryPlayVideo(e,t)}catch(e){throw e}};try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints());return this.tryPlayVideo(e,t)}catch(e){return t(e)}}async stop(){if(!this.videoStream||!this.isVideoStarted)throw new Error("VideoNotStartedError");this.videoStream.getVideoTracks().forEach(e=>e.stop()),this.videoStream=null,this.isVideoStarted=!1}getVideoConstraints(e=!1){let t=vp;return e?t=""===this.deviceId||{deviceId:this.deviceId}:""!==this.deviceId&&(t.deviceId=this.deviceId),{audio:!1,video:t}}async tryPlayVideo(e,t){if(!e)throw new Error("Video DOM element is falsy");try{this.videoStream=t,e.srcObject=this.videoStream,await e.play(),this.isVideoStarted=!0}catch(e){throw e}}}class yp{static createClient(){if(!this.meetingClient){const e=function(){const e=[Xu],t=f(Qu(),Zu(function(){for(var e=arguments.length,t=new Array(e),r=0;r{void 0===t.asyncReducers[e]&&(t.asyncReducers[e]=r,t.replaceReducer(Qu(t.asyncReducers)))},t.injectEpic=e=>{zu.next(e)},Xu.run(Ju),t}();this.meetingClient=new hp(e)}return this.meetingClient}static destroyClient(){this.meetingClient&&(this.meetingClient.leave().then(()=>{tt(500).subscribe(()=>{es()})}),this.meetingClient=null)}static checkSystemRequirements(){return{audio:jo()&&Ho(),video:jo()&&void 0!==navigator.mediaDevices,screen:jo()&&void 0!==(navigator.mediaDevices&&navigator.mediaDevices).getDisplayMedia}}static getDevices(e){return e?navigator.mediaDevices.enumerateDevices():navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(e=>(e.getTracks().forEach(e=>e.stop()),navigator.mediaDevices.enumerateDevices()))}static createLocalAudioTrack(e=""){return new fp(e)}static createLocalVideoTrack(e=""){return new Ep(e)}}yp.meetingClient=void 0,yp.VERSION="2.0.0";var gp,Sp,bp="https://dmogdx0jrul3u.cloudfront.net/videosdk/".concat("1.1.3","/lib"),mp="https://source.zoom.us/videosdk/".concat("1.1.3","/lib"),Ip="https://jssdk.zoomus.cn/videosdk/".concat("1.1.3","/lib"),Ap=Symbol("stream"),Op=function(){function t(r){e(this,t),this[Ap]=void 0,this[Ap]=r}return r(t,[{key:"startAudio",value:function(){return this[Ap].startAudio()}},{key:"stopAudio",value:function(){return this[Ap].stopAudio()}},{key:"muteAudio",value:function(e){return this[Ap].muteAudio(e)}},{key:"unmuteAudio",value:function(e){return this[Ap].unmuteAudio(e)}},{key:"isAudioMuted",value:function(e){return this[Ap].isAudioMuted(e)}},{key:"getMicList",value:function(){return this[Ap].getMicList()}},{key:"getSpeakerList",value:function(){return this[Ap].getSpeakerList()}},{key:"getActiveMicrophone",value:function(){return this[Ap].getActiveMicrophone()}},{key:"getActiveSpeaker",value:function(){return this[Ap].getActiveSpeaker()}},{key:"switchMicrophone",value:function(e){return this[Ap].switchMicrophone(e)}},{key:"switchSpeaker",value:function(e){return this[Ap].switchSpeaker(e)}},{key:"startVideo",value:function(e){return this[Ap].startVideo(e)}},{key:"stopVideo",value:function(){return this[Ap].stopVideo()}},{key:"renderVideo",value:function(e,t,r,n,o,i,s,a){return this[Ap].renderVideo(e,t,r,n,o,i,s,a)}},{key:"stopRenderVideo",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this[Ap].stopRenderVideo(e,t,r,n,o)}},{key:"updateVideoCanvasDimension",value:function(e,t,r){return this[Ap].updateVideoCanvasDimension(e,t,r)}},{key:"adjustRenderedVideoPosition",value:function(e,t,r,n,o,i,s){return this[Ap].adjustRenderedVideoPosition(e,t,r,n,o,i,s)}},{key:"clearVideoCanvas",value:function(e,t){return this[Ap].clearVideoCanvas(e,t)}},{key:"getCameraList",value:function(){return this[Ap].getCameraList()}},{key:"switchCamera",value:function(e){return this[Ap].switchCamera(e)}},{key:"isCapturingVideo",value:function(){return this[Ap].isCapturingVideo()}},{key:"isCameraTaken",value:function(){return this[Ap].isCameraTaken()}},{key:"getActiveVideoId",value:function(){return this[Ap].getActiveVideoId()}},{key:"getActiveCamera",value:function(){return this[Ap].getActiveCamera()}},{key:"isCaptureForbidden",value:function(){return this[Ap].isCaptureForbidden()}},{key:"getVideoMaxQuality",value:function(){return this[Ap].getVideoMaxQuality()}},{key:"getReceivedVideoDimension",value:function(){return this[Ap].getReceivedVideoDimension()}},{key:"isSupportMultipleVideos",value:function(){return this[Ap].isSupportMultipleVideos()}},{key:"isSupportHDVideo",value:function(){return this[Ap].isSupportHDVideo()}},{key:"startShareView",value:function(e,t){return this[Ap].startShareView(e,t)}},{key:"stopShareView",value:function(){return this[Ap].stopShareView()}},{key:"startShareScreen",value:function(e){return this[Ap].startShareScreen(e)}},{key:"pauseShareScreen",value:function(){return this[Ap].pauseShareScreen()}},{key:"resumeShareScreen",value:function(){return this[Ap].resumeShareScreen()}},{key:"stopShareScreen",value:function(){return this[Ap].stopShareScreen()}},{key:"lockShare",value:function(e){return this[Ap].lockShare(e)}},{key:"isShareLocked",value:function(){return this[Ap].isShareLocked()}},{key:"getActiveShareUserId",value:function(){return this[Ap].getActiveShareUserId()}}]),t}(),Cp=Symbol("chat"),Tp=function(){function t(r){e(this,t),this[Cp]=void 0,this[Cp]=r}return r(t,[{key:"send",value:function(e,t){return this[Cp].send(e,t)}},{key:"sendToAll",value:function(e){return this[Cp].send(e,El.All)}},{key:"setPrivilege",value:function(e){return this[Cp].setPrivilege(e)}},{key:"getPrivilege",value:function(){return this[Cp].getPrivilege()}},{key:"getReceivers",value:function(){return this[Cp].getReceivers().map((function(e){return i({isManager:e.isCoHost},s(e,["isCoHost"]))}))}}]),t}(),wp=function(e){return"string"==typeof e&&e.length>0},Rp=Symbol("Client"),Np=function(){function t(){e(this,t),this[Rp]=void 0,this.stream=void 0,this.chat=void 0,this[Rp]=yp.createClient()}return r(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Global",r=arguments.length>2?arguments[2]:void 0,n="";switch(t){case"Global":n=mp;break;case"CN":n=Ip;break;case"CDN":n=bp;break;default:n=t}return this[Rp].init("","",{language:e,dependentAssets:n,constraints:i({},yp.checkSystemRequirements()),additionalFeatures:["chat"],webEndpoint:r||"zoom.us"})}},{key:"join",value:function(e,t,r,n){return wp(e)&&wp(t)&&wp(r)?e.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of topic is 200"}):r.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of username is 200"}):!n||wp(n)&&!void/^([!@#$%^&*?=]|\w|\d){1,10}$/gi.test(n)?this[Rp].joinInstant(e,t,r,"1.1.3",n):Promise.reject({type:"INVALID_PARAMETERS",reason:"Password can contain English characters, numbers and special characters like !@#$%^&*?=, and the max length of password is 10"}):Promise.reject({type:"INVALID_PARAMETERS",reason:"topic, token and userName must be string and required"})}},{key:"leave",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?this[Rp].end():this[Rp].leave()}},{key:"getSessionInfo",value:function(){var e=this[Rp].getMeetingInfo();return{isInMeeting:e.isInMeeting||!1,password:e.password||"",topic:e.topic,userName:e.userName,userId:e.userId}}},{key:"on",value:function(e,t){this[Rp].on(e,t)}},{key:"off",value:function(e,t){this[Rp].off(e,t)}},{key:"getMediaStream",value:function(){return this.stream||(this.stream=new Op(this[Rp].getMediaStream())),this.stream}},{key:"getChatClient",value:function(){return this.chat||(this.chat=new Tp(this[Rp].getFeatureModule("chat"))),this.chat}},{key:"coverntUser",value:function(e){return{userId:e.userId,avatar:e.avatar||"",displayName:e.displayName,isHost:e.isHost,isManager:e.isCoHost||!1,audio:e.audio,muted:e.muted,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharerPause:e.sharerPause}}},{key:"getCurrentUserInfo",value:function(){var e=this[Rp].getCurrentUserInfo();if(e)return this.coverntUser(e)}},{key:"getUser",value:function(e){var t=this[Rp].getParticipantsList().find((function(t){return t.userId===e}));if(t)return this.coverntUser(t)}},{key:"getAllUser",value:function(){var e=this;return this[Rp].getParticipantsList().map((function(t){return e.coverntUser(t)}))}},{key:"changeName",value:function(e,t){return this[Rp].changeName(e,t)}},{key:"makeHost",value:function(e){return this[Rp].makeHost(e)}},{key:"makeManager",value:function(e){return this[Rp].makeCoHost(e)}},{key:"revokeManager",value:function(e){return this[Rp].revokeCoHost(e)}},{key:"removeUser",value:function(e){return this[Rp].removeUser(e)}},{key:"isHost",value:function(){return this[Rp].isHost()}},{key:"isManager",value:function(){return this[Rp].isCoHost()}}]),t}(),Dp=function(){function t(){e(this,t)}return r(t,null,[{key:"createClient",value:function(){return this.videoClient||(this.videoClient=new Np),this.videoClient}},{key:"destroyClient",value:function(){this.videoClient&&(this.videoClient.leave(),this.videoClient=null)}},{key:"checkSystemRequirements",value:function(){return yp.checkSystemRequirements()}},{key:"getDevices",value:function(e){return yp.getDevices(e)}},{key:"createLocalAudioTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return yp.createLocalAudioTrack(e)}},{key:"createLocalVideoTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return yp.createLocalVideoTrack(e)}}]),t}();Dp.videoClient=void 0,Dp.VERSION="1.1.3",function(e){e[e.All=1]="All",e[e.NoOne=4]="NoOne",e[e.EveryonePublicly=5]="EveryonePublicly"}(gp||(gp={})),function(e){e[e.All=0]="All"}(Sp||(Sp={}));export default Dp;export{Sp as ChatMsgType,gp as ChatPrivilege,Po as ConnectionState,Ni as PassiveStopShareReason,bi as SharePrivilege,mi as ShareStatus,Ai as VideoActiveState,wi as VideoCapturingState,Ii as VideoQuality}; diff --git a/dist/index.js b/dist/index.js old mode 100755 new mode 100644 index 32e8133..1db6fbc --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;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,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(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 u(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}(J),X=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}(),Q=function(e){function t(r,n){void 0===n&&(n=X.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 m(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}(X),Z=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t}(Q))(Y),$=new H((function(e){return e.complete()}));function ee(e){return e?function(e){return new H((function(t){return e.schedule((function(){return t.complete()}))}))}(e):$}function te(e){return e&&"function"==typeof e.schedule}var re,ne=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=_e++;return ve[t]=!0,fe.then((function(){return ye(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){ye(e)}(r),t.scheduled=void 0)},t}(J),ge=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(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}(Ve);function Fe(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),xe(L,e)}function Ge(){return Fe(1)}function Be(){for(var e=[],t=0;t1?n.next(Array.prototype.slice.call(arguments)):n.next(e)}),n,r)}))}function ze(e,t,r){return r?ze(e,t).pipe(Ae((function(e){return w(e)?r.apply(void 0,e):r(e)}))):new H((function(r){var n,o=function(){for(var e=[],t=0;t=0}function Ye(){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 H?e[0]:Fe(r)(ie(e,n))}function Xe(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function Qe(e,t){return function(r){return r.lift(new Ze(e,t))}}var Ze=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new $e(e,this.predicate,this.thisArg))},e}(),$e=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 m(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}(k);function et(e,t,r){return[Qe(t,r)(new H(Pe(e))),Qe(Xe(t,r))(new H(Pe(e)))]}function tt(){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 pt(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}(k),pt=function(e,t){this.time=e,this.notification=t};function ht(e){return function(t){return 0===e?ee():t.lift(new _t(e))}}var _t=function(){function e(e){if(this.total=e,this.total<0)throw new Ie}return e.prototype.call=function(e,t){return t.subscribe(new ft(e,this.total))},e}(),ft=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return m(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}(k);function vt(e){return function(t){return t.lift(new yt(e))}}var yt=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new Et(e,this.value))},e}(),Et=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return m(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(k);function gt(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?xe((function(){return e}),t,r):("number"==typeof t&&(r=t),xe((function(){return e}),r))}function St(){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}(Te),Ut=function(e,t){return e===t||"function"==typeof t&&e===t.toString()},Vt=function(){for(var e=arguments.length,t=Array(e),r=0;r=t.length?r(new zt(a,h,new qt(void 0,e[h]))):Xt(e[h],t[h],r,n,a,h,s);for(;h=0?(Xt(e[o],t[o],r,n,a,o,s),f=Jt(f,c)):Xt(e[o],void 0,r,n,a,o,s)})),f.forEach((function(e){Xt(void 0,t[e],r,n,a,e,s)}))}s.length=s.length-1}else e!==t&&("number"===u&&isNaN(e)&&isNaN(t)||r(new Wt(a,e,t)))}function Qt(e,t,r,n){return n=n||[],Xt(e,t,(function(e){e&&n.push(e)}),r),n.length?n:void 0}function Zt(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,RESET_SOCKET:()=>({})}),Qr=ir("CONNECT_TO_MEDIA_STREAM"),Zr=ir("RECEIVE_PAYLOAD_FROM_MEDIA_SDK"),{setAudioEncodeStatus:$r,setAudioDecodeStatus:en,setVideoEncodeStatus:tn,setVideoDecodeStatus:rn,setSharingEncodeStatus:nn,setSharingDecodeStatus:on,setMediaConstraints:sn,resetMedia:an}=Cr("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","RESET_MEDIA");function cn(e,t,...r){return e(xt.of(...r||[]),t,null)}function un(...e){const t=(...t)=>Ye(...e.map(e=>{const r=e(...t);if(!r)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 r.pipe(st((e,t)=>(setTimeout(()=>{throw e},0),t)))}));try{Object.defineProperty(t,"name",{value:"combineEpics(".concat(e.map(e=>e.name||"").join(", "),")")})}catch(e){}return t}function dn(...e){return un(...e.flatMap(e=>Object.values(e)))}function ln(e,t){return e.pipe(Vt("".concat(xr)),Qe(e=>e.payload.evt===t))}function pn(e,t){return e.pipe(Vt("".concat(Hr)),Qe(e=>e.payload.event===t))}function hn(e,t){return e.pipe(Vt("".concat(xr),"".concat(Br)),Qe(e=>e.payload.evt===t))}function _n(e,t){return e.pipe(Vt("".concat(Zr)),Qe(e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t))}var fn="undefined"!=typeof window&&window,vn="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,yn="undefined"!=typeof global&&global,En=fn||yn||vn;function gn(e,t){return void 0===t&&(t=null),new Cn({method:"GET",url:e,headers:t})}function Sn(e,t,r){return new Cn({method:"POST",url:e,body:t,headers:r})}function bn(e,t){return new Cn({method:"DELETE",url:e,headers:t})}function mn(e,t,r){return new Cn({method:"PUT",url:e,body:t,headers:r})}function In(e,t,r){return new Cn({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!En)throw new Error("RxJS could not find any global context (window, self, global)")}();var An=Ae((function(e,t){return e.response}));function On(e,t){return An(new Cn({method:"GET",url:e,responseType:"json",headers:t}))}var Cn=function(e){function t(t){var r=e.call(this)||this,n={async:!0,createXHR:function(){return this.crossDomain?function(){if(En.XMLHttpRequest)return new En.XMLHttpRequest;if(En.XDomainRequest)return new En.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(En.XMLHttpRequest)return new En.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 En.ActiveXObject(e))break}catch(e){}return new En.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 m(t,e),t.prototype._subscribe=function(e){return new Tn(e,this.request)},t.create=((r=function(e){return new t(e)}).get=gn,r.post=Sn,r.delete=bn,r.put=mn,r.patch=In,r.getJSON=On,r),t}(H),Tn=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")||En.FormData&&r.body instanceof En.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 m(t,e),t.prototype.next=function(e){this.done=!0;var t,r=this.xhr,n=this.request,o=this.destination;try{t=new wn(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 u=this.xhr=e.createXHR();this.setupEvents(u,e),r?u.open(n,o,i,r,s):u.open(n,o,i),i&&(u.timeout=e.timeout,u.responseType=e.responseType),"withCredentials"in u&&(u.withCredentials=!!e.withCredentials),this.setHeaders(u,a),c?u.send(c):u.send()}catch(e){this.error(e)}},t.prototype.serializeBody=function(e,t){if(!e||"string"==typeof e)return e;if(En.FormData&&e instanceof En.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 Dn(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)},En.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 Rn("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 Rn("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}(k),wn=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=Nn(this.responseType,t)},Rn=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=Nn(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function Nn(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 Dn=function(e,t){return Rn.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},Pn=Cn.create;const Mn={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 Password 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."}},kn=Mn.default;let Un,Vn,Ln;function xn(e,t){return t in kn?kn[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"}(Un||(Un={})),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"}(Vn||(Vn={})),function(e){e[e.LEAVESUBREASON_WAITINGROOMFAILOVER=1]="LEAVESUBREASON_WAITINGROOMFAILOVER"}(Ln||(Ln={}));const jn={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},Hn={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"},Fn={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}},Gn={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 Bn(e,t){return Object.keys(e).find(r=>e[r]===t)}let Wn;function Kn(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(Wn)o=Wn;else{const e=Object.keys(Fn[3e3]);n.forEach(t=>{const r=function(e){return"en-US"===e&&(e="default"),Mn[e]||Mn.default}(t);o[t]={},e.forEach(e=>{o[t][e]=r[e]})}),Wn=o}return n.forEach(n=>{if(r)return;const i=Bn(o[n],t);i&&(r={key:i,value:Fn[e][i]})}),r||(r={key:"apac.errorcodes_fail",value:200}),r}if(200===e){const n=Bn({"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:Fn[e][n]}:{key:"apac.errorcodes_fail",value:200},r}if(void 0!==Fn[e]){const t=Fn[e],n=Object.keys(t)[0];r={key:n,value:t[n]}}if(r)return r;const n=Bn(jn,e),o=Hn[n];return o?{key:o,value:e}:{key:"apac.errorcodes_fail",value:200}}(e,t),o=xn(r,r);return r!==o?{reason:o,errorCode:n}:{reason:kn[r],errorCode:n}}function qn(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==Gn[r]){const e=Gn[r],n=Object.keys(e)[0];t={key:n,value:e[n]}}if(t){const{key:r,value:n}=t,o=xn(r,r);return r!==o?Object.assign({},e,{reason:o,errorCode:n}):Object.assign({},e,{reason:kn[r],errorCode:n})}const n=Kn(r);return Object.assign({},e,{reason:n.reason,errorCode:n.errorCode})}var zn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Jn(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 Yn=Jn((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,u=function(e){return e.replace(c,a)},d=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,d)},p=function(e){return l(u(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(u>>>12&63)+(void 0!==a?o.charAt(u>>>6&63):"=")+(void 0!==c?o.charAt(63&u):"=")}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("")},S=t.atob&&"function"==typeof t.atob?function(e){return t.atob(e)}:function(e){return e.replace(/\S{1,4}/g,g)},b=function(e){return S(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},m=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(S(e))}(m(e))};t.Uint8Array&&(f=function(e){return Uint8Array.from(b(m(e)),(function(e){return e.charCodeAt(0)}))});if(t.Base64={VERSION:"2.6.4",atob:b,btoa:l,fromBase64:I,toBase64:_,utob:u,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:zn)}));function Xn(e){return Yn.Base64.encode(e,!0)}function Qn(e){return Yn.Base64.decode(e)}const Zn={"-":"+",_:"/",".":"="};function $n(e){const t=e.replace(/[-_.]/g,e=>Zn[e]);return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const eo=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount"],to={bChime:"bAllowPlayChimeForEnterOrExit",topic:e=>({meetingTopic:Qn(e)})},ro=ir("GET_MEETING_INFO"),no=ir("GET_INSTANT_MEETING_INFO"),oo=(ir("LOGON_ZOOM_DOMAIN"),ir("VERIFY_ZOOM_RECAPTCHA"),ir("LOGON_THIRD_PARTY_DOMAIN"),ir("PING_RWC_SERVER")),io=ir("MEETING_FAILOVER"),so=ir("LEAVE_MEETING"),ao=ir("END_MEETING"),{setMeetingInfo:co,setWindownOpen:uo,setAppidSignature:lo,setZak:po,setTkMtkguid:ho,setPingRwcTimestamp:_o,setInMeetingInfo:fo,setMeetingAttribute:vo,resetMeeting:yo,setIsHost:Eo,setIsCohost:go,setMeetingIsOnHold:So,setIsMeetingReset:bo,setAudioVideoBeforeOnHold:mo,setCurrentUserAudioBeforeReset:Io,setIsCurrentUserMutedBeforeReset:Ao,setMeetingStatus:Oo,setMeetingRegion:Co,setIsCurrentUserStartVideoBeforeReset:To,setJoinMeetingTimeStamp:wo,setIsEnableQos:Ro}=(ir("REGISTER_WEBINAR"),Cr({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(eo.some(t=>void 0!==e[t])){let t=e;return Object.keys(to).some(t=>void 0!==e[t])&&(t=Object.keys(e).reduce((t,r)=>{const n=to[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}));function No(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 Do,Po,Mo,ko,Uo;!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"}(Do||(Do={})),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"}(Po||(Po={})),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"}(Mo||(Mo={})),function(e){e.CDN="CDN",e.Global="Global",e.CN="CN"}(ko||(ko={})),function(e){e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed"}(exports.ConnectionState||(exports.ConnectionState={})),function(e){e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory"}(Uo||(Uo={}));const Vo=Xn("{}");class Lo{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=Xn("zoom-storage-".concat(e)),this.localStorageKey=Xn("zoom-local-storage"),this.memoryCache={},this.sessionCache=JSON.parse(Qn(sessionStorage.getItem(this.sessionStorageKey)||Vo)),this.localCache=JSON.parse(Qn(localStorage.getItem(this.localStorageKey)||Vo))}static init(e){this.instance=new Lo(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:Uo.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:Uo.LocalStorage}:{value:this.memoryCache[e],type:Uo.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case Uo.SessionStorage:{const r=this.sessionCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.sessionCache[e]=n,this.flushValue(Uo.SessionStorage)),n}case Uo.LocalStorage:{const r=this.localCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.localCache[e]=n,this.flushValue(Uo.LocalStorage)),n}case Uo.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 Uo.SessionStorage:delete this.sessionCache[e],this.flushValue(Uo.SessionStorage);break;case Uo.LocalStorage:delete this.localCache[e],this.flushValue(Uo.LocalStorage);break;case Uo.Memory:delete this.memoryCache[e]}}flushValue(e){e===Uo.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,Xn(JSON.stringify(this.sessionCache))):e===Uo.LocalStorage&&localStorage.setItem(this.localStorageKey,Xn(JSON.stringify(this.localCache)))}}function xo(){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 jo(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}function Ho(){return"object"==typeof WebAssembly&&"function"==typeof Worker}Lo.instance=void 0;const Fo=()=>"function"==typeof AudioWorklet,Go=()=>jo(),Bo=()=>!jo()&&!Ho(),Wo=()=>/arm/i.test(navigator.userAgent),Ko=()=>/\bCrOS\b/.test(navigator.userAgent),qo=()=>Ko()&&Wo(),zo=()=>!navigator||!navigator.hardwareConcurrency||qo()&&navigator.hardwareConcurrency<=4||Ko()&&!Wo()&&navigator.hardwareConcurrency<4||/\bCrKey\b/.test(navigator.userAgent)||"function"!=typeof OffscreenCanvas||"function"!=typeof requestAnimationFrame||"function"!=typeof SharedArrayBuffer?1:(qo()&&navigator.hardwareConcurrency>4||Ko()&&!Wo()&&navigator.hardwareConcurrency,9);let Jo,Yo;!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"}(Jo||(Jo={})),function(e){e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM"}(Yo||(Yo={}));const Xo=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 Qo,Zo;!function(e){e.WebclientOpt="WEB-CLIENT_OPT",e.WebclientWebinarToken="WEB-CLIENT_WEBINAR_TOKEN",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"}(Qo||(Qo={})),(Zo||(Zo={})).WebclientDeviceId="WEBCLIENT_DEVICE_ID";const $o=(window.crypto||window.msCrypto).subtle,ei=Qo.WebclientIVState,ti=Object.keys(Xo).map(e=>Xo[e].sessionType);class ri{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),Lo.set(ei,{},Uo.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new ri(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(jo()||!Ho())&&r===Yo.AES_GCM,this.gcmSessionKey=$n(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=$n(t);return i.set(s,0),i.set(o,s.length),i=i.subarray(0,s.length+4),$o.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!0,["sign"]).then(e=>$o.sign({name:"HMAC"},e,i)).then(e=>$o.importKey("raw",e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))}getNextIV(e){const t=Lo.get(ei);return void 0===t[e]?(t[e]=0,Lo.set(ei,t,Uo.SessionStorage)):Lo.set(ei,t=>u(u({},t),{},{[e]:t[e]+1}),Uo.SessionStorage)}resetIVState(){const e=Lo.get(ei);if(void 0===e);else{const t=Object.keys(e).filter(e=>ti.indexOf(e)>-1);t.length>0&&(t.forEach(t=>{e[t]+=1e6}),Lo.set(ei,e,Uo.SessionStorage))}}static resetIV(){if(void 0===this.instance)throw new Error("reset before intialize");this.instance.resetIVState()}static beginEncrypt({text:e,type:t}){const r=new Uint8Array(0);if(this.instance&&this.instance.isGCMEnabled){const n=16,o=this.instance.getNextIV(t.sessionType),i=new ArrayBuffer(16),s=new Uint8Array(i);new DataView(i).setUint32(0,o,!0);let a=null;return a="BO_BROADCAST"===t.sessionType?this.instance.gcmMainSessionKey:this.instance.gcmSessionKey,this.instance.beginCrypto(a,this.instance.zoomId,t.gcmType).then(t=>{const o=(new TextEncoder).encode(e);return $o.encrypt({name:"AES-GCM",iv:s,additionalData:r,tagLength:8*n},t,o)}).then(e=>{const t=1+s.byteLength+2+r.byteLength+4+e.byteLength,o=new ArrayBuffer(t);new Uint8Array(o)[0]=s.length,new Uint8Array(o,1,s.byteLength).set(s),new DataView(o).setUint16(1+s.byteLength,r.length,!0),new Uint8Array(o,3+s.byteLength).set(r),new DataView(o).setUint32(1+s.byteLength+2+r.byteLength,e.byteLength-n,!0),new Uint8Array(o,1+s.byteLength+2+r.byteLength+4).set(new Uint8Array(e));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(Xn(e))}static beginDecrypt({decryptedText:e,type:t,zoomId:r}){if(this.instance&&this.instance.isGCMEnabled){const n=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 $o.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 t=new TextDecoder("utf-8");return Promise.resolve({message:t.decode($n(e))})}}}let ni;ri.instance=void 0,function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(ni||(ni={}));class oi{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)}))}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){return{seq:this.sendMessageToRwg({evt:4105,body:{bRecord:e}})}}expel(e){return{seq:this.sendMessageToRwg({evt:4107,body:{userId: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,t=!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,r=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:u({},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){return{seq:r?this.sendMessageToRwg({evt:4135,body:{text:e,destNodeID:t,sn:r}}):this.sendMessageToRwg({evt:4135,body:{text:e,destNodeID:t}})}}assignCC(e,t){return{seq:this.sendMessageToRwg({evt:4137,body:{id:e,bCCEditor:t}})}}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,t){return{seq:this.sendMessageToRwg({evt:4147,body:{id:e,bOn:t}})}}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(e=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}})}}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){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:t,bCallme:r}})}}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(e=1,t,r){return{seq:this.sendMessageToRwg({evt:12289,body:{id:e,size:t,bOn:r}})}}unsubscribeVideo(e=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){return{seq:this.sendMessageToRwg({evt:16415,body:{id:e,size:t}})}}unsubscribeSharing(e){return{seq:this.sendMessageToRwg({evt:16417,seq:1,body:{id:e}})}}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){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,boOn:!1}})}}stopSharing(e){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,bOn:!0}})}}lockSharing(e){return{seq:this.sendMessageToRwg({evt:4169,body:{lockShare:e}})}}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:u({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}})}}}class ii extends oi{static createAgent(){return this.rwgInstance||(this.rwgInstance=new ii),this.rwgInstance}}ii.rwgInstance=null;class si extends oi{static getInstance(){return this.instance||(this.instance=new si),this.instance}}si.instance=null;const ai=Qo.WebclientIVState;class ci{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new ci),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:{[Jo.AUDIO_ENCODE]:Lo.get(ai)&&Lo.get(ai)[Jo.AUDIO_ENCODE],[Jo.VIDEO_ENCODE]:Lo.get(ai)&&Lo.get(ai)[Jo.VIDEO_ENCODE],[Jo.SHARING_ENCODE]:Lo.get(ai)&&Lo.get(ai)[Jo.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(ii.createAgent())}}setAssetsAndConstraint(e,t){var r;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=(e=>({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),this.onMediaSDKCallback=this.onMediaSDKCallback.bind(this),null===(r=this.instance)||void 0===r||r.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){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}connect({svcUrl:e,meetingNumber:t,conId:r,e2eEncrypt:n,isViewOnly:o,currentUserId:i,isWebinar:s,enableQos:a}){var c,u,d;this.svcUrl=e,this.meetingNumber=t,this.confId=r;const l=((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(Go()?"j":"s","&cid=").concat(r)}))(e,t,r);this.mediaSocketAddress=l,this.currentUserId=i;const p=zo();var h,_,f,v,y,E,g,S,b,m;(Ho()?null===(h=this.instance)||void 0===h||h.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkletPath:null===(_=this.mediaWorkersPath)||void 0===_?void 0:_.audioWorkletPath,e2eEncrypt:n,isEnableListenInitEvent:!0}):null===(f=this.instance)||void 0===f||f.setPropsBeforeInit({callback:this.onMediaSDKCallback,e2eEncrypt:n,isEnableListenInitEvent:!0}),!0===(null===(c=this.constraints)||void 0===c?void 0:c.audio)&&Ho())&&((s||Fo())&&(null===(b=this.instance)||void 0===b||b.initAudioDecode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a)),!Fo()||s&&o||null===(m=this.instance)||void 0===m||m.initAudioEncode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a));!0===(null===(u=this.constraints)||void 0===u?void 0:u.video)&&Ho()&&(null===(v=this.instance)||void 0===v||v.initVideoDecode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p),s&&o||null===(y=this.instance)||void 0===y||y.initVideoEncode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p)),!0===(null===(d=this.constraints)||void 0===d?void 0:d.screen)&&(Ho()?(null===(E=this.instance)||void 0===E||E.initSharingDecode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p),s&&o||null===(g=this.instance)||void 0===g||g.initSharingEncode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p)):null===(S=this.instance)||void 0===S||S.initSharingDecode(l.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;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(22,{CaptureAudio:n,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t},speakerInfo:{defaultDeviceId:r}})}leaveComputerAudio(){var e;null===(e=this.instance)||void 0===e||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,u,d){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:d,waterMarkText:u,zone:r})}stopRenderVideo(e,t,r,n,o=!1){var i;null===(i=this.instance)||void 0===i||i.Notify_MeidaSDK(2,{canvas:e,userId:t,RGBA:n,doNotClean:o,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,r=!1,n=""){var o;this.receivedSharingCanvas=t,null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(23,{width:0,height:0,ssrc:e,canvas:t,enableWaterMark:r,waterMarkText:n})}stopRenderSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(24,{})}switchSharingSource(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(36,{ssrc:e})}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,u({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=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=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}(e,["dimension"]);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(27,u(u({},r),n))}startDesktopSharing(e,t,r,n=!0){var o;this.sharingCanvas=document.querySelector("#".concat(t)),null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(30,{mode:n,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,zo())}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})}}let ui,di;ci.agentInstance=void 0,function(e){e.Expel="expel",e.Promote="promote",e.Depromote="depromote",e.MemberChange="memberChange",e.RaiseHand="raisehand",e.LowerHand="lowerhand",e.PutdownHands="putdownhands"}(ui||(ui={})),function(e){e[e.AttendeeToAllPanelist=1]="AttendeeToAllPanelist",e[e.PanelistToAttendee=3]="PanelistToAttendee"}(di||(di={}));const li=["CONNECTED","DISCONNECTED","POOL","CONNFAIL","OnlineMembers","GroupChange","RosterChange","WebinarQA","Message"];class pi{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;li.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 pi),this.agentInstance}onXmppCallback(e,t){this.callbackList.length>0&&this.callbackList.forEach(r=>r(e,t))}registerCallback(e){this.callbackList.push(e)}unregisterCallback(e){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}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;li.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}}function hi(e){return x(Ae((t,r)=>e(t,r)),Qe(e=>null!=e))}function _i(e){return x(xe((t,r)=>e(t,r)||$))}function fi(e){return x(At((t,r)=>e(t,r)||$))}pi.agentInstance=void 0;const vi={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},yi={["".concat(7937)]:()=>({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 Ei(e=vi){return t=>new H(r=>{const n=new Map;let o=0,i=null;const{period:s,rules:a}=e;let c=null;i||(i=((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}})(()=>{o=0},s));const u=Object.keys(yi),d=t.subscribe({next(e){if(e&&e.evt&&null!==i){o+=1;const{evt:t,body:i}=e,s=String(t);if(u.indexOf(s)>=0)if(c){const e=n.get(s);if(e)e.onThrottle(i);else{const e=yi[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=yi[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()=>{d.unsubscribe(),i&&(i(),i=null),o=0}})}var gi;!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"}(gi||(gi={}));const Si={success:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",fail:["JOIN_MEETING_FAILED"]},bi={[gi.ConnectionChange]:[{event:"JOIN_MEETING_SUCCESS",payload:()=>({state:exports.ConnectionState.Connected})},{event:"RECONNECTING_MEETING",payload:e=>u({state:exports.ConnectionState.Reconnecting},e)},{event:"LEAVING_MEETING",payload:e=>u({state:exports.ConnectionState.Closed},e)}],[gi.OnHoldChange]:[{event:"MEETING_IN_WAITING_ROOM",payload:e=>({isOnHold:e})}],[gi.UserAdd]:[{event:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"ADD_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[gi.UserUpdate]:[{event:"UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[gi.UserRemove]:[{event:"REMOVE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[gi.AttendeeUpdate]:[{event:"UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",payload:e=>e}]};let mi;!function(e){e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change"}(mi||(mi={}));const Ii={[mi.ChatOnMessage]:[{event:"CHAT_RECEIVE_MESSAGE_EVENTS",payload:e=>e}],[mi.ChatPrivilegeChange]:[{event:"CHAT_PRIVILEGE_CHANGE",payload:e=>e}]};let Ai,Oi,Ci;!function(e){e.OnRecordingChange="on-recording-change",e.OnLocalRecordingChange="on-local-recording-change"}(Ai||(Ai={})),function(e){e.Started="Started",e.Stopped="Stopped"}(Oi||(Oi={})),function(e){e.Stopped="Stopped",e.Started="Started",e.Paused="Paused"}(Ci||(Ci={}));const Ti={[Ai.OnRecordingChange]:[{event:"START_RECORDING_SUCCESS",payload:()=>({state:Oi.Started})},{event:"STOP_RECORDING_SUCCESS",payload:()=>({state:Oi.Stopped})}],[Ai.OnLocalRecordingChange]:[{event:"LOCAL_RECORDING_CHANGE",payload:e=>{const t={};return Array.isArray(e)?e.forEach(e=>{t[e.id]=e.bLocalRecordStatus}):t[e.id]=e.bLocalRecordStatus,t}}]};let wi,Ri,Ni,Di;!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"}(wi||(wi={})),function(e){e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed"}(Ri||(Ri={})),function(e){e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk"}(Ni||(Ni={})),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"}(Di||(Di={}));const Pi=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"});let Mi,ki,Ui,Vi,Li;!function(e){e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare"}(exports.SharePrivilege||(exports.SharePrivilege={})),function(e){e.Sharing="sharing",e.Paused="paused",e.End="ended"}(exports.ShareStatus||(exports.ShareStatus={})),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"}(exports.VideoQuality||(exports.VideoQuality={})),function(e){e.Active="Active",e.Inactive="Inactive"}(exports.VideoActiveState||(exports.VideoActiveState={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted"}(Mi||(Mi={})),function(e){e.Active="Active",e.Inactive="Inactive"}(ki||(ki={})),function(e){e.Success="Success",e.Failed="Failed",e.Initial="Initial"}(Ui||(Ui={})),function(e){e.Started="Started",e.Stopped="Stopped",e.Failed="Failed"}(exports.VideoCapturingState||(exports.VideoCapturingState={})),function(e){e.Approved="Approved",e.Rejected="Rejected"}(Vi||(Vi={})),function(e){e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture"}(exports.PassiveStopShareReason||(exports.PassiveStopShareReason={})),function(e){e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change"}(Li||(Li={}));const xi={[Li.DeviceChange]:[{event:"MEDIA_DEVICE_CHANGE",payload:()=>({})}],[Li.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"})}]},ji={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 Hi;!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"}(Hi||(Hi={}));const Fi={[Hi.VideoActiveChange]:[{event:"RECEIVE_VIDEO_ACTIVE_INDICATION",payload:e=>({state:e.bVideoOn?exports.VideoActiveState.Active:exports.VideoActiveState.Inactive,userId:e.userId})}],[Hi.VideoCapturingChange]:[{event:"VIDEO_CAPTURE_START_SUCCESS",payload:()=>({state:exports.VideoCapturingState.Started})},{event:"VIDEO_CAPTURE_STOP_RESULT",payload:e=>({state:(null==e?void 0:e.failed)?exports.VideoCapturingState.Failed:exports.VideoCapturingState.Stopped})}],[Hi.VideoMutedChange]:[{event:"RECEIVE_VIDEO_MUTE_INDICATION",payload:e=>({state:e.isVideoMuted?Mi.Muted:Mi.Unmuted,userId:e.id})}],[Hi.AskForStartVideoConsent]:[{event:"ASK_FOR_START_VIDEO_CONSENT",payload:e=>({state:e.isVideoMuted?Mi.Muted:Mi.Unmuted,userId:e.id})}],[Hi.VideoSpotlightChange]:[{event:"VIDEO_SPOTLIGHT_CHANGE",payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map(e=>({userId:e}))})}],[Hi.VideoDimensionChange]:[{event:"RECEIVE_VIDEO_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[Hi.VideoFollowHostOrder]:[{event:"VIDEO_FOLLOW_HOST_ORDER_CHANGE",payload:e=>({isFollowHostOrder:e.bOn})}],[Hi.VideoHostLayoutChange]:[{event:"VIDEO_HOST_DRAG_LAYOUT_CHANGE",payload:e=>Array.isArray(e.layout)?e.layout.map(e=>({userId:e})):[]}],[Hi.PeerVideoStateChange]:[{event:"VIDEO_NEW_USER_START",payload:e=>u({action:"Start"},e)},{event:"VIDEO_OLD_USER_STOP",payload:e=>u({action:"Stop"},e)}]};let Gi;!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"}(Gi||(Gi={}));const Bi={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"}},Wi={[Gi.ActiveSpeaker]:[{event:"AUDIO_ACTIVE_SPEAKER",payload:e=>e}],[Gi.UnmuteAudioConsent]:[{event:"AUDIO_UNMUTE_CONSENT",payload:e=>({reason:e})}],[Gi.CurrentAudioChange]:[{event:"AUDIO_CURRENT_USER_JOIN_BY_PHONE",payload:()=>({action:"join",type:"phone"})},{event:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",payload:()=>({action:"join",type:"computer"})},{event:"AUDIO_CURRENT_USER_LEAVE_AUDIO",payload:()=>({action:"leave"})},{event:"AUDIO_CURRENT_USER_MUTED",payload:({source:e})=>({action:"muted",source:e})},{event:"AUDIO_CURRENT_USER_UNMUTED",payload:({source:e})=>({action:"unmuted",source:e})}],[Gi.DialoutStateChange]:[{event:"AUDIO_DIALOUT_RESULT_CODE",payload:e=>e}],[Gi.MergeAudio]:[{event:"AUDIO_MERGE_AUDIO_INDICATION",payload:e=>e}],[Gi.AutoPlayFailed]:[{event:"AUDIO_AUTO_PLAY_FAILED",payload:()=>{}}]};let Ki;!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"}(Ki||(Ki={}));const qi={[Ki.ShareActiveChange]:[{event:"SHARE_ACTIVE_INDICATION",payload:e=>({state:e.isActive?"Active":"Inactive",userId:e.activeUserId})}],[Ki.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})}],[Ki.SharePassiveStop]:[{event:"SHARE_VIDEO_STREAMS_END",payload:()=>({reason:exports.PassiveStopShareReason.StopScreenCapture})},{event:"SHARE_PASSIVE_STOP_SHARE",payload:()=>({reason:exports.PassiveStopShareReason.PrivilegeChange})}],[Ki.SharePeerStateChange]:[{event:"SHARE_NEW_USER_ADD",payload:e=>({userId:e.id,action:"Start"})},{event:"SHARE_USER_REMOVE",payload:e=>({userId:e.id,action:"Stop"})}],[Ki.ShareContentChange]:[{event:"SHARE_AUTO_CHANGE_SOURCE",payload:e=>e}],[Ki.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?Vi.Approved:Vi.Rejected})}],[Ki.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[Ki.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[Ki.SharePrivilegeChange]:[{event:"SHARE_PRIVILEGE_CHANGE",payload:e=>({privilege:e})}]},zi="INVALID_OPERATION",Ji="INVALID_PARAMETERS";let Yi;!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"}(Yi||(Yi={}));const Xi={[Yi.InviteToJoin]:[{event:"BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",payload:e=>e}],[Yi.RoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_COUTDOWN",payload:e=>e}],[Yi.RoomTimeUp]:[{event:"BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",payload:e=>e}],[Yi.ClosingRoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",payload:e=>e}],[Yi.BroadcastMessage]:[{event:"BREAKOUT_ROOM_BROADCAST_MESSAGE",payload:e=>e}],[Yi.AskForHelp]:[{event:"BREAKOUT_ROOM_ASK_HELP_REQUEST",payload:e=>e}],[Yi.AskForHelpResponse]:[{event:"BREAKOUT_ROOM_ASK_HELP_RESPONSE",payload:e=>e}],[Yi.RoomStateChange]:[{event:"BREAKOUT_ROOM_ATTRIBUTE_INDICATION",payload:e=>({status:e.controlStatus})}],[Yi.MainSessionUserUpdate]:[{event:"BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE",payload:()=>({})}]},Qi=u(u(u(u(u(u(u(u(u(u({},bi),{"closed-caption-message":[{event:"CC_RECEIVE_MESSAGE",payload:e=>e}]}),Ii),Ti),Wi),Fi),{"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}]}),qi),xi),Xi),Zi=($i=$i||Object.create(null),{on:function(e,t){($i[e]||($i[e]=[])).push(t)},off:function(e,t){$i[e]&&$i[e].splice($i[e].indexOf(t)>>>0,1)},emit:function(e,t){($i[e]||[]).slice().map((function(e){e(t)})),($i["*"]||[]).slice().map((function(r){r(e,t)}))}});var $i;const es=new Map,ts=new Array,rs=(e,t)=>{Zi.emit(e,t)},ns=e=>new Promise((t,r)=>{e.fail&&e.fail.length>0?tt(qe(Zi,e.success).pipe(ht(1)),Ye(...e.fail.map(e=>qe(Zi,e).pipe(ht(1),xe(t=>ae({type:e,payload:t})))))).subscribe(e=>t(e),e=>{"object"==typeof e.payload?r(u({type:e.type},e.payload)):void 0===e.payload?r({type:e.type}):r(e)}):qe(Zi,e.success).pipe(ht(1)).subscribe(e=>t(e))}),os=(e,t,r=1e4)=>new Promise((n,o)=>{let i=$;"string"==typeof e?i=qe(Zi,e).pipe(ht(1)):(i=qe(Zi,e.event),e.operations&&(i=e.operations.reduce((e,t)=>e.pipe(t),i))),tt(i,ot(r).pipe(gt(ae("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"})})}),is=(e,t)=>void 0!==t?qe(Zi,e).pipe(ht(t)):qe(Zi,e),ss=()=>{ts.forEach(e=>{e.unsubscribe()}),ts.length=0,es.clear()};var as=Jn((function(e,t){var r;r=function(){function e(){for(var e=0,t={};e1&&void 0!==arguments[1]?arguments[1]:0,r=(hs[e[t+0]]+hs[e[t+1]]+hs[e[t+2]]+hs[e[t+3]]+"-"+hs[e[t+4]]+hs[e[t+5]]+"-"+hs[e[t+6]]+hs[e[t+7]]+"-"+hs[e[t+8]]+hs[e[t+9]]+"-"+hs[e[t+10]]+hs[e[t+11]]+hs[e[t+12]]+hs[e[t+13]]+hs[e[t+14]]+hs[e[t+15]]).toLowerCase();if(!ps(r))throw TypeError("Stringified UUID is invalid");return r}(n)}const{WebclientIsOnHold:vs,WebclientOpt:ys,WebclientParticipantId:Es,WebclientZoomId:gs,WebclientWebinarToken:Ss}=Qo,{WebclientDeviceId:bs}=Zo;let ms,Is,As,Os,Cs,Ts,ws;!function(e){e.Closed="closed",e.Connecting="connecting",e.Connected="connected"}(ms||(ms={})),function(e){e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually"}(Is||(Is={})),function(e){e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(As||(As={})),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"}(Os||(Os={})),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"}(Cs||(Cs={})),function(e){e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO"}(Ts||(Ts={})),function(e){e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom"}(ws||(ws={}));const Rs=ii.createAgent();let Ns;var Ds=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(Vt("".concat(Mr)),Nt(t),Qe(([,e])=>"closed"===e.socket.zoomSocketStatus),fi(([,e])=>{const{socket:{retryCount:t,rwgServerList:r},meeting:n,breakoutRoom:o}=e;let i;if(n.zlkJwtToken)i=function({passWord:e,meetingNumber:t,userName:r,topic:n,trackAuth:o,tid:i,meetingId:s,ts:a,auth:c,lang:u,retryCount:d,rwgServerList:l,cv:p,zlkJwtToken:h}){const _=as.get("_zm_mtk_guid");let f=Lo.get(bs);if(f||(f=fs(),Lo.set(bs,f,Uo.LocalStorage)),l.length>d){const v=l[d];let y={dn2:Xn(r),topic:Xn(n),auth:c,browser:xo(),trackAuth:o,mid:s,tid:i,lang:u,ts:a,"ZM-CID":f,_ZM_MTG_TRACK_ID:_||"",iccv:p,cfs:0,zlkJwtToken:h};""!==e&&(y=Object.assign(y,{mpwd:Xn(e)})),v.rwcAuth?y=Object.assign(y,{rwcAuth:v.rwcAuth}):v.rwcToken&&(y=Object.assign(y,{rwcToken:v.rwcToken}));let E=2;return Go()?E=1:Bo()&&(E=0),y=Object.assign(y,{as_type:E}),[{key:ys,queryKey:"opt"},{key:Es,queryKey:"participantID"},{key:gs,queryKey:"zoomid"}].forEach(e=>{const t=Lo.get(e.key);void 0!==t&&(y[e.queryKey]=t)}),"wss://".concat(v.rwg,"/instantsdk/").concat(t,"?").concat(new URLSearchParams(y).toString())}return null}(u(u({},n),{},{retryCount:t,rwgServerList:r}));else{let e=u(u({},n),{},{retryCount:t,rwgServerList:r});if(o&&o.currentRoom.status===Cs.Joining){const{currentRoom:{boId:t,boConfId:r,boToken:n}}=o;e=u(u({},e),{},{bid:t,botk:n,confID:r})}i=function({isHost:e,isOriginHost:t,passWord:r,meetingNumber:n,userName:o,zak:i,trackAuth:s,tid:a,sign:c,meetingId:u,ts:d,auth:l,lang:p,tk:h,retryCount:_,rwgServerList:f,userEmail:v,cv:y,bid:E,botk:g,confID:S}){const b=as.get("_zm_mtk_guid");let m=Lo.get(bs);if(m||(m=fs(),Lo.set(bs,m,Uo.LocalStorage)),f.length>_){const I=f[_];let A={dn2:Xn(o),auth:l,sign:c,browser:xo(),trackAuth:s,mid:u,tid:a,email:v,lang:p,zak:i||"",tk:h||"",ts:d,"ZM-CID":m,_ZM_MTG_TRACK_ID:b||"",jscv:y,cfs:0};e&&t||""===r||(A=Object.assign(A,{mpwd:r})),I.rwcAuth?A=Object.assign(A,{rwcAuth:I.rwcAuth}):I.rwcToken&&(A=Object.assign(A,{rwcToken:I.rwcToken}));let O=2;return Go()?O=1:Bo()&&(O=0),A=Object.assign(A,{as_type:O}),[{key:vs,queryKey:"cfs"},{key:ys,queryKey:"opt"},{key:Es,queryKey:"participantID"},{key:gs,queryKey:"zoomid"},{key:Ss,queryKey:"tk"}].forEach(e=>{const t=Lo.get(e.key);void 0!==t&&(A[e.queryKey]=t)}),E&&g&&S&&Object.assign(A,{bid:Xn(E),botk:g,confID:S}),"wss://".concat(I.rwg,"/wc/api/").concat(n,"?").concat(new URLSearchParams(A).toString())}return null}(e)}if(i){const e=(s=i,Rs.connect(s),Ns=new K,ze(e=>Rs.on(ni.Message,e),e=>Rs.off(ni.Message,e),e=>e.data).subscribe(Ns),Ns);return Ye(e.pipe(Qe(e=>"string"==typeof e),Ae(e=>JSON.parse(e)),Ei(),hi(e=>0===e.evt?void(e.body&&"invalid parameters!"===e.body.test&&rs("JOIN_MEETING_FAILED",Kn(jn.INVALID_PARAMETER))):xr(e)),St(Wr(ms.Connecting))),e.pipe(Qe(e=>e instanceof ArrayBuffer),Ae(e=>jr(e))))}var s})),connectedZoomSocketEpic:(e,t)=>e.pipe(Vt("".concat(Mr)),At(()=>{const[e,r,n]=[ni.Open,ni.Close,ni.Error].map(e=>ze(t=>Rs.on(e,t),t=>Rs.on(e,t)));return Ye(e.pipe(xe(()=>Ye(se(Wr(ms.Connected)),ot(6e4).pipe(Nt(t),Qe(([,e])=>"initial"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(rs("RECONNECTING_MEETING",{reason:Mo.Failover}),io())))))),r.pipe(Nt(t),Qe(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(rs("RECONNECTING_MEETING",{reason:Mo.Failover}),io()))),n.pipe(Nt(t),_i(([,e])=>{const{meeting:{meetingStatus:t,isMeetingReset:r},socket:{retryCount:n}}=e;return"initial"===t?ke([qr(n+1),Ur({retry:!0})]):r?void 0:(rs("RECONNECTING_MEETING",{reason:Mo.Failover}),se(io()))})))})),disconnectZoomSocketEpic:e=>e.pipe(Vt("".concat(Ur)),xe(e=>e.payload&&e.payload.retry?se(Mr()).pipe(ut(1e3),St(Wr(ms.Closed))):se(Wr(ms.Closed))),ut(100),Tt(()=>{var e;Rs.close(),null===(e=Ns)||void 0===e||e.complete()}))});const Ps=pi.getInstance();let Ms;var ks=Object.freeze({__proto__:null,loadWebIMEpic:(e,t)=>e.pipe(Vt("".concat(Lr)),Nt(t),xe(([,e])=>{const{media:{assetsPath:t}}=e;return ke(new Promise((e,r)=>{No("".concat(t,"/webim.min.js"),()=>{e("")},()=>{r()})})).pipe(vt(Jr(!0)),st(e=>se(Jr(!1))))})),connectXMPPSocketEpic:(e,t)=>e.pipe(Vt("".concat(kr)),Nt(t),Qe(([,e])=>"closed"===e.socket.xmppSocketStatus),fi(([,t])=>{const{meeting:{svcUrl:r,meetingNumber:n,conId:o,jid:i,userName:s},socket:{isXmppSDKLoaded:a}}=t,c=Ho()&&Fo()?3:2;let u=se(a);return!1===a&&(u=e.pipe(Vt("".concat(Jr)),ht(1))),u.pipe(xe(e=>{return e?(t={svcUrl:r,meetingNumber:n,conId:o,jid:i,userName:s,clientCap:c},Ps.connect(t),Ms=new K,ze(e=>Ps.registerCallback(e),e=>Ps.unregisterCallback(e),(e,t)=>({event:e,data:t})).subscribe(Ms),Ms).pipe(Ae(e=>Hr(e)),St(zr(ms.Connecting))):ae("webim load fail");var t}))})),connectedXmppSocketEpic:(e,t)=>e.pipe(Vt("".concat(zr)),Qe(e=>e.payload===ms.Connecting),fi(()=>{if(Ms){const e=Ms.pipe(Qe(e=>"CONNECTED"===e.event)),r=Ms.pipe(Qe(e=>"DISCONNECTED"===e.event));return Ye(e.pipe(xe(()=>se(zr(ms.Connected)))),r.pipe(Nt(t),Qe(([,e])=>"closed"!==e.socket.xmppSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(rs("RECONNECTING_MEETING",{reason:Mo.Failover}),io()))))}})),disconnectXmppSocketEpic:e=>e.pipe(Vt("".concat(Vr)),vt(zr(ms.Closed)),Tt(()=>{var e;Ps.disconnect(),null===(e=Ms)||void 0===e||e.complete()}))});const Us=si.getInstance();let Vs;var Ls=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(Vt("".concat(Fr)),Nt(t),Qe(([,e])=>"closed"===e.socket.mainSessionSocketStatus),At(([,e])=>{const{meeting:{svcUrl:t,meetingNumber:r,conId:n}}=e;return(e=>(Us.connect(e),Vs=new K,ze(e=>Us.on(ni.Message,e),e=>Us.off(ni.Message,e)).pipe(Ae(e=>e.data)).subscribe(Vs),Vs))(function(e,t,r){return"wss://".concat(e,"/wc/media/").concat(t,"?type=m&cid=").concat(r,"&mode=2")}(t,r,n)).pipe(Ae(e=>JSON.parse(e)),Qe(e=>0!==e.evt),Ei(),Ae(e=>Br(e)),St(Yr(ms.Connecting)))})),connectedMainSessionSocketEpic:(e,t)=>e.pipe(Vt("".concat(Fr)),At(()=>{const[e,r,n]=[ni.Open,ni.Close,ni.Error].map(e=>ze(t=>Us.on(e,t),t=>Us.on(e,t)));return Ye(e.pipe(vt(Yr(ms.Connected))),r.pipe(Nt(t),Qe(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus),Ae(()=>(rs("RECONNECTING_MEETING",{reason:Mo.Failover}),io()))),n.pipe(Ae(()=>(rs("RECONNECTING_MEETING",{reason:Mo.Failover}),io()))))})),disconnectMainSessionSocketEpic:e=>e.pipe(Vt("".concat(Gr)),vt(Yr(ms.Closed)),Tt(()=>{var e;Us.close(),null===(e=Vs)||void 0===e||e.complete()}))});function xs(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:Ks(e)?2:qs(e)?3:0}function Bs(e,t){return 2===Gs(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ws(e,t,r){var n=Gs(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function Ks(e){return Ea&&e instanceof Map}function qs(e){return ga&&e instanceof Set}function zs(e){return e.o||e.t}function Js(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Oa(e);delete t[Ia];for(var r=Aa(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=Xs),Object.freeze(e),t&&Fs(e,(function(e,t){return Ys(t,!0)}),!0))}function Xs(){xs(2)}function Qs(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Zs(e){var t=Ca[e];return t||xs(19,e),t}function $s(){return va}function ea(e,t){t&&(Zs("Patches"),e.u=[],e.s=[],e.v=t)}function ta(e){ra(e),e.p.forEach(oa),e.p=null}function ra(e){e===va&&(va=e.l)}function na(e){return va={p:[],l:va,h:e,m:!0,_:0}}function oa(e){var t=e[Ia];0===t.i||1===t.i?t.j():t.g=!0}function ia(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.O||Zs("ES5").S(t,e,n),n?(r[Ia].P&&(ta(t),xs(4)),Hs(e)&&(e=sa(t,e),t.l||ca(t,e)),t.u&&Zs("Patches").M(r[Ia],e,t.u,t.s)):e=sa(t,r,[]),ta(t),t.u&&t.v(t.u,t.s),e!==ba?e:void 0}function sa(e,t,r){if(Qs(t))return t;var n=t[Ia];if(!n)return Fs(t,(function(o,i){return aa(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return ca(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=Js(n.k):n.o;Fs(3===n.i?new Set(o):o,(function(t,i){return aa(e,n,o,t,i,r)})),ca(e,o,!1),r&&e.u&&Zs("Patches").R(n,r,e.u,e.s)}return n.o}function aa(e,t,r,n,o,i){if(js(o)){var s=sa(e,o,i&&t&&3!==t.i&&!Bs(t.D,n)?i.concat(n):void 0);if(Ws(r,n,s),!js(s))return;e.m=!1}if(Hs(o)&&!Qs(o)){if(!e.h.N&&e._<1)return;sa(e,o),t&&t.A.l||ca(e,o)}}function ca(e,t,r){void 0===r&&(r=!1),e.h.N&&e.m&&Ys(t,r)}function ua(e,t){var r=e[Ia];return(r?zs(r):e)[t]}function da(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 la(e){e.P||(e.P=!0,e.l&&la(e.l))}function pa(e){e.o||(e.o=Js(e.t))}function ha(e,t,r){var n=Ks(t)?Zs("MapSet").T(t,r):qs(t)?Zs("MapSet").F(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:$s(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=Ta;r&&(o=[n],i=wa);var s=Proxy.revocable(o,i),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(t,r):Zs("ES5").J(t,r);return(r?r.A:$s()).p.push(n),n}function _a(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Js(e)}var fa,va,ya="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Ea="undefined"!=typeof Map,ga="undefined"!=typeof Set,Sa="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ba=ya?Symbol.for("immer-nothing"):((fa={})["immer-nothing"]=!0,fa),ma=ya?Symbol.for("immer-draftable"):"__$immer_draftable",Ia=ya?Symbol.for("immer-state"):"__$immer_state",Aa="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Oa=Object.getOwnPropertyDescriptors||function(e){var t={};return Aa(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Ca={},Ta={get:function(e,t){if(t===Ia)return e;var r=zs(e);if(!Bs(r,t))return function(e,t,r){var n,o=da(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||!Hs(n)?n:n===ua(e.t,t)?(pa(e),e.o[t]=ha(e.A.h,n,e)):n},has:function(e,t){return t in zs(e)},ownKeys:function(e){return Reflect.ownKeys(zs(e))},set:function(e,t,r){var n=da(zs(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(e.D[t]=!0,!e.P){if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,ua(zs(e),t))&&(void 0!==r||Bs(e.t,t)))return!0;pa(e),la(e)}return e.o[t]=r,!0},deleteProperty:function(e,t){return void 0!==ua(e.t,t)||t in e.t?(e.D[t]=!1,pa(e),la(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=zs(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(){xs(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){xs(12)}},wa={};Fs(Ta,(function(e,t){wa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),wa.deleteProperty=function(e,t){return Ta.deleteProperty.call(this,e[0],t)},wa.set=function(e,t,r){return Ta.set.call(this,e[0],t,r,e[0])};var Ra=new(function(){function e(e){this.O=Sa,this.N=!1,"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var t=e.prototype;return t.produce=function(e,t,r){if("function"==typeof e&&"function"!=typeof t){var n=t;t=e;var o=this;return function(e){var r=this;void 0===e&&(e=n);for(var i=arguments.length,s=Array(i>1?i-1:0),a=1;a1?r-1:0),i=1;i=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}var o=Zs("Patches").$;return js(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(r+1))}))},e}()),Na=Ra.produce;Ra.produceWithPatches.bind(Ra),Ra.setAutoFreeze.bind(Ra),Ra.setUseProxies.bind(Ra),Ra.applyPatches.bind(Ra),Ra.createDraft.bind(Ra),Ra.finishDraft.bind(Ra);const Da={zoomSocketStatus:ms.Closed,isXmppSDKLoaded:!1,xmppSocketStatus:ms.Closed,mainSessionSocketStatus:ms.Closed,retryCount:0,rwgServerList:[]},Pa=Pr({["".concat(Wr)]:Na((e,{payload:t})=>{e.zoomSocketStatus=t}),["".concat(Kr)]:Na((e,{payload:t})=>{const{rwgServerList:r}=e;r.find(e=>e===t.rwg)||r.push(t)}),["".concat(qr)]:Na((e,{payload:t})=>{e.retryCount=t}),["".concat(zr)]:Na((e,{payload:t})=>{e.xmppSocketStatus=t}),["".concat(Jr)]:Na((e,{payload:t})=>{e.isXmppSDKLoaded=t}),["".concat(Yr)]:Na((e,{payload:t})=>{e.mainSessionSocketStatus=t}),["".concat(Xr)]:()=>Da},Da),Ma=dn(Ds,ks,Ls),{setAttendeesList:ka,setXmppAttendeeList:Ua,setIsAdmitAllSilentUsers:Va,resetParticipants:La,addFailoverAttendees:xa,removeFailoverAttendees:ja,setClearRaiseHand:Ha,setClearAttendeeFeedback:Fa}=Cr({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:()=>({})});let Ga,Ba,Wa;!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"}(Ga||(Ga={})),function(e){e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee"}(Ba||(Ba={})),function(e){e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323"}(Wa||(Wa={}));const Ka=e=>(e&Wa.Phone)===Wa.Phone,qa=e=>e===Ga.ViewOnlyCanTalk,za=e=>(e&Ga.ViewOnly)===Ga.ViewOnly,Ja={id:"userId",type:e=>Ka(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>{return{userRole:e,isHost:(t=e,(t&Ga.Host)===Ga.Host)};var t},dn2:e=>({displayName:Qn(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest"};var Ya=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>ln(e,7937).pipe(Ae(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=Ja[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)),Nt(t),xe(([e,t])=>{const r=[ka(e)],{meeting:{userId:n},participants:{attendeesList:o,failoverAttendeesList:i}}=t;if(e.add){const t=e.add.find(e=>e.userId===n);void 0!==t&&rs("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const o=e.add.filter(e=>e.userId!==n);if(o.length>0){const e=o.filter(e=>!qa(e.userRole)).map(e=>{const t=i.find(t=>t.zoomID===e.zoomID);return t?u(u({},e),{},{source:t.isOnHold?"on hold":"failover"}):e}),t=e.filter(e=>!!e.source).map(e=>({zoomID:e.zoomID}));r.push(ja(t)),rs("ADD_USER_PARTICIPANT_ATTRIBUTE",e)}}if(e.update){const t=e.update.find(e=>e.userId===n);void 0!==t&&rs("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const r=e.update.filter(e=>e.userId!==n);r.length>0&&rs("UPDATE_USER_PARTICIPANT_ATTRIBUTE",r)}if(e.remove){const t=e.remove.map(e=>{const t=o.find(t=>t.userId===e.userId);return t?2===e.action&&1===e.nUserStatus?t.bHold?(r.push(xa({zoomID:t.zoomID,isOnHold:!0})),u(u({},e),{},{reason:"on hold"})):(r.push(xa({zoomID:t.zoomID,isOnHold:!1})),u(u({},e),{},{reason:"failover"})):e:null}).filter(e=>!!e);rs("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t)}return ke(r)})),receiveUserListFromXMPPEpic:e=>pn(e,"POOL").pipe(Qe(e=>e.payload.data.action===ui.MemberChange),Tt(e=>{rs("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.payload.data.data)}),Ae(e=>Ua(e.payload.data.data))),handleAdmitAllSilentUsersEpic:e=>ln(e,7951).pipe(Tt(e=>{!1===e.payload.body.bStarted&&rs("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)}),Ae(e=>Va(e.payload.body.bStarted))),handleKVUpdateIndicationEpic:e=>ln(e,7946).pipe(Qe(e=>["bRaiseHand","feedback"].indexOf(e.payload.body.key)>-1&&0===e.payload.body.value),Ae(e=>(rs("UPDATE_USER_PARTICIPANT_ATTRIBUTE",{}),void 0!==e.payload.body.bRaiseHand?Ha():Fa())))});const Xa={attendeesList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},Qa=Pr({["".concat(ka)]:Na((e,{payload:t})=>{void 0!==t.add&&t.add.length>0&&t.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):qa(t.userRole)?e.allowTalkAttendeesList.push(t):e.attendeesList.push(t)}}),void 0!==t.update&&t.update.length>0&&t.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!==t.remove&&t.remove.length>0&&t.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(Ua)]:Na((e,{payload:t})=>{e.xmppAttendeeList=t.map(e=>u(u({},e),{},{displayName:e.name,userId:Number(e.node),userRole:Number(e.role)}))}),["".concat(Va)]:Na((e,{payload:t})=>{e.isAdmitAllSilentUsers=t}),["".concat(Ha)]:Na(e=>{e.attendeesList.forEach(e=>{!0===e.bRaiseHand&&(e.bRaiseHand=!1)})}),["".concat(Fa)]:Na(e=>{e.attendeesList.forEach(e=>{e.feedback>0&&(e.feedback=0)})}),["".concat(xa)]:Na((e,{payload:t})=>{e.failoverAttendeesList.push(t)}),["".concat(ja)]:Na((e,{payload:t})=>{t.forEach(t=>{const r=e.failoverAttendeesList.findIndex(e=>e.zoomID===t.zoomID);-1!==r&&e.failoverAttendeesList.splice(r,1)})}),["".concat(La)]:()=>Xa},Xa);function Za(e,t){return e===t}function $a(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:Za,r=null,n=null;return function(){return $a(t,r,arguments)||(n=e.apply(null,arguments)),r=arguments,n}}));const rc=({participants:{attendeesList:e}})=>e,nc=({meeting:{userId:e}})=>e,oc=tc([nc,rc],(e,t)=>t.find(t=>t.userId===e)),ic=tc([oc],e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost)),sc=tc([oc],e=>null==e?void 0:e.isHost),ac=tc([({participants:{xmppAttendeeList:e}})=>e],e=>e.filter(e=>e.userRole===Ba.Attendee)),cc=tc([rc],e=>e.filter(e=>e.bHold&&!e.bid)),uc=tc([rc,({breakoutRoom:e})=>e&&e.controlStatus,({breakoutRoom:e})=>e&&e.currentRoom.status],(e,t,r)=>t!==As.InProgress&&t!==As.Closing||r!==Cs.InRoom?e.filter(e=>!e.bHold&&!e.bid):e.filter(e=>!e.bHold)),dc=tc([uc],e=>e.find(e=>e.isHost)),lc=tc([uc],e=>e.filter(e=>e.bCoHost)),pc=dn(Ya),{setAsnIds:hc,setIsCanUnmute:_c,setDialoutSequence:fc,setDialoutResultCode:vc,setIsAllowToTalk:yc,setIsHostMuteAll:Ec,setIsActiveOperation:gc,setAudioSsrc:Sc,setIsMutedUponEntry:bc,setIsUserGrantCaptureAudio:mc,setIsMicrophoneForbidden:Ic,setWebrtcRestartCount:Ac,setMicrophoneList:Oc,setSpeakerList:Cc,setActiveMicrophone:Tc,setActiveSpeaker:wc,setCanPlayAudio:Rc,resetAudio:Nc,setIsComputerAudioLoading:Dc}=Cr("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"),{setSharePrivilege:Pc,setShareActiveNode:Mc,setIsReceiveSharing:kc,setIsChromeExtensionInstalled:Uc,setIsScreenShareForbidden:Vc,setShareDimension:Lc,setShareStatus:xc,setShareSsrc:jc,setShareQuality:Hc,setReceivedShareDimension:Fc,setIsRemoteControlApproved:Gc,setIsGrabRemoteControl:Bc,setIsVerifiedSharingRenderCanvasAfterFailover:Wc,setIsVerifiedSharingCaptureCanvasAfterFailover:Kc,setIsSdkGrabControl:qc,resetShare:zc}=Cr("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","RESET_SHARE"),{setVideoSsrc:Jc,setActiveVideoId:Yc,setCameraList:Xc,setActiveCamera:Qc,setIsCurrentUserStartedVideo:Zc,setSpotlightVideo:$c,setIsCaptureForbidden:eu,setVideoMaxQuality:tu,setCaptureCanvasList:ru,setIsVideoMuted:nu,setIsCaptureCameraLoading:ou,setIsCameraTaken:iu,setIsVerifiedVideoRenderCanvasAfterFailover:su,setIsVerifiedVideoCaptureCanvasAfterFailover:au,resetVideo:cu,setReceivedVideoDimension:uu,addSubscribedVideoId:du,removeSubscribedVideoId:lu,setIsFollowHostVideoLayout:pu,setHostDragLayout:hu,addRenderedVideoId:_u,removeRenderedVideoId:fu}=Cr("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"),{setTempSetting:vu,setSetting:yu,setQuestionList:Eu,setQuestionUpVoted:gu,resetQa:Su}=Cr("SET_TEMP_SETTING","SET_SETTING","SET_QUESTION_LIST","SET_QUESTION_UP_VOTED","SET_SELF_LIVE_ANSWER","RESET_QA"),{setChatPrivilege:bu,addChatMessageHistory:mu,resetChat:Iu,setIsAllowAttendeeChat:Au}=Cr("SET_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT"),{setCcEditorInfo:Ou,setTempSendCcText:Cu,setTempReceiveCcText:Tu,setGatewayInfoList:wu,resetClosedCaption:Ru}=Cr("SET_CC_EDITOR_INFO","SET_TEMP_SEND_CC_TEXT","SET_TEMP_RECEIVE_CC_TEXT","SET_GATEWAY_INFO_LIST","RESET_CLOSED_CAPTION"),{addBreakoutRooms:Nu,setBreakoutRoomAllocationPattern:Du,setBreakoutRoomSequenceId:Pu,setMeetingElapsedTime:Mu,setStartRoomElapsedTime:ku,setBreakoutRoomOptions:Uu,setBreakoutRoomControlStatus:Vu,setBreakoutRooms:Lu,setCurrentBreakoutRoom:xu,setBreakoutRoomAttendeeStatus:ju,setBreakoutRoomConfId:Hu,setBreakoutRoomToken:Fu,resetBreakoutRoom:Gu,setBreakoutRoomClosingRoomTime:Bu,setBreakoutRoomBroadcastMessage:Wu,setBreakoutRoomHostReplyType:Ku,setBreakoutRoomHostReplyRequestId:qu,setMainSessionAttendeeList:zu,setIsHugeBreakoutRoom:Ju,setBreakoutRoomUpdatedUserRoleCount:Yu,setBreakoutRoomPreAssignedRoomList:Xu}=Cr("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"),Qu=(e,t)=>{if(e.result){const{result:{mn:r,ts:n,auth:o,track_auth:i,mid:s,tid:a,encryptedRWC:c,meetingOptions:u}}=e,{lang:d,password:l,topic:p,zlk:h,cv:_,userName:f}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:n,auth:o,passWord:l,trackAuth:i,encryptedRWC:JSON.parse(c||"{}"),meetingOptions:JSON.parse(u||"{}"),topic:p,userName:Lo.get(Qo.WebclientUserName)||f,cv:_,zlkJwtToken:h,lang:d}}return e},Zu=(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())},$u=(e,t=!1)=>{const{socket:{zoomSocketStatus:r,xmppSocketStatus:n,mainSessionSocketStatus:o},meeting:{meetingStatus:i}}=e,s=[Oo("closed")];if("joined"===i){const t=ci.getInstance(),r=ii.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||(Lo.clearSession(),ri.destroy()),r!==ms.Closed&&s.push(Ur()),n!==ms.Closed&&s.push(Vr()),o!==ms.Closed&&s.push(Gr()),t){const t=oc(e);s.push(yo({audio:null==t?void 0:t.audio,muted:null==t?void 0:t.muted,video:null==t?void 0:t.bVideoOn}))}else s.push(yo({audio:!1,muted:!0,video:!1}));return s.push(Xr(),an(),La(),Nc(),zc(),cu(),Su(),Iu(),Ru(),Gu()),s},ed=(e,...t)=>os({event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",operations:[Ae(t=>t.find(t=>t.userId===e)),Qe(e=>!!e),ht(1)]},...t),td=(tc([uc,({share:{isReceiveSharing:e}})=>e,({share:{activeNodeId:e}})=>e],(e=[],t,r)=>t?e.find(e=>e.userId===r&&!0===e.sharerOn):null),tc([uc],e=>e.filter(e=>e.sharerOn))),rd=ii.createAgent();var nd=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>ln(e,7938).pipe(Qe(e=>void 0!==e.payload.body.lockShare),Nt(t),Tt(([e,t])=>{const{share:{sharePrivilege:r}}=t,{payload:{body:{lockShare:n}}}=e;r!==n&&rs("SHARE_PRIVILEGE_CHANGE",n)}),Ae(([e])=>Pc(e.payload.body.lockShare))),shareSSrcEpic:e=>ln(e,20227).pipe(Ae(e=>jc(e.payload.body.ssrc))),shareStatusChangeEpic:(e,t)=>ln(e,20225).pipe(Nt(t),Ae(([e,t])=>{const{share:{isReceiveSharing:r,activeNodeId:n,shareQuality:o}}=t,{payload:{body:i}}=e;return r&&1===i.bStatus?(rd.unsubscribeSharing(n),rd.subscribeSharing(i.activeNodeID,o),ci.getInstance().switchSharingSource(i.ssrc),rs("SHARE_AUTO_CHANGE_SOURCE",{userId:i.activeNodeID})):1===i.bStatus?rs("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!0}):r&&rs("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!1}),Mc(i)})),handleChromeExtensionEpic:e=>_n(e,wi.CheckChromeSharingExtensionResponse).pipe(Ae(e=>(rs("SHARE_CHECK_CHROME_SHARING_EXTENSION",e.payload.data),Uc(e.payload.data)))),handleSDKShareSuccessEpic:(e,t)=>_n(e,wi.DesktopSharingCaptureSuccess).pipe(Nt(t),Ae(([,e])=>{const{meeting:{userId:t}}=e;return rd.startSharing(t),Vc(!1)})),handleSDKShareErrorEpic:e=>_n(e,[wi.DesktopSharingError,wi.DesktopSharingChromeExtensionUninstalled,wi.DesktopSharingPermissionDenied,wi.DesktopSharingSystemError]).pipe(hi(e=>{if([wi.DesktopSharingPermissionDenied,wi.DesktopSharingSystemError].includes(e.payload.type))return Vc(!0);rs("SHARE_START_DESKTOP_SHARE_FAILED",{reason:""})})),handleSDKShareDimensionChangeEpic:e=>_n(e,wi.CurrentDesktopSharingWidthHeight).pipe(Qe(e=>!!e.payload.data),Ae(e=>{rs("SHARE_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return ci.getInstance().ajustmentSharingCanvas(t,r),Lc(e.payload.data)})),handleSDKReceivedShareSizeChangeEpic:(e,t)=>_n(e,wi.SharingDecodeMaxSize).pipe(Qe(e=>!!e.payload.data),Nt(t),hi(([e,t])=>{const{share:{shareQuality:r,activeNodeId:n}}=t,{payload:{data:{size:o}}}=e,i=Number(o);if(r!==i)return rd.subscribeSharing(n,i),Hc(i)})),handleRWGShareOriginalDimensionEpic:e=>ln(e,20226).pipe(Tt(e=>{rs("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.body);const{payload:{body:{width:t,height:r}}}=e;ci.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Ae(e=>Fc(e.payload.body))),handleSDKShareOriginalDimensionEpic:e=>_n(e,wi.SharingPara).pipe(Tt(e=>{rs("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;ci.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Ae(e=>Fc(e.payload.data))),handleSDKStopShareEpic:(e,t)=>_n(e,wi.UserStopDesktopSharing).pipe(Nt(t),Ae(([,e])=>{const{meeting:{userId:t},share:{status:r}}=e;return r!==exports.ShareStatus.End&&(rd.stopSharing(t),rs("SHARE_VIDEO_STREAMS_END")),xc(exports.ShareStatus.End)})),handleRWGCurrentUserShareChangeEpic:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([e,t])=>{const{meeting:{userId:r}}=t,n=e.payload.body.update;return n&&n.length>0&&n.findIndex(e=>e.id===r&&void 0!==e.bShareOn)>-1}),xe(([e,t])=>{const{meeting:{userId:r},share:{status:n,isReceiveSharing:o,activeNodeId:i}}=t,{payload:{body:{update:s}}}=e,a=s.find(e=>e.id===r&&!1===e.bShareOn),c=s.find(e=>e.id===r&&!0===e.bShareOn),u=[],d=ci.getInstance();return a&&n!==exports.ShareStatus.End&&(rd.stopSharing(r),d.stopDesktopSharing(),u.push(xc(exports.ShareStatus.End)),rs("SHARE_PASSIVE_STOP_SHARE")),c&&n===exports.ShareStatus.End&&(o&&(d.stopRenderSharing(),rd.unsubscribeSharing(i),u.push(kc(!1))),u.push(xc(exports.ShareStatus.Sharing))),ke(u)})),handleMultipleShareChangeEpic:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([e,t])=>{const{meeting:{userId:r}}=t,n=e.payload.body.update;return n&&n.length>0&&n.findIndex(e=>e.id!==r&&void 0!==e.bShareOn)>-1}),_i(([t,r])=>{const{payload:{body:{update:n}}}=t,{share:{activeNodeId:o,isReceiveSharing:i,shareQuality:s}}=r,a=td(r),c=n.filter(e=>!0===e.bShareOn&&!1===e.bSharePause),u=n.filter(e=>!1===e.bShareOn);if(c.length>0&&c.forEach(e=>{-1===a.findIndex(t=>t.userId===e.id)&&rs("SHARE_NEW_USER_ADD",e)}),u.length>0&&(u.forEach(e=>{rs("SHARE_USER_REMOVE",e)}),i&&u.some(e=>e.id===o)))return tt(ln(e,20225).pipe(ht(1),gt($)),ot(50).pipe(gt(ae("timeout")))).pipe(st(()=>{const e=a.filter(e=>e.userId!==o);if(e.length>0){const t=e[0],{userId:r}=t;return rd.unsubscribeSharing(o),rd.subscribeSharing(r,s),ci.getInstance().switchSharingSource(r),rs("SHARE_AUTO_CHANGE_SOURCE",{userId:r}),se(Mc({activeNodeID:r,bStatus:1,ssrc:r}))}return $}))})),handleRequestRemoteControlEpic:(e,t)=>ln(e,16391).pipe(Nt(t),Qe(([e,t])=>{const{meeting:{userId:r}}=t;return e.payload.body.id===r}),Ae(([e])=>{const{payload:{body:{bOn:t}}}=e;return rs("SHARE_REMOTE_CONTROL_APPROVE",t),Gc(t)})),handleGrabRemoteControlEpic:(e,t)=>ln(e,16395).pipe(Nt(t),Qe(([e,t])=>e.payload.body.id===t.meeting.userId),Ae(([e])=>{const{payload:{body:{bOn:t}}}=e;return ci.getInstance().updateRemoteControlProperties({isControllerNow:t}),rs("SHARE_GRAB_REMOTE_CONTROL_CHANGE",t),Bc(t)})),handleSDKRemoteControlEpic:e=>_n(e,[wi.StartRemoteControlSuccess,wi.StartRemoteControlFailed,wi.CancelRemoteControlSuccess]).pipe(hi(e=>e.payload.type===wi.StartRemoteControlSuccess?(rs("SHARE_REMOTE_CONTROL_SUCCESS"),qc(!0)):e.payload.type===wi.CancelRemoteControlSuccess?qc(!1):void(e.payload.type===wi.StartRemoteControlFailed&&rs("SHARE_REMOTE_CONTROL_FAILED")))),handleRemoteControlClipboardEpic:e=>_n(e,[wi.RemoteControlCopiedTextNotify,wi.RemoteControlPasteTextLengthOverflow]).pipe(Tt(e=>{if(e.payload.type===wi.RemoteControlCopiedTextNotify){const{payload:{data:t}}=e;rs("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{content:t.data,x:t.x,y:t.y})}else rs("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{error:"length of pasted text is too long"})}),gt($))});const od={ssrc:0,status:exports.ShareStatus.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:exports.SharePrivilege.OnlyHost,activeNodeId:0,activeSsrc:0,shareQuality:1,isRemoteSharingActive:!1,isReceiveSharing:!1,isRemoteControlApproved:!1,isGrabRemoteControl:!1,isSDKGrabControl:!1,isChromeExtensionInstalled:!1,isScreenShareForbidden:!1},id=Pr({["".concat(Pc)]:Na((e,{payload:t})=>{e.sharePrivilege=t}),["".concat(Mc)]:Na((e,{payload:t})=>{e.isRemoteSharingActive=1===t.bStatus,e.activeNodeId=t.activeNodeID,e.activeSsrc=t.ssrc}),["".concat(kc)]:Na((e,{payload:t})=>{e.isReceiveSharing=t}),["".concat(Uc)]:Na((e,{payload:t})=>{e.isChromeExtensionInstalled=t}),["".concat(Lc)]:Na((e,{payload:t})=>{e.shareDimension=u({},t)}),["".concat(xc)]:Na((e,{payload:t})=>{e.status=t}),["".concat(jc)]:Na((e,{payload:t})=>{e.ssrc=t}),["".concat(Hc)]:Na((e,{payload:t})=>{e.shareQuality=t}),["".concat(Fc)]:Na((e,{payload:t})=>{e.receivedShareDimension=u({},t)}),["".concat(Gc)]:Na((e,{payload:t})=>{e.isRemoteControlApproved=t}),["".concat(Bc)]:Na((e,{payload:t})=>{e.isGrabRemoteControl=t}),["".concat(Wc)]:Na((e,{payload:t})=>{e.isVerifiedRenderCanvasAfterFailover=t}),["".concat(Kc)]:Na((e,{payload:t})=>{e.isVerifiedCaptureCanvasAfterFailover=t}),["".concat(qc)]:Na((e,{payload:t})=>{e.isSDKGrabControl=t}),["".concat(zc)]:()=>u(u({},od),{},{isVerifiedRenderCanvasAfterFailover:!1,isVerifiedCaptureCanvasAfterFailover:!1})},od),sd=dn(nd),ad=ii.createAgent(),cd=(e,t)=>e.pipe(Vt("".concat(oo)),Nt(t),Qe(([,e])=>void 0!==e.meeting.encryptedRWC),fi(([,e])=>{const{meeting:{encryptedRWC:t,ts:r,auth:n,meetingNumber:o},breakoutRoom:i}=e;if(t)return ke(Object.keys(t).map(e=>{const s=t[e];let a=void 0;return a=i&&i.currentRoom.boConfId?Zu(e,o,s,r,n,i.currentRoom.boConfId):Zu(e,o,s,r,n),{url:a,domain:e,rwcToken:s}})).pipe(xe(e=>Pn(e.url).pipe(xe(t=>{let r={};return r=t.response?u(u({},t.response),{},{fromNginx:!1}):{rwg:e.domain,rwcToken:e.rwcToken,fromNginx:!0},ke([Kr(r),Mr()])}),st(()=>$))),St(_o(performance.now())))}));var ud=Object.freeze({__proto__:null,pingRWCEpic:cd,joinMeetingSuccessfulEpic:(e,t)=>ln(e,4098).pipe(Nt(t),fi(([e,t])=>{const{payload:{body:{res:r,userID:n,zoomID:o,mn:i,participantID:s,hugeBO:a,elapsed:c,disableAqos:u}}}=e,{meeting:{pingRWCTimestamp:d,isWebinar:l,userEmail:p,userName:h,isMeetingReset:_,meetingOptions:f},media:{mediaConstraints:v,assetsPath:y},breakoutRoom:E}=t;if(Un.CONF_SUCCESS===r){const{WebclientParticipantId:t,WebclientUserId:r,WebclientZoomId:g,WebclientUserEmail:S,WebclientUserName:b}=Qo;Lo.set(r,n,Uo.SessionStorage),Lo.set(g,o,Uo.SessionStorage),Lo.set(t,s,Uo.SessionStorage),p&&Lo.set(S,p,Uo.SessionStorage),Lo.set(b,h,Uo.SessionStorage),ad.sendRWGConnectionPerformance("WCL_M, JMCT(".concat(performance.now()-d,")"));const m=[fo(e.payload.body),wo(performance.now())];return ci.getInstance().init(),_&&(m.push(bo(!1)),void 0!==v&&void 0!==y&&m.push(Qr())),l&&m.push(kr()),E&&(f&&!0===f.isBO100Enabled&&m.push(Ju(a)),E.currentRoom.boConfId&&m.push(Fr()),void 0!==c&&m.push(Mu(c))),void 0!==u&&m.push(Ro(!u)),rs("JOIN_MEETING_SUCCESS",{meetingNumber:i}),ke(m)}return Un.CONF_FAIL_CONFLOCKED===r?rs("JOIN_MEETING_FAILED",qn(r)):Un.CONF_FAIL_CONF_USER_FULL===r?rs("JOIN_MEETING_FAILED",Object.assign({},qn(r),{lmUrl:e.payload.body.lmURL})):(Un.CONF_FAIL_MEETING_OVER===r||Un.CONF_RESULT_MMR_IB_REJECT===r||Un.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===r||[Un.CONF_FAIL_HAS_BEEN_REMOVED,Un.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(r),rs("JOIN_MEETING_FAILED",qn(r))),ke($u(t,!1))})),handleMeetingAttributeChangeEpic:(e,t)=>ln(e,7938).pipe(Nt(t),Ae(([e,t])=>{const{payload:{body:r}}=e,{meeting:{zoomId:n,encType:o}}=t;if(void 0!==r.encryptKey&&ri.init(n,r.encryptKey,o),void 0!==r.gatewayKey){const e=ci.getInstance(),[,t,n]=r.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:n&&$n(n)}])}return rs("UPDATE_MEETING_ATTRIBUTE",r),vo(r)})),handleMeetingEndEpic:(e,t)=>ln(e,7939).pipe(Nt(t),xe(([e,t])=>{const{payload:{body:r}}=e;if(void 0!==r.reason){if(Vn.LEAVEREASON_RECONNECT===r.reason)return Ln.LEAVESUBREASON_WAITINGROOMFAILOVER===r.subReason?rs("RECONNECTING_MEETING",{reason:Mo.OnHold}):rs("RECONNECTING_MEETING",{reason:Mo.Failover}),se(io());Vn.LEAVEREASON_KICKEDBYHOST===r.reason?rs("LEAVING_MEETING",{reason:"kicked by host"}):Vn.LEAVEREASON_ENDBYHOST!==r.reason&&Vn.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING!==r.reason||rs("LEAVING_MEETING",{reason:"ended by host"})}return t.meeting.isMeetingReset?$:ke($u(t,!1))})),meetingFailoverEpic:(e,t)=>e.pipe(Vt("".concat(io)),Nt(t),xe(([,e])=>{const t=$u(e,!0),r=function(e){if(e){const{meeting:{apiKey:t,signature:r,meetingNumber:n,userId:o,userName:i,lang:s,passWord:a,userEmail:c,sdkUrl:u,sdkOrigin:d,proxy:l,cv:p,zak:h}}=e;return{apiKey:t,signature:r,meetingNumber:n,userId:o,userName:i,lang:s,passWord:a,userEmail:c,sdkUrl:u,sdkOrigin:d,proxy:l,cv:p,ztk:h}}return null}(e);let n=se(ro(r)).pipe(ut(1e3));if(e.meeting.zlkJwtToken){const t=function(e){if(e){const{meeting:{topic:t,passWord:r,userName:n,zlkJwtToken:o,lang:i,cv:s}}=e;return{topic:t,passWord:r,userName:n,zlkJwtToken:o,lang:i,cv:s}}return null}(e),r=Object.assign({},{topic:null==t?void 0:t.topic,password:null==t?void 0:t.passWord,userName:null==t?void 0:t.userName,zlk:null==t?void 0:t.zlkJwtToken,lang:null==t?void 0:t.lang,cv:null==t?void 0:t.cv});n=se(no(r)).pipe(ut(1e3))}return Be(ke(t),n)})),hostChangeEpic:e=>hn(e,7940).pipe(Tt(e=>{rs("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)}),Ae(e=>Eo(e.payload.body))),cohostChangeEpic:e=>hn(e,7941).pipe(Tt(e=>{rs("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)}),Ae(e=>go(e.payload.body))),setMeetingOptEpic:e=>hn(e,7945).pipe(Tt(e=>{const{payload:{body:{opt:t}}}=e;Lo.set(Qo.WebclientOpt,t,Uo.SessionStorage)}),gt($)),setMeetingOnHoldEpic:(e,t)=>ln(e,7942).pipe(Tt(e=>{const{payload:{body:{bHold:t}}}=e;Lo.set(Qo.WebclientIsOnHold,t?1:0,Uo.SessionStorage),rs("MEETING_IN_WAITING_ROOM",t)}),Nt(t),xe(([e,t])=>{const r=[So(e.payload.body.bHold)];if(e.payload.body.bHold){const e=oc(t);if(e){r.push(mo({audio:e.audio,video:e.bVideoOn,muted:e.muted}));const n=ci.getInstance();if("computer"===e.audio&&(n.leaveComputerAudio(),ad.joinOrLeaveVoip(!1)),e.bVideoOn&&n.stopCaptureVideo(),e.sharerOn&&(ad.stopSharing(e.userId),n.stopDesktopSharing(),r.push(xc(exports.ShareStatus.End))),t.video&&t.video.subscribedVideoList.length>0&&t.video.subscribedVideoList.forEach(e=>{ad.unsubscribeVideo(e)}),t.share&&t.share.isReceiveSharing){const e=t.share.activeNodeId;t.share.isRemoteControlApproved&&(ad.sharingRequestRemoteControl(e,!1),n.stopRemoteControl()),ad.unsubscribeSharing(e),n.stopRenderSharing()}}}return ke(r)})),setMeetingDataCenterRegionEpic:e=>ln(e,7954).pipe(Ae(e=>Co(e.payload.body))),claimHostResponseEpic:e=>ln(e,4216).pipe(Tt(e=>{rs("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)}),gt($)),leaveMeetingEpic:(e,t)=>e.pipe(Vt("".concat(so),"".concat(ao)),Nt(t),xe(([e,t])=>(e.type==="".concat(so)?(ad.leaveMeeting(),rs("LEAVING_MEETING",{})):e.type==="".concat(ao)&&(ad.endMeeting(),rs("LEAVING_MEETING",{})),ke($u(t,!1))))),versionUpgradeEpic:e=>ln(e,2).pipe(Tt(e=>{console.warn("Upgrade to latest version to optimize meeting experience")}),gt($)),versionBlockEpic:e=>ln(e,1).pipe(Tt(e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=qn(1e3);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,()=>t);r.reason=e}rs("JOIN_MEETING_FAILED",r)}),gt($))});let dd=window.WEB_ENDPOINT||"zoom.us",ld="https://".concat(dd,"/wc/lsdk");const pd="https://dmogdx0jrul3u.cloudfront.net/".concat("2.0.0","/lib/core"),hd="https://source.zoom.us/".concat("2.0.0","/lib/core"),_d="https://jssdk.zoomus.cn/".concat("2.0.0","/lib/core");let fd=0;const vd={meetingStatus:"initial",isWindowOpen:!1,apiKey:"",signature:"",lang:"en-US",tk:"",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:null,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,enableQos:!0},yd=Pr({["".concat(co)]:Na((e,{payload:t})=>{Object.assign(e,t)}),["".concat(uo)]:Na((e,{payload:t})=>{e.isWindowOpen=t}),["".concat(lo)]:Na((e,{payload:t})=>{e.apiKey=t.apiKey,e.signature=t.signature,e.lang=t.language}),["".concat(po)]:Na((e,{payload:t})=>{e.zak=t}),["".concat(ho)]:Na((e,{payload:t})=>{e.tk=t.tk,e.mtkGuid=t.mtkGuid}),["".concat(_o)]:Na((e,{payload:t})=>{e.pingRWCTimestamp=t}),["".concat(fo)]:Na((e,{payload:t})=>{e.confId=t.confID,e.conId=t.conID,e.e2eEncrypt=t.e2eEncrypt,e.meetingNumber=parseInt(t.mn,10),e.zoomId=t.zoomID,e.meetingStatus="joined",e.jid=t.jid,e.xtoken=t.xtoken,e.groups=t.groups,e.svcUrl=t.svcUrl,e.encType=t.encType,e.userGUID=t.userGUID,e.userId=t.userID,e.role=t.role,e.participantID=t.participantID}),["".concat(vo)]:Na((e,{payload:t})=>{Object.assign(e,t)}),["".concat(Eo)]:Na((e,{payload:t})=>{e.isHost=t}),["".concat(go)]:Na((e,{payload:t})=>{e.isCoHost=t}),["".concat(So)]:Na((e,{payload:t})=>{e.isOnHold=t}),["".concat(bo)]:Na((e,{payload:t})=>{e.isMeetingReset=t}),["".concat(mo)]:Na((e,{payload:t})=>{e.audioVideoBeforeOnHold=t}),["".concat(Io)]:Na((e,{payload:t})=>{e.currentUserAudioBeforeReset=t}),["".concat(Ao)]:Na((e,{payload:t})=>{e.isCurrentUserMutedBeforeReset=t}),["".concat(Oo)]:Na((e,{payload:t})=>{e.meetingStatus=t}),["".concat(Co)]:Na((e,{payload:t})=>{e.region=t.region,e.network=t.network}),["".concat(To)]:Na((e,{payload:t})=>{e.isCurrentUserStartVideoBeforeReset=t}),["".concat(wo)]:Na((e,{payload:t})=>{e.joinMeetingTimeStamp=t}),["".concat(Ro)]:Na((e,{payload:t})=>{e.enableQos=t}),["".concat(yo)]:Na((e,{payload:t})=>{Object.assign(e,u(u({},vd),{},{isMeetingReset:!0,currentUserAudioBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.audio:t.audio,isCurrentUserMutedBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.muted:t.muted,isCurrentUserStartVideoBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.video:t.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}))})},vd),Ed=dn(ud,{meetingInfoEpic:(e,t)=>e.pipe(Vt("".concat(no)),At(e=>{const r=Object.assign({},e.payload,{password:Xn(e.payload.password),topic:Xn(e.payload.topic)});return((e,t,r="zoomsdkjsonpcallback")=>new H(n=>{fd++;const o="".concat(r).concat(fd),i=document.createElement("script");Object.keys(t).forEach(e=>void 0===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()}}))(ld,r).pipe(st(e=>se({status:!1,result:e.toString(),errorCode:-3e3})),xe(r=>{const[n,o]=et(se(r),e=>!0===e.status&&void 0!==e.result);return o.subscribe(e=>{e.state||(3e3===e.errorCode&&"Meeting password is incorrect"===e.errorMessage?rs("JOIN_MEETING_FAILED",Kn(3004)):-3e3===e.errorCode?rs("JOIN_MEETING_FAILED",{reason:"connection error"}):3e3===e.errorCode?rs("JOIN_MEETING_FAILED",{reason:e.errorMessage,errorCode:200}):300===e.errorCode?rs("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?rs("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?rs("JOIN_MEETING_FAILED",{reason:"The token is expired or more than 2 days or ineffective.",errorCode:200}):124===e.errorCode&&rs("JOIN_MEETING_FAILED",{reason:"Verify JWT failed",errorCode:200}))}),n.pipe(_i(r=>{if(!0===r.status){const{result:{mid:n}}=r;return Lo.init(n),Be(se(co(Qu(r,e.payload))),cn(cd,t,oo()))}}))}))}))}),gd={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0},Sd=Pr({["".concat(en)]:Na((e,{payload:t})=>{e.audioDecodeStatus=t}),["".concat($r)]:Na((e,{payload:t})=>{e.audioEncodeStatus=t}),["".concat(on)]:Na((e,{payload:t})=>{e.sharingDecodeStatus=t}),["".concat(nn)]:Na((e,{payload:t})=>{e.sharingEncodeStatus=t}),["".concat(rn)]:Na((e,{payload:t})=>{e.videoDecodeStatus=t}),["".concat(tn)]:Na((e,{payload:t})=>{e.videoEncodeStatus=t}),["".concat(sn)]:Na((e,{payload:t})=>{e.mediaConstraints=t.mediaConstraints,e.assetsPath=t.assetsPath}),["".concat(an)]:e=>u(u({},gd),{},{mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath})},gd),bd=(e,t,r)=>We(...[t,r].map((t,r)=>{if("initial"!==t)return ke(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return tt(is("".concat(e.toUpperCase(),"_").concat(t,"_SUCCESS"),1).pipe(vt(!0)),is("".concat(e.toUpperCase(),"_").concat(t,"_FAIL"),1).pipe(vt(!1)))}})),md=()=>ke(navigator.mediaDevices.enumerateDevices()).pipe(Ae(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 Id(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 Ad=ii.createAgent();var Od=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>ln(e,12033).pipe(Nt(t),Ae(([e,t])=>{const{participants:{attendeesList:r,allowTalkAttendeesList:n}}=t,o=e.payload.body,i={};return o&&([...r,...n].forEach(e=>{for(let t=1;t<=3;t++){const r="asn".concat(t),{userId:n,displayName:s}=e;if(void 0!==o[r]&&n===o[r]){i[r]={userId:n,displayName:s};break}}}),rs("AUDIO_ACTIVE_SPEAKER",Object.values(i))),hc(i)})),unmuteConsentAfterSpotlighted:(e,t)=>ln(e,16135).pipe(Nt(t),Tt(([e,t])=>{const{payload:{body:{id:r,bLeadershipOn:n}}}=e,{audio:{bCanUnmute:o}}=t,i=oc(t);if(i){const{isHost:e,bCoHost:t,userId:s,audio:a,muted:c}=i,u=e||t;n&&s>>10==r>>10&&(null!==a&&""!==a&&!0!==c||!u&&!o||rs("AUDIO_UNMUTE_CONSENT",Ni.Spotlight))}}),gt($)),unmuteConsentEpic:(e,t)=>ln(e,12037).pipe(Nt(t),Tt(([,e])=>{const t=oc(e);null!==(null==t?void 0:t.audio)&&""!==(null==t?void 0:t.audio)&&1==(null==t?void 0:t.muted)&&rs("AUDIO_UNMUTE_CONSENT",Ni.Unmute)}),gt($)),setAudioAttributeEpic:(e,t)=>ln(e,7938).pipe(Qe(e=>["bCanUnmute","bMutedAll","bMutedUponEntry"].some(t=>void 0!==e.payload.body[t])),hi(e=>{if(void 0!==e.payload.body.bCanUnmute)return _c(e.payload.body.bCanUnmute);if(void 0!==e.payload.body.bMutedAll){const r=oc(t.value);if(("computer"===(null==r?void 0:r.audio)||"phone"===(null==r?void 0:r.audio))&&0==r.muted)return Ec(e.payload.body.bMutedAll)}return void 0!==e.payload.body.bMutedUponEntry?bc(e.payload.body.bMutedUponEntry):void 0})),currentUserAudioChangeEpic:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([,e])=>e.socket.zoomSocketStatus===ms.Connected),_i(([e,t])=>{if(e.payload.body.update&&e.payload.body.update.some(e=>void 0!==e.audio||void 0!==e.muted)){const r=oc(t),n=e.payload.body.update,[o,i]=et(ke(n),e=>e.id===(null==r?void 0:r.userId));i.subscribe(e=>{rs("AUDIO_PARTICIPANT_AUDIO_UPDATE",e)});const{audio:{isActiveOperation:s,isMutedAll:a},audio:{activeMicrophone:c,activeSpeaker:u,audioSsrc:d}}=t,l=za(r.userRole);return o.pipe(Tt(e=>{e.audio!==(null==r?void 0:r.audio)&&(""===e.audio?rs("AUDIO_CURRENT_USER_LEAVE_AUDIO"):"computer"===e.audio?ci.getInstance().joinComputerAudio(d,c,u,!l):"phone"===e.audio&&("computer"===(null==r?void 0:r.audio)&&(ci.getInstance().leaveComputerAudio(),Ad.joinOrLeaveVoip(!1)),rs("AUDIO_CURRENT_USER_JOIN_BY_PHONE"))),(null==r?void 0:r.audio)&&""!==(null==r?void 0:r.audio)&&e.muted!==(null==r?void 0:r.muted)&&(!0===e.muted?rs("AUDIO_CURRENT_USER_MUTED",{source:s?"active":a?"passive(mute all)":"passive(mute one)"}):!1===e.muted&&rs("AUDIO_CURRENT_USER_UNMUTED",{source:s?"active":"passive"}))}),Qe(e=>""!==(null==r?void 0:r.audio)&&e.muted!==(null==r?void 0:r.muted)),gt(se(gc(!1),Ec(!1))))}})),handleDialOutEpic:(e,t)=>ln(e,8198).pipe(Nt(t),Qe(([e,t])=>e.payload.seq==t.audio.dialout.sequence),Tt(([e])=>{const t=e.payload.body.result;rs("AUDIO_DIALOUT_RESULT_CODE",{code:t}),t===Di.Success?rs("AUDIO_DIALOUT_RESULT_SUCCESS"):-1===[Di.Calling,Di.Ringing,Di.Accepted,Di.Success].indexOf(t)&&rs("DIALOUT_FAIL")}),Ae(([e])=>vc(e.payload.body.result))),handleDialouCancelEpic:e=>ln(e,8200).pipe(Tt(e=>{const t=e.payload.body.result;[0,11].indexOf(t)>-1?rs("AUDIO_DIALOUT_CANCEL_SUCCESS"):rs("DIALOUT_CANCEL_FAIL",t)}),Qe(e=>0===e.payload.body.result||11===e.payload.body.result),vt(vc(-1))),handleAllowToTalkEpic:(e,t)=>ln(e,12036).pipe(Nt(t),_i(([e,t])=>{const r=oc(t),{media:{audioEncodeStatus:n},audio:{audioSsrc:o,activeMicrophone:i,activeSpeaker:s}}=t,{promoterID:a,bAllowTalk:c}=e.payload.body;if((null==r?void 0:r.userId)===a){const e=ci.getInstance();if(c){let t=se(!0);return"success"!==n&&(e.enableAudioEncode(),t=tt(is("AUDIO_ENCODE_SUCCESS",1).pipe(vt(!0)),is("AUDIO_ENCODE_FAIL",1).pipe(vt(!1)))),t.pipe(Tt(t=>{t&&(e.joinComputerAudio(o,i,s,!0),rs("AUDIO_UNMUTE_CONSENT",Ni.AllowToTalk))}),vt(yc(!0)))}return Ad.mute(a,!0),e.leaveComputerAudio(),ot(300).pipe(Tt(()=>{e.joinComputerAudio(o,i,s,!1)}),vt(yc(!1)))}})),handleAllowToTalkResponseEpic:e=>ln(e,8205).pipe(Tt(e=>{rs("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)}),gt($)),handleAttendeePromoteDepromote:(e,t)=>pn(e,"POOL").pipe(Qe(e=>e.payload.data.action===ui.Depromote||e.payload.data.action===ui.Promote),Nt(t),Tt(([e,t])=>{const r=oc(t);"phone"===(null==r?void 0:r.audio)?Ad.audioDrop(r.userId):"computer"===(null==r?void 0:r.audio)&&(e.payload.data.action,ui.Promote)}),gt($)),setAudioSSRCEpic:(e,t)=>ln(e,12035).pipe(Nt(t),xe(([e,t])=>{const{meeting:{currentUserAudioBeforeReset:r},media:{audioDecodeStatus:n,audioEncodeStatus:o}}=t,{payload:{body:{ssrc:i}}}=e;let s=void 0;const a=oc(t);if(a&&"computer"===r&&""===a.audio){const e=za(a.userRole);s=bd("audio",e?"success":o,n).pipe(Qe(([e,t])=>e&&t),Tt(()=>{Ad.joinOrLeaveVoip(!0)}),vt(Io(void 0)))}return s?Ye(se(Sc(i)),s):se(Sc(i))})),handleMergeAudioEpic:(e,t)=>ln(e,7952).pipe(At(e=>is("AUDIO_CURRENT_USER_JOIN_BY_PHONE",1).pipe(Nt(t),Tt(([,t])=>{const{BindStatus:r,nOperatorUserId:n}=e.payload.body,o=t.participants.attendeesList.find(e=>e.userId===n);!0===r&&rs("AUDIO_MERGE_AUDIO_INDICATION",{operatorName:null==o?void 0:o.displayName,operatorUserId:n,operatorRole:null==o?void 0:o.userRole})})))),handleUserGrantAudioCaptureEpic:(e,t)=>_n(e,wi.UserGrantCaptureAudio).pipe(Nt(t),xe(([,e])=>{rs("AUDIO_CURRENT_USER_JOIN_BY_VOIP");const t=oc(e),{meeting:{isCurrentUserMutedBeforeReset:r},audio:{bMutedUponEntry:n,isUserGrantCaptureAudio:o}}=e,i=[mc(!0)];return t&&(!0===t.muted&&Ad.mute(t.userId,!0),(!0===r||!o&&!t.isHost&&n)&&(Ad.mute(t.userId,!0),r&&i.push(Ao(void 0)))),ke(i)})),handleUserForbiddenMicrophoneEpic:e=>_n(e,wi.UserForbiddedCaptureAudio).pipe(Tt(()=>{rs("USER_FORBIDDEN_MICROPHONE")}),vt(Ic(!0))),handleAudioSocketErrorEpic:e=>_n(e,wi.AudioWebsocketBroken).pipe(Tt(()=>{rs("ESTABLISH_AUDIO_STREAM_ERROR")}),gt($)),handleAudioZeroDataEpic:(e,t)=>_n(e,wi.AudioZeroData).pipe(Nt(t),hi(([,e])=>{const{audio:{webrtcRestartCount:t,activeMicrophone:r}}=e;if(t<3)return ci.getInstance().restoreWebRTC(r),Ac(t+1)})),handleAutoPlayEpic:(e,t)=>e.pipe(Vt("".concat(Rc)),Qe(e=>!1===e.payload),xe(()=>(rs("AUDIO_AUTO_PLAY_FAILED"),tt(qe(document,"click").pipe(ht(1)),qe(document,"touchend").pipe(ht(1))).pipe(Nt(t),Tt(([,e])=>{const{audio:{audioSsrc:t,activeMicrophone:r,activeSpeaker:n}}=e,o=oc(e),i=za(o.userRole);ci.getInstance().joinComputerAudio(t,r,n,!i),Ad.joinOrLeaveVoip(!0)}),vt(Rc(!0))))))});const Cd={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},Td=Pr({["".concat(hc)]:Na((e,{payload:t})=>{e.asnIds=u({},t)}),["".concat(_c)]:Na((e,{payload:t})=>{e.bCanUnmute=t}),["".concat(fc)]:Na((e,{payload:t})=>{const{dialout:r}=e;r.sequence=t}),["".concat(vc)]:Na((e,{payload:t})=>{const{dialout:r}=e;r.returnCode=t}),["".concat(yc)]:Na((e,{payload:t})=>{e.isAllowToTalk=t}),["".concat(gc)]:Na((e,{payload:t})=>{e.isActiveOperation=t}),["".concat(Ec)]:Na((e,{payload:t})=>{e.isMutedAll=t}),["".concat(Sc)]:Na((e,{payload:t})=>{e.audioSsrc=t}),["".concat(bc)]:Na((e,{payload:t})=>{e.bMutedUponEntry=t}),["".concat(mc)]:Na((e,{payload:t})=>{e.isUserGrantCaptureAudio=t}),["".concat(Ic)]:Na((e,{payload:t})=>{e.isMicrophoneForbidden=t}),["".concat(Ac)]:Na((e,{payload:t})=>{e.webrtcRestartCount=t}),["".concat(Oc)]:Na((e,{payload:t})=>{e.microphoneDevicesList=t}),["".concat(Cc)]:Na((e,{payload:t})=>{e.speakerDevicesList=t}),["".concat(Tc)]:Na((e,{payload:t})=>{e.activeMicrophone=t}),["".concat(wc)]:Na((e,{payload:t})=>{e.activeSpeaker=t}),["".concat(Rc)]:Na((e,{payload:t})=>{e.canPlayAudio=t}),["".concat(Nc)]:({dialout:{returnCode:e}})=>u(u({},Cd),{},{dialout:u(u({},Cd.dialout),{},{returnCode:e})}),["".concat(Dc)]:Na((e,{payload:t})=>{e.isComputerAudioLoading=t})},Cd),wd=dn(Od),Rd=e=>4294966272&e,Nd=ii.createAgent(),Dd=ci.getInstance();var Pd=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>_n(e,wi.StartVideoCaptureSuccess).pipe(Nt(t),hi(([,e])=>{const{video:{cameraDevicesList:t,activeCamera:r},meeting:{userId:n}}=e;return t.length<1?(rs("CAN_NOT_DETECT_CAMERA",{reason:"Cannot detect camera devices"}),void Dd.stopCaptureVideo()):"default"===r||t.some(e=>e.deviceId===r)?void Nd.muteAttendeeVideo(n,!1):(rs("CAN_NOT_FIND_CAMERA",{reason:"cannot find target camera"}),void Dd.stopCaptureVideo())})),startVideoResponse:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([e,t])=>{var r,n,o,i;const s=nc(t);return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id)===s}),Qe(([e,t])=>{var r,n,o,i;return!0===(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.bVideoOn)}),hi(()=>(rs("VIDEO_CAPTURE_START_SUCCESS"),Zc(!0)))),handleForbiddenCaptureVideoEpic:e=>_n(e,wi.UserForbiddedCaptureVideo).pipe(Tt(()=>rs("VIDEO_USER_FORBIDDEN_CAPTURE")),vt(eu(!0))),handleCameraIsTakenByOtherProgramsEpic:e=>_n(e,wi.UserCameraIsTakenByOtherPrograms).pipe(Tt(()=>rs("VIDEO_CAMERA_IS_TAKEN",{reason:"User camera is taken by other programs."})),vt(iu(!0))),handleVideoSocketErrorEpic:e=>_n(e,wi.VideoWebsocketBroken).pipe(Tt(()=>{rs("VIDEO_ESTABLISH_STREAM_ERROR",{reason:"Video websocket broken."})}),gt($)),handleStopVideoCaptureFailedEpic:e=>_n(e,wi.StopVideoCaptureFailed).pipe(Tt(()=>{rs("VIDEO_CAPTURE_STOP_RESULT",{failed:!0,reason:"Unknown."})}),gt($)),handleStopVideoCaptureSuccessEpic:(e,t)=>_n(e,wi.StopVideoCaptureSuccess).pipe(Nt(t),hi(([,e])=>{const{meeting:{userId:t},video:{isCurrentUserStartedVideo:r}}=e;r||rs("VIDEO_CAPTURE_STOP_RESULT"),Nd.muteAttendeeVideo(t,!0)})),stopVideoResponse:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([e,t])=>{var r,n,o,i;const s=nc(t);return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id)===s}),Qe(([e,t])=>{var r,n,o,i;return!1===(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.bVideoOn)}),hi(()=>(rs("VIDEO_CAPTURE_STOP_RESULT"),Zc(!1)))),receiveVideoMuteIndication:(e,t)=>ln(e,16133).pipe(Nt(t),Qe(([e,t])=>{var r,n;return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n?void 0:n.id)===nc(t)}),hi(([e,t])=>{const{id:r,bVideoMute:n}=e.payload.body;return rs("RECEIVE_VIDEO_MUTE_INDICATION",{id:r,isVideoMuted:n}),!0===n&&Dd.stopCaptureVideo(),!1===n&&rs("ASK_FOR_START_VIDEO_CONSENT",{id:r,isVideoMuted:n}),nu(n)})),receiveVideoActiveIndication:e=>ln(e,16129).pipe(Ae(e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,n=Rd(t);return rs("RECEIVE_VIDEO_ACTIVE_INDICATION",{bVideoOn:r,userId:n}),Yc({bVideoOn:r,userId:n})})),receiveVideoSsrcIndication:(e,t)=>ln(e,16131).pipe(Qe(e=>void 0!==e.payload.body.ssrc),Nt(t),At(([e,t])=>{const{meeting:{isCurrentUserStartVideoBeforeReset:r},media:{videoEncodeStatus:n},video:{captureCanvasList:o,activeCamera:i,isVerifiedVideoCaptureCanvasAfterFailover:s}}=t,{payload:{body:{ssrc:a}}}=e;let c=void 0;const u=oc(t);return u&&!0===r&&!0!==u.bVideoOn&&(c=bd("video",n,"success").pipe(Qe(([e,t])=>e&&t),xe(()=>{const e=[Zc(void 0)];return!1===s&&(Array.isArray(o)?o.forEach(e=>{Id(document.querySelector("#".concat(e)))}):Id(document.querySelector("#".concat(o))),e.push(au(!0))),ci.getInstance().startCaptureVideo(a,i,640,360),ke(e)}))),c?Ye(se(Jc(a)),c):se(Jc(a))})),receiveVideoDecodeMaxSizeEpic:e=>_n(e,wi.VideoDecodeMaxSize).pipe(Qe(e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data}),_i(e=>{const{size:t}=e.payload.data;return se(tu(t))})),spotlightVideoResponseEpic:e=>ln(e,16135).pipe(Ae(e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,n=[];return t&&n.push(Rd(r)),rs("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),$c(n)})),handleGroupLayoutIndicationEpic:(e,t)=>ln(e,7958).pipe(Nt(t),Ae(([e,t])=>{const{payload:{body:r}}=e;let n=[];r&&r.group_list&&r.group_list[0]&&(n=r.group_list[0].map(e=>e.id));const o=uc(t);return n=n.filter(e=>o.findIndex(t=>t.userId===e)>=0),rs("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),$c(n)})),handleCurrentVideoResolution:e=>_n(e,wi.CurrentVideoResolution).pipe(hi(e=>(rs("VIDEO_RENDER_START_SUCCESS"),rs("RECEIVE_VIDEO_DIMENSION_CHANGE",e.payload.data),uu(e.payload.data)))),handleMeetingVideoAttributeEpic:e=>ln(e,7938).pipe(Qe(e=>void 0!==e.payload.body.bFollowHostVideo),Ae(e=>(rs("VIDEO_FOLLOW_HOST_ORDER_CHANGE",{bOn:e.payload.body.bFollowHostVideo}),pu(e.payload.body.bFollowHostVideo)))),handleHostDragLayoutIndicationEpic:(e,t)=>ln(e,7957).pipe(Nt(t),Ae(([e,t])=>{const{video:{isFollowHostVideoLayout:r}}=t,{payload:{body:n}}=e,o=n&&n.drag_list&&n.drag_list.map(e=>e.id);return r&&rs("VIDEO_HOST_DRAG_LAYOUT_CHANGE",{layout:o}),hu(o)})),handlePeerVideoStateChangeEpic:(e,t)=>ln(e,7937).pipe(Nt(t),Qe(([e,t])=>{const{meeting:{userId:r},video:{subscribedVideoList:n}}=t,o=e.payload.body.update,i=e.payload.body.remove;return o&&o.length>0&&o.findIndex(e=>e.id!==r&&(void 0!==e.bVideoOn||e.bHold))>-1||i&&i.some(e=>n.includes(e.id))}),Tt(([e,t])=>{const{payload:{body:{remove:r,update:n}}}=e,{video:{subscribedVideoList:o}}=t,i=cc(t);if(r&&r.length>0&&r.filter(e=>o.includes(e.id)).forEach(e=>{rs("VIDEO_OLD_USER_STOP",{userId:e.id})}),n&&n.length>0){const e=n.filter(e=>void 0!==e.bVideoOn).filter(e=>-1===i.findIndex(t=>t.userId===e.id)),t=n.filter(e=>!0===e.bHold);t.length>0&&t.filter(e=>o.includes(e.id)).forEach(e=>{rs("VIDEO_OLD_USER_STOP",{userId:e.id})}),e.forEach(e=>{e.bVideoOn?rs("VIDEO_NEW_USER_START",{userId:e.id}):rs("VIDEO_OLD_USER_STOP",{userId:e.id})})}}),gt($))});const Md={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:[]},kd=Pr({["".concat(Jc)]:Na((e,{payload:t})=>{e.videoSsrc=t}),["".concat(Xc)]:Na((e,{payload:t})=>{e.cameraDevicesList=t}),["".concat(Qc)]:Na((e,{payload:t})=>{e.activeCamera=t}),["".concat(Yc)]:Na((e,{payload:t})=>{e.activeVideoId=t.userId}),["".concat(Zc)]:Na((e,{payload:t})=>{e.isCurrentUserStartedVideo=t}),["".concat($c)]:Na((e,{payload:t})=>{e.spotlightUserList=t}),["".concat(eu)]:Na((e,{payload:t})=>{e.isCaptureForbidden=t}),["".concat(tu)]:Na((e,{payload:t})=>{e.receivedVideoMaxQuality=t}),["".concat(ru)]:Na((e,{payload:t})=>{let r=t;Array.isArray(t)||(r=[t]),e.captureCanvasList=r}),["".concat(nu)]:Na((e,{payload:t})=>{e.isVideoMuted=t}),["".concat(ou)]:Na((e,{payload:t})=>{e.isCaptureCameraLoading=t}),["".concat(iu)]:Na((e,{payload:t})=>{e.isCameraTaken=t}),["".concat(au)]:Na((e,{payload:t})=>{e.isVerifiedVideoCaptureCanvasAfterFailover=t}),["".concat(su)]:Na((e,{payload:t})=>{e.isVerifiedVideoRenderCanvasAfterFailover=t}),["".concat(cu)]:e=>u(u({},Md),{},{captureCanvasList:e.captureCanvasList,activeCamera:e.activeCamera,isVerifiedVideoCaptureCanvasAfterFailover:!1,isVerifiedVideoRenderCanvasAfterFailover:!1}),["".concat(uu)]:Na((e,{payload:t})=>{e.receivedVideoDimension=t}),["".concat(du)]:Na((e,{payload:t})=>{e.subscribedVideoList.includes(t)||e.subscribedVideoList.push(t)}),["".concat(lu)]:Na((e,{payload:t})=>{const r=e.subscribedVideoList.indexOf(t);r>=0&&e.subscribedVideoList.splice(r,1)}),["".concat(_u)]:Na((e,{payload:t})=>{-1===e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key)&&e.renderedVideoList.push(u({},t))}),["".concat(fu)]:Na((e,{payload:t})=>{const r=e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key);r>=0&&e.renderedVideoList.splice(r,1)}),["".concat(pu)]:Na((e,{payload:t})=>{e.isFollowHostVideoLayout=t}),["".concat(hu)]:Na((e,{payload:t})=>{e.hostDragLayout=t})},Md),Ud=dn(Pd),{InitSuccessVideo:Vd,InitSuccessAudio:Ld,InitSuccessSharing:xd,InitFailedVideo:jd,InitFailedAudio:Hd,InitFailedSharing:Fd}=wi;let Gd;const Bd=new z(un(Ed,Ma,pc,dn(Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(Vt("".concat(Qr)),Nt(t),Qe(([,e])=>void 0!==e.media.assetsPath&&void 0!==e.media.mediaConstraints),Tt(([,e])=>{const{media:{assetsPath:r,mediaConstraints:n},meeting:{enableQos:o}}=e;Gd=ci.getInstance(),r&&n&&Gd.setAssetsAndConstraint(r,n);const i=oc(e);let s;s=i?se(i):is("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1).pipe(de(ge),Nt(t),Ae(([,e])=>oc(e))),s.pipe(Nt(t)).subscribe(([e,t])=>{const{meeting:{svcUrl:r,meetingNumber:n,conId:i,e2eEncrypt:s,userId:a,isWebinar:c}}=t;var u;e&&(null===(u=Gd)||void 0===u||u.connect({svcUrl:r,meetingNumber:n,conId:i,e2eEncrypt:s,isViewOnly:za(e.userRole),currentUserId:a,isWebinar:c,enableQos:o}))})}),At(()=>ze(e=>{var t;return null===(t=Gd)||void 0===t?void 0:t.registerCallback(e)},e=>{var t;return null===(t=Gd)||void 0===t?void 0:t.unregisterCallback(e)},(e,t)=>({type:e,data:t})).pipe(Ae(e=>Zr(e))))),connectedMediaStreamEpic:e=>_n(e,[Vd,Ld,xd,jd,Hd,Fd]).pipe(_i(e=>{const{payload:{type:t,data:r}}=e;if(t===Ld||t===Hd){if(r===Ri.EncodeSuccess)return rs("AUDIO_ENCODE_SUCCESS"),se($r("success"));if(r===Ri.DecodeSuccess)return rs("AUDIO_DECODE_SUCCESS"),se(en("success"));if(r===Ri.EncodeFailed)return rs("AUDIO_ENCODE_FAIL"),se($r("failed"));if(r===Ri.DecodeFailed)return rs("AUDIO_DECODE_FAIL"),se(en("failed"))}else if(t===Vd||t===jd){if(r===Ri.EncodeSuccess)return rs("VIDEO_ENCODE_SUCCESS"),se(tn("success"));if(r===Ri.DecodeSuccess)return rs("VIDEO_DECODE_SUCCESS"),se(rn("success"));if(r===Ri.EncodeFailed)return rs("VIDEO_ENCODE_FAIL"),se(tn("failed"));if(r===Ri.DecodeFailed)return rs("VIDEO_DECODE_FAIL"),se(rn("failed"))}else if(t===xd||t===Fd){if(r===Ri.EncodeSuccess)return rs("SHARING_ENCODE_SUCCESS"),se(nn("success"));if(r===Ri.DecodeSuccess)return rs("SHARING_DECODE_SUCCESS"),se(on("success"));if(r===Ri.EncodeFailed)return rs("SHARING_ENCODE_FAIL"),se(nn("failed"));if(r===Ri.DecodeFailed)return rs("SHARING_DECODE_FAIL"),se(on("failed"));if(t===xd&&void 0===r)return rs("SHARING_DECODE_SUCCESS"),se(on("success"))}})),mediaDeviceUpdateEpic:(e,t)=>_n(e,[Vd,Ld]).pipe(fi(()=>{if("object"==typeof navigator.mediaDevices)return Ye(md(),Ye(_n(e,wi.StartVideoCaptureSuccess),qe(navigator.mediaDevices,"devicechange"),_n(e,wi.UserGrantCaptureAudio)).pipe(xe(()=>md().pipe(Tt(()=>{rs("MEDIA_DEVICE_CHANGE")}))))).pipe(Nt(t),xe(([e,t])=>{const r=[Oc(e.microphones),Cc(e.speakers),Xc(e.cameras)];if(t.audio){const{audio:{activeMicrophone:i,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:c}}=t,{microphones:u,speakers:d}=e,l=a.filter(e=>-1===u.findIndex(t=>t.deviceId===e.deviceId)),p=c.filter(e=>-1===d.findIndex(t=>t.deviceId===e.deviceId));var n,o;l.length>0&&l[0].deviceId===i&&(null===(n=Gd)||void 0===n||n.changeMicrophone("default"),r.push(Tc("default"))),p.length>0&&p[0].deviceId===s&&(null===(o=Gd)||void 0===o||o.changeSpeaker("default"),r.push(wc("default")))}return ke(r)}))})),sendUserNodeListToMediaSDKEpic:e=>ln(e,7937).pipe(Tt(e=>{const{payload:{body:t}}=e,r=ci.getInstance();t.add&&r.sendUserNodeList(t.add.map(e=>({userid:e.id,sn:e.zoomID&&$n(e.zoomID)}))),t.remove&&r.sendUserNodeList(t.remove.map(e=>({userid:e.id,bremove:!0})))}),gt($)),handleMediaSdkGcmIVResponseEpic:e=>_n(e,wi.AesGcmIvResponse).pipe(Tt(e=>{const{payload:{data:{workerType:t,iv:r}}}=e,n=Lo.get(Qo.WebclientIVState);if(n){const e=u(u({},n),{},{[t]:r});Lo.set(Qo.WebclientIVState,e,Uo.SessionStorage)}}),gt($))})))),Wd=(e,t,r)=>Bd.pipe(xe(n=>n(e,t,r))),Kd={meeting:yd,socket:Pa,participants:Qa,media:Sd},qd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Z.constructor,r=new t(Z.SchedulerAction),n=new K,o=void 0,i=function(t){o=t;var i=(new K).pipe(de(r)),s=(new K).pipe(de(r)),a=new xt(i),c=new jt(s,o.getState());return n.pipe(Ae((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})),xe((function(e){return ke(e).pipe(mt(r),de(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}(),zd=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||S;function Jd(e){return function(e){for(var t=Object.keys(e),r={},n=0;ne.userId===t);if(o.findIndex(e=>e===il.Attendee)>-1&&(i=ac(r).find(e=>e.userId===t)),!i)return Promise.reject({type:Ji,reason:"no matching user"});{const{meeting:{userId:e}}=n.getState();for(let r=0;r{if(this[Zd][e]&&void 0===o.getState()[e]){const{epic:t,reducer:r,Client:n}=this[Zd][e];o.injectReducer(e,r),o.injectEpic(t);const i=new n(o);this.modules.set(e,i)}}),(null==n?void 0:n.audio)&&void 0===o.getState().audio&&(o.injectReducer("audio",Td),o.injectEpic(wd)),(null==n?void 0:n.video)&&void 0===o.getState().video&&(o.injectReducer("video",kd),o.injectEpic(Ud)),(null==n?void 0:n.screen)&&void 0===o.getState().share&&(o.injectReducer("share",id),o.injectEpic(sd))}return n(lo({apiKey:e,signature:t,language:s})),n(sn({mediaConstraints:r&&r.constraints||{},assetsPath:i})),new Promise((e,t)=>{No(c,()=>{e("")},()=>{t({type:Ji,reason:"depedent assets are not accessible"})})})}on(e,t){((e,t)=>{const r=Qi[e];if(r){const n=es.get(e);if(n)n.push(t),es.set(e,n);else{const n=[t];es.set(e,n);const o=Ye(...r.map(e=>{const{event:t,payload:r}=e;return qe(Zi,t).pipe(Ae(e=>r(e)),de(ge))})).subscribe(t=>{const r=es.get(e);r&&r.forEach(e=>{e(t)})});ts.push(o)}}})(e,t)}off(e,t){((e,t)=>{if(Qi[e]){const r=es.get(e);if(Array.isArray(r)){const n=r.findIndex(e=>e===t);n>-1&&(r.splice(n,1),es.set(e,r))}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[Xd]:e,[Qd]:t}=this;return"connected"===e().socket.zoomSocketStatus&&t(so()),Promise.resolve("")}end(){const{[Xd]:e,[Qd]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(ao()),ot(500).pipe(Tt(()=>{ss()}),vt("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[Yd].getState(),{meeting:{bAllowAttendeeRename:n}}=r,o=oc(r),i=za(o.userRole),s=ic(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 ll.rename(t,Xn(e),Xn(o.displayName)),ed(t,t=>t.displayName===e);{const n=ac(r).find(e=>e.userId===t);return n?(pi.getInstance().rename(n.jid,e),os("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",t=>{const r=t.find(e=>e.jid===n.jid);return r&&r.name===e})):Promise.reject({type:Ji,reason:"no matching user"})}}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})}return e===o.displayName?Promise.resolve():s||n?(ll.rename(o.userId,Xn(e),Xn(o.displayName)),os("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t=>t.displayName===e)):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host disallow rename themselves"})}makeHost(e){return ll.assignHost(e,!1),ed(e,e=>!0===e.isHost)}makeCoHost(e){const t=this[Yd].getState(),r=uc(t).find(t=>t.userId===e);return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:Ji,reason:"user:[".concat(e,"] is already co-host ")}):(ll.assignHost(e,!0),ed(e,e=>!0===e.bCoHost))}revokeCoHost(e){const t=this[Yd].getState(),r=uc(t).find(t=>t.userId===e);return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:Ji,reason:"user:[".concat(e,"] is not a co-host")}):(ll.revokeCoHost(e),ed(e,e=>!1===e.bCoHost))}isHost(){const e=this[Yd].getState(),t=oc(e);return!!t&&t.isHost}isCoHost(){const e=this[Yd].getState(),t=oc(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[Xd]();return e}getCurrentUserInfo(){const e=this[Yd].getState(),t=oc(e);if(t){const r={userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:Ka(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,sharePause:t.sharerPause,feedback:t.feedback};if(e.meeting.isWebinar&&za(t.userRole)){const{participants:{allowTalkAttendeesList:n}}=e,o=n.find(e=>e.userId===t.userId),i=!!o;Object.assign(r,{isAllowToTalk:i}),o&&Object.assign(r,{audio:o.audio,muted:o.muted})}return r}return null}getParticipantsList(){const e=this[Yd].getState(),{meeting:{isWebinar:t,meetingStatus:r}}=e,n=oc(e);return"joined"!==r||!n||n.bHold||t&&za(n.userRole)?[]:uc(e).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,isPhoneUser:Ka(e.userType),bRaiseHand:e.bRaiseHand,bHold:e.bHold,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause,feedback:e.feedback}))}getMeetingHost(){const e=this[Xd](),{meeting:{isWebinar:t}}=e;if(t){const t=oc(e);if(t&&!za(t.userRole)){const t=dc(e);if(t)return{userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:Ka(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,feedback:t.feedback}}}else{const t=dc(e);if(t)return{userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:Ka(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,feedback:t.feedback}}return null}getMeetingInfo(){const{meeting:{meetingStatus:e,isOnHold:t,meetingNumber:r,passWord:n,userName:o,userEmail:i,meetingTopic:s,encType:a,region:c,network:u,topic:d,zlkJwtToken:l,userId:p}}=this[Xd](),h="joined"===e&&!t;if(l)return{topic:d,password:n,userName:o,isInMeeting:h,userId:p};{let e="";return 0===a?e="None":1===a?e="AES ECB":2===a&&(e="AES GCM"),{meetingNumber:r,password:n,userName:o,userEmail:i,meetingTopic:s,encryptionType:e,region:c,network:u,isInMeeting:h,userId:p}}}}).prototype,"end",[nl,tl],Object.getOwnPropertyDescriptor(dl.prototype,"end"),dl.prototype),d(dl.prototype,"changeName",[tl],Object.getOwnPropertyDescriptor(dl.prototype,"changeName"),dl.prototype),d(dl.prototype,"makeHost",[al,nl,tl],Object.getOwnPropertyDescriptor(dl.prototype,"makeHost"),dl.prototype),d(dl.prototype,"makeCoHost",[cl,nl,tl],Object.getOwnPropertyDescriptor(dl.prototype,"makeCoHost"),dl.prototype),d(dl.prototype,"revokeCoHost",[ul,nl,tl],Object.getOwnPropertyDescriptor(dl.prototype,"revokeCoHost"),dl.prototype),dl);!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"}(pl||(pl={})),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"}(hl||(hl={}));const fl=[pl.All,pl.Host,pl.NoOne,pl.EveryonePublicly],vl=[pl.NoAttendee,pl.All,pl.AllPanelist],yl={userId:hl.All,displayName:"Everyone",isHost:!1,isCoHost:!1},El={userId:hl.Panelist,displayName:"All panelists"},gl={userId:hl.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};var Sl=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>pn(e,"Message").pipe(Nt(t),xe(([e,t])=>{const{payload:{data:{sn:r,senderName:n,senderJid:o,receiver:i,text:s}}}=e,a=oc(t),c=ac(t),{meeting:{jid:u,userId:d},participants:{xmppAttendeeList:l}}=t;return ri.beginDecrypt({decryptedText:s,type:Xo.XMPP_CHAT,zoomId:r}).then(({message:e})=>{var t;let r=null,s=null,p=null;a&&za(a.userRole)&&u===i?(r=l.find(e=>e.jid===o),s=d,p=a.displayName):(r=c.find(e=>e.jid===o),s=hl.Panelist,p="All panelists");const h={message:e,sender:{name:n,userId:(null===(t=r)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:p,userId:s},timestamp:(new Date).getTime()};return rs("CHAT_RECEIVE_MESSAGE_EVENTS",h),mu(h)})})),receiveChatMessageFromRWGEpic:(e,t)=>ln(e,7944).pipe(Nt(t),_i(([e,t])=>{const{meeting:{bIbDisableChat:r,isWebinar:n},participants:{attendeesList:o}}=t,{payload:{body:{attendeeNodeID:i,sn:s,destNodeID:a,text:c,senderName:u}}}=e,d=oc(t),l=ac(t);if(d){const e=za(null==d?void 0:d.userRole)&&i===d.userId;if(!r&&!e){let e,t=s;if(!s){const e=o.find(e=>e.userId===a);e&&(t=e.zoomID)}if(i===hl.SilentModeUsers){const t={message:Qn(c),sender:{name:"Host",userId:a},receiver:{name:"Everyone (in Waiting Room)",userId:i},timestamp:(new Date).getTime()};e=Promise.resolve(t)}else e=ri.beginDecrypt({decryptedText:c,zoomId:t,type:Xo.RWG_CHAT}).then(({message:e})=>{const t=o.find(e=>e.userId===a),r=u?Qn(u):null==t?void 0:t.displayName;let s="";if(i===hl.All)s=n?"All panelists and attendees":"Everyone";else if(i===hl.Panelist)s="All panelists";else if(n&&l.findIndex(e=>e.userId===i)>-1)s=l.find(e=>e.userId===i).displayName;else{const e=o.find(e=>e.userId===i);e&&(s=e.displayName)}return{message:e,sender:{name:r,userId:a,avatar:null==t?void 0:t.avatar},receiver:{name:s,userId:i},timestamp:(new Date).getTime()}});return e.then(e=>(rs("CHAT_RECEIVE_MESSAGE_EVENTS",e),mu(e)))}}})),changePrivilegeResponse:(e,t)=>ln(e,7938).pipe(Qe(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)}),Nt(t),Ae(([e,t])=>{const{payload:{body:{chatPriviledge:r,bAllowAttendeeChat:n}}}=e,{chat:{chatPrivilege:o}}=t;return void 0!==n?(rs("CHAT_PRIVILEGE_CHANGE",!0===n?{chatPrivilege:o}:{chatPrivilege:pl.NoAttendee}),Au(n)):(rs("CHAT_PRIVILEGE_CHANGE",{chatPrivilege:r}),bu(r))}))});const bl={chatHistory:[],chatPrivilege:pl.All,isAllowAttendeeChat:!0},ml=Pr({["".concat(mu)]:Na((e,{payload:t})=>{e.chatHistory.push(t)}),["".concat(bu)]:Na((e,{payload:t})=>{e.chatPrivilege=t}),["".concat(Au)]:Na((e,{payload:t})=>{e.isAllowAttendeeChat=t}),["".concat(Iu)]:()=>u({},bl)},bl);function Il(e,t,r){if(null==r?void 0:r.host)return[dc(e),...lc(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=[dc(e),...lc(e),...e.participants.attendeesList.filter(e=>!(e.bCoHost||e.isHost))];if(null==r?void 0:r.includeAttendee){const t=ac(e).filter(e=>!Ka(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 Al;const Ol=ii.createAgent(),Cl=pi.getInstance();let Tl=(d((Al=class extends el{constructor(...e){super(...e),this.getHistory=()=>this[Xd]().chat.chatHistory.map(e=>u({},e))}send(e,t){if(!e)return Promise.reject({type:Ji,reason:"Text is empty"});const{[Xd]:r,[Qd]:n}=this,o=r(),i=oc(o),s=function(e,t){if(t===hl.All)return yl;if(t===hl.Panelist)return El;if(t===hl.SilentModeUsers)return gl;{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?void 0:e.zoomID)||!(null==t?void 0:t.displayName)||n===e.userId)return{type:Ji,reason:"invalid target user"};const{chat:{chatPrivilege:o},meeting:{isWebinar:i}}=r,s=ic(r),a=t.isHost||t.bCoHost;if(!s)if(i&&za(e.userRole)){if(o===pl.NoAttendee||o===pl.AllPanelist&&n!==hl.Panelist||o===pl.All&&n!==hl.All&&n!==hl.Panelist)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"}}else if(o===pl.NoAttendee||o===pl.Host&&!a||n===hl.SilentModeUsers||o===pl.EveryonePublicly&&n!==hl.All&&!a)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"};return null})(i,s,o);if(a)return Promise.reject(a);const{meeting:{isWebinar:c,encType:u}}=o,d=u===Yo.AES_GCM;let l=Promise.resolve();return t===hl.SilentModeUsers?Ol.chat(Xn(e),t):l=ri.beginEncrypt({text:e,type:Xo.RWG_CHAT}).then(e=>{c?s.userRole===Ba.Attendee?(Cl.sendWebinarMsg(e,s.jid,hl.IndividualCcPanelist,d),Ol.chat(e,hl.Panelist,null==i?void 0:i.zoomID)):za(i.userRole)&&t===hl.Panelist?Cl.sendWebinarMsg(e,null,hl.Panelist,d):hl.All!==t&&hl.Panelist!==t&&s.userRole===Ba.Attendee||Ol.chat(e,t,null==i?void 0:i.zoomID):Ol.chat(e,t,null==i?void 0:i.zoomID)}),l.then(()=>{const t={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:(new Date).getTime()};return n(mu(t)),rs("CHAT_RECEIVE_MESSAGE_EVENTS",t),t})}setPrivilege(e){const t=this[Xd](),{meeting:{isWebinar:r},chat:{chatPrivilege:n}}=t;return n===e?Promise.resolve(""):!r&&!fl.includes(e)||r&&!vl.includes(e)?Promise.reject({type:Ji,reason:"invalid privilege value of parameter"}):(Ol.setChatPriviledge(e),os("CHAT_PRIVILEGE_CHANGE",t=>t.chatPrivilege===e))}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[Xd]();return t?e:pl.NoAttendee}getReceivers(){const e=this[Xd](),{chat:{chatPrivilege:t,isAllowAttendeeChat:r},meeting:{isWebinar:n}}=e;if(!r)return[];const o=oc(e);if(o)if(n){if(!za(o.userRole))return Il(e,o.userId,{includeAttendee:!0});if(t===pl.All)return[El,yl];if(t===pl.AllPanelist)return[El];if(t===pl.NoAttendee)return[]}else{const r=ic(e);if(t===pl.All||r){const t=Il(e,o.userId);return[yl,...t]}if(t===pl.Host)return Il(e,o.userId,{host:!0});if(t===pl.EveryonePublicly){const t=Il(e,o.userId,{host:!0});return[yl,...t]}if(t===pl.NoOne)return[]}return[]}}).prototype,"send",[tl],Object.getOwnPropertyDescriptor(Al.prototype,"send"),Al.prototype),d(Al.prototype,"setPrivilege",[rl,tl],Object.getOwnPropertyDescriptor(Al.prototype,"setPrivilege"),Al.prototype),Al);const wl=dn(Sl);let Rl;!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"}(Rl||(Rl={}));const Nl=(e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{meeting:{bIbDisableShare:s},share:{sharePrivilege:a,ssrc:c,isChromeExtensionInstalled:d,isVerifiedCaptureCanvasAfterFailover:l},media:{sharingEncodeStatus:p}}=i;if(s)return Promise.reject({type:zi,reason:"information barrier"});const h=ic(i),_=td(i);if(a===exports.SharePrivilege.OnlyHost&&!h)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can start screen share"});if(a===exports.SharePrivilege.HostGrab&&!h&&_.length>0)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can grab screen share"});const f=oc(i);if(!0===(null==f?void 0:f.sharerOn))return Promise.reject({type:zi,reason:"you have already started screen share."});let v=se(!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&&!d&&(o.checkChromeSharingExtension(),v=is("SHARE_CHECK_CHROME_SHARING_EXTENSION",1)),t.id||(t.id="__ZOOM_SDK_SHARE_CANVAS_@__".replace("@","".concat(Math.floor(1e4*Math.random())))),We([bd("sharing",p,"success"),v]).subscribe(([e,r])=>{const[i]=e;if(i&&r){!1===l&&(Id(t),n(Kc(!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)),o.startDesktopSharing(c,t.id,"__ZOOM_SDK_SHARING_VIDEO__")}}),new Promise((e,t)=>{tt(is("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1),is("SHARE_CHECK_CHROME_SHARING_EXTENSION").pipe(Qe(e=>!e),ht(1),gt(ae({reason:"required extension",extensionUrl:"https://chrome.google.com/webstore/detail/zoom-scheduler/kgjfgplpablkjnlkjmjdecgdpfankdle"}))),is("SHARE_START_DESKTOP_SHARE_FAILED",1).pipe(gt(ae({reason:"user deny screen share"})))).subscribe(r=>{!0===r.sharerOn?e(""):t({type:"INTERNAL_ERROR"})},e=>{t(u({type:zi},e))})})},Dl=tc([uc],e=>e.filter(e=>e.bVideoOn));var Pl,Ml,kl,Ul,Vl,Ll,xl,jl,Hl,Fl,Gl,Bl,Wl,Kl,ql,zl,Jl,Yl,Xl,Ql,Zl,$l,ep,tp;let rp=(Pl=ol("audio"),Ml=ol("audio"),kl=ol("audio"),Ul=ol("audio"),Vl=ol("audio"),Ll=ol("audio"),xl=ol("video"),jl=ol("video"),Hl=ol("video"),Fl=ol("video"),Gl=ol("video"),Bl=ol("video"),Wl=ol("video"),Kl=ol("video"),ql=ol("share"),zl=ol("share"),Jl=ol("share"),Yl=ol("share"),Xl=ol("share"),Ql=ol("share"),Zl=ol("share"),$l=ol("share"),np="isShareOptionLocked",ep=function(e,t,r){const n=r.value;r.value=function(...e){const t=this[Yd];if(t){const{meeting:{meetingOptions:e}}=t.getState();if(!0===e[np])return Promise.reject({type:"OPERATION_LOCKED",reason:"".concat(np," is locked")})}return n.apply(this,e)}},d((tp=class extends el{constructor(e){super(e),this[Yd].dispatch(Qr()),this[$d]={store:e,mediaAgent:ci.getInstance(),rwgAgent:ii.createAgent()}}startAudio(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n}=e,o=t(),i=oc(o);if("computer"===(null==i?void 0:i.audio))return Promise.resolve();if("phone"===(null==i?void 0:i.audio))return Promise.reject({type:zi,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:t,canPlayAudio:s},media:{audioDecodeStatus:a,audioEncodeStatus:c}}=o;if(t)return Promise.reject({type:zi,reason:"Computer audio has been loading, please wait."});if(i){r(Dc(!0));const{userRole:t}=i,o=za(t);bd("audio",o&&!e?"success":c,a).subscribe(([e,t])=>{if(e&&t){let e=s?Promise.resolve():function(){const e=document.createElement("audio");return e.muted=!1,e.volume=.1,e.src=URL.createObjectURL(Pi),e.play()}();void 0===e&&(e=Promise.resolve()),e.then(()=>{n.joinOrLeaveVoip(!0)}).catch(()=>{r(Rc(!1))})}})}return"failed"===c||"failed"===a?(r(Dc(!1)),Promise.reject({type:"INTERNAL_ERROR",reason:"audio encode or decode error"})):new Promise((e,t)=>{tt(is(Bi.JoinComputerAudio.success,1),Ye(...Bi.JoinComputerAudio.fail.map(e=>is(e,1).pipe(xe(()=>ae({type:"INSUFFICIENT_PRIVILEGES",reason:e}))))),ot(3e4).pipe(xe(()=>ae({type:"OPERATION_TIMEOUT"})))).subscribe(()=>{r(Dc(!1)),e("")},e=>{n.joinOrLeaveVoip(!1),r(Dc(!1)),t(e)})})}})(this[$d])}stopAudio(){return(e=>{const{store:{getState:t,dispatch:r},mediaAgent:n,rwgAgent:o}=e,i=t(),{audio:{isComputerAudioLoading:s}}=i,a=oc(i);return s?Promise.reject({type:zi,reason:"Computer audio has not finished joining, please wait."}):"computer"===(null==a?void 0:a.audio)?(n.leaveComputerAudio(),o.joinOrLeaveVoip(!1),r(Ac(0)),os("AUDIO_CURRENT_USER_LEAVE_AUDIO")):Promise.resolve("")})(this[$d])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=oc(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:zi,reason:"no audio joined"}):!0===(null==a?void 0:a.muted)?Promise.resolve(""):(n(gc(!0)),o.mute(a.userId,!0),os("AUDIO_CURRENT_USER_MUTED").then(()=>(i.muteAudio(),"")));if(ic(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:zi,reason:"no audio joined"}):!1===n.muted?(o.mute(t,!0),os("AUDIO_PARTICIPANT_AUDIO_UPDATE",e=>e.id===t&&1==e.muted)):Promise.resolve(""):Promise.reject({type:Ji,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[$d],e)}unmuteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=oc(s);if(void 0===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:zi,reason:"no audio joined"}):!1===(null==a?void 0:a.muted)?Promise.resolve(""):(n(gc(!0)),s.audio.bCanUnmute?(o.mute(a.userId,!1),os("AUDIO_CURRENT_USER_UNMUTED").then(()=>(i.unmuteAudio(),""))):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host not allow unmute themselves"}));if(ic(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:zi,reason:"no audio joined"}):(!0===n.muted&&o.mute(t,!1),Promise.resolve("")):Promise.reject({type:Ji,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[$d],e)}switchMicrophone(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{microphoneDevicesList:i,activeMicrophone:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeMicrophone(t),n(Tc(t))),Promise.resolve(""))})(this[$d],e)}switchSpeaker(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{speakerDevicesList:i,activeSpeaker:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeSpeaker(t),n(wc(t))),Promise.resolve(""))})(this[$d],e)}getMicList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.microphoneDevicesList]:[]})(this[$d])}getSpeakerList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.speakerDevicesList]:[]})(this[$d])}isAudioMuted(e){return(({store:{getState:e}},t)=>{const r=e(),{meeting:{isWebinar:n}}=r;let o=null;return void 0===t?o=oc(r):(o=r.participants.attendeesList.find(e=>e.userId===t),n&&!o&&(o=r.participants.xmppAttendeeList.find(e=>e.userId===t))),!!o&&!!o.muted})(this[$d],e)}getActiveMicrophone(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeMicrophone:null})(this[$d])}getActiveSpeaker(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeSpeaker:null})(this[$d])}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:u,isCaptureCameraLoading:d,isCurrentUserStartedVideo:l,isVideoMuted:p}}=i;return l?Promise.reject({type:zi,reason:"Video is started"}):d?Promise.reject({type:zi,reason:"Camera is starting,please wait."}):p&&!ic(i)?Promise.reject({type:zi,reason:"Video is muted by the host"}):(n(ou(!0)),bd("video",a,s).subscribe(([e])=>{if(e){const{cameraId:e=u,captureWidth:r=640,captureHeight:i=360,videoDOMId:s}=t||{};o.startCaptureVideo(c,e,r,i,s),u!==e&&n(Qc(e))}else n(ou(!1))}),ns(ji).then(()=>{n(iu(!1)),n(eu(!1))}).finally(()=>{n(ou(!1))}))})(this[$d],e)}stopVideo(){return(e=>{const{store:{getState:t},mediaAgent:r}=e,{video:{isCaptureCameraLoading:n,isCurrentUserStartedVideo:o}}=t();return n?Promise.reject({type:zi,reason:"Camera is starting,please wait."}):o?(r.stopCaptureVideo(),os("VIDEO_CAPTURE_STOP_RESULT",e=>!0!==(null==e?void 0:e.failed))):Promise.reject({type:zi,reason:"carmera is closed"})})(this[$d])}switchCamera(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{video:{cameraDevicesList:s,isCurrentUserStartedVideo:a}}=i;return-1===s.map(e=>e.deviceId).indexOf(t)?Promise.reject({type:Ji,reason:"Cannot find cameraDeviceId in camera devices list."}):(a&&o.changeCamera(t),n(Qc(t)),Promise.resolve())})(this[$d],e)}renderVideo(e,t,r,n,o,i,s,a){return((e,t,r,n,o,i,s,a,c,u)=>{const{store:{getState:d,dispatch:l},mediaAgent:p,rwgAgent:h}=e,_=d(),{meeting:{userId:f},video:{subscribedVideoList:v}}=_;if(!t)return Promise.reject({type:Ji,reason:"Received canvas is falsy"});if(v.length>=9)return Promise.reject({type:zi,reason:"subscribe video counts greater than maximum size (".concat(9,")")});if(-1===Dl(_).findIndex(e=>e.userId===r))return Promise.reject({type:Ji,reason:"user is not send video"});const{media:{videoDecodeStatus:y},video:{isVerifiedVideoRenderCanvasAfterFailover:E}}=_;return t.id||(t.id="__ZOOM_SDK_VIDEO_CANVAS_@__".replace("@","".concat(Math.floor(1e4*Math.random())))),bd("video","success",y).subscribe(([e])=>{if(e){let e=t;!1===E&&(e=Id(t),l(su(!0)));const u=r===f,d=c||"__ZOOM_SDK_VIDEO_ZONE__";p.renderVideo(e.id,r,d,n,o,i,s,a,u,"",!1),v.includes(r)||(h.subscribeVideo(r,a,!1),l(du(r))),l(_u({userId:r,key:d}))}}),"failed"===y?Promise.reject({type:"INTERNAL_ERROR",reason:"Video decode status is failed"}):Promise.resolve("")})(this[$d],e,t,r,n,o,i,s,a)}stopRenderVideo(e,t,r,n,o=!1){return((e,t,r,n,o,i=!1)=>{const{store:{getState:s,dispatch:a},mediaAgent:c,rwgAgent:u}=e,d=s(),{video:{subscribedVideoList:l,renderedVideoList:p}}=d;if(!t||!t.id)return Promise.reject({type:Ji,reason:"canvas is falsy"});if(l.includes(r)){let e=o;e||(e={R:0,G:0,B:0,A:0});const s=n||"__ZOOM_SDK_VIDEO_ZONE__";p.find(e=>e.userId===r&&e.key===s)&&(c.stopRenderVideo(t.id,r,s,e,i),1==p.filter(e=>e.userId===r).length&&(u.unsubscribeVideo(r),a(lu(r))),a(fu({userId:r,key:s})))}return Promise.resolve("")})(this[$d],e,t,r,n,o)}updateVideoCanvasDimension(e,t,r){return((e,t,r,n)=>{const{mediaAgent:o}=e;return t&&t.id?(o.updateRenderedVideoCanvasDimension(t.id,r,n),Promise.resolve("")):Promise.reject({type:Ji,reason:"canvas is falsy"})})(this[$d],e,t,r)}adjustRenderedVideoPosition(e,t,r,n,o,i,s){return((e,t,r,n,o,i,s,a)=>{const{store:{getState:c},mediaAgent:u}=e;if(!t||!t.id)return Promise.reject({type:Ji,reason:"canvas is falsy"});const{video:{subscribedVideoList:d}}=c();return d.includes(r)?(u.adjustRenderedVideoPosition(t.id,r,a||"__ZOOM_SDK_VIDEO_ZONE__",i,s,n,o),Promise.resolve("")):Promise.reject({type:Ji,reason:"userId is not correct"})})(this[$d],e,t,r,n,o,i,s)}clearVideoCanvas(e,t){return((e,t,r)=>{const{mediaAgent:n}=e;if(!t||!t.id)return Promise.reject({type:Ji,reason:"canvas is falsy"});let o=r;return o||(o={R:0,G:0,B:0,A:0}),n.clearVideoCanvas(t.id,o),Promise.resolve("")})(this[$d],e,t)}isCapturingVideo(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCurrentUserStartedVideo})(this[$d])}isCameraTaken(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCameraTaken})(this[$d])}isCaptureForbidden(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCaptureForbidden})(this[$d])}getCameraList(){return(e=>{const{store:{getState:t}}=e,r=t();if(!r.video)return[];const{video:{cameraDevicesList:n}}=r;return n.map(e=>Object.assign({},e))})(this[$d])}getActiveCamera(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeCamera:""})(this[$d])}getActiveVideoId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeVideoId:0})(this[$d])}getVideoMaxQuality(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.receivedVideoMaxQuality:exports.VideoQuality.Video_90P})(this[$d])}getReceivedVideoDimension(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.receivedVideoDimension:null})(this[$d])}isSupportMultipleVideos(){return"function"==typeof OffscreenCanvas&&"function"==typeof SharedArrayBuffer}startShareView(e,t){return((e,t,r,n)=>{const{store:{getState:o,dispatch:i},mediaAgent:s,rwgAgent:a}=e,{share:{isReceiveSharing:c,isRemoteSharingActive:u,activeNodeId:d,activeSsrc:l,shareQuality:p,status:h,isVerifiedRenderCanvasAfterFailover:_},media:{sharingDecodeStatus:f}}=o();if(!t||r!==d)return Promise.reject({type:Ji,reason:""});if(!u||c||h!==exports.ShareStatus.End)return Promise.reject({type:zi,reason:""});return bd("sharing","success",f).subscribe(([,e])=>{if(e){let e=t;!1===_&&(e=Id(t),i(Wc(!0))),i(kc(!0)),a.subscribeSharing(r,p),s.renderSharing(l,e,!1,n)}}),"failed"===f?Promise.reject({type:"INTERNAL_ERROR",reason:""}):os("SHARE_RECEIVED_DIMENSION_CHANGE",e=>!!e,6e4)})(this[$d],e,t)}stopShareView(){return(e=>{const{store:{dispatch:t,getState:r},rwgAgent:n,mediaAgent:o}=e,{share:{isReceiveSharing:i,activeNodeId:s}}=r();return i?(o.stopRenderSharing(),n.unsubscribeSharing(s),t(kc(!1)),Promise.resolve("")):Promise.resolve("")})(this[$d])}switchShareView(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),{share:{isReceiveSharing:a,activeNodeId:c,isRemoteControlApproved:u,isGrabRemoteControl:d,shareQuality:l}}=s;return a?t===c?Promise.resolve(""):td(s).findIndex(e=>e.userId===c)>-1?(u&&(d&&o.subscribeGrabRemoteControl(c,!1),o.sharingRequestRemoteControl(c,!1)),o.unsubscribeSharing(c),o.subscribeSharing(t,l),i.switchSharingSource(t),n(Mc({bStatus:1,activeNodeID:t,ssrc:t})),Promise.resolve("")):Promise.reject({type:Ji,reason:"no matching user id"}):Promise.reject({type:zi})})(this[$d],e)}updateSharingCanvasDimension(e,t){return((e,t,r)=>{const{store:{getState:n},mediaAgent:o}=e,i=n(),{share:{isReceiveSharing:s}}=i;return s&&o.updateRenderedSharingDimension(t,r),Promise.resolve("")})(this[$d],e,t)}startShareScreen(e){return Nl(this[$d],e)}stopShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n,mediaAgent:o}=e,{share:{status:i},meeting:{userId:s}}=t();return i===exports.ShareStatus.End?Promise.resolve(""):(r(xc(exports.ShareStatus.End)),n.stopSharing(s),o.stopDesktopSharing(),os("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!1===e.sharerOn))})(this[$d])}pauseShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n,mediaAgent:o}=e,{share:{status:i}}=t();return i===exports.ShareStatus.Sharing?(n.pauseSharing(),o.pauseDesktopSharing(),os("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerPause).then(()=>(r(xc(exports.ShareStatus.Paused)),""))):Promise.reject({type:zi})})(this[$d])}resumeShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n,mediaAgent:o}=e,{share:{status:i}}=t();return i===exports.ShareStatus.Paused?(n.resumeSharing(),o.resumeDesktopSharing(),os("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerOn&&!1===e.sharerPause).then(()=>(r(xc(exports.ShareStatus.Sharing)),""))):Promise.reject({type:zi})})(this[$d])}lockShare(e){return((e,t)=>((e,t)=>{const{store:{getState:r},rwgAgent:n}=e,{share:{sharePrivilege:o}}=r();return o===t?Promise.resolve(""):Object.values(exports.SharePrivilege).includes(t)?(n.lockSharing(t),os("UPDATE_MEETING_ATTRIBUTE",e=>e.lockShare===t)):Promise.reject({type:Ji})})(e,t?exports.SharePrivilege.OnlyHost:exports.SharePrivilege.HostGrab))(this[$d],e)}getShareUserList(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?td(r).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause})):[]})(this[$d])}getActiveShareUserId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share&&r.share.isRemoteSharingActive?r.share.activeNodeId:0})(this[$d])}isReceiveSharing(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.share&&r.share.isReceiveSharing})(this[$d])}getSharedContentDimension(){return(e=>{const{store:{getState:t}}=e,r=t();if(r.share){if(r.share.status!==exports.ShareStatus.End)return u({},r.share.shareDimension);{const{share:{receivedShareDimension:e}}=r;return{width:e.width,height:e.height}}}return null})(this[$d])}getShareStatus(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?r.share.status:null})(this[$d])}}).prototype,"startAudio",[tl,Pl],Object.getOwnPropertyDescriptor(tp.prototype,"startAudio"),tp.prototype),d(tp.prototype,"stopAudio",[tl,Ml],Object.getOwnPropertyDescriptor(tp.prototype,"stopAudio"),tp.prototype),d(tp.prototype,"muteAudio",[tl,kl],Object.getOwnPropertyDescriptor(tp.prototype,"muteAudio"),tp.prototype),d(tp.prototype,"unmuteAudio",[tl,Ul],Object.getOwnPropertyDescriptor(tp.prototype,"unmuteAudio"),tp.prototype),d(tp.prototype,"switchMicrophone",[tl,Vl],Object.getOwnPropertyDescriptor(tp.prototype,"switchMicrophone"),tp.prototype),d(tp.prototype,"switchSpeaker",[tl,Ll],Object.getOwnPropertyDescriptor(tp.prototype,"switchSpeaker"),tp.prototype),d(tp.prototype,"startVideo",[tl,xl],Object.getOwnPropertyDescriptor(tp.prototype,"startVideo"),tp.prototype),d(tp.prototype,"stopVideo",[tl,jl],Object.getOwnPropertyDescriptor(tp.prototype,"stopVideo"),tp.prototype),d(tp.prototype,"switchCamera",[tl,Hl],Object.getOwnPropertyDescriptor(tp.prototype,"switchCamera"),tp.prototype),d(tp.prototype,"renderVideo",[tl,Fl],Object.getOwnPropertyDescriptor(tp.prototype,"renderVideo"),tp.prototype),d(tp.prototype,"stopRenderVideo",[tl,Gl],Object.getOwnPropertyDescriptor(tp.prototype,"stopRenderVideo"),tp.prototype),d(tp.prototype,"updateVideoCanvasDimension",[tl,Bl],Object.getOwnPropertyDescriptor(tp.prototype,"updateVideoCanvasDimension"),tp.prototype),d(tp.prototype,"adjustRenderedVideoPosition",[tl,Wl],Object.getOwnPropertyDescriptor(tp.prototype,"adjustRenderedVideoPosition"),tp.prototype),d(tp.prototype,"clearVideoCanvas",[tl,Kl],Object.getOwnPropertyDescriptor(tp.prototype,"clearVideoCanvas"),tp.prototype),d(tp.prototype,"startShareView",[tl,ql],Object.getOwnPropertyDescriptor(tp.prototype,"startShareView"),tp.prototype),d(tp.prototype,"stopShareView",[tl,zl],Object.getOwnPropertyDescriptor(tp.prototype,"stopShareView"),tp.prototype),d(tp.prototype,"switchShareView",[tl,Jl],Object.getOwnPropertyDescriptor(tp.prototype,"switchShareView"),tp.prototype),d(tp.prototype,"updateSharingCanvasDimension",[tl,Yl],Object.getOwnPropertyDescriptor(tp.prototype,"updateSharingCanvasDimension"),tp.prototype),d(tp.prototype,"startShareScreen",[tl,Xl],Object.getOwnPropertyDescriptor(tp.prototype,"startShareScreen"),tp.prototype),d(tp.prototype,"stopShareScreen",[tl,Ql],Object.getOwnPropertyDescriptor(tp.prototype,"stopShareScreen"),tp.prototype),d(tp.prototype,"pauseShareScreen",[tl,Zl],Object.getOwnPropertyDescriptor(tp.prototype,"pauseShareScreen"),tp.prototype),d(tp.prototype,"resumeShareScreen",[tl,$l],Object.getOwnPropertyDescriptor(tp.prototype,"resumeShareScreen"),tp.prototype),d(tp.prototype,"lockShare",[rl,ep,tl],Object.getOwnPropertyDescriptor(tp.prototype,"lockShare"),tp.prototype),tp);var np,op;const ip={chat:{epic:wl,reducer:ml,Client:Tl}},sp=ii.createAgent();let ap=(d((op=class extends _l{constructor(e){super(e),this.mediaStream=void 0,this[Zd]=ip}getMediaStream(){return void 0===this.mediaStream&&(this.mediaStream=new rp(this[Yd])),this.mediaStream}joinInstant(e,t,r,n,o){const{[Xd]:i,[Qd]:s}=this,{meeting:{lang:a,meetingStatus:c},socket:{zoomSocketStatus:u}}=i();return t?"initial"===c&&"closed"===u?(s(no({topic:e,password:o||"",userName:r,zlk:t,lang:a,cv:n})),ns(Si)):Promise.reject({type:zi,reason:"duplicated operation"}):Promise.reject({type:zi,reason:"invalid signature"})}removeUser(e){const t=this[Yd].getState(),{participants:{attendeesList:r}}=t;return r.find(t=>t.userId===e)?(sp.expel(e),os("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t=>t.some(t=>t.userId===e))):Promise.reject({type:Ji,reason:"no matched user"})}}).prototype,"removeUser",[rl,tl],Object.getOwnPropertyDescriptor(op.prototype,"removeUser"),op.prototype),op);class cp{constructor(e){this.instant=void 0,this.context=void 0,this.script=void 0,this.mic=void 0,this.instant=0,this.context=e,this.mic=null,this.script=e.createScriptProcessor(2048,1,1),this.script.onaudioprocess=e=>{const t=e.inputBuffer.getChannelData(0);let r,n=0;for(r=0;re.stop()),this.audioStream=null,this.isAudioStarted=!1}async toggleMicIsMuted(e){if(e){if(!this.audioContext){const e=window.AudioContext||window.webkitAudioContext;this.audioContext=new e}this.inputMicDetector=new cp(this.audioContext),this.inputMicDetector.connectToSource(this.audioStream)}else this.inputMicDetector&&this.inputMicDetector.stop(),this.inputMicDetector=null;this.isMicUnmuted=e}getAudioConstraints(){return{audio:""===this.deviceId||{deviceId:this.deviceId},video:!1}}}const dp={width:{min:1024,ideal:1280,max:1920},height:{min:576,ideal:720,max:1080},aspectRatio:{ideal:1.777777778}};class lp{constructor(e=""){this.isVideoStarted=void 0,this.videoStream=void 0,this.deviceId=void 0,this.isVideoStarted=!1,this.videoStream=null,this.deviceId=e}async start(e){if(!e)throw new Error("Video DOM element is falsy");if(this.isVideoStarted||this.videoStream)throw new Error("VideoAlreadyStartedError");const t=async t=>{if(!t||"OverconstrainedError"!==t.name&&"ConstraintNotSatisfiedError"!==t.name)throw t;console.log("Warning: detected ".concat(t.name," -- trying to fall back to lower aspect ratio"));try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints(!0));return this.tryPlayVideo(e,t)}catch(e){throw e}};try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints());return this.tryPlayVideo(e,t)}catch(e){return t(e)}}async stop(){if(!this.videoStream||!this.isVideoStarted)throw new Error("VideoNotStartedError");this.videoStream.getVideoTracks().forEach(e=>e.stop()),this.videoStream=null,this.isVideoStarted=!1}getVideoConstraints(e=!1){let t=dp;return e?t=""===this.deviceId||{deviceId:this.deviceId}:""!==this.deviceId&&(t.deviceId=this.deviceId),{audio:!1,video:t}}async tryPlayVideo(e,t){if(!e)throw new Error("Video DOM element is falsy");try{this.videoStream=t,e.srcObject=this.videoStream,await e.play(),this.isVideoStarted=!0}catch(e){throw e}}}class pp{static createClient(){if(!this.meetingClient){const e=function(){const e=[qd],t=f(Jd(),zd(function(){for(var e=arguments.length,t=new Array(e),r=0;r{void 0===t.asyncReducers[e]&&(t.asyncReducers[e]=r,t.replaceReducer(Jd(t.asyncReducers)))},t.injectEpic=e=>{Bd.next(e)},qd.run(Wd),t}();this.meetingClient=new ap(e)}return this.meetingClient}static destroyClient(){this.meetingClient&&(this.meetingClient.leave().then(()=>{ot(500).subscribe(()=>{ss()})}),this.meetingClient=null)}static checkSystemRequirements(){return{audio:Ho()&&Fo(),video:Ho()&&void 0!==navigator.mediaDevices,screen:Ho()&&void 0!==(navigator.mediaDevices&&navigator.mediaDevices).getDisplayMedia}}static getDevices(e){return e?navigator.mediaDevices.enumerateDevices():navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(e=>(e.getTracks().forEach(e=>e.stop()),navigator.mediaDevices.enumerateDevices()))}static createLocalAudioTrack(e=""){return new up(e)}static createLocalVideoTrack(e=""){return new lp(e)}}pp.meetingClient=void 0,pp.VERSION="2.0.0";var hp,_p,fp="https://dmogdx0jrul3u.cloudfront.net/videosdk/".concat("1.1.0","/lib"),vp="https://source.zoom.us/videosdk/".concat("1.1.0","/lib"),yp="https://jssdk.zoomus.cn/videosdk/".concat("1.1.0","/lib"),Ep=Symbol("stream"),gp=function(){function t(r){e(this,t),this[Ep]=void 0,this[Ep]=r}return r(t,[{key:"startAudio",value:function(){return this[Ep].startAudio()}},{key:"stopAudio",value:function(){return this[Ep].stopAudio()}},{key:"muteAudio",value:function(e){return this[Ep].muteAudio(e)}},{key:"unmuteAudio",value:function(e){return this[Ep].unmuteAudio(e)}},{key:"isAudioMuted",value:function(e){return this[Ep].isAudioMuted(e)}},{key:"getMicList",value:function(){return this[Ep].getMicList()}},{key:"getSpeakerList",value:function(){return this[Ep].getSpeakerList()}},{key:"getActiveMicrophone",value:function(){return this[Ep].getActiveMicrophone()}},{key:"getActiveSpeaker",value:function(){return this[Ep].getActiveSpeaker()}},{key:"switchMicrophone",value:function(e){return this[Ep].switchMicrophone(e)}},{key:"switchSpeaker",value:function(e){return this[Ep].switchSpeaker(e)}},{key:"startVideo",value:function(e){return this[Ep].startVideo(e)}},{key:"stopVideo",value:function(){return this[Ep].stopVideo()}},{key:"renderVideo",value:function(e,t,r,n,o,i,s,a){return this[Ep].renderVideo(e,t,r,n,o,i,s,a)}},{key:"stopRenderVideo",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this[Ep].stopRenderVideo(e,t,r,n,o)}},{key:"updateVideoCanvasDimension",value:function(e,t,r){return this[Ep].updateVideoCanvasDimension(e,t,r)}},{key:"adjustRenderedVideoPosition",value:function(e,t,r,n,o,i,s){return this[Ep].adjustRenderedVideoPosition(e,t,r,n,o,i,s)}},{key:"clearVideoCanvas",value:function(e,t){return this[Ep].clearVideoCanvas(e,t)}},{key:"getCameraList",value:function(){return this[Ep].getCameraList()}},{key:"switchCamera",value:function(e){return this[Ep].switchCamera(e)}},{key:"isCapturingVideo",value:function(){return this[Ep].isCapturingVideo()}},{key:"isCameraTaken",value:function(){return this[Ep].isCameraTaken()}},{key:"getActiveVideoId",value:function(){return this[Ep].getActiveVideoId()}},{key:"getActiveCamera",value:function(){return this[Ep].getActiveCamera()}},{key:"isCaptureForbidden",value:function(){return this[Ep].isCaptureForbidden()}},{key:"getVideoMaxQuality",value:function(){return this[Ep].getVideoMaxQuality()}},{key:"getReceivedVideoDimension",value:function(){return this[Ep].getReceivedVideoDimension()}},{key:"isSupportMultipleVideos",value:function(){return this[Ep].isSupportMultipleVideos()}},{key:"startShareView",value:function(e,t){return this[Ep].startShareView(e,t)}},{key:"stopShareView",value:function(){return this[Ep].stopShareView()}},{key:"startShareScreen",value:function(e){return this[Ep].startShareScreen(e)}},{key:"pauseShareScreen",value:function(){return this[Ep].pauseShareScreen()}},{key:"resumeShareScreen",value:function(){return this[Ep].resumeShareScreen()}},{key:"stopShareScreen",value:function(){return this[Ep].stopShareScreen()}},{key:"lockShare",value:function(e){return this[Ep].lockShare(e)}},{key:"isShareLocked",value:function(){return this[Ep].isShareLocked()}},{key:"getActiveShareUserId",value:function(){return this[Ep].getActiveShareUserId()}}]),t}(),Sp=Symbol("chat"),bp=function(){function t(r){e(this,t),this[Sp]=void 0,this[Sp]=r}return r(t,[{key:"send",value:function(e,t){return this[Sp].send(e,t)}},{key:"sendToAll",value:function(e){return this[Sp].send(e,pl.All)}},{key:"setPrivilege",value:function(e){return this[Sp].setPrivilege(e)}},{key:"getPrivilege",value:function(){return this[Sp].getPrivilege()}},{key:"getReceivers",value:function(){return this[Sp].getReceivers().map((function(e){return i({isManager:e.isCoHost},s(e,["isCoHost"]))}))}}]),t}(),mp=function(e){return"string"==typeof e&&e.length>0},Ip=Symbol("Client"),Ap=function(){function t(){e(this,t),this[Ip]=void 0,this.stream=void 0,this.chat=void 0,this[Ip]=pp.createClient()}return r(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Global",r=arguments.length>2?arguments[2]:void 0,n="";switch(t){case"Global":n=vp;break;case"CN":n=yp;break;case"CDN":n=fp;break;default:n=t}return this[Ip].init("","",{language:e,dependentAssets:n,constraints:i({},pp.checkSystemRequirements()),additionalFeatures:["chat"],webEndpoint:r||"zoom.us"})}},{key:"join",value:function(e,t,r,n){return mp(e)&&mp(t)&&mp(r)?e.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of topic is 200"}):r.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of username is 200"}):!n||mp(n)&&!void/^([!@#$%^&*?=]|\w|\d){1,10}$/gi.test(n)?this[Ip].joinInstant(e,t,r,"1.1.0",n):Promise.reject({type:"INVALID_PARAMETERS",reason:"Password can contain English characters, numbers and special characters like !@#$%^&*?=, and the max length of password is 10"}):Promise.reject({type:"INVALID_PARAMETERS",reason:"topic, token and userName must be string and required"})}},{key:"leave",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?this[Ip].end():this[Ip].leave()}},{key:"getSessionInfo",value:function(){var e=this[Ip].getMeetingInfo();return{isInMeeting:e.isInMeeting||!1,password:e.password||"",topic:e.topic,userName:e.userName,userId:e.userId}}},{key:"on",value:function(e,t){this[Ip].on(e,t)}},{key:"off",value:function(e,t){this[Ip].off(e,t)}},{key:"getMediaStream",value:function(){return this.stream||(this.stream=new gp(this[Ip].getMediaStream())),this.stream}},{key:"getChatClient",value:function(){return this.chat||(this.chat=new bp(this[Ip].getFeatureModule("chat"))),this.chat}},{key:"coverntUser",value:function(e){return{userId:e.userId,avatar:e.avatar||"",displayName:e.displayName,isHost:e.isHost,isManager:e.isCoHost||!1,audio:e.audio,muted:e.muted,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharerPause:e.sharerPause}}},{key:"getCurrentUserInfo",value:function(){var e=this[Ip].getCurrentUserInfo();if(e)return this.coverntUser(e)}},{key:"getUser",value:function(e){var t=this[Ip].getParticipantsList().find((function(t){return t.userId===e}));if(t)return this.coverntUser(t)}},{key:"getAllUser",value:function(){var e=this;return this[Ip].getParticipantsList().map((function(t){return e.coverntUser(t)}))}},{key:"changeName",value:function(e,t){return this[Ip].changeName(e,t)}},{key:"makeHost",value:function(e){return this[Ip].makeHost(e)}},{key:"makeManager",value:function(e){return this[Ip].makeCoHost(e)}},{key:"revokeManager",value:function(e){return this[Ip].revokeCoHost(e)}},{key:"removeUser",value:function(e){return this[Ip].removeUser(e)}},{key:"isHost",value:function(){return this[Ip].isHost()}},{key:"isManager",value:function(){return this[Ip].isCoHost()}}]),t}(),Op=function(){function t(){e(this,t)}return r(t,null,[{key:"createClient",value:function(){return this.videoClient||(this.videoClient=new Ap),this.videoClient}},{key:"destroyClient",value:function(){this.videoClient&&(this.videoClient.leave(),this.videoClient=null)}},{key:"checkSystemRequirements",value:function(){return pp.checkSystemRequirements()}},{key:"getDevices",value:function(e){return pp.getDevices(e)}},{key:"createLocalAudioTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return pp.createLocalAudioTrack(e)}},{key:"createLocalVideoTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return pp.createLocalVideoTrack(e)}}]),t}();Op.videoClient=void 0,Op.VERSION="1.1.0",(hp=exports.ChatPrivilege||(exports.ChatPrivilege={}))[hp.All=1]="All",hp[hp.NoOne=4]="NoOne",hp[hp.EveryonePublicly=5]="EveryonePublicly",(_p=exports.ChatMsgType||(exports.ChatMsgType={}))[_p.All=0]="All",exports.default=Op; +"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function d(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,o){return void 0===o&&(o=0),null!==o&&o>0||null===o&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,o):t.flush(this)},t}(J),Y=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}(),X=function(e){function t(r,o){void 0===o&&(o=Y.now);var n=e.call(this,r,(function(){return t.delegate&&t.delegate!==n?t.delegate.now():o()}))||this;return n.actions=[],n.active=!1,n.scheduled=void 0,n}return m(t,e),t.prototype.schedule=function(r,o,n){return void 0===o&&(o=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,o,n):e.prototype.schedule.call(this,r,o,n)},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}(Y),Z=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t}(X))(Q),$=new H((function(e){return e.complete()}));function ee(e){return e?function(e){return new H((function(t){return e.schedule((function(){return t.complete()}))}))}(e):$}function te(e){return e&&"function"==typeof e.schedule}var re,oe=function(e){return function(t){for(var r=0,o=e.length;r0?e.prototype.requestAsyncId.call(this,t,r,o):(t.actions.push(this),t.scheduled||(t.scheduled=function(e){var t=_e++;return ve[t]=!0,fe.then((function(){return ye(t)&&e()})),t}(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,o){if(void 0===o&&(o=0),null!==o&&o>0||null===o&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,o);0===t.actions.length&&(function(e){ye(e)}(r),t.scheduled=void 0)},t}(J),ge=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,o=-1,n=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++o0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(Te);function xe(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),Ue(L,e)}function je(){return xe(1)}function He(){for(var e=[],t=0;t1?o.next(Array.prototype.slice.call(arguments)):o.next(e)}),o,r)}))}function We(e,t,r){return r?We(e,t).pipe(Ae((function(e){return w(e)?r.apply(void 0,e):r(e)}))):new H((function(r){var o,n=function(){for(var e=[],t=0;t=0}function qe(){for(var e=[],t=0;t1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof n&&(r=e.pop()),null===o&&1===e.length&&e[0]instanceof H?e[0]:xe(r)(ie(e,o))}function ze(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function Je(e,t){return function(r){return r.lift(new Qe(e,t))}}var Qe=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Ye(e,this.predicate,this.thisArg))},e}(),Ye=function(e){function t(t,r,o){var n=e.call(this,t)||this;return n.predicate=r,n.thisArg=o,n.count=0,n}return m(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}(k);function Xe(e,t,r){return[Je(t,r)(new H(Pe(e))),Je(ze(t,r))(new H(Pe(e)))]}function Ze(){for(var e=[],t=0;t0&&r[0].time-o.now()<=0;)r.shift().notification.observe(n);if(r.length>0){var i=Math.max(0,r[0].time-o.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 dt(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(de.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(de.createComplete()),this.unsubscribe()},t}(k),dt=function(e,t){this.time=e,this.notification=t};function ut(e){return function(t){return 0===e?ee():t.lift(new lt(e))}}var lt=function(){function e(e){if(this.total=e,this.total<0)throw new Ie}return e.prototype.call=function(e,t){return t.subscribe(new pt(e,this.total))},e}(),pt=function(e){function t(t,r){var o=e.call(this,t)||this;return o.total=r,o.count=0,o}return m(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}(k);function ht(e){return function(t){return t.lift(new _t(e))}}var _t=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new ft(e,this.value))},e}(),ft=function(e){function t(t,r){var o=e.call(this,t)||this;return o.value=r,o}return m(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(k);function vt(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?Ue((function(){return e}),t,r):("number"==typeof t&&(r=t),Ue((function(){return e}),r))}function yt(){for(var e=[],t=0;t0){var s=i.indexOf(r);-1!==s&&i.splice(s,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}(Te),Pt=function(e,t){return e===t||"function"==typeof t&&e===t.toString()},Mt=function(){for(var e=arguments.length,t=Array(e),r=0;r=t.length?r(new Wt(a,h,new Bt(void 0,e[h]))):zt(e[h],t[h],r,o,a,h,s);for(;h=0?(zt(e[n],t[n],r,o,a,n,s),f=Kt(f,c)):zt(e[n],void 0,r,o,a,n,s)})),f.forEach((function(e){zt(void 0,t[e],r,o,a,e,s)}))}s.length=s.length-1}else e!==t&&("number"===d&&isNaN(e)&&isNaN(t)||r(new Ft(a,e,t)))}function Jt(e,t,r,o){return o=o||[],zt(e,t,(function(e){e&&o.push(e)}),r),o.length?o:void 0}function Qt(e,t,r){if(e&&t&&r&&r.kind){for(var o=e,n=-1,i=r.path?r.path.length-1:0;++n1?r-1:0),n=1;n1?t-1:0),o=1;o2?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,RESET_SOCKET:()=>({})}),Jr=rr("CONNECT_TO_MEDIA_STREAM"),Qr=rr("RECEIVE_PAYLOAD_FROM_MEDIA_SDK"),{setAudioEncodeStatus:Yr,setAudioDecodeStatus:Xr,setVideoEncodeStatus:Zr,setVideoDecodeStatus:$r,setSharingEncodeStatus:eo,setSharingDecodeStatus:to,setMediaConstraints:ro,resetMedia:oo}=Ir("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","RESET_MEDIA");function no(e,t,...r){return e(Ut.of(...r||[]),t,null)}function io(...e){const t=(...t)=>qe(...e.map(e=>{const r=e(...t);if(!r)throw new TypeError(`combineEpics: one of the provided Epics "${e.name||""}" does not return a stream. Double check you're not missing a return statement!`);return r.pipe(ot((e,t)=>(setTimeout(()=>{throw e},0),t)))}));try{Object.defineProperty(t,"name",{value:`combineEpics(${e.map(e=>e.name||"").join(", ")})`})}catch(e){}return t}function so(...e){return io(...e.flatMap(e=>Object.values(e)))}function ao(e,t){return e.pipe(Mt(""+Ur),Je(e=>e.payload.evt===t))}function co(e,t){return e.pipe(Mt(""+Lr),Je(e=>e.payload.event===t))}function uo(e,t){return e.pipe(Mt(""+Ur,""+Hr),Je(e=>e.payload.evt===t))}function lo(e,t){return e.pipe(Mt(""+Qr),Je(e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t))}var po="undefined"!=typeof window&&window,ho="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,_o="undefined"!=typeof global&&global,fo=po||_o||ho;function vo(e,t){return void 0===t&&(t=null),new Io({method:"GET",url:e,headers:t})}function yo(e,t,r){return new Io({method:"POST",url:e,body:t,headers:r})}function Eo(e,t){return new Io({method:"DELETE",url:e,headers:t})}function go(e,t,r){return new Io({method:"PUT",url:e,body:t,headers:r})}function So(e,t,r){return new Io({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!fo)throw new Error("RxJS could not find any global context (window, self, global)")}();var bo=Ae((function(e,t){return e.response}));function mo(e,t){return bo(new Io({method:"GET",url:e,responseType:"json",headers:t}))}var Io=function(e){function t(t){var r=e.call(this)||this,o={async:!0,createXHR:function(){return this.crossDomain?function(){if(fo.XMLHttpRequest)return new fo.XMLHttpRequest;if(fo.XDomainRequest)return new fo.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(fo.XMLHttpRequest)return new fo.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 fo.ActiveXObject(e))break}catch(e){}return new fo.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)o.url=t;else for(var n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);return r.request=o,r}var r;return m(t,e),t.prototype._subscribe=function(e){return new Ao(e,this.request)},t.create=((r=function(e){return new t(e)}).get=vo,r.post=yo,r.delete=Eo,r.put=go,r.patch=So,r.getJSON=mo,r),t}(H),Ao=function(e){function t(t,r){var o=e.call(this,t)||this;o.request=r,o.done=!1;var n=r.headers=r.headers||{};return r.crossDomain||o.getHeader(n,"X-Requested-With")||(n["X-Requested-With"]="XMLHttpRequest"),o.getHeader(n,"Content-Type")||fo.FormData&&r.body instanceof fo.FormData||void 0===r.body||(n["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),r.body=o.serializeBody(r.body,o.getHeader(r.headers,"Content-Type")),o.send(),o}return m(t,e),t.prototype.next=function(e){this.done=!0;var t,r=this.xhr,o=this.request,n=this.destination;try{t=new Oo(e,r,o)}catch(e){return n.error(e)}n.next(t)},t.prototype.send=function(){var e=this.request,t=this.request,r=t.user,o=t.method,n=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(o,n,i,r,s):d.open(o,n,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(fo.FormData&&e instanceof fo.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,o,n=t.progressSubscriber;function i(e){var t,r=i,o=r.subscriber,n=r.progressSubscriber,s=r.request;n&&n.error(e);try{t=new wo(this,s)}catch(e){t=e}o.error(t)}(e.ontimeout=i,i.request=t,i.subscriber=this,i.progressSubscriber=n,e.upload&&"withCredentials"in e)&&(n&&(r=function(e){r.progressSubscriber.next(e)},fo.XDomainRequest?e.onprogress=r:e.upload.onprogress=r,r.progressSubscriber=n),o=function(e){var t,r=o,n=r.progressSubscriber,i=r.subscriber,s=r.request;n&&n.error(e);try{t=new Co("ajax error",this,s)}catch(e){t=e}i.error(t)},e.onerror=o,o.request=t,o.subscriber=this,o.progressSubscriber=n);function s(e){}function a(e){var t=a,r=t.subscriber,o=t.progressSubscriber,n=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)o&&o.complete(),r.next(e),r.complete();else{o&&o.error(e);var c=void 0;try{c=new Co("ajax error "+i,this,n)}catch(e){c=e}r.error(c)}}}e.onreadystatechange=s,s.subscriber=this,s.progressSubscriber=n,s.request=t,e.onload=a,a.subscriber=this,a.progressSubscriber=n,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}(k),Oo=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=To(this.responseType,t)},Co=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=To(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function To(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 wo=function(e,t){return Co.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},Ro=Io.create;const No={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 Password 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."}},Do=No.default;let Po,Mo,ko;function Uo(e,t){return t in Do?Do[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"}(Po||(Po={})),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"}(Mo||(Mo={})),function(e){e[e.LEAVESUBREASON_WAITINGROOMFAILOVER=1]="LEAVESUBREASON_WAITINGROOMFAILOVER"}(ko||(ko={}));const Vo={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},Lo={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"},xo={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}},jo={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 Ho(e,t){return Object.keys(e).find(r=>e[r]===t)}let Fo;function Go(e,t){const{key:r,value:o}=function(e,t){let r=!1;if(-1===e)return{key:"apac.errorcodes_offline",value:403};if(3e3===e){const o=["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 n={};if(Fo)n=Fo;else{const e=Object.keys(xo[3e3]);o.forEach(t=>{const r=function(e){return"en-US"===e&&(e="default"),No[e]||No.default}(t);n[t]={},e.forEach(e=>{n[t][e]=r[e]})}),Fo=n}return o.forEach(o=>{if(r)return;const i=Ho(n[o],t);i&&(r={key:i,value:xo[e][i]})}),r||(r={key:"apac.errorcodes_fail",value:200}),r}if(200===e){const o=Ho({"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=o?{key:o,value:xo[e][o]}:{key:"apac.errorcodes_fail",value:200},r}if(void 0!==xo[e]){const t=xo[e],o=Object.keys(t)[0];r={key:o,value:t[o]}}if(r)return r;const o=Ho(Vo,e),n=Lo[o];return n?{key:n,value:e}:{key:"apac.errorcodes_fail",value:200}}(e,t),n=Uo(r,r);return r!==n?{reason:n,errorCode:o}:{reason:Do[r],errorCode:o}}function Bo(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==jo[r]){const e=jo[r],o=Object.keys(e)[0];t={key:o,value:e[o]}}if(t){const{key:r,value:o}=t,n=Uo(r,r);return r!==n?Object.assign({},e,{reason:n,errorCode:o}):Object.assign({},e,{reason:Do[r],errorCode:o})}const o=Go(r);return Object.assign({},e,{reason:o.reason,errorCode:o.errorCode})}var Wo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ko(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 qo=Ko((function(e,t){!function(t,r){e.exports=function(t){var r,o=(t=t||{}).Base64,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=function(e){for(var t={},r=0,o=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[n.charAt(r>>>18),n.charAt(r>>>12&63),t>=2?"=":n.charAt(r>>>6&63),t>=1?"=":n.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="",o=0,i=e.length;o>>18)+n.charAt(d>>>12&63)+(void 0!==a?n.charAt(d>>>6&63):"=")+(void 0!==c?n.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,o=(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),n=[s(o>>>16),s(o>>>8&255),s(255&o)];return n.length-=[0,0,2,1][r],n.join("")},S=t.atob&&"function"==typeof t.atob?function(e){return t.atob(e)}:function(e){return e.replace(/\S{1,4}/g,g)},b=function(e){return S(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},m=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(S(e))}(m(e))};t.Uint8Array&&(f=function(e){return Uint8Array.from(b(m(e)),(function(e){return e.charCodeAt(0)}))});if(t.Base64={VERSION:"2.6.3",atob:b,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=o,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:Wo)}));function zo(e){return qo.Base64.encode(e,!0)}function Jo(e){return qo.Base64.decode(e)}const Qo={"-":"+",_:"/",".":"="};function Yo(e){const t=e.replace(/[-_.]/g,e=>Qo[e]);return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const Xo=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount"],Zo={bChime:"bAllowPlayChimeForEnterOrExit",topic:e=>({meetingTopic:Jo(e)})},$o=rr("GET_MEETING_INFO"),en=rr("GET_INSTANT_MEETING_INFO"),tn=(rr("LOGON_ZOOM_DOMAIN"),rr("VERIFY_ZOOM_RECAPTCHA"),rr("LOGON_THIRD_PARTY_DOMAIN"),rr("PING_RWC_SERVER")),rn=rr("MEETING_FAILOVER"),on=rr("LEAVE_MEETING"),nn=rr("END_MEETING"),{setMeetingInfo:sn,setWindownOpen:an,setAppidSignature:cn,setZak:dn,setTkMtkguid:un,setPingRwcTimestamp:ln,setInMeetingInfo:pn,setMeetingAttribute:hn,resetMeeting:_n,setIsHost:fn,setIsCohost:vn,setMeetingIsOnHold:yn,setIsMeetingReset:En,setAudioVideoBeforeOnHold:gn,setCurrentUserAudioBeforeReset:Sn,setIsCurrentUserMutedBeforeReset:bn,setMeetingStatus:mn,setMeetingRegion:In,setIsCurrentUserStartVideoBeforeReset:An,setJoinMeetingTimeStamp:On,setIsEnableQos:Cn}=(rr("REGISTER_WEBINAR"),Ir({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(Xo.some(t=>e&&void 0!==e[t])){let t=e;return Object.keys(Zo).some(t=>void 0!==e[t])&&(t=Object.keys(e).reduce((t,r)=>{const o=Zo[r];return"function"==typeof o?Object.assign(t,o(e[r])):"string"==typeof o?t[o]=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}));function Tn(e,t,r){const o=document.createElement("script");o.type="text/javascript",o.readyState?o.onreadystatechange=()=>{"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,t())}:(o.onload=()=>{t()},o.onerror=()=>{r()}),o.src=e,"function"==typeof document.body.append?document.getElementsByTagName("head")[0].append(o):document.getElementsByTagName("head")[0].appendChild(o)}let wn,Rn,Nn,Dn,Pn;!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"}(wn||(wn={})),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"}(Rn||(Rn={})),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"}(Nn||(Nn={})),function(e){e.CDN="CDN",e.Global="Global",e.CN="CN"}(Dn||(Dn={})),function(e){e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed"}(exports.ConnectionState||(exports.ConnectionState={})),function(e){e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory"}(Pn||(Pn={}));const Mn=zo("{}");class kn{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=zo("zoom-storage-"+e),this.localStorageKey=zo("zoom-local-storage"),this.memoryCache={},this.sessionCache=JSON.parse(Jo(sessionStorage.getItem(this.sessionStorageKey)||Mn)),this.localCache=JSON.parse(Jo(localStorage.getItem(this.localStorageKey)||Mn))}static init(e){this.instance=new kn(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:Pn.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:Pn.LocalStorage}:{value:this.memoryCache[e],type:Pn.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case Pn.SessionStorage:{const r=this.sessionCache[e];let o=t;return"function"==typeof t&&(o=t(r)),r!==o&&(this.sessionCache[e]=o,this.flushValue(Pn.SessionStorage)),o}case Pn.LocalStorage:{const r=this.localCache[e];let o=t;return"function"==typeof t&&(o=t(r)),r!==o&&(this.localCache[e]=o,this.flushValue(Pn.LocalStorage)),o}case Pn.Memory:{const r=this.memoryCache[e];let o=t;return"function"==typeof t&&(o=t(r)),this.memoryCache[e]=o,o}default:return null}}removeValue(e){const{type:t}=this.getValue(e);switch(t){case Pn.SessionStorage:delete this.sessionCache[e],this.flushValue(Pn.SessionStorage);break;case Pn.LocalStorage:delete this.localCache[e],this.flushValue(Pn.LocalStorage);break;case Pn.Memory:delete this.memoryCache[e]}}flushValue(e){e===Pn.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,zo(JSON.stringify(this.sessionCache))):e===Pn.LocalStorage&&localStorage.setItem(this.localStorageKey,zo(JSON.stringify(this.localCache)))}}function Un(){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 "+(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 Vn(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}function Ln(){return"object"==typeof WebAssembly&&"function"==typeof Worker}kn.instance=void 0;const xn=()=>"function"==typeof AudioWorklet,jn=()=>Vn(),Hn=()=>!Vn()&&!Ln(),Fn=()=>/arm/i.test(navigator.userAgent),Gn=()=>/\bCrOS\b/.test(navigator.userAgent),Bn=()=>Gn()&&Fn(),Wn=()=>!navigator||!navigator.hardwareConcurrency||Bn()&&navigator.hardwareConcurrency<=4||Gn()&&!Fn()&&navigator.hardwareConcurrency<4||/\bCrKey\b/.test(navigator.userAgent)||"function"!=typeof OffscreenCanvas||"function"!=typeof requestAnimationFrame||"function"!=typeof SharedArrayBuffer?1:(Bn()&&navigator.hardwareConcurrency>4||Gn()&&!Fn()&&navigator.hardwareConcurrency,9);let Kn,qn;!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"}(Kn||(Kn={})),function(e){e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM"}(qn||(qn={}));const zn=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 Jn,Qn;!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"}(Jn||(Jn={})),(Qn||(Qn={})).WebclientDeviceId="WEBCLIENT_DEVICE_ID";const Yn=(window.crypto||window.msCrypto).subtle,Xn=Jn.WebclientIVState,Zn=Object.keys(zn).map(e=>zn[e].sessionType);class $n{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),kn.set(Xn,{},Pn.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new $n(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(Vn()||!Ln())&&r===qn.AES_GCM,this.gcmSessionKey=Yo(t),this.gcmMainSessionKey||(this.gcmMainSessionKey=this.gcmSessionKey),this.zoomId=String(e)}beginCrypto(e,t,r){const o=new Uint32Array(1);o[0]=9,o[0]+=Number(r);const n=new Uint8Array(o.buffer);let i=new Uint8Array(132);const s=Yo(t);return i.set(s,0),i.set(n,s.length),i=i.subarray(0,s.length+4),Yn.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!0,["sign"]).then(e=>Yn.sign({name:"HMAC"},e,i)).then(e=>Yn.importKey("raw",e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))}getNextIV(e){const t=kn.get(Xn);return void 0===t[e]?(t[e]=0,kn.set(Xn,t,Pn.SessionStorage)):kn.set(Xn,t=>d(d({},t),{},{[e]:t[e]+1}),Pn.SessionStorage)}resetIVState(){const e=kn.get(Xn);if(void 0===e);else{const t=Object.keys(e).filter(e=>Zn.indexOf(e)>-1);t.length>0&&(t.forEach(t=>{e[t]+=1e6}),kn.set(Xn,e,Pn.SessionStorage))}}static resetIV(){if(void 0===this.instance)throw new Error("reset before intialize");this.instance.resetIVState()}static beginEncrypt({text:e,type:t}){const r=new Uint8Array(0);if(this.instance&&this.instance.isGCMEnabled){const o=16,n=this.instance.getNextIV(t.sessionType),i=new ArrayBuffer(16),s=new Uint8Array(i);new DataView(i).setUint32(0,n,!0);let a=null;return a="BO_BROADCAST"===t.sessionType?this.instance.gcmMainSessionKey:this.instance.gcmSessionKey,this.instance.beginCrypto(a,this.instance.zoomId,t.gcmType).then(t=>{const n=(new TextEncoder).encode(e);return Yn.encrypt({name:"AES-GCM",iv:s,additionalData:r,tagLength:8*o},t,n)}).then(e=>{const t=1+s.byteLength+2+r.byteLength+4+e.byteLength,n=new ArrayBuffer(t);new Uint8Array(n)[0]=s.length,new Uint8Array(n,1,s.byteLength).set(s),new DataView(n).setUint16(1+s.byteLength,r.length,!0),new Uint8Array(n,3+s.byteLength).set(r),new DataView(n).setUint32(1+s.byteLength+2+r.byteLength,e.byteLength-o,!0),new Uint8Array(n,1+s.byteLength+2+r.byteLength+4).set(new Uint8Array(e));const i=new Uint8Array(n).reduce((e,t)=>e+String.fromCharCode(t),"");return window.btoa(i).replace(/_/g,"/").replace(/-/g,"+").replace(/\=/g,"")})}return Promise.resolve(zo(e))}static beginDecrypt({decryptedText:e,type:t,zoomId:r}){if(this.instance&&this.instance.isGCMEnabled){const o=function(e){let t;const r=e.length,o=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 Yn.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:"[This is an encrypted message]",iv:i,aad:c}))}{const t=new TextDecoder("utf-8");return Promise.resolve({message:t.decode(Yo(e))})}}}let ei;$n.instance=void 0,function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(ei||(ei={}));class ti{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 o=r.filter(e=>e!==t);this.eventHandlers.set(e,o)}}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){return{seq:this.sendMessageToRwg({evt:4105,body:{bRecord:e}})}}expel(e){return{seq:this.sendMessageToRwg({evt:4107,body:{userId: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,t=!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,r=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:d({},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,o){const n={text:e,destNodeID:t};return r&&Object.assign(n,{sn:r}),o&&Object.assign(n,{attendeeNodeID:o}),{seq:this.sendMessageToRwg({evt:4135,body:n})}}assignCC(e,t){return{seq:this.sendMessageToRwg({evt:4137,body:{id:e,bCCEditor:t}})}}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,t){return{seq:this.sendMessageToRwg({evt:4147,body:{id:e,bOn:t}})}}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(e=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,o){return{seq:this.sendMessageToRwg({evt:4209,body:{jid:t,userID:r,clientCap:o,bPromote:e}})}}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){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:t,bCallme:r}})}}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(e=1,t,r){return{seq:this.sendMessageToRwg({evt:12289,body:{id:e,size:t,bOn:r}})}}unsubscribeVideo(e=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){return{seq:this.sendMessageToRwg({evt:16415,body:{id:e,size:t}})}}unsubscribeSharing(e){return{seq:this.sendMessageToRwg({evt:16417,seq:1,body:{id:e}})}}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){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,boOn:!1}})}}stopSharing(e){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,bOn:!0}})}}lockSharing(e){return{seq:this.sendMessageToRwg({evt:4169,body:{lockShare:e}})}}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:d({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}})}}}class ri extends ti{static createAgent(){return this.rwgInstance||(this.rwgInstance=new ri),this.rwgInstance}}ri.rwgInstance=null;class oi extends ti{static getInstance(){return this.instance||(this.instance=new oi),this.instance}}oi.instance=null;const ni=Jn.WebclientIVState;class ii{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new ii),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:{[Kn.AUDIO_ENCODE]:kn.get(ni)&&kn.get(ni)[Kn.AUDIO_ENCODE],[Kn.VIDEO_ENCODE]:kn.get(ni)&&kn.get(ni)[Kn.VIDEO_ENCODE],[Kn.SHARING_ENCODE]:kn.get(ni)&&kn.get(ni)[Kn.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(ri.createAgent())}}setAssetsAndConstraint(e,t){var r;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=(e=>({audioWorkerPath:e+"/js_audio_process.min.js",audioWorkletPath:e+"/js_audio_worklet.min.js",audioWasm:e+"/audio.encode.wasm",videoWorkerPath:e+"/video_s.min.js",videoMtWorkerPath:e+"/video_m.min.js",videoWasm:e+"/video.decode.wasm",videoMtWasm:e+"/video.mt.wasm",sharingWorkerPath:e+"/sharing_s.min.js",sharingMtWorkerPath:e+"/sharing_m.min.js",videoSIMDWorkerPath:e+"/video_simd.min.js",videoSIMDWasm:e+"/video.simd.wasm",sharingSIMDWorkerPath:e+"/sharing_simd.min.js",videoMSIMDWasm:e+"/video.mtsimd.wasm",sharingMSIMDWorkerPath:e+"/sharing_mtsimd.min.js",videoMSIMDWorkerPath:e+"/video_mtsimd.min.js",audioSIMDWorkletPath:e+"/audio_simd.min.js",audioSIMDWasm:e+"/audio.simd.wasm"}))(this.assetsPath),this.onMediaSDKCallback=this.onMediaSDKCallback.bind(this),null===(r=this.instance)||void 0===r||r.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){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}connect({svcUrl:e,meetingNumber:t,conId:r,e2eEncrypt:o,isViewOnly:n,currentUserId:i,isWebinar:s,enableQos:a}){var c,d,u;this.svcUrl=e,this.meetingNumber=t,this.confId=r;const l=((e,t,r)=>({videoSocketAddress:`wss://${e}/wc/media/${t}?type=v&cid=${r}`,audioSocketAddress:`wss://${e}/wc/media/${t}?type=a&cid=${r}`,sharingSocketAddress:`wss://${e}/wc/media/${t}?type=${jn()?"j":"s"}&cid=${r}`}))(e,t,r);this.mediaSocketAddress=l,this.currentUserId=i;const p=Wn();var h,_,f,v,y,E,g,S,b,m;(Ln()?null===(h=this.instance)||void 0===h||h.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkletPath:null===(_=this.mediaWorkersPath)||void 0===_?void 0:_.audioWorkletPath,e2eEncrypt:o,isEnableListenInitEvent:!0}):null===(f=this.instance)||void 0===f||f.setPropsBeforeInit({callback:this.onMediaSDKCallback,e2eEncrypt:o,isEnableListenInitEvent:!0}),!0===(null===(c=this.constraints)||void 0===c?void 0:c.audio)&&Ln())&&((s||xn())&&(null===(b=this.instance)||void 0===b||b.initAudioDecode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a)),!xn()||s&&n||null===(m=this.instance)||void 0===m||m.initAudioEncode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a));!0===(null===(d=this.constraints)||void 0===d?void 0:d.video)&&Ln()&&(null===(v=this.instance)||void 0===v||v.initVideoDecode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p),s&&n||null===(y=this.instance)||void 0===y||y.initVideoEncode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p)),!0===(null===(u=this.constraints)||void 0===u?void 0:u.screen)&&(Ln()?(null===(E=this.instance)||void 0===E||E.initSharingDecode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p),s&&n||null===(g=this.instance)||void 0===g||g.initSharingEncode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p)):null===(S=this.instance)||void 0===S||S.initSharingDecode(l.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,o){var n;null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(22,{CaptureAudio:o,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t},speakerInfo:{defaultDeviceId:r}})}leaveComputerAudio(){var e;null===(e=this.instance)||void 0===e||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,o,n,i,s,a,c,d,u){var l;null===(l=this.instance)||void 0===l||l.Notify_MeidaSDK(1,{userId:t,width:o,height:n,x:i,y:s,quality:a,isMyself:c,canvas:e,enableWaterMark:u,waterMarkText:d,zone:r})}stopRenderVideo(e,t,r,o,n=!1){var i;null===(i=this.instance)||void 0===i||i.Notify_MeidaSDK(2,{canvas:e,userId:t,RGBA:o,doNotClean:n,zone:r})}startCaptureVideo(e,t,r,o,n){var i;null===(i=this.instance)||void 0===i||i.Notify_MeidaSDK(3,{ssid:e,width:r,height:o,fps:24,video:n,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,r=!1,o=""){var n;this.receivedSharingCanvas=t,null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(23,{width:0,height:0,ssrc:e,canvas:t,enableWaterMark:r,waterMarkText:o})}stopRenderSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(24,{})}switchSharingSource(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(36,{ssrc:e})}ajustmentReceivedSharingCanvas(e,t){if(this.receivedSharingCanvas)try{this.receivedSharingCanvas.width=e,this.receivedSharingCanvas.height=t}catch(e){}}startRemoteControl(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(26,d({socketURL:"wss://"+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,o=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["dimension"]);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(27,d(d({},r),o))}startDesktopSharing(e,t,r,o=!0){var n;this.sharingCanvas=document.querySelector("#"+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,Wn())}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 o;null===(o=this.instance)||void 0===o||o.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,o,n,i,s){var a;null===(a=this.instance)||void 0===a||a.Notify_MeidaSDK(48,{userId:t,x:o,y:n,width:i,height:s,canvas:e,zone:r})}}var si;ii.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"}(si||(si={}));const ai={success:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",fail:["JOIN_MEETING_FAILED"]},ci={[si.ConnectionChange]:[{event:"JOIN_MEETING_SUCCESS",payload:()=>({state:exports.ConnectionState.Connected})},{event:"RECONNECTING_MEETING",payload:e=>d({state:exports.ConnectionState.Reconnecting},e)},{event:"LEAVING_MEETING",payload:e=>d({state:exports.ConnectionState.Closed},e)}],[si.OnHoldChange]:[{event:"MEETING_IN_WAITING_ROOM",payload:e=>({isOnHold:e})}],[si.UserAdd]:[{event:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"ADD_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[si.UserUpdate]:[{event:"UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[si.UserRemove]:[{event:"REMOVE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[si.AttendeeUpdate]:[{event:"UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",payload:e=>e}]};let di;!function(e){e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change",e.ChatDeleteMessage="chat-delete-message"}(di||(di={}));const ui={[di.ChatOnMessage]:[{event:"CHAT_RECEIVE_MESSAGE_EVENTS",payload:e=>e}],[di.ChatPrivilegeChange]:[{event:"CHAT_PRIVILEGE_CHANGE",payload:e=>e}],[di.ChatDeleteMessage]:[{event:"CHAT_DELETE_MESSAGE_REPONSE",payload:e=>e}]};let li,pi,hi;!function(e){e.OnRecordingChange="on-recording-change",e.OnLocalRecordingChange="on-local-recording-change"}(li||(li={})),function(e){e.Started="Started",e.Stopped="Stopped"}(pi||(pi={})),function(e){e.Stopped="Stopped",e.Started="Started",e.Paused="Paused"}(hi||(hi={}));const _i={[li.OnRecordingChange]:[{event:"START_RECORDING_SUCCESS",payload:()=>({state:pi.Started})},{event:"STOP_RECORDING_SUCCESS",payload:()=>({state:pi.Stopped})}],[li.OnLocalRecordingChange]:[{event:"LOCAL_RECORDING_CHANGE",payload:e=>{const t={};return Array.isArray(e)?e.forEach(e=>{t[e.id]=e.bLocalRecordStatus}):t[e.id]=e.bLocalRecordStatus,t}}]};let fi,vi,yi,Ei;!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"}(fi||(fi={})),function(e){e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed"}(vi||(vi={})),function(e){e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk"}(yi||(yi={})),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"}(Ei||(Ei={}));const gi=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"});let Si,bi,mi,Ii,Ai;!function(e){e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare"}(exports.SharePrivilege||(exports.SharePrivilege={})),function(e){e.Sharing="sharing",e.Paused="paused",e.End="ended"}(exports.ShareStatus||(exports.ShareStatus={})),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"}(exports.VideoQuality||(exports.VideoQuality={})),function(e){e.Active="Active",e.Inactive="Inactive"}(exports.VideoActiveState||(exports.VideoActiveState={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted"}(Si||(Si={})),function(e){e.Active="Active",e.Inactive="Inactive"}(bi||(bi={})),function(e){e.Success="Success",e.Failed="Failed",e.Initial="Initial"}(mi||(mi={})),function(e){e.Started="Started",e.Stopped="Stopped",e.Failed="Failed"}(exports.VideoCapturingState||(exports.VideoCapturingState={})),function(e){e.Approved="Approved",e.Rejected="Rejected"}(Ii||(Ii={})),function(e){e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture"}(exports.PassiveStopShareReason||(exports.PassiveStopShareReason={})),function(e){e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change"}(Ai||(Ai={}));const Oi={[Ai.DeviceChange]:[{event:"MEDIA_DEVICE_CHANGE",payload:()=>({})}],[Ai.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"})}]},Ci={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 Ti;!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"}(Ti||(Ti={}));const wi={[Ti.VideoActiveChange]:[{event:"RECEIVE_VIDEO_ACTIVE_INDICATION",payload:e=>({state:e.bVideoOn?exports.VideoActiveState.Active:exports.VideoActiveState.Inactive,userId:e.userId})}],[Ti.VideoCapturingChange]:[{event:"VIDEO_CAPTURE_START_SUCCESS",payload:()=>({state:exports.VideoCapturingState.Started})},{event:"VIDEO_CAPTURE_STOP_RESULT",payload:e=>({state:(null==e?void 0:e.failed)?exports.VideoCapturingState.Failed:exports.VideoCapturingState.Stopped})}],[Ti.VideoMutedChange]:[{event:"RECEIVE_VIDEO_MUTE_INDICATION",payload:e=>({state:e.isVideoMuted?Si.Muted:Si.Unmuted,userId:e.id})}],[Ti.AskForStartVideoConsent]:[{event:"ASK_FOR_START_VIDEO_CONSENT",payload:e=>({state:e.isVideoMuted?Si.Muted:Si.Unmuted,userId:e.id})}],[Ti.VideoSpotlightChange]:[{event:"VIDEO_SPOTLIGHT_CHANGE",payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map(e=>({userId:e}))})}],[Ti.VideoDimensionChange]:[{event:"RECEIVE_VIDEO_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[Ti.VideoFollowHostOrder]:[{event:"VIDEO_FOLLOW_HOST_ORDER_CHANGE",payload:e=>({isFollowHostOrder:e.bOn})}],[Ti.VideoHostLayoutChange]:[{event:"VIDEO_HOST_DRAG_LAYOUT_CHANGE",payload:e=>Array.isArray(e.layout)?e.layout.map(e=>({userId:e})):[]}],[Ti.PeerVideoStateChange]:[{event:"VIDEO_NEW_USER_START",payload:e=>d({action:"Start"},e)},{event:"VIDEO_OLD_USER_STOP",payload:e=>d({action:"Stop"},e)}]};let Ri;!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"}(Ri||(Ri={}));const Ni={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"}},Di={[Ri.ActiveSpeaker]:[{event:"AUDIO_ACTIVE_SPEAKER",payload:e=>e}],[Ri.UnmuteAudioConsent]:[{event:"AUDIO_UNMUTE_CONSENT",payload:e=>({reason:e})}],[Ri.CurrentAudioChange]:[{event:"AUDIO_CURRENT_USER_JOIN_BY_PHONE",payload:()=>({action:"join",type:"phone"})},{event:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",payload:()=>({action:"join",type:"computer"})},{event:"AUDIO_CURRENT_USER_LEAVE_AUDIO",payload:()=>({action:"leave"})},{event:"AUDIO_CURRENT_USER_MUTED",payload:({source:e})=>({action:"muted",source:e})},{event:"AUDIO_CURRENT_USER_UNMUTED",payload:({source:e})=>({action:"unmuted",source:e})}],[Ri.DialoutStateChange]:[{event:"AUDIO_DIALOUT_RESULT_CODE",payload:e=>e}],[Ri.MergeAudio]:[{event:"AUDIO_MERGE_AUDIO_INDICATION",payload:e=>e}],[Ri.AutoPlayFailed]:[{event:"AUDIO_AUTO_PLAY_FAILED",payload:()=>{}}]};let Pi;!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"}(Pi||(Pi={}));const Mi={[Pi.ShareActiveChange]:[{event:"SHARE_ACTIVE_INDICATION",payload:e=>({state:e.isActive?"Active":"Inactive",userId:e.activeUserId})}],[Pi.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})}],[Pi.SharePassiveStop]:[{event:"SHARE_VIDEO_STREAMS_END",payload:()=>({reason:exports.PassiveStopShareReason.StopScreenCapture})},{event:"SHARE_PASSIVE_STOP_SHARE",payload:()=>({reason:exports.PassiveStopShareReason.PrivilegeChange})}],[Pi.SharePeerStateChange]:[{event:"SHARE_NEW_USER_ADD",payload:e=>({userId:e.id,action:"Start"})},{event:"SHARE_USER_REMOVE",payload:e=>({userId:e.id,action:"Stop"})}],[Pi.ShareContentChange]:[{event:"SHARE_AUTO_CHANGE_SOURCE",payload:e=>e}],[Pi.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?Ii.Approved:Ii.Rejected})}],[Pi.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[Pi.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[Pi.SharePrivilegeChange]:[{event:"SHARE_PRIVILEGE_CHANGE",payload:e=>({privilege:e})}]},ki="INVALID_OPERATION",Ui="INVALID_PARAMETERS";let Vi;!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"}(Vi||(Vi={}));const Li={[Vi.InviteToJoin]:[{event:"BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",payload:e=>e}],[Vi.RoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_COUTDOWN",payload:e=>e}],[Vi.RoomTimeUp]:[{event:"BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",payload:e=>e}],[Vi.ClosingRoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",payload:e=>e}],[Vi.BroadcastMessage]:[{event:"BREAKOUT_ROOM_BROADCAST_MESSAGE",payload:e=>e}],[Vi.AskForHelp]:[{event:"BREAKOUT_ROOM_ASK_HELP_REQUEST",payload:e=>e}],[Vi.AskForHelpResponse]:[{event:"BREAKOUT_ROOM_ASK_HELP_RESPONSE",payload:e=>e}],[Vi.RoomStateChange]:[{event:"BREAKOUT_ROOM_ATTRIBUTE_INDICATION",payload:e=>({status:e.controlStatus})}],[Vi.MainSessionUserUpdate]:[{event:"BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE",payload:()=>({})}]},xi=d(d(d(d(d(d(d(d(d(d({},ci),{"closed-caption-message":[{event:"CC_RECEIVE_MESSAGE",payload:e=>e}]}),ui),_i),Di),wi),{"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}]}),Mi),Oi),Li),ji=(Hi=Hi||Object.create(null),{on:function(e,t){(Hi[e]||(Hi[e]=[])).push(t)},off:function(e,t){Hi[e]&&Hi[e].splice(Hi[e].indexOf(t)>>>0,1)},emit:function(e,t){(Hi[e]||[]).slice().map((function(e){e(t)})),(Hi["*"]||[]).slice().map((function(r){r(e,t)}))}});var Hi;const Fi=new Map,Gi=new Array,Bi=(e,t)=>{ji.emit(e,t)},Wi=e=>new Promise((t,r)=>{e.fail&&e.fail.length>0?Ze(Be(ji,e.success).pipe(ut(1)),qe(...e.fail.map(e=>Be(ji,e).pipe(ut(1),Ue(t=>ae({type:e,payload:t})))))).subscribe(e=>t(e),e=>{"object"==typeof e.payload?r(d({type:e.type},e.payload)):void 0===e.payload?r({type:e.type}):r(e)}):Be(ji,e.success).pipe(ut(1)).subscribe(e=>t(e))}),Ki=(e,t,r=1e4)=>new Promise((o,n)=>{let i=$;"string"==typeof e?i=Be(ji,e).pipe(ut(1)):(i=Be(ji,e.event),e.operations&&(i=e.operations.reduce((e,t)=>e.pipe(t),i))),Ze(i,tt(r).pipe(vt(ae("timeout")))).subscribe(e=>{if(t){const r=t(e);"boolean"==typeof r?r?o(""):n({type:"INTERNAL_ERROR"}):0===r.ret?o(r.body):n({type:"INTERNAL_ERROR",reason:r.body})}else o(e)},()=>{n({type:"OPERATION_TIMEOUT"})})}),qi=(e,t)=>void 0!==t?Be(ji,e).pipe(ut(t)):Be(ji,e),zi=()=>{Gi.forEach(e=>{e.unsubscribe()}),Gi.length=0,Fi.clear()},{setAttendeesList:Ji,setXmppAttendeeList:Qi,setIsAdmitAllSilentUsers:Yi,resetParticipants:Xi,addFailoverAttendees:Zi,removeFailoverAttendees:$i,setClearRaiseHand:es,setClearAttendeeFeedback:ts}=Ir({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:()=>({})});function rs(e,t){return e===t}function os(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var o=t.length,n=0;n1?t-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:rs,r=null,o=null;return function(){return os(t,r,arguments)||(o=e.apply(null,arguments)),r=arguments,o}}));const ss=({participants:{attendeesList:e}})=>e;let as,cs,ds;!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"}(as||(as={})),function(e){e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee"}(cs||(cs={})),function(e){e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323"}(ds||(ds={}));const us=e=>(e&ds.Phone)===ds.Phone,ls=e=>e===as.ViewOnlyCanTalk,ps=e=>(e&as.ViewOnly)===as.ViewOnly;let hs,_s,fs,vs,ys,Es;!function(e){e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually"}(hs||(hs={})),function(e){e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(_s||(_s={})),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"}(fs||(fs={})),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"}(vs||(vs={})),function(e){e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO"}(ys||(ys={})),function(e){e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom"}(Es||(Es={}));const gs=is([({meeting:{userId:e}})=>e,ss],(e,t)=>t.find(t=>t.userId===e)),Ss=is([gs],e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost)),bs=is([gs],e=>null==e?void 0:e.isHost),ms=is([({participants:{xmppAttendeeList:e}})=>e],e=>e.filter(e=>e.userRole===cs.Attendee)),Is=is([ss],e=>e.filter(e=>e.bHold&&!e.bid)),As=is([ss,({breakoutRoom:e})=>e&&e.controlStatus,({breakoutRoom:e})=>e&&e.currentRoom.status],(e,t,r)=>t!==_s.InProgress&&t!==_s.Closing||r!==vs.InRoom?e.filter(e=>!e.bHold&&!e.bid):e.filter(e=>!e.bHold)),Os=is([As],e=>e.find(e=>e.isHost)),Cs=is([As],e=>e.filter(e=>e.bCoHost));let Ts;!function(e){e.Closed="closed",e.Connecting="connecting",e.Connected="connected"}(Ts||(Ts={}));const{setAsnIds:ws,setIsCanUnmute:Rs,setDialoutSequence:Ns,setDialoutResultCode:Ds,setIsAllowToTalk:Ps,setIsHostMuteAll:Ms,setIsActiveOperation:ks,setAudioSsrc:Us,setIsMutedUponEntry:Vs,setIsUserGrantCaptureAudio:Ls,setIsMicrophoneForbidden:xs,setWebrtcRestartCount:js,setMicrophoneList:Hs,setSpeakerList:Fs,setActiveMicrophone:Gs,setActiveSpeaker:Bs,setCanPlayAudio:Ws,resetAudio:Ks,setIsComputerAudioLoading:qs}=Ir("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"),{setSharePrivilege:zs,setShareActiveNode:Js,setIsReceiveSharing:Qs,setIsChromeExtensionInstalled:Ys,setIsScreenShareForbidden:Xs,setShareDimension:Zs,setShareStatus:$s,setShareSsrc:ea,setShareQuality:ta,setReceivedShareDimension:ra,setIsRemoteControlApproved:oa,setIsGrabRemoteControl:na,setIsVerifiedSharingRenderCanvasAfterFailover:ia,setIsVerifiedSharingCaptureCanvasAfterFailover:sa,setIsSdkGrabControl:aa,resetShare:ca}=Ir("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","RESET_SHARE"),{setVideoSsrc:da,setActiveVideoId:ua,setCameraList:la,setActiveCamera:pa,setIsCurrentUserStartedVideo:ha,setSpotlightVideo:_a,setIsCaptureForbidden:fa,setVideoMaxQuality:va,setCaptureCanvasList:ya,setIsVideoMuted:Ea,setIsCaptureCameraLoading:ga,setIsCameraTaken:Sa,setIsVerifiedVideoRenderCanvasAfterFailover:ba,setIsVerifiedVideoCaptureCanvasAfterFailover:ma,resetVideo:Ia,setReceivedVideoDimension:Aa,addSubscribedVideoId:Oa,removeSubscribedVideoId:Ca,setIsFollowHostVideoLayout:Ta,setHostDragLayout:wa,addRenderedVideoId:Ra,removeRenderedVideoId:Na,setIsSupportHdVideo:Da,setHighDefinitionVideoId:Pa}=Ir("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"),{setTempSetting:Ma,setSetting:ka,setQuestionList:Ua,setQuestionUpVoted:Va,resetQa:La}=Ir("SET_TEMP_SETTING","SET_SETTING","SET_QUESTION_LIST","SET_QUESTION_UP_VOTED","SET_SELF_LIVE_ANSWER","RESET_QA"),{setChatPrivilege:xa,addChatMessageHistory:ja,resetChat:Ha,setIsAllowAttendeeChat:Fa,setLatestChatMessageId:Ga,removeChatMessage:Ba}=Ir("SET_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT","SET_LATEST_CHAT_MESSAGE_ID","REMOVE_CHAT_MESSAGE"),{setCcEditorInfo:Wa,setTempSendCcText:Ka,setTempReceiveCcText:qa,setGatewayInfoList:za,resetClosedCaption:Ja}=Ir("SET_CC_EDITOR_INFO","SET_TEMP_SEND_CC_TEXT","SET_TEMP_RECEIVE_CC_TEXT","SET_GATEWAY_INFO_LIST","RESET_CLOSED_CAPTION"),{addBreakoutRooms:Qa,setBreakoutRoomAllocationPattern:Ya,setBreakoutRoomSequenceId:Xa,setMeetingElapsedTime:Za,setStartRoomElapsedTime:$a,setBreakoutRoomOptions:ec,setBreakoutRoomControlStatus:tc,setBreakoutRooms:rc,setCurrentBreakoutRoom:oc,setBreakoutRoomAttendeeStatus:nc,setBreakoutRoomConfId:ic,setBreakoutRoomToken:sc,resetBreakoutRoom:ac,setBreakoutRoomClosingRoomTime:cc,setBreakoutRoomBroadcastMessage:dc,setBreakoutRoomHostReplyType:uc,setBreakoutRoomHostReplyRequestId:lc,setMainSessionAttendeeList:pc,setIsHugeBreakoutRoom:hc,setBreakoutRoomUpdatedUserRoleCount:_c,setBreakoutRoomPreAssignedRoomList:fc}=Ir("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"),vc=(e,t)=>{if(e.result){const{result:{mn:r,ts:o,auth:n,track_auth:i,mid:s,tid:a,encryptedRWC:c,user_identity:d,meetingOptions:u}}=e,{lang:l,password:p,topic:h,zlk:_,cv:f,userName:v}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:o,auth:n,passWord:p,trackAuth:i,customerKey:d,encryptedRWC:JSON.parse(c||"{}"),meetingOptions:JSON.parse(u||"{}"),topic:h,userName:kn.get(Jn.WebclientUserName)||v,cv:f,zlkJwtToken:_,lang:l}}return e},yc=(e,t,r,o,n,i)=>{const s={ts:o,auth:n,rwcToken:r,dmz:1};return i&&Object.assign(s,{confID:i}),`https://${e}/wc/ping/${t}?${new URLSearchParams(s).toString()}`},Ec=(e,t=!1)=>{const{socket:{zoomSocketStatus:r,xmppSocketStatus:o,mainSessionSocketStatus:n},meeting:{meetingStatus:i}}=e,s=[mn("closed")];if("joined"===i){const t=ii.getInstance(),r=ri.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||(kn.clearSession(),sessionStorage.clear(),$n.destroy()),r!==Ts.Closed&&s.push(Pr()),o!==Ts.Closed&&s.push(Mr()),n!==Ts.Closed&&s.push(jr()),t){const t=gs(e);s.push(_n({audio:null==t?void 0:t.audio,muted:null==t?void 0:t.muted,video:null==t?void 0:t.bVideoOn}))}else s.push(_n({audio:!1,muted:void 0,video:!1}));return s.push(zr(),oo(),Xi(),Ks(),ca(),Ia(),La(),Ha(),Ja(),ac()),s},gc=(e,...t)=>Ki({event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",operations:[Ae(t=>t.find(t=>t.userId===e)),Je(e=>!!e),ut(1)]},...t);function Sc(e){return x(Ae((t,r)=>e(t,r)),Je(e=>null!=e))}function bc(e){return x(Ue((t,r)=>e(t,r)||$))}function mc(e){return x(bt((t,r)=>e(t,r)||$))}const Ic={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},Ac={7937:()=>({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 Oc(e=Ic){return t=>new H(r=>{const o=new Map;let n=0,i=null;const{period:s,rules:a}=e;let c=null;i||(i=((e,t)=>{const r=performance.now();let o=0,n=!1;return setTimeout((function i(){o+=t,e();const s=performance.now()-r-o,a=setTimeout(i,Math.max(t-s,0));n&&clearTimeout(a)}),t),()=>{n=!0}})(()=>{n=0},s));const d=Object.keys(Ac),u=t.subscribe({next(e){if(e&&e.evt&&null!==i){n+=1;const{evt:t,body:i}=e,s=String(t);if(d.indexOf(s)>=0)if(c){const e=o.get(s);if(e)e.onThrottle(i);else{const e=Ac[s]();e.onThrottle(i),o.set(s,e)}}else{let t=0;if(a.forEach(e=>{n>e.peak&&(t=e.throttle)}),t>0){const e=Ac[s]();e.onThrottle(i),o.set(s,e),c=setTimeout(()=>{o.forEach((e,t)=>{const o={evt:Number(t),body:e.payloads};r.next(o)}),o.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),n=0}})}is([As,({share:{isReceiveSharing:e}})=>e,({share:{activeNodeId:e}})=>e],(e=[],t,r)=>t?e.find(e=>e.userId===r&&!0===e.sharerOn):null);const Cc=is([As],e=>e.filter(e=>e.sharerOn)),Tc=ri.createAgent();var wc=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>ao(e,7938).pipe(Je(e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.lockShare)}),Tt(t),At(([e,t])=>{const{share:{sharePrivilege:r}}=t,{payload:{body:{lockShare:o}}}=e;r!==o&&Bi("SHARE_PRIVILEGE_CHANGE",o)}),Ae(([e])=>zs(e.payload.body.lockShare))),shareSSrcEpic:e=>ao(e,20227).pipe(Ae(e=>ea(e.payload.body.ssrc))),shareStatusChangeEpic:(e,t)=>ao(e,20225).pipe(Tt(t),Ae(([e,t])=>{const{share:{isReceiveSharing:r,activeNodeId:o,shareQuality:n}}=t,{payload:{body:i}}=e;return r&&1===i.bStatus?(Tc.unsubscribeSharing(o),Tc.subscribeSharing(i.activeNodeID,n),ii.getInstance().switchSharingSource(i.ssrc),Bi("SHARE_AUTO_CHANGE_SOURCE",{userId:i.activeNodeID})):1===i.bStatus?Bi("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!0}):r&&Bi("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!1}),Js(i)})),handleChromeExtensionEpic:e=>lo(e,fi.CheckChromeSharingExtensionResponse).pipe(Ae(e=>(Bi("SHARE_CHECK_CHROME_SHARING_EXTENSION",e.payload.data),Ys(e.payload.data)))),handleSDKShareSuccessEpic:(e,t)=>lo(e,fi.DesktopSharingCaptureSuccess).pipe(Tt(t),Ae(([,e])=>{const{meeting:{userId:t}}=e;return Tc.startSharing(t),Xs(!1)})),handleSDKShareErrorEpic:e=>lo(e,[fi.DesktopSharingError,fi.DesktopSharingChromeExtensionUninstalled,fi.DesktopSharingPermissionDenied,fi.DesktopSharingSystemError]).pipe(Sc(e=>{if([fi.DesktopSharingPermissionDenied,fi.DesktopSharingSystemError].includes(e.payload.type))return Xs(!0);Bi("SHARE_START_DESKTOP_SHARE_FAILED",{reason:""})})),handleSDKShareDimensionChangeEpic:e=>lo(e,fi.CurrentDesktopSharingWidthHeight).pipe(Je(e=>!!e.payload.data),Ae(e=>{Bi("SHARE_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return ii.getInstance().ajustmentSharingCanvas(t,r),Zs(e.payload.data)})),handleSDKReceivedShareSizeChangeEpic:(e,t)=>lo(e,fi.SharingDecodeMaxSize).pipe(Je(e=>!!e.payload.data),Tt(t),Sc(([e,t])=>{const{share:{shareQuality:r,activeNodeId:o}}=t,{payload:{data:{size:n}}}=e,i=Number(n);if(r!==i)return Tc.subscribeSharing(o,i),ta(i)})),handleRWGShareOriginalDimensionEpic:e=>ao(e,20226).pipe(At(e=>{Bi("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.body);const{payload:{body:{width:t,height:r}}}=e;ii.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Ae(e=>ra(e.payload.body))),handleSDKShareOriginalDimensionEpic:e=>lo(e,fi.SharingPara).pipe(At(e=>{Bi("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;ii.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Ae(e=>ra(e.payload.data))),handleSDKStopShareEpic:(e,t)=>lo(e,fi.UserStopDesktopSharing).pipe(Tt(t),Ae(([,e])=>{const{meeting:{userId:t},share:{status:r}}=e;return r!==exports.ShareStatus.End&&(Tc.stopSharing(t),Bi("SHARE_VIDEO_STREAMS_END")),$s(exports.ShareStatus.End)})),handleRWGCurrentUserShareChangeEpic:(e,t)=>ao(e,7937).pipe(Tt(t),Je(([e,t])=>{const{meeting:{userId:r}}=t,o=e.payload.body.update;return o&&o.length>0&&o.findIndex(e=>e.id===r&&void 0!==e.bShareOn)>-1}),Ue(([e,t])=>{const{meeting:{userId:r},share:{status:o,isReceiveSharing:n,activeNodeId:i}}=t,{payload:{body:{update:s}}}=e,a=s.find(e=>e.id===r&&!1===e.bShareOn),c=s.find(e=>e.id===r&&!0===e.bShareOn),d=[],u=ii.getInstance();return a&&o!==exports.ShareStatus.End&&(Tc.stopSharing(r),u.stopDesktopSharing(),d.push($s(exports.ShareStatus.End)),Bi("SHARE_PASSIVE_STOP_SHARE")),c&&o===exports.ShareStatus.End&&(n&&(u.stopRenderSharing(),Tc.unsubscribeSharing(i),d.push(Qs(!1))),d.push($s(exports.ShareStatus.Sharing))),ke(d)})),handleMultipleShareChangeEpic:(e,t)=>ao(e,7937).pipe(Tt(t),Je(([e,t])=>{const{meeting:{userId:r}}=t,o=e.payload.body.update;return o&&o.length>0&&o.findIndex(e=>e.id!==r&&void 0!==e.bShareOn)>-1}),bc(([t,r])=>{const{payload:{body:{update:o}}}=t,{share:{activeNodeId:n,isReceiveSharing:i,shareQuality:s}}=r,a=Cc(r),c=o.filter(e=>!0===e.bShareOn&&!1===e.bSharePause),d=o.filter(e=>!1===e.bShareOn);if(c.length>0&&c.forEach(e=>{-1===a.findIndex(t=>t.userId===e.id)&&Bi("SHARE_NEW_USER_ADD",e)}),d.length>0&&(d.forEach(e=>{Bi("SHARE_USER_REMOVE",e)}),i&&d.some(e=>e.id===n)))return Ze(ao(e,20225).pipe(ut(1),vt($)),tt(50).pipe(vt(ae("timeout")))).pipe(ot(()=>{const e=a.filter(e=>e.userId!==n);if(e.length>0){const t=e[0],{userId:r}=t;return Tc.unsubscribeSharing(n),Tc.subscribeSharing(r,s),ii.getInstance().switchSharingSource(r),Bi("SHARE_AUTO_CHANGE_SOURCE",{userId:r}),se(Js({activeNodeID:r,bStatus:1,ssrc:r}))}return $}))})),handleRequestRemoteControlEpic:(e,t)=>ao(e,16391).pipe(Tt(t),Je(([e,t])=>{const{meeting:{userId:r}}=t;return e.payload.body.id===r}),Ae(([e])=>{const{payload:{body:{bOn:t}}}=e;return Bi("SHARE_REMOTE_CONTROL_APPROVE",t),oa(t)})),handleGrabRemoteControlEpic:(e,t)=>ao(e,16395).pipe(Tt(t),Je(([e,t])=>e.payload.body.id===t.meeting.userId),Ae(([e])=>{const{payload:{body:{bOn:t}}}=e;return ii.getInstance().updateRemoteControlProperties({isControllerNow:t}),Bi("SHARE_GRAB_REMOTE_CONTROL_CHANGE",t),na(t)})),handleSDKRemoteControlEpic:e=>lo(e,[fi.StartRemoteControlSuccess,fi.StartRemoteControlFailed,fi.CancelRemoteControlSuccess]).pipe(Sc(e=>e.payload.type===fi.StartRemoteControlSuccess?(Bi("SHARE_REMOTE_CONTROL_SUCCESS"),aa(!0)):e.payload.type===fi.CancelRemoteControlSuccess?aa(!1):void(e.payload.type===fi.StartRemoteControlFailed&&Bi("SHARE_REMOTE_CONTROL_FAILED")))),handleRemoteControlClipboardEpic:e=>lo(e,[fi.RemoteControlCopiedTextNotify,fi.RemoteControlPasteTextLengthOverflow]).pipe(At(e=>{if(e.payload.type===fi.RemoteControlCopiedTextNotify){const{payload:{data:t}}=e;Bi("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{content:t.data,x:t.x,y:t.y})}else Bi("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{error:"length of pasted text is too long"})}),vt($))});function Rc(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o3?t.i-4:t.i:Array.isArray(e)?1:Vc(e)?2:Lc(e)?3:0}function kc(e,t){return 2===Mc(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Uc(e,t,r){var o=Mc(e);2===o?e.set(t,r):3===o?(e.delete(t),e.add(r)):e[t]=r}function Vc(e){return dd&&e instanceof Map}function Lc(e){return ud&&e instanceof Set}function xc(e){return e.o||e.t}function jc(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=yd(e);delete t[_d];for(var r=vd(t),o=0;o1&&(e.set=e.add=e.clear=e.delete=Fc),Object.freeze(e),t&&Pc(e,(function(e,t){return Hc(t,!0)}),!0)),e}function Fc(){Rc(2)}function Gc(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Bc(e){var t=Ed[e];return t||Rc(18,e),t}function Wc(){return ad}function Kc(e,t){t&&(Bc("Patches"),e.u=[],e.s=[],e.v=t)}function qc(e){zc(e),e.p.forEach(Qc),e.p=null}function zc(e){e===ad&&(ad=e.l)}function Jc(e){return ad={p:[],l:ad,h:e,m:!0,_:0}}function Qc(e){var t=e[_d];0===t.i||1===t.i?t.j():t.g=!0}function Yc(e,t){t._=t.p.length;var r=t.p[0],o=void 0!==e&&e!==r;return t.h.O||Bc("ES5").S(t,e,o),o?(r[_d].P&&(qc(t),Rc(4)),Dc(e)&&(e=Xc(t,e),t.l||$c(t,e)),t.u&&Bc("Patches").M(r[_d],e,t.u,t.s)):e=Xc(t,r,[]),qc(t),t.u&&t.v(t.u,t.s),e!==pd?e:void 0}function Xc(e,t,r){if(Gc(t))return t;var o=t[_d];if(!o)return Pc(t,(function(n,i){return Zc(e,o,t,n,i,r)}),!0),t;if(o.A!==e)return t;if(!o.P)return $c(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var n=4===o.i||5===o.i?o.o=jc(o.k):o.o;Pc(3===o.i?new Set(n):n,(function(t,i){return Zc(e,o,n,t,i,r)})),$c(e,n,!1),r&&e.u&&Bc("Patches").R(o,r,e.u,e.s)}return o.o}function Zc(e,t,r,o,n,i){if(Nc(n)){var s=Xc(e,n,i&&t&&3!==t.i&&!kc(t.D,o)?i.concat(o):void 0);if(Uc(r,o,s),!Nc(s))return;e.m=!1}if(Dc(n)&&!Gc(n)){if(!e.h.F&&e._<1)return;Xc(e,n),t&&t.A.l||$c(e,n)}}function $c(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&Hc(t,r)}function ed(e,t){var r=e[_d];return(r?xc(r):e)[t]}function td(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Object.getPrototypeOf(r)}}function rd(e){e.P||(e.P=!0,e.l&&rd(e.l))}function od(e){e.o||(e.o=jc(e.t))}function nd(e,t,r){var o=Vc(t)?Bc("MapSet").N(t,r):Lc(t)?Bc("MapSet").T(t,r):e.O?function(e,t){var r=Array.isArray(e),o={i:r?1:0,A:t?t.A:Wc(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},n=o,i=gd;r&&(n=[o],i=Sd);var s=Proxy.revocable(n,i),a=s.revoke,c=s.proxy;return o.k=c,o.j=a,c}(t,r):Bc("ES5").J(t,r);return(r?r.A:Wc()).p.push(o),o}function id(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return jc(e)}var sd,ad,cd="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),dd="undefined"!=typeof Map,ud="undefined"!=typeof Set,ld="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,pd=cd?Symbol.for("immer-nothing"):((sd={})["immer-nothing"]=!0,sd),hd=cd?Symbol.for("immer-draftable"):"__$immer_draftable",_d=cd?Symbol.for("immer-state"):"__$immer_state",fd=""+Object.prototype.constructor,vd="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,yd=Object.getOwnPropertyDescriptors||function(e){var t={};return vd(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Ed={},gd={get:function(e,t){if(t===_d)return e;var r=xc(e);if(!kc(r,t))return function(e,t,r){var o,n=td(t,r);return n?"value"in n?n.value:null===(o=n.get)||void 0===o?void 0:o.call(e.k):void 0}(e,r,t);var o=r[t];return e.I||!Dc(o)?o:o===ed(e.t,t)?(od(e),e.o[t]=nd(e.A.h,o,e)):o},has:function(e,t){return t in xc(e)},ownKeys:function(e){return Reflect.ownKeys(xc(e))},set:function(e,t,r){var o=td(xc(e),t);if(null==o?void 0:o.set)return o.set.call(e.k,r),!0;if(!e.P){var n=ed(xc(e),t),i=null==n?void 0:n[_d];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,n)&&(void 0!==r||kc(e.t,t)))return!0;od(e),rd(e)}return e.o[t]===r&&"number"!=typeof r||(e.o[t]=r,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==ed(e.t,t)||t in e.t?(e.D[t]=!1,od(e),rd(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=xc(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:o.enumerable,value:r[t]}:o},defineProperty:function(){Rc(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Rc(12)}},Sd={};Pc(gd,(function(e,t){Sd[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Sd.deleteProperty=function(e,t){return gd.deleteProperty.call(this,e[0],t)},Sd.set=function(e,t,r){return gd.set.call(this,e[0],t,r,e[0])};var bd=new(function(){function e(e){var t=this;this.O=ld,this.F=!0,this.produce=function(e,r,o){if("function"==typeof e&&"function"!=typeof r){var n=r;r=e;var i=t;return function(e){var t=this;void 0===e&&(e=n);for(var o=arguments.length,s=Array(o>1?o-1:0),a=1;a1?o-1:0),i=1;i=0;r--){var o=t[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}var n=Bc("Patches").$;return Nc(e)?n(e,t):this.produce(e,(function(e){return n(e,t.slice(r+1))}))},e}()),md=bd.produce;bd.produceWithPatches.bind(bd),bd.setAutoFreeze.bind(bd),bd.setUseProxies.bind(bd),bd.applyPatches.bind(bd),bd.createDraft.bind(bd),bd.finishDraft.bind(bd);const Id={ssrc:0,status:exports.ShareStatus.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:exports.SharePrivilege.OnlyHost,activeNodeId:0,activeSsrc:0,shareQuality:1,isRemoteSharingActive:!1,isReceiveSharing:!1,isRemoteControlApproved:!1,isGrabRemoteControl:!1,isSDKGrabControl:!1,isChromeExtensionInstalled:!1,isScreenShareForbidden:!1},Ad=Rr({[""+zs]:md((e,{payload:t})=>{e.sharePrivilege=t}),[""+Js]:md((e,{payload:t})=>{e.isRemoteSharingActive=1===t.bStatus,e.activeNodeId=t.activeNodeID,e.activeSsrc=t.ssrc}),[""+Qs]:md((e,{payload:t})=>{e.isReceiveSharing=t}),[""+Ys]:md((e,{payload:t})=>{e.isChromeExtensionInstalled=t}),[""+Zs]:md((e,{payload:t})=>{e.shareDimension=d({},t)}),[""+$s]:md((e,{payload:t})=>{e.status=t}),[""+ea]:md((e,{payload:t})=>{e.ssrc=t}),[""+ta]:md((e,{payload:t})=>{e.shareQuality=t}),[""+ra]:md((e,{payload:t})=>{e.receivedShareDimension=d({},t)}),[""+oa]:md((e,{payload:t})=>{e.isRemoteControlApproved=t}),[""+na]:md((e,{payload:t})=>{e.isGrabRemoteControl=t}),[""+ia]:md((e,{payload:t})=>{e.isVerifiedRenderCanvasAfterFailover=t}),[""+sa]:md((e,{payload:t})=>{e.isVerifiedCaptureCanvasAfterFailover=t}),[""+aa]:md((e,{payload:t})=>{e.isSDKGrabControl=t}),[""+ca]:()=>d(d({},Id),{},{isVerifiedRenderCanvasAfterFailover:!1,isVerifiedCaptureCanvasAfterFailover:!1})},Id),Od=so(wc),Cd=ri.createAgent(),Td=(e,t)=>e.pipe(Mt(""+tn),Tt(t),Je(([,e])=>void 0!==e.meeting.encryptedRWC),mc(([,e])=>{const{meeting:{encryptedRWC:t,ts:r,auth:o,meetingNumber:n},breakoutRoom:i}=e;if(t)return ke(Object.keys(t).map(e=>{const s=t[e];let a=void 0;return a=i&&i.currentRoom.boConfId?yc(e,n,s,r,o,i.currentRoom.boConfId):yc(e,n,s,r,o),{url:a,domain:e,rwcToken:s}})).pipe(Ue(e=>Ro(e.url).pipe(Ue(t=>{let r={};return r=t.response?d(d({},t.response),{},{fromNginx:!1}):{rwg:e.domain,rwcToken:e.rwcToken,fromNginx:!0},ke([Gr(r),Nr()])}),ot(()=>$))),yt(ln(performance.now())))}));var wd=Object.freeze({__proto__:null,pingRWCEpic:Td,joinMeetingSuccessfulEpic:(e,t)=>ao(e,4098).pipe(Tt(t),mc(([e,t])=>{const{payload:{body:{res:r,userID:o,zoomID:n,mn:i,participantID:s,hugeBO:a,elapsed:c,disableAqos:d,meetingtoken:u}}}=e,{meeting:{pingRWCTimestamp:l,isWebinar:p,userEmail:h,userName:_,isMeetingReset:f,meetingOptions:v},media:{mediaConstraints:y,assetsPath:E},breakoutRoom:g}=t;if(Po.CONF_SUCCESS===r){const{WebclientParticipantId:t,WebclientUserId:r,WebclientZoomId:S,WebclientUserEmail:b,WebclientUserName:m,WebclientMeetingToken:I}=Jn;kn.set(r,o,Pn.SessionStorage),kn.set(S,n,Pn.SessionStorage),kn.set(t,s,Pn.SessionStorage),h&&kn.set(b,h,Pn.SessionStorage),kn.set(m,_,Pn.SessionStorage),u&&kn.set(I,u,Pn.SessionStorage),Cd.sendRWGConnectionPerformance(`WCL_M, JMCT(${performance.now()-l})`);const A=[pn(e.payload.body),On(performance.now())];return ii.getInstance().init(),f&&(A.push(En(!1)),void 0!==y&&void 0!==E&&A.push(Jr())),p&&A.push(Dr()),g&&(v&&!0===v.isBO100Enabled&&A.push(hc(a)),g.currentRoom.boConfId&&A.push(xr()),void 0!==c&&A.push(Za(c))),void 0!==d&&A.push(Cn(!d)),Bi("JOIN_MEETING_SUCCESS",{meetingNumber:i}),ke(A)}return Po.CONF_FAIL_CONFLOCKED===r?Bi("JOIN_MEETING_FAILED",Bo(r)):Po.CONF_FAIL_CONF_USER_FULL===r?Bi("JOIN_MEETING_FAILED",Object.assign({},Bo(r),{lmUrl:e.payload.body.lmURL})):(Po.CONF_FAIL_MEETING_OVER===r||Po.CONF_RESULT_MMR_IB_REJECT===r||Po.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===r||[Po.CONF_FAIL_HAS_BEEN_REMOVED,Po.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(r),Bi("JOIN_MEETING_FAILED",Bo(r))),ke(Ec(t,!1))})),handleMeetingAttributeChangeEpic:(e,t)=>ao(e,7938).pipe(Tt(t),Ae(([e,t])=>{const{payload:{body:r}}=e,{meeting:{zoomId:o,encType:n}}=t;if(void 0!==(null==r?void 0:r.encryptKey)&&$n.init(o,r.encryptKey,n),void 0!==(null==r?void 0:r.gatewayKey)){const e=ii.getInstance(),[,t,o]=r.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:o&&Yo(o)}])}return Bi("UPDATE_MEETING_ATTRIBUTE",r),hn(r)})),handleMeetingEndEpic:(e,t)=>ao(e,7939).pipe(Tt(t),Ue(([e,t])=>{const{payload:{body:r}}=e;if(void 0!==r.reason){if(Mo.LEAVEREASON_RECONNECT===r.reason)return ko.LEAVESUBREASON_WAITINGROOMFAILOVER===r.subReason?Bi("RECONNECTING_MEETING",{reason:Nn.OnHold}):Bi("RECONNECTING_MEETING",{reason:Nn.Failover}),se(rn());Mo.LEAVEREASON_KICKEDBYHOST===r.reason?Bi("LEAVING_MEETING",{reason:"kicked by host"}):Mo.LEAVEREASON_ENDBYHOST!==r.reason&&Mo.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING!==r.reason||Bi("LEAVING_MEETING",{reason:"ended by host"})}return t.meeting.isMeetingReset?$:ke(Ec(t,!1))})),meetingFailoverEpic:(e,t)=>e.pipe(Mt(""+rn),Tt(t),Ue(([,e])=>{const t=Ec(e,!0);let r;if(e.meeting.zlkJwtToken){const t=function(e){if(e){const{meeting:{topic:t,passWord:r,userName:o,zlkJwtToken:n,lang:i,cv:s,customerKey:a}}=e;return{topic:t,passWord:r,userName:o,zlkJwtToken:n,lang:i,cv:s,customerKey:a}}return null}(e),o={topic:null==t?void 0:t.topic,password:null==t?void 0:t.passWord,userName:null==t?void 0:t.userName,zlk:null==t?void 0:t.zlkJwtToken,lang:null==t?void 0:t.lang,cv:null==t?void 0:t.cv,customerKey:null==t?void 0:t.customerKey};r=se(en(o)).pipe(st(1e3))}else{const t=function(e){const{meeting:{apiKey:t,signature:r,meetingNumber:o,userName:n,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:o,userName:n,lang:i,passWord:s,userEmail:a,sdkUrl:c,sdkOrigin:d,proxy:u,cv:l,ztk:p||sessionStorage.getItem(Jn.WebclientZak),tk:h||sessionStorage.getItem(Jn.WebclientTk)}}(e);r=se($o(t)).pipe(st(1e3))}return He(ke(t),r)})),hostChangeEpic:e=>uo(e,7940).pipe(At(e=>{Bi("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)}),Ae(e=>fn(e.payload.body))),cohostChangeEpic:e=>uo(e,7941).pipe(At(e=>{Bi("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)}),Ae(e=>vn(e.payload.body))),setMeetingOptEpic:e=>uo(e,7945).pipe(At(e=>{const{payload:{body:{opt:t}}}=e;kn.set(Jn.WebclientOpt,t,Pn.SessionStorage)}),vt($)),setMeetingOnHoldEpic:(e,t)=>ao(e,7942).pipe(At(e=>{const{payload:{body:{bHold:t}}}=e;kn.set(Jn.WebclientIsOnHold,t?1:0,Pn.SessionStorage),Bi("MEETING_IN_WAITING_ROOM",t)}),Tt(t),Ue(([e,t])=>{const r=[yn(e.payload.body.bHold)];if(e.payload.body.bHold){const e=gs(t);if(e){r.push(gn({audio:e.audio,video:e.bVideoOn,muted:e.muted}));const o=ii.getInstance();if("computer"===e.audio&&(o.leaveComputerAudio(),Cd.joinOrLeaveVoip(!1)),e.bVideoOn&&o.stopCaptureVideo(),e.sharerOn&&(Cd.stopSharing(e.userId),o.stopDesktopSharing(),r.push($s(exports.ShareStatus.End))),t.video&&t.video.subscribedVideoList.length>0&&t.video.subscribedVideoList.forEach(e=>{Cd.unsubscribeVideo(e)}),t.share&&t.share.isReceiveSharing){const e=t.share.activeNodeId;t.share.isRemoteControlApproved&&(Cd.sharingRequestRemoteControl(e,!1),o.stopRemoteControl()),Cd.unsubscribeSharing(e),o.stopRenderSharing()}}}return ke(r)})),setMeetingDataCenterRegionEpic:e=>ao(e,7954).pipe(Ae(e=>In(e.payload.body))),claimHostResponseEpic:e=>ao(e,4216).pipe(At(e=>{Bi("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)}),vt($)),leaveMeetingEpic:(e,t)=>e.pipe(Mt(""+on,""+nn),Tt(t),Ue(([e,t])=>(e.type===""+on?(Cd.leaveMeeting(),Bi("LEAVING_MEETING",{})):e.type===""+nn&&(Cd.endMeeting(),Bi("LEAVING_MEETING",{})),ke(Ec(t,!1))))),versionUpgradeEpic:e=>ao(e,2).pipe(At(()=>{console.warn("Upgrade to latest version to optimize meeting experience")}),vt($)),versionBlockEpic:e=>ao(e,1).pipe(At(e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=Bo(1e3);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,()=>t);r.reason=e}Bi("JOIN_MEETING_FAILED",r)}),vt($))});let Rd,Nd,Dd=window.WEB_ENDPOINT||"zoom.us",Pd=`https://${Dd}/wc/lsdk`;!function(e){e.Expel="expel",e.Promote="promote",e.Depromote="depromote",e.MemberChange="memberChange",e.RaiseHand="raisehand",e.LowerHand="lowerhand",e.PutdownHands="putdownhands"}(Rd||(Rd={})),function(e){e[e.AttendeeToAllPanelist=1]="AttendeeToAllPanelist",e[e.PanelistToAttendee=3]="PanelistToAttendee"}(Nd||(Nd={}));const Md=["CONNECTED","DISCONNECTED","POOL","CONNFAIL","OnlineMembers","GroupChange","RosterChange","WebinarQA","Message"];class kd{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;Md.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 kd),this.agentInstance}onXmppCallback(e,t){this.callbackList.length>0&&this.callbackList.forEach(r=>r(e,t))}registerCallback(e){this.callbackList.push(e)}unregisterCallback(e){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}connect(e){var t;const{svcUrl:r,meetingNumber:o,conId:n,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;Md.forEach(t=>{e.on(t,e=>{this.onXmppCallback(t,e)})})}const c=`wss://${r}/wc/media/${o}?type=x&cid=${n}`;null===(t=this.instance)||void 0===t||t.server.connect({url:c,jid:s,meetingNumber:o,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,o){var n;null===(n=this.instance)||void 0===n||n.server.sendWebinarMsg(e,t,r,o)}rename(e,t){var r;null===(r=this.instance)||void 0===r||r.server.rename(e,t)}sendAsk(e,t,r){var o;null===(o=this.instance)||void 0===o||o.server.sendAsk(e,t,r)}sendAnswer(e,t,r){var o;null===(o=this.instance)||void 0===o||o.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}}kd.agentInstance=void 0;let Ud=0;var Vd=Ko((function(e,t){var r;r=function(){function e(){for(var e=0,t={};ee.pipe(Mt(""+kr),Tt(t),Ue(([,e])=>{const{media:{assetsPath:t}}=e;return ke(new Promise((e,r)=>{Tn(t+"/webim.min.js",()=>{e("")},()=>{r()})})).pipe(ht(Kr(!0)),ot(e=>se(Kr(!1))))})),connectXMPPSocketEpic:(e,t)=>e.pipe(Mt(""+Dr),Tt(t),Je(([,e])=>"closed"===e.socket.xmppSocketStatus),mc(([,t])=>{const{meeting:{svcUrl:r,meetingNumber:o,conId:n,jid:i,userName:s},socket:{isXmppSDKLoaded:a}}=t,c=Ln()&&xn()?11:10;let d=se(a);return!1===a&&(d=e.pipe(Mt(""+Kr),ut(1))),d.pipe(Ue(e=>{return e?(t={svcUrl:r,meetingNumber:o,conId:n,jid:i,userName:s,clientCap:c},Yd.connect(t),Xd=new K,We(e=>Yd.registerCallback(e),e=>Yd.unregisterCallback(e),(e,t)=>({event:e,data:t})).subscribe(Xd),Xd).pipe(Ae(e=>Lr(e)),yt(Wr(Ts.Connecting))):ae("webim load fail");var t}))})),connectedXmppSocketEpic:(e,t)=>e.pipe(Mt(""+Wr),Je(e=>e.payload===Ts.Connecting),mc(()=>{if(Xd){const e=Xd.pipe(Je(e=>"CONNECTED"===e.event)),r=Xd.pipe(Je(e=>"DISCONNECTED"===e.event));return qe(e.pipe(Ue(()=>se(Wr(Ts.Connected)))),r.pipe(Tt(t),Je(([,e])=>"closed"!==e.socket.xmppSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(Bi("RECONNECTING_MEETING",{reason:Nn.Failover}),rn()))))}})),disconnectXmppSocketEpic:e=>e.pipe(Mt(""+Mr),ht(Wr(Ts.Closed)),At(()=>{var e;Yd.disconnect(),null===(e=Xd)||void 0===e||e.complete()}))});const $d={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:null,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,enableQos:!0},eu=Rr({[""+sn]:md((e,{payload:t})=>{Object.assign(e,t)}),[""+an]:md((e,{payload:t})=>{e.isWindowOpen=t}),[""+cn]:md((e,{payload:t})=>{e.apiKey=t.apiKey,e.signature=t.signature,e.lang=t.language}),[""+dn]:md((e,{payload:t})=>{e.zak=t}),[""+un]:md((e,{payload:t})=>{e.tk=t.tk,e.mtkGuid=t.mtkGuid}),[""+ln]:md((e,{payload:t})=>{e.pingRWCTimestamp=t}),[""+pn]:md((e,{payload:t})=>{e.confId=t.confID,e.conId=t.conID,e.e2eEncrypt=t.e2eEncrypt,e.meetingNumber=parseInt(t.mn,10),e.zoomId=t.zoomID,e.meetingStatus="joined",e.jid=t.jid,e.xtoken=t.xtoken,e.groups=t.groups,e.svcUrl=t.svcUrl,e.encType=t.encType,e.userGUID=t.userGUID,e.userId=t.userID,e.role=t.role,e.participantID=t.participantID}),[""+hn]:md((e,{payload:t})=>{Object.assign(e,t)}),[""+fn]:md((e,{payload:t})=>{e.isHost=t}),[""+vn]:md((e,{payload:t})=>{e.isCoHost=t}),[""+yn]:md((e,{payload:t})=>{e.isOnHold=t}),[""+En]:md((e,{payload:t})=>{e.isMeetingReset=t}),[""+gn]:md((e,{payload:t})=>{e.audioVideoBeforeOnHold=t}),[""+Sn]:md((e,{payload:t})=>{e.currentUserAudioBeforeReset=t}),[""+bn]:md((e,{payload:t})=>{e.isCurrentUserMutedBeforeReset=t}),[""+mn]:md((e,{payload:t})=>{e.meetingStatus=t}),[""+In]:md((e,{payload:t})=>{e.region=t.region,e.network=t.network}),[""+An]:md((e,{payload:t})=>{e.isCurrentUserStartVideoBeforeReset=t}),[""+On]:md((e,{payload:t})=>{e.joinMeetingTimeStamp=t}),[""+Cn]:md((e,{payload:t})=>{e.enableQos=t}),[""+_n]:md((e,{payload:t})=>{Object.assign(e,d(d({},$d),{},{isMeetingReset:!0,currentUserAudioBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.audio:t.audio,isCurrentUserMutedBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.muted:t.muted,isCurrentUserStartVideoBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.video:t.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}))})},$d),tu=so(wd,{meetingInfoEpic:(e,t)=>e.pipe(Mt(""+en),bt(e=>{const r=Object.assign({},e.payload,{password:zo(e.payload.password),topic:zo(e.payload.topic)});return((e,t,r="zoomsdkjsonpcallback")=>new H(o=>{Ud++;const n=`${r}${Ud}`,i=document.createElement("script");Object.keys(t).forEach(e=>(void 0===t[e]||null===t[e])&&delete t[e]),i.src=`${e}?${new URLSearchParams(Object.assign(t,{callback:n})).toString()}`,i.async=!0,i.onerror=e=>o.error(e),document.getElementsByTagName("head")[0].appendChild(i),window[n]=e=>{i.parentNode&&i.parentNode.removeChild(i),delete window[n],o.next(e),o.complete()}}))(Pd,r).pipe(ot(e=>se({status:!1,result:e.toString(),errorCode:-3e3})),Ue(r=>{const[o,n]=Xe(se(r),e=>!0===e.status&&void 0!==e.result);return n.subscribe(e=>{e.state||(3e3===e.errorCode&&"Meeting password is incorrect"===e.errorMessage?Bi("JOIN_MEETING_FAILED",Go(3004)):-3e3===e.errorCode?Bi("JOIN_MEETING_FAILED",{reason:"connection error"}):3e3===e.errorCode?Bi("JOIN_MEETING_FAILED",{reason:e.errorMessage,errorCode:200}):300===e.errorCode?Bi("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?Bi("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?Bi("JOIN_MEETING_FAILED",{reason:"The token is expired or more than 2 days or ineffective.",errorCode:200}):124===e.errorCode&&Bi("JOIN_MEETING_FAILED",{reason:"Verify JWT failed",errorCode:200}))}),o.pipe(bc(r=>{if(!0===r.status){const{result:{mid:o}}=r;return kn.init(o),He(se(sn(vc(r,e.payload))),no(Td,t,tn()))}}))}))}))}),ru=ri.createAgent();let ou;var nu=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(Mt(""+Nr),Tt(t),Je(([,e])=>"closed"===e.socket.zoomSocketStatus),mc(([,e])=>{const{socket:{retryCount:t,rwgServerList:r},meeting:o,breakoutRoom:n}=e;let i;if(o.zlkJwtToken)i=function({passWord:e,meetingNumber:t,userName:r,topic:o,trackAuth:n,tid:i,meetingId:s,ts:a,auth:c,lang:d,retryCount:u,rwgServerList:l,cv:p,customerKey:h,zlkJwtToken:_}){const f=Vd.get("_zm_mtk_guid");let v=kn.get(Qd);if(v||(v=Gd(),kn.set(Qd,v,Pn.LocalStorage)),l.length>u){const y=l[u];let E={dn2:zo(r),topic:zo(o),auth:c,browser:Un(),trackAuth:n,mid:s,tid:i,lang:d,ts:a,"ZM-CID":v,_ZM_MTG_TRACK_ID:f||"",iccv:p,customer_key:zo(h),cfs:0,zlkJwtToken:_};""!==e&&(E=Object.assign(E,{mpwd:zo(e)})),y.rwcAuth?E=Object.assign(E,{rwcAuth:y.rwcAuth}):y.rwcToken&&(E=Object.assign(E,{rwcToken:y.rwcToken}));let g=2;return jn()?g=1:Hn()&&(g=0),E=Object.assign(E,{as_type:g}),[{key:Kd,queryKey:"opt"},{key:qd,queryKey:"participantID"},{key:zd,queryKey:"zoomid"}].forEach(e=>{const t=kn.get(e.key);void 0!==t&&(E[e.queryKey]=t)}),`wss://${y.rwg}/instantsdk/${t}?${new URLSearchParams(E).toString()}`}return null}(d(d({},o),{},{retryCount:t,rwgServerList:r}));else{let e=d(d({},o),{},{retryCount:t,rwgServerList:r});if(n&&n.currentRoom.status===vs.Joining){const{currentRoom:{boId:t,boConfId:r,boToken:o}}=n;e=d(d({},e),{},{bid:t,botk:o,confID:r})}i=function({isHost:e,isOriginHost:t,passWord:r,meetingNumber:o,userName:n,zak:i,trackAuth:s,tid:a,sign:c,meetingId:d,ts:u,auth:l,lang:p,tk:h,retryCount:_,rwgServerList:f,userEmail:v,cv:y,bid:E,botk:g,confID:S,customerKey:b}){const m=Vd.get("_zm_mtk_guid");let I=kn.get(Qd);if(I||(I=Gd(),kn.set(Qd,I,Pn.LocalStorage)),f.length>_){const A=f[_];let O={dn2:zo(n),auth:l,sign:c,browser:Un(),trackAuth:s,mid:d,tid:a,email:v,lang:p,zak:i||"",tk:h||"",customer_key:zo(b),ts:u,"ZM-CID":I,_ZM_MTG_TRACK_ID:m||"",jscv:y,cfs:0};e&&t||""===r||(O=Object.assign(O,{mpwd:r})),A.rwcAuth?O=Object.assign(O,{rwcAuth:A.rwcAuth}):A.rwcToken&&(O=Object.assign(O,{rwcToken:A.rwcToken}));let C=2;return jn()?C=1:Hn()&&(C=0),O=Object.assign(O,{as_type:C}),[{key:Wd,queryKey:"cfs"},{key:Kd,queryKey:"opt"},{key:qd,queryKey:"participantID"},{key:zd,queryKey:"zoomid"},{key:Jd,queryKey:"tk"}].forEach(e=>{const t=kn.get(e.key);void 0!==t&&(O[e.queryKey]=t)}),E&&g&&S&&Object.assign(O,{bid:zo(E),botk:g,confID:S}),`wss://${A.rwg}/wc/api/${o}?${new URLSearchParams(O).toString()}`}return null}(e)}if(i){const e=(s=i,ru.connect(s),ou=new K,We(e=>ru.on(ei.Message,e),e=>ru.off(ei.Message,e),e=>e.data).subscribe(ou),ou);return qe(e.pipe(Je(e=>"string"==typeof e),Ae(e=>JSON.parse(e)),Oc(),Sc(e=>{if(0!==e.evt||!e.body||"invalid parameters!"!==e.body.test)return Ur(e);Bi("JOIN_MEETING_FAILED",Go(Vo.INVALID_PARAMETER))}),yt(Fr(Ts.Connecting))),e.pipe(Je(e=>e instanceof ArrayBuffer),Ae(e=>Vr(e))))}var s})),connectedZoomSocketEpic:(e,t)=>e.pipe(Mt(""+Nr),bt(()=>{const[e,r,o]=[ei.Open,ei.Close,ei.Error].map(e=>We(t=>ru.on(e,t),t=>ru.on(e,t)));return qe(e.pipe(Ue(()=>qe(se(Fr(Ts.Connected)),tt(6e4).pipe(Tt(t),Je(([,e])=>"initial"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(Bi("RECONNECTING_MEETING",{reason:Nn.Failover}),rn())))))),r.pipe(Tt(t),Je(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Ae(()=>(Bi("RECONNECTING_MEETING",{reason:Nn.Failover}),rn()))),o.pipe(Tt(t),bc(([,e])=>{const{meeting:{meetingStatus:t,isMeetingReset:r},socket:{retryCount:o}}=e;return"initial"===t?ke([Br(o+1),Pr({retry:!0})]):r?void 0:(Bi("RECONNECTING_MEETING",{reason:Nn.Failover}),se(rn()))})))})),disconnectZoomSocketEpic:e=>e.pipe(Mt(""+Pr),Ue(e=>e.payload&&e.payload.retry?se(Nr()).pipe(st(1e3),yt(Fr(Ts.Closed))):se(Fr(Ts.Closed))),st(100),At(()=>{var e;ru.close(),null===(e=ou)||void 0===e||e.complete()}))});const iu=oi.getInstance();let su;var au=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(Mt(""+xr),Tt(t),Je(([,e])=>"closed"===e.socket.mainSessionSocketStatus),bt(([,e])=>{const{meeting:{svcUrl:t,meetingNumber:r,conId:o}}=e;return(e=>(iu.connect(e),su=new K,We(e=>iu.on(ei.Message,e),e=>iu.off(ei.Message,e)).pipe(Ae(e=>e.data)).subscribe(su),su))(function(e,t,r){return`wss://${e}/wc/media/${t}?type=m&cid=${r}&mode=2`}(t,r,o)).pipe(Ae(e=>JSON.parse(e)),Je(e=>0!==e.evt),Oc(),Ae(e=>Hr(e)),yt(qr(Ts.Connecting)))})),connectedMainSessionSocketEpic:(e,t)=>e.pipe(Mt(""+xr),bt(()=>{const[e,r,o]=[ei.Open,ei.Close,ei.Error].map(e=>We(t=>iu.on(e,t),t=>iu.on(e,t)));return qe(e.pipe(ht(qr(Ts.Connected))),r.pipe(Tt(t),Je(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus),Ae(()=>(Bi("RECONNECTING_MEETING",{reason:Nn.Failover}),rn()))),o.pipe(Ae(()=>(Bi("RECONNECTING_MEETING",{reason:Nn.Failover}),rn()))))})),disconnectMainSessionSocketEpic:e=>e.pipe(Mt(""+jr),ht(qr(Ts.Closed)),At(()=>{var e;iu.close(),null===(e=su)||void 0===e||e.complete()}))});const cu={zoomSocketStatus:Ts.Closed,isXmppSDKLoaded:!1,xmppSocketStatus:Ts.Closed,mainSessionSocketStatus:Ts.Closed,retryCount:0,rwgServerList:[]},du=Rr({[""+Fr]:md((e,{payload:t})=>{e.zoomSocketStatus=t}),[""+Gr]:md((e,{payload:t})=>{const{rwgServerList:r}=e;r.find(e=>e===t.rwg)||r.push(t)}),[""+Br]:md((e,{payload:t})=>{e.retryCount=t}),[""+Wr]:md((e,{payload:t})=>{e.xmppSocketStatus=t}),[""+Kr]:md((e,{payload:t})=>{e.isXmppSDKLoaded=t}),[""+qr]:md((e,{payload:t})=>{e.mainSessionSocketStatus=t}),[""+zr]:()=>cu},cu),uu=so(nu,Zd,au),lu={id:"userId",type:e=>us(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>{return{userRole:e,isHost:(t=e,(t&as.Host)===as.Host)};var t},dn2:e=>({displayName:Jo(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest"};var pu=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>ao(e,7937).pipe(Ae(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 o=lu[r];return"function"==typeof o?Object.assign(e,o(t[r])):"string"==typeof o?e[o]=t[r]:e[r]=t[r],e},{}),o=e.find(e=>e.userId===r.userId);return void 0!==o?Object.assign(o,r):e.push(r),e},[]))}),t})(e.payload.body)),Tt(t),Ue(([e,t])=>{const r=[Ji(e)],{meeting:{userId:o},participants:{attendeesList:n,failoverAttendeesList:i}}=t;if(e.add){const t=e.add.find(e=>e.userId===o);void 0!==t&&Bi("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const n=e.add.filter(e=>e.userId!==o);if(n.length>0){const e=n.filter(e=>!ls(e.userRole)).map(e=>{const t=i.find(t=>t.zoomID===e.zoomID);return t?d(d({},e),{},{source:t.isOnHold?"on hold":"failover"}):e}),t=e.filter(e=>!!e.source).map(e=>({zoomID:e.zoomID}));r.push($i(t)),Bi("ADD_USER_PARTICIPANT_ATTRIBUTE",e)}}if(e.update){const t=e.update.find(e=>e.userId===o);void 0!==t&&Bi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const r=e.update.filter(e=>e.userId!==o);r.length>0&&Bi("UPDATE_USER_PARTICIPANT_ATTRIBUTE",r)}if(e.remove){const t=e.remove.map(e=>{const t=n.find(t=>t.userId===e.userId);return t?2===e.action&&1===e.nUserStatus?t.bHold?(r.push(Zi({zoomID:t.zoomID,isOnHold:!0})),d(d({},e),{},{reason:"on hold"})):(r.push(Zi({zoomID:t.zoomID,isOnHold:!1})),d(d({},e),{},{reason:"failover"})):e:null}).filter(e=>!!e);Bi("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t)}return ke(r)})),receiveUserListFromXMPPEpic:e=>co(e,"POOL").pipe(Je(e=>e.payload.data.action===Rd.MemberChange),At(e=>{Bi("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.payload.data.data)}),Ae(e=>Qi(e.payload.data.data))),handleAdmitAllSilentUsersEpic:e=>ao(e,7951).pipe(At(e=>{!1===e.payload.body.bStarted&&Bi("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)}),Ae(e=>Yi(e.payload.body.bStarted))),handleKVUpdateIndicationEpic:e=>ao(e,7946).pipe(Je(e=>["bRaiseHand","feedback"].indexOf(e.payload.body.key)>-1&&0===e.payload.body.value),Ae(e=>(Bi("UPDATE_USER_PARTICIPANT_ATTRIBUTE",{}),void 0!==e.payload.body.bRaiseHand?es():ts())))});const hu={attendeesList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},_u=Rr({[""+Ji]:md((e,{payload:t})=>{void 0!==t.add&&t.add.length>0&&t.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):ls(t.userRole)?e.allowTalkAttendeesList.push(t):e.attendeesList.push(t)}}),void 0!==t.update&&t.update.length>0&&t.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!==t.remove&&t.remove.length>0&&t.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)}})}),[""+Qi]:md((e,{payload:t})=>{e.xmppAttendeeList=t.map(e=>d(d({},e),{},{displayName:e.name,userId:Number(e.node),userRole:Number(e.role)}))}),[""+Yi]:md((e,{payload:t})=>{e.isAdmitAllSilentUsers=t}),[""+es]:md(e=>{e.attendeesList.forEach(e=>{!0===e.bRaiseHand&&(e.bRaiseHand=!1)})}),[""+ts]:md(e=>{e.attendeesList.forEach(e=>{e.feedback>0&&(e.feedback=0)})}),[""+Zi]:md((e,{payload:t})=>{e.failoverAttendeesList.push(t)}),[""+$i]:md((e,{payload:t})=>{t.forEach(t=>{const r=e.failoverAttendeesList.findIndex(e=>e.zoomID===t.zoomID);-1!==r&&e.failoverAttendeesList.splice(r,1)})}),[""+Xi]:()=>hu},hu),fu=so(pu),vu={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0},yu=Rr({[""+Xr]:md((e,{payload:t})=>{e.audioDecodeStatus=t}),[""+Yr]:md((e,{payload:t})=>{e.audioEncodeStatus=t}),[""+to]:md((e,{payload:t})=>{e.sharingDecodeStatus=t}),[""+eo]:md((e,{payload:t})=>{e.sharingEncodeStatus=t}),[""+$r]:md((e,{payload:t})=>{e.videoDecodeStatus=t}),[""+Zr]:md((e,{payload:t})=>{e.videoEncodeStatus=t}),[""+ro]:md((e,{payload:t})=>{e.mediaConstraints=t.mediaConstraints,e.assetsPath=t.assetsPath}),[""+oo]:e=>d(d({},vu),{},{mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath})},vu),Eu=(e,t,r)=>Fe(...[t,r].map((t,r)=>{if("initial"!==t)return ke(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return Ze(qi(`${e.toUpperCase()}_${t}_SUCCESS`,1).pipe(ht(!0)),qi(`${e.toUpperCase()}_${t}_FAIL`,1).pipe(ht(!1)))}})),gu=()=>ke(navigator.mediaDevices.enumerateDevices()).pipe(Ae(e=>{const t=[],r=[],o=[];return e.forEach(e=>{const{kind:n,deviceId:i,label:s}=e;switch(n){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":o.push({deviceId:i,label:s})}}),{microphones:t,speakers:r,cameras:o}}));function Su(e){if(e){let r=e;try{const t=e.width;e.width=t}catch(o){var t;r=e.cloneNode(!0),null===(t=e.parentNode)||void 0===t||t.replaceChild(r,e)}return r}return e}const bu=ri.createAgent();var mu=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>ao(e,12033).pipe(Tt(t),Ae(([e,t])=>{const{participants:{attendeesList:r,allowTalkAttendeesList:o}}=t,n=e.payload.body,i={};return n&&([...r,...o].forEach(e=>{for(let t=1;t<=3;t++){const r="asn"+t,{userId:o,displayName:s}=e;if(void 0!==n[r]&&o===n[r]){i[r]={userId:o,displayName:s};break}}}),Bi("AUDIO_ACTIVE_SPEAKER",Object.values(i))),ws(i)})),unmuteConsentAfterSpotlighted:(e,t)=>ao(e,16135).pipe(Tt(t),At(([e,t])=>{const{payload:{body:{id:r,bLeadershipOn:o}}}=e,{audio:{bCanUnmute:n}}=t,i=gs(t);if(i){const{isHost:e,bCoHost:t,userId:s,audio:a,muted:c}=i,d=e||t;o&&s>>10==r>>10&&(null!==a&&""!==a&&!0!==c||!d&&!n||Bi("AUDIO_UNMUTE_CONSENT",yi.Spotlight))}}),vt($)),unmuteConsentEpic:(e,t)=>ao(e,12037).pipe(Tt(t),At(([,e])=>{const t=gs(e);null!==(null==t?void 0:t.audio)&&""!==(null==t?void 0:t.audio)&&1==(null==t?void 0:t.muted)&&Bi("AUDIO_UNMUTE_CONSENT",yi.Unmute)}),vt($)),setAudioAttributeEpic:(e,t)=>ao(e,7938).pipe(Je(e=>e.payload.body&&["bCanUnmute","bMutedAll","bMutedUponEntry"].some(t=>void 0!==e.payload.body[t])),Sc(e=>{if(void 0!==e.payload.body.bCanUnmute)return Rs(e.payload.body.bCanUnmute);if(void 0!==e.payload.body.bMutedAll){const r=gs(t.value);if(("computer"===(null==r?void 0:r.audio)||"phone"===(null==r?void 0:r.audio))&&0==r.muted)return Ms(e.payload.body.bMutedAll)}return void 0!==e.payload.body.bMutedUponEntry?Vs(e.payload.body.bMutedUponEntry):void 0})),currentUserAudioChangeEpic:(e,t)=>ao(e,7937).pipe(Tt(t),Je(([,e])=>e.socket.zoomSocketStatus===Ts.Connected),bc(([e,t])=>{if(e.payload.body.update&&e.payload.body.update.some(e=>void 0!==e.audio||void 0!==e.muted)){const r=t.meeting.userId,o=e.payload.body.update,[n,i]=Xe(ke(o),e=>e.id===r);i.subscribe(e=>{Bi("AUDIO_PARTICIPANT_AUDIO_UPDATE",e)});const{audio:{isActiveOperation:s,isMutedAll:a},audio:{activeMicrophone:c,activeSpeaker:d,audioSsrc:u}}=t;let l=gs(t);!l&&e.payload.body.add&&e.payload.body.add.length>0&&(l=e.payload.body.add.find(e=>e.id===r),l&&(l.userRole=l.role));const p=ps(l.userRole);return n.pipe(At(e=>{var t,r,o,n;if(e.audio!==(null===(t=l)||void 0===t?void 0:t.audio))if(""===e.audio)Bi("AUDIO_CURRENT_USER_LEAVE_AUDIO");else if("computer"===e.audio)ii.getInstance().joinComputerAudio(u,c,d,!p);else if("phone"===e.audio){var i;"computer"===(null===(i=l)||void 0===i?void 0:i.audio)&&(ii.getInstance().leaveComputerAudio(),bu.joinOrLeaveVoip(!1)),Bi("AUDIO_CURRENT_USER_JOIN_BY_PHONE")}(null===(r=l)||void 0===r?void 0:r.audio)&&""!==(null===(o=l)||void 0===o?void 0:o.audio)&&e.muted!==(null===(n=l)||void 0===n?void 0:n.muted)&&(!0===e.muted?Bi("AUDIO_CURRENT_USER_MUTED",{source:s?"active":a?"passive(mute all)":"passive(mute one)"}):!1===e.muted&&Bi("AUDIO_CURRENT_USER_UNMUTED",{source:s?"active":"passive"}))}),Je(e=>{var t,r;return""!==(null===(t=l)||void 0===t?void 0:t.audio)&&e.muted!==(null===(r=l)||void 0===r?void 0:r.muted)}),vt(se(ks(!1),Ms(!1))))}})),handleDialOutEpic:(e,t)=>ao(e,8198).pipe(Tt(t),Je(([e,t])=>e.payload.seq==t.audio.dialout.sequence),At(([e])=>{const t=e.payload.body.result;Bi("AUDIO_DIALOUT_RESULT_CODE",{code:t}),t===Ei.Success?Bi("AUDIO_DIALOUT_RESULT_SUCCESS"):-1===[Ei.Calling,Ei.Ringing,Ei.Accepted,Ei.Success].indexOf(t)&&Bi("DIALOUT_FAIL")}),Ae(([e])=>Ds(e.payload.body.result))),handleDialouCancelEpic:e=>ao(e,8200).pipe(At(e=>{const t=e.payload.body.result;[0,11].indexOf(t)>-1?Bi("AUDIO_DIALOUT_CANCEL_SUCCESS"):Bi("DIALOUT_CANCEL_FAIL",t)}),Je(e=>0===e.payload.body.result||11===e.payload.body.result),ht(Ds(-1))),handleAllowToTalkEpic:(e,t)=>ao(e,12036).pipe(Tt(t),bc(([e,t])=>{const r=gs(t),{media:{audioEncodeStatus:o},audio:{audioSsrc:n,activeMicrophone:i,activeSpeaker:s}}=t,{promoterID:a,bAllowTalk:c}=e.payload.body;if((null==r?void 0:r.userId)===a){const e=ii.getInstance();if(c){let t=se(!0);return"success"!==o&&(e.enableAudioEncode(),t=Ze(qi("AUDIO_ENCODE_SUCCESS",1).pipe(ht(!0)),qi("AUDIO_ENCODE_FAIL",1).pipe(ht(!1)))),t.pipe(At(t=>{t&&(e.joinComputerAudio(n,i,s,!0),Bi("AUDIO_UNMUTE_CONSENT",yi.AllowToTalk))}),ht(Ps(!0)))}return bu.mute(a,!0),e.leaveComputerAudio(),tt(300).pipe(At(()=>{e.joinComputerAudio(n,i,s,!1)}),ht(Ps(!1)))}})),handleAllowToTalkResponseEpic:e=>ao(e,8205).pipe(At(e=>{Bi("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)}),vt($)),handleAttendeePromoteDepromote:(e,t)=>co(e,"POOL").pipe(Je(e=>e.payload.data.action===Rd.Depromote||e.payload.data.action===Rd.Promote),Tt(t),At(([e,t])=>{const r=gs(t);"phone"===(null==r?void 0:r.audio)?bu.audioDrop(r.userId):"computer"===(null==r?void 0:r.audio)&&(e.payload.data.action,Rd.Promote)}),vt($)),setAudioSSRCEpic:(e,t)=>ao(e,12035).pipe(Tt(t),Ue(([e,t])=>{const{meeting:{currentUserAudioBeforeReset:r},media:{audioDecodeStatus:o,audioEncodeStatus:n}}=t,{payload:{body:{ssrc:i}}}=e;let s=void 0;const a=gs(t);if(a&&"computer"===r&&""===a.audio){const e=ps(a.userRole);s=Eu("audio",e?"success":n,o).pipe(Je(([e,t])=>e&&t),At(()=>{bu.joinOrLeaveVoip(!0)}),ht(Sn(void 0)))}return s?qe(se(Us(i)),s):se(Us(i))})),handleMergeAudioEpic:(e,t)=>ao(e,7952).pipe(bt(e=>qi("AUDIO_CURRENT_USER_JOIN_BY_PHONE",1).pipe(Tt(t),At(([,t])=>{const{BindStatus:r,nOperatorUserId:o}=e.payload.body,n=t.participants.attendeesList.find(e=>e.userId===o);!0===r&&Bi("AUDIO_MERGE_AUDIO_INDICATION",{operatorName:null==n?void 0:n.displayName,operatorUserId:o,operatorRole:null==n?void 0:n.userRole})})))),handleUserGrantAudioCaptureEpic:(e,t)=>lo(e,fi.UserGrantCaptureAudio).pipe(Tt(t),Ue(([,e])=>{Bi("AUDIO_CURRENT_USER_JOIN_BY_VOIP");const t=gs(e),{meeting:{isCurrentUserMutedBeforeReset:r},audio:{bMutedUponEntry:o,isUserGrantCaptureAudio:n}}=e,i=[Ls(!0)];return t&&(!0===t.muted&&bu.mute(t.userId,!0),(!0===r||!n&&!t.isHost&&o)&&(bu.mute(t.userId,!0),r&&i.push(bn(void 0)))),ke(i)})),handleUserForbiddenMicrophoneEpic:e=>lo(e,fi.UserForbiddedCaptureAudio).pipe(At(()=>{Bi("USER_FORBIDDEN_MICROPHONE")}),ht(xs(!0))),handleAudioSocketErrorEpic:e=>lo(e,fi.AudioWebsocketBroken).pipe(At(()=>{Bi("ESTABLISH_AUDIO_STREAM_ERROR")}),vt($)),handleAudioZeroDataEpic:(e,t)=>lo(e,fi.AudioZeroData).pipe(Tt(t),Sc(([,e])=>{const{audio:{webrtcRestartCount:t,activeMicrophone:r}}=e;if(t<3)return ii.getInstance().restoreWebRTC(r),js(t+1)})),handleAutoPlayEpic:(e,t)=>e.pipe(Mt(""+Ws),Je(e=>!1===e.payload),Ue(()=>(Bi("AUDIO_AUTO_PLAY_FAILED"),Ze(Be(document,"click").pipe(ut(1)),Be(document,"touchend").pipe(ut(1))).pipe(Tt(t),At(([,e])=>{const{audio:{audioSsrc:t,activeMicrophone:r,activeSpeaker:o}}=e,n=gs(e),i=ps(n.userRole);ii.getInstance().joinComputerAudio(t,r,o,!i),bu.joinOrLeaveVoip(!0)}),ht(Ws(!0))))))});const Iu={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},Au=Rr({[""+ws]:md((e,{payload:t})=>{e.asnIds=d({},t)}),[""+Rs]:md((e,{payload:t})=>{e.bCanUnmute=t}),[""+Ns]:md((e,{payload:t})=>{const{dialout:r}=e;r.sequence=t}),[""+Ds]:md((e,{payload:t})=>{const{dialout:r}=e;r.returnCode=t}),[""+Ps]:md((e,{payload:t})=>{e.isAllowToTalk=t}),[""+ks]:md((e,{payload:t})=>{e.isActiveOperation=t}),[""+Ms]:md((e,{payload:t})=>{e.isMutedAll=t}),[""+Us]:md((e,{payload:t})=>{e.audioSsrc=t}),[""+Vs]:md((e,{payload:t})=>{e.bMutedUponEntry=t}),[""+Ls]:md((e,{payload:t})=>{e.isUserGrantCaptureAudio=t}),[""+xs]:md((e,{payload:t})=>{e.isMicrophoneForbidden=t}),[""+js]:md((e,{payload:t})=>{e.webrtcRestartCount=t}),[""+Hs]:md((e,{payload:t})=>{e.microphoneDevicesList=t}),[""+Fs]:md((e,{payload:t})=>{e.speakerDevicesList=t}),[""+Gs]:md((e,{payload:t})=>{e.activeMicrophone=t}),[""+Bs]:md((e,{payload:t})=>{e.activeSpeaker=t}),[""+Ws]:md((e,{payload:t})=>{e.canPlayAudio=t}),[""+Ks]:({dialout:{returnCode:e}})=>d(d({},Iu),{},{dialout:d(d({},Iu.dialout),{},{returnCode:e})}),[""+qs]:md((e,{payload:t})=>{e.isComputerAudioLoading=t})},Iu),Ou=so(mu),Cu=e=>4294966272&e,Tu=ri.createAgent(),wu=ii.getInstance();var Ru=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>lo(e,fi.StartVideoCaptureSuccess).pipe(Tt(t),Sc(([,e])=>{const{video:{cameraDevicesList:t,activeCamera:r},meeting:{userId:o}}=e;return t.length<1?(Bi("CAN_NOT_DETECT_CAMERA",{reason:"Cannot detect camera devices"}),void wu.stopCaptureVideo()):"default"===r||t.some(e=>e.deviceId===r)?void Tu.muteAttendeeVideo(o,!1):(Bi("CAN_NOT_FIND_CAMERA",{reason:"cannot find target camera"}),void wu.stopCaptureVideo())})),startVideoResponse:(e,t)=>ao(e,7937).pipe(Tt(t),Je(([e,t])=>{var r,o,n,i;const s=t.meeting.userId;return(null==e||null===(r=e.payload)||void 0===r||null===(o=r.body)||void 0===o||null===(n=o.update)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.id)===s}),Je(([e])=>{var t,r,o,n;return!0===(null==e||null===(t=e.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(o=r.update)||void 0===o||null===(n=o[0])||void 0===n?void 0:n.bVideoOn)}),Sc(()=>(Bi("VIDEO_CAPTURE_START_SUCCESS"),ha(!0)))),handleForbiddenCaptureVideoEpic:e=>lo(e,fi.UserForbiddedCaptureVideo).pipe(At(()=>Bi("VIDEO_USER_FORBIDDEN_CAPTURE")),ht(fa(!0))),handleCameraIsTakenByOtherProgramsEpic:e=>lo(e,fi.UserCameraIsTakenByOtherPrograms).pipe(At(()=>Bi("VIDEO_CAMERA_IS_TAKEN",{reason:"User camera is taken by other programs."})),ht(Sa(!0))),handleVideoSocketErrorEpic:e=>lo(e,fi.VideoWebsocketBroken).pipe(At(()=>{Bi("VIDEO_ESTABLISH_STREAM_ERROR",{reason:"Video websocket broken."})}),vt($)),handleStopVideoCaptureFailedEpic:e=>lo(e,fi.StopVideoCaptureFailed).pipe(At(()=>{Bi("VIDEO_CAPTURE_STOP_RESULT",{failed:!0,reason:"Unknown."})}),vt($)),handleStopVideoCaptureSuccessEpic:(e,t)=>lo(e,fi.StopVideoCaptureSuccess).pipe(Tt(t),Sc(([,e])=>{const{meeting:{userId:t},video:{isCurrentUserStartedVideo:r}}=e;r||Bi("VIDEO_CAPTURE_STOP_RESULT"),Tu.muteAttendeeVideo(t,!0)})),stopVideoResponse:(e,t)=>ao(e,7937).pipe(Tt(t),Je(([e,t])=>{var r,o,n,i;const s=t.meeting.userId;return(null==e||null===(r=e.payload)||void 0===r||null===(o=r.body)||void 0===o||null===(n=o.update)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.id)===s}),Je(([e])=>{var t,r,o,n;return!1===(null==e||null===(t=e.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(o=r.update)||void 0===o||null===(n=o[0])||void 0===n?void 0:n.bVideoOn)}),Sc(()=>(Bi("VIDEO_CAPTURE_STOP_RESULT"),ha(!1)))),receiveVideoMuteIndication:(e,t)=>ao(e,16133).pipe(Tt(t),Je(([e,t])=>{var r,o;return(null==e||null===(r=e.payload)||void 0===r||null===(o=r.body)||void 0===o?void 0:o.id)===t.meeting.userId}),Sc(([e])=>{const{id:t,bVideoMute:r}=e.payload.body;return Bi("RECEIVE_VIDEO_MUTE_INDICATION",{id:t,isVideoMuted:r}),!0===r&&wu.stopCaptureVideo(),!1===r&&Bi("ASK_FOR_START_VIDEO_CONSENT",{id:t,isVideoMuted:r}),Ea(r)})),receiveVideoActiveIndication:e=>ao(e,16129).pipe(Ae(e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,o=Cu(t);return Bi("RECEIVE_VIDEO_ACTIVE_INDICATION",{bVideoOn:r,userId:o}),ua({bVideoOn:r,userId:o})})),receiveVideoSsrcIndication:(e,t)=>ao(e,16131).pipe(Je(e=>void 0!==e.payload.body.ssrc),Tt(t),bt(([e,t])=>{const{meeting:{isCurrentUserStartVideoBeforeReset:r},media:{videoEncodeStatus:o},video:{captureCanvasList:n,activeCamera:i,isVerifiedVideoCaptureCanvasAfterFailover:s}}=t,{payload:{body:{ssrc:a}}}=e;let c=void 0;const d=gs(t);return d&&!0===r&&!0!==d.bVideoOn&&(c=Eu("video",o,"success").pipe(Je(([e,t])=>e&&t),Ue(()=>{const e=[ha(void 0)];return!1===s&&(Array.isArray(n)?n.forEach(e=>{Su(document.querySelector("#"+e))}):Su(document.querySelector("#"+n)),e.push(ma(!0))),ii.getInstance().startCaptureVideo(a,i,640,360),ke(e)}))),c?qe(se(da(a)),c):se(da(a))})),receiveVideoDecodeMaxSizeEpic:e=>lo(e,fi.VideoDecodeMaxSize).pipe(Je(e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data}),bc(e=>{const{size:t}=e.payload.data;return se(va(t))})),spotlightVideoResponseEpic:e=>ao(e,16135).pipe(Ae(e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,o=[];return t&&o.push(Cu(r)),Bi("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:o}),_a(o)})),handleGroupLayoutIndicationEpic:(e,t)=>ao(e,7958).pipe(Tt(t),Ae(([e,t])=>{const{payload:{body:r}}=e;let o=[];r&&r.group_list&&r.group_list[0]&&(o=r.group_list[0].map(e=>e.id));const n=As(t);return o=o.filter(e=>n.findIndex(t=>t.userId===e)>=0),Bi("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:o}),_a(o)})),handleCurrentVideoResolution:e=>lo(e,fi.CurrentVideoResolution).pipe(Sc(e=>(Bi("VIDEO_RENDER_START_SUCCESS"),Bi("RECEIVE_VIDEO_DIMENSION_CHANGE",e.payload.data),Aa(e.payload.data)))),handleMeetingVideoAttributeEpic:e=>ao(e,7938).pipe(Je(e=>{const{payload:{body:t}}=e;return void 0!==(null==t?void 0:t.bFollowHostVideo)||void 0!==(null==t?void 0:t.VideoHd)}),Ae(e=>{const{payload:{body:{bFollowHostVideo:t,VideoHd:r}}}=e;return void 0!==t?(Bi("VIDEO_FOLLOW_HOST_ORDER_CHANGE",{bOn:t}),Ta(t)):Da(1===r)})),handleHostDragLayoutIndicationEpic:(e,t)=>ao(e,7957).pipe(Tt(t),Ae(([e,t])=>{const{video:{isFollowHostVideoLayout:r}}=t,{payload:{body:o}}=e,n=o&&o.drag_list&&o.drag_list.map(e=>e.id);return r&&Bi("VIDEO_HOST_DRAG_LAYOUT_CHANGE",{layout:n}),wa(n)})),handlePeerVideoStateChangeEpic:(e,t)=>ao(e,7937).pipe(Tt(t),Je(([e,t])=>{const{meeting:{userId:r},video:{subscribedVideoList:o}}=t,n=e.payload.body.update,i=e.payload.body.remove;return n&&n.length>0&&n.findIndex(e=>e.id!==r&&(void 0!==e.bVideoOn||e.bHold))>-1||i&&i.some(e=>o.includes(e.id))}),At(([e,t])=>{const{payload:{body:{remove:r,update:o}}}=e,{video:{subscribedVideoList:n}}=t,i=Is(t);if(r&&r.length>0&&r.filter(e=>n.includes(e.id)).forEach(e=>{Bi("VIDEO_OLD_USER_STOP",{userId:e.id})}),o&&o.length>0){const e=o.filter(e=>void 0!==e.bVideoOn).filter(e=>-1===i.findIndex(t=>t.userId===e.id)),t=o.filter(e=>!0===e.bHold);t.length>0&&t.filter(e=>n.includes(e.id)).forEach(e=>{Bi("VIDEO_OLD_USER_STOP",{userId:e.id})}),e.forEach(e=>{e.bVideoOn?Bi("VIDEO_NEW_USER_START",{userId:e.id}):Bi("VIDEO_OLD_USER_STOP",{userId:e.id})})}}),vt($))});const Nu={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},Du=Rr({[""+da]:md((e,{payload:t})=>{e.videoSsrc=t}),[""+la]:md((e,{payload:t})=>{e.cameraDevicesList=t}),[""+pa]:md((e,{payload:t})=>{e.activeCamera=t}),[""+ua]:md((e,{payload:t})=>{e.activeVideoId=t.userId}),[""+ha]:md((e,{payload:t})=>{e.isCurrentUserStartedVideo=t}),[""+_a]:md((e,{payload:t})=>{e.spotlightUserList=t}),[""+fa]:md((e,{payload:t})=>{e.isCaptureForbidden=t}),[""+va]:md((e,{payload:t})=>{e.receivedVideoMaxQuality=t}),[""+ya]:md((e,{payload:t})=>{let r=t;Array.isArray(t)||(r=[t]),e.captureCanvasList=r}),[""+Ea]:md((e,{payload:t})=>{e.isVideoMuted=t}),[""+ga]:md((e,{payload:t})=>{e.isCaptureCameraLoading=t}),[""+Sa]:md((e,{payload:t})=>{e.isCameraTaken=t}),[""+ma]:md((e,{payload:t})=>{e.isVerifiedVideoCaptureCanvasAfterFailover=t}),[""+ba]:md((e,{payload:t})=>{e.isVerifiedVideoRenderCanvasAfterFailover=t}),[""+Aa]:md((e,{payload:t})=>{e.receivedVideoDimension=t}),[""+Oa]:md((e,{payload:t})=>{e.subscribedVideoList.includes(t)||e.subscribedVideoList.push(t)}),[""+Ca]:md((e,{payload:t})=>{const r=e.subscribedVideoList.indexOf(t);r>=0&&e.subscribedVideoList.splice(r,1)}),[""+Ra]:md((e,{payload:t})=>{-1===e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key&&e.canvasId===t.canvasId)&&e.renderedVideoList.push(d({},t))}),[""+Na]:md((e,{payload:t})=>{const r=e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key&&e.canvasId===t.canvasId);r>=0&&e.renderedVideoList.splice(r,1)}),[""+Ta]:md((e,{payload:t})=>{e.isFollowHostVideoLayout=t}),[""+wa]:md((e,{payload:t})=>{e.hostDragLayout=t}),[""+Da]:md((e,{payload:t})=>{e.isSupportHDVideo=t}),[""+Pa]:md((e,{payload:t})=>{e.highDefinitionVideoId=t}),[""+Ia]:e=>d(d({},Nu),{},{captureCanvasList:e.captureCanvasList,activeCamera:e.activeCamera,isVerifiedVideoCaptureCanvasAfterFailover:!1,isVerifiedVideoRenderCanvasAfterFailover:!1})},Nu),Pu=so(Ru),{InitSuccessVideo:Mu,InitSuccessAudio:ku,InitSuccessSharing:Uu,InitFailedVideo:Vu,InitFailedAudio:Lu,InitFailedSharing:xu}=fi;let ju;const Hu=new z(io(tu,uu,fu,so(Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(Mt(""+Jr),Tt(t),Je(([,e])=>void 0!==e.media.assetsPath&&void 0!==e.media.mediaConstraints),At(([,e])=>{const{media:{assetsPath:r,mediaConstraints:o},meeting:{enableQos:n}}=e;ju=ii.getInstance(),r&&o&&ju.setAssetsAndConstraint(r,o);const i=gs(e);let s;s=i?se(i):qi("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1).pipe(ue(ge),Tt(t),Ae(([,e])=>gs(e))),s.pipe(Tt(t)).subscribe(([e,t])=>{const{meeting:{svcUrl:r,meetingNumber:o,conId:i,e2eEncrypt:s,userId:a,isWebinar:c}}=t;var d;e&&(null===(d=ju)||void 0===d||d.connect({svcUrl:r,meetingNumber:o,conId:i,e2eEncrypt:s,isViewOnly:ps(e.userRole),currentUserId:a,isWebinar:c,enableQos:n}))})}),bt(()=>We(e=>{var t;return null===(t=ju)||void 0===t?void 0:t.registerCallback(e)},e=>{var t;return null===(t=ju)||void 0===t?void 0:t.unregisterCallback(e)},(e,t)=>({type:e,data:t})).pipe(Ae(e=>Qr(e))))),connectedMediaStreamEpic:e=>lo(e,[Mu,ku,Uu,Vu,Lu,xu]).pipe(bc(e=>{const{payload:{type:t,data:r}}=e;if(t===ku||t===Lu){if(r===vi.EncodeSuccess)return Bi("AUDIO_ENCODE_SUCCESS"),se(Yr("success"));if(r===vi.DecodeSuccess)return Bi("AUDIO_DECODE_SUCCESS"),se(Xr("success"));if(r===vi.EncodeFailed)return Bi("AUDIO_ENCODE_FAIL"),se(Yr("failed"));if(r===vi.DecodeFailed)return Bi("AUDIO_DECODE_FAIL"),se(Xr("failed"))}else if(t===Mu||t===Vu){if(r===vi.EncodeSuccess)return Bi("VIDEO_ENCODE_SUCCESS"),se(Zr("success"));if(r===vi.DecodeSuccess)return Bi("VIDEO_DECODE_SUCCESS"),se($r("success"));if(r===vi.EncodeFailed)return Bi("VIDEO_ENCODE_FAIL"),se(Zr("failed"));if(r===vi.DecodeFailed)return Bi("VIDEO_DECODE_FAIL"),se($r("failed"))}else if(t===Uu||t===xu){if(r===vi.EncodeSuccess)return Bi("SHARING_ENCODE_SUCCESS"),se(eo("success"));if(r===vi.DecodeSuccess)return Bi("SHARING_DECODE_SUCCESS"),se(to("success"));if(r===vi.EncodeFailed)return Bi("SHARING_ENCODE_FAIL"),se(eo("failed"));if(r===vi.DecodeFailed)return Bi("SHARING_DECODE_FAIL"),se(to("failed"));if(t===Uu&&void 0===r)return Bi("SHARING_DECODE_SUCCESS"),se(to("success"))}})),mediaDeviceUpdateEpic:(e,t)=>lo(e,[Mu,ku]).pipe(mc(()=>{if("object"==typeof navigator.mediaDevices)return qe(gu(),qe(lo(e,fi.StartVideoCaptureSuccess),Be(navigator.mediaDevices,"devicechange"),lo(e,fi.UserGrantCaptureAudio)).pipe(Ue(()=>gu().pipe(At(()=>{Bi("MEDIA_DEVICE_CHANGE")}))))).pipe(Tt(t),Ue(([e,t])=>{const r=[Hs(e.microphones),Fs(e.speakers),la(e.cameras)];if(t.audio){const{audio:{activeMicrophone:i,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:c}}=t,{microphones:d,speakers:u}=e,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,n;l.length>0&&l[0].deviceId===i&&(null===(o=ju)||void 0===o||o.changeMicrophone("default"),r.push(Gs("default"))),p.length>0&&p[0].deviceId===s&&(null===(n=ju)||void 0===n||n.changeSpeaker("default"),r.push(Bs("default")))}return ke(r)}))})),sendUserNodeListToMediaSDKEpic:e=>ao(e,7937).pipe(At(e=>{const{payload:{body:t}}=e,r=ii.getInstance();t.add&&r.sendUserNodeList(t.add.map(e=>({userid:e.id,sn:e.zoomID&&Yo(e.zoomID)}))),t.remove&&r.sendUserNodeList(t.remove.map(e=>({userid:e.id,bremove:!0})))}),vt($)),handleMediaSdkGcmIVResponseEpic:e=>lo(e,fi.AesGcmIvResponse).pipe(At(e=>{const{payload:{data:{workerType:t,iv:r}}}=e,o=kn.get(Jn.WebclientIVState);if(o){const e=d(d({},o),{},{[t]:r});kn.set(Jn.WebclientIVState,e,Pn.SessionStorage)}}),vt($))})))),Fu=(e,t,r)=>Hu.pipe(Ue(o=>o(e,t,r))),Gu={meeting:eu,socket:du,participants:_u,media:yu},Bu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Z.constructor,r=new t(Z.SchedulerAction),o=new K,n=void 0,i=function(t){n=t;var i=(new K).pipe(ue(r)),s=(new K).pipe(ue(r)),a=new Ut(i),c=new Vt(s,n.getState());return o.pipe(Ae((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})),Ue((function(e){return ke(e).pipe(gt(r),ue(r))}))).subscribe(n.dispatch),function(e){return function(t){var r=e(t);return s.next(n.getState()),i.next(t),r}}};return i.run=function(e){o.next(e)},i}(),Wu=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||S;function Ku(e){return function(e){for(var t=Object.keys(e),r={},o=0;oe.userId===t);if(n.findIndex(e=>e===tl.Attendee)>-1&&(i=ms(r).find(e=>e.userId===t)),!i)return Promise.reject({type:Ui,reason:"no matching user"});{const{meeting:{userId:e}}=o.getState();for(let r=0;r{if(this[Qu][e]&&void 0===n.getState()[e]){const{epic:t,reducer:r,Client:o}=this[Qu][e];n.injectReducer(e,r),n.injectEpic(t);const i=new o(n);this.modules.set(e,i)}}),(null==o?void 0:o.audio)&&void 0===n.getState().audio&&(n.injectReducer("audio",Au),n.injectEpic(Ou)),(null==o?void 0:o.video)&&void 0===n.getState().video&&(n.injectReducer("video",Du),n.injectEpic(Pu)),(null==o?void 0:o.screen)&&void 0===n.getState().share&&(n.injectReducer("share",Ad),n.injectEpic(Od))}return o(cn({apiKey:e,signature:t,language:s})),o(ro({mediaConstraints:r&&r.constraints||{},assetsPath:i})),new Promise((e,t)=>{Tn(c,()=>{e("")},()=>{t({type:Ui,reason:"depedent assets are not accessible"})})})}on(e,t){((e,t)=>{const r=xi[e];if(r){const o=Fi.get(e);if(o)o.push(t),Fi.set(e,o);else{const o=[t];Fi.set(e,o);const n=qe(...r.map(e=>{const{event:t,payload:r}=e;return Be(ji,t).pipe(Ae(e=>r(e)),ue(ge))})).subscribe(t=>{const r=Fi.get(e);r&&r.forEach(e=>{e(t)})});Gi.push(n)}}})(e,t)}off(e,t){((e,t)=>{if(xi[e]){const r=Fi.get(e);if(Array.isArray(r)){const o=r.findIndex(e=>e===t);o>-1&&(r.splice(o,1),Fi.set(e,r))}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[zu]:e,[Ju]:t}=this;return"connected"===e().socket.zoomSocketStatus&&t(on()),Promise.resolve("")}end(){const{[zu]:e,[Ju]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(nn()),tt(500).pipe(At(()=>{zi()}),ht("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[qu].getState(),{meeting:{bAllowAttendeeRename:o}}=r,n=gs(r),i=ps(n.userRole),s=Ss(r);if(i)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"});if(t&&t!==(null==n?void 0:n.userId)){if(s){const{participants:{attendeesList:o}}=r,n=o.find(e=>e.userId===t);if(n)return cl.rename(t,zo(e),zo(n.displayName)),gc(t,t=>t.displayName===e);{const o=ms(r).find(e=>e.userId===t);return o?(kd.getInstance().rename(o.jid,e),Ki("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",t=>{const r=t.find(e=>e.jid===o.jid);return r&&r.name===e})):Promise.reject({type:Ui,reason:"no matching user"})}}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})}return e===n.displayName?Promise.resolve():s||o?(cl.rename(n.userId,zo(e),zo(n.displayName)),Ki("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t=>t.displayName===e)):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host disallow rename themselves"})}makeHost(e){return cl.assignHost(e,!1),gc(e,e=>!0===e.isHost)}makeCoHost(e){const t=this[qu].getState(),r=As(t).find(t=>t.userId===e);return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:Ui,reason:`user:[${e}] is already co-host `}):(cl.assignHost(e,!0),gc(e,e=>!0===e.bCoHost))}revokeCoHost(e){const t=this[qu].getState(),r=As(t).find(t=>t.userId===e);return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:Ui,reason:`user:[${e}] is not a co-host`}):(cl.revokeCoHost(e),gc(e,e=>!1===e.bCoHost))}isHost(){const e=this[qu].getState(),t=gs(e);return!!t&&t.isHost}isCoHost(){const e=this[qu].getState(),t=gs(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[zu]();return e}getCurrentUserInfo(){const e=this[qu].getState(),t=gs(e);if(t){const r={userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:us(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,sharePause:t.sharerPause,feedback:t.feedback};if(e.meeting.isWebinar&&ps(t.userRole)){const{participants:{allowTalkAttendeesList:o}}=e,n=o.find(e=>e.userId===t.userId),i=!!n;Object.assign(r,{isAllowToTalk:i}),n&&Object.assign(r,{audio:n.audio,muted:n.muted})}return r}return null}getParticipantsList(){const e=this[qu].getState(),{meeting:{meetingStatus:t}}=e,r=gs(e);return"joined"===t&&r&&!r.bHold?As(e).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,isPhoneUser:us(e.userType),bRaiseHand:e.bRaiseHand,bHold:e.bHold,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause,feedback:e.feedback})):[]}getMeetingHost(){const e=this[zu](),t=Os(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:us(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:o,userName:n,userEmail:i,meetingTopic:s,encType:a,region:c,network:d,topic:u,zlkJwtToken:l,userId:p}}=this[zu](),h="joined"===e&&!t;if(l)return{topic:u,password:o,userName:n,isInMeeting:h,userId:p};{let e="";return 0===a?e="None":1===a?e="AES ECB":2===a&&(e="AES GCM"),{meetingNumber:r,password:o,userName:n,userEmail:i,meetingTopic:s,encryptionType:e,region:c,network:d,isInMeeting:h,userId:p}}}}).prototype,"end",[$u,Xu],Object.getOwnPropertyDescriptor(al.prototype,"end"),al.prototype),u(al.prototype,"changeName",[Xu],Object.getOwnPropertyDescriptor(al.prototype,"changeName"),al.prototype),u(al.prototype,"makeHost",[nl,$u,Xu],Object.getOwnPropertyDescriptor(al.prototype,"makeHost"),al.prototype),u(al.prototype,"makeCoHost",[il,$u,Xu],Object.getOwnPropertyDescriptor(al.prototype,"makeCoHost"),al.prototype),u(al.prototype,"revokeCoHost",[sl,$u,Xu],Object.getOwnPropertyDescriptor(al.prototype,"revokeCoHost"),al.prototype),al);!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"}(dl||(dl={})),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"}(ul||(ul={})),function(e){e[e.None=0]="None",e[e.Delete=1]="Delete",e[e.Modify=2]="Modify"}(ll||(ll={})),function(e){e[e.Success=0]="Success",e[e.Delete=1]="Delete",e[e.Block=3]="Block"}(pl||(pl={}));const _l=[dl.All,dl.Host,dl.NoOne,dl.EveryonePublicly],fl=[dl.NoAttendee,dl.All,dl.AllPanelist],vl={userId:ul.All,displayName:"Everyone",isHost:!1,isCoHost:!1},yl={userId:ul.Panelist,displayName:"All panelists"},El={userId:ul.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};var gl=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>co(e,"Message").pipe(Tt(t),Ue(([e,t])=>{const{payload:{data:{sn:r,senderName:o,senderJid:n,receiver:i,text:s,type:a}}}=e,c=gs(t),d=ms(t),{meeting:{jid:u,userId:l},participants:{xmppAttendeeList:p}}=t;return $n.beginDecrypt({decryptedText:s,type:zn.XMPP_CHAT,zoomId:r}).then(({message:e})=>{var t;let r=null,s=0,h="";c&&ps(c.userRole)&&u===i?(r=p.find(e=>e.jid===n),s=l,h=c.displayName):a===ul.Panelist&&(r=d.find(e=>e.jid===n),s=ul.Panelist,h=yl.displayName);const _={message:e,sender:{name:o,userId:(null===(t=r)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:h,userId:s},timestamp:(new Date).getTime()};return Bi("CHAT_RECEIVE_MESSAGE_EVENTS",_),ja(_)})})),receiveChatMessageFromRWGEpic:(e,t)=>ao(e,7944).pipe(Tt(t),Ue(([e,t])=>{const{meeting:{bIbDisableChat:r,isWebinar:o},participants:{attendeesList:n}}=t,{payload:{body:{attendeeNodeID:i,sn:s,destNodeID:a,text:c,senderName:d,msgID:u}}}=e,l=gs(t),p=ms(t);if(l){const e=ps(null==l?void 0:l.userRole)&&i===l.userId&&!u;if(!r&&!e){let e,t=s;if(!s){const e=n.find(e=>e.userId===a);e&&(t=e.zoomID)}if(i===ul.SilentModeUsers){const t=Jo(c),r={id:u,message:t,sender:{name:"Host",userId:a},receiver:{name:"Everyone (in Waiting Room)",userId:i},timestamp:(new Date).getTime()};e=Promise.resolve(r)}else e=$n.beginDecrypt({decryptedText:c,zoomId:t,type:zn.RWG_CHAT}).then(({message:e})=>{const t=n.find(e=>e.userId===a),r=d?Jo(d):null==t?void 0:t.displayName;let s="";if(i===ul.All)s=o?"All panelists and attendees":"Everyone";else if(i===ul.Panelist)s="All panelists";else if(o&&p.findIndex(e=>e.userId===i)>-1)s=p.find(e=>e.userId===i).displayName;else{const e=n.find(e=>e.userId===i);e&&(s=e.displayName)}return{id:u,message:e,sender:{name:r,userId:a,avatar:null==t?void 0:t.avatar},receiver:{name:s,userId:i},timestamp:(new Date).getTime()}});return e.then(e=>(Bi("CHAT_RECEIVE_MESSAGE_EVENTS",e),ja(e)))}}return $})),changePrivilegeResponse:(e,t)=>ao(e,7938).pipe(Je(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)}),Tt(t),Ae(([e,t])=>{const{payload:{body:{chatPriviledge:r,bAllowAttendeeChat:o}}}=e,{chat:{chatPrivilege:n}}=t;return void 0!==o?(Bi("CHAT_PRIVILEGE_CHANGE",!0===o?{chatPrivilege:n}:{chatPrivilege:dl.NoAttendee}),Fa(o)):(Bi("CHAT_PRIVILEGE_CHANGE",{chatPrivilege:r}),xa(r))})),chatResponseEpic:(e,t)=>ao(e,4136).pipe(Tt(t),Ue(([e,t])=>{const{payload:{body:{result:r,destNodeID:o,msgID:n}}}=e,{meeting:{userId:i}}=t;return r===pl.Success?(Bi("CHAT_MESSAGE_RESPONSE",{msgId:n,receiverId:o}),se(Ga({destNodeID:o,msgID:n,userId:i}))):r===pl.Delete||r===pl.Block?se(Ba({msgId:n})):$})),chatCmdResponseEpic:e=>ao(e,4238).pipe(Ue(e=>{const{payload:{body:{bSuccess:t,cmd:r,msgID:o}}}=e,n=[];if(t)switch(r){case ll.Delete:n.push(Ba({msgId:o})),Bi("CHAT_DELETE_MESSAGE_REPONSE",{id:o})}return ke(n)})),chatCmdIndicationEpic:e=>ao(e,7960).pipe(Ue(e=>{const{payload:{body:{cmd:t,msgID:r}}}=e,o=[];switch(t){case ll.Delete:o.push(Ba({msgId:r})),Bi("CHAT_DELETE_MESSAGE_REPONSE",{id:r})}return ke(o)}))});const Sl={chatHistory:[],chatPrivilege:dl.All,isAllowAttendeeChat:!0},bl=Rr({[""+ja]:md((e,{payload:t})=>{e.chatHistory.push(t)}),[""+xa]:md((e,{payload:t})=>{e.chatPrivilege=t}),[""+Fa]:md((e,{payload:t})=>{e.isAllowAttendeeChat=t}),[""+Ga]:md((e,{payload:t})=>{const{destNodeID:r,msgID:o,userId:n}=t;for(let t=e.chatHistory.length-1;t>=0;t--){const i=e.chatHistory[t];if(!i.id&&i.sender.userId===n&&[ul.All,ul.Panelist,r].includes(i.receiver.userId)){i.id=o;break}}}),[""+Ba]:md((e,{payload:t})=>{const{msgId:r}=t,o=e.chatHistory.findIndex(e=>e.id===r);o>=0&&e.chatHistory.splice(o,1)}),[""+Ha]:()=>d({},Sl)},Sl);function ml(e,t,r){if(null==r?void 0:r.host)return[Os(e),...Cs(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 o=[Os(e),...Cs(e),...e.participants.attendeesList.filter(e=>!(e.bCoHost||e.isHost))];if(null==r?void 0:r.includeAttendee){const t=ms(e).filter(e=>!us(e.userType));o=[...o,...t]}return o.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 Il;const Al=ri.createAgent(),Ol=kd.getInstance(),Cl=e=>{const{text:t,destId:r,sn:o,attendeeId:n}=e;return $n.beginEncrypt({text:t,type:zn.RWG_CHAT}).then(e=>{Al.chat(e,r,o,n)})};let Tl=(u((Il=class extends ol{send(e,t){if(!e)return Promise.reject({type:Ui,reason:"Text is empty"});const{[zu]:r,[Ju]:o}=this,n=r(),i=gs(n),s=function(e,t){if(t===ul.All)return vl;if(t===ul.Panelist)return yl;if(t===ul.SilentModeUsers)return El;{const{meeting:{isWebinar:r},participants:{xmppAttendeeList:o,attendeesList:n}}=e;return r?n.find(e=>e.userId===t)||o.find(e=>e.userId===t):n.find(e=>e.userId===t)}}(n,t),a=((e,t,r)=>{const o=null==t?void 0:t.userId;if(!(null==e?void 0:e.zoomID)||!(null==t?void 0:t.displayName)||o===e.userId)return{type:Ui,reason:"invalid target user"};const{chat:{chatPrivilege:n},meeting:{isWebinar:i}}=r,s=Ss(r),a=t.isHost||t.bCoHost;if(!s)if(i&&ps(e.userRole)){if(n===dl.NoAttendee||n===dl.AllPanelist&&o!==ul.Panelist||n===dl.All&&o!==ul.All&&o!==ul.Panelist)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"}}else if(n===dl.NoAttendee||n===dl.Host&&!a||o===ul.SilentModeUsers||n===dl.EveryonePublicly&&o!==ul.All&&!a)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"};return null})(i,s,n);if(a)return Promise.reject(a);const{meeting:{isWebinar:c,encType:u}}=n,l=u===qn.AES_GCM;let p=Promise.resolve(),h=!1;return t===ul.SilentModeUsers?Al.chat(zo(e),t):c?s.userRole===cs.Attendee?8==(8&s.clientCap)?p=Cl({text:e,destId:ul.IndividualCcPanelist,sn:null==i?void 0:i.zoomID,attendeeId:t}):(p=Cl({text:e,destId:ul.Panelist,sn:null==i?void 0:i.zoomID,attendeeId:t}).then(()=>(e=>{const{text:t,jid:r,isGCMEnabled:o}=e;return $n.beginEncrypt({text:t,type:zn.XMPP_CHAT}).then(e=>{Ol.sendWebinarMsg(e,r,ul.IndividualCcPanelist,o)})})({text:e,jid:s.jid,isGCMEnabled:l})),h=!0):s&&(p=Cl({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID})):p=Cl({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID}),p.then(()=>{const r={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:(new Date).getTime()};return o(ja(r)),h?(Bi("CHAT_RECEIVE_MESSAGE_EVENTS",r),r):Ki("CHAT_MESSAGE_RESPONSE",e=>({ret:[e.receiverId,ul.All,ul.Panelist].includes(t)||e.receiverId===ul.IndividualCcPanelist?0:-1,body:e})).then(e=>{const{msgId:t}=e,o=d({id:t},r);return Bi("CHAT_RECEIVE_MESSAGE_EVENTS",o),o})})}setPrivilege(e){const t=this[zu](),{meeting:{isWebinar:r},chat:{chatPrivilege:o}}=t;return o===e?Promise.resolve(""):!r&&!_l.includes(e)||r&&!fl.includes(e)?Promise.reject({type:Ui,reason:"invalid privilege value of parameter"}):(Al.setChatPriviledge(e),Ki("CHAT_PRIVILEGE_CHANGE",t=>t.chatPrivilege===e))}deleteMessage(e){const t=this[zu](),{chat:{chatHistory:r},meeting:{meetingOptions:o,userId:n}}=t;if(null==o?void 0:o.isEnableDeleteChatMsg){const o=Ss(t),i=r.find(t=>t.id===e);if(i){const{sender:t}=i;if(o)Al.chatCmdReq(e,ll.Delete);else{if(t.userId!==n)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"can not delete message"});Al.chatCmdReq(e,ll.Delete)}return Ki("CHAT_DELETE_MESSAGE_REPONSE",t=>t.id===e).then(()=>({id:e}))}return Promise.reject({type:Ui,reason:"msgId is wrong"})}return Promise.reject({type:ki,reason:"can not delete messages"})}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[zu]();return t?e:dl.NoAttendee}getReceivers(){const e=this[zu](),{chat:{chatPrivilege:t,isAllowAttendeeChat:r},meeting:{isWebinar:o}}=e;if(!r)return[];const n=gs(e);if(n)if(o){if(!ps(n.userRole)){const t=ml(e,n.userId,{includeAttendee:!0});return[yl,vl,...t]}if(t===dl.All)return[yl,vl];if(t===dl.AllPanelist)return[yl];if(t===dl.NoAttendee)return[]}else{const r=Ss(e);if(t===dl.All||r){const t=ml(e,n.userId);return[vl,...t]}if(t===dl.Host)return ml(e,n.userId,{host:!0});if(t===dl.EveryonePublicly){const t=ml(e,n.userId,{host:!0});return[vl,...t]}if(t===dl.NoOne)return[]}return[]}getHistory(){return this[zu]().chat.chatHistory.map(e=>d({},e))}isAllowToDeleteMessages(){const e=this[zu](),{meeting:{meetingOptions:t}}=e;return null==t?void 0:t.isEnableDeleteChatMsg}}).prototype,"send",[Xu],Object.getOwnPropertyDescriptor(Il.prototype,"send"),Il.prototype),u(Il.prototype,"setPrivilege",[Zu,Xu],Object.getOwnPropertyDescriptor(Il.prototype,"setPrivilege"),Il.prototype),u(Il.prototype,"deleteMessage",[Xu],Object.getOwnPropertyDescriptor(Il.prototype,"deleteMessage"),Il.prototype),Il);const wl=so(gl),Rl=(e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,i=r(),{meeting:{bIbDisableShare:s},share:{sharePrivilege:a,ssrc:c,isChromeExtensionInstalled:u,isVerifiedCaptureCanvasAfterFailover:l},media:{sharingEncodeStatus:p}}=i;if(s)return Promise.reject({type:ki,reason:"information barrier"});const h=Ss(i),_=Cc(i);if(a===exports.SharePrivilege.OnlyHost&&!h)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can start screen share"});if(a===exports.SharePrivilege.HostGrab&&!h&&_.length>0)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can grab screen share"});const f=gs(i);if(!0===(null==f?void 0:f.sharerOn))return Promise.reject({type:ki,reason:"you have already started screen share."});let v=se(!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&&!u&&(n.checkChromeSharingExtension(),v=qi("SHARE_CHECK_CHROME_SHARING_EXTENSION",1)),t.id||(t.id="__ZOOM_SDK_SHARE_CANVAS_@__".replace("@",""+Math.floor(1e4*Math.random()))),Fe([Eu("sharing",p,"success"),v]).subscribe(([e,r])=>{const[i]=e;if(i&&r){!1===l&&(Su(t),o(sa(!0)));let e=document.querySelector("#__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)),n.startDesktopSharing(c,t.id,"__ZOOM_SDK_SHARING_VIDEO__")}}),new Promise((e,t)=>{Ze(qi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1),qi("SHARE_CHECK_CHROME_SHARING_EXTENSION").pipe(Je(e=>!e),ut(1),vt(ae({reason:"required extension",extensionUrl:"https://chrome.google.com/webstore/detail/zoom-scheduler/kgjfgplpablkjnlkjmjdecgdpfankdle"}))),qi("SHARE_START_DESKTOP_SHARE_FAILED",1).pipe(vt(ae({reason:"user deny screen share"})))).subscribe(r=>{!0===r.sharerOn?e(""):t({type:"INTERNAL_ERROR"})},e=>{t(d({type:ki},e))})})},Nl=is([As],e=>e.filter(e=>e.bVideoOn));var Dl,Pl,Ml,kl,Ul,Vl,Ll,xl,jl,Hl,Fl,Gl,Bl,Wl,Kl,ql,zl,Jl,Ql,Yl,Xl,Zl,$l,ep;let tp=(Dl=el("audio"),Pl=el("audio"),Ml=el("audio"),kl=el("audio"),Ul=el("audio"),Vl=el("audio"),Ll=el("video"),xl=el("video"),jl=el("video"),Hl=el("video"),Fl=el("video"),Gl=el("video"),Bl=el("video"),Wl=el("video"),Kl=el("share"),ql=el("share"),zl=el("share"),Jl=el("share"),Ql=el("share"),Yl=el("share"),Xl=el("share"),Zl=el("share"),rp="isShareOptionLocked",$l=function(e,t,r){const o=r.value;r.value=function(...e){const t=this[qu];if(t){const{meeting:{meetingOptions:e}}=t.getState();if(!0===e[rp])return Promise.reject({type:"OPERATION_LOCKED",reason:rp+" is locked"})}return o.apply(this,e)}},u((ep=class extends ol{constructor(e){super(e),this[qu].dispatch(Jr()),this[Yu]={store:e,mediaAgent:ii.getInstance(),rwgAgent:ri.createAgent()}}startAudio(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:o}=e,n=t(),i=gs(n);if("computer"===(null==i?void 0:i.audio))return Promise.resolve();if("phone"===(null==i?void 0:i.audio))return Promise.reject({type:ki,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:t,canPlayAudio:s},media:{audioDecodeStatus:a,audioEncodeStatus:c}}=n;if(t)return Promise.reject({type:ki,reason:"Computer audio has been loading, please wait."});if(i){r(qs(!0));const{userRole:t}=i,n=ps(t);Eu("audio",n&&!e?"success":c,a).subscribe(([e,t])=>{if(e&&t){let e=s?Promise.resolve():function(){const e=document.createElement("audio");return e.muted=!1,e.volume=.1,e.src=URL.createObjectURL(gi),e.play()}();void 0===e&&(e=Promise.resolve()),e.then(()=>{o.joinOrLeaveVoip(!0)}).catch(()=>{r(Ws(!1))})}})}return"failed"===c||"failed"===a?(r(qs(!1)),Promise.reject({type:"INTERNAL_ERROR",reason:"audio encode or decode error"})):new Promise((e,t)=>{Ze(qi(Ni.JoinComputerAudio.success,1),qe(...Ni.JoinComputerAudio.fail.map(e=>qi(e,1).pipe(Ue(()=>ae({type:"INSUFFICIENT_PRIVILEGES",reason:e}))))),tt(3e4).pipe(Ue(()=>ae({type:"OPERATION_TIMEOUT"})))).subscribe(()=>{r(qs(!1)),e("")},e=>{o.joinOrLeaveVoip(!1),r(qs(!1)),t(e)})})}})(this[Yu])}stopAudio(){return(e=>{const{store:{getState:t,dispatch:r},mediaAgent:o,rwgAgent:n}=e,i=t(),{audio:{isComputerAudioLoading:s}}=i,a=gs(i);return s?Promise.reject({type:ki,reason:"Computer audio has not finished joining, please wait."}):"computer"===(null==a?void 0:a.audio)?(o.leaveComputerAudio(),n.joinOrLeaveVoip(!1),r(js(0)),Ki("AUDIO_CURRENT_USER_LEAVE_AUDIO")):Promise.resolve("")})(this[Yu])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:o},rwgAgent:n,mediaAgent:i}=e,s=r(),a=gs(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:ki,reason:"no audio joined"}):!0===(null==a?void 0:a.muted)?Promise.resolve(""):(o(ks(!0)),n.mute(a.userId,!0),Ki("AUDIO_CURRENT_USER_MUTED").then(()=>(i.muteAudio(),"")));if(Ss(s)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=s,o=e.concat(r).find(e=>e.userId===t);return o?""===o.audio||null===o?Promise.reject({type:ki,reason:"no audio joined"}):!1===o.muted?(n.mute(t,!0),Ki("AUDIO_PARTICIPANT_AUDIO_UPDATE",e=>e.id===t&&1==e.muted)):Promise.resolve(""):Promise.reject({type:Ui,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[Yu],e)}unmuteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:o},rwgAgent:n,mediaAgent:i}=e,s=r(),a=gs(s);if(void 0===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:ki,reason:"no audio joined"}):!1===(null==a?void 0:a.muted)?Promise.resolve(""):(o(ks(!0)),s.audio.bCanUnmute?(n.mute(a.userId,!1),Ki("AUDIO_CURRENT_USER_UNMUTED").then(()=>(i.unmuteAudio(),""))):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host not allow unmute themselves"}));if(Ss(s)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=s,o=e.concat(r).find(e=>e.userId===t);return o?""===o.audio||null===o?Promise.reject({type:ki,reason:"no audio joined"}):(!0===o.muted&&n.mute(t,!1),Promise.resolve("")):Promise.reject({type:Ui,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[Yu],e)}switchMicrophone(e){return((e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,{audio:{microphoneDevicesList:i,activeMicrophone:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(n.changeMicrophone(t),o(Gs(t))),Promise.resolve(""))})(this[Yu],e)}switchSpeaker(e){return((e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,{audio:{speakerDevicesList:i,activeSpeaker:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(n.changeSpeaker(t),o(Bs(t))),Promise.resolve(""))})(this[Yu],e)}getMicList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.microphoneDevicesList]:[]})(this[Yu])}getSpeakerList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.speakerDevicesList]:[]})(this[Yu])}isAudioMuted(e){return(({store:{getState:e}},t)=>{const r=e(),{meeting:{isWebinar:o}}=r;let n=null;return void 0===t?n=gs(r):(n=r.participants.attendeesList.find(e=>e.userId===t),o&&!n&&(n=r.participants.xmppAttendeeList.find(e=>e.userId===t))),!!n&&!!n.muted})(this[Yu],e)}getActiveMicrophone(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeMicrophone:null})(this[Yu])}getActiveSpeaker(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeSpeaker:null})(this[Yu])}startVideo(e){return((e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,i=r(),{media:{videoDecodeStatus:s,videoEncodeStatus:a},video:{videoSsrc:c,activeCamera:d,isCaptureCameraLoading:u,isCurrentUserStartedVideo:l,isVideoMuted:p}}=i;return l?Promise.reject({type:ki,reason:"Video is started"}):u?Promise.reject({type:ki,reason:"Camera is starting,please wait."}):p&&!Ss(i)?Promise.reject({type:ki,reason:"Video is muted by the host"}):(o(ga(!0)),Eu("video",a,s).subscribe(([e])=>{if(e){const{cameraId:e=d,captureWidth:r=640,captureHeight:i=360,videoDOMId:s}=t||{};n.startCaptureVideo(c,e,r,i,s),d!==e&&o(pa(e))}else o(ga(!1))}),Wi(Ci).then(()=>{o(Sa(!1)),o(fa(!1))}).finally(()=>{o(ga(!1))}))})(this[Yu],e)}stopVideo(){return(e=>{const{store:{getState:t},mediaAgent:r}=e,{video:{isCaptureCameraLoading:o,isCurrentUserStartedVideo:n}}=t();return o?Promise.reject({type:ki,reason:"Camera is starting,please wait."}):n?(r.stopCaptureVideo(),Ki("VIDEO_CAPTURE_STOP_RESULT",e=>!0!==(null==e?void 0:e.failed))):Promise.reject({type:ki,reason:"carmera is closed"})})(this[Yu])}switchCamera(e){return((e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,i=r(),{video:{cameraDevicesList:s,isCurrentUserStartedVideo:a}}=i;return-1===s.map(e=>e.deviceId).indexOf(t)?Promise.reject({type:Ui,reason:"Cannot find cameraDeviceId in camera devices list."}):(a&&n.changeCamera(t),o(pa(t)),Promise.resolve())})(this[Yu],e)}renderVideo(e,t,r,o,n,i,s,a){return((e,t,r,o,n,i,s,a,c,d)=>{const{store:{getState:u,dispatch:l},mediaAgent:p,rwgAgent:h}=e,_=u(),{meeting:{userId:f},video:{subscribedVideoList:v}}=_;if(!t)return Promise.reject({type:Ui,reason:"Received canvas is falsy"});if(!v.includes(r)&&v.length>=9)return Promise.reject({type:ki,reason:"subscribe video counts greater than maximum size (9)"});if(-1===Nl(_).findIndex(e=>e.userId===r))return Promise.reject({type:Ui,reason:"user is not send video"});const{media:{videoDecodeStatus:y}}=_;return t.id||(t.id="__ZOOM_SDK_VIDEO_CANVAS_@__".replace("@",""+Math.floor(1e4*Math.random()))),Eu("video","success",y).subscribe(([e])=>{if(e){const{video:{isVerifiedVideoRenderCanvasAfterFailover:e,highDefinitionVideoId:d,isSupportHDVideo:_,renderedVideoList:y}}=u();let E=t;!1===e&&(E=Su(t),l(ba(!0)));const g=r===f,S=c||"__ZOOM_SDK_VIDEO_ZONE__";let b=a;a===exports.VideoQuality.Video_720P&&(_?d?d!==r&&(console.warn("Web Video SDK only supports subscribing one 720P video stream, will downgrade to 360P stream"),b=exports.VideoQuality.Video_360P):l(Pa(r)):(console.warn("Can not subscribe 720P video stream,will downgrade to 360P stream"),b=exports.VideoQuality.Video_360P)),y.some(e=>e.userId===r&&e.key===S&&e.canvasId===E.id)||p.renderVideo(E.id,r,S,o,n,i,s,b,g,"",!1),r===d&&b===exports.VideoQuality.Video_720P||h.subscribeVideo(r,b,!1),v.includes(r)||l(Oa(r)),d===r&&b!==exports.VideoQuality.Video_720P&&l(Pa(void 0)),l(Ra({userId:r,key:S,canvasId:E.id}))}}),"failed"===y?Promise.reject({type:"INTERNAL_ERROR",reason:"Video decode status is failed"}):Promise.resolve("")})(this[Yu],e,t,r,o,n,i,s,a)}stopRenderVideo(e,t,r,o,n=!1){return((e,t,r,o,n,i=!1)=>{const{store:{getState:s,dispatch:a},mediaAgent:c,rwgAgent:d}=e,u=s(),{video:{subscribedVideoList:l,renderedVideoList:p,highDefinitionVideoId:h}}=u;if(!t||!t.id)return Promise.reject({type:Ui,reason:"canvas is falsy"});if(l.includes(r)){let e=n;e||(e={R:0,G:0,B:0,A:0});const s=o||"__ZOOM_SDK_VIDEO_ZONE__";p.find(e=>e.userId===r&&e.key===s)&&(c.stopRenderVideo(t.id,r,s,e,i),1==p.filter(e=>e.userId===r).length&&(d.unsubscribeVideo(r),a(Ca(r)),h===r&&a(Pa(void 0))),a(Na({userId:r,key:s,canvasId:t.id})))}return Promise.resolve("")})(this[Yu],e,t,r,o,n)}updateVideoCanvasDimension(e,t,r){return((e,t,r,o)=>{const{mediaAgent:n}=e;return t&&t.id?(n.updateRenderedVideoCanvasDimension(t.id,r,o),Promise.resolve("")):Promise.reject({type:Ui,reason:"canvas is falsy"})})(this[Yu],e,t,r)}adjustRenderedVideoPosition(e,t,r,o,n,i,s){return((e,t,r,o,n,i,s,a)=>{const{store:{getState:c},mediaAgent:d}=e;if(!t||!t.id)return Promise.reject({type:Ui,reason:"canvas is falsy"});const{video:{subscribedVideoList:u}}=c();return u.includes(r)?(d.adjustRenderedVideoPosition(t.id,r,a||"__ZOOM_SDK_VIDEO_ZONE__",i,s,o,n),Promise.resolve("")):Promise.reject({type:Ui,reason:"userId is not correct"})})(this[Yu],e,t,r,o,n,i,s)}clearVideoCanvas(e,t){return((e,t,r)=>{const{mediaAgent:o}=e;if(!t||!t.id)return Promise.reject({type:Ui,reason:"canvas is falsy"});let n=r;return n||(n={R:0,G:0,B:0,A:0}),o.clearVideoCanvas(t.id,n),Promise.resolve("")})(this[Yu],e,t)}isCapturingVideo(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCurrentUserStartedVideo})(this[Yu])}isCameraTaken(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCameraTaken})(this[Yu])}isCaptureForbidden(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCaptureForbidden})(this[Yu])}getCameraList(){return(e=>{const{store:{getState:t}}=e,r=t();if(!r.video)return[];const{video:{cameraDevicesList:o}}=r;return o.map(e=>Object.assign({},e))})(this[Yu])}getActiveCamera(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeCamera:""})(this[Yu])}getActiveVideoId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeVideoId:0})(this[Yu])}getVideoMaxQuality(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.receivedVideoMaxQuality:exports.VideoQuality.Video_90P})(this[Yu])}getReceivedVideoDimension(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.receivedVideoDimension:null})(this[Yu])}isSupportMultipleVideos(){return"function"==typeof OffscreenCanvas&&"function"==typeof SharedArrayBuffer}isSupportHDVideo(){return(e=>{var t;const{store:{getState:r}}=e;return null===(t=r().video)||void 0===t?void 0:t.isSupportHDVideo})(this[Yu])}startShareView(e,t){return((e,t,r,o)=>{const{store:{getState:n,dispatch:i},mediaAgent:s,rwgAgent:a}=e,{share:{isReceiveSharing:c,isRemoteSharingActive:d,activeNodeId:u,activeSsrc:l,shareQuality:p,status:h,isVerifiedRenderCanvasAfterFailover:_},media:{sharingDecodeStatus:f}}=n();if(!t||r!==u)return Promise.reject({type:Ui,reason:""});if(!d||c||h!==exports.ShareStatus.End)return Promise.reject({type:ki,reason:""});return Eu("sharing","success",f).subscribe(([,e])=>{if(e){let e=t;!1===_&&(e=Su(t),i(ia(!0))),i(Qs(!0)),a.subscribeSharing(r,p),s.renderSharing(l,e,!1,o)}}),"failed"===f?Promise.reject({type:"INTERNAL_ERROR",reason:""}):Ki("SHARE_RECEIVED_DIMENSION_CHANGE",e=>!!e,6e4)})(this[Yu],e,t)}stopShareView(){return(e=>{const{store:{dispatch:t,getState:r},rwgAgent:o,mediaAgent:n}=e,{share:{isReceiveSharing:i,activeNodeId:s}}=r();return i?(n.stopRenderSharing(),o.unsubscribeSharing(s),t(Qs(!1)),Promise.resolve("")):Promise.resolve("")})(this[Yu])}switchShareView(e){return((e,t)=>{const{store:{getState:r,dispatch:o},rwgAgent:n,mediaAgent:i}=e,s=r(),{share:{isReceiveSharing:a,activeNodeId:c,isRemoteControlApproved:d,isGrabRemoteControl:u,shareQuality:l}}=s;return a?t===c?Promise.resolve(""):Cc(s).findIndex(e=>e.userId===c)>-1?(d&&(u&&n.subscribeGrabRemoteControl(c,!1),n.sharingRequestRemoteControl(c,!1)),n.unsubscribeSharing(c),n.subscribeSharing(t,l),i.switchSharingSource(t),o(Js({bStatus:1,activeNodeID:t,ssrc:t})),Promise.resolve("")):Promise.reject({type:Ui,reason:"no matching user id"}):Promise.reject({type:ki})})(this[Yu],e)}updateSharingCanvasDimension(e,t){return((e,t,r)=>{const{store:{getState:o},mediaAgent:n}=e,i=o(),{share:{isReceiveSharing:s}}=i;return s&&n.updateRenderedSharingDimension(t,r),Promise.resolve("")})(this[Yu],e,t)}startShareScreen(e){return Rl(this[Yu],e)}stopShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:o,mediaAgent:n}=e,{share:{status:i},meeting:{userId:s}}=t();return i===exports.ShareStatus.End?Promise.resolve(""):(r($s(exports.ShareStatus.End)),o.stopSharing(s),n.stopDesktopSharing(),Ki("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!1===e.sharerOn))})(this[Yu])}pauseShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:o,mediaAgent:n}=e,{share:{status:i}}=t();return i===exports.ShareStatus.Sharing?(o.pauseSharing(),n.pauseDesktopSharing(),Ki("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerPause).then(()=>(r($s(exports.ShareStatus.Paused)),""))):Promise.reject({type:ki})})(this[Yu])}resumeShareScreen(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:o,mediaAgent:n}=e,{share:{status:i}}=t();return i===exports.ShareStatus.Paused?(o.resumeSharing(),n.resumeDesktopSharing(),Ki("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerOn&&!1===e.sharerPause).then(()=>(r($s(exports.ShareStatus.Sharing)),""))):Promise.reject({type:ki})})(this[Yu])}lockShare(e){return((e,t)=>((e,t)=>{const{store:{getState:r},rwgAgent:o}=e,{share:{sharePrivilege:n}}=r();return n===t?Promise.resolve(""):Object.values(exports.SharePrivilege).includes(t)?(o.lockSharing(t),Ki("UPDATE_MEETING_ATTRIBUTE",e=>e.lockShare===t)):Promise.reject({type:Ui})})(e,t?exports.SharePrivilege.OnlyHost:exports.SharePrivilege.HostGrab))(this[Yu],e)}getShareUserList(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?Cc(r).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause})):[]})(this[Yu])}getActiveShareUserId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share&&r.share.isRemoteSharingActive?r.share.activeNodeId:0})(this[Yu])}isReceiveSharing(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.share&&r.share.isReceiveSharing})(this[Yu])}getSharedContentDimension(){return(e=>{const{store:{getState:t}}=e,r=t();if(r.share){if(r.share.status!==exports.ShareStatus.End)return d({},r.share.shareDimension);{const{share:{receivedShareDimension:e}}=r;return{width:e.width,height:e.height}}}return null})(this[Yu])}getShareStatus(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?r.share.status:null})(this[Yu])}}).prototype,"startAudio",[Xu,Dl],Object.getOwnPropertyDescriptor(ep.prototype,"startAudio"),ep.prototype),u(ep.prototype,"stopAudio",[Xu,Pl],Object.getOwnPropertyDescriptor(ep.prototype,"stopAudio"),ep.prototype),u(ep.prototype,"muteAudio",[Xu,Ml],Object.getOwnPropertyDescriptor(ep.prototype,"muteAudio"),ep.prototype),u(ep.prototype,"unmuteAudio",[Xu,kl],Object.getOwnPropertyDescriptor(ep.prototype,"unmuteAudio"),ep.prototype),u(ep.prototype,"switchMicrophone",[Xu,Ul],Object.getOwnPropertyDescriptor(ep.prototype,"switchMicrophone"),ep.prototype),u(ep.prototype,"switchSpeaker",[Xu,Vl],Object.getOwnPropertyDescriptor(ep.prototype,"switchSpeaker"),ep.prototype),u(ep.prototype,"startVideo",[Xu,Ll],Object.getOwnPropertyDescriptor(ep.prototype,"startVideo"),ep.prototype),u(ep.prototype,"stopVideo",[Xu,xl],Object.getOwnPropertyDescriptor(ep.prototype,"stopVideo"),ep.prototype),u(ep.prototype,"switchCamera",[Xu,jl],Object.getOwnPropertyDescriptor(ep.prototype,"switchCamera"),ep.prototype),u(ep.prototype,"renderVideo",[Xu,Hl],Object.getOwnPropertyDescriptor(ep.prototype,"renderVideo"),ep.prototype),u(ep.prototype,"stopRenderVideo",[Xu,Fl],Object.getOwnPropertyDescriptor(ep.prototype,"stopRenderVideo"),ep.prototype),u(ep.prototype,"updateVideoCanvasDimension",[Xu,Gl],Object.getOwnPropertyDescriptor(ep.prototype,"updateVideoCanvasDimension"),ep.prototype),u(ep.prototype,"adjustRenderedVideoPosition",[Xu,Bl],Object.getOwnPropertyDescriptor(ep.prototype,"adjustRenderedVideoPosition"),ep.prototype),u(ep.prototype,"clearVideoCanvas",[Xu,Wl],Object.getOwnPropertyDescriptor(ep.prototype,"clearVideoCanvas"),ep.prototype),u(ep.prototype,"startShareView",[Xu,Kl],Object.getOwnPropertyDescriptor(ep.prototype,"startShareView"),ep.prototype),u(ep.prototype,"stopShareView",[Xu,ql],Object.getOwnPropertyDescriptor(ep.prototype,"stopShareView"),ep.prototype),u(ep.prototype,"switchShareView",[Xu,zl],Object.getOwnPropertyDescriptor(ep.prototype,"switchShareView"),ep.prototype),u(ep.prototype,"updateSharingCanvasDimension",[Xu,Jl],Object.getOwnPropertyDescriptor(ep.prototype,"updateSharingCanvasDimension"),ep.prototype),u(ep.prototype,"startShareScreen",[Xu,Ql],Object.getOwnPropertyDescriptor(ep.prototype,"startShareScreen"),ep.prototype),u(ep.prototype,"stopShareScreen",[Xu,Yl],Object.getOwnPropertyDescriptor(ep.prototype,"stopShareScreen"),ep.prototype),u(ep.prototype,"pauseShareScreen",[Xu,Xl],Object.getOwnPropertyDescriptor(ep.prototype,"pauseShareScreen"),ep.prototype),u(ep.prototype,"resumeShareScreen",[Xu,Zl],Object.getOwnPropertyDescriptor(ep.prototype,"resumeShareScreen"),ep.prototype),u(ep.prototype,"lockShare",[Zu,$l,Xu],Object.getOwnPropertyDescriptor(ep.prototype,"lockShare"),ep.prototype),ep);var rp,op;const np={chat:{epic:wl,reducer:bl,Client:Tl}},ip=ri.createAgent();let sp=(u((op=class extends hl{constructor(e){super(e),this.mediaStream=void 0,this[Qu]=np}getMediaStream(){return void 0===this.mediaStream&&(this.mediaStream=new tp(this[qu])),this.mediaStream}joinInstant(e,t,r,o,n){const{[zu]:i,[Ju]:s}=this,{meeting:{lang:a,meetingStatus:c},socket:{zoomSocketStatus:d}}=i();return t?"initial"===c&&"closed"===d?(s(en({topic:e,password:n||"",userName:r,zlk:t,lang:a,cv:o})),Wi(ai)):Promise.reject({type:ki,reason:"duplicated operation"}):Promise.reject({type:ki,reason:"invalid signature"})}removeUser(e){const t=this[qu].getState(),{participants:{attendeesList:r}}=t;return r.find(t=>t.userId===e)?(ip.expel(e),Ki("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t=>t.some(t=>t.userId===e))):Promise.reject({type:Ui,reason:"no matched user"})}}).prototype,"removeUser",[Zu,Xu],Object.getOwnPropertyDescriptor(op.prototype,"removeUser"),op.prototype),op);class ap{constructor(e){this.instant=void 0,this.context=void 0,this.script=void 0,this.mic=void 0,this.instant=0,this.context=e,this.mic=null,this.script=e.createScriptProcessor(2048,1,1),this.script.onaudioprocess=e=>{const t=e.inputBuffer.getChannelData(0);let r,o=0;for(r=0;re.stop()),this.audioStream=null,this.isAudioStarted=!1}async toggleMicIsMuted(e){if(e){if(!this.audioContext){const e=window.AudioContext||window.webkitAudioContext;this.audioContext=new e}this.inputMicDetector=new ap(this.audioContext),this.inputMicDetector.connectToSource(this.audioStream)}else this.inputMicDetector&&this.inputMicDetector.stop(),this.inputMicDetector=null;this.isMicUnmuted=e}getAudioConstraints(){return{audio:""===this.deviceId||{deviceId:this.deviceId},video:!1}}}const dp={width:{min:1024,ideal:1280,max:1920},height:{min:576,ideal:720,max:1080},aspectRatio:{ideal:1.777777778}};class up{constructor(e=""){this.isVideoStarted=void 0,this.videoStream=void 0,this.deviceId=void 0,this.isVideoStarted=!1,this.videoStream=null,this.deviceId=e}async start(e){if(!e)throw new Error("Video DOM element is falsy");if(this.isVideoStarted||this.videoStream)throw new Error("VideoAlreadyStartedError");const t=async t=>{if(!t||"OverconstrainedError"!==t.name&&"ConstraintNotSatisfiedError"!==t.name)throw t;console.log(`Warning: detected ${t.name} -- trying to fall back to lower aspect ratio`);try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints(!0));return this.tryPlayVideo(e,t)}catch(e){throw e}};try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints());return this.tryPlayVideo(e,t)}catch(e){return t(e)}}async stop(){if(!this.videoStream||!this.isVideoStarted)throw new Error("VideoNotStartedError");this.videoStream.getVideoTracks().forEach(e=>e.stop()),this.videoStream=null,this.isVideoStarted=!1}getVideoConstraints(e=!1){let t=dp;return e?t=""===this.deviceId||{deviceId:this.deviceId}:""!==this.deviceId&&(t.deviceId=this.deviceId),{audio:!1,video:t}}async tryPlayVideo(e,t){if(!e)throw new Error("Video DOM element is falsy");try{this.videoStream=t,e.srcObject=this.videoStream,await e.play(),this.isVideoStarted=!0}catch(e){throw e}}}class lp{static createClient(){if(!this.meetingClient){const e=function(){const e=[Bu],t=f(Ku(),Wu(function(){for(var e=arguments.length,t=new Array(e),r=0;r{void 0===t.asyncReducers[e]&&(t.asyncReducers[e]=r,t.replaceReducer(Ku(t.asyncReducers)))},t.injectEpic=e=>{Hu.next(e)},Bu.run(Fu),t}();this.meetingClient=new sp(e)}return this.meetingClient}static destroyClient(){this.meetingClient&&(this.meetingClient.leave().then(()=>{tt(500).subscribe(()=>{zi()})}),this.meetingClient=null)}static checkSystemRequirements(){return{audio:Ln()&&xn(),video:Ln()&&void 0!==navigator.mediaDevices,screen:Ln()&&void 0!==(navigator.mediaDevices&&navigator.mediaDevices).getDisplayMedia}}static getDevices(e){return e?navigator.mediaDevices.enumerateDevices():navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(e=>(e.getTracks().forEach(e=>e.stop()),navigator.mediaDevices.enumerateDevices()))}static createLocalAudioTrack(e=""){return new cp(e)}static createLocalVideoTrack(e=""){return new up(e)}}lp.meetingClient=void 0,lp.VERSION="2.0.0";var pp,hp,_p="https://dmogdx0jrul3u.cloudfront.net/videosdk/".concat("1.1.3","/lib"),fp="https://source.zoom.us/videosdk/".concat("1.1.3","/lib"),vp="https://jssdk.zoomus.cn/videosdk/".concat("1.1.3","/lib"),yp=Symbol("stream"),Ep=function(){function t(r){e(this,t),this[yp]=void 0,this[yp]=r}return r(t,[{key:"startAudio",value:function(){return this[yp].startAudio()}},{key:"stopAudio",value:function(){return this[yp].stopAudio()}},{key:"muteAudio",value:function(e){return this[yp].muteAudio(e)}},{key:"unmuteAudio",value:function(e){return this[yp].unmuteAudio(e)}},{key:"isAudioMuted",value:function(e){return this[yp].isAudioMuted(e)}},{key:"getMicList",value:function(){return this[yp].getMicList()}},{key:"getSpeakerList",value:function(){return this[yp].getSpeakerList()}},{key:"getActiveMicrophone",value:function(){return this[yp].getActiveMicrophone()}},{key:"getActiveSpeaker",value:function(){return this[yp].getActiveSpeaker()}},{key:"switchMicrophone",value:function(e){return this[yp].switchMicrophone(e)}},{key:"switchSpeaker",value:function(e){return this[yp].switchSpeaker(e)}},{key:"startVideo",value:function(e){return this[yp].startVideo(e)}},{key:"stopVideo",value:function(){return this[yp].stopVideo()}},{key:"renderVideo",value:function(e,t,r,o,n,i,s,a){return this[yp].renderVideo(e,t,r,o,n,i,s,a)}},{key:"stopRenderVideo",value:function(e,t,r,o){var n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this[yp].stopRenderVideo(e,t,r,o,n)}},{key:"updateVideoCanvasDimension",value:function(e,t,r){return this[yp].updateVideoCanvasDimension(e,t,r)}},{key:"adjustRenderedVideoPosition",value:function(e,t,r,o,n,i,s){return this[yp].adjustRenderedVideoPosition(e,t,r,o,n,i,s)}},{key:"clearVideoCanvas",value:function(e,t){return this[yp].clearVideoCanvas(e,t)}},{key:"getCameraList",value:function(){return this[yp].getCameraList()}},{key:"switchCamera",value:function(e){return this[yp].switchCamera(e)}},{key:"isCapturingVideo",value:function(){return this[yp].isCapturingVideo()}},{key:"isCameraTaken",value:function(){return this[yp].isCameraTaken()}},{key:"getActiveVideoId",value:function(){return this[yp].getActiveVideoId()}},{key:"getActiveCamera",value:function(){return this[yp].getActiveCamera()}},{key:"isCaptureForbidden",value:function(){return this[yp].isCaptureForbidden()}},{key:"getVideoMaxQuality",value:function(){return this[yp].getVideoMaxQuality()}},{key:"getReceivedVideoDimension",value:function(){return this[yp].getReceivedVideoDimension()}},{key:"isSupportMultipleVideos",value:function(){return this[yp].isSupportMultipleVideos()}},{key:"isSupportHDVideo",value:function(){return this[yp].isSupportHDVideo()}},{key:"startShareView",value:function(e,t){return this[yp].startShareView(e,t)}},{key:"stopShareView",value:function(){return this[yp].stopShareView()}},{key:"startShareScreen",value:function(e){return this[yp].startShareScreen(e)}},{key:"pauseShareScreen",value:function(){return this[yp].pauseShareScreen()}},{key:"resumeShareScreen",value:function(){return this[yp].resumeShareScreen()}},{key:"stopShareScreen",value:function(){return this[yp].stopShareScreen()}},{key:"lockShare",value:function(e){return this[yp].lockShare(e)}},{key:"isShareLocked",value:function(){return this[yp].isShareLocked()}},{key:"getActiveShareUserId",value:function(){return this[yp].getActiveShareUserId()}}]),t}(),gp=Symbol("chat"),Sp=function(){function t(r){e(this,t),this[gp]=void 0,this[gp]=r}return r(t,[{key:"send",value:function(e,t){return this[gp].send(e,t)}},{key:"sendToAll",value:function(e){return this[gp].send(e,ul.All)}},{key:"setPrivilege",value:function(e){return this[gp].setPrivilege(e)}},{key:"getPrivilege",value:function(){return this[gp].getPrivilege()}},{key:"getReceivers",value:function(){return this[gp].getReceivers().map((function(e){return i({isManager:e.isCoHost},s(e,["isCoHost"]))}))}}]),t}(),bp=function(e){return"string"==typeof e&&e.length>0},mp=Symbol("Client"),Ip=function(){function t(){e(this,t),this[mp]=void 0,this.stream=void 0,this.chat=void 0,this[mp]=lp.createClient()}return r(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Global",r=arguments.length>2?arguments[2]:void 0,o="";switch(t){case"Global":o=fp;break;case"CN":o=vp;break;case"CDN":o=_p;break;default:o=t}return this[mp].init("","",{language:e,dependentAssets:o,constraints:i({},lp.checkSystemRequirements()),additionalFeatures:["chat"],webEndpoint:r||"zoom.us"})}},{key:"join",value:function(e,t,r,o){return bp(e)&&bp(t)&&bp(r)?e.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of topic is 200"}):r.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of username is 200"}):!o||bp(o)&&!void/^([!@#$%^&*?=]|\w|\d){1,10}$/gi.test(o)?this[mp].joinInstant(e,t,r,"1.1.3",o):Promise.reject({type:"INVALID_PARAMETERS",reason:"Password can contain English characters, numbers and special characters like !@#$%^&*?=, and the max length of password is 10"}):Promise.reject({type:"INVALID_PARAMETERS",reason:"topic, token and userName must be string and required"})}},{key:"leave",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?this[mp].end():this[mp].leave()}},{key:"getSessionInfo",value:function(){var e=this[mp].getMeetingInfo();return{isInMeeting:e.isInMeeting||!1,password:e.password||"",topic:e.topic,userName:e.userName,userId:e.userId}}},{key:"on",value:function(e,t){this[mp].on(e,t)}},{key:"off",value:function(e,t){this[mp].off(e,t)}},{key:"getMediaStream",value:function(){return this.stream||(this.stream=new Ep(this[mp].getMediaStream())),this.stream}},{key:"getChatClient",value:function(){return this.chat||(this.chat=new Sp(this[mp].getFeatureModule("chat"))),this.chat}},{key:"coverntUser",value:function(e){return{userId:e.userId,avatar:e.avatar||"",displayName:e.displayName,isHost:e.isHost,isManager:e.isCoHost||!1,audio:e.audio,muted:e.muted,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharerPause:e.sharerPause}}},{key:"getCurrentUserInfo",value:function(){var e=this[mp].getCurrentUserInfo();if(e)return this.coverntUser(e)}},{key:"getUser",value:function(e){var t=this[mp].getParticipantsList().find((function(t){return t.userId===e}));if(t)return this.coverntUser(t)}},{key:"getAllUser",value:function(){var e=this;return this[mp].getParticipantsList().map((function(t){return e.coverntUser(t)}))}},{key:"changeName",value:function(e,t){return this[mp].changeName(e,t)}},{key:"makeHost",value:function(e){return this[mp].makeHost(e)}},{key:"makeManager",value:function(e){return this[mp].makeCoHost(e)}},{key:"revokeManager",value:function(e){return this[mp].revokeCoHost(e)}},{key:"removeUser",value:function(e){return this[mp].removeUser(e)}},{key:"isHost",value:function(){return this[mp].isHost()}},{key:"isManager",value:function(){return this[mp].isCoHost()}}]),t}(),Ap=function(){function t(){e(this,t)}return r(t,null,[{key:"createClient",value:function(){return this.videoClient||(this.videoClient=new Ip),this.videoClient}},{key:"destroyClient",value:function(){this.videoClient&&(this.videoClient.leave(),this.videoClient=null)}},{key:"checkSystemRequirements",value:function(){return lp.checkSystemRequirements()}},{key:"getDevices",value:function(e){return lp.getDevices(e)}},{key:"createLocalAudioTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return lp.createLocalAudioTrack(e)}},{key:"createLocalVideoTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return lp.createLocalVideoTrack(e)}}]),t}();Ap.videoClient=void 0,Ap.VERSION="1.1.3",(pp=exports.ChatPrivilege||(exports.ChatPrivilege={}))[pp.All=1]="All",pp[pp.NoOne=4]="NoOne",pp[pp.EveryonePublicly=5]="EveryonePublicly",(hp=exports.ChatMsgType||(exports.ChatMsgType={}))[hp.All=0]="All",exports.default=Ap; diff --git a/dist/index.umd.js b/dist/index.umd.js old mode 100755 new mode 100644 index 88fae04..da5cda9 --- a/dist/index.umd.js +++ b/dist/index.umd.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).WebVideoSDK={})}(this,(function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;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 c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(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 d(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),Se=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}(Le);function Ge(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),He(j,e)}function Be(){return Ge(1)}function We(){for(var e=[],t=0;t1?n.next(Array.prototype.slice.call(arguments)):n.next(e)}),n,r)}))}function Je(e,t,r){return r?Je(e,t).pipe(Oe((function(e){return R(e)?r.apply(void 0,e):r(e)}))):new F((function(r){var n,o=function(){for(var e=[],t=0;t=0}function Xe(){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]:Ge(r)(se(e,n))}function Qe(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function Ze(e,t){return function(r){return r.lift(new $e(e,t))}}var $e=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new et(e,this.predicate,this.thisArg))},e}(),et=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 tt(e,t,r){return[Ze(t,r)(new F(Me(e))),Ze(Qe(t,r))(new F(Me(e)))]}function rt(){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 ht(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(de.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(de.createComplete()),this.unsubscribe()},t}(U),ht=function(e,t){this.time=e,this.notification=t};function _t(e){return function(t){return 0===e?te():t.lift(new ft(e))}}var ft=function(){function e(e){if(this.total=e,this.total<0)throw new Ae}return e.prototype.call=function(e,t){return t.subscribe(new vt(e,this.total))},e}(),vt=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 yt(e){return function(t){return t.lift(new Et(e))}}var Et=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new gt(e,this.value))},e}(),gt=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 St(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?He((function(){return e}),t,r):("number"==typeof t&&(r=t),He((function(){return e}),r))}function bt(){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}(we),Vt=function(e,t){return e===t||"function"==typeof t&&e===t.toString()},Lt=function(){for(var e=arguments.length,t=Array(e),r=0;r=t.length?r(new Jt(a,h,new zt(void 0,e[h]))):Qt(e[h],t[h],r,n,a,h,s);for(;h=0?(Qt(e[o],t[o],r,n,a,o,s),f=Yt(f,c)):Qt(e[o],void 0,r,n,a,o,s)})),f.forEach((function(e){Qt(void 0,t[e],r,n,a,e,s)}))}s.length=s.length-1}else e!==t&&("number"===u&&isNaN(e)&&isNaN(t)||r(new Kt(a,e,t)))}function Zt(e,t,r,n){return n=n||[],Qt(e,t,(function(e){e&&n.push(e)}),r),n.length?n:void 0}function $t(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,RESET_SOCKET:()=>({})}),Zr=sr("CONNECT_TO_MEDIA_STREAM"),$r=sr("RECEIVE_PAYLOAD_FROM_MEDIA_SDK"),{setAudioEncodeStatus:en,setAudioDecodeStatus:tn,setVideoEncodeStatus:rn,setVideoDecodeStatus:nn,setSharingEncodeStatus:on,setSharingDecodeStatus:sn,setMediaConstraints:an,resetMedia:cn}=Tr("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","RESET_MEDIA");function un(e,t,...r){return e(Ht.of(...r||[]),t,null)}function dn(...e){const t=(...t)=>Xe(...e.map(e=>{const r=e(...t);if(!r)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 r.pipe(at((e,t)=>(setTimeout(()=>{throw e},0),t)))}));try{Object.defineProperty(t,"name",{value:"combineEpics(".concat(e.map(e=>e.name||"").join(", "),")")})}catch(e){}return t}function ln(...e){return dn(...e.flatMap(e=>Object.values(e)))}function pn(e,t){return e.pipe(Lt("".concat(Hr)),Ze(e=>e.payload.evt===t))}function hn(e,t){return e.pipe(Lt("".concat(Fr)),Ze(e=>e.payload.event===t))}function _n(e,t){return e.pipe(Lt("".concat(Hr),"".concat(Wr)),Ze(e=>e.payload.evt===t))}function fn(e,t){return e.pipe(Lt("".concat($r)),Ze(e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t))}var vn="undefined"!=typeof window&&window,yn="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,En="undefined"!=typeof global&&global,gn=vn||En||yn;function Sn(e,t){return void 0===t&&(t=null),new Tn({method:"GET",url:e,headers:t})}function bn(e,t,r){return new Tn({method:"POST",url:e,body:t,headers:r})}function mn(e,t){return new Tn({method:"DELETE",url:e,headers:t})}function In(e,t,r){return new Tn({method:"PUT",url:e,body:t,headers:r})}function An(e,t,r){return new Tn({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!gn)throw new Error("RxJS could not find any global context (window, self, global)")}();var On=Oe((function(e,t){return e.response}));function Cn(e,t){return On(new Tn({method:"GET",url:e,responseType:"json",headers:t}))}var Tn=function(e){function t(t){var r=e.call(this)||this,n={async:!0,createXHR:function(){return this.crossDomain?function(){if(gn.XMLHttpRequest)return new gn.XMLHttpRequest;if(gn.XDomainRequest)return new gn.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(gn.XMLHttpRequest)return new gn.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 gn.ActiveXObject(e))break}catch(e){}return new gn.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 wn(e,this.request)},t.create=((r=function(e){return new t(e)}).get=Sn,r.post=bn,r.delete=mn,r.put=In,r.patch=An,r.getJSON=Cn,r),t}(F),wn=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")||gn.FormData&&r.body instanceof gn.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 Rn(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 u=this.xhr=e.createXHR();this.setupEvents(u,e),r?u.open(n,o,i,r,s):u.open(n,o,i),i&&(u.timeout=e.timeout,u.responseType=e.responseType),"withCredentials"in u&&(u.withCredentials=!!e.withCredentials),this.setHeaders(u,a),c?u.send(c):u.send()}catch(e){this.error(e)}},t.prototype.serializeBody=function(e,t){if(!e||"string"==typeof e)return e;if(gn.FormData&&e instanceof gn.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 Pn(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)},gn.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 Nn("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 Nn("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),Rn=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=Dn(this.responseType,t)},Nn=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=Dn(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function Dn(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 Pn=function(e,t){return Nn.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},Mn=Tn.create;const kn={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 Password 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."}},Un=kn.default;let Vn,Ln,jn;function Hn(e,t){return t in Un?Un[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"}(Vn||(Vn={})),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"}(Ln||(Ln={})),function(e){e[e.LEAVESUBREASON_WAITINGROOMFAILOVER=1]="LEAVESUBREASON_WAITINGROOMFAILOVER"}(jn||(jn={}));const xn={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},Fn={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"},Gn={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}},Bn={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 Wn(e,t){return Object.keys(e).find(r=>e[r]===t)}let Kn;function qn(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(Kn)o=Kn;else{const e=Object.keys(Gn[3e3]);n.forEach(t=>{const r=function(e){return"en-US"===e&&(e="default"),kn[e]||kn.default}(t);o[t]={},e.forEach(e=>{o[t][e]=r[e]})}),Kn=o}return n.forEach(n=>{if(r)return;const i=Wn(o[n],t);i&&(r={key:i,value:Gn[e][i]})}),r||(r={key:"apac.errorcodes_fail",value:200}),r}if(200===e){const n=Wn({"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:Gn[e][n]}:{key:"apac.errorcodes_fail",value:200},r}if(void 0!==Gn[e]){const t=Gn[e],n=Object.keys(t)[0];r={key:n,value:t[n]}}if(r)return r;const n=Wn(xn,e),o=Fn[n];return o?{key:o,value:e}:{key:"apac.errorcodes_fail",value:200}}(e,t),o=Hn(r,r);return r!==o?{reason:o,errorCode:n}:{reason:Un[r],errorCode:n}}function zn(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==Bn[r]){const e=Bn[r],n=Object.keys(e)[0];t={key:n,value:e[n]}}if(t){const{key:r,value:n}=t,o=Hn(r,r);return r!==o?Object.assign({},e,{reason:o,errorCode:n}):Object.assign({},e,{reason:Un[r],errorCode:n})}const n=qn(r);return Object.assign({},e,{reason:n.reason,errorCode:n.errorCode})}var Jn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Yn(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 Xn=Yn((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,u=function(e){return e.replace(c,a)},d=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,d)},p=function(e){return l(u(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(u>>>12&63)+(void 0!==a?o.charAt(u>>>6&63):"=")+(void 0!==c?o.charAt(63&u):"=")}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("")},S=t.atob&&"function"==typeof t.atob?function(e){return t.atob(e)}:function(e){return e.replace(/\S{1,4}/g,g)},b=function(e){return S(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},m=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(S(e))}(m(e))};t.Uint8Array&&(f=function(e){return Uint8Array.from(b(m(e)),(function(e){return e.charCodeAt(0)}))});if(t.Base64={VERSION:"2.6.4",atob:b,btoa:l,fromBase64:I,toBase64:_,utob:u,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:Jn)}));function Qn(e){return Xn.Base64.encode(e,!0)}function Zn(e){return Xn.Base64.decode(e)}const $n={"-":"+",_:"/",".":"="};function eo(e){const t=e.replace(/[-_.]/g,e=>$n[e]);return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const to=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount"],ro={bChime:"bAllowPlayChimeForEnterOrExit",topic:e=>({meetingTopic:Zn(e)})},no=sr("GET_MEETING_INFO"),oo=sr("GET_INSTANT_MEETING_INFO"),io=(sr("LOGON_ZOOM_DOMAIN"),sr("VERIFY_ZOOM_RECAPTCHA"),sr("LOGON_THIRD_PARTY_DOMAIN"),sr("PING_RWC_SERVER")),so=sr("MEETING_FAILOVER"),ao=sr("LEAVE_MEETING"),co=sr("END_MEETING"),{setMeetingInfo:uo,setWindownOpen:lo,setAppidSignature:po,setZak:ho,setTkMtkguid:_o,setPingRwcTimestamp:fo,setInMeetingInfo:vo,setMeetingAttribute:yo,resetMeeting:Eo,setIsHost:go,setIsCohost:So,setMeetingIsOnHold:bo,setIsMeetingReset:mo,setAudioVideoBeforeOnHold:Io,setCurrentUserAudioBeforeReset:Ao,setIsCurrentUserMutedBeforeReset:Oo,setMeetingStatus:Co,setMeetingRegion:To,setIsCurrentUserStartVideoBeforeReset:wo,setJoinMeetingTimeStamp:Ro,setIsEnableQos:No}=(sr("REGISTER_WEBINAR"),Tr({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(to.some(t=>void 0!==e[t])){let t=e;return Object.keys(ro).some(t=>void 0!==e[t])&&(t=Object.keys(e).reduce((t,r)=>{const n=ro[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}));function Do(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 Po,Mo,ko,Uo,Vo;!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"}(Po||(Po={})),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"}(Mo||(Mo={})),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"}(ko||(ko={})),function(e){e.CDN="CDN",e.Global="Global",e.CN="CN"}(Uo||(Uo={})),function(e){e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed"}(e.ConnectionState||(e.ConnectionState={})),function(e){e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory"}(Vo||(Vo={}));const Lo=Qn("{}");class jo{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=Qn("zoom-storage-".concat(e)),this.localStorageKey=Qn("zoom-local-storage"),this.memoryCache={},this.sessionCache=JSON.parse(Zn(sessionStorage.getItem(this.sessionStorageKey)||Lo)),this.localCache=JSON.parse(Zn(localStorage.getItem(this.localStorageKey)||Lo))}static init(e){this.instance=new jo(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:Vo.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:Vo.LocalStorage}:{value:this.memoryCache[e],type:Vo.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case Vo.SessionStorage:{const r=this.sessionCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.sessionCache[e]=n,this.flushValue(Vo.SessionStorage)),n}case Vo.LocalStorage:{const r=this.localCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.localCache[e]=n,this.flushValue(Vo.LocalStorage)),n}case Vo.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 Vo.SessionStorage:delete this.sessionCache[e],this.flushValue(Vo.SessionStorage);break;case Vo.LocalStorage:delete this.localCache[e],this.flushValue(Vo.LocalStorage);break;case Vo.Memory:delete this.memoryCache[e]}}flushValue(e){e===Vo.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,Qn(JSON.stringify(this.sessionCache))):e===Vo.LocalStorage&&localStorage.setItem(this.localStorageKey,Qn(JSON.stringify(this.localCache)))}}function Ho(){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 xo(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}function Fo(){return"object"==typeof WebAssembly&&"function"==typeof Worker}jo.instance=void 0;const Go=()=>"function"==typeof AudioWorklet,Bo=()=>xo(),Wo=()=>!xo()&&!Fo(),Ko=()=>/arm/i.test(navigator.userAgent),qo=()=>/\bCrOS\b/.test(navigator.userAgent),zo=()=>qo()&&Ko(),Jo=()=>!navigator||!navigator.hardwareConcurrency||zo()&&navigator.hardwareConcurrency<=4||qo()&&!Ko()&&navigator.hardwareConcurrency<4||/\bCrKey\b/.test(navigator.userAgent)||"function"!=typeof OffscreenCanvas||"function"!=typeof requestAnimationFrame||"function"!=typeof SharedArrayBuffer?1:(zo()&&navigator.hardwareConcurrency>4||qo()&&!Ko()&&navigator.hardwareConcurrency,9);let Yo,Xo;!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"}(Yo||(Yo={})),function(e){e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM"}(Xo||(Xo={}));const Qo=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 Zo,$o;!function(e){e.WebclientOpt="WEB-CLIENT_OPT",e.WebclientWebinarToken="WEB-CLIENT_WEBINAR_TOKEN",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"}(Zo||(Zo={})),function(e){e.WebclientDeviceId="WEBCLIENT_DEVICE_ID"}($o||($o={}));const ei=(window.crypto||window.msCrypto).subtle,ti=Zo.WebclientIVState,ri=Object.keys(Qo).map(e=>Qo[e].sessionType);class ni{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),jo.set(ti,{},Vo.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new ni(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(xo()||!Fo())&&r===Xo.AES_GCM,this.gcmSessionKey=eo(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=eo(t);return i.set(s,0),i.set(o,s.length),i=i.subarray(0,s.length+4),ei.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!0,["sign"]).then(e=>ei.sign({name:"HMAC"},e,i)).then(e=>ei.importKey("raw",e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))}getNextIV(e){const t=jo.get(ti);return void 0===t[e]?(t[e]=0,jo.set(ti,t,Vo.SessionStorage)):jo.set(ti,t=>d(d({},t),{},{[e]:t[e]+1}),Vo.SessionStorage)}resetIVState(){const e=jo.get(ti);if(void 0===e);else{const t=Object.keys(e).filter(e=>ri.indexOf(e)>-1);t.length>0&&(t.forEach(t=>{e[t]+=1e6}),jo.set(ti,e,Vo.SessionStorage))}}static resetIV(){if(void 0===this.instance)throw new Error("reset before intialize");this.instance.resetIVState()}static beginEncrypt({text:e,type:t}){const r=new Uint8Array(0);if(this.instance&&this.instance.isGCMEnabled){const n=16,o=this.instance.getNextIV(t.sessionType),i=new ArrayBuffer(16),s=new Uint8Array(i);new DataView(i).setUint32(0,o,!0);let a=null;return a="BO_BROADCAST"===t.sessionType?this.instance.gcmMainSessionKey:this.instance.gcmSessionKey,this.instance.beginCrypto(a,this.instance.zoomId,t.gcmType).then(t=>{const o=(new TextEncoder).encode(e);return ei.encrypt({name:"AES-GCM",iv:s,additionalData:r,tagLength:8*n},t,o)}).then(e=>{const t=1+s.byteLength+2+r.byteLength+4+e.byteLength,o=new ArrayBuffer(t);new Uint8Array(o)[0]=s.length,new Uint8Array(o,1,s.byteLength).set(s),new DataView(o).setUint16(1+s.byteLength,r.length,!0),new Uint8Array(o,3+s.byteLength).set(r),new DataView(o).setUint32(1+s.byteLength+2+r.byteLength,e.byteLength-n,!0),new Uint8Array(o,1+s.byteLength+2+r.byteLength+4).set(new Uint8Array(e));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(Qn(e))}static beginDecrypt({decryptedText:e,type:t,zoomId:r}){if(this.instance&&this.instance.isGCMEnabled){const n=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 ei.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 t=new TextDecoder("utf-8");return Promise.resolve({message:t.decode(eo(e))})}}}let oi;ni.instance=void 0,function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(oi||(oi={}));class ii{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)}))}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){return{seq:this.sendMessageToRwg({evt:4105,body:{bRecord:e}})}}expel(e){return{seq:this.sendMessageToRwg({evt:4107,body:{userId: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,t=!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,r=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:d({},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){return{seq:r?this.sendMessageToRwg({evt:4135,body:{text:e,destNodeID:t,sn:r}}):this.sendMessageToRwg({evt:4135,body:{text:e,destNodeID:t}})}}assignCC(e,t){return{seq:this.sendMessageToRwg({evt:4137,body:{id:e,bCCEditor:t}})}}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,t){return{seq:this.sendMessageToRwg({evt:4147,body:{id:e,bOn:t}})}}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(e=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}})}}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){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:t,bCallme:r}})}}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(e=1,t,r){return{seq:this.sendMessageToRwg({evt:12289,body:{id:e,size:t,bOn:r}})}}unsubscribeVideo(e=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){return{seq:this.sendMessageToRwg({evt:16415,body:{id:e,size:t}})}}unsubscribeSharing(e){return{seq:this.sendMessageToRwg({evt:16417,seq:1,body:{id:e}})}}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){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,boOn:!1}})}}stopSharing(e){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,bOn:!0}})}}lockSharing(e){return{seq:this.sendMessageToRwg({evt:4169,body:{lockShare:e}})}}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:d({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}})}}}class si extends ii{static createAgent(){return this.rwgInstance||(this.rwgInstance=new si),this.rwgInstance}}si.rwgInstance=null;class ai extends ii{static getInstance(){return this.instance||(this.instance=new ai),this.instance}}ai.instance=null;const ci=Zo.WebclientIVState;class ui{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new ui),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:{[Yo.AUDIO_ENCODE]:jo.get(ci)&&jo.get(ci)[Yo.AUDIO_ENCODE],[Yo.VIDEO_ENCODE]:jo.get(ci)&&jo.get(ci)[Yo.VIDEO_ENCODE],[Yo.SHARING_ENCODE]:jo.get(ci)&&jo.get(ci)[Yo.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(si.createAgent())}}setAssetsAndConstraint(e,t){var r;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=(e=>({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),this.onMediaSDKCallback=this.onMediaSDKCallback.bind(this),null===(r=this.instance)||void 0===r||r.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){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}connect({svcUrl:e,meetingNumber:t,conId:r,e2eEncrypt:n,isViewOnly:o,currentUserId:i,isWebinar:s,enableQos:a}){var c,u,d;this.svcUrl=e,this.meetingNumber=t,this.confId=r;const l=((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(Bo()?"j":"s","&cid=").concat(r)}))(e,t,r);this.mediaSocketAddress=l,this.currentUserId=i;const p=Jo();var h,_,f,v,y,E,g,S,b,m;(Fo()?null===(h=this.instance)||void 0===h||h.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkletPath:null===(_=this.mediaWorkersPath)||void 0===_?void 0:_.audioWorkletPath,e2eEncrypt:n,isEnableListenInitEvent:!0}):null===(f=this.instance)||void 0===f||f.setPropsBeforeInit({callback:this.onMediaSDKCallback,e2eEncrypt:n,isEnableListenInitEvent:!0}),!0===(null===(c=this.constraints)||void 0===c?void 0:c.audio)&&Fo())&&((s||Go())&&(null===(b=this.instance)||void 0===b||b.initAudioDecode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a)),!Go()||s&&o||null===(m=this.instance)||void 0===m||m.initAudioEncode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a));!0===(null===(u=this.constraints)||void 0===u?void 0:u.video)&&Fo()&&(null===(v=this.instance)||void 0===v||v.initVideoDecode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p),s&&o||null===(y=this.instance)||void 0===y||y.initVideoEncode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p)),!0===(null===(d=this.constraints)||void 0===d?void 0:d.screen)&&(Fo()?(null===(E=this.instance)||void 0===E||E.initSharingDecode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p),s&&o||null===(g=this.instance)||void 0===g||g.initSharingEncode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p)):null===(S=this.instance)||void 0===S||S.initSharingDecode(l.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;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(22,{CaptureAudio:n,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t},speakerInfo:{defaultDeviceId:r}})}leaveComputerAudio(){var e;null===(e=this.instance)||void 0===e||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,u,d){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:d,waterMarkText:u,zone:r})}stopRenderVideo(e,t,r,n,o=!1){var i;null===(i=this.instance)||void 0===i||i.Notify_MeidaSDK(2,{canvas:e,userId:t,RGBA:n,doNotClean:o,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,r=!1,n=""){var o;this.receivedSharingCanvas=t,null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(23,{width:0,height:0,ssrc:e,canvas:t,enableWaterMark:r,waterMarkText:n})}stopRenderSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(24,{})}switchSharingSource(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(36,{ssrc:e})}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,d({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=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=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}(e,["dimension"]);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(27,d(d({},r),n))}startDesktopSharing(e,t,r,n=!0){var o;this.sharingCanvas=document.querySelector("#".concat(t)),null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(30,{mode:n,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,Jo())}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})}}let di,li;ui.agentInstance=void 0,function(e){e.Expel="expel",e.Promote="promote",e.Depromote="depromote",e.MemberChange="memberChange",e.RaiseHand="raisehand",e.LowerHand="lowerhand",e.PutdownHands="putdownhands"}(di||(di={})),function(e){e[e.AttendeeToAllPanelist=1]="AttendeeToAllPanelist",e[e.PanelistToAttendee=3]="PanelistToAttendee"}(li||(li={}));const pi=["CONNECTED","DISCONNECTED","POOL","CONNFAIL","OnlineMembers","GroupChange","RosterChange","WebinarQA","Message"];class hi{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;pi.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 hi),this.agentInstance}onXmppCallback(e,t){this.callbackList.length>0&&this.callbackList.forEach(r=>r(e,t))}registerCallback(e){this.callbackList.push(e)}unregisterCallback(e){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}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;pi.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}}function _i(e){return H(Oe((t,r)=>e(t,r)),Ze(e=>null!=e))}function fi(e){return H(He((t,r)=>e(t,r)||ee))}function vi(e){return H(Ot((t,r)=>e(t,r)||ee))}hi.agentInstance=void 0;const yi={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},Ei={["".concat(7937)]:()=>({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 gi(e=yi){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=((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}})(()=>{o=0},s));const u=Object.keys(Ei),d=t.subscribe({next(e){if(e&&e.evt&&null!==i){o+=1;const{evt:t,body:i}=e,s=String(t);if(u.indexOf(s)>=0)if(c){const e=n.get(s);if(e)e.onThrottle(i);else{const e=Ei[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=Ei[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()=>{d.unsubscribe(),i&&(i(),i=null),o=0}})}var Si;!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"}(Si||(Si={}));const bi={success:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",fail:["JOIN_MEETING_FAILED"]},mi={[Si.ConnectionChange]:[{event:"JOIN_MEETING_SUCCESS",payload:()=>({state:e.ConnectionState.Connected})},{event:"RECONNECTING_MEETING",payload:t=>d({state:e.ConnectionState.Reconnecting},t)},{event:"LEAVING_MEETING",payload:t=>d({state:e.ConnectionState.Closed},t)}],[Si.OnHoldChange]:[{event:"MEETING_IN_WAITING_ROOM",payload:e=>({isOnHold:e})}],[Si.UserAdd]:[{event:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"ADD_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[Si.UserUpdate]:[{event:"UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[Si.UserRemove]:[{event:"REMOVE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[Si.AttendeeUpdate]:[{event:"UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",payload:e=>e}]};let Ii;!function(e){e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change"}(Ii||(Ii={}));const Ai={[Ii.ChatOnMessage]:[{event:"CHAT_RECEIVE_MESSAGE_EVENTS",payload:e=>e}],[Ii.ChatPrivilegeChange]:[{event:"CHAT_PRIVILEGE_CHANGE",payload:e=>e}]};let Oi,Ci,Ti;!function(e){e.OnRecordingChange="on-recording-change",e.OnLocalRecordingChange="on-local-recording-change"}(Oi||(Oi={})),function(e){e.Started="Started",e.Stopped="Stopped"}(Ci||(Ci={})),function(e){e.Stopped="Stopped",e.Started="Started",e.Paused="Paused"}(Ti||(Ti={}));const wi={[Oi.OnRecordingChange]:[{event:"START_RECORDING_SUCCESS",payload:()=>({state:Ci.Started})},{event:"STOP_RECORDING_SUCCESS",payload:()=>({state:Ci.Stopped})}],[Oi.OnLocalRecordingChange]:[{event:"LOCAL_RECORDING_CHANGE",payload:e=>{const t={};return Array.isArray(e)?e.forEach(e=>{t[e.id]=e.bLocalRecordStatus}):t[e.id]=e.bLocalRecordStatus,t}}]};let Ri,Ni,Di,Pi;!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"}(Ri||(Ri={})),function(e){e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed"}(Ni||(Ni={})),function(e){e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk"}(Di||(Di={})),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"}(Pi||(Pi={}));const Mi=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"});let ki,Ui,Vi,Li,ji;!function(e){e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare"}(e.SharePrivilege||(e.SharePrivilege={})),function(e){e.Sharing="sharing",e.Paused="paused",e.End="ended"}(e.ShareStatus||(e.ShareStatus={})),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"}(e.VideoQuality||(e.VideoQuality={})),function(e){e.Active="Active",e.Inactive="Inactive"}(e.VideoActiveState||(e.VideoActiveState={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted"}(ki||(ki={})),function(e){e.Active="Active",e.Inactive="Inactive"}(Ui||(Ui={})),function(e){e.Success="Success",e.Failed="Failed",e.Initial="Initial"}(Vi||(Vi={})),function(e){e.Started="Started",e.Stopped="Stopped",e.Failed="Failed"}(e.VideoCapturingState||(e.VideoCapturingState={})),function(e){e.Approved="Approved",e.Rejected="Rejected"}(Li||(Li={})),function(e){e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture"}(e.PassiveStopShareReason||(e.PassiveStopShareReason={})),function(e){e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change"}(ji||(ji={}));const Hi={[ji.DeviceChange]:[{event:"MEDIA_DEVICE_CHANGE",payload:()=>({})}],[ji.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"})}]},xi={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 Fi;!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"}(Fi||(Fi={}));const Gi={[Fi.VideoActiveChange]:[{event:"RECEIVE_VIDEO_ACTIVE_INDICATION",payload:t=>({state:t.bVideoOn?e.VideoActiveState.Active:e.VideoActiveState.Inactive,userId:t.userId})}],[Fi.VideoCapturingChange]:[{event:"VIDEO_CAPTURE_START_SUCCESS",payload:()=>({state:e.VideoCapturingState.Started})},{event:"VIDEO_CAPTURE_STOP_RESULT",payload:t=>({state:(null==t?void 0:t.failed)?e.VideoCapturingState.Failed:e.VideoCapturingState.Stopped})}],[Fi.VideoMutedChange]:[{event:"RECEIVE_VIDEO_MUTE_INDICATION",payload:e=>({state:e.isVideoMuted?ki.Muted:ki.Unmuted,userId:e.id})}],[Fi.AskForStartVideoConsent]:[{event:"ASK_FOR_START_VIDEO_CONSENT",payload:e=>({state:e.isVideoMuted?ki.Muted:ki.Unmuted,userId:e.id})}],[Fi.VideoSpotlightChange]:[{event:"VIDEO_SPOTLIGHT_CHANGE",payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map(e=>({userId:e}))})}],[Fi.VideoDimensionChange]:[{event:"RECEIVE_VIDEO_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[Fi.VideoFollowHostOrder]:[{event:"VIDEO_FOLLOW_HOST_ORDER_CHANGE",payload:e=>({isFollowHostOrder:e.bOn})}],[Fi.VideoHostLayoutChange]:[{event:"VIDEO_HOST_DRAG_LAYOUT_CHANGE",payload:e=>Array.isArray(e.layout)?e.layout.map(e=>({userId:e})):[]}],[Fi.PeerVideoStateChange]:[{event:"VIDEO_NEW_USER_START",payload:e=>d({action:"Start"},e)},{event:"VIDEO_OLD_USER_STOP",payload:e=>d({action:"Stop"},e)}]};let Bi;!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"}(Bi||(Bi={}));const Wi={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"}},Ki={[Bi.ActiveSpeaker]:[{event:"AUDIO_ACTIVE_SPEAKER",payload:e=>e}],[Bi.UnmuteAudioConsent]:[{event:"AUDIO_UNMUTE_CONSENT",payload:e=>({reason:e})}],[Bi.CurrentAudioChange]:[{event:"AUDIO_CURRENT_USER_JOIN_BY_PHONE",payload:()=>({action:"join",type:"phone"})},{event:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",payload:()=>({action:"join",type:"computer"})},{event:"AUDIO_CURRENT_USER_LEAVE_AUDIO",payload:()=>({action:"leave"})},{event:"AUDIO_CURRENT_USER_MUTED",payload:({source:e})=>({action:"muted",source:e})},{event:"AUDIO_CURRENT_USER_UNMUTED",payload:({source:e})=>({action:"unmuted",source:e})}],[Bi.DialoutStateChange]:[{event:"AUDIO_DIALOUT_RESULT_CODE",payload:e=>e}],[Bi.MergeAudio]:[{event:"AUDIO_MERGE_AUDIO_INDICATION",payload:e=>e}],[Bi.AutoPlayFailed]:[{event:"AUDIO_AUTO_PLAY_FAILED",payload:()=>{}}]};let qi;!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"}(qi||(qi={}));const zi={[qi.ShareActiveChange]:[{event:"SHARE_ACTIVE_INDICATION",payload:e=>({state:e.isActive?"Active":"Inactive",userId:e.activeUserId})}],[qi.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})}],[qi.SharePassiveStop]:[{event:"SHARE_VIDEO_STREAMS_END",payload:()=>({reason:e.PassiveStopShareReason.StopScreenCapture})},{event:"SHARE_PASSIVE_STOP_SHARE",payload:()=>({reason:e.PassiveStopShareReason.PrivilegeChange})}],[qi.SharePeerStateChange]:[{event:"SHARE_NEW_USER_ADD",payload:e=>({userId:e.id,action:"Start"})},{event:"SHARE_USER_REMOVE",payload:e=>({userId:e.id,action:"Stop"})}],[qi.ShareContentChange]:[{event:"SHARE_AUTO_CHANGE_SOURCE",payload:e=>e}],[qi.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?Li.Approved:Li.Rejected})}],[qi.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[qi.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[qi.SharePrivilegeChange]:[{event:"SHARE_PRIVILEGE_CHANGE",payload:e=>({privilege:e})}]},Ji="INVALID_OPERATION",Yi="INVALID_PARAMETERS";let Xi;!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"}(Xi||(Xi={}));const Qi={[Xi.InviteToJoin]:[{event:"BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",payload:e=>e}],[Xi.RoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_COUTDOWN",payload:e=>e}],[Xi.RoomTimeUp]:[{event:"BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",payload:e=>e}],[Xi.ClosingRoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",payload:e=>e}],[Xi.BroadcastMessage]:[{event:"BREAKOUT_ROOM_BROADCAST_MESSAGE",payload:e=>e}],[Xi.AskForHelp]:[{event:"BREAKOUT_ROOM_ASK_HELP_REQUEST",payload:e=>e}],[Xi.AskForHelpResponse]:[{event:"BREAKOUT_ROOM_ASK_HELP_RESPONSE",payload:e=>e}],[Xi.RoomStateChange]:[{event:"BREAKOUT_ROOM_ATTRIBUTE_INDICATION",payload:e=>({status:e.controlStatus})}],[Xi.MainSessionUserUpdate]:[{event:"BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE",payload:()=>({})}]},Zi=d(d(d(d(d(d(d(d(d(d({},mi),{"closed-caption-message":[{event:"CC_RECEIVE_MESSAGE",payload:e=>e}]}),Ai),wi),Ki),Gi),{"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}]}),zi),Hi),Qi),$i=(es=es||Object.create(null),{on:function(e,t){(es[e]||(es[e]=[])).push(t)},off:function(e,t){es[e]&&es[e].splice(es[e].indexOf(t)>>>0,1)},emit:function(e,t){(es[e]||[]).slice().map((function(e){e(t)})),(es["*"]||[]).slice().map((function(r){r(e,t)}))}});var es;const ts=new Map,rs=new Array,ns=(e,t)=>{$i.emit(e,t)},os=e=>new Promise((t,r)=>{e.fail&&e.fail.length>0?rt(ze($i,e.success).pipe(_t(1)),Xe(...e.fail.map(e=>ze($i,e).pipe(_t(1),He(t=>ce({type:e,payload:t})))))).subscribe(e=>t(e),e=>{"object"==typeof e.payload?r(d({type:e.type},e.payload)):void 0===e.payload?r({type:e.type}):r(e)}):ze($i,e.success).pipe(_t(1)).subscribe(e=>t(e))}),is=(e,t,r=1e4)=>new Promise((n,o)=>{let i=ee;"string"==typeof e?i=ze($i,e).pipe(_t(1)):(i=ze($i,e.event),e.operations&&(i=e.operations.reduce((e,t)=>e.pipe(t),i))),rt(i,it(r).pipe(St(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"})})}),ss=(e,t)=>void 0!==t?ze($i,e).pipe(_t(t)):ze($i,e),as=()=>{rs.forEach(e=>{e.unsubscribe()}),rs.length=0,ts.clear()};var cs=Yn((function(e,t){var r;r=function(){function e(){for(var e=0,t={};e1&&void 0!==arguments[1]?arguments[1]:0,r=(_s[e[t+0]]+_s[e[t+1]]+_s[e[t+2]]+_s[e[t+3]]+"-"+_s[e[t+4]]+_s[e[t+5]]+"-"+_s[e[t+6]]+_s[e[t+7]]+"-"+_s[e[t+8]]+_s[e[t+9]]+"-"+_s[e[t+10]]+_s[e[t+11]]+_s[e[t+12]]+_s[e[t+13]]+_s[e[t+14]]+_s[e[t+15]]).toLowerCase();if(!hs(r))throw TypeError("Stringified UUID is invalid");return r}(n)}const{WebclientIsOnHold:ys,WebclientOpt:Es,WebclientParticipantId:gs,WebclientZoomId:Ss,WebclientWebinarToken:bs}=Zo,{WebclientDeviceId:ms}=$o;let Is,As,Os,Cs,Ts,ws,Rs;!function(e){e.Closed="closed",e.Connecting="connecting",e.Connected="connected"}(Is||(Is={})),function(e){e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually"}(As||(As={})),function(e){e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(Os||(Os={})),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"}(Cs||(Cs={})),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"}(Ts||(Ts={})),function(e){e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO"}(ws||(ws={})),function(e){e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom"}(Rs||(Rs={}));const Ns=si.createAgent();let Ds;var Ps=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(Lt("".concat(kr)),Dt(t),Ze(([,e])=>"closed"===e.socket.zoomSocketStatus),vi(([,e])=>{const{socket:{retryCount:t,rwgServerList:r},meeting:n,breakoutRoom:o}=e;let i;if(n.zlkJwtToken)i=function({passWord:e,meetingNumber:t,userName:r,topic:n,trackAuth:o,tid:i,meetingId:s,ts:a,auth:c,lang:u,retryCount:d,rwgServerList:l,cv:p,zlkJwtToken:h}){const _=cs.get("_zm_mtk_guid");let f=jo.get(ms);if(f||(f=vs(),jo.set(ms,f,Vo.LocalStorage)),l.length>d){const v=l[d];let y={dn2:Qn(r),topic:Qn(n),auth:c,browser:Ho(),trackAuth:o,mid:s,tid:i,lang:u,ts:a,"ZM-CID":f,_ZM_MTG_TRACK_ID:_||"",iccv:p,cfs:0,zlkJwtToken:h};""!==e&&(y=Object.assign(y,{mpwd:Qn(e)})),v.rwcAuth?y=Object.assign(y,{rwcAuth:v.rwcAuth}):v.rwcToken&&(y=Object.assign(y,{rwcToken:v.rwcToken}));let E=2;return Bo()?E=1:Wo()&&(E=0),y=Object.assign(y,{as_type:E}),[{key:Es,queryKey:"opt"},{key:gs,queryKey:"participantID"},{key:Ss,queryKey:"zoomid"}].forEach(e=>{const t=jo.get(e.key);void 0!==t&&(y[e.queryKey]=t)}),"wss://".concat(v.rwg,"/instantsdk/").concat(t,"?").concat(new URLSearchParams(y).toString())}return null}(d(d({},n),{},{retryCount:t,rwgServerList:r}));else{let e=d(d({},n),{},{retryCount:t,rwgServerList:r});if(o&&o.currentRoom.status===Ts.Joining){const{currentRoom:{boId:t,boConfId:r,boToken:n}}=o;e=d(d({},e),{},{bid:t,botk:n,confID:r})}i=function({isHost:e,isOriginHost:t,passWord:r,meetingNumber:n,userName:o,zak:i,trackAuth:s,tid:a,sign:c,meetingId:u,ts:d,auth:l,lang:p,tk:h,retryCount:_,rwgServerList:f,userEmail:v,cv:y,bid:E,botk:g,confID:S}){const b=cs.get("_zm_mtk_guid");let m=jo.get(ms);if(m||(m=vs(),jo.set(ms,m,Vo.LocalStorage)),f.length>_){const I=f[_];let A={dn2:Qn(o),auth:l,sign:c,browser:Ho(),trackAuth:s,mid:u,tid:a,email:v,lang:p,zak:i||"",tk:h||"",ts:d,"ZM-CID":m,_ZM_MTG_TRACK_ID:b||"",jscv:y,cfs:0};e&&t||""===r||(A=Object.assign(A,{mpwd:r})),I.rwcAuth?A=Object.assign(A,{rwcAuth:I.rwcAuth}):I.rwcToken&&(A=Object.assign(A,{rwcToken:I.rwcToken}));let O=2;return Bo()?O=1:Wo()&&(O=0),A=Object.assign(A,{as_type:O}),[{key:ys,queryKey:"cfs"},{key:Es,queryKey:"opt"},{key:gs,queryKey:"participantID"},{key:Ss,queryKey:"zoomid"},{key:bs,queryKey:"tk"}].forEach(e=>{const t=jo.get(e.key);void 0!==t&&(A[e.queryKey]=t)}),E&&g&&S&&Object.assign(A,{bid:Qn(E),botk:g,confID:S}),"wss://".concat(I.rwg,"/wc/api/").concat(n,"?").concat(new URLSearchParams(A).toString())}return null}(e)}if(i){const e=(s=i,Ns.connect(s),Ds=new q,Je(e=>Ns.on(oi.Message,e),e=>Ns.off(oi.Message,e),e=>e.data).subscribe(Ds),Ds);return Xe(e.pipe(Ze(e=>"string"==typeof e),Oe(e=>JSON.parse(e)),gi(),_i(e=>0===e.evt?void(e.body&&"invalid parameters!"===e.body.test&&ns("JOIN_MEETING_FAILED",qn(xn.INVALID_PARAMETER))):Hr(e)),bt(Kr(Is.Connecting))),e.pipe(Ze(e=>e instanceof ArrayBuffer),Oe(e=>xr(e))))}var s})),connectedZoomSocketEpic:(e,t)=>e.pipe(Lt("".concat(kr)),Ot(()=>{const[e,r,n]=[oi.Open,oi.Close,oi.Error].map(e=>Je(t=>Ns.on(e,t),t=>Ns.on(e,t)));return Xe(e.pipe(He(()=>Xe(ae(Kr(Is.Connected)),it(6e4).pipe(Dt(t),Ze(([,e])=>"initial"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Oe(()=>(ns("RECONNECTING_MEETING",{reason:ko.Failover}),so())))))),r.pipe(Dt(t),Ze(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Oe(()=>(ns("RECONNECTING_MEETING",{reason:ko.Failover}),so()))),n.pipe(Dt(t),fi(([,e])=>{const{meeting:{meetingStatus:t,isMeetingReset:r},socket:{retryCount:n}}=e;return"initial"===t?Ue([zr(n+1),Vr({retry:!0})]):r?void 0:(ns("RECONNECTING_MEETING",{reason:ko.Failover}),ae(so()))})))})),disconnectZoomSocketEpic:e=>e.pipe(Lt("".concat(Vr)),He(e=>e.payload&&e.payload.retry?ae(kr()).pipe(dt(1e3),bt(Kr(Is.Closed))):ae(Kr(Is.Closed))),dt(100),wt(()=>{var e;Ns.close(),null===(e=Ds)||void 0===e||e.complete()}))});const Ms=hi.getInstance();let ks;var Us=Object.freeze({__proto__:null,loadWebIMEpic:(e,t)=>e.pipe(Lt("".concat(jr)),Dt(t),He(([,e])=>{const{media:{assetsPath:t}}=e;return Ue(new Promise((e,r)=>{Do("".concat(t,"/webim.min.js"),()=>{e("")},()=>{r()})})).pipe(yt(Yr(!0)),at(e=>ae(Yr(!1))))})),connectXMPPSocketEpic:(e,t)=>e.pipe(Lt("".concat(Ur)),Dt(t),Ze(([,e])=>"closed"===e.socket.xmppSocketStatus),vi(([,t])=>{const{meeting:{svcUrl:r,meetingNumber:n,conId:o,jid:i,userName:s},socket:{isXmppSDKLoaded:a}}=t,c=Fo()&&Go()?3:2;let u=ae(a);return!1===a&&(u=e.pipe(Lt("".concat(Yr)),_t(1))),u.pipe(He(e=>{return e?(t={svcUrl:r,meetingNumber:n,conId:o,jid:i,userName:s,clientCap:c},Ms.connect(t),ks=new q,Je(e=>Ms.registerCallback(e),e=>Ms.unregisterCallback(e),(e,t)=>({event:e,data:t})).subscribe(ks),ks).pipe(Oe(e=>Fr(e)),bt(Jr(Is.Connecting))):ce("webim load fail");var t}))})),connectedXmppSocketEpic:(e,t)=>e.pipe(Lt("".concat(Jr)),Ze(e=>e.payload===Is.Connecting),vi(()=>{if(ks){const e=ks.pipe(Ze(e=>"CONNECTED"===e.event)),r=ks.pipe(Ze(e=>"DISCONNECTED"===e.event));return Xe(e.pipe(He(()=>ae(Jr(Is.Connected)))),r.pipe(Dt(t),Ze(([,e])=>"closed"!==e.socket.xmppSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Oe(()=>(ns("RECONNECTING_MEETING",{reason:ko.Failover}),so()))))}})),disconnectXmppSocketEpic:e=>e.pipe(Lt("".concat(Lr)),yt(Jr(Is.Closed)),wt(()=>{var e;Ms.disconnect(),null===(e=ks)||void 0===e||e.complete()}))});const Vs=ai.getInstance();let Ls;var js=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(Lt("".concat(Gr)),Dt(t),Ze(([,e])=>"closed"===e.socket.mainSessionSocketStatus),Ot(([,e])=>{const{meeting:{svcUrl:t,meetingNumber:r,conId:n}}=e;return(e=>(Vs.connect(e),Ls=new q,Je(e=>Vs.on(oi.Message,e),e=>Vs.off(oi.Message,e)).pipe(Oe(e=>e.data)).subscribe(Ls),Ls))(function(e,t,r){return"wss://".concat(e,"/wc/media/").concat(t,"?type=m&cid=").concat(r,"&mode=2")}(t,r,n)).pipe(Oe(e=>JSON.parse(e)),Ze(e=>0!==e.evt),gi(),Oe(e=>Wr(e)),bt(Xr(Is.Connecting)))})),connectedMainSessionSocketEpic:(e,t)=>e.pipe(Lt("".concat(Gr)),Ot(()=>{const[e,r,n]=[oi.Open,oi.Close,oi.Error].map(e=>Je(t=>Vs.on(e,t),t=>Vs.on(e,t)));return Xe(e.pipe(yt(Xr(Is.Connected))),r.pipe(Dt(t),Ze(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus),Oe(()=>(ns("RECONNECTING_MEETING",{reason:ko.Failover}),so()))),n.pipe(Oe(()=>(ns("RECONNECTING_MEETING",{reason:ko.Failover}),so()))))})),disconnectMainSessionSocketEpic:e=>e.pipe(Lt("".concat(Br)),yt(Xr(Is.Closed)),wt(()=>{var e;Vs.close(),null===(e=Ls)||void 0===e||e.complete()}))});function Hs(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:qs(e)?2:zs(e)?3:0}function Ws(e,t){return 2===Bs(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ks(e,t,r){var n=Bs(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function qs(e){return ga&&e instanceof Map}function zs(e){return Sa&&e instanceof Set}function Js(e){return e.o||e.t}function Ys(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ca(e);delete t[Aa];for(var r=Oa(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=Qs),Object.freeze(e),t&&Gs(e,(function(e,t){return Xs(t,!0)}),!0))}function Qs(){Hs(2)}function Zs(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function $s(e){var t=Ta[e];return t||Hs(19,e),t}function ea(){return ya}function ta(e,t){t&&($s("Patches"),e.u=[],e.s=[],e.v=t)}function ra(e){na(e),e.p.forEach(ia),e.p=null}function na(e){e===ya&&(ya=e.l)}function oa(e){return ya={p:[],l:ya,h:e,m:!0,_:0}}function ia(e){var t=e[Aa];0===t.i||1===t.i?t.j():t.g=!0}function sa(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.O||$s("ES5").S(t,e,n),n?(r[Aa].P&&(ra(t),Hs(4)),Fs(e)&&(e=aa(t,e),t.l||ua(t,e)),t.u&&$s("Patches").M(r[Aa],e,t.u,t.s)):e=aa(t,r,[]),ra(t),t.u&&t.v(t.u,t.s),e!==ma?e:void 0}function aa(e,t,r){if(Zs(t))return t;var n=t[Aa];if(!n)return Gs(t,(function(o,i){return ca(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return ua(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=Ys(n.k):n.o;Gs(3===n.i?new Set(o):o,(function(t,i){return ca(e,n,o,t,i,r)})),ua(e,o,!1),r&&e.u&&$s("Patches").R(n,r,e.u,e.s)}return n.o}function ca(e,t,r,n,o,i){if(xs(o)){var s=aa(e,o,i&&t&&3!==t.i&&!Ws(t.D,n)?i.concat(n):void 0);if(Ks(r,n,s),!xs(s))return;e.m=!1}if(Fs(o)&&!Zs(o)){if(!e.h.N&&e._<1)return;aa(e,o),t&&t.A.l||ua(e,o)}}function ua(e,t,r){void 0===r&&(r=!1),e.h.N&&e.m&&Xs(t,r)}function da(e,t){var r=e[Aa];return(r?Js(r):e)[t]}function la(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 pa(e){e.P||(e.P=!0,e.l&&pa(e.l))}function ha(e){e.o||(e.o=Ys(e.t))}function _a(e,t,r){var n=qs(t)?$s("MapSet").T(t,r):zs(t)?$s("MapSet").F(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:ea(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=wa;r&&(o=[n],i=Ra);var s=Proxy.revocable(o,i),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(t,r):$s("ES5").J(t,r);return(r?r.A:ea()).p.push(n),n}function fa(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ys(e)}var va,ya,Ea="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ga="undefined"!=typeof Map,Sa="undefined"!=typeof Set,ba="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ma=Ea?Symbol.for("immer-nothing"):((va={})["immer-nothing"]=!0,va),Ia=Ea?Symbol.for("immer-draftable"):"__$immer_draftable",Aa=Ea?Symbol.for("immer-state"):"__$immer_state",Oa="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ca=Object.getOwnPropertyDescriptors||function(e){var t={};return Oa(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Ta={},wa={get:function(e,t){if(t===Aa)return e;var r=Js(e);if(!Ws(r,t))return function(e,t,r){var n,o=la(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||!Fs(n)?n:n===da(e.t,t)?(ha(e),e.o[t]=_a(e.A.h,n,e)):n},has:function(e,t){return t in Js(e)},ownKeys:function(e){return Reflect.ownKeys(Js(e))},set:function(e,t,r){var n=la(Js(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(e.D[t]=!0,!e.P){if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,da(Js(e),t))&&(void 0!==r||Ws(e.t,t)))return!0;ha(e),pa(e)}return e.o[t]=r,!0},deleteProperty:function(e,t){return void 0!==da(e.t,t)||t in e.t?(e.D[t]=!1,ha(e),pa(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Js(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(){Hs(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Hs(12)}},Ra={};Gs(wa,(function(e,t){Ra[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ra.deleteProperty=function(e,t){return wa.deleteProperty.call(this,e[0],t)},Ra.set=function(e,t,r){return wa.set.call(this,e[0],t,r,e[0])};var Na=new(function(){function e(e){this.O=ba,this.N=!1,"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var t=e.prototype;return t.produce=function(e,t,r){if("function"==typeof e&&"function"!=typeof t){var n=t;t=e;var o=this;return function(e){var r=this;void 0===e&&(e=n);for(var i=arguments.length,s=Array(i>1?i-1:0),a=1;a1?r-1:0),i=1;i=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}var o=$s("Patches").$;return xs(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(r+1))}))},e}()),Da=Na.produce;Na.produceWithPatches.bind(Na),Na.setAutoFreeze.bind(Na),Na.setUseProxies.bind(Na),Na.applyPatches.bind(Na),Na.createDraft.bind(Na),Na.finishDraft.bind(Na);const Pa={zoomSocketStatus:Is.Closed,isXmppSDKLoaded:!1,xmppSocketStatus:Is.Closed,mainSessionSocketStatus:Is.Closed,retryCount:0,rwgServerList:[]},Ma=Mr({["".concat(Kr)]:Da((e,{payload:t})=>{e.zoomSocketStatus=t}),["".concat(qr)]:Da((e,{payload:t})=>{const{rwgServerList:r}=e;r.find(e=>e===t.rwg)||r.push(t)}),["".concat(zr)]:Da((e,{payload:t})=>{e.retryCount=t}),["".concat(Jr)]:Da((e,{payload:t})=>{e.xmppSocketStatus=t}),["".concat(Yr)]:Da((e,{payload:t})=>{e.isXmppSDKLoaded=t}),["".concat(Xr)]:Da((e,{payload:t})=>{e.mainSessionSocketStatus=t}),["".concat(Qr)]:()=>Pa},Pa),ka=ln(Ps,Us,js),{setAttendeesList:Ua,setXmppAttendeeList:Va,setIsAdmitAllSilentUsers:La,resetParticipants:ja,addFailoverAttendees:Ha,removeFailoverAttendees:xa,setClearRaiseHand:Fa,setClearAttendeeFeedback:Ga}=Tr({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:()=>({})});let Ba,Wa,Ka;!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"}(Ba||(Ba={})),function(e){e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee"}(Wa||(Wa={})),function(e){e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323"}(Ka||(Ka={}));const qa=e=>(e&Ka.Phone)===Ka.Phone,za=e=>e===Ba.ViewOnlyCanTalk,Ja=e=>(e&Ba.ViewOnly)===Ba.ViewOnly,Ya={id:"userId",type:e=>qa(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>{return{userRole:e,isHost:(t=e,(t&Ba.Host)===Ba.Host)};var t},dn2:e=>({displayName:Zn(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest"};var Xa=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>pn(e,7937).pipe(Oe(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=Ya[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)),Dt(t),He(([e,t])=>{const r=[Ua(e)],{meeting:{userId:n},participants:{attendeesList:o,failoverAttendeesList:i}}=t;if(e.add){const t=e.add.find(e=>e.userId===n);void 0!==t&&ns("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const o=e.add.filter(e=>e.userId!==n);if(o.length>0){const e=o.filter(e=>!za(e.userRole)).map(e=>{const t=i.find(t=>t.zoomID===e.zoomID);return t?d(d({},e),{},{source:t.isOnHold?"on hold":"failover"}):e}),t=e.filter(e=>!!e.source).map(e=>({zoomID:e.zoomID}));r.push(xa(t)),ns("ADD_USER_PARTICIPANT_ATTRIBUTE",e)}}if(e.update){const t=e.update.find(e=>e.userId===n);void 0!==t&&ns("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const r=e.update.filter(e=>e.userId!==n);r.length>0&&ns("UPDATE_USER_PARTICIPANT_ATTRIBUTE",r)}if(e.remove){const t=e.remove.map(e=>{const t=o.find(t=>t.userId===e.userId);return t?2===e.action&&1===e.nUserStatus?t.bHold?(r.push(Ha({zoomID:t.zoomID,isOnHold:!0})),d(d({},e),{},{reason:"on hold"})):(r.push(Ha({zoomID:t.zoomID,isOnHold:!1})),d(d({},e),{},{reason:"failover"})):e:null}).filter(e=>!!e);ns("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t)}return Ue(r)})),receiveUserListFromXMPPEpic:e=>hn(e,"POOL").pipe(Ze(e=>e.payload.data.action===di.MemberChange),wt(e=>{ns("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.payload.data.data)}),Oe(e=>Va(e.payload.data.data))),handleAdmitAllSilentUsersEpic:e=>pn(e,7951).pipe(wt(e=>{!1===e.payload.body.bStarted&&ns("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)}),Oe(e=>La(e.payload.body.bStarted))),handleKVUpdateIndicationEpic:e=>pn(e,7946).pipe(Ze(e=>["bRaiseHand","feedback"].indexOf(e.payload.body.key)>-1&&0===e.payload.body.value),Oe(e=>(ns("UPDATE_USER_PARTICIPANT_ATTRIBUTE",{}),void 0!==e.payload.body.bRaiseHand?Fa():Ga())))});const Qa={attendeesList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},Za=Mr({["".concat(Ua)]:Da((e,{payload:t})=>{void 0!==t.add&&t.add.length>0&&t.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):za(t.userRole)?e.allowTalkAttendeesList.push(t):e.attendeesList.push(t)}}),void 0!==t.update&&t.update.length>0&&t.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!==t.remove&&t.remove.length>0&&t.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(Va)]:Da((e,{payload:t})=>{e.xmppAttendeeList=t.map(e=>d(d({},e),{},{displayName:e.name,userId:Number(e.node),userRole:Number(e.role)}))}),["".concat(La)]:Da((e,{payload:t})=>{e.isAdmitAllSilentUsers=t}),["".concat(Fa)]:Da(e=>{e.attendeesList.forEach(e=>{!0===e.bRaiseHand&&(e.bRaiseHand=!1)})}),["".concat(Ga)]:Da(e=>{e.attendeesList.forEach(e=>{e.feedback>0&&(e.feedback=0)})}),["".concat(Ha)]:Da((e,{payload:t})=>{e.failoverAttendeesList.push(t)}),["".concat(xa)]:Da((e,{payload:t})=>{t.forEach(t=>{const r=e.failoverAttendeesList.findIndex(e=>e.zoomID===t.zoomID);-1!==r&&e.failoverAttendeesList.splice(r,1)})}),["".concat(ja)]:()=>Qa},Qa);function $a(e,t){return e===t}function ec(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:$a,r=null,n=null;return function(){return ec(t,r,arguments)||(n=e.apply(null,arguments)),r=arguments,n}}));const nc=({participants:{attendeesList:e}})=>e,oc=({meeting:{userId:e}})=>e,ic=rc([oc,nc],(e,t)=>t.find(t=>t.userId===e)),sc=rc([ic],e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost)),ac=rc([ic],e=>null==e?void 0:e.isHost),cc=rc([({participants:{xmppAttendeeList:e}})=>e],e=>e.filter(e=>e.userRole===Wa.Attendee)),uc=rc([nc],e=>e.filter(e=>e.bHold&&!e.bid)),dc=rc([nc,({breakoutRoom:e})=>e&&e.controlStatus,({breakoutRoom:e})=>e&&e.currentRoom.status],(e,t,r)=>t!==Os.InProgress&&t!==Os.Closing||r!==Ts.InRoom?e.filter(e=>!e.bHold&&!e.bid):e.filter(e=>!e.bHold)),lc=rc([dc],e=>e.find(e=>e.isHost)),pc=rc([dc],e=>e.filter(e=>e.bCoHost)),hc=ln(Xa),{setAsnIds:_c,setIsCanUnmute:fc,setDialoutSequence:vc,setDialoutResultCode:yc,setIsAllowToTalk:Ec,setIsHostMuteAll:gc,setIsActiveOperation:Sc,setAudioSsrc:bc,setIsMutedUponEntry:mc,setIsUserGrantCaptureAudio:Ic,setIsMicrophoneForbidden:Ac,setWebrtcRestartCount:Oc,setMicrophoneList:Cc,setSpeakerList:Tc,setActiveMicrophone:wc,setActiveSpeaker:Rc,setCanPlayAudio:Nc,resetAudio:Dc,setIsComputerAudioLoading:Pc}=Tr("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"),{setSharePrivilege:Mc,setShareActiveNode:kc,setIsReceiveSharing:Uc,setIsChromeExtensionInstalled:Vc,setIsScreenShareForbidden:Lc,setShareDimension:jc,setShareStatus:Hc,setShareSsrc:xc,setShareQuality:Fc,setReceivedShareDimension:Gc,setIsRemoteControlApproved:Bc,setIsGrabRemoteControl:Wc,setIsVerifiedSharingRenderCanvasAfterFailover:Kc,setIsVerifiedSharingCaptureCanvasAfterFailover:qc,setIsSdkGrabControl:zc,resetShare:Jc}=Tr("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","RESET_SHARE"),{setVideoSsrc:Yc,setActiveVideoId:Xc,setCameraList:Qc,setActiveCamera:Zc,setIsCurrentUserStartedVideo:$c,setSpotlightVideo:eu,setIsCaptureForbidden:tu,setVideoMaxQuality:ru,setCaptureCanvasList:nu,setIsVideoMuted:ou,setIsCaptureCameraLoading:iu,setIsCameraTaken:su,setIsVerifiedVideoRenderCanvasAfterFailover:au,setIsVerifiedVideoCaptureCanvasAfterFailover:cu,resetVideo:uu,setReceivedVideoDimension:du,addSubscribedVideoId:lu,removeSubscribedVideoId:pu,setIsFollowHostVideoLayout:hu,setHostDragLayout:_u,addRenderedVideoId:fu,removeRenderedVideoId:vu}=Tr("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"),{setTempSetting:yu,setSetting:Eu,setQuestionList:gu,setQuestionUpVoted:Su,resetQa:bu}=Tr("SET_TEMP_SETTING","SET_SETTING","SET_QUESTION_LIST","SET_QUESTION_UP_VOTED","SET_SELF_LIVE_ANSWER","RESET_QA"),{setChatPrivilege:mu,addChatMessageHistory:Iu,resetChat:Au,setIsAllowAttendeeChat:Ou}=Tr("SET_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT"),{setCcEditorInfo:Cu,setTempSendCcText:Tu,setTempReceiveCcText:wu,setGatewayInfoList:Ru,resetClosedCaption:Nu}=Tr("SET_CC_EDITOR_INFO","SET_TEMP_SEND_CC_TEXT","SET_TEMP_RECEIVE_CC_TEXT","SET_GATEWAY_INFO_LIST","RESET_CLOSED_CAPTION"),{addBreakoutRooms:Du,setBreakoutRoomAllocationPattern:Pu,setBreakoutRoomSequenceId:Mu,setMeetingElapsedTime:ku,setStartRoomElapsedTime:Uu,setBreakoutRoomOptions:Vu,setBreakoutRoomControlStatus:Lu,setBreakoutRooms:ju,setCurrentBreakoutRoom:Hu,setBreakoutRoomAttendeeStatus:xu,setBreakoutRoomConfId:Fu,setBreakoutRoomToken:Gu,resetBreakoutRoom:Bu,setBreakoutRoomClosingRoomTime:Wu,setBreakoutRoomBroadcastMessage:Ku,setBreakoutRoomHostReplyType:qu,setBreakoutRoomHostReplyRequestId:zu,setMainSessionAttendeeList:Ju,setIsHugeBreakoutRoom:Yu,setBreakoutRoomUpdatedUserRoleCount:Xu,setBreakoutRoomPreAssignedRoomList:Qu}=Tr("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"),Zu=(e,t)=>{if(e.result){const{result:{mn:r,ts:n,auth:o,track_auth:i,mid:s,tid:a,encryptedRWC:c,meetingOptions:u}}=e,{lang:d,password:l,topic:p,zlk:h,cv:_,userName:f}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:n,auth:o,passWord:l,trackAuth:i,encryptedRWC:JSON.parse(c||"{}"),meetingOptions:JSON.parse(u||"{}"),topic:p,userName:jo.get(Zo.WebclientUserName)||f,cv:_,zlkJwtToken:h,lang:d}}return e},$u=(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())},ed=(e,t=!1)=>{const{socket:{zoomSocketStatus:r,xmppSocketStatus:n,mainSessionSocketStatus:o},meeting:{meetingStatus:i}}=e,s=[Co("closed")];if("joined"===i){const t=ui.getInstance(),r=si.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||(jo.clearSession(),ni.destroy()),r!==Is.Closed&&s.push(Vr()),n!==Is.Closed&&s.push(Lr()),o!==Is.Closed&&s.push(Br()),t){const t=ic(e);s.push(Eo({audio:null==t?void 0:t.audio,muted:null==t?void 0:t.muted,video:null==t?void 0:t.bVideoOn}))}else s.push(Eo({audio:!1,muted:!0,video:!1}));return s.push(Qr(),cn(),ja(),Dc(),Jc(),uu(),bu(),Au(),Nu(),Bu()),s},td=(e,...t)=>is({event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",operations:[Oe(t=>t.find(t=>t.userId===e)),Ze(e=>!!e),_t(1)]},...t),rd=(rc([dc,({share:{isReceiveSharing:e}})=>e,({share:{activeNodeId:e}})=>e],(e=[],t,r)=>t?e.find(e=>e.userId===r&&!0===e.sharerOn):null),rc([dc],e=>e.filter(e=>e.sharerOn))),nd=si.createAgent();var od=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>pn(e,7938).pipe(Ze(e=>void 0!==e.payload.body.lockShare),Dt(t),wt(([e,t])=>{const{share:{sharePrivilege:r}}=t,{payload:{body:{lockShare:n}}}=e;r!==n&&ns("SHARE_PRIVILEGE_CHANGE",n)}),Oe(([e])=>Mc(e.payload.body.lockShare))),shareSSrcEpic:e=>pn(e,20227).pipe(Oe(e=>xc(e.payload.body.ssrc))),shareStatusChangeEpic:(e,t)=>pn(e,20225).pipe(Dt(t),Oe(([e,t])=>{const{share:{isReceiveSharing:r,activeNodeId:n,shareQuality:o}}=t,{payload:{body:i}}=e;return r&&1===i.bStatus?(nd.unsubscribeSharing(n),nd.subscribeSharing(i.activeNodeID,o),ui.getInstance().switchSharingSource(i.ssrc),ns("SHARE_AUTO_CHANGE_SOURCE",{userId:i.activeNodeID})):1===i.bStatus?ns("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!0}):r&&ns("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!1}),kc(i)})),handleChromeExtensionEpic:e=>fn(e,Ri.CheckChromeSharingExtensionResponse).pipe(Oe(e=>(ns("SHARE_CHECK_CHROME_SHARING_EXTENSION",e.payload.data),Vc(e.payload.data)))),handleSDKShareSuccessEpic:(e,t)=>fn(e,Ri.DesktopSharingCaptureSuccess).pipe(Dt(t),Oe(([,e])=>{const{meeting:{userId:t}}=e;return nd.startSharing(t),Lc(!1)})),handleSDKShareErrorEpic:e=>fn(e,[Ri.DesktopSharingError,Ri.DesktopSharingChromeExtensionUninstalled,Ri.DesktopSharingPermissionDenied,Ri.DesktopSharingSystemError]).pipe(_i(e=>{if([Ri.DesktopSharingPermissionDenied,Ri.DesktopSharingSystemError].includes(e.payload.type))return Lc(!0);ns("SHARE_START_DESKTOP_SHARE_FAILED",{reason:""})})),handleSDKShareDimensionChangeEpic:e=>fn(e,Ri.CurrentDesktopSharingWidthHeight).pipe(Ze(e=>!!e.payload.data),Oe(e=>{ns("SHARE_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return ui.getInstance().ajustmentSharingCanvas(t,r),jc(e.payload.data)})),handleSDKReceivedShareSizeChangeEpic:(e,t)=>fn(e,Ri.SharingDecodeMaxSize).pipe(Ze(e=>!!e.payload.data),Dt(t),_i(([e,t])=>{const{share:{shareQuality:r,activeNodeId:n}}=t,{payload:{data:{size:o}}}=e,i=Number(o);if(r!==i)return nd.subscribeSharing(n,i),Fc(i)})),handleRWGShareOriginalDimensionEpic:e=>pn(e,20226).pipe(wt(e=>{ns("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.body);const{payload:{body:{width:t,height:r}}}=e;ui.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Oe(e=>Gc(e.payload.body))),handleSDKShareOriginalDimensionEpic:e=>fn(e,Ri.SharingPara).pipe(wt(e=>{ns("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;ui.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Oe(e=>Gc(e.payload.data))),handleSDKStopShareEpic:(t,r)=>fn(t,Ri.UserStopDesktopSharing).pipe(Dt(r),Oe(([,t])=>{const{meeting:{userId:r},share:{status:n}}=t;return n!==e.ShareStatus.End&&(nd.stopSharing(r),ns("SHARE_VIDEO_STREAMS_END")),Hc(e.ShareStatus.End)})),handleRWGCurrentUserShareChangeEpic:(t,r)=>pn(t,7937).pipe(Dt(r),Ze(([e,t])=>{const{meeting:{userId:r}}=t,n=e.payload.body.update;return n&&n.length>0&&n.findIndex(e=>e.id===r&&void 0!==e.bShareOn)>-1}),He(([t,r])=>{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),u=a.find(e=>e.id===n&&!0===e.bShareOn),d=[],l=ui.getInstance();return c&&o!==e.ShareStatus.End&&(nd.stopSharing(n),l.stopDesktopSharing(),d.push(Hc(e.ShareStatus.End)),ns("SHARE_PASSIVE_STOP_SHARE")),u&&o===e.ShareStatus.End&&(i&&(l.stopRenderSharing(),nd.unsubscribeSharing(s),d.push(Uc(!1))),d.push(Hc(e.ShareStatus.Sharing))),Ue(d)})),handleMultipleShareChangeEpic:(e,t)=>pn(e,7937).pipe(Dt(t),Ze(([e,t])=>{const{meeting:{userId:r}}=t,n=e.payload.body.update;return n&&n.length>0&&n.findIndex(e=>e.id!==r&&void 0!==e.bShareOn)>-1}),fi(([t,r])=>{const{payload:{body:{update:n}}}=t,{share:{activeNodeId:o,isReceiveSharing:i,shareQuality:s}}=r,a=rd(r),c=n.filter(e=>!0===e.bShareOn&&!1===e.bSharePause),u=n.filter(e=>!1===e.bShareOn);if(c.length>0&&c.forEach(e=>{-1===a.findIndex(t=>t.userId===e.id)&&ns("SHARE_NEW_USER_ADD",e)}),u.length>0&&(u.forEach(e=>{ns("SHARE_USER_REMOVE",e)}),i&&u.some(e=>e.id===o)))return rt(pn(e,20225).pipe(_t(1),St(ee)),it(50).pipe(St(ce("timeout")))).pipe(at(()=>{const e=a.filter(e=>e.userId!==o);if(e.length>0){const t=e[0],{userId:r}=t;return nd.unsubscribeSharing(o),nd.subscribeSharing(r,s),ui.getInstance().switchSharingSource(r),ns("SHARE_AUTO_CHANGE_SOURCE",{userId:r}),ae(kc({activeNodeID:r,bStatus:1,ssrc:r}))}return ee}))})),handleRequestRemoteControlEpic:(e,t)=>pn(e,16391).pipe(Dt(t),Ze(([e,t])=>{const{meeting:{userId:r}}=t;return e.payload.body.id===r}),Oe(([e])=>{const{payload:{body:{bOn:t}}}=e;return ns("SHARE_REMOTE_CONTROL_APPROVE",t),Bc(t)})),handleGrabRemoteControlEpic:(e,t)=>pn(e,16395).pipe(Dt(t),Ze(([e,t])=>e.payload.body.id===t.meeting.userId),Oe(([e])=>{const{payload:{body:{bOn:t}}}=e;return ui.getInstance().updateRemoteControlProperties({isControllerNow:t}),ns("SHARE_GRAB_REMOTE_CONTROL_CHANGE",t),Wc(t)})),handleSDKRemoteControlEpic:e=>fn(e,[Ri.StartRemoteControlSuccess,Ri.StartRemoteControlFailed,Ri.CancelRemoteControlSuccess]).pipe(_i(e=>e.payload.type===Ri.StartRemoteControlSuccess?(ns("SHARE_REMOTE_CONTROL_SUCCESS"),zc(!0)):e.payload.type===Ri.CancelRemoteControlSuccess?zc(!1):void(e.payload.type===Ri.StartRemoteControlFailed&&ns("SHARE_REMOTE_CONTROL_FAILED")))),handleRemoteControlClipboardEpic:e=>fn(e,[Ri.RemoteControlCopiedTextNotify,Ri.RemoteControlPasteTextLengthOverflow]).pipe(wt(e=>{if(e.payload.type===Ri.RemoteControlCopiedTextNotify){const{payload:{data:t}}=e;ns("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{content:t.data,x:t.x,y:t.y})}else ns("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{error:"length of pasted text is too long"})}),St(ee))});const id={ssrc:0,status:e.ShareStatus.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:e.SharePrivilege.OnlyHost,activeNodeId:0,activeSsrc:0,shareQuality:1,isRemoteSharingActive:!1,isReceiveSharing:!1,isRemoteControlApproved:!1,isGrabRemoteControl:!1,isSDKGrabControl:!1,isChromeExtensionInstalled:!1,isScreenShareForbidden:!1},sd=Mr({["".concat(Mc)]:Da((e,{payload:t})=>{e.sharePrivilege=t}),["".concat(kc)]:Da((e,{payload:t})=>{e.isRemoteSharingActive=1===t.bStatus,e.activeNodeId=t.activeNodeID,e.activeSsrc=t.ssrc}),["".concat(Uc)]:Da((e,{payload:t})=>{e.isReceiveSharing=t}),["".concat(Vc)]:Da((e,{payload:t})=>{e.isChromeExtensionInstalled=t}),["".concat(jc)]:Da((e,{payload:t})=>{e.shareDimension=d({},t)}),["".concat(Hc)]:Da((e,{payload:t})=>{e.status=t}),["".concat(xc)]:Da((e,{payload:t})=>{e.ssrc=t}),["".concat(Fc)]:Da((e,{payload:t})=>{e.shareQuality=t}),["".concat(Gc)]:Da((e,{payload:t})=>{e.receivedShareDimension=d({},t)}),["".concat(Bc)]:Da((e,{payload:t})=>{e.isRemoteControlApproved=t}),["".concat(Wc)]:Da((e,{payload:t})=>{e.isGrabRemoteControl=t}),["".concat(Kc)]:Da((e,{payload:t})=>{e.isVerifiedRenderCanvasAfterFailover=t}),["".concat(qc)]:Da((e,{payload:t})=>{e.isVerifiedCaptureCanvasAfterFailover=t}),["".concat(zc)]:Da((e,{payload:t})=>{e.isSDKGrabControl=t}),["".concat(Jc)]:()=>d(d({},id),{},{isVerifiedRenderCanvasAfterFailover:!1,isVerifiedCaptureCanvasAfterFailover:!1})},id),ad=ln(od),cd=si.createAgent(),ud=(e,t)=>e.pipe(Lt("".concat(io)),Dt(t),Ze(([,e])=>void 0!==e.meeting.encryptedRWC),vi(([,e])=>{const{meeting:{encryptedRWC:t,ts:r,auth:n,meetingNumber:o},breakoutRoom:i}=e;if(t)return Ue(Object.keys(t).map(e=>{const s=t[e];let a=void 0;return a=i&&i.currentRoom.boConfId?$u(e,o,s,r,n,i.currentRoom.boConfId):$u(e,o,s,r,n),{url:a,domain:e,rwcToken:s}})).pipe(He(e=>Mn(e.url).pipe(He(t=>{let r={};return r=t.response?d(d({},t.response),{},{fromNginx:!1}):{rwg:e.domain,rwcToken:e.rwcToken,fromNginx:!0},Ue([qr(r),kr()])}),at(()=>ee))),bt(fo(performance.now())))}));var dd=Object.freeze({__proto__:null,pingRWCEpic:ud,joinMeetingSuccessfulEpic:(e,t)=>pn(e,4098).pipe(Dt(t),vi(([e,t])=>{const{payload:{body:{res:r,userID:n,zoomID:o,mn:i,participantID:s,hugeBO:a,elapsed:c,disableAqos:u}}}=e,{meeting:{pingRWCTimestamp:d,isWebinar:l,userEmail:p,userName:h,isMeetingReset:_,meetingOptions:f},media:{mediaConstraints:v,assetsPath:y},breakoutRoom:E}=t;if(Vn.CONF_SUCCESS===r){const{WebclientParticipantId:t,WebclientUserId:r,WebclientZoomId:g,WebclientUserEmail:S,WebclientUserName:b}=Zo;jo.set(r,n,Vo.SessionStorage),jo.set(g,o,Vo.SessionStorage),jo.set(t,s,Vo.SessionStorage),p&&jo.set(S,p,Vo.SessionStorage),jo.set(b,h,Vo.SessionStorage),cd.sendRWGConnectionPerformance("WCL_M, JMCT(".concat(performance.now()-d,")"));const m=[vo(e.payload.body),Ro(performance.now())];return ui.getInstance().init(),_&&(m.push(mo(!1)),void 0!==v&&void 0!==y&&m.push(Zr())),l&&m.push(Ur()),E&&(f&&!0===f.isBO100Enabled&&m.push(Yu(a)),E.currentRoom.boConfId&&m.push(Gr()),void 0!==c&&m.push(ku(c))),void 0!==u&&m.push(No(!u)),ns("JOIN_MEETING_SUCCESS",{meetingNumber:i}),Ue(m)}return Vn.CONF_FAIL_CONFLOCKED===r?ns("JOIN_MEETING_FAILED",zn(r)):Vn.CONF_FAIL_CONF_USER_FULL===r?ns("JOIN_MEETING_FAILED",Object.assign({},zn(r),{lmUrl:e.payload.body.lmURL})):(Vn.CONF_FAIL_MEETING_OVER===r||Vn.CONF_RESULT_MMR_IB_REJECT===r||Vn.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===r||[Vn.CONF_FAIL_HAS_BEEN_REMOVED,Vn.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(r),ns("JOIN_MEETING_FAILED",zn(r))),Ue(ed(t,!1))})),handleMeetingAttributeChangeEpic:(e,t)=>pn(e,7938).pipe(Dt(t),Oe(([e,t])=>{const{payload:{body:r}}=e,{meeting:{zoomId:n,encType:o}}=t;if(void 0!==r.encryptKey&&ni.init(n,r.encryptKey,o),void 0!==r.gatewayKey){const e=ui.getInstance(),[,t,n]=r.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:n&&eo(n)}])}return ns("UPDATE_MEETING_ATTRIBUTE",r),yo(r)})),handleMeetingEndEpic:(e,t)=>pn(e,7939).pipe(Dt(t),He(([e,t])=>{const{payload:{body:r}}=e;if(void 0!==r.reason){if(Ln.LEAVEREASON_RECONNECT===r.reason)return jn.LEAVESUBREASON_WAITINGROOMFAILOVER===r.subReason?ns("RECONNECTING_MEETING",{reason:ko.OnHold}):ns("RECONNECTING_MEETING",{reason:ko.Failover}),ae(so());Ln.LEAVEREASON_KICKEDBYHOST===r.reason?ns("LEAVING_MEETING",{reason:"kicked by host"}):Ln.LEAVEREASON_ENDBYHOST!==r.reason&&Ln.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING!==r.reason||ns("LEAVING_MEETING",{reason:"ended by host"})}return t.meeting.isMeetingReset?ee:Ue(ed(t,!1))})),meetingFailoverEpic:(e,t)=>e.pipe(Lt("".concat(so)),Dt(t),He(([,e])=>{const t=ed(e,!0),r=function(e){if(e){const{meeting:{apiKey:t,signature:r,meetingNumber:n,userId:o,userName:i,lang:s,passWord:a,userEmail:c,sdkUrl:u,sdkOrigin:d,proxy:l,cv:p,zak:h}}=e;return{apiKey:t,signature:r,meetingNumber:n,userId:o,userName:i,lang:s,passWord:a,userEmail:c,sdkUrl:u,sdkOrigin:d,proxy:l,cv:p,ztk:h}}return null}(e);let n=ae(no(r)).pipe(dt(1e3));if(e.meeting.zlkJwtToken){const t=function(e){if(e){const{meeting:{topic:t,passWord:r,userName:n,zlkJwtToken:o,lang:i,cv:s}}=e;return{topic:t,passWord:r,userName:n,zlkJwtToken:o,lang:i,cv:s}}return null}(e),r=Object.assign({},{topic:null==t?void 0:t.topic,password:null==t?void 0:t.passWord,userName:null==t?void 0:t.userName,zlk:null==t?void 0:t.zlkJwtToken,lang:null==t?void 0:t.lang,cv:null==t?void 0:t.cv});n=ae(oo(r)).pipe(dt(1e3))}return We(Ue(t),n)})),hostChangeEpic:e=>_n(e,7940).pipe(wt(e=>{ns("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)}),Oe(e=>go(e.payload.body))),cohostChangeEpic:e=>_n(e,7941).pipe(wt(e=>{ns("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)}),Oe(e=>So(e.payload.body))),setMeetingOptEpic:e=>_n(e,7945).pipe(wt(e=>{const{payload:{body:{opt:t}}}=e;jo.set(Zo.WebclientOpt,t,Vo.SessionStorage)}),St(ee)),setMeetingOnHoldEpic:(t,r)=>pn(t,7942).pipe(wt(e=>{const{payload:{body:{bHold:t}}}=e;jo.set(Zo.WebclientIsOnHold,t?1:0,Vo.SessionStorage),ns("MEETING_IN_WAITING_ROOM",t)}),Dt(r),He(([t,r])=>{const n=[bo(t.payload.body.bHold)];if(t.payload.body.bHold){const t=ic(r);if(t){n.push(Io({audio:t.audio,video:t.bVideoOn,muted:t.muted}));const o=ui.getInstance();if("computer"===t.audio&&(o.leaveComputerAudio(),cd.joinOrLeaveVoip(!1)),t.bVideoOn&&o.stopCaptureVideo(),t.sharerOn&&(cd.stopSharing(t.userId),o.stopDesktopSharing(),n.push(Hc(e.ShareStatus.End))),r.video&&r.video.subscribedVideoList.length>0&&r.video.subscribedVideoList.forEach(e=>{cd.unsubscribeVideo(e)}),r.share&&r.share.isReceiveSharing){const e=r.share.activeNodeId;r.share.isRemoteControlApproved&&(cd.sharingRequestRemoteControl(e,!1),o.stopRemoteControl()),cd.unsubscribeSharing(e),o.stopRenderSharing()}}}return Ue(n)})),setMeetingDataCenterRegionEpic:e=>pn(e,7954).pipe(Oe(e=>To(e.payload.body))),claimHostResponseEpic:e=>pn(e,4216).pipe(wt(e=>{ns("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)}),St(ee)),leaveMeetingEpic:(e,t)=>e.pipe(Lt("".concat(ao),"".concat(co)),Dt(t),He(([e,t])=>(e.type==="".concat(ao)?(cd.leaveMeeting(),ns("LEAVING_MEETING",{})):e.type==="".concat(co)&&(cd.endMeeting(),ns("LEAVING_MEETING",{})),Ue(ed(t,!1))))),versionUpgradeEpic:e=>pn(e,2).pipe(wt(e=>{console.warn("Upgrade to latest version to optimize meeting experience")}),St(ee)),versionBlockEpic:e=>pn(e,1).pipe(wt(e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=zn(1e3);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,()=>t);r.reason=e}ns("JOIN_MEETING_FAILED",r)}),St(ee))});let ld=window.WEB_ENDPOINT||"zoom.us",pd="https://".concat(ld,"/wc/lsdk");const hd="https://dmogdx0jrul3u.cloudfront.net/".concat("2.0.0","/lib/core"),_d="https://source.zoom.us/".concat("2.0.0","/lib/core"),fd="https://jssdk.zoomus.cn/".concat("2.0.0","/lib/core");let vd=0;const yd={meetingStatus:"initial",isWindowOpen:!1,apiKey:"",signature:"",lang:"en-US",tk:"",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:null,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,enableQos:!0},Ed=Mr({["".concat(uo)]:Da((e,{payload:t})=>{Object.assign(e,t)}),["".concat(lo)]:Da((e,{payload:t})=>{e.isWindowOpen=t}),["".concat(po)]:Da((e,{payload:t})=>{e.apiKey=t.apiKey,e.signature=t.signature,e.lang=t.language}),["".concat(ho)]:Da((e,{payload:t})=>{e.zak=t}),["".concat(_o)]:Da((e,{payload:t})=>{e.tk=t.tk,e.mtkGuid=t.mtkGuid}),["".concat(fo)]:Da((e,{payload:t})=>{e.pingRWCTimestamp=t}),["".concat(vo)]:Da((e,{payload:t})=>{e.confId=t.confID,e.conId=t.conID,e.e2eEncrypt=t.e2eEncrypt,e.meetingNumber=parseInt(t.mn,10),e.zoomId=t.zoomID,e.meetingStatus="joined",e.jid=t.jid,e.xtoken=t.xtoken,e.groups=t.groups,e.svcUrl=t.svcUrl,e.encType=t.encType,e.userGUID=t.userGUID,e.userId=t.userID,e.role=t.role,e.participantID=t.participantID}),["".concat(yo)]:Da((e,{payload:t})=>{Object.assign(e,t)}),["".concat(go)]:Da((e,{payload:t})=>{e.isHost=t}),["".concat(So)]:Da((e,{payload:t})=>{e.isCoHost=t}),["".concat(bo)]:Da((e,{payload:t})=>{e.isOnHold=t}),["".concat(mo)]:Da((e,{payload:t})=>{e.isMeetingReset=t}),["".concat(Io)]:Da((e,{payload:t})=>{e.audioVideoBeforeOnHold=t}),["".concat(Ao)]:Da((e,{payload:t})=>{e.currentUserAudioBeforeReset=t}),["".concat(Oo)]:Da((e,{payload:t})=>{e.isCurrentUserMutedBeforeReset=t}),["".concat(Co)]:Da((e,{payload:t})=>{e.meetingStatus=t}),["".concat(To)]:Da((e,{payload:t})=>{e.region=t.region,e.network=t.network}),["".concat(wo)]:Da((e,{payload:t})=>{e.isCurrentUserStartVideoBeforeReset=t}),["".concat(Ro)]:Da((e,{payload:t})=>{e.joinMeetingTimeStamp=t}),["".concat(No)]:Da((e,{payload:t})=>{e.enableQos=t}),["".concat(Eo)]:Da((e,{payload:t})=>{Object.assign(e,d(d({},yd),{},{isMeetingReset:!0,currentUserAudioBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.audio:t.audio,isCurrentUserMutedBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.muted:t.muted,isCurrentUserStartVideoBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.video:t.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}))})},yd),gd=ln(dd,{meetingInfoEpic:(e,t)=>e.pipe(Lt("".concat(oo)),Ot(e=>{const r=Object.assign({},e.payload,{password:Qn(e.payload.password),topic:Qn(e.payload.topic)});return((e,t,r="zoomsdkjsonpcallback")=>new F(n=>{vd++;const o="".concat(r).concat(vd),i=document.createElement("script");Object.keys(t).forEach(e=>void 0===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()}}))(pd,r).pipe(at(e=>ae({status:!1,result:e.toString(),errorCode:-3e3})),He(r=>{const[n,o]=tt(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?ns("JOIN_MEETING_FAILED",qn(3004)):-3e3===e.errorCode?ns("JOIN_MEETING_FAILED",{reason:"connection error"}):3e3===e.errorCode?ns("JOIN_MEETING_FAILED",{reason:e.errorMessage,errorCode:200}):300===e.errorCode?ns("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?ns("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?ns("JOIN_MEETING_FAILED",{reason:"The token is expired or more than 2 days or ineffective.",errorCode:200}):124===e.errorCode&&ns("JOIN_MEETING_FAILED",{reason:"Verify JWT failed",errorCode:200}))}),n.pipe(fi(r=>{if(!0===r.status){const{result:{mid:n}}=r;return jo.init(n),We(ae(uo(Zu(r,e.payload))),un(ud,t,io()))}}))}))}))}),Sd={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0},bd=Mr({["".concat(tn)]:Da((e,{payload:t})=>{e.audioDecodeStatus=t}),["".concat(en)]:Da((e,{payload:t})=>{e.audioEncodeStatus=t}),["".concat(sn)]:Da((e,{payload:t})=>{e.sharingDecodeStatus=t}),["".concat(on)]:Da((e,{payload:t})=>{e.sharingEncodeStatus=t}),["".concat(nn)]:Da((e,{payload:t})=>{e.videoDecodeStatus=t}),["".concat(rn)]:Da((e,{payload:t})=>{e.videoEncodeStatus=t}),["".concat(an)]:Da((e,{payload:t})=>{e.mediaConstraints=t.mediaConstraints,e.assetsPath=t.assetsPath}),["".concat(cn)]:e=>d(d({},Sd),{},{mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath})},Sd),md=(e,t,r)=>Ke(...[t,r].map((t,r)=>{if("initial"!==t)return Ue(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return rt(ss("".concat(e.toUpperCase(),"_").concat(t,"_SUCCESS"),1).pipe(yt(!0)),ss("".concat(e.toUpperCase(),"_").concat(t,"_FAIL"),1).pipe(yt(!1)))}})),Id=()=>Ue(navigator.mediaDevices.enumerateDevices()).pipe(Oe(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 Ad(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 Od=si.createAgent();var Cd=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>pn(e,12033).pipe(Dt(t),Oe(([e,t])=>{const{participants:{attendeesList:r,allowTalkAttendeesList:n}}=t,o=e.payload.body,i={};return o&&([...r,...n].forEach(e=>{for(let t=1;t<=3;t++){const r="asn".concat(t),{userId:n,displayName:s}=e;if(void 0!==o[r]&&n===o[r]){i[r]={userId:n,displayName:s};break}}}),ns("AUDIO_ACTIVE_SPEAKER",Object.values(i))),_c(i)})),unmuteConsentAfterSpotlighted:(e,t)=>pn(e,16135).pipe(Dt(t),wt(([e,t])=>{const{payload:{body:{id:r,bLeadershipOn:n}}}=e,{audio:{bCanUnmute:o}}=t,i=ic(t);if(i){const{isHost:e,bCoHost:t,userId:s,audio:a,muted:c}=i,u=e||t;n&&s>>10==r>>10&&(null!==a&&""!==a&&!0!==c||!u&&!o||ns("AUDIO_UNMUTE_CONSENT",Di.Spotlight))}}),St(ee)),unmuteConsentEpic:(e,t)=>pn(e,12037).pipe(Dt(t),wt(([,e])=>{const t=ic(e);null!==(null==t?void 0:t.audio)&&""!==(null==t?void 0:t.audio)&&1==(null==t?void 0:t.muted)&&ns("AUDIO_UNMUTE_CONSENT",Di.Unmute)}),St(ee)),setAudioAttributeEpic:(e,t)=>pn(e,7938).pipe(Ze(e=>["bCanUnmute","bMutedAll","bMutedUponEntry"].some(t=>void 0!==e.payload.body[t])),_i(e=>{if(void 0!==e.payload.body.bCanUnmute)return fc(e.payload.body.bCanUnmute);if(void 0!==e.payload.body.bMutedAll){const r=ic(t.value);if(("computer"===(null==r?void 0:r.audio)||"phone"===(null==r?void 0:r.audio))&&0==r.muted)return gc(e.payload.body.bMutedAll)}return void 0!==e.payload.body.bMutedUponEntry?mc(e.payload.body.bMutedUponEntry):void 0})),currentUserAudioChangeEpic:(e,t)=>pn(e,7937).pipe(Dt(t),Ze(([,e])=>e.socket.zoomSocketStatus===Is.Connected),fi(([e,t])=>{if(e.payload.body.update&&e.payload.body.update.some(e=>void 0!==e.audio||void 0!==e.muted)){const r=ic(t),n=e.payload.body.update,[o,i]=tt(Ue(n),e=>e.id===(null==r?void 0:r.userId));i.subscribe(e=>{ns("AUDIO_PARTICIPANT_AUDIO_UPDATE",e)});const{audio:{isActiveOperation:s,isMutedAll:a},audio:{activeMicrophone:c,activeSpeaker:u,audioSsrc:d}}=t,l=Ja(r.userRole);return o.pipe(wt(e=>{e.audio!==(null==r?void 0:r.audio)&&(""===e.audio?ns("AUDIO_CURRENT_USER_LEAVE_AUDIO"):"computer"===e.audio?ui.getInstance().joinComputerAudio(d,c,u,!l):"phone"===e.audio&&("computer"===(null==r?void 0:r.audio)&&(ui.getInstance().leaveComputerAudio(),Od.joinOrLeaveVoip(!1)),ns("AUDIO_CURRENT_USER_JOIN_BY_PHONE"))),(null==r?void 0:r.audio)&&""!==(null==r?void 0:r.audio)&&e.muted!==(null==r?void 0:r.muted)&&(!0===e.muted?ns("AUDIO_CURRENT_USER_MUTED",{source:s?"active":a?"passive(mute all)":"passive(mute one)"}):!1===e.muted&&ns("AUDIO_CURRENT_USER_UNMUTED",{source:s?"active":"passive"}))}),Ze(e=>""!==(null==r?void 0:r.audio)&&e.muted!==(null==r?void 0:r.muted)),St(ae(Sc(!1),gc(!1))))}})),handleDialOutEpic:(e,t)=>pn(e,8198).pipe(Dt(t),Ze(([e,t])=>e.payload.seq==t.audio.dialout.sequence),wt(([e])=>{const t=e.payload.body.result;ns("AUDIO_DIALOUT_RESULT_CODE",{code:t}),t===Pi.Success?ns("AUDIO_DIALOUT_RESULT_SUCCESS"):-1===[Pi.Calling,Pi.Ringing,Pi.Accepted,Pi.Success].indexOf(t)&&ns("DIALOUT_FAIL")}),Oe(([e])=>yc(e.payload.body.result))),handleDialouCancelEpic:e=>pn(e,8200).pipe(wt(e=>{const t=e.payload.body.result;[0,11].indexOf(t)>-1?ns("AUDIO_DIALOUT_CANCEL_SUCCESS"):ns("DIALOUT_CANCEL_FAIL",t)}),Ze(e=>0===e.payload.body.result||11===e.payload.body.result),yt(yc(-1))),handleAllowToTalkEpic:(e,t)=>pn(e,12036).pipe(Dt(t),fi(([e,t])=>{const r=ic(t),{media:{audioEncodeStatus:n},audio:{audioSsrc:o,activeMicrophone:i,activeSpeaker:s}}=t,{promoterID:a,bAllowTalk:c}=e.payload.body;if((null==r?void 0:r.userId)===a){const e=ui.getInstance();if(c){let t=ae(!0);return"success"!==n&&(e.enableAudioEncode(),t=rt(ss("AUDIO_ENCODE_SUCCESS",1).pipe(yt(!0)),ss("AUDIO_ENCODE_FAIL",1).pipe(yt(!1)))),t.pipe(wt(t=>{t&&(e.joinComputerAudio(o,i,s,!0),ns("AUDIO_UNMUTE_CONSENT",Di.AllowToTalk))}),yt(Ec(!0)))}return Od.mute(a,!0),e.leaveComputerAudio(),it(300).pipe(wt(()=>{e.joinComputerAudio(o,i,s,!1)}),yt(Ec(!1)))}})),handleAllowToTalkResponseEpic:e=>pn(e,8205).pipe(wt(e=>{ns("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)}),St(ee)),handleAttendeePromoteDepromote:(e,t)=>hn(e,"POOL").pipe(Ze(e=>e.payload.data.action===di.Depromote||e.payload.data.action===di.Promote),Dt(t),wt(([e,t])=>{const r=ic(t);"phone"===(null==r?void 0:r.audio)?Od.audioDrop(r.userId):"computer"===(null==r?void 0:r.audio)&&(e.payload.data.action,di.Promote)}),St(ee)),setAudioSSRCEpic:(e,t)=>pn(e,12035).pipe(Dt(t),He(([e,t])=>{const{meeting:{currentUserAudioBeforeReset:r},media:{audioDecodeStatus:n,audioEncodeStatus:o}}=t,{payload:{body:{ssrc:i}}}=e;let s=void 0;const a=ic(t);if(a&&"computer"===r&&""===a.audio){const e=Ja(a.userRole);s=md("audio",e?"success":o,n).pipe(Ze(([e,t])=>e&&t),wt(()=>{Od.joinOrLeaveVoip(!0)}),yt(Ao(void 0)))}return s?Xe(ae(bc(i)),s):ae(bc(i))})),handleMergeAudioEpic:(e,t)=>pn(e,7952).pipe(Ot(e=>ss("AUDIO_CURRENT_USER_JOIN_BY_PHONE",1).pipe(Dt(t),wt(([,t])=>{const{BindStatus:r,nOperatorUserId:n}=e.payload.body,o=t.participants.attendeesList.find(e=>e.userId===n);!0===r&&ns("AUDIO_MERGE_AUDIO_INDICATION",{operatorName:null==o?void 0:o.displayName,operatorUserId:n,operatorRole:null==o?void 0:o.userRole})})))),handleUserGrantAudioCaptureEpic:(e,t)=>fn(e,Ri.UserGrantCaptureAudio).pipe(Dt(t),He(([,e])=>{ns("AUDIO_CURRENT_USER_JOIN_BY_VOIP");const t=ic(e),{meeting:{isCurrentUserMutedBeforeReset:r},audio:{bMutedUponEntry:n,isUserGrantCaptureAudio:o}}=e,i=[Ic(!0)];return t&&(!0===t.muted&&Od.mute(t.userId,!0),(!0===r||!o&&!t.isHost&&n)&&(Od.mute(t.userId,!0),r&&i.push(Oo(void 0)))),Ue(i)})),handleUserForbiddenMicrophoneEpic:e=>fn(e,Ri.UserForbiddedCaptureAudio).pipe(wt(()=>{ns("USER_FORBIDDEN_MICROPHONE")}),yt(Ac(!0))),handleAudioSocketErrorEpic:e=>fn(e,Ri.AudioWebsocketBroken).pipe(wt(()=>{ns("ESTABLISH_AUDIO_STREAM_ERROR")}),St(ee)),handleAudioZeroDataEpic:(e,t)=>fn(e,Ri.AudioZeroData).pipe(Dt(t),_i(([,e])=>{const{audio:{webrtcRestartCount:t,activeMicrophone:r}}=e;if(t<3)return ui.getInstance().restoreWebRTC(r),Oc(t+1)})),handleAutoPlayEpic:(e,t)=>e.pipe(Lt("".concat(Nc)),Ze(e=>!1===e.payload),He(()=>(ns("AUDIO_AUTO_PLAY_FAILED"),rt(ze(document,"click").pipe(_t(1)),ze(document,"touchend").pipe(_t(1))).pipe(Dt(t),wt(([,e])=>{const{audio:{audioSsrc:t,activeMicrophone:r,activeSpeaker:n}}=e,o=ic(e),i=Ja(o.userRole);ui.getInstance().joinComputerAudio(t,r,n,!i),Od.joinOrLeaveVoip(!0)}),yt(Nc(!0))))))});const Td={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},wd=Mr({["".concat(_c)]:Da((e,{payload:t})=>{e.asnIds=d({},t)}),["".concat(fc)]:Da((e,{payload:t})=>{e.bCanUnmute=t}),["".concat(vc)]:Da((e,{payload:t})=>{const{dialout:r}=e;r.sequence=t}),["".concat(yc)]:Da((e,{payload:t})=>{const{dialout:r}=e;r.returnCode=t}),["".concat(Ec)]:Da((e,{payload:t})=>{e.isAllowToTalk=t}),["".concat(Sc)]:Da((e,{payload:t})=>{e.isActiveOperation=t}),["".concat(gc)]:Da((e,{payload:t})=>{e.isMutedAll=t}),["".concat(bc)]:Da((e,{payload:t})=>{e.audioSsrc=t}),["".concat(mc)]:Da((e,{payload:t})=>{e.bMutedUponEntry=t}),["".concat(Ic)]:Da((e,{payload:t})=>{e.isUserGrantCaptureAudio=t}),["".concat(Ac)]:Da((e,{payload:t})=>{e.isMicrophoneForbidden=t}),["".concat(Oc)]:Da((e,{payload:t})=>{e.webrtcRestartCount=t}),["".concat(Cc)]:Da((e,{payload:t})=>{e.microphoneDevicesList=t}),["".concat(Tc)]:Da((e,{payload:t})=>{e.speakerDevicesList=t}),["".concat(wc)]:Da((e,{payload:t})=>{e.activeMicrophone=t}),["".concat(Rc)]:Da((e,{payload:t})=>{e.activeSpeaker=t}),["".concat(Nc)]:Da((e,{payload:t})=>{e.canPlayAudio=t}),["".concat(Dc)]:({dialout:{returnCode:e}})=>d(d({},Td),{},{dialout:d(d({},Td.dialout),{},{returnCode:e})}),["".concat(Pc)]:Da((e,{payload:t})=>{e.isComputerAudioLoading=t})},Td),Rd=ln(Cd),Nd=e=>4294966272&e,Dd=si.createAgent(),Pd=ui.getInstance();var Md=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>fn(e,Ri.StartVideoCaptureSuccess).pipe(Dt(t),_i(([,e])=>{const{video:{cameraDevicesList:t,activeCamera:r},meeting:{userId:n}}=e;return t.length<1?(ns("CAN_NOT_DETECT_CAMERA",{reason:"Cannot detect camera devices"}),void Pd.stopCaptureVideo()):"default"===r||t.some(e=>e.deviceId===r)?void Dd.muteAttendeeVideo(n,!1):(ns("CAN_NOT_FIND_CAMERA",{reason:"cannot find target camera"}),void Pd.stopCaptureVideo())})),startVideoResponse:(e,t)=>pn(e,7937).pipe(Dt(t),Ze(([e,t])=>{var r,n,o,i;const s=oc(t);return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id)===s}),Ze(([e,t])=>{var r,n,o,i;return!0===(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.bVideoOn)}),_i(()=>(ns("VIDEO_CAPTURE_START_SUCCESS"),$c(!0)))),handleForbiddenCaptureVideoEpic:e=>fn(e,Ri.UserForbiddedCaptureVideo).pipe(wt(()=>ns("VIDEO_USER_FORBIDDEN_CAPTURE")),yt(tu(!0))),handleCameraIsTakenByOtherProgramsEpic:e=>fn(e,Ri.UserCameraIsTakenByOtherPrograms).pipe(wt(()=>ns("VIDEO_CAMERA_IS_TAKEN",{reason:"User camera is taken by other programs."})),yt(su(!0))),handleVideoSocketErrorEpic:e=>fn(e,Ri.VideoWebsocketBroken).pipe(wt(()=>{ns("VIDEO_ESTABLISH_STREAM_ERROR",{reason:"Video websocket broken."})}),St(ee)),handleStopVideoCaptureFailedEpic:e=>fn(e,Ri.StopVideoCaptureFailed).pipe(wt(()=>{ns("VIDEO_CAPTURE_STOP_RESULT",{failed:!0,reason:"Unknown."})}),St(ee)),handleStopVideoCaptureSuccessEpic:(e,t)=>fn(e,Ri.StopVideoCaptureSuccess).pipe(Dt(t),_i(([,e])=>{const{meeting:{userId:t},video:{isCurrentUserStartedVideo:r}}=e;r||ns("VIDEO_CAPTURE_STOP_RESULT"),Dd.muteAttendeeVideo(t,!0)})),stopVideoResponse:(e,t)=>pn(e,7937).pipe(Dt(t),Ze(([e,t])=>{var r,n,o,i;const s=oc(t);return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id)===s}),Ze(([e,t])=>{var r,n,o,i;return!1===(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.bVideoOn)}),_i(()=>(ns("VIDEO_CAPTURE_STOP_RESULT"),$c(!1)))),receiveVideoMuteIndication:(e,t)=>pn(e,16133).pipe(Dt(t),Ze(([e,t])=>{var r,n;return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n?void 0:n.id)===oc(t)}),_i(([e,t])=>{const{id:r,bVideoMute:n}=e.payload.body;return ns("RECEIVE_VIDEO_MUTE_INDICATION",{id:r,isVideoMuted:n}),!0===n&&Pd.stopCaptureVideo(),!1===n&&ns("ASK_FOR_START_VIDEO_CONSENT",{id:r,isVideoMuted:n}),ou(n)})),receiveVideoActiveIndication:e=>pn(e,16129).pipe(Oe(e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,n=Nd(t);return ns("RECEIVE_VIDEO_ACTIVE_INDICATION",{bVideoOn:r,userId:n}),Xc({bVideoOn:r,userId:n})})),receiveVideoSsrcIndication:(e,t)=>pn(e,16131).pipe(Ze(e=>void 0!==e.payload.body.ssrc),Dt(t),Ot(([e,t])=>{const{meeting:{isCurrentUserStartVideoBeforeReset:r},media:{videoEncodeStatus:n},video:{captureCanvasList:o,activeCamera:i,isVerifiedVideoCaptureCanvasAfterFailover:s}}=t,{payload:{body:{ssrc:a}}}=e;let c=void 0;const u=ic(t);return u&&!0===r&&!0!==u.bVideoOn&&(c=md("video",n,"success").pipe(Ze(([e,t])=>e&&t),He(()=>{const e=[$c(void 0)];return!1===s&&(Array.isArray(o)?o.forEach(e=>{Ad(document.querySelector("#".concat(e)))}):Ad(document.querySelector("#".concat(o))),e.push(cu(!0))),ui.getInstance().startCaptureVideo(a,i,640,360),Ue(e)}))),c?Xe(ae(Yc(a)),c):ae(Yc(a))})),receiveVideoDecodeMaxSizeEpic:e=>fn(e,Ri.VideoDecodeMaxSize).pipe(Ze(e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data}),fi(e=>{const{size:t}=e.payload.data;return ae(ru(t))})),spotlightVideoResponseEpic:e=>pn(e,16135).pipe(Oe(e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,n=[];return t&&n.push(Nd(r)),ns("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),eu(n)})),handleGroupLayoutIndicationEpic:(e,t)=>pn(e,7958).pipe(Dt(t),Oe(([e,t])=>{const{payload:{body:r}}=e;let n=[];r&&r.group_list&&r.group_list[0]&&(n=r.group_list[0].map(e=>e.id));const o=dc(t);return n=n.filter(e=>o.findIndex(t=>t.userId===e)>=0),ns("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),eu(n)})),handleCurrentVideoResolution:e=>fn(e,Ri.CurrentVideoResolution).pipe(_i(e=>(ns("VIDEO_RENDER_START_SUCCESS"),ns("RECEIVE_VIDEO_DIMENSION_CHANGE",e.payload.data),du(e.payload.data)))),handleMeetingVideoAttributeEpic:e=>pn(e,7938).pipe(Ze(e=>void 0!==e.payload.body.bFollowHostVideo),Oe(e=>(ns("VIDEO_FOLLOW_HOST_ORDER_CHANGE",{bOn:e.payload.body.bFollowHostVideo}),hu(e.payload.body.bFollowHostVideo)))),handleHostDragLayoutIndicationEpic:(e,t)=>pn(e,7957).pipe(Dt(t),Oe(([e,t])=>{const{video:{isFollowHostVideoLayout:r}}=t,{payload:{body:n}}=e,o=n&&n.drag_list&&n.drag_list.map(e=>e.id);return r&&ns("VIDEO_HOST_DRAG_LAYOUT_CHANGE",{layout:o}),_u(o)})),handlePeerVideoStateChangeEpic:(e,t)=>pn(e,7937).pipe(Dt(t),Ze(([e,t])=>{const{meeting:{userId:r},video:{subscribedVideoList:n}}=t,o=e.payload.body.update,i=e.payload.body.remove;return o&&o.length>0&&o.findIndex(e=>e.id!==r&&(void 0!==e.bVideoOn||e.bHold))>-1||i&&i.some(e=>n.includes(e.id))}),wt(([e,t])=>{const{payload:{body:{remove:r,update:n}}}=e,{video:{subscribedVideoList:o}}=t,i=uc(t);if(r&&r.length>0&&r.filter(e=>o.includes(e.id)).forEach(e=>{ns("VIDEO_OLD_USER_STOP",{userId:e.id})}),n&&n.length>0){const e=n.filter(e=>void 0!==e.bVideoOn).filter(e=>-1===i.findIndex(t=>t.userId===e.id)),t=n.filter(e=>!0===e.bHold);t.length>0&&t.filter(e=>o.includes(e.id)).forEach(e=>{ns("VIDEO_OLD_USER_STOP",{userId:e.id})}),e.forEach(e=>{e.bVideoOn?ns("VIDEO_NEW_USER_START",{userId:e.id}):ns("VIDEO_OLD_USER_STOP",{userId:e.id})})}}),St(ee))});const kd={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:[]},Ud=Mr({["".concat(Yc)]:Da((e,{payload:t})=>{e.videoSsrc=t}),["".concat(Qc)]:Da((e,{payload:t})=>{e.cameraDevicesList=t}),["".concat(Zc)]:Da((e,{payload:t})=>{e.activeCamera=t}),["".concat(Xc)]:Da((e,{payload:t})=>{e.activeVideoId=t.userId}),["".concat($c)]:Da((e,{payload:t})=>{e.isCurrentUserStartedVideo=t}),["".concat(eu)]:Da((e,{payload:t})=>{e.spotlightUserList=t}),["".concat(tu)]:Da((e,{payload:t})=>{e.isCaptureForbidden=t}),["".concat(ru)]:Da((e,{payload:t})=>{e.receivedVideoMaxQuality=t}),["".concat(nu)]:Da((e,{payload:t})=>{let r=t;Array.isArray(t)||(r=[t]),e.captureCanvasList=r}),["".concat(ou)]:Da((e,{payload:t})=>{e.isVideoMuted=t}),["".concat(iu)]:Da((e,{payload:t})=>{e.isCaptureCameraLoading=t}),["".concat(su)]:Da((e,{payload:t})=>{e.isCameraTaken=t}),["".concat(cu)]:Da((e,{payload:t})=>{e.isVerifiedVideoCaptureCanvasAfterFailover=t}),["".concat(au)]:Da((e,{payload:t})=>{e.isVerifiedVideoRenderCanvasAfterFailover=t}),["".concat(uu)]:e=>d(d({},kd),{},{captureCanvasList:e.captureCanvasList,activeCamera:e.activeCamera,isVerifiedVideoCaptureCanvasAfterFailover:!1,isVerifiedVideoRenderCanvasAfterFailover:!1}),["".concat(du)]:Da((e,{payload:t})=>{e.receivedVideoDimension=t}),["".concat(lu)]:Da((e,{payload:t})=>{e.subscribedVideoList.includes(t)||e.subscribedVideoList.push(t)}),["".concat(pu)]:Da((e,{payload:t})=>{const r=e.subscribedVideoList.indexOf(t);r>=0&&e.subscribedVideoList.splice(r,1)}),["".concat(fu)]:Da((e,{payload:t})=>{-1===e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key)&&e.renderedVideoList.push(d({},t))}),["".concat(vu)]:Da((e,{payload:t})=>{const r=e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key);r>=0&&e.renderedVideoList.splice(r,1)}),["".concat(hu)]:Da((e,{payload:t})=>{e.isFollowHostVideoLayout=t}),["".concat(_u)]:Da((e,{payload:t})=>{e.hostDragLayout=t})},kd),Vd=ln(Md),{InitSuccessVideo:Ld,InitSuccessAudio:jd,InitSuccessSharing:Hd,InitFailedVideo:xd,InitFailedAudio:Fd,InitFailedSharing:Gd}=Ri;let Bd;const Wd=new J(dn(gd,ka,hc,ln(Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(Lt("".concat(Zr)),Dt(t),Ze(([,e])=>void 0!==e.media.assetsPath&&void 0!==e.media.mediaConstraints),wt(([,e])=>{const{media:{assetsPath:r,mediaConstraints:n},meeting:{enableQos:o}}=e;Bd=ui.getInstance(),r&&n&&Bd.setAssetsAndConstraint(r,n);const i=ic(e);let s;s=i?ae(i):ss("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1).pipe(le(Se),Dt(t),Oe(([,e])=>ic(e))),s.pipe(Dt(t)).subscribe(([e,t])=>{const{meeting:{svcUrl:r,meetingNumber:n,conId:i,e2eEncrypt:s,userId:a,isWebinar:c}}=t;var u;e&&(null===(u=Bd)||void 0===u||u.connect({svcUrl:r,meetingNumber:n,conId:i,e2eEncrypt:s,isViewOnly:Ja(e.userRole),currentUserId:a,isWebinar:c,enableQos:o}))})}),Ot(()=>Je(e=>{var t;return null===(t=Bd)||void 0===t?void 0:t.registerCallback(e)},e=>{var t;return null===(t=Bd)||void 0===t?void 0:t.unregisterCallback(e)},(e,t)=>({type:e,data:t})).pipe(Oe(e=>$r(e))))),connectedMediaStreamEpic:e=>fn(e,[Ld,jd,Hd,xd,Fd,Gd]).pipe(fi(e=>{const{payload:{type:t,data:r}}=e;if(t===jd||t===Fd){if(r===Ni.EncodeSuccess)return ns("AUDIO_ENCODE_SUCCESS"),ae(en("success"));if(r===Ni.DecodeSuccess)return ns("AUDIO_DECODE_SUCCESS"),ae(tn("success"));if(r===Ni.EncodeFailed)return ns("AUDIO_ENCODE_FAIL"),ae(en("failed"));if(r===Ni.DecodeFailed)return ns("AUDIO_DECODE_FAIL"),ae(tn("failed"))}else if(t===Ld||t===xd){if(r===Ni.EncodeSuccess)return ns("VIDEO_ENCODE_SUCCESS"),ae(rn("success"));if(r===Ni.DecodeSuccess)return ns("VIDEO_DECODE_SUCCESS"),ae(nn("success"));if(r===Ni.EncodeFailed)return ns("VIDEO_ENCODE_FAIL"),ae(rn("failed"));if(r===Ni.DecodeFailed)return ns("VIDEO_DECODE_FAIL"),ae(nn("failed"))}else if(t===Hd||t===Gd){if(r===Ni.EncodeSuccess)return ns("SHARING_ENCODE_SUCCESS"),ae(on("success"));if(r===Ni.DecodeSuccess)return ns("SHARING_DECODE_SUCCESS"),ae(sn("success"));if(r===Ni.EncodeFailed)return ns("SHARING_ENCODE_FAIL"),ae(on("failed"));if(r===Ni.DecodeFailed)return ns("SHARING_DECODE_FAIL"),ae(sn("failed"));if(t===Hd&&void 0===r)return ns("SHARING_DECODE_SUCCESS"),ae(sn("success"))}})),mediaDeviceUpdateEpic:(e,t)=>fn(e,[Ld,jd]).pipe(vi(()=>{if("object"==typeof navigator.mediaDevices)return Xe(Id(),Xe(fn(e,Ri.StartVideoCaptureSuccess),ze(navigator.mediaDevices,"devicechange"),fn(e,Ri.UserGrantCaptureAudio)).pipe(He(()=>Id().pipe(wt(()=>{ns("MEDIA_DEVICE_CHANGE")}))))).pipe(Dt(t),He(([e,t])=>{const r=[Cc(e.microphones),Tc(e.speakers),Qc(e.cameras)];if(t.audio){const{audio:{activeMicrophone:i,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:c}}=t,{microphones:u,speakers:d}=e,l=a.filter(e=>-1===u.findIndex(t=>t.deviceId===e.deviceId)),p=c.filter(e=>-1===d.findIndex(t=>t.deviceId===e.deviceId));var n,o;l.length>0&&l[0].deviceId===i&&(null===(n=Bd)||void 0===n||n.changeMicrophone("default"),r.push(wc("default"))),p.length>0&&p[0].deviceId===s&&(null===(o=Bd)||void 0===o||o.changeSpeaker("default"),r.push(Rc("default")))}return Ue(r)}))})),sendUserNodeListToMediaSDKEpic:e=>pn(e,7937).pipe(wt(e=>{const{payload:{body:t}}=e,r=ui.getInstance();t.add&&r.sendUserNodeList(t.add.map(e=>({userid:e.id,sn:e.zoomID&&eo(e.zoomID)}))),t.remove&&r.sendUserNodeList(t.remove.map(e=>({userid:e.id,bremove:!0})))}),St(ee)),handleMediaSdkGcmIVResponseEpic:e=>fn(e,Ri.AesGcmIvResponse).pipe(wt(e=>{const{payload:{data:{workerType:t,iv:r}}}=e,n=jo.get(Zo.WebclientIVState);if(n){const e=d(d({},n),{},{[t]:r});jo.set(Zo.WebclientIVState,e,Vo.SessionStorage)}}),St(ee))})))),Kd=(e,t,r)=>Wd.pipe(He(n=>n(e,t,r))),qd={meeting:Ed,socket:Ma,participants:Za,media:bd},zd=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 Ht(i),c=new xt(s,o.getState());return n.pipe(Oe((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})),He((function(e){return Ue(e).pipe(It(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}(),Jd=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||b;function Yd(e){return function(e){for(var t=Object.keys(e),r={},n=0;ne.userId===t);if(o.findIndex(e=>e===sl.Attendee)>-1&&(i=cc(r).find(e=>e.userId===t)),!i)return Promise.reject({type:Yi,reason:"no matching user"});{const{meeting:{userId:e}}=n.getState();for(let r=0;r{if(this[$d][e]&&void 0===o.getState()[e]){const{epic:t,reducer:r,Client:n}=this[$d][e];o.injectReducer(e,r),o.injectEpic(t);const i=new n(o);this.modules.set(e,i)}}),(null==n?void 0:n.audio)&&void 0===o.getState().audio&&(o.injectReducer("audio",wd),o.injectEpic(Rd)),(null==n?void 0:n.video)&&void 0===o.getState().video&&(o.injectReducer("video",Ud),o.injectEpic(Vd)),(null==n?void 0:n.screen)&&void 0===o.getState().share&&(o.injectReducer("share",sd),o.injectEpic(ad))}return n(po({apiKey:e,signature:t,language:s})),n(an({mediaConstraints:r&&r.constraints||{},assetsPath:i})),new Promise((e,t)=>{Do(c,()=>{e("")},()=>{t({type:Yi,reason:"depedent assets are not accessible"})})})}on(e,t){((e,t)=>{const r=Zi[e];if(r){const n=ts.get(e);if(n)n.push(t),ts.set(e,n);else{const n=[t];ts.set(e,n);const o=Xe(...r.map(e=>{const{event:t,payload:r}=e;return ze($i,t).pipe(Oe(e=>r(e)),le(Se))})).subscribe(t=>{const r=ts.get(e);r&&r.forEach(e=>{e(t)})});rs.push(o)}}})(e,t)}off(e,t){((e,t)=>{if(Zi[e]){const r=ts.get(e);if(Array.isArray(r)){const n=r.findIndex(e=>e===t);n>-1&&(r.splice(n,1),ts.set(e,r))}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[Qd]:e,[Zd]:t}=this;return"connected"===e().socket.zoomSocketStatus&&t(ao()),Promise.resolve("")}end(){const{[Qd]:e,[Zd]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(co()),it(500).pipe(wt(()=>{as()}),yt("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[Xd].getState(),{meeting:{bAllowAttendeeRename:n}}=r,o=ic(r),i=Ja(o.userRole),s=sc(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 pl.rename(t,Qn(e),Qn(o.displayName)),td(t,t=>t.displayName===e);{const n=cc(r).find(e=>e.userId===t);return n?(hi.getInstance().rename(n.jid,e),is("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",t=>{const r=t.find(e=>e.jid===n.jid);return r&&r.name===e})):Promise.reject({type:Yi,reason:"no matching user"})}}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})}return e===o.displayName?Promise.resolve():s||n?(pl.rename(o.userId,Qn(e),Qn(o.displayName)),is("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t=>t.displayName===e)):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host disallow rename themselves"})}makeHost(e){return pl.assignHost(e,!1),td(e,e=>!0===e.isHost)}makeCoHost(e){const t=this[Xd].getState(),r=dc(t).find(t=>t.userId===e);return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:Yi,reason:"user:[".concat(e,"] is already co-host ")}):(pl.assignHost(e,!0),td(e,e=>!0===e.bCoHost))}revokeCoHost(e){const t=this[Xd].getState(),r=dc(t).find(t=>t.userId===e);return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:Yi,reason:"user:[".concat(e,"] is not a co-host")}):(pl.revokeCoHost(e),td(e,e=>!1===e.bCoHost))}isHost(){const e=this[Xd].getState(),t=ic(e);return!!t&&t.isHost}isCoHost(){const e=this[Xd].getState(),t=ic(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[Qd]();return e}getCurrentUserInfo(){const e=this[Xd].getState(),t=ic(e);if(t){const r={userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:qa(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,sharePause:t.sharerPause,feedback:t.feedback};if(e.meeting.isWebinar&&Ja(t.userRole)){const{participants:{allowTalkAttendeesList:n}}=e,o=n.find(e=>e.userId===t.userId),i=!!o;Object.assign(r,{isAllowToTalk:i}),o&&Object.assign(r,{audio:o.audio,muted:o.muted})}return r}return null}getParticipantsList(){const e=this[Xd].getState(),{meeting:{isWebinar:t,meetingStatus:r}}=e,n=ic(e);return"joined"!==r||!n||n.bHold||t&&Ja(n.userRole)?[]:dc(e).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,isPhoneUser:qa(e.userType),bRaiseHand:e.bRaiseHand,bHold:e.bHold,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause,feedback:e.feedback}))}getMeetingHost(){const e=this[Qd](),{meeting:{isWebinar:t}}=e;if(t){const t=ic(e);if(t&&!Ja(t.userRole)){const t=lc(e);if(t)return{userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:qa(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,feedback:t.feedback}}}else{const t=lc(e);if(t)return{userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:qa(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,feedback:t.feedback}}return null}getMeetingInfo(){const{meeting:{meetingStatus:e,isOnHold:t,meetingNumber:r,passWord:n,userName:o,userEmail:i,meetingTopic:s,encType:a,region:c,network:u,topic:d,zlkJwtToken:l,userId:p}}=this[Qd](),h="joined"===e&&!t;if(l)return{topic:d,password:n,userName:o,isInMeeting:h,userId:p};{let e="";return 0===a?e="None":1===a?e="AES ECB":2===a&&(e="AES GCM"),{meetingNumber:r,password:n,userName:o,userEmail:i,meetingTopic:s,encryptionType:e,region:c,network:u,isInMeeting:h,userId:p}}}}).prototype,"end",[ol,rl],Object.getOwnPropertyDescriptor(ll.prototype,"end"),ll.prototype),l(ll.prototype,"changeName",[rl],Object.getOwnPropertyDescriptor(ll.prototype,"changeName"),ll.prototype),l(ll.prototype,"makeHost",[cl,ol,rl],Object.getOwnPropertyDescriptor(ll.prototype,"makeHost"),ll.prototype),l(ll.prototype,"makeCoHost",[ul,ol,rl],Object.getOwnPropertyDescriptor(ll.prototype,"makeCoHost"),ll.prototype),l(ll.prototype,"revokeCoHost",[dl,ol,rl],Object.getOwnPropertyDescriptor(ll.prototype,"revokeCoHost"),ll.prototype),ll);!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"}(hl||(hl={})),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"}(_l||(_l={}));const vl=[hl.All,hl.Host,hl.NoOne,hl.EveryonePublicly],yl=[hl.NoAttendee,hl.All,hl.AllPanelist],El={userId:_l.All,displayName:"Everyone",isHost:!1,isCoHost:!1},gl={userId:_l.Panelist,displayName:"All panelists"},Sl={userId:_l.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};var bl=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>hn(e,"Message").pipe(Dt(t),He(([e,t])=>{const{payload:{data:{sn:r,senderName:n,senderJid:o,receiver:i,text:s}}}=e,a=ic(t),c=cc(t),{meeting:{jid:u,userId:d},participants:{xmppAttendeeList:l}}=t;return ni.beginDecrypt({decryptedText:s,type:Qo.XMPP_CHAT,zoomId:r}).then(({message:e})=>{var t;let r=null,s=null,p=null;a&&Ja(a.userRole)&&u===i?(r=l.find(e=>e.jid===o),s=d,p=a.displayName):(r=c.find(e=>e.jid===o),s=_l.Panelist,p="All panelists");const h={message:e,sender:{name:n,userId:(null===(t=r)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:p,userId:s},timestamp:(new Date).getTime()};return ns("CHAT_RECEIVE_MESSAGE_EVENTS",h),Iu(h)})})),receiveChatMessageFromRWGEpic:(e,t)=>pn(e,7944).pipe(Dt(t),fi(([e,t])=>{const{meeting:{bIbDisableChat:r,isWebinar:n},participants:{attendeesList:o}}=t,{payload:{body:{attendeeNodeID:i,sn:s,destNodeID:a,text:c,senderName:u}}}=e,d=ic(t),l=cc(t);if(d){const e=Ja(null==d?void 0:d.userRole)&&i===d.userId;if(!r&&!e){let e,t=s;if(!s){const e=o.find(e=>e.userId===a);e&&(t=e.zoomID)}if(i===_l.SilentModeUsers){const t={message:Zn(c),sender:{name:"Host",userId:a},receiver:{name:"Everyone (in Waiting Room)",userId:i},timestamp:(new Date).getTime()};e=Promise.resolve(t)}else e=ni.beginDecrypt({decryptedText:c,zoomId:t,type:Qo.RWG_CHAT}).then(({message:e})=>{const t=o.find(e=>e.userId===a),r=u?Zn(u):null==t?void 0:t.displayName;let s="";if(i===_l.All)s=n?"All panelists and attendees":"Everyone";else if(i===_l.Panelist)s="All panelists";else if(n&&l.findIndex(e=>e.userId===i)>-1)s=l.find(e=>e.userId===i).displayName;else{const e=o.find(e=>e.userId===i);e&&(s=e.displayName)}return{message:e,sender:{name:r,userId:a,avatar:null==t?void 0:t.avatar},receiver:{name:s,userId:i},timestamp:(new Date).getTime()}});return e.then(e=>(ns("CHAT_RECEIVE_MESSAGE_EVENTS",e),Iu(e)))}}})),changePrivilegeResponse:(e,t)=>pn(e,7938).pipe(Ze(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)}),Dt(t),Oe(([e,t])=>{const{payload:{body:{chatPriviledge:r,bAllowAttendeeChat:n}}}=e,{chat:{chatPrivilege:o}}=t;return void 0!==n?(ns("CHAT_PRIVILEGE_CHANGE",!0===n?{chatPrivilege:o}:{chatPrivilege:hl.NoAttendee}),Ou(n)):(ns("CHAT_PRIVILEGE_CHANGE",{chatPrivilege:r}),mu(r))}))});const ml={chatHistory:[],chatPrivilege:hl.All,isAllowAttendeeChat:!0},Il=Mr({["".concat(Iu)]:Da((e,{payload:t})=>{e.chatHistory.push(t)}),["".concat(mu)]:Da((e,{payload:t})=>{e.chatPrivilege=t}),["".concat(Ou)]:Da((e,{payload:t})=>{e.isAllowAttendeeChat=t}),["".concat(Au)]:()=>d({},ml)},ml);function Al(e,t,r){if(null==r?void 0:r.host)return[lc(e),...pc(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=[lc(e),...pc(e),...e.participants.attendeesList.filter(e=>!(e.bCoHost||e.isHost))];if(null==r?void 0:r.includeAttendee){const t=cc(e).filter(e=>!qa(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 Ol;const Cl=si.createAgent(),Tl=hi.getInstance();let wl=(l((Ol=class extends tl{constructor(...e){super(...e),this.getHistory=()=>this[Qd]().chat.chatHistory.map(e=>d({},e))}send(e,t){if(!e)return Promise.reject({type:Yi,reason:"Text is empty"});const{[Qd]:r,[Zd]:n}=this,o=r(),i=ic(o),s=function(e,t){if(t===_l.All)return El;if(t===_l.Panelist)return gl;if(t===_l.SilentModeUsers)return Sl;{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?void 0:e.zoomID)||!(null==t?void 0:t.displayName)||n===e.userId)return{type:Yi,reason:"invalid target user"};const{chat:{chatPrivilege:o},meeting:{isWebinar:i}}=r,s=sc(r),a=t.isHost||t.bCoHost;if(!s)if(i&&Ja(e.userRole)){if(o===hl.NoAttendee||o===hl.AllPanelist&&n!==_l.Panelist||o===hl.All&&n!==_l.All&&n!==_l.Panelist)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"}}else if(o===hl.NoAttendee||o===hl.Host&&!a||n===_l.SilentModeUsers||o===hl.EveryonePublicly&&n!==_l.All&&!a)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"};return null})(i,s,o);if(a)return Promise.reject(a);const{meeting:{isWebinar:c,encType:u}}=o,d=u===Xo.AES_GCM;let l=Promise.resolve();return t===_l.SilentModeUsers?Cl.chat(Qn(e),t):l=ni.beginEncrypt({text:e,type:Qo.RWG_CHAT}).then(e=>{c?s.userRole===Wa.Attendee?(Tl.sendWebinarMsg(e,s.jid,_l.IndividualCcPanelist,d),Cl.chat(e,_l.Panelist,null==i?void 0:i.zoomID)):Ja(i.userRole)&&t===_l.Panelist?Tl.sendWebinarMsg(e,null,_l.Panelist,d):_l.All!==t&&_l.Panelist!==t&&s.userRole===Wa.Attendee||Cl.chat(e,t,null==i?void 0:i.zoomID):Cl.chat(e,t,null==i?void 0:i.zoomID)}),l.then(()=>{const t={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:(new Date).getTime()};return n(Iu(t)),ns("CHAT_RECEIVE_MESSAGE_EVENTS",t),t})}setPrivilege(e){const t=this[Qd](),{meeting:{isWebinar:r},chat:{chatPrivilege:n}}=t;return n===e?Promise.resolve(""):!r&&!vl.includes(e)||r&&!yl.includes(e)?Promise.reject({type:Yi,reason:"invalid privilege value of parameter"}):(Cl.setChatPriviledge(e),is("CHAT_PRIVILEGE_CHANGE",t=>t.chatPrivilege===e))}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[Qd]();return t?e:hl.NoAttendee}getReceivers(){const e=this[Qd](),{chat:{chatPrivilege:t,isAllowAttendeeChat:r},meeting:{isWebinar:n}}=e;if(!r)return[];const o=ic(e);if(o)if(n){if(!Ja(o.userRole))return Al(e,o.userId,{includeAttendee:!0});if(t===hl.All)return[gl,El];if(t===hl.AllPanelist)return[gl];if(t===hl.NoAttendee)return[]}else{const r=sc(e);if(t===hl.All||r){const t=Al(e,o.userId);return[El,...t]}if(t===hl.Host)return Al(e,o.userId,{host:!0});if(t===hl.EveryonePublicly){const t=Al(e,o.userId,{host:!0});return[El,...t]}if(t===hl.NoOne)return[]}return[]}}).prototype,"send",[rl],Object.getOwnPropertyDescriptor(Ol.prototype,"send"),Ol.prototype),l(Ol.prototype,"setPrivilege",[nl,rl],Object.getOwnPropertyDescriptor(Ol.prototype,"setPrivilege"),Ol.prototype),Ol);const Rl=ln(bl);let Nl;!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"}(Nl||(Nl={}));const Dl=(t,r)=>{const{store:{getState:n,dispatch:o},mediaAgent:i}=t,s=n(),{meeting:{bIbDisableShare:a},share:{sharePrivilege:c,ssrc:u,isChromeExtensionInstalled:l,isVerifiedCaptureCanvasAfterFailover:p},media:{sharingEncodeStatus:h}}=s;if(a)return Promise.reject({type:Ji,reason:"information barrier"});const _=sc(s),f=rd(s);if(c===e.SharePrivilege.OnlyHost&&!_)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can start screen share"});if(c===e.SharePrivilege.HostGrab&&!_&&f.length>0)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can grab screen share"});const v=ic(s);if(!0===(null==v?void 0:v.sharerOn))return Promise.reject({type:Ji,reason:"you have already started screen share."});let y=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(),y=ss("SHARE_CHECK_CHROME_SHARING_EXTENSION",1)),r.id||(r.id="__ZOOM_SDK_SHARE_CANVAS_@__".replace("@","".concat(Math.floor(1e4*Math.random())))),Ke([md("sharing",h,"success"),y]).subscribe(([e,t])=>{const[n]=e;if(n&&t){!1===p&&(Ad(r),o(qc(!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,r.id,"__ZOOM_SDK_SHARING_VIDEO__")}}),new Promise((e,t)=>{rt(ss("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1),ss("SHARE_CHECK_CHROME_SHARING_EXTENSION").pipe(Ze(e=>!e),_t(1),St(ce({reason:"required extension",extensionUrl:"https://chrome.google.com/webstore/detail/zoom-scheduler/kgjfgplpablkjnlkjmjdecgdpfankdle"}))),ss("SHARE_START_DESKTOP_SHARE_FAILED",1).pipe(St(ce({reason:"user deny screen share"})))).subscribe(r=>{!0===r.sharerOn?e(""):t({type:"INTERNAL_ERROR"})},e=>{t(d({type:Ji},e))})})},Pl=rc([dc],e=>e.filter(e=>e.bVideoOn));var Ml,kl,Ul,Vl,Ll,jl,Hl,xl,Fl,Gl,Bl,Wl,Kl,ql,zl,Jl,Yl,Xl,Ql,Zl,$l,ep,tp,rp;let np=(Ml=il("audio"),kl=il("audio"),Ul=il("audio"),Vl=il("audio"),Ll=il("audio"),jl=il("audio"),Hl=il("video"),xl=il("video"),Fl=il("video"),Gl=il("video"),Bl=il("video"),Wl=il("video"),Kl=il("video"),ql=il("video"),zl=il("share"),Jl=il("share"),Yl=il("share"),Xl=il("share"),Ql=il("share"),Zl=il("share"),$l=il("share"),ep=il("share"),op="isShareOptionLocked",tp=function(e,t,r){const n=r.value;r.value=function(...e){const t=this[Xd];if(t){const{meeting:{meetingOptions:e}}=t.getState();if(!0===e[op])return Promise.reject({type:"OPERATION_LOCKED",reason:"".concat(op," is locked")})}return n.apply(this,e)}},l((rp=class extends tl{constructor(e){super(e),this[Xd].dispatch(Zr()),this[el]={store:e,mediaAgent:ui.getInstance(),rwgAgent:si.createAgent()}}startAudio(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n}=e,o=t(),i=ic(o);if("computer"===(null==i?void 0:i.audio))return Promise.resolve();if("phone"===(null==i?void 0:i.audio))return Promise.reject({type:Ji,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:t,canPlayAudio:s},media:{audioDecodeStatus:a,audioEncodeStatus:c}}=o;if(t)return Promise.reject({type:Ji,reason:"Computer audio has been loading, please wait."});if(i){r(Pc(!0));const{userRole:t}=i,o=Ja(t);md("audio",o&&!e?"success":c,a).subscribe(([e,t])=>{if(e&&t){let e=s?Promise.resolve():function(){const e=document.createElement("audio");return e.muted=!1,e.volume=.1,e.src=URL.createObjectURL(Mi),e.play()}();void 0===e&&(e=Promise.resolve()),e.then(()=>{n.joinOrLeaveVoip(!0)}).catch(()=>{r(Nc(!1))})}})}return"failed"===c||"failed"===a?(r(Pc(!1)),Promise.reject({type:"INTERNAL_ERROR",reason:"audio encode or decode error"})):new Promise((e,t)=>{rt(ss(Wi.JoinComputerAudio.success,1),Xe(...Wi.JoinComputerAudio.fail.map(e=>ss(e,1).pipe(He(()=>ce({type:"INSUFFICIENT_PRIVILEGES",reason:e}))))),it(3e4).pipe(He(()=>ce({type:"OPERATION_TIMEOUT"})))).subscribe(()=>{r(Pc(!1)),e("")},e=>{n.joinOrLeaveVoip(!1),r(Pc(!1)),t(e)})})}})(this[el])}stopAudio(){return(e=>{const{store:{getState:t,dispatch:r},mediaAgent:n,rwgAgent:o}=e,i=t(),{audio:{isComputerAudioLoading:s}}=i,a=ic(i);return s?Promise.reject({type:Ji,reason:"Computer audio has not finished joining, please wait."}):"computer"===(null==a?void 0:a.audio)?(n.leaveComputerAudio(),o.joinOrLeaveVoip(!1),r(Oc(0)),is("AUDIO_CURRENT_USER_LEAVE_AUDIO")):Promise.resolve("")})(this[el])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=ic(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:Ji,reason:"no audio joined"}):!0===(null==a?void 0:a.muted)?Promise.resolve(""):(n(Sc(!0)),o.mute(a.userId,!0),is("AUDIO_CURRENT_USER_MUTED").then(()=>(i.muteAudio(),"")));if(sc(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:Ji,reason:"no audio joined"}):!1===n.muted?(o.mute(t,!0),is("AUDIO_PARTICIPANT_AUDIO_UPDATE",e=>e.id===t&&1==e.muted)):Promise.resolve(""):Promise.reject({type:Yi,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[el],e)}unmuteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=ic(s);if(void 0===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:Ji,reason:"no audio joined"}):!1===(null==a?void 0:a.muted)?Promise.resolve(""):(n(Sc(!0)),s.audio.bCanUnmute?(o.mute(a.userId,!1),is("AUDIO_CURRENT_USER_UNMUTED").then(()=>(i.unmuteAudio(),""))):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host not allow unmute themselves"}));if(sc(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:Ji,reason:"no audio joined"}):(!0===n.muted&&o.mute(t,!1),Promise.resolve("")):Promise.reject({type:Yi,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[el],e)}switchMicrophone(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{microphoneDevicesList:i,activeMicrophone:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeMicrophone(t),n(wc(t))),Promise.resolve(""))})(this[el],e)}switchSpeaker(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{speakerDevicesList:i,activeSpeaker:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeSpeaker(t),n(Rc(t))),Promise.resolve(""))})(this[el],e)}getMicList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.microphoneDevicesList]:[]})(this[el])}getSpeakerList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.speakerDevicesList]:[]})(this[el])}isAudioMuted(e){return(({store:{getState:e}},t)=>{const r=e(),{meeting:{isWebinar:n}}=r;let o=null;return void 0===t?o=ic(r):(o=r.participants.attendeesList.find(e=>e.userId===t),n&&!o&&(o=r.participants.xmppAttendeeList.find(e=>e.userId===t))),!!o&&!!o.muted})(this[el],e)}getActiveMicrophone(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeMicrophone:null})(this[el])}getActiveSpeaker(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeSpeaker:null})(this[el])}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:u,isCaptureCameraLoading:d,isCurrentUserStartedVideo:l,isVideoMuted:p}}=i;return l?Promise.reject({type:Ji,reason:"Video is started"}):d?Promise.reject({type:Ji,reason:"Camera is starting,please wait."}):p&&!sc(i)?Promise.reject({type:Ji,reason:"Video is muted by the host"}):(n(iu(!0)),md("video",a,s).subscribe(([e])=>{if(e){const{cameraId:e=u,captureWidth:r=640,captureHeight:i=360,videoDOMId:s}=t||{};o.startCaptureVideo(c,e,r,i,s),u!==e&&n(Zc(e))}else n(iu(!1))}),os(xi).then(()=>{n(su(!1)),n(tu(!1))}).finally(()=>{n(iu(!1))}))})(this[el],e)}stopVideo(){return(e=>{const{store:{getState:t},mediaAgent:r}=e,{video:{isCaptureCameraLoading:n,isCurrentUserStartedVideo:o}}=t();return n?Promise.reject({type:Ji,reason:"Camera is starting,please wait."}):o?(r.stopCaptureVideo(),is("VIDEO_CAPTURE_STOP_RESULT",e=>!0!==(null==e?void 0:e.failed))):Promise.reject({type:Ji,reason:"carmera is closed"})})(this[el])}switchCamera(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{video:{cameraDevicesList:s,isCurrentUserStartedVideo:a}}=i;return-1===s.map(e=>e.deviceId).indexOf(t)?Promise.reject({type:Yi,reason:"Cannot find cameraDeviceId in camera devices list."}):(a&&o.changeCamera(t),n(Zc(t)),Promise.resolve())})(this[el],e)}renderVideo(e,t,r,n,o,i,s,a){return((e,t,r,n,o,i,s,a,c,u)=>{const{store:{getState:d,dispatch:l},mediaAgent:p,rwgAgent:h}=e,_=d(),{meeting:{userId:f},video:{subscribedVideoList:v}}=_;if(!t)return Promise.reject({type:Yi,reason:"Received canvas is falsy"});if(v.length>=9)return Promise.reject({type:Ji,reason:"subscribe video counts greater than maximum size (".concat(9,")")});if(-1===Pl(_).findIndex(e=>e.userId===r))return Promise.reject({type:Yi,reason:"user is not send video"});const{media:{videoDecodeStatus:y},video:{isVerifiedVideoRenderCanvasAfterFailover:E}}=_;return t.id||(t.id="__ZOOM_SDK_VIDEO_CANVAS_@__".replace("@","".concat(Math.floor(1e4*Math.random())))),md("video","success",y).subscribe(([e])=>{if(e){let e=t;!1===E&&(e=Ad(t),l(au(!0)));const u=r===f,d=c||"__ZOOM_SDK_VIDEO_ZONE__";p.renderVideo(e.id,r,d,n,o,i,s,a,u,"",!1),v.includes(r)||(h.subscribeVideo(r,a,!1),l(lu(r))),l(fu({userId:r,key:d}))}}),"failed"===y?Promise.reject({type:"INTERNAL_ERROR",reason:"Video decode status is failed"}):Promise.resolve("")})(this[el],e,t,r,n,o,i,s,a)}stopRenderVideo(e,t,r,n,o=!1){return((e,t,r,n,o,i=!1)=>{const{store:{getState:s,dispatch:a},mediaAgent:c,rwgAgent:u}=e,d=s(),{video:{subscribedVideoList:l,renderedVideoList:p}}=d;if(!t||!t.id)return Promise.reject({type:Yi,reason:"canvas is falsy"});if(l.includes(r)){let e=o;e||(e={R:0,G:0,B:0,A:0});const s=n||"__ZOOM_SDK_VIDEO_ZONE__";p.find(e=>e.userId===r&&e.key===s)&&(c.stopRenderVideo(t.id,r,s,e,i),1==p.filter(e=>e.userId===r).length&&(u.unsubscribeVideo(r),a(pu(r))),a(vu({userId:r,key:s})))}return Promise.resolve("")})(this[el],e,t,r,n,o)}updateVideoCanvasDimension(e,t,r){return((e,t,r,n)=>{const{mediaAgent:o}=e;return t&&t.id?(o.updateRenderedVideoCanvasDimension(t.id,r,n),Promise.resolve("")):Promise.reject({type:Yi,reason:"canvas is falsy"})})(this[el],e,t,r)}adjustRenderedVideoPosition(e,t,r,n,o,i,s){return((e,t,r,n,o,i,s,a)=>{const{store:{getState:c},mediaAgent:u}=e;if(!t||!t.id)return Promise.reject({type:Yi,reason:"canvas is falsy"});const{video:{subscribedVideoList:d}}=c();return d.includes(r)?(u.adjustRenderedVideoPosition(t.id,r,a||"__ZOOM_SDK_VIDEO_ZONE__",i,s,n,o),Promise.resolve("")):Promise.reject({type:Yi,reason:"userId is not correct"})})(this[el],e,t,r,n,o,i,s)}clearVideoCanvas(e,t){return((e,t,r)=>{const{mediaAgent:n}=e;if(!t||!t.id)return Promise.reject({type:Yi,reason:"canvas is falsy"});let o=r;return o||(o={R:0,G:0,B:0,A:0}),n.clearVideoCanvas(t.id,o),Promise.resolve("")})(this[el],e,t)}isCapturingVideo(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCurrentUserStartedVideo})(this[el])}isCameraTaken(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCameraTaken})(this[el])}isCaptureForbidden(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCaptureForbidden})(this[el])}getCameraList(){return(e=>{const{store:{getState:t}}=e,r=t();if(!r.video)return[];const{video:{cameraDevicesList:n}}=r;return n.map(e=>Object.assign({},e))})(this[el])}getActiveCamera(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeCamera:""})(this[el])}getActiveVideoId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeVideoId:0})(this[el])}getVideoMaxQuality(){return(t=>{const{store:{getState:r}}=t,n=r();return n.video?n.video.receivedVideoMaxQuality:e.VideoQuality.Video_90P})(this[el])}getReceivedVideoDimension(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.receivedVideoDimension:null})(this[el])}isSupportMultipleVideos(){return"function"==typeof OffscreenCanvas&&"function"==typeof SharedArrayBuffer}startShareView(t,r){return((t,r,n,o)=>{const{store:{getState:i,dispatch:s},mediaAgent:a,rwgAgent:c}=t,{share:{isReceiveSharing:u,isRemoteSharingActive:d,activeNodeId:l,activeSsrc:p,shareQuality:h,status:_,isVerifiedRenderCanvasAfterFailover:f},media:{sharingDecodeStatus:v}}=i();if(!r||n!==l)return Promise.reject({type:Yi,reason:""});if(!d||u||_!==e.ShareStatus.End)return Promise.reject({type:Ji,reason:""});return md("sharing","success",v).subscribe(([,e])=>{if(e){let e=r;!1===f&&(e=Ad(r),s(Kc(!0))),s(Uc(!0)),c.subscribeSharing(n,h),a.renderSharing(p,e,!1,o)}}),"failed"===v?Promise.reject({type:"INTERNAL_ERROR",reason:""}):is("SHARE_RECEIVED_DIMENSION_CHANGE",e=>!!e,6e4)})(this[el],t,r)}stopShareView(){return(e=>{const{store:{dispatch:t,getState:r},rwgAgent:n,mediaAgent:o}=e,{share:{isReceiveSharing:i,activeNodeId:s}}=r();return i?(o.stopRenderSharing(),n.unsubscribeSharing(s),t(Uc(!1)),Promise.resolve("")):Promise.resolve("")})(this[el])}switchShareView(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),{share:{isReceiveSharing:a,activeNodeId:c,isRemoteControlApproved:u,isGrabRemoteControl:d,shareQuality:l}}=s;return a?t===c?Promise.resolve(""):rd(s).findIndex(e=>e.userId===c)>-1?(u&&(d&&o.subscribeGrabRemoteControl(c,!1),o.sharingRequestRemoteControl(c,!1)),o.unsubscribeSharing(c),o.subscribeSharing(t,l),i.switchSharingSource(t),n(kc({bStatus:1,activeNodeID:t,ssrc:t})),Promise.resolve("")):Promise.reject({type:Yi,reason:"no matching user id"}):Promise.reject({type:Ji})})(this[el],e)}updateSharingCanvasDimension(e,t){return((e,t,r)=>{const{store:{getState:n},mediaAgent:o}=e,i=n(),{share:{isReceiveSharing:s}}=i;return s&&o.updateRenderedSharingDimension(t,r),Promise.resolve("")})(this[el],e,t)}startShareScreen(e){return Dl(this[el],e)}stopShareScreen(){return(t=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=t,{share:{status:s},meeting:{userId:a}}=r();return s===e.ShareStatus.End?Promise.resolve(""):(n(Hc(e.ShareStatus.End)),o.stopSharing(a),i.stopDesktopSharing(),is("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!1===e.sharerOn))})(this[el])}pauseShareScreen(){return(t=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=t,{share:{status:s}}=r();return s===e.ShareStatus.Sharing?(o.pauseSharing(),i.pauseDesktopSharing(),is("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerPause).then(()=>(n(Hc(e.ShareStatus.Paused)),""))):Promise.reject({type:Ji})})(this[el])}resumeShareScreen(){return(t=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=t,{share:{status:s}}=r();return s===e.ShareStatus.Paused?(o.resumeSharing(),i.resumeDesktopSharing(),is("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerOn&&!1===e.sharerPause).then(()=>(n(Hc(e.ShareStatus.Sharing)),""))):Promise.reject({type:Ji})})(this[el])}lockShare(t){return((t,r)=>((t,r)=>{const{store:{getState:n},rwgAgent:o}=t,{share:{sharePrivilege:i}}=n();return i===r?Promise.resolve(""):Object.values(e.SharePrivilege).includes(r)?(o.lockSharing(r),is("UPDATE_MEETING_ATTRIBUTE",e=>e.lockShare===r)):Promise.reject({type:Yi})})(t,r?e.SharePrivilege.OnlyHost:e.SharePrivilege.HostGrab))(this[el],t)}getShareUserList(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?rd(r).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause})):[]})(this[el])}getActiveShareUserId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share&&r.share.isRemoteSharingActive?r.share.activeNodeId:0})(this[el])}isReceiveSharing(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.share&&r.share.isReceiveSharing})(this[el])}getSharedContentDimension(){return(t=>{const{store:{getState:r}}=t,n=r();if(n.share){if(n.share.status!==e.ShareStatus.End)return d({},n.share.shareDimension);{const{share:{receivedShareDimension:e}}=n;return{width:e.width,height:e.height}}}return null})(this[el])}getShareStatus(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?r.share.status:null})(this[el])}}).prototype,"startAudio",[rl,Ml],Object.getOwnPropertyDescriptor(rp.prototype,"startAudio"),rp.prototype),l(rp.prototype,"stopAudio",[rl,kl],Object.getOwnPropertyDescriptor(rp.prototype,"stopAudio"),rp.prototype),l(rp.prototype,"muteAudio",[rl,Ul],Object.getOwnPropertyDescriptor(rp.prototype,"muteAudio"),rp.prototype),l(rp.prototype,"unmuteAudio",[rl,Vl],Object.getOwnPropertyDescriptor(rp.prototype,"unmuteAudio"),rp.prototype),l(rp.prototype,"switchMicrophone",[rl,Ll],Object.getOwnPropertyDescriptor(rp.prototype,"switchMicrophone"),rp.prototype),l(rp.prototype,"switchSpeaker",[rl,jl],Object.getOwnPropertyDescriptor(rp.prototype,"switchSpeaker"),rp.prototype),l(rp.prototype,"startVideo",[rl,Hl],Object.getOwnPropertyDescriptor(rp.prototype,"startVideo"),rp.prototype),l(rp.prototype,"stopVideo",[rl,xl],Object.getOwnPropertyDescriptor(rp.prototype,"stopVideo"),rp.prototype),l(rp.prototype,"switchCamera",[rl,Fl],Object.getOwnPropertyDescriptor(rp.prototype,"switchCamera"),rp.prototype),l(rp.prototype,"renderVideo",[rl,Gl],Object.getOwnPropertyDescriptor(rp.prototype,"renderVideo"),rp.prototype),l(rp.prototype,"stopRenderVideo",[rl,Bl],Object.getOwnPropertyDescriptor(rp.prototype,"stopRenderVideo"),rp.prototype),l(rp.prototype,"updateVideoCanvasDimension",[rl,Wl],Object.getOwnPropertyDescriptor(rp.prototype,"updateVideoCanvasDimension"),rp.prototype),l(rp.prototype,"adjustRenderedVideoPosition",[rl,Kl],Object.getOwnPropertyDescriptor(rp.prototype,"adjustRenderedVideoPosition"),rp.prototype),l(rp.prototype,"clearVideoCanvas",[rl,ql],Object.getOwnPropertyDescriptor(rp.prototype,"clearVideoCanvas"),rp.prototype),l(rp.prototype,"startShareView",[rl,zl],Object.getOwnPropertyDescriptor(rp.prototype,"startShareView"),rp.prototype),l(rp.prototype,"stopShareView",[rl,Jl],Object.getOwnPropertyDescriptor(rp.prototype,"stopShareView"),rp.prototype),l(rp.prototype,"switchShareView",[rl,Yl],Object.getOwnPropertyDescriptor(rp.prototype,"switchShareView"),rp.prototype),l(rp.prototype,"updateSharingCanvasDimension",[rl,Xl],Object.getOwnPropertyDescriptor(rp.prototype,"updateSharingCanvasDimension"),rp.prototype),l(rp.prototype,"startShareScreen",[rl,Ql],Object.getOwnPropertyDescriptor(rp.prototype,"startShareScreen"),rp.prototype),l(rp.prototype,"stopShareScreen",[rl,Zl],Object.getOwnPropertyDescriptor(rp.prototype,"stopShareScreen"),rp.prototype),l(rp.prototype,"pauseShareScreen",[rl,$l],Object.getOwnPropertyDescriptor(rp.prototype,"pauseShareScreen"),rp.prototype),l(rp.prototype,"resumeShareScreen",[rl,ep],Object.getOwnPropertyDescriptor(rp.prototype,"resumeShareScreen"),rp.prototype),l(rp.prototype,"lockShare",[nl,tp,rl],Object.getOwnPropertyDescriptor(rp.prototype,"lockShare"),rp.prototype),rp);var op,ip;const sp={chat:{epic:Rl,reducer:Il,Client:wl}},ap=si.createAgent();let cp=(l((ip=class extends fl{constructor(e){super(e),this.mediaStream=void 0,this[$d]=sp}getMediaStream(){return void 0===this.mediaStream&&(this.mediaStream=new np(this[Xd])),this.mediaStream}joinInstant(e,t,r,n,o){const{[Qd]:i,[Zd]:s}=this,{meeting:{lang:a,meetingStatus:c},socket:{zoomSocketStatus:u}}=i();return t?"initial"===c&&"closed"===u?(s(oo({topic:e,password:o||"",userName:r,zlk:t,lang:a,cv:n})),os(bi)):Promise.reject({type:Ji,reason:"duplicated operation"}):Promise.reject({type:Ji,reason:"invalid signature"})}removeUser(e){const t=this[Xd].getState(),{participants:{attendeesList:r}}=t;return r.find(t=>t.userId===e)?(ap.expel(e),is("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t=>t.some(t=>t.userId===e))):Promise.reject({type:Yi,reason:"no matched user"})}}).prototype,"removeUser",[nl,rl],Object.getOwnPropertyDescriptor(ip.prototype,"removeUser"),ip.prototype),ip);class up{constructor(e){this.instant=void 0,this.context=void 0,this.script=void 0,this.mic=void 0,this.instant=0,this.context=e,this.mic=null,this.script=e.createScriptProcessor(2048,1,1),this.script.onaudioprocess=e=>{const t=e.inputBuffer.getChannelData(0);let r,n=0;for(r=0;re.stop()),this.audioStream=null,this.isAudioStarted=!1}async toggleMicIsMuted(e){if(e){if(!this.audioContext){const e=window.AudioContext||window.webkitAudioContext;this.audioContext=new e}this.inputMicDetector=new up(this.audioContext),this.inputMicDetector.connectToSource(this.audioStream)}else this.inputMicDetector&&this.inputMicDetector.stop(),this.inputMicDetector=null;this.isMicUnmuted=e}getAudioConstraints(){return{audio:""===this.deviceId||{deviceId:this.deviceId},video:!1}}}const lp={width:{min:1024,ideal:1280,max:1920},height:{min:576,ideal:720,max:1080},aspectRatio:{ideal:1.777777778}};class pp{constructor(e=""){this.isVideoStarted=void 0,this.videoStream=void 0,this.deviceId=void 0,this.isVideoStarted=!1,this.videoStream=null,this.deviceId=e}async start(e){if(!e)throw new Error("Video DOM element is falsy");if(this.isVideoStarted||this.videoStream)throw new Error("VideoAlreadyStartedError");const t=async t=>{if(!t||"OverconstrainedError"!==t.name&&"ConstraintNotSatisfiedError"!==t.name)throw t;console.log("Warning: detected ".concat(t.name," -- trying to fall back to lower aspect ratio"));try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints(!0));return this.tryPlayVideo(e,t)}catch(e){throw e}};try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints());return this.tryPlayVideo(e,t)}catch(e){return t(e)}}async stop(){if(!this.videoStream||!this.isVideoStarted)throw new Error("VideoNotStartedError");this.videoStream.getVideoTracks().forEach(e=>e.stop()),this.videoStream=null,this.isVideoStarted=!1}getVideoConstraints(e=!1){let t=lp;return e?t=""===this.deviceId||{deviceId:this.deviceId}:""!==this.deviceId&&(t.deviceId=this.deviceId),{audio:!1,video:t}}async tryPlayVideo(e,t){if(!e)throw new Error("Video DOM element is falsy");try{this.videoStream=t,e.srcObject=this.videoStream,await e.play(),this.isVideoStarted=!0}catch(e){throw e}}}class hp{static createClient(){if(!this.meetingClient){const e=function(){const e=[zd],t=v(Yd(),Jd(function(){for(var e=arguments.length,t=new Array(e),r=0;r{void 0===t.asyncReducers[e]&&(t.asyncReducers[e]=r,t.replaceReducer(Yd(t.asyncReducers)))},t.injectEpic=e=>{Wd.next(e)},zd.run(Kd),t}();this.meetingClient=new cp(e)}return this.meetingClient}static destroyClient(){this.meetingClient&&(this.meetingClient.leave().then(()=>{it(500).subscribe(()=>{as()})}),this.meetingClient=null)}static checkSystemRequirements(){return{audio:Fo()&&Go(),video:Fo()&&void 0!==navigator.mediaDevices,screen:Fo()&&void 0!==(navigator.mediaDevices&&navigator.mediaDevices).getDisplayMedia}}static getDevices(e){return e?navigator.mediaDevices.enumerateDevices():navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(e=>(e.getTracks().forEach(e=>e.stop()),navigator.mediaDevices.enumerateDevices()))}static createLocalAudioTrack(e=""){return new dp(e)}static createLocalVideoTrack(e=""){return new pp(e)}}hp.meetingClient=void 0,hp.VERSION="2.0.0";var _p,fp,vp="https://dmogdx0jrul3u.cloudfront.net/videosdk/".concat("1.1.0","/lib"),yp="https://source.zoom.us/videosdk/".concat("1.1.0","/lib"),Ep="https://jssdk.zoomus.cn/videosdk/".concat("1.1.0","/lib"),gp=Symbol("stream"),Sp=function(){function e(r){t(this,e),this[gp]=void 0,this[gp]=r}return n(e,[{key:"startAudio",value:function(){return this[gp].startAudio()}},{key:"stopAudio",value:function(){return this[gp].stopAudio()}},{key:"muteAudio",value:function(e){return this[gp].muteAudio(e)}},{key:"unmuteAudio",value:function(e){return this[gp].unmuteAudio(e)}},{key:"isAudioMuted",value:function(e){return this[gp].isAudioMuted(e)}},{key:"getMicList",value:function(){return this[gp].getMicList()}},{key:"getSpeakerList",value:function(){return this[gp].getSpeakerList()}},{key:"getActiveMicrophone",value:function(){return this[gp].getActiveMicrophone()}},{key:"getActiveSpeaker",value:function(){return this[gp].getActiveSpeaker()}},{key:"switchMicrophone",value:function(e){return this[gp].switchMicrophone(e)}},{key:"switchSpeaker",value:function(e){return this[gp].switchSpeaker(e)}},{key:"startVideo",value:function(e){return this[gp].startVideo(e)}},{key:"stopVideo",value:function(){return this[gp].stopVideo()}},{key:"renderVideo",value:function(e,t,r,n,o,i,s,a){return this[gp].renderVideo(e,t,r,n,o,i,s,a)}},{key:"stopRenderVideo",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this[gp].stopRenderVideo(e,t,r,n,o)}},{key:"updateVideoCanvasDimension",value:function(e,t,r){return this[gp].updateVideoCanvasDimension(e,t,r)}},{key:"adjustRenderedVideoPosition",value:function(e,t,r,n,o,i,s){return this[gp].adjustRenderedVideoPosition(e,t,r,n,o,i,s)}},{key:"clearVideoCanvas",value:function(e,t){return this[gp].clearVideoCanvas(e,t)}},{key:"getCameraList",value:function(){return this[gp].getCameraList()}},{key:"switchCamera",value:function(e){return this[gp].switchCamera(e)}},{key:"isCapturingVideo",value:function(){return this[gp].isCapturingVideo()}},{key:"isCameraTaken",value:function(){return this[gp].isCameraTaken()}},{key:"getActiveVideoId",value:function(){return this[gp].getActiveVideoId()}},{key:"getActiveCamera",value:function(){return this[gp].getActiveCamera()}},{key:"isCaptureForbidden",value:function(){return this[gp].isCaptureForbidden()}},{key:"getVideoMaxQuality",value:function(){return this[gp].getVideoMaxQuality()}},{key:"getReceivedVideoDimension",value:function(){return this[gp].getReceivedVideoDimension()}},{key:"isSupportMultipleVideos",value:function(){return this[gp].isSupportMultipleVideos()}},{key:"startShareView",value:function(e,t){return this[gp].startShareView(e,t)}},{key:"stopShareView",value:function(){return this[gp].stopShareView()}},{key:"startShareScreen",value:function(e){return this[gp].startShareScreen(e)}},{key:"pauseShareScreen",value:function(){return this[gp].pauseShareScreen()}},{key:"resumeShareScreen",value:function(){return this[gp].resumeShareScreen()}},{key:"stopShareScreen",value:function(){return this[gp].stopShareScreen()}},{key:"lockShare",value:function(e){return this[gp].lockShare(e)}},{key:"isShareLocked",value:function(){return this[gp].isShareLocked()}},{key:"getActiveShareUserId",value:function(){return this[gp].getActiveShareUserId()}}]),e}(),bp=Symbol("chat"),mp=function(){function e(r){t(this,e),this[bp]=void 0,this[bp]=r}return n(e,[{key:"send",value:function(e,t){return this[bp].send(e,t)}},{key:"sendToAll",value:function(e){return this[bp].send(e,hl.All)}},{key:"setPrivilege",value:function(e){return this[bp].setPrivilege(e)}},{key:"getPrivilege",value:function(){return this[bp].getPrivilege()}},{key:"getReceivers",value:function(){return this[bp].getReceivers().map((function(e){return s({isManager:e.isCoHost},a(e,["isCoHost"]))}))}}]),e}(),Ip=function(e){return"string"==typeof e&&e.length>0},Ap=Symbol("Client"),Op=function(){function e(){t(this,e),this[Ap]=void 0,this.stream=void 0,this.chat=void 0,this[Ap]=hp.createClient()}return n(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Global",r=arguments.length>2?arguments[2]:void 0,n="";switch(t){case"Global":n=yp;break;case"CN":n=Ep;break;case"CDN":n=vp;break;default:n=t}return this[Ap].init("","",{language:e,dependentAssets:n,constraints:s({},hp.checkSystemRequirements()),additionalFeatures:["chat"],webEndpoint:r||"zoom.us"})}},{key:"join",value:function(e,t,r,n){return Ip(e)&&Ip(t)&&Ip(r)?e.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of topic is 200"}):r.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of username is 200"}):!n||Ip(n)&&!void/^([!@#$%^&*?=]|\w|\d){1,10}$/gi.test(n)?this[Ap].joinInstant(e,t,r,"1.1.0",n):Promise.reject({type:"INVALID_PARAMETERS",reason:"Password can contain English characters, numbers and special characters like !@#$%^&*?=, and the max length of password is 10"}):Promise.reject({type:"INVALID_PARAMETERS",reason:"topic, token and userName must be string and required"})}},{key:"leave",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?this[Ap].end():this[Ap].leave()}},{key:"getSessionInfo",value:function(){var e=this[Ap].getMeetingInfo();return{isInMeeting:e.isInMeeting||!1,password:e.password||"",topic:e.topic,userName:e.userName,userId:e.userId}}},{key:"on",value:function(e,t){this[Ap].on(e,t)}},{key:"off",value:function(e,t){this[Ap].off(e,t)}},{key:"getMediaStream",value:function(){return this.stream||(this.stream=new Sp(this[Ap].getMediaStream())),this.stream}},{key:"getChatClient",value:function(){return this.chat||(this.chat=new mp(this[Ap].getFeatureModule("chat"))),this.chat}},{key:"coverntUser",value:function(e){return{userId:e.userId,avatar:e.avatar||"",displayName:e.displayName,isHost:e.isHost,isManager:e.isCoHost||!1,audio:e.audio,muted:e.muted,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharerPause:e.sharerPause}}},{key:"getCurrentUserInfo",value:function(){var e=this[Ap].getCurrentUserInfo();if(e)return this.coverntUser(e)}},{key:"getUser",value:function(e){var t=this[Ap].getParticipantsList().find((function(t){return t.userId===e}));if(t)return this.coverntUser(t)}},{key:"getAllUser",value:function(){var e=this;return this[Ap].getParticipantsList().map((function(t){return e.coverntUser(t)}))}},{key:"changeName",value:function(e,t){return this[Ap].changeName(e,t)}},{key:"makeHost",value:function(e){return this[Ap].makeHost(e)}},{key:"makeManager",value:function(e){return this[Ap].makeCoHost(e)}},{key:"revokeManager",value:function(e){return this[Ap].revokeCoHost(e)}},{key:"removeUser",value:function(e){return this[Ap].removeUser(e)}},{key:"isHost",value:function(){return this[Ap].isHost()}},{key:"isManager",value:function(){return this[Ap].isCoHost()}}]),e}(),Cp=function(){function e(){t(this,e)}return n(e,null,[{key:"createClient",value:function(){return this.videoClient||(this.videoClient=new Op),this.videoClient}},{key:"destroyClient",value:function(){this.videoClient&&(this.videoClient.leave(),this.videoClient=null)}},{key:"checkSystemRequirements",value:function(){return hp.checkSystemRequirements()}},{key:"getDevices",value:function(e){return hp.getDevices(e)}},{key:"createLocalAudioTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return hp.createLocalAudioTrack(e)}},{key:"createLocalVideoTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return hp.createLocalVideoTrack(e)}}]),e}();Cp.videoClient=void 0,Cp.VERSION="1.1.0",(_p=e.ChatPrivilege||(e.ChatPrivilege={}))[_p.All=1]="All",_p[_p.NoOne=4]="NoOne",_p[_p.EveryonePublicly=5]="EveryonePublicly",(fp=e.ChatMsgType||(e.ChatMsgType={}))[fp.All=0]="All",e.default=Cp,Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).WebVideoSDK={})}(this,(function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;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 c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(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 u(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}(Q),X=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=X.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}(X),$=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t}(Z))(Y),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}(Q),Se=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(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(we);function He(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),Ve(j,e)}function xe(){return He(1)}function Fe(){for(var e=[],t=0;t1?n.next(Array.prototype.slice.call(arguments)):n.next(e)}),n,r)}))}function Ke(e,t,r){return r?Ke(e,t).pipe(Oe((function(e){return R(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(){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]:He(r)(se(e,n))}function Je(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function Qe(e,t){return function(r){return r.lift(new Ye(e,t))}}var Ye=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Xe(e,this.predicate,this.thisArg))},e}(),Xe=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 Ze(e,t,r){return[Qe(t,r)(new F(Me(e))),Qe(Je(t,r))(new F(Me(e)))]}function $e(){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 ut(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),ut=function(e,t){this.time=e,this.notification=t};function lt(e){return function(t){return 0===e?te():t.lift(new pt(e))}}var pt=function(){function e(e){if(this.total=e,this.total<0)throw new Ae}return e.prototype.call=function(e,t){return t.subscribe(new ht(e,this.total))},e}(),ht=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 _t(e){return function(t){return t.lift(new ft(e))}}var ft=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new vt(e,this.value))},e}(),vt=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 yt(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?Ve((function(){return e}),t,r):("number"==typeof t&&(r=t),Ve((function(){return e}),r))}function Et(){for(var e=[],t=0;t0){var s=i.indexOf(r);-1!==s&&i.splice(s,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}(we),Mt=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 Kt(a,h,new Wt(void 0,e[h]))):Jt(e[h],t[h],r,n,a,h,s);for(;h=0?(Jt(e[o],t[o],r,n,a,o,s),f=qt(f,c)):Jt(e[o],void 0,r,n,a,o,s)})),f.forEach((function(e){Jt(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 Gt(a,e,t)))}function Qt(e,t,r,n){return n=n||[],Jt(e,t,(function(e){e&&n.push(e)}),r),n.length?n:void 0}function Yt(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,RESET_SOCKET:()=>({})}),Qr=nr("CONNECT_TO_MEDIA_STREAM"),Yr=nr("RECEIVE_PAYLOAD_FROM_MEDIA_SDK"),{setAudioEncodeStatus:Xr,setAudioDecodeStatus:Zr,setVideoEncodeStatus:$r,setVideoDecodeStatus:en,setSharingEncodeStatus:tn,setSharingDecodeStatus:rn,setMediaConstraints:nn,resetMedia:on}=Ar("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","RESET_MEDIA");function sn(e,t,...r){return e(Vt.of(...r||[]),t,null)}function an(...e){const t=(...t)=>ze(...e.map(e=>{const r=e(...t);if(!r)throw new TypeError(`combineEpics: one of the provided Epics "${e.name||""}" does not return a stream. Double check you're not missing a return statement!`);return r.pipe(ot((e,t)=>(setTimeout(()=>{throw e},0),t)))}));try{Object.defineProperty(t,"name",{value:`combineEpics(${e.map(e=>e.name||"").join(", ")})`})}catch(e){}return t}function cn(...e){return an(...e.flatMap(e=>Object.values(e)))}function dn(e,t){return e.pipe(kt(""+Vr),Qe(e=>e.payload.evt===t))}function un(e,t){return e.pipe(kt(""+jr),Qe(e=>e.payload.event===t))}function ln(e,t){return e.pipe(kt(""+Vr,""+Fr),Qe(e=>e.payload.evt===t))}function pn(e,t){return e.pipe(kt(""+Yr),Qe(e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t))}var hn="undefined"!=typeof window&&window,_n="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,fn="undefined"!=typeof global&&global,vn=hn||fn||_n;function yn(e,t){return void 0===t&&(t=null),new An({method:"GET",url:e,headers:t})}function En(e,t,r){return new An({method:"POST",url:e,body:t,headers:r})}function gn(e,t){return new An({method:"DELETE",url:e,headers:t})}function Sn(e,t,r){return new An({method:"PUT",url:e,body:t,headers:r})}function bn(e,t,r){return new An({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!vn)throw new Error("RxJS could not find any global context (window, self, global)")}();var mn=Oe((function(e,t){return e.response}));function In(e,t){return mn(new An({method:"GET",url:e,responseType:"json",headers:t}))}var An=function(e){function t(t){var r=e.call(this)||this,n={async:!0,createXHR:function(){return this.crossDomain?function(){if(vn.XMLHttpRequest)return new vn.XMLHttpRequest;if(vn.XDomainRequest)return new vn.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(vn.XMLHttpRequest)return new vn.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 vn.ActiveXObject(e))break}catch(e){}return new vn.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 On(e,this.request)},t.create=((r=function(e){return new t(e)}).get=yn,r.post=En,r.delete=gn,r.put=Sn,r.patch=bn,r.getJSON=In,r),t}(F),On=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")||vn.FormData&&r.body instanceof vn.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 Cn(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(vn.FormData&&e instanceof vn.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 Rn(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)},vn.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 Tn("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 Tn("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),Cn=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=wn(this.responseType,t)},Tn=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=wn(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function wn(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 Rn=function(e,t){return Tn.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},Nn=An.create;const Dn={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 Password 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."}},Pn=Dn.default;let Mn,kn,Un;function Vn(e,t){return t in Pn?Pn[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"}(Mn||(Mn={})),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"}(kn||(kn={})),function(e){e[e.LEAVESUBREASON_WAITINGROOMFAILOVER=1]="LEAVESUBREASON_WAITINGROOMFAILOVER"}(Un||(Un={}));const Ln={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},jn={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"},Hn={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}},xn={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 Fn(e,t){return Object.keys(e).find(r=>e[r]===t)}let Gn;function Bn(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(Gn)o=Gn;else{const e=Object.keys(Hn[3e3]);n.forEach(t=>{const r=function(e){return"en-US"===e&&(e="default"),Dn[e]||Dn.default}(t);o[t]={},e.forEach(e=>{o[t][e]=r[e]})}),Gn=o}return n.forEach(n=>{if(r)return;const i=Fn(o[n],t);i&&(r={key:i,value:Hn[e][i]})}),r||(r={key:"apac.errorcodes_fail",value:200}),r}if(200===e){const n=Fn({"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:Hn[e][n]}:{key:"apac.errorcodes_fail",value:200},r}if(void 0!==Hn[e]){const t=Hn[e],n=Object.keys(t)[0];r={key:n,value:t[n]}}if(r)return r;const n=Fn(Ln,e),o=jn[n];return o?{key:o,value:e}:{key:"apac.errorcodes_fail",value:200}}(e,t),o=Vn(r,r);return r!==o?{reason:o,errorCode:n}:{reason:Pn[r],errorCode:n}}function Wn(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==xn[r]){const e=xn[r],n=Object.keys(e)[0];t={key:n,value:e[n]}}if(t){const{key:r,value:n}=t,o=Vn(r,r);return r!==o?Object.assign({},e,{reason:o,errorCode:n}):Object.assign({},e,{reason:Pn[r],errorCode:n})}const n=Bn(r);return Object.assign({},e,{reason:n.reason,errorCode:n.errorCode})}var Kn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function qn(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 zn=qn((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("")},S=t.atob&&"function"==typeof t.atob?function(e){return t.atob(e)}:function(e){return e.replace(/\S{1,4}/g,g)},b=function(e){return S(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},m=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(S(e))}(m(e))};t.Uint8Array&&(f=function(e){return Uint8Array.from(b(m(e)),(function(e){return e.charCodeAt(0)}))});if(t.Base64={VERSION:"2.6.3",atob:b,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:Kn)}));function Jn(e){return zn.Base64.encode(e,!0)}function Qn(e){return zn.Base64.decode(e)}const Yn={"-":"+",_:"/",".":"="};function Xn(e){const t=e.replace(/[-_.]/g,e=>Yn[e]);return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const Zn=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount"],$n={bChime:"bAllowPlayChimeForEnterOrExit",topic:e=>({meetingTopic:Qn(e)})},eo=nr("GET_MEETING_INFO"),to=nr("GET_INSTANT_MEETING_INFO"),ro=(nr("LOGON_ZOOM_DOMAIN"),nr("VERIFY_ZOOM_RECAPTCHA"),nr("LOGON_THIRD_PARTY_DOMAIN"),nr("PING_RWC_SERVER")),no=nr("MEETING_FAILOVER"),oo=nr("LEAVE_MEETING"),io=nr("END_MEETING"),{setMeetingInfo:so,setWindownOpen:ao,setAppidSignature:co,setZak:uo,setTkMtkguid:lo,setPingRwcTimestamp:po,setInMeetingInfo:ho,setMeetingAttribute:_o,resetMeeting:fo,setIsHost:vo,setIsCohost:yo,setMeetingIsOnHold:Eo,setIsMeetingReset:go,setAudioVideoBeforeOnHold:So,setCurrentUserAudioBeforeReset:bo,setIsCurrentUserMutedBeforeReset:mo,setMeetingStatus:Io,setMeetingRegion:Ao,setIsCurrentUserStartVideoBeforeReset:Oo,setJoinMeetingTimeStamp:Co,setIsEnableQos:To}=(nr("REGISTER_WEBINAR"),Ar({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(Zn.some(t=>e&&void 0!==e[t])){let t=e;return Object.keys($n).some(t=>void 0!==e[t])&&(t=Object.keys(e).reduce((t,r)=>{const n=$n[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}));function wo(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 Ro,No,Do,Po,Mo;!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"}(Ro||(Ro={})),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"}(No||(No={})),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"}(Do||(Do={})),function(e){e.CDN="CDN",e.Global="Global",e.CN="CN"}(Po||(Po={})),function(e){e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed"}(e.ConnectionState||(e.ConnectionState={})),function(e){e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory"}(Mo||(Mo={}));const ko=Jn("{}");class Uo{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=Jn("zoom-storage-"+e),this.localStorageKey=Jn("zoom-local-storage"),this.memoryCache={},this.sessionCache=JSON.parse(Qn(sessionStorage.getItem(this.sessionStorageKey)||ko)),this.localCache=JSON.parse(Qn(localStorage.getItem(this.localStorageKey)||ko))}static init(e){this.instance=new Uo(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:Mo.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:Mo.LocalStorage}:{value:this.memoryCache[e],type:Mo.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case Mo.SessionStorage:{const r=this.sessionCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.sessionCache[e]=n,this.flushValue(Mo.SessionStorage)),n}case Mo.LocalStorage:{const r=this.localCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.localCache[e]=n,this.flushValue(Mo.LocalStorage)),n}case Mo.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 Mo.SessionStorage:delete this.sessionCache[e],this.flushValue(Mo.SessionStorage);break;case Mo.LocalStorage:delete this.localCache[e],this.flushValue(Mo.LocalStorage);break;case Mo.Memory:delete this.memoryCache[e]}}flushValue(e){e===Mo.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,Jn(JSON.stringify(this.sessionCache))):e===Mo.LocalStorage&&localStorage.setItem(this.localStorageKey,Jn(JSON.stringify(this.localCache)))}}function Vo(){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 "+(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 Lo(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}function jo(){return"object"==typeof WebAssembly&&"function"==typeof Worker}Uo.instance=void 0;const Ho=()=>"function"==typeof AudioWorklet,xo=()=>Lo(),Fo=()=>!Lo()&&!jo(),Go=()=>/arm/i.test(navigator.userAgent),Bo=()=>/\bCrOS\b/.test(navigator.userAgent),Wo=()=>Bo()&&Go(),Ko=()=>!navigator||!navigator.hardwareConcurrency||Wo()&&navigator.hardwareConcurrency<=4||Bo()&&!Go()&&navigator.hardwareConcurrency<4||/\bCrKey\b/.test(navigator.userAgent)||"function"!=typeof OffscreenCanvas||"function"!=typeof requestAnimationFrame||"function"!=typeof SharedArrayBuffer?1:(Wo()&&navigator.hardwareConcurrency>4||Bo()&&!Go()&&navigator.hardwareConcurrency,9);let qo,zo;!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"}(qo||(qo={})),function(e){e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM"}(zo||(zo={}));const Jo=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 Qo,Yo;!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"}(Qo||(Qo={})),function(e){e.WebclientDeviceId="WEBCLIENT_DEVICE_ID"}(Yo||(Yo={}));const Xo=(window.crypto||window.msCrypto).subtle,Zo=Qo.WebclientIVState,$o=Object.keys(Jo).map(e=>Jo[e].sessionType);class ei{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),Uo.set(Zo,{},Mo.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new ei(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(Lo()||!jo())&&r===zo.AES_GCM,this.gcmSessionKey=Xn(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=Xn(t);return i.set(s,0),i.set(o,s.length),i=i.subarray(0,s.length+4),Xo.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!0,["sign"]).then(e=>Xo.sign({name:"HMAC"},e,i)).then(e=>Xo.importKey("raw",e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))}getNextIV(e){const t=Uo.get(Zo);return void 0===t[e]?(t[e]=0,Uo.set(Zo,t,Mo.SessionStorage)):Uo.set(Zo,t=>u(u({},t),{},{[e]:t[e]+1}),Mo.SessionStorage)}resetIVState(){const e=Uo.get(Zo);if(void 0===e);else{const t=Object.keys(e).filter(e=>$o.indexOf(e)>-1);t.length>0&&(t.forEach(t=>{e[t]+=1e6}),Uo.set(Zo,e,Mo.SessionStorage))}}static resetIV(){if(void 0===this.instance)throw new Error("reset before intialize");this.instance.resetIVState()}static beginEncrypt({text:e,type:t}){const r=new Uint8Array(0);if(this.instance&&this.instance.isGCMEnabled){const n=16,o=this.instance.getNextIV(t.sessionType),i=new ArrayBuffer(16),s=new Uint8Array(i);new DataView(i).setUint32(0,o,!0);let a=null;return a="BO_BROADCAST"===t.sessionType?this.instance.gcmMainSessionKey:this.instance.gcmSessionKey,this.instance.beginCrypto(a,this.instance.zoomId,t.gcmType).then(t=>{const o=(new TextEncoder).encode(e);return Xo.encrypt({name:"AES-GCM",iv:s,additionalData:r,tagLength:8*n},t,o)}).then(e=>{const t=1+s.byteLength+2+r.byteLength+4+e.byteLength,o=new ArrayBuffer(t);new Uint8Array(o)[0]=s.length,new Uint8Array(o,1,s.byteLength).set(s),new DataView(o).setUint16(1+s.byteLength,r.length,!0),new Uint8Array(o,3+s.byteLength).set(r),new DataView(o).setUint32(1+s.byteLength+2+r.byteLength,e.byteLength-n,!0),new Uint8Array(o,1+s.byteLength+2+r.byteLength+4).set(new Uint8Array(e));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(Jn(e))}static beginDecrypt({decryptedText:e,type:t,zoomId:r}){if(this.instance&&this.instance.isGCMEnabled){const n=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 Xo.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:"[This is an encrypted message]",iv:i,aad:c}))}{const t=new TextDecoder("utf-8");return Promise.resolve({message:t.decode(Xn(e))})}}}let ti;ei.instance=void 0,function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(ti||(ti={}));class ri{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){return{seq:this.sendMessageToRwg({evt:4105,body:{bRecord:e}})}}expel(e){return{seq:this.sendMessageToRwg({evt:4107,body:{userId: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,t=!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,r=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:u({},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}})}}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,t){return{seq:this.sendMessageToRwg({evt:4147,body:{id:e,bOn:t}})}}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(e=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}})}}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){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:t,bCallme:r}})}}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(e=1,t,r){return{seq:this.sendMessageToRwg({evt:12289,body:{id:e,size:t,bOn:r}})}}unsubscribeVideo(e=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){return{seq:this.sendMessageToRwg({evt:16415,body:{id:e,size:t}})}}unsubscribeSharing(e){return{seq:this.sendMessageToRwg({evt:16417,seq:1,body:{id:e}})}}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){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,boOn:!1}})}}stopSharing(e){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,bOn:!0}})}}lockSharing(e){return{seq:this.sendMessageToRwg({evt:4169,body:{lockShare:e}})}}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:u({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}})}}}class ni extends ri{static createAgent(){return this.rwgInstance||(this.rwgInstance=new ni),this.rwgInstance}}ni.rwgInstance=null;class oi extends ri{static getInstance(){return this.instance||(this.instance=new oi),this.instance}}oi.instance=null;const ii=Qo.WebclientIVState;class si{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new si),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:{[qo.AUDIO_ENCODE]:Uo.get(ii)&&Uo.get(ii)[qo.AUDIO_ENCODE],[qo.VIDEO_ENCODE]:Uo.get(ii)&&Uo.get(ii)[qo.VIDEO_ENCODE],[qo.SHARING_ENCODE]:Uo.get(ii)&&Uo.get(ii)[qo.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(ni.createAgent())}}setAssetsAndConstraint(e,t){var r;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=(e=>({audioWorkerPath:e+"/js_audio_process.min.js",audioWorkletPath:e+"/js_audio_worklet.min.js",audioWasm:e+"/audio.encode.wasm",videoWorkerPath:e+"/video_s.min.js",videoMtWorkerPath:e+"/video_m.min.js",videoWasm:e+"/video.decode.wasm",videoMtWasm:e+"/video.mt.wasm",sharingWorkerPath:e+"/sharing_s.min.js",sharingMtWorkerPath:e+"/sharing_m.min.js",videoSIMDWorkerPath:e+"/video_simd.min.js",videoSIMDWasm:e+"/video.simd.wasm",sharingSIMDWorkerPath:e+"/sharing_simd.min.js",videoMSIMDWasm:e+"/video.mtsimd.wasm",sharingMSIMDWorkerPath:e+"/sharing_mtsimd.min.js",videoMSIMDWorkerPath:e+"/video_mtsimd.min.js",audioSIMDWorkletPath:e+"/audio_simd.min.js",audioSIMDWasm:e+"/audio.simd.wasm"}))(this.assetsPath),this.onMediaSDKCallback=this.onMediaSDKCallback.bind(this),null===(r=this.instance)||void 0===r||r.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){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}connect({svcUrl:e,meetingNumber:t,conId:r,e2eEncrypt:n,isViewOnly:o,currentUserId:i,isWebinar:s,enableQos:a}){var c,d,u;this.svcUrl=e,this.meetingNumber=t,this.confId=r;const l=((e,t,r)=>({videoSocketAddress:`wss://${e}/wc/media/${t}?type=v&cid=${r}`,audioSocketAddress:`wss://${e}/wc/media/${t}?type=a&cid=${r}`,sharingSocketAddress:`wss://${e}/wc/media/${t}?type=${xo()?"j":"s"}&cid=${r}`}))(e,t,r);this.mediaSocketAddress=l,this.currentUserId=i;const p=Ko();var h,_,f,v,y,E,g,S,b,m;(jo()?null===(h=this.instance)||void 0===h||h.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkletPath:null===(_=this.mediaWorkersPath)||void 0===_?void 0:_.audioWorkletPath,e2eEncrypt:n,isEnableListenInitEvent:!0}):null===(f=this.instance)||void 0===f||f.setPropsBeforeInit({callback:this.onMediaSDKCallback,e2eEncrypt:n,isEnableListenInitEvent:!0}),!0===(null===(c=this.constraints)||void 0===c?void 0:c.audio)&&jo())&&((s||Ho())&&(null===(b=this.instance)||void 0===b||b.initAudioDecode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a)),!Ho()||s&&o||null===(m=this.instance)||void 0===m||m.initAudioEncode(this.mediaWorkersPath,l.audioSocketAddress,i,!1,r,t,p,a));!0===(null===(d=this.constraints)||void 0===d?void 0:d.video)&&jo()&&(null===(v=this.instance)||void 0===v||v.initVideoDecode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p),s&&o||null===(y=this.instance)||void 0===y||y.initVideoEncode(this.mediaWorkersPath,l.videoSocketAddress,i,!1,r,t,p)),!0===(null===(u=this.constraints)||void 0===u?void 0:u.screen)&&(jo()?(null===(E=this.instance)||void 0===E||E.initSharingDecode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p),s&&o||null===(g=this.instance)||void 0===g||g.initSharingEncode(this.mediaWorkersPath,l.sharingSocketAddress,i,!1,r,t,p)):null===(S=this.instance)||void 0===S||S.initSharingDecode(l.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;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(22,{CaptureAudio:n,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t},speakerInfo:{defaultDeviceId:r}})}leaveComputerAudio(){var e;null===(e=this.instance)||void 0===e||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,o=!1){var i;null===(i=this.instance)||void 0===i||i.Notify_MeidaSDK(2,{canvas:e,userId:t,RGBA:n,doNotClean:o,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,r=!1,n=""){var o;this.receivedSharingCanvas=t,null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(23,{width:0,height:0,ssrc:e,canvas:t,enableWaterMark:r,waterMarkText:n})}stopRenderSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(24,{})}switchSharingSource(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(36,{ssrc:e})}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,u({socketURL:"wss://"+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=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=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}(e,["dimension"]);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(27,u(u({},r),n))}startDesktopSharing(e,t,r,n=!0){var o;this.sharingCanvas=document.querySelector("#"+t),null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(30,{mode:n,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,Ko())}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})}}var ai;si.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"}(ai||(ai={}));const ci={success:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",fail:["JOIN_MEETING_FAILED"]},di={[ai.ConnectionChange]:[{event:"JOIN_MEETING_SUCCESS",payload:()=>({state:e.ConnectionState.Connected})},{event:"RECONNECTING_MEETING",payload:t=>u({state:e.ConnectionState.Reconnecting},t)},{event:"LEAVING_MEETING",payload:t=>u({state:e.ConnectionState.Closed},t)}],[ai.OnHoldChange]:[{event:"MEETING_IN_WAITING_ROOM",payload:e=>({isOnHold:e})}],[ai.UserAdd]:[{event:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"ADD_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[ai.UserUpdate]:[{event:"UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[ai.UserRemove]:[{event:"REMOVE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[ai.AttendeeUpdate]:[{event:"UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",payload:e=>e}]};let ui;!function(e){e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change",e.ChatDeleteMessage="chat-delete-message"}(ui||(ui={}));const li={[ui.ChatOnMessage]:[{event:"CHAT_RECEIVE_MESSAGE_EVENTS",payload:e=>e}],[ui.ChatPrivilegeChange]:[{event:"CHAT_PRIVILEGE_CHANGE",payload:e=>e}],[ui.ChatDeleteMessage]:[{event:"CHAT_DELETE_MESSAGE_REPONSE",payload:e=>e}]};let pi,hi,_i;!function(e){e.OnRecordingChange="on-recording-change",e.OnLocalRecordingChange="on-local-recording-change"}(pi||(pi={})),function(e){e.Started="Started",e.Stopped="Stopped"}(hi||(hi={})),function(e){e.Stopped="Stopped",e.Started="Started",e.Paused="Paused"}(_i||(_i={}));const fi={[pi.OnRecordingChange]:[{event:"START_RECORDING_SUCCESS",payload:()=>({state:hi.Started})},{event:"STOP_RECORDING_SUCCESS",payload:()=>({state:hi.Stopped})}],[pi.OnLocalRecordingChange]:[{event:"LOCAL_RECORDING_CHANGE",payload:e=>{const t={};return Array.isArray(e)?e.forEach(e=>{t[e.id]=e.bLocalRecordStatus}):t[e.id]=e.bLocalRecordStatus,t}}]};let vi,yi,Ei,gi;!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"}(vi||(vi={})),function(e){e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed"}(yi||(yi={})),function(e){e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk"}(Ei||(Ei={})),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"}(gi||(gi={}));const Si=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"});let bi,mi,Ii,Ai,Oi;!function(e){e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare"}(e.SharePrivilege||(e.SharePrivilege={})),function(e){e.Sharing="sharing",e.Paused="paused",e.End="ended"}(e.ShareStatus||(e.ShareStatus={})),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"}(e.VideoQuality||(e.VideoQuality={})),function(e){e.Active="Active",e.Inactive="Inactive"}(e.VideoActiveState||(e.VideoActiveState={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted"}(bi||(bi={})),function(e){e.Active="Active",e.Inactive="Inactive"}(mi||(mi={})),function(e){e.Success="Success",e.Failed="Failed",e.Initial="Initial"}(Ii||(Ii={})),function(e){e.Started="Started",e.Stopped="Stopped",e.Failed="Failed"}(e.VideoCapturingState||(e.VideoCapturingState={})),function(e){e.Approved="Approved",e.Rejected="Rejected"}(Ai||(Ai={})),function(e){e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture"}(e.PassiveStopShareReason||(e.PassiveStopShareReason={})),function(e){e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change"}(Oi||(Oi={}));const Ci={[Oi.DeviceChange]:[{event:"MEDIA_DEVICE_CHANGE",payload:()=>({})}],[Oi.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"})}]},Ti={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 wi;!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"}(wi||(wi={}));const Ri={[wi.VideoActiveChange]:[{event:"RECEIVE_VIDEO_ACTIVE_INDICATION",payload:t=>({state:t.bVideoOn?e.VideoActiveState.Active:e.VideoActiveState.Inactive,userId:t.userId})}],[wi.VideoCapturingChange]:[{event:"VIDEO_CAPTURE_START_SUCCESS",payload:()=>({state:e.VideoCapturingState.Started})},{event:"VIDEO_CAPTURE_STOP_RESULT",payload:t=>({state:(null==t?void 0:t.failed)?e.VideoCapturingState.Failed:e.VideoCapturingState.Stopped})}],[wi.VideoMutedChange]:[{event:"RECEIVE_VIDEO_MUTE_INDICATION",payload:e=>({state:e.isVideoMuted?bi.Muted:bi.Unmuted,userId:e.id})}],[wi.AskForStartVideoConsent]:[{event:"ASK_FOR_START_VIDEO_CONSENT",payload:e=>({state:e.isVideoMuted?bi.Muted:bi.Unmuted,userId:e.id})}],[wi.VideoSpotlightChange]:[{event:"VIDEO_SPOTLIGHT_CHANGE",payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map(e=>({userId:e}))})}],[wi.VideoDimensionChange]:[{event:"RECEIVE_VIDEO_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[wi.VideoFollowHostOrder]:[{event:"VIDEO_FOLLOW_HOST_ORDER_CHANGE",payload:e=>({isFollowHostOrder:e.bOn})}],[wi.VideoHostLayoutChange]:[{event:"VIDEO_HOST_DRAG_LAYOUT_CHANGE",payload:e=>Array.isArray(e.layout)?e.layout.map(e=>({userId:e})):[]}],[wi.PeerVideoStateChange]:[{event:"VIDEO_NEW_USER_START",payload:e=>u({action:"Start"},e)},{event:"VIDEO_OLD_USER_STOP",payload:e=>u({action:"Stop"},e)}]};let Ni;!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"}(Ni||(Ni={}));const Di={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"}},Pi={[Ni.ActiveSpeaker]:[{event:"AUDIO_ACTIVE_SPEAKER",payload:e=>e}],[Ni.UnmuteAudioConsent]:[{event:"AUDIO_UNMUTE_CONSENT",payload:e=>({reason:e})}],[Ni.CurrentAudioChange]:[{event:"AUDIO_CURRENT_USER_JOIN_BY_PHONE",payload:()=>({action:"join",type:"phone"})},{event:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",payload:()=>({action:"join",type:"computer"})},{event:"AUDIO_CURRENT_USER_LEAVE_AUDIO",payload:()=>({action:"leave"})},{event:"AUDIO_CURRENT_USER_MUTED",payload:({source:e})=>({action:"muted",source:e})},{event:"AUDIO_CURRENT_USER_UNMUTED",payload:({source:e})=>({action:"unmuted",source:e})}],[Ni.DialoutStateChange]:[{event:"AUDIO_DIALOUT_RESULT_CODE",payload:e=>e}],[Ni.MergeAudio]:[{event:"AUDIO_MERGE_AUDIO_INDICATION",payload:e=>e}],[Ni.AutoPlayFailed]:[{event:"AUDIO_AUTO_PLAY_FAILED",payload:()=>{}}]};let Mi;!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"}(Mi||(Mi={}));const ki={[Mi.ShareActiveChange]:[{event:"SHARE_ACTIVE_INDICATION",payload:e=>({state:e.isActive?"Active":"Inactive",userId:e.activeUserId})}],[Mi.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})}],[Mi.SharePassiveStop]:[{event:"SHARE_VIDEO_STREAMS_END",payload:()=>({reason:e.PassiveStopShareReason.StopScreenCapture})},{event:"SHARE_PASSIVE_STOP_SHARE",payload:()=>({reason:e.PassiveStopShareReason.PrivilegeChange})}],[Mi.SharePeerStateChange]:[{event:"SHARE_NEW_USER_ADD",payload:e=>({userId:e.id,action:"Start"})},{event:"SHARE_USER_REMOVE",payload:e=>({userId:e.id,action:"Stop"})}],[Mi.ShareContentChange]:[{event:"SHARE_AUTO_CHANGE_SOURCE",payload:e=>e}],[Mi.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?Ai.Approved:Ai.Rejected})}],[Mi.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[Mi.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[Mi.SharePrivilegeChange]:[{event:"SHARE_PRIVILEGE_CHANGE",payload:e=>({privilege:e})}]},Ui="INVALID_OPERATION",Vi="INVALID_PARAMETERS";let Li;!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"}(Li||(Li={}));const ji={[Li.InviteToJoin]:[{event:"BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",payload:e=>e}],[Li.RoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_COUTDOWN",payload:e=>e}],[Li.RoomTimeUp]:[{event:"BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",payload:e=>e}],[Li.ClosingRoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",payload:e=>e}],[Li.BroadcastMessage]:[{event:"BREAKOUT_ROOM_BROADCAST_MESSAGE",payload:e=>e}],[Li.AskForHelp]:[{event:"BREAKOUT_ROOM_ASK_HELP_REQUEST",payload:e=>e}],[Li.AskForHelpResponse]:[{event:"BREAKOUT_ROOM_ASK_HELP_RESPONSE",payload:e=>e}],[Li.RoomStateChange]:[{event:"BREAKOUT_ROOM_ATTRIBUTE_INDICATION",payload:e=>({status:e.controlStatus})}],[Li.MainSessionUserUpdate]:[{event:"BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE",payload:()=>({})}]},Hi=u(u(u(u(u(u(u(u(u(u({},di),{"closed-caption-message":[{event:"CC_RECEIVE_MESSAGE",payload:e=>e}]}),li),fi),Pi),Ri),{"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}]}),ki),Ci),ji),xi=(Fi=Fi||Object.create(null),{on:function(e,t){(Fi[e]||(Fi[e]=[])).push(t)},off:function(e,t){Fi[e]&&Fi[e].splice(Fi[e].indexOf(t)>>>0,1)},emit:function(e,t){(Fi[e]||[]).slice().map((function(e){e(t)})),(Fi["*"]||[]).slice().map((function(r){r(e,t)}))}});var Fi;const Gi=new Map,Bi=new Array,Wi=(e,t)=>{xi.emit(e,t)},Ki=e=>new Promise((t,r)=>{e.fail&&e.fail.length>0?$e(We(xi,e.success).pipe(lt(1)),ze(...e.fail.map(e=>We(xi,e).pipe(lt(1),Ve(t=>ce({type:e,payload:t})))))).subscribe(e=>t(e),e=>{"object"==typeof e.payload?r(u({type:e.type},e.payload)):void 0===e.payload?r({type:e.type}):r(e)}):We(xi,e.success).pipe(lt(1)).subscribe(e=>t(e))}),qi=(e,t,r=1e4)=>new Promise((n,o)=>{let i=ee;"string"==typeof e?i=We(xi,e).pipe(lt(1)):(i=We(xi,e.event),e.operations&&(i=e.operations.reduce((e,t)=>e.pipe(t),i))),$e(i,rt(r).pipe(yt(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"})})}),zi=(e,t)=>void 0!==t?We(xi,e).pipe(lt(t)):We(xi,e),Ji=()=>{Bi.forEach(e=>{e.unsubscribe()}),Bi.length=0,Gi.clear()},{setAttendeesList:Qi,setXmppAttendeeList:Yi,setIsAdmitAllSilentUsers:Xi,resetParticipants:Zi,addFailoverAttendees:$i,removeFailoverAttendees:es,setClearRaiseHand:ts,setClearAttendeeFeedback:rs}=Ar({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:()=>({})});function ns(e,t){return e===t}function os(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:ns,r=null,n=null;return function(){return os(t,r,arguments)||(n=e.apply(null,arguments)),r=arguments,n}}));const as=({participants:{attendeesList:e}})=>e;let cs,ds,us;!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"}(cs||(cs={})),function(e){e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee"}(ds||(ds={})),function(e){e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323"}(us||(us={}));const ls=e=>(e&us.Phone)===us.Phone,ps=e=>e===cs.ViewOnlyCanTalk,hs=e=>(e&cs.ViewOnly)===cs.ViewOnly;let _s,fs,vs,ys,Es,gs;!function(e){e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually"}(_s||(_s={})),function(e){e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(fs||(fs={})),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"}(vs||(vs={})),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"}(ys||(ys={})),function(e){e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO"}(Es||(Es={})),function(e){e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom"}(gs||(gs={}));const Ss=ss([({meeting:{userId:e}})=>e,as],(e,t)=>t.find(t=>t.userId===e)),bs=ss([Ss],e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost)),ms=ss([Ss],e=>null==e?void 0:e.isHost),Is=ss([({participants:{xmppAttendeeList:e}})=>e],e=>e.filter(e=>e.userRole===ds.Attendee)),As=ss([as],e=>e.filter(e=>e.bHold&&!e.bid)),Os=ss([as,({breakoutRoom:e})=>e&&e.controlStatus,({breakoutRoom:e})=>e&&e.currentRoom.status],(e,t,r)=>t!==fs.InProgress&&t!==fs.Closing||r!==ys.InRoom?e.filter(e=>!e.bHold&&!e.bid):e.filter(e=>!e.bHold)),Cs=ss([Os],e=>e.find(e=>e.isHost)),Ts=ss([Os],e=>e.filter(e=>e.bCoHost));let ws;!function(e){e.Closed="closed",e.Connecting="connecting",e.Connected="connected"}(ws||(ws={}));const{setAsnIds:Rs,setIsCanUnmute:Ns,setDialoutSequence:Ds,setDialoutResultCode:Ps,setIsAllowToTalk:Ms,setIsHostMuteAll:ks,setIsActiveOperation:Us,setAudioSsrc:Vs,setIsMutedUponEntry:Ls,setIsUserGrantCaptureAudio:js,setIsMicrophoneForbidden:Hs,setWebrtcRestartCount:xs,setMicrophoneList:Fs,setSpeakerList:Gs,setActiveMicrophone:Bs,setActiveSpeaker:Ws,setCanPlayAudio:Ks,resetAudio:qs,setIsComputerAudioLoading:zs}=Ar("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"),{setSharePrivilege:Js,setShareActiveNode:Qs,setIsReceiveSharing:Ys,setIsChromeExtensionInstalled:Xs,setIsScreenShareForbidden:Zs,setShareDimension:$s,setShareStatus:ea,setShareSsrc:ta,setShareQuality:ra,setReceivedShareDimension:na,setIsRemoteControlApproved:oa,setIsGrabRemoteControl:ia,setIsVerifiedSharingRenderCanvasAfterFailover:sa,setIsVerifiedSharingCaptureCanvasAfterFailover:aa,setIsSdkGrabControl:ca,resetShare:da}=Ar("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","RESET_SHARE"),{setVideoSsrc:ua,setActiveVideoId:la,setCameraList:pa,setActiveCamera:ha,setIsCurrentUserStartedVideo:_a,setSpotlightVideo:fa,setIsCaptureForbidden:va,setVideoMaxQuality:ya,setCaptureCanvasList:Ea,setIsVideoMuted:ga,setIsCaptureCameraLoading:Sa,setIsCameraTaken:ba,setIsVerifiedVideoRenderCanvasAfterFailover:ma,setIsVerifiedVideoCaptureCanvasAfterFailover:Ia,resetVideo:Aa,setReceivedVideoDimension:Oa,addSubscribedVideoId:Ca,removeSubscribedVideoId:Ta,setIsFollowHostVideoLayout:wa,setHostDragLayout:Ra,addRenderedVideoId:Na,removeRenderedVideoId:Da,setIsSupportHdVideo:Pa,setHighDefinitionVideoId:Ma}=Ar("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"),{setTempSetting:ka,setSetting:Ua,setQuestionList:Va,setQuestionUpVoted:La,resetQa:ja}=Ar("SET_TEMP_SETTING","SET_SETTING","SET_QUESTION_LIST","SET_QUESTION_UP_VOTED","SET_SELF_LIVE_ANSWER","RESET_QA"),{setChatPrivilege:Ha,addChatMessageHistory:xa,resetChat:Fa,setIsAllowAttendeeChat:Ga,setLatestChatMessageId:Ba,removeChatMessage:Wa}=Ar("SET_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT","SET_LATEST_CHAT_MESSAGE_ID","REMOVE_CHAT_MESSAGE"),{setCcEditorInfo:Ka,setTempSendCcText:qa,setTempReceiveCcText:za,setGatewayInfoList:Ja,resetClosedCaption:Qa}=Ar("SET_CC_EDITOR_INFO","SET_TEMP_SEND_CC_TEXT","SET_TEMP_RECEIVE_CC_TEXT","SET_GATEWAY_INFO_LIST","RESET_CLOSED_CAPTION"),{addBreakoutRooms:Ya,setBreakoutRoomAllocationPattern:Xa,setBreakoutRoomSequenceId:Za,setMeetingElapsedTime:$a,setStartRoomElapsedTime:ec,setBreakoutRoomOptions:tc,setBreakoutRoomControlStatus:rc,setBreakoutRooms:nc,setCurrentBreakoutRoom:oc,setBreakoutRoomAttendeeStatus:ic,setBreakoutRoomConfId:sc,setBreakoutRoomToken:ac,resetBreakoutRoom:cc,setBreakoutRoomClosingRoomTime:dc,setBreakoutRoomBroadcastMessage:uc,setBreakoutRoomHostReplyType:lc,setBreakoutRoomHostReplyRequestId:pc,setMainSessionAttendeeList:hc,setIsHugeBreakoutRoom:_c,setBreakoutRoomUpdatedUserRoleCount:fc,setBreakoutRoomPreAssignedRoomList:vc}=Ar("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"),yc=(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}}=e,{lang:l,password:p,topic:h,zlk:_,cv:f,userName:v}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:n,auth:o,passWord:p,trackAuth:i,customerKey:d,encryptedRWC:JSON.parse(c||"{}"),meetingOptions:JSON.parse(u||"{}"),topic:h,userName:Uo.get(Qo.WebclientUserName)||v,cv:f,zlkJwtToken:_,lang:l}}return e},Ec=(e,t,r,n,o,i)=>{const s={ts:n,auth:o,rwcToken:r,dmz:1};return i&&Object.assign(s,{confID:i}),`https://${e}/wc/ping/${t}?${new URLSearchParams(s).toString()}`},gc=(e,t=!1)=>{const{socket:{zoomSocketStatus:r,xmppSocketStatus:n,mainSessionSocketStatus:o},meeting:{meetingStatus:i}}=e,s=[Io("closed")];if("joined"===i){const t=si.getInstance(),r=ni.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||(Uo.clearSession(),sessionStorage.clear(),ei.destroy()),r!==ws.Closed&&s.push(Mr()),n!==ws.Closed&&s.push(kr()),o!==ws.Closed&&s.push(xr()),t){const t=Ss(e);s.push(fo({audio:null==t?void 0:t.audio,muted:null==t?void 0:t.muted,video:null==t?void 0:t.bVideoOn}))}else s.push(fo({audio:!1,muted:void 0,video:!1}));return s.push(Jr(),on(),Zi(),qs(),da(),Aa(),ja(),Fa(),Qa(),cc()),s},Sc=(e,...t)=>qi({event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",operations:[Oe(t=>t.find(t=>t.userId===e)),Qe(e=>!!e),lt(1)]},...t);function bc(e){return H(Oe((t,r)=>e(t,r)),Qe(e=>null!=e))}function mc(e){return H(Ve((t,r)=>e(t,r)||ee))}function Ic(e){return H(mt((t,r)=>e(t,r)||ee))}const Ac={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},Oc={7937:()=>({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 Cc(e=Ac){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=((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}})(()=>{o=0},s));const d=Object.keys(Oc),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=Oc[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=Oc[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}})}ss([Os,({share:{isReceiveSharing:e}})=>e,({share:{activeNodeId:e}})=>e],(e=[],t,r)=>t?e.find(e=>e.userId===r&&!0===e.sharerOn):null);const Tc=ss([Os],e=>e.filter(e=>e.sharerOn)),wc=ni.createAgent();var Rc=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>dn(e,7938).pipe(Qe(e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.lockShare)}),wt(t),Ot(([e,t])=>{const{share:{sharePrivilege:r}}=t,{payload:{body:{lockShare:n}}}=e;r!==n&&Wi("SHARE_PRIVILEGE_CHANGE",n)}),Oe(([e])=>Js(e.payload.body.lockShare))),shareSSrcEpic:e=>dn(e,20227).pipe(Oe(e=>ta(e.payload.body.ssrc))),shareStatusChangeEpic:(e,t)=>dn(e,20225).pipe(wt(t),Oe(([e,t])=>{const{share:{isReceiveSharing:r,activeNodeId:n,shareQuality:o}}=t,{payload:{body:i}}=e;return r&&1===i.bStatus?(wc.unsubscribeSharing(n),wc.subscribeSharing(i.activeNodeID,o),si.getInstance().switchSharingSource(i.ssrc),Wi("SHARE_AUTO_CHANGE_SOURCE",{userId:i.activeNodeID})):1===i.bStatus?Wi("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!0}):r&&Wi("SHARE_ACTIVE_INDICATION",{activeUserId:i.activeNodeID,isActive:!1}),Qs(i)})),handleChromeExtensionEpic:e=>pn(e,vi.CheckChromeSharingExtensionResponse).pipe(Oe(e=>(Wi("SHARE_CHECK_CHROME_SHARING_EXTENSION",e.payload.data),Xs(e.payload.data)))),handleSDKShareSuccessEpic:(e,t)=>pn(e,vi.DesktopSharingCaptureSuccess).pipe(wt(t),Oe(([,e])=>{const{meeting:{userId:t}}=e;return wc.startSharing(t),Zs(!1)})),handleSDKShareErrorEpic:e=>pn(e,[vi.DesktopSharingError,vi.DesktopSharingChromeExtensionUninstalled,vi.DesktopSharingPermissionDenied,vi.DesktopSharingSystemError]).pipe(bc(e=>{if([vi.DesktopSharingPermissionDenied,vi.DesktopSharingSystemError].includes(e.payload.type))return Zs(!0);Wi("SHARE_START_DESKTOP_SHARE_FAILED",{reason:""})})),handleSDKShareDimensionChangeEpic:e=>pn(e,vi.CurrentDesktopSharingWidthHeight).pipe(Qe(e=>!!e.payload.data),Oe(e=>{Wi("SHARE_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return si.getInstance().ajustmentSharingCanvas(t,r),$s(e.payload.data)})),handleSDKReceivedShareSizeChangeEpic:(e,t)=>pn(e,vi.SharingDecodeMaxSize).pipe(Qe(e=>!!e.payload.data),wt(t),bc(([e,t])=>{const{share:{shareQuality:r,activeNodeId:n}}=t,{payload:{data:{size:o}}}=e,i=Number(o);if(r!==i)return wc.subscribeSharing(n,i),ra(i)})),handleRWGShareOriginalDimensionEpic:e=>dn(e,20226).pipe(Ot(e=>{Wi("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.body);const{payload:{body:{width:t,height:r}}}=e;si.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Oe(e=>na(e.payload.body))),handleSDKShareOriginalDimensionEpic:e=>pn(e,vi.SharingPara).pipe(Ot(e=>{Wi("SHARE_RECEIVED_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;si.getInstance().ajustmentReceivedSharingCanvas(t,r)}),Oe(e=>na(e.payload.data))),handleSDKStopShareEpic:(t,r)=>pn(t,vi.UserStopDesktopSharing).pipe(wt(r),Oe(([,t])=>{const{meeting:{userId:r},share:{status:n}}=t;return n!==e.ShareStatus.End&&(wc.stopSharing(r),Wi("SHARE_VIDEO_STREAMS_END")),ea(e.ShareStatus.End)})),handleRWGCurrentUserShareChangeEpic:(t,r)=>dn(t,7937).pipe(wt(r),Qe(([e,t])=>{const{meeting:{userId:r}}=t,n=e.payload.body.update;return n&&n.length>0&&n.findIndex(e=>e.id===r&&void 0!==e.bShareOn)>-1}),Ve(([t,r])=>{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=si.getInstance();return c&&o!==e.ShareStatus.End&&(wc.stopSharing(n),l.stopDesktopSharing(),u.push(ea(e.ShareStatus.End)),Wi("SHARE_PASSIVE_STOP_SHARE")),d&&o===e.ShareStatus.End&&(i&&(l.stopRenderSharing(),wc.unsubscribeSharing(s),u.push(Ys(!1))),u.push(ea(e.ShareStatus.Sharing))),Ue(u)})),handleMultipleShareChangeEpic:(e,t)=>dn(e,7937).pipe(wt(t),Qe(([e,t])=>{const{meeting:{userId:r}}=t,n=e.payload.body.update;return n&&n.length>0&&n.findIndex(e=>e.id!==r&&void 0!==e.bShareOn)>-1}),mc(([t,r])=>{const{payload:{body:{update:n}}}=t,{share:{activeNodeId:o,isReceiveSharing:i,shareQuality:s}}=r,a=Tc(r),c=n.filter(e=>!0===e.bShareOn&&!1===e.bSharePause),d=n.filter(e=>!1===e.bShareOn);if(c.length>0&&c.forEach(e=>{-1===a.findIndex(t=>t.userId===e.id)&&Wi("SHARE_NEW_USER_ADD",e)}),d.length>0&&(d.forEach(e=>{Wi("SHARE_USER_REMOVE",e)}),i&&d.some(e=>e.id===o)))return $e(dn(e,20225).pipe(lt(1),yt(ee)),rt(50).pipe(yt(ce("timeout")))).pipe(ot(()=>{const e=a.filter(e=>e.userId!==o);if(e.length>0){const t=e[0],{userId:r}=t;return wc.unsubscribeSharing(o),wc.subscribeSharing(r,s),si.getInstance().switchSharingSource(r),Wi("SHARE_AUTO_CHANGE_SOURCE",{userId:r}),ae(Qs({activeNodeID:r,bStatus:1,ssrc:r}))}return ee}))})),handleRequestRemoteControlEpic:(e,t)=>dn(e,16391).pipe(wt(t),Qe(([e,t])=>{const{meeting:{userId:r}}=t;return e.payload.body.id===r}),Oe(([e])=>{const{payload:{body:{bOn:t}}}=e;return Wi("SHARE_REMOTE_CONTROL_APPROVE",t),oa(t)})),handleGrabRemoteControlEpic:(e,t)=>dn(e,16395).pipe(wt(t),Qe(([e,t])=>e.payload.body.id===t.meeting.userId),Oe(([e])=>{const{payload:{body:{bOn:t}}}=e;return si.getInstance().updateRemoteControlProperties({isControllerNow:t}),Wi("SHARE_GRAB_REMOTE_CONTROL_CHANGE",t),ia(t)})),handleSDKRemoteControlEpic:e=>pn(e,[vi.StartRemoteControlSuccess,vi.StartRemoteControlFailed,vi.CancelRemoteControlSuccess]).pipe(bc(e=>e.payload.type===vi.StartRemoteControlSuccess?(Wi("SHARE_REMOTE_CONTROL_SUCCESS"),ca(!0)):e.payload.type===vi.CancelRemoteControlSuccess?ca(!1):void(e.payload.type===vi.StartRemoteControlFailed&&Wi("SHARE_REMOTE_CONTROL_FAILED")))),handleRemoteControlClipboardEpic:e=>pn(e,[vi.RemoteControlCopiedTextNotify,vi.RemoteControlPasteTextLengthOverflow]).pipe(Ot(e=>{if(e.payload.type===vi.RemoteControlCopiedTextNotify){const{payload:{data:t}}=e;Wi("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{content:t.data,x:t.x,y:t.y})}else Wi("SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",{error:"length of pasted text is too long"})}),yt(ee))});function Nc(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:Lc(e)?2:jc(e)?3:0}function Uc(e,t){return 2===kc(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Vc(e,t,r){var n=kc(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function Lc(e){return ud&&e instanceof Map}function jc(e){return ld&&e instanceof Set}function Hc(e){return e.o||e.t}function xc(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ed(e);delete t[fd];for(var r=yd(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=Gc),Object.freeze(e),t&&Mc(e,(function(e,t){return Fc(t,!0)}),!0)),e}function Gc(){Nc(2)}function Bc(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Wc(e){var t=gd[e];return t||Nc(18,e),t}function Kc(){return cd}function qc(e,t){t&&(Wc("Patches"),e.u=[],e.s=[],e.v=t)}function zc(e){Jc(e),e.p.forEach(Yc),e.p=null}function Jc(e){e===cd&&(cd=e.l)}function Qc(e){return cd={p:[],l:cd,h:e,m:!0,_:0}}function Yc(e){var t=e[fd];0===t.i||1===t.i?t.j():t.g=!0}function Xc(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.O||Wc("ES5").S(t,e,n),n?(r[fd].P&&(zc(t),Nc(4)),Pc(e)&&(e=Zc(t,e),t.l||ed(t,e)),t.u&&Wc("Patches").M(r[fd],e,t.u,t.s)):e=Zc(t,r,[]),zc(t),t.u&&t.v(t.u,t.s),e!==hd?e:void 0}function Zc(e,t,r){if(Bc(t))return t;var n=t[fd];if(!n)return Mc(t,(function(o,i){return $c(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return ed(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=xc(n.k):n.o;Mc(3===n.i?new Set(o):o,(function(t,i){return $c(e,n,o,t,i,r)})),ed(e,o,!1),r&&e.u&&Wc("Patches").R(n,r,e.u,e.s)}return n.o}function $c(e,t,r,n,o,i){if(Dc(o)){var s=Zc(e,o,i&&t&&3!==t.i&&!Uc(t.D,n)?i.concat(n):void 0);if(Vc(r,n,s),!Dc(s))return;e.m=!1}if(Pc(o)&&!Bc(o)){if(!e.h.F&&e._<1)return;Zc(e,o),t&&t.A.l||ed(e,o)}}function ed(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&Fc(t,r)}function td(e,t){var r=e[fd];return(r?Hc(r):e)[t]}function rd(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 nd(e){e.P||(e.P=!0,e.l&&nd(e.l))}function od(e){e.o||(e.o=xc(e.t))}function id(e,t,r){var n=Lc(t)?Wc("MapSet").N(t,r):jc(t)?Wc("MapSet").T(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:Kc(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=Sd;r&&(o=[n],i=bd);var s=Proxy.revocable(o,i),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(t,r):Wc("ES5").J(t,r);return(r?r.A:Kc()).p.push(n),n}function sd(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return xc(e)}var ad,cd,dd="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ud="undefined"!=typeof Map,ld="undefined"!=typeof Set,pd="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,hd=dd?Symbol.for("immer-nothing"):((ad={})["immer-nothing"]=!0,ad),_d=dd?Symbol.for("immer-draftable"):"__$immer_draftable",fd=dd?Symbol.for("immer-state"):"__$immer_state",vd=""+Object.prototype.constructor,yd="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ed=Object.getOwnPropertyDescriptors||function(e){var t={};return yd(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},gd={},Sd={get:function(e,t){if(t===fd)return e;var r=Hc(e);if(!Uc(r,t))return function(e,t,r){var n,o=rd(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||!Pc(n)?n:n===td(e.t,t)?(od(e),e.o[t]=id(e.A.h,n,e)):n},has:function(e,t){return t in Hc(e)},ownKeys:function(e){return Reflect.ownKeys(Hc(e))},set:function(e,t,r){var n=rd(Hc(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var o=td(Hc(e),t),i=null==o?void 0:o[fd];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||Uc(e.t,t)))return!0;od(e),nd(e)}return e.o[t]===r&&"number"!=typeof r||(e.o[t]=r,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==td(e.t,t)||t in e.t?(e.D[t]=!1,od(e),nd(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Hc(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(){Nc(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Nc(12)}},bd={};Mc(Sd,(function(e,t){bd[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),bd.deleteProperty=function(e,t){return Sd.deleteProperty.call(this,e[0],t)},bd.set=function(e,t,r){return Sd.set.call(this,e[0],t,r,e[0])};var md=new(function(){function e(e){var t=this;this.O=pd,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}}var o=Wc("Patches").$;return Dc(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(r+1))}))},e}()),Id=md.produce;md.produceWithPatches.bind(md),md.setAutoFreeze.bind(md),md.setUseProxies.bind(md),md.applyPatches.bind(md),md.createDraft.bind(md),md.finishDraft.bind(md);const Ad={ssrc:0,status:e.ShareStatus.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:e.SharePrivilege.OnlyHost,activeNodeId:0,activeSsrc:0,shareQuality:1,isRemoteSharingActive:!1,isReceiveSharing:!1,isRemoteControlApproved:!1,isGrabRemoteControl:!1,isSDKGrabControl:!1,isChromeExtensionInstalled:!1,isScreenShareForbidden:!1},Od=Nr({[""+Js]:Id((e,{payload:t})=>{e.sharePrivilege=t}),[""+Qs]:Id((e,{payload:t})=>{e.isRemoteSharingActive=1===t.bStatus,e.activeNodeId=t.activeNodeID,e.activeSsrc=t.ssrc}),[""+Ys]:Id((e,{payload:t})=>{e.isReceiveSharing=t}),[""+Xs]:Id((e,{payload:t})=>{e.isChromeExtensionInstalled=t}),[""+$s]:Id((e,{payload:t})=>{e.shareDimension=u({},t)}),[""+ea]:Id((e,{payload:t})=>{e.status=t}),[""+ta]:Id((e,{payload:t})=>{e.ssrc=t}),[""+ra]:Id((e,{payload:t})=>{e.shareQuality=t}),[""+na]:Id((e,{payload:t})=>{e.receivedShareDimension=u({},t)}),[""+oa]:Id((e,{payload:t})=>{e.isRemoteControlApproved=t}),[""+ia]:Id((e,{payload:t})=>{e.isGrabRemoteControl=t}),[""+sa]:Id((e,{payload:t})=>{e.isVerifiedRenderCanvasAfterFailover=t}),[""+aa]:Id((e,{payload:t})=>{e.isVerifiedCaptureCanvasAfterFailover=t}),[""+ca]:Id((e,{payload:t})=>{e.isSDKGrabControl=t}),[""+da]:()=>u(u({},Ad),{},{isVerifiedRenderCanvasAfterFailover:!1,isVerifiedCaptureCanvasAfterFailover:!1})},Ad),Cd=cn(Rc),Td=ni.createAgent(),wd=(e,t)=>e.pipe(kt(""+ro),wt(t),Qe(([,e])=>void 0!==e.meeting.encryptedRWC),Ic(([,e])=>{const{meeting:{encryptedRWC:t,ts:r,auth:n,meetingNumber:o},breakoutRoom:i}=e;if(t)return Ue(Object.keys(t).map(e=>{const s=t[e];let a=void 0;return a=i&&i.currentRoom.boConfId?Ec(e,o,s,r,n,i.currentRoom.boConfId):Ec(e,o,s,r,n),{url:a,domain:e,rwcToken:s}})).pipe(Ve(e=>Nn(e.url).pipe(Ve(t=>{let r={};return r=t.response?u(u({},t.response),{},{fromNginx:!1}):{rwg:e.domain,rwcToken:e.rwcToken,fromNginx:!0},Ue([Br(r),Dr()])}),ot(()=>ee))),Et(po(performance.now())))}));var Rd=Object.freeze({__proto__:null,pingRWCEpic:wd,joinMeetingSuccessfulEpic:(e,t)=>dn(e,4098).pipe(wt(t),Ic(([e,t])=>{const{payload:{body:{res:r,userID:n,zoomID:o,mn:i,participantID:s,hugeBO:a,elapsed:c,disableAqos:d,meetingtoken:u}}}=e,{meeting:{pingRWCTimestamp:l,isWebinar:p,userEmail:h,userName:_,isMeetingReset:f,meetingOptions:v},media:{mediaConstraints:y,assetsPath:E},breakoutRoom:g}=t;if(Mn.CONF_SUCCESS===r){const{WebclientParticipantId:t,WebclientUserId:r,WebclientZoomId:S,WebclientUserEmail:b,WebclientUserName:m,WebclientMeetingToken:I}=Qo;Uo.set(r,n,Mo.SessionStorage),Uo.set(S,o,Mo.SessionStorage),Uo.set(t,s,Mo.SessionStorage),h&&Uo.set(b,h,Mo.SessionStorage),Uo.set(m,_,Mo.SessionStorage),u&&Uo.set(I,u,Mo.SessionStorage),Td.sendRWGConnectionPerformance(`WCL_M, JMCT(${performance.now()-l})`);const A=[ho(e.payload.body),Co(performance.now())];return si.getInstance().init(),f&&(A.push(go(!1)),void 0!==y&&void 0!==E&&A.push(Qr())),p&&A.push(Pr()),g&&(v&&!0===v.isBO100Enabled&&A.push(_c(a)),g.currentRoom.boConfId&&A.push(Hr()),void 0!==c&&A.push($a(c))),void 0!==d&&A.push(To(!d)),Wi("JOIN_MEETING_SUCCESS",{meetingNumber:i}),Ue(A)}return Mn.CONF_FAIL_CONFLOCKED===r?Wi("JOIN_MEETING_FAILED",Wn(r)):Mn.CONF_FAIL_CONF_USER_FULL===r?Wi("JOIN_MEETING_FAILED",Object.assign({},Wn(r),{lmUrl:e.payload.body.lmURL})):(Mn.CONF_FAIL_MEETING_OVER===r||Mn.CONF_RESULT_MMR_IB_REJECT===r||Mn.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===r||[Mn.CONF_FAIL_HAS_BEEN_REMOVED,Mn.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(r),Wi("JOIN_MEETING_FAILED",Wn(r))),Ue(gc(t,!1))})),handleMeetingAttributeChangeEpic:(e,t)=>dn(e,7938).pipe(wt(t),Oe(([e,t])=>{const{payload:{body:r}}=e,{meeting:{zoomId:n,encType:o}}=t;if(void 0!==(null==r?void 0:r.encryptKey)&&ei.init(n,r.encryptKey,o),void 0!==(null==r?void 0:r.gatewayKey)){const e=si.getInstance(),[,t,n]=r.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:n&&Xn(n)}])}return Wi("UPDATE_MEETING_ATTRIBUTE",r),_o(r)})),handleMeetingEndEpic:(e,t)=>dn(e,7939).pipe(wt(t),Ve(([e,t])=>{const{payload:{body:r}}=e;if(void 0!==r.reason){if(kn.LEAVEREASON_RECONNECT===r.reason)return Un.LEAVESUBREASON_WAITINGROOMFAILOVER===r.subReason?Wi("RECONNECTING_MEETING",{reason:Do.OnHold}):Wi("RECONNECTING_MEETING",{reason:Do.Failover}),ae(no());kn.LEAVEREASON_KICKEDBYHOST===r.reason?Wi("LEAVING_MEETING",{reason:"kicked by host"}):kn.LEAVEREASON_ENDBYHOST!==r.reason&&kn.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING!==r.reason||Wi("LEAVING_MEETING",{reason:"ended by host"})}return t.meeting.isMeetingReset?ee:Ue(gc(t,!1))})),meetingFailoverEpic:(e,t)=>e.pipe(kt(""+no),wt(t),Ve(([,e])=>{const t=gc(e,!0);let r;if(e.meeting.zlkJwtToken){const t=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}(e),n={topic:null==t?void 0:t.topic,password:null==t?void 0:t.passWord,userName:null==t?void 0:t.userName,zlk:null==t?void 0:t.zlkJwtToken,lang:null==t?void 0:t.lang,cv:null==t?void 0:t.cv,customerKey:null==t?void 0:t.customerKey};r=ae(to(n)).pipe(at(1e3))}else{const t=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(Qo.WebclientZak),tk:h||sessionStorage.getItem(Qo.WebclientTk)}}(e);r=ae(eo(t)).pipe(at(1e3))}return Fe(Ue(t),r)})),hostChangeEpic:e=>ln(e,7940).pipe(Ot(e=>{Wi("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)}),Oe(e=>vo(e.payload.body))),cohostChangeEpic:e=>ln(e,7941).pipe(Ot(e=>{Wi("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)}),Oe(e=>yo(e.payload.body))),setMeetingOptEpic:e=>ln(e,7945).pipe(Ot(e=>{const{payload:{body:{opt:t}}}=e;Uo.set(Qo.WebclientOpt,t,Mo.SessionStorage)}),yt(ee)),setMeetingOnHoldEpic:(t,r)=>dn(t,7942).pipe(Ot(e=>{const{payload:{body:{bHold:t}}}=e;Uo.set(Qo.WebclientIsOnHold,t?1:0,Mo.SessionStorage),Wi("MEETING_IN_WAITING_ROOM",t)}),wt(r),Ve(([t,r])=>{const n=[Eo(t.payload.body.bHold)];if(t.payload.body.bHold){const t=Ss(r);if(t){n.push(So({audio:t.audio,video:t.bVideoOn,muted:t.muted}));const o=si.getInstance();if("computer"===t.audio&&(o.leaveComputerAudio(),Td.joinOrLeaveVoip(!1)),t.bVideoOn&&o.stopCaptureVideo(),t.sharerOn&&(Td.stopSharing(t.userId),o.stopDesktopSharing(),n.push(ea(e.ShareStatus.End))),r.video&&r.video.subscribedVideoList.length>0&&r.video.subscribedVideoList.forEach(e=>{Td.unsubscribeVideo(e)}),r.share&&r.share.isReceiveSharing){const e=r.share.activeNodeId;r.share.isRemoteControlApproved&&(Td.sharingRequestRemoteControl(e,!1),o.stopRemoteControl()),Td.unsubscribeSharing(e),o.stopRenderSharing()}}}return Ue(n)})),setMeetingDataCenterRegionEpic:e=>dn(e,7954).pipe(Oe(e=>Ao(e.payload.body))),claimHostResponseEpic:e=>dn(e,4216).pipe(Ot(e=>{Wi("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)}),yt(ee)),leaveMeetingEpic:(e,t)=>e.pipe(kt(""+oo,""+io),wt(t),Ve(([e,t])=>(e.type===""+oo?(Td.leaveMeeting(),Wi("LEAVING_MEETING",{})):e.type===""+io&&(Td.endMeeting(),Wi("LEAVING_MEETING",{})),Ue(gc(t,!1))))),versionUpgradeEpic:e=>dn(e,2).pipe(Ot(()=>{console.warn("Upgrade to latest version to optimize meeting experience")}),yt(ee)),versionBlockEpic:e=>dn(e,1).pipe(Ot(e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=Wn(1e3);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,()=>t);r.reason=e}Wi("JOIN_MEETING_FAILED",r)}),yt(ee))});let Nd,Dd,Pd=window.WEB_ENDPOINT||"zoom.us",Md=`https://${Pd}/wc/lsdk`;!function(e){e.Expel="expel",e.Promote="promote",e.Depromote="depromote",e.MemberChange="memberChange",e.RaiseHand="raisehand",e.LowerHand="lowerhand",e.PutdownHands="putdownhands"}(Nd||(Nd={})),function(e){e[e.AttendeeToAllPanelist=1]="AttendeeToAllPanelist",e[e.PanelistToAttendee=3]="PanelistToAttendee"}(Dd||(Dd={}));const kd=["CONNECTED","DISCONNECTED","POOL","CONNFAIL","OnlineMembers","GroupChange","RosterChange","WebinarQA","Message"];class Ud{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;kd.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 Ud),this.agentInstance}onXmppCallback(e,t){this.callbackList.length>0&&this.callbackList.forEach(r=>r(e,t))}registerCallback(e){this.callbackList.push(e)}unregisterCallback(e){const t=this.callbackList.findIndex(t=>t===e);t>-1&&this.callbackList.splice(t,1)}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;kd.forEach(t=>{e.on(t,e=>{this.onXmppCallback(t,e)})})}const c=`wss://${r}/wc/media/${n}?type=x&cid=${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}}Ud.agentInstance=void 0;let Vd=0;var Ld=qn((function(e,t){var r;r=function(){function e(){for(var e=0,t={};ee.pipe(kt(""+Ur),wt(t),Ve(([,e])=>{const{media:{assetsPath:t}}=e;return Ue(new Promise((e,r)=>{wo(t+"/webim.min.js",()=>{e("")},()=>{r()})})).pipe(_t(qr(!0)),ot(e=>ae(qr(!1))))})),connectXMPPSocketEpic:(e,t)=>e.pipe(kt(""+Pr),wt(t),Qe(([,e])=>"closed"===e.socket.xmppSocketStatus),Ic(([,t])=>{const{meeting:{svcUrl:r,meetingNumber:n,conId:o,jid:i,userName:s},socket:{isXmppSDKLoaded:a}}=t,c=jo()&&Ho()?11:10;let d=ae(a);return!1===a&&(d=e.pipe(kt(""+qr),lt(1))),d.pipe(Ve(e=>{return e?(t={svcUrl:r,meetingNumber:n,conId:o,jid:i,userName:s,clientCap:c},Xd.connect(t),Zd=new q,Ke(e=>Xd.registerCallback(e),e=>Xd.unregisterCallback(e),(e,t)=>({event:e,data:t})).subscribe(Zd),Zd).pipe(Oe(e=>jr(e)),Et(Kr(ws.Connecting))):ce("webim load fail");var t}))})),connectedXmppSocketEpic:(e,t)=>e.pipe(kt(""+Kr),Qe(e=>e.payload===ws.Connecting),Ic(()=>{if(Zd){const e=Zd.pipe(Qe(e=>"CONNECTED"===e.event)),r=Zd.pipe(Qe(e=>"DISCONNECTED"===e.event));return ze(e.pipe(Ve(()=>ae(Kr(ws.Connected)))),r.pipe(wt(t),Qe(([,e])=>"closed"!==e.socket.xmppSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Oe(()=>(Wi("RECONNECTING_MEETING",{reason:Do.Failover}),no()))))}})),disconnectXmppSocketEpic:e=>e.pipe(kt(""+kr),_t(Kr(ws.Closed)),Ot(()=>{var e;Xd.disconnect(),null===(e=Zd)||void 0===e||e.complete()}))});const eu={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:null,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,enableQos:!0},tu=Nr({[""+so]:Id((e,{payload:t})=>{Object.assign(e,t)}),[""+ao]:Id((e,{payload:t})=>{e.isWindowOpen=t}),[""+co]:Id((e,{payload:t})=>{e.apiKey=t.apiKey,e.signature=t.signature,e.lang=t.language}),[""+uo]:Id((e,{payload:t})=>{e.zak=t}),[""+lo]:Id((e,{payload:t})=>{e.tk=t.tk,e.mtkGuid=t.mtkGuid}),[""+po]:Id((e,{payload:t})=>{e.pingRWCTimestamp=t}),[""+ho]:Id((e,{payload:t})=>{e.confId=t.confID,e.conId=t.conID,e.e2eEncrypt=t.e2eEncrypt,e.meetingNumber=parseInt(t.mn,10),e.zoomId=t.zoomID,e.meetingStatus="joined",e.jid=t.jid,e.xtoken=t.xtoken,e.groups=t.groups,e.svcUrl=t.svcUrl,e.encType=t.encType,e.userGUID=t.userGUID,e.userId=t.userID,e.role=t.role,e.participantID=t.participantID}),[""+_o]:Id((e,{payload:t})=>{Object.assign(e,t)}),[""+vo]:Id((e,{payload:t})=>{e.isHost=t}),[""+yo]:Id((e,{payload:t})=>{e.isCoHost=t}),[""+Eo]:Id((e,{payload:t})=>{e.isOnHold=t}),[""+go]:Id((e,{payload:t})=>{e.isMeetingReset=t}),[""+So]:Id((e,{payload:t})=>{e.audioVideoBeforeOnHold=t}),[""+bo]:Id((e,{payload:t})=>{e.currentUserAudioBeforeReset=t}),[""+mo]:Id((e,{payload:t})=>{e.isCurrentUserMutedBeforeReset=t}),[""+Io]:Id((e,{payload:t})=>{e.meetingStatus=t}),[""+Ao]:Id((e,{payload:t})=>{e.region=t.region,e.network=t.network}),[""+Oo]:Id((e,{payload:t})=>{e.isCurrentUserStartVideoBeforeReset=t}),[""+Co]:Id((e,{payload:t})=>{e.joinMeetingTimeStamp=t}),[""+To]:Id((e,{payload:t})=>{e.enableQos=t}),[""+fo]:Id((e,{payload:t})=>{Object.assign(e,u(u({},eu),{},{isMeetingReset:!0,currentUserAudioBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.audio:t.audio,isCurrentUserMutedBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.muted:t.muted,isCurrentUserStartVideoBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.video:t.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}))})},eu),ru=cn(Rd,{meetingInfoEpic:(e,t)=>e.pipe(kt(""+to),mt(e=>{const r=Object.assign({},e.payload,{password:Jn(e.payload.password),topic:Jn(e.payload.topic)});return((e,t,r="zoomsdkjsonpcallback")=>new F(n=>{Vd++;const o=`${r}${Vd}`,i=document.createElement("script");Object.keys(t).forEach(e=>(void 0===t[e]||null===t[e])&&delete t[e]),i.src=`${e}?${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()}}))(Md,r).pipe(ot(e=>ae({status:!1,result:e.toString(),errorCode:-3e3})),Ve(r=>{const[n,o]=Ze(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?Wi("JOIN_MEETING_FAILED",Bn(3004)):-3e3===e.errorCode?Wi("JOIN_MEETING_FAILED",{reason:"connection error"}):3e3===e.errorCode?Wi("JOIN_MEETING_FAILED",{reason:e.errorMessage,errorCode:200}):300===e.errorCode?Wi("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?Wi("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?Wi("JOIN_MEETING_FAILED",{reason:"The token is expired or more than 2 days or ineffective.",errorCode:200}):124===e.errorCode&&Wi("JOIN_MEETING_FAILED",{reason:"Verify JWT failed",errorCode:200}))}),n.pipe(mc(r=>{if(!0===r.status){const{result:{mid:n}}=r;return Uo.init(n),Fe(ae(so(yc(r,e.payload))),sn(wd,t,ro()))}}))}))}))}),nu=ni.createAgent();let ou;var iu=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(kt(""+Dr),wt(t),Qe(([,e])=>"closed"===e.socket.zoomSocketStatus),Ic(([,e])=>{const{socket:{retryCount:t,rwgServerList:r},meeting:n,breakoutRoom:o}=e;let i;if(n.zlkJwtToken)i=function({passWord:e,meetingNumber:t,userName:r,topic:n,trackAuth:o,tid:i,meetingId:s,ts:a,auth:c,lang:d,retryCount:u,rwgServerList:l,cv:p,customerKey:h,zlkJwtToken:_}){const f=Ld.get("_zm_mtk_guid");let v=Uo.get(Yd);if(v||(v=Bd(),Uo.set(Yd,v,Mo.LocalStorage)),l.length>u){const y=l[u];let E={dn2:Jn(r),topic:Jn(n),auth:c,browser:Vo(),trackAuth:o,mid:s,tid:i,lang:d,ts:a,"ZM-CID":v,_ZM_MTG_TRACK_ID:f||"",iccv:p,customer_key:Jn(h),cfs:0,zlkJwtToken:_};""!==e&&(E=Object.assign(E,{mpwd:Jn(e)})),y.rwcAuth?E=Object.assign(E,{rwcAuth:y.rwcAuth}):y.rwcToken&&(E=Object.assign(E,{rwcToken:y.rwcToken}));let g=2;return xo()?g=1:Fo()&&(g=0),E=Object.assign(E,{as_type:g}),[{key:qd,queryKey:"opt"},{key:zd,queryKey:"participantID"},{key:Jd,queryKey:"zoomid"}].forEach(e=>{const t=Uo.get(e.key);void 0!==t&&(E[e.queryKey]=t)}),`wss://${y.rwg}/instantsdk/${t}?${new URLSearchParams(E).toString()}`}return null}(u(u({},n),{},{retryCount:t,rwgServerList:r}));else{let e=u(u({},n),{},{retryCount:t,rwgServerList:r});if(o&&o.currentRoom.status===ys.Joining){const{currentRoom:{boId:t,boConfId:r,boToken:n}}=o;e=u(u({},e),{},{bid:t,botk:n,confID:r})}i=function({isHost:e,isOriginHost:t,passWord:r,meetingNumber:n,userName:o,zak:i,trackAuth:s,tid:a,sign:c,meetingId:d,ts:u,auth:l,lang:p,tk:h,retryCount:_,rwgServerList:f,userEmail:v,cv:y,bid:E,botk:g,confID:S,customerKey:b}){const m=Ld.get("_zm_mtk_guid");let I=Uo.get(Yd);if(I||(I=Bd(),Uo.set(Yd,I,Mo.LocalStorage)),f.length>_){const A=f[_];let O={dn2:Jn(o),auth:l,sign:c,browser:Vo(),trackAuth:s,mid:d,tid:a,email:v,lang:p,zak:i||"",tk:h||"",customer_key:Jn(b),ts:u,"ZM-CID":I,_ZM_MTG_TRACK_ID:m||"",jscv:y,cfs:0};e&&t||""===r||(O=Object.assign(O,{mpwd:r})),A.rwcAuth?O=Object.assign(O,{rwcAuth:A.rwcAuth}):A.rwcToken&&(O=Object.assign(O,{rwcToken:A.rwcToken}));let C=2;return xo()?C=1:Fo()&&(C=0),O=Object.assign(O,{as_type:C}),[{key:Kd,queryKey:"cfs"},{key:qd,queryKey:"opt"},{key:zd,queryKey:"participantID"},{key:Jd,queryKey:"zoomid"},{key:Qd,queryKey:"tk"}].forEach(e=>{const t=Uo.get(e.key);void 0!==t&&(O[e.queryKey]=t)}),E&&g&&S&&Object.assign(O,{bid:Jn(E),botk:g,confID:S}),`wss://${A.rwg}/wc/api/${n}?${new URLSearchParams(O).toString()}`}return null}(e)}if(i){const e=(s=i,nu.connect(s),ou=new q,Ke(e=>nu.on(ti.Message,e),e=>nu.off(ti.Message,e),e=>e.data).subscribe(ou),ou);return ze(e.pipe(Qe(e=>"string"==typeof e),Oe(e=>JSON.parse(e)),Cc(),bc(e=>{if(0!==e.evt||!e.body||"invalid parameters!"!==e.body.test)return Vr(e);Wi("JOIN_MEETING_FAILED",Bn(Ln.INVALID_PARAMETER))}),Et(Gr(ws.Connecting))),e.pipe(Qe(e=>e instanceof ArrayBuffer),Oe(e=>Lr(e))))}var s})),connectedZoomSocketEpic:(e,t)=>e.pipe(kt(""+Dr),mt(()=>{const[e,r,n]=[ti.Open,ti.Close,ti.Error].map(e=>Ke(t=>nu.on(e,t),t=>nu.on(e,t)));return ze(e.pipe(Ve(()=>ze(ae(Gr(ws.Connected)),rt(6e4).pipe(wt(t),Qe(([,e])=>"initial"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Oe(()=>(Wi("RECONNECTING_MEETING",{reason:Do.Failover}),no())))))),r.pipe(wt(t),Qe(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus&&!e.meeting.isMeetingReset),Oe(()=>(Wi("RECONNECTING_MEETING",{reason:Do.Failover}),no()))),n.pipe(wt(t),mc(([,e])=>{const{meeting:{meetingStatus:t,isMeetingReset:r},socket:{retryCount:n}}=e;return"initial"===t?Ue([Wr(n+1),Mr({retry:!0})]):r?void 0:(Wi("RECONNECTING_MEETING",{reason:Do.Failover}),ae(no()))})))})),disconnectZoomSocketEpic:e=>e.pipe(kt(""+Mr),Ve(e=>e.payload&&e.payload.retry?ae(Dr()).pipe(at(1e3),Et(Gr(ws.Closed))):ae(Gr(ws.Closed))),at(100),Ot(()=>{var e;nu.close(),null===(e=ou)||void 0===e||e.complete()}))});const su=oi.getInstance();let au;var cu=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(kt(""+Hr),wt(t),Qe(([,e])=>"closed"===e.socket.mainSessionSocketStatus),mt(([,e])=>{const{meeting:{svcUrl:t,meetingNumber:r,conId:n}}=e;return(e=>(su.connect(e),au=new q,Ke(e=>su.on(ti.Message,e),e=>su.off(ti.Message,e)).pipe(Oe(e=>e.data)).subscribe(au),au))(function(e,t,r){return`wss://${e}/wc/media/${t}?type=m&cid=${r}&mode=2`}(t,r,n)).pipe(Oe(e=>JSON.parse(e)),Qe(e=>0!==e.evt),Cc(),Oe(e=>Fr(e)),Et(zr(ws.Connecting)))})),connectedMainSessionSocketEpic:(e,t)=>e.pipe(kt(""+Hr),mt(()=>{const[e,r,n]=[ti.Open,ti.Close,ti.Error].map(e=>Ke(t=>su.on(e,t),t=>su.on(e,t)));return ze(e.pipe(_t(zr(ws.Connected))),r.pipe(wt(t),Qe(([,e])=>"closed"!==e.socket.zoomSocketStatus&&"joined"===e.meeting.meetingStatus),Oe(()=>(Wi("RECONNECTING_MEETING",{reason:Do.Failover}),no()))),n.pipe(Oe(()=>(Wi("RECONNECTING_MEETING",{reason:Do.Failover}),no()))))})),disconnectMainSessionSocketEpic:e=>e.pipe(kt(""+xr),_t(zr(ws.Closed)),Ot(()=>{var e;su.close(),null===(e=au)||void 0===e||e.complete()}))});const du={zoomSocketStatus:ws.Closed,isXmppSDKLoaded:!1,xmppSocketStatus:ws.Closed,mainSessionSocketStatus:ws.Closed,retryCount:0,rwgServerList:[]},uu=Nr({[""+Gr]:Id((e,{payload:t})=>{e.zoomSocketStatus=t}),[""+Br]:Id((e,{payload:t})=>{const{rwgServerList:r}=e;r.find(e=>e===t.rwg)||r.push(t)}),[""+Wr]:Id((e,{payload:t})=>{e.retryCount=t}),[""+Kr]:Id((e,{payload:t})=>{e.xmppSocketStatus=t}),[""+qr]:Id((e,{payload:t})=>{e.isXmppSDKLoaded=t}),[""+zr]:Id((e,{payload:t})=>{e.mainSessionSocketStatus=t}),[""+Jr]:()=>du},du),lu=cn(iu,$d,cu),pu={id:"userId",type:e=>ls(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>{return{userRole:e,isHost:(t=e,(t&cs.Host)===cs.Host)};var t},dn2:e=>({displayName:Qn(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest"};var hu=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>dn(e,7937).pipe(Oe(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=pu[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)),wt(t),Ve(([e,t])=>{const r=[Qi(e)],{meeting:{userId:n},participants:{attendeesList:o,failoverAttendeesList:i}}=t;if(e.add){const t=e.add.find(e=>e.userId===n);void 0!==t&&Wi("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const o=e.add.filter(e=>e.userId!==n);if(o.length>0){const e=o.filter(e=>!ps(e.userRole)).map(e=>{const t=i.find(t=>t.zoomID===e.zoomID);return t?u(u({},e),{},{source:t.isOnHold?"on hold":"failover"}):e}),t=e.filter(e=>!!e.source).map(e=>({zoomID:e.zoomID}));r.push(es(t)),Wi("ADD_USER_PARTICIPANT_ATTRIBUTE",e)}}if(e.update){const t=e.update.find(e=>e.userId===n);void 0!==t&&Wi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t);const r=e.update.filter(e=>e.userId!==n);r.length>0&&Wi("UPDATE_USER_PARTICIPANT_ATTRIBUTE",r)}if(e.remove){const t=e.remove.map(e=>{const t=o.find(t=>t.userId===e.userId);return t?2===e.action&&1===e.nUserStatus?t.bHold?(r.push($i({zoomID:t.zoomID,isOnHold:!0})),u(u({},e),{},{reason:"on hold"})):(r.push($i({zoomID:t.zoomID,isOnHold:!1})),u(u({},e),{},{reason:"failover"})):e:null}).filter(e=>!!e);Wi("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t)}return Ue(r)})),receiveUserListFromXMPPEpic:e=>un(e,"POOL").pipe(Qe(e=>e.payload.data.action===Nd.MemberChange),Ot(e=>{Wi("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.payload.data.data)}),Oe(e=>Yi(e.payload.data.data))),handleAdmitAllSilentUsersEpic:e=>dn(e,7951).pipe(Ot(e=>{!1===e.payload.body.bStarted&&Wi("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)}),Oe(e=>Xi(e.payload.body.bStarted))),handleKVUpdateIndicationEpic:e=>dn(e,7946).pipe(Qe(e=>["bRaiseHand","feedback"].indexOf(e.payload.body.key)>-1&&0===e.payload.body.value),Oe(e=>(Wi("UPDATE_USER_PARTICIPANT_ATTRIBUTE",{}),void 0!==e.payload.body.bRaiseHand?ts():rs())))});const _u={attendeesList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},fu=Nr({[""+Qi]:Id((e,{payload:t})=>{void 0!==t.add&&t.add.length>0&&t.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):ps(t.userRole)?e.allowTalkAttendeesList.push(t):e.attendeesList.push(t)}}),void 0!==t.update&&t.update.length>0&&t.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!==t.remove&&t.remove.length>0&&t.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)}})}),[""+Yi]:Id((e,{payload:t})=>{e.xmppAttendeeList=t.map(e=>u(u({},e),{},{displayName:e.name,userId:Number(e.node),userRole:Number(e.role)}))}),[""+Xi]:Id((e,{payload:t})=>{e.isAdmitAllSilentUsers=t}),[""+ts]:Id(e=>{e.attendeesList.forEach(e=>{!0===e.bRaiseHand&&(e.bRaiseHand=!1)})}),[""+rs]:Id(e=>{e.attendeesList.forEach(e=>{e.feedback>0&&(e.feedback=0)})}),[""+$i]:Id((e,{payload:t})=>{e.failoverAttendeesList.push(t)}),[""+es]:Id((e,{payload:t})=>{t.forEach(t=>{const r=e.failoverAttendeesList.findIndex(e=>e.zoomID===t.zoomID);-1!==r&&e.failoverAttendeesList.splice(r,1)})}),[""+Zi]:()=>_u},_u),vu=cn(hu),yu={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0},Eu=Nr({[""+Zr]:Id((e,{payload:t})=>{e.audioDecodeStatus=t}),[""+Xr]:Id((e,{payload:t})=>{e.audioEncodeStatus=t}),[""+rn]:Id((e,{payload:t})=>{e.sharingDecodeStatus=t}),[""+tn]:Id((e,{payload:t})=>{e.sharingEncodeStatus=t}),[""+en]:Id((e,{payload:t})=>{e.videoDecodeStatus=t}),[""+$r]:Id((e,{payload:t})=>{e.videoEncodeStatus=t}),[""+nn]:Id((e,{payload:t})=>{e.mediaConstraints=t.mediaConstraints,e.assetsPath=t.assetsPath}),[""+on]:e=>u(u({},yu),{},{mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath})},yu),gu=(e,t,r)=>Ge(...[t,r].map((t,r)=>{if("initial"!==t)return Ue(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return $e(zi(`${e.toUpperCase()}_${t}_SUCCESS`,1).pipe(_t(!0)),zi(`${e.toUpperCase()}_${t}_FAIL`,1).pipe(_t(!1)))}})),Su=()=>Ue(navigator.mediaDevices.enumerateDevices()).pipe(Oe(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 bu(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 mu=ni.createAgent();var Iu=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>dn(e,12033).pipe(wt(t),Oe(([e,t])=>{const{participants:{attendeesList:r,allowTalkAttendeesList:n}}=t,o=e.payload.body,i={};return o&&([...r,...n].forEach(e=>{for(let t=1;t<=3;t++){const r="asn"+t,{userId:n,displayName:s}=e;if(void 0!==o[r]&&n===o[r]){i[r]={userId:n,displayName:s};break}}}),Wi("AUDIO_ACTIVE_SPEAKER",Object.values(i))),Rs(i)})),unmuteConsentAfterSpotlighted:(e,t)=>dn(e,16135).pipe(wt(t),Ot(([e,t])=>{const{payload:{body:{id:r,bLeadershipOn:n}}}=e,{audio:{bCanUnmute:o}}=t,i=Ss(t);if(i){const{isHost:e,bCoHost:t,userId:s,audio:a,muted:c}=i,d=e||t;n&&s>>10==r>>10&&(null!==a&&""!==a&&!0!==c||!d&&!o||Wi("AUDIO_UNMUTE_CONSENT",Ei.Spotlight))}}),yt(ee)),unmuteConsentEpic:(e,t)=>dn(e,12037).pipe(wt(t),Ot(([,e])=>{const t=Ss(e);null!==(null==t?void 0:t.audio)&&""!==(null==t?void 0:t.audio)&&1==(null==t?void 0:t.muted)&&Wi("AUDIO_UNMUTE_CONSENT",Ei.Unmute)}),yt(ee)),setAudioAttributeEpic:(e,t)=>dn(e,7938).pipe(Qe(e=>e.payload.body&&["bCanUnmute","bMutedAll","bMutedUponEntry"].some(t=>void 0!==e.payload.body[t])),bc(e=>{if(void 0!==e.payload.body.bCanUnmute)return Ns(e.payload.body.bCanUnmute);if(void 0!==e.payload.body.bMutedAll){const r=Ss(t.value);if(("computer"===(null==r?void 0:r.audio)||"phone"===(null==r?void 0:r.audio))&&0==r.muted)return ks(e.payload.body.bMutedAll)}return void 0!==e.payload.body.bMutedUponEntry?Ls(e.payload.body.bMutedUponEntry):void 0})),currentUserAudioChangeEpic:(e,t)=>dn(e,7937).pipe(wt(t),Qe(([,e])=>e.socket.zoomSocketStatus===ws.Connected),mc(([e,t])=>{if(e.payload.body.update&&e.payload.body.update.some(e=>void 0!==e.audio||void 0!==e.muted)){const r=t.meeting.userId,n=e.payload.body.update,[o,i]=Ze(Ue(n),e=>e.id===r);i.subscribe(e=>{Wi("AUDIO_PARTICIPANT_AUDIO_UPDATE",e)});const{audio:{isActiveOperation:s,isMutedAll:a},audio:{activeMicrophone:c,activeSpeaker:d,audioSsrc:u}}=t;let l=Ss(t);!l&&e.payload.body.add&&e.payload.body.add.length>0&&(l=e.payload.body.add.find(e=>e.id===r),l&&(l.userRole=l.role));const p=hs(l.userRole);return o.pipe(Ot(e=>{var t,r,n,o;if(e.audio!==(null===(t=l)||void 0===t?void 0:t.audio))if(""===e.audio)Wi("AUDIO_CURRENT_USER_LEAVE_AUDIO");else if("computer"===e.audio)si.getInstance().joinComputerAudio(u,c,d,!p);else if("phone"===e.audio){var i;"computer"===(null===(i=l)||void 0===i?void 0:i.audio)&&(si.getInstance().leaveComputerAudio(),mu.joinOrLeaveVoip(!1)),Wi("AUDIO_CURRENT_USER_JOIN_BY_PHONE")}(null===(r=l)||void 0===r?void 0:r.audio)&&""!==(null===(n=l)||void 0===n?void 0:n.audio)&&e.muted!==(null===(o=l)||void 0===o?void 0:o.muted)&&(!0===e.muted?Wi("AUDIO_CURRENT_USER_MUTED",{source:s?"active":a?"passive(mute all)":"passive(mute one)"}):!1===e.muted&&Wi("AUDIO_CURRENT_USER_UNMUTED",{source:s?"active":"passive"}))}),Qe(e=>{var t,r;return""!==(null===(t=l)||void 0===t?void 0:t.audio)&&e.muted!==(null===(r=l)||void 0===r?void 0:r.muted)}),yt(ae(Us(!1),ks(!1))))}})),handleDialOutEpic:(e,t)=>dn(e,8198).pipe(wt(t),Qe(([e,t])=>e.payload.seq==t.audio.dialout.sequence),Ot(([e])=>{const t=e.payload.body.result;Wi("AUDIO_DIALOUT_RESULT_CODE",{code:t}),t===gi.Success?Wi("AUDIO_DIALOUT_RESULT_SUCCESS"):-1===[gi.Calling,gi.Ringing,gi.Accepted,gi.Success].indexOf(t)&&Wi("DIALOUT_FAIL")}),Oe(([e])=>Ps(e.payload.body.result))),handleDialouCancelEpic:e=>dn(e,8200).pipe(Ot(e=>{const t=e.payload.body.result;[0,11].indexOf(t)>-1?Wi("AUDIO_DIALOUT_CANCEL_SUCCESS"):Wi("DIALOUT_CANCEL_FAIL",t)}),Qe(e=>0===e.payload.body.result||11===e.payload.body.result),_t(Ps(-1))),handleAllowToTalkEpic:(e,t)=>dn(e,12036).pipe(wt(t),mc(([e,t])=>{const r=Ss(t),{media:{audioEncodeStatus:n},audio:{audioSsrc:o,activeMicrophone:i,activeSpeaker:s}}=t,{promoterID:a,bAllowTalk:c}=e.payload.body;if((null==r?void 0:r.userId)===a){const e=si.getInstance();if(c){let t=ae(!0);return"success"!==n&&(e.enableAudioEncode(),t=$e(zi("AUDIO_ENCODE_SUCCESS",1).pipe(_t(!0)),zi("AUDIO_ENCODE_FAIL",1).pipe(_t(!1)))),t.pipe(Ot(t=>{t&&(e.joinComputerAudio(o,i,s,!0),Wi("AUDIO_UNMUTE_CONSENT",Ei.AllowToTalk))}),_t(Ms(!0)))}return mu.mute(a,!0),e.leaveComputerAudio(),rt(300).pipe(Ot(()=>{e.joinComputerAudio(o,i,s,!1)}),_t(Ms(!1)))}})),handleAllowToTalkResponseEpic:e=>dn(e,8205).pipe(Ot(e=>{Wi("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)}),yt(ee)),handleAttendeePromoteDepromote:(e,t)=>un(e,"POOL").pipe(Qe(e=>e.payload.data.action===Nd.Depromote||e.payload.data.action===Nd.Promote),wt(t),Ot(([e,t])=>{const r=Ss(t);"phone"===(null==r?void 0:r.audio)?mu.audioDrop(r.userId):"computer"===(null==r?void 0:r.audio)&&(e.payload.data.action,Nd.Promote)}),yt(ee)),setAudioSSRCEpic:(e,t)=>dn(e,12035).pipe(wt(t),Ve(([e,t])=>{const{meeting:{currentUserAudioBeforeReset:r},media:{audioDecodeStatus:n,audioEncodeStatus:o}}=t,{payload:{body:{ssrc:i}}}=e;let s=void 0;const a=Ss(t);if(a&&"computer"===r&&""===a.audio){const e=hs(a.userRole);s=gu("audio",e?"success":o,n).pipe(Qe(([e,t])=>e&&t),Ot(()=>{mu.joinOrLeaveVoip(!0)}),_t(bo(void 0)))}return s?ze(ae(Vs(i)),s):ae(Vs(i))})),handleMergeAudioEpic:(e,t)=>dn(e,7952).pipe(mt(e=>zi("AUDIO_CURRENT_USER_JOIN_BY_PHONE",1).pipe(wt(t),Ot(([,t])=>{const{BindStatus:r,nOperatorUserId:n}=e.payload.body,o=t.participants.attendeesList.find(e=>e.userId===n);!0===r&&Wi("AUDIO_MERGE_AUDIO_INDICATION",{operatorName:null==o?void 0:o.displayName,operatorUserId:n,operatorRole:null==o?void 0:o.userRole})})))),handleUserGrantAudioCaptureEpic:(e,t)=>pn(e,vi.UserGrantCaptureAudio).pipe(wt(t),Ve(([,e])=>{Wi("AUDIO_CURRENT_USER_JOIN_BY_VOIP");const t=Ss(e),{meeting:{isCurrentUserMutedBeforeReset:r},audio:{bMutedUponEntry:n,isUserGrantCaptureAudio:o}}=e,i=[js(!0)];return t&&(!0===t.muted&&mu.mute(t.userId,!0),(!0===r||!o&&!t.isHost&&n)&&(mu.mute(t.userId,!0),r&&i.push(mo(void 0)))),Ue(i)})),handleUserForbiddenMicrophoneEpic:e=>pn(e,vi.UserForbiddedCaptureAudio).pipe(Ot(()=>{Wi("USER_FORBIDDEN_MICROPHONE")}),_t(Hs(!0))),handleAudioSocketErrorEpic:e=>pn(e,vi.AudioWebsocketBroken).pipe(Ot(()=>{Wi("ESTABLISH_AUDIO_STREAM_ERROR")}),yt(ee)),handleAudioZeroDataEpic:(e,t)=>pn(e,vi.AudioZeroData).pipe(wt(t),bc(([,e])=>{const{audio:{webrtcRestartCount:t,activeMicrophone:r}}=e;if(t<3)return si.getInstance().restoreWebRTC(r),xs(t+1)})),handleAutoPlayEpic:(e,t)=>e.pipe(kt(""+Ks),Qe(e=>!1===e.payload),Ve(()=>(Wi("AUDIO_AUTO_PLAY_FAILED"),$e(We(document,"click").pipe(lt(1)),We(document,"touchend").pipe(lt(1))).pipe(wt(t),Ot(([,e])=>{const{audio:{audioSsrc:t,activeMicrophone:r,activeSpeaker:n}}=e,o=Ss(e),i=hs(o.userRole);si.getInstance().joinComputerAudio(t,r,n,!i),mu.joinOrLeaveVoip(!0)}),_t(Ks(!0))))))});const Au={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},Ou=Nr({[""+Rs]:Id((e,{payload:t})=>{e.asnIds=u({},t)}),[""+Ns]:Id((e,{payload:t})=>{e.bCanUnmute=t}),[""+Ds]:Id((e,{payload:t})=>{const{dialout:r}=e;r.sequence=t}),[""+Ps]:Id((e,{payload:t})=>{const{dialout:r}=e;r.returnCode=t}),[""+Ms]:Id((e,{payload:t})=>{e.isAllowToTalk=t}),[""+Us]:Id((e,{payload:t})=>{e.isActiveOperation=t}),[""+ks]:Id((e,{payload:t})=>{e.isMutedAll=t}),[""+Vs]:Id((e,{payload:t})=>{e.audioSsrc=t}),[""+Ls]:Id((e,{payload:t})=>{e.bMutedUponEntry=t}),[""+js]:Id((e,{payload:t})=>{e.isUserGrantCaptureAudio=t}),[""+Hs]:Id((e,{payload:t})=>{e.isMicrophoneForbidden=t}),[""+xs]:Id((e,{payload:t})=>{e.webrtcRestartCount=t}),[""+Fs]:Id((e,{payload:t})=>{e.microphoneDevicesList=t}),[""+Gs]:Id((e,{payload:t})=>{e.speakerDevicesList=t}),[""+Bs]:Id((e,{payload:t})=>{e.activeMicrophone=t}),[""+Ws]:Id((e,{payload:t})=>{e.activeSpeaker=t}),[""+Ks]:Id((e,{payload:t})=>{e.canPlayAudio=t}),[""+qs]:({dialout:{returnCode:e}})=>u(u({},Au),{},{dialout:u(u({},Au.dialout),{},{returnCode:e})}),[""+zs]:Id((e,{payload:t})=>{e.isComputerAudioLoading=t})},Au),Cu=cn(Iu),Tu=e=>4294966272&e,wu=ni.createAgent(),Ru=si.getInstance();var Nu=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>pn(e,vi.StartVideoCaptureSuccess).pipe(wt(t),bc(([,e])=>{const{video:{cameraDevicesList:t,activeCamera:r},meeting:{userId:n}}=e;return t.length<1?(Wi("CAN_NOT_DETECT_CAMERA",{reason:"Cannot detect camera devices"}),void Ru.stopCaptureVideo()):"default"===r||t.some(e=>e.deviceId===r)?void wu.muteAttendeeVideo(n,!1):(Wi("CAN_NOT_FIND_CAMERA",{reason:"cannot find target camera"}),void Ru.stopCaptureVideo())})),startVideoResponse:(e,t)=>dn(e,7937).pipe(wt(t),Qe(([e,t])=>{var r,n,o,i;const s=t.meeting.userId;return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id)===s}),Qe(([e])=>{var t,r,n,o;return!0===(null==e||null===(t=e.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)}),bc(()=>(Wi("VIDEO_CAPTURE_START_SUCCESS"),_a(!0)))),handleForbiddenCaptureVideoEpic:e=>pn(e,vi.UserForbiddedCaptureVideo).pipe(Ot(()=>Wi("VIDEO_USER_FORBIDDEN_CAPTURE")),_t(va(!0))),handleCameraIsTakenByOtherProgramsEpic:e=>pn(e,vi.UserCameraIsTakenByOtherPrograms).pipe(Ot(()=>Wi("VIDEO_CAMERA_IS_TAKEN",{reason:"User camera is taken by other programs."})),_t(ba(!0))),handleVideoSocketErrorEpic:e=>pn(e,vi.VideoWebsocketBroken).pipe(Ot(()=>{Wi("VIDEO_ESTABLISH_STREAM_ERROR",{reason:"Video websocket broken."})}),yt(ee)),handleStopVideoCaptureFailedEpic:e=>pn(e,vi.StopVideoCaptureFailed).pipe(Ot(()=>{Wi("VIDEO_CAPTURE_STOP_RESULT",{failed:!0,reason:"Unknown."})}),yt(ee)),handleStopVideoCaptureSuccessEpic:(e,t)=>pn(e,vi.StopVideoCaptureSuccess).pipe(wt(t),bc(([,e])=>{const{meeting:{userId:t},video:{isCurrentUserStartedVideo:r}}=e;r||Wi("VIDEO_CAPTURE_STOP_RESULT"),wu.muteAttendeeVideo(t,!0)})),stopVideoResponse:(e,t)=>dn(e,7937).pipe(wt(t),Qe(([e,t])=>{var r,n,o,i;const s=t.meeting.userId;return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n||null===(o=n.update)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id)===s}),Qe(([e])=>{var t,r,n,o;return!1===(null==e||null===(t=e.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)}),bc(()=>(Wi("VIDEO_CAPTURE_STOP_RESULT"),_a(!1)))),receiveVideoMuteIndication:(e,t)=>dn(e,16133).pipe(wt(t),Qe(([e,t])=>{var r,n;return(null==e||null===(r=e.payload)||void 0===r||null===(n=r.body)||void 0===n?void 0:n.id)===t.meeting.userId}),bc(([e])=>{const{id:t,bVideoMute:r}=e.payload.body;return Wi("RECEIVE_VIDEO_MUTE_INDICATION",{id:t,isVideoMuted:r}),!0===r&&Ru.stopCaptureVideo(),!1===r&&Wi("ASK_FOR_START_VIDEO_CONSENT",{id:t,isVideoMuted:r}),ga(r)})),receiveVideoActiveIndication:e=>dn(e,16129).pipe(Oe(e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,n=Tu(t);return Wi("RECEIVE_VIDEO_ACTIVE_INDICATION",{bVideoOn:r,userId:n}),la({bVideoOn:r,userId:n})})),receiveVideoSsrcIndication:(e,t)=>dn(e,16131).pipe(Qe(e=>void 0!==e.payload.body.ssrc),wt(t),mt(([e,t])=>{const{meeting:{isCurrentUserStartVideoBeforeReset:r},media:{videoEncodeStatus:n},video:{captureCanvasList:o,activeCamera:i,isVerifiedVideoCaptureCanvasAfterFailover:s}}=t,{payload:{body:{ssrc:a}}}=e;let c=void 0;const d=Ss(t);return d&&!0===r&&!0!==d.bVideoOn&&(c=gu("video",n,"success").pipe(Qe(([e,t])=>e&&t),Ve(()=>{const e=[_a(void 0)];return!1===s&&(Array.isArray(o)?o.forEach(e=>{bu(document.querySelector("#"+e))}):bu(document.querySelector("#"+o)),e.push(Ia(!0))),si.getInstance().startCaptureVideo(a,i,640,360),Ue(e)}))),c?ze(ae(ua(a)),c):ae(ua(a))})),receiveVideoDecodeMaxSizeEpic:e=>pn(e,vi.VideoDecodeMaxSize).pipe(Qe(e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data}),mc(e=>{const{size:t}=e.payload.data;return ae(ya(t))})),spotlightVideoResponseEpic:e=>dn(e,16135).pipe(Oe(e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,n=[];return t&&n.push(Tu(r)),Wi("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),fa(n)})),handleGroupLayoutIndicationEpic:(e,t)=>dn(e,7958).pipe(wt(t),Oe(([e,t])=>{const{payload:{body:r}}=e;let n=[];r&&r.group_list&&r.group_list[0]&&(n=r.group_list[0].map(e=>e.id));const o=Os(t);return n=n.filter(e=>o.findIndex(t=>t.userId===e)>=0),Wi("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),fa(n)})),handleCurrentVideoResolution:e=>pn(e,vi.CurrentVideoResolution).pipe(bc(e=>(Wi("VIDEO_RENDER_START_SUCCESS"),Wi("RECEIVE_VIDEO_DIMENSION_CHANGE",e.payload.data),Oa(e.payload.data)))),handleMeetingVideoAttributeEpic:e=>dn(e,7938).pipe(Qe(e=>{const{payload:{body:t}}=e;return void 0!==(null==t?void 0:t.bFollowHostVideo)||void 0!==(null==t?void 0:t.VideoHd)}),Oe(e=>{const{payload:{body:{bFollowHostVideo:t,VideoHd:r}}}=e;return void 0!==t?(Wi("VIDEO_FOLLOW_HOST_ORDER_CHANGE",{bOn:t}),wa(t)):Pa(1===r)})),handleHostDragLayoutIndicationEpic:(e,t)=>dn(e,7957).pipe(wt(t),Oe(([e,t])=>{const{video:{isFollowHostVideoLayout:r}}=t,{payload:{body:n}}=e,o=n&&n.drag_list&&n.drag_list.map(e=>e.id);return r&&Wi("VIDEO_HOST_DRAG_LAYOUT_CHANGE",{layout:o}),Ra(o)})),handlePeerVideoStateChangeEpic:(e,t)=>dn(e,7937).pipe(wt(t),Qe(([e,t])=>{const{meeting:{userId:r},video:{subscribedVideoList:n}}=t,o=e.payload.body.update,i=e.payload.body.remove;return o&&o.length>0&&o.findIndex(e=>e.id!==r&&(void 0!==e.bVideoOn||e.bHold))>-1||i&&i.some(e=>n.includes(e.id))}),Ot(([e,t])=>{const{payload:{body:{remove:r,update:n}}}=e,{video:{subscribedVideoList:o}}=t,i=As(t);if(r&&r.length>0&&r.filter(e=>o.includes(e.id)).forEach(e=>{Wi("VIDEO_OLD_USER_STOP",{userId:e.id})}),n&&n.length>0){const e=n.filter(e=>void 0!==e.bVideoOn).filter(e=>-1===i.findIndex(t=>t.userId===e.id)),t=n.filter(e=>!0===e.bHold);t.length>0&&t.filter(e=>o.includes(e.id)).forEach(e=>{Wi("VIDEO_OLD_USER_STOP",{userId:e.id})}),e.forEach(e=>{e.bVideoOn?Wi("VIDEO_NEW_USER_START",{userId:e.id}):Wi("VIDEO_OLD_USER_STOP",{userId:e.id})})}}),yt(ee))});const Du={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},Pu=Nr({[""+ua]:Id((e,{payload:t})=>{e.videoSsrc=t}),[""+pa]:Id((e,{payload:t})=>{e.cameraDevicesList=t}),[""+ha]:Id((e,{payload:t})=>{e.activeCamera=t}),[""+la]:Id((e,{payload:t})=>{e.activeVideoId=t.userId}),[""+_a]:Id((e,{payload:t})=>{e.isCurrentUserStartedVideo=t}),[""+fa]:Id((e,{payload:t})=>{e.spotlightUserList=t}),[""+va]:Id((e,{payload:t})=>{e.isCaptureForbidden=t}),[""+ya]:Id((e,{payload:t})=>{e.receivedVideoMaxQuality=t}),[""+Ea]:Id((e,{payload:t})=>{let r=t;Array.isArray(t)||(r=[t]),e.captureCanvasList=r}),[""+ga]:Id((e,{payload:t})=>{e.isVideoMuted=t}),[""+Sa]:Id((e,{payload:t})=>{e.isCaptureCameraLoading=t}),[""+ba]:Id((e,{payload:t})=>{e.isCameraTaken=t}),[""+Ia]:Id((e,{payload:t})=>{e.isVerifiedVideoCaptureCanvasAfterFailover=t}),[""+ma]:Id((e,{payload:t})=>{e.isVerifiedVideoRenderCanvasAfterFailover=t}),[""+Oa]:Id((e,{payload:t})=>{e.receivedVideoDimension=t}),[""+Ca]:Id((e,{payload:t})=>{e.subscribedVideoList.includes(t)||e.subscribedVideoList.push(t)}),[""+Ta]:Id((e,{payload:t})=>{const r=e.subscribedVideoList.indexOf(t);r>=0&&e.subscribedVideoList.splice(r,1)}),[""+Na]:Id((e,{payload:t})=>{-1===e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key&&e.canvasId===t.canvasId)&&e.renderedVideoList.push(u({},t))}),[""+Da]:Id((e,{payload:t})=>{const r=e.renderedVideoList.findIndex(e=>e.userId===t.userId&&e.key===t.key&&e.canvasId===t.canvasId);r>=0&&e.renderedVideoList.splice(r,1)}),[""+wa]:Id((e,{payload:t})=>{e.isFollowHostVideoLayout=t}),[""+Ra]:Id((e,{payload:t})=>{e.hostDragLayout=t}),[""+Pa]:Id((e,{payload:t})=>{e.isSupportHDVideo=t}),[""+Ma]:Id((e,{payload:t})=>{e.highDefinitionVideoId=t}),[""+Aa]:e=>u(u({},Du),{},{captureCanvasList:e.captureCanvasList,activeCamera:e.activeCamera,isVerifiedVideoCaptureCanvasAfterFailover:!1,isVerifiedVideoRenderCanvasAfterFailover:!1})},Du),Mu=cn(Nu),{InitSuccessVideo:ku,InitSuccessAudio:Uu,InitSuccessSharing:Vu,InitFailedVideo:Lu,InitFailedAudio:ju,InitFailedSharing:Hu}=vi;let xu;const Fu=new J(an(ru,lu,vu,cn(Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(kt(""+Qr),wt(t),Qe(([,e])=>void 0!==e.media.assetsPath&&void 0!==e.media.mediaConstraints),Ot(([,e])=>{const{media:{assetsPath:r,mediaConstraints:n},meeting:{enableQos:o}}=e;xu=si.getInstance(),r&&n&&xu.setAssetsAndConstraint(r,n);const i=Ss(e);let s;s=i?ae(i):zi("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1).pipe(le(Se),wt(t),Oe(([,e])=>Ss(e))),s.pipe(wt(t)).subscribe(([e,t])=>{const{meeting:{svcUrl:r,meetingNumber:n,conId:i,e2eEncrypt:s,userId:a,isWebinar:c}}=t;var d;e&&(null===(d=xu)||void 0===d||d.connect({svcUrl:r,meetingNumber:n,conId:i,e2eEncrypt:s,isViewOnly:hs(e.userRole),currentUserId:a,isWebinar:c,enableQos:o}))})}),mt(()=>Ke(e=>{var t;return null===(t=xu)||void 0===t?void 0:t.registerCallback(e)},e=>{var t;return null===(t=xu)||void 0===t?void 0:t.unregisterCallback(e)},(e,t)=>({type:e,data:t})).pipe(Oe(e=>Yr(e))))),connectedMediaStreamEpic:e=>pn(e,[ku,Uu,Vu,Lu,ju,Hu]).pipe(mc(e=>{const{payload:{type:t,data:r}}=e;if(t===Uu||t===ju){if(r===yi.EncodeSuccess)return Wi("AUDIO_ENCODE_SUCCESS"),ae(Xr("success"));if(r===yi.DecodeSuccess)return Wi("AUDIO_DECODE_SUCCESS"),ae(Zr("success"));if(r===yi.EncodeFailed)return Wi("AUDIO_ENCODE_FAIL"),ae(Xr("failed"));if(r===yi.DecodeFailed)return Wi("AUDIO_DECODE_FAIL"),ae(Zr("failed"))}else if(t===ku||t===Lu){if(r===yi.EncodeSuccess)return Wi("VIDEO_ENCODE_SUCCESS"),ae($r("success"));if(r===yi.DecodeSuccess)return Wi("VIDEO_DECODE_SUCCESS"),ae(en("success"));if(r===yi.EncodeFailed)return Wi("VIDEO_ENCODE_FAIL"),ae($r("failed"));if(r===yi.DecodeFailed)return Wi("VIDEO_DECODE_FAIL"),ae(en("failed"))}else if(t===Vu||t===Hu){if(r===yi.EncodeSuccess)return Wi("SHARING_ENCODE_SUCCESS"),ae(tn("success"));if(r===yi.DecodeSuccess)return Wi("SHARING_DECODE_SUCCESS"),ae(rn("success"));if(r===yi.EncodeFailed)return Wi("SHARING_ENCODE_FAIL"),ae(tn("failed"));if(r===yi.DecodeFailed)return Wi("SHARING_DECODE_FAIL"),ae(rn("failed"));if(t===Vu&&void 0===r)return Wi("SHARING_DECODE_SUCCESS"),ae(rn("success"))}})),mediaDeviceUpdateEpic:(e,t)=>pn(e,[ku,Uu]).pipe(Ic(()=>{if("object"==typeof navigator.mediaDevices)return ze(Su(),ze(pn(e,vi.StartVideoCaptureSuccess),We(navigator.mediaDevices,"devicechange"),pn(e,vi.UserGrantCaptureAudio)).pipe(Ve(()=>Su().pipe(Ot(()=>{Wi("MEDIA_DEVICE_CHANGE")}))))).pipe(wt(t),Ve(([e,t])=>{const r=[Fs(e.microphones),Gs(e.speakers),pa(e.cameras)];if(t.audio){const{audio:{activeMicrophone:i,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:c}}=t,{microphones:d,speakers:u}=e,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 n,o;l.length>0&&l[0].deviceId===i&&(null===(n=xu)||void 0===n||n.changeMicrophone("default"),r.push(Bs("default"))),p.length>0&&p[0].deviceId===s&&(null===(o=xu)||void 0===o||o.changeSpeaker("default"),r.push(Ws("default")))}return Ue(r)}))})),sendUserNodeListToMediaSDKEpic:e=>dn(e,7937).pipe(Ot(e=>{const{payload:{body:t}}=e,r=si.getInstance();t.add&&r.sendUserNodeList(t.add.map(e=>({userid:e.id,sn:e.zoomID&&Xn(e.zoomID)}))),t.remove&&r.sendUserNodeList(t.remove.map(e=>({userid:e.id,bremove:!0})))}),yt(ee)),handleMediaSdkGcmIVResponseEpic:e=>pn(e,vi.AesGcmIvResponse).pipe(Ot(e=>{const{payload:{data:{workerType:t,iv:r}}}=e,n=Uo.get(Qo.WebclientIVState);if(n){const e=u(u({},n),{},{[t]:r});Uo.set(Qo.WebclientIVState,e,Mo.SessionStorage)}}),yt(ee))})))),Gu=(e,t,r)=>Fu.pipe(Ve(n=>n(e,t,r))),Bu={meeting:tu,socket:uu,participants:fu,media:Eu},Wu=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 Vt(i),c=new Lt(s,o.getState());return n.pipe(Oe((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})),Ve((function(e){return Ue(e).pipe(St(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}(),Ku=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||b;function qu(e){return function(e){for(var t=Object.keys(e),r={},n=0;ne.userId===t);if(o.findIndex(e=>e===rl.Attendee)>-1&&(i=Is(r).find(e=>e.userId===t)),!i)return Promise.reject({type:Vi,reason:"no matching user"});{const{meeting:{userId:e}}=n.getState();for(let r=0;r{if(this[Yu][e]&&void 0===o.getState()[e]){const{epic:t,reducer:r,Client:n}=this[Yu][e];o.injectReducer(e,r),o.injectEpic(t);const i=new n(o);this.modules.set(e,i)}}),(null==n?void 0:n.audio)&&void 0===o.getState().audio&&(o.injectReducer("audio",Ou),o.injectEpic(Cu)),(null==n?void 0:n.video)&&void 0===o.getState().video&&(o.injectReducer("video",Pu),o.injectEpic(Mu)),(null==n?void 0:n.screen)&&void 0===o.getState().share&&(o.injectReducer("share",Od),o.injectEpic(Cd))}return n(co({apiKey:e,signature:t,language:s})),n(nn({mediaConstraints:r&&r.constraints||{},assetsPath:i})),new Promise((e,t)=>{wo(c,()=>{e("")},()=>{t({type:Vi,reason:"depedent assets are not accessible"})})})}on(e,t){((e,t)=>{const r=Hi[e];if(r){const n=Gi.get(e);if(n)n.push(t),Gi.set(e,n);else{const n=[t];Gi.set(e,n);const o=ze(...r.map(e=>{const{event:t,payload:r}=e;return We(xi,t).pipe(Oe(e=>r(e)),le(Se))})).subscribe(t=>{const r=Gi.get(e);r&&r.forEach(e=>{e(t)})});Bi.push(o)}}})(e,t)}off(e,t){((e,t)=>{if(Hi[e]){const r=Gi.get(e);if(Array.isArray(r)){const n=r.findIndex(e=>e===t);n>-1&&(r.splice(n,1),Gi.set(e,r))}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[Ju]:e,[Qu]:t}=this;return"connected"===e().socket.zoomSocketStatus&&t(oo()),Promise.resolve("")}end(){const{[Ju]:e,[Qu]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(io()),rt(500).pipe(Ot(()=>{Ji()}),_t("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[zu].getState(),{meeting:{bAllowAttendeeRename:n}}=r,o=Ss(r),i=hs(o.userRole),s=bs(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 dl.rename(t,Jn(e),Jn(o.displayName)),Sc(t,t=>t.displayName===e);{const n=Is(r).find(e=>e.userId===t);return n?(Ud.getInstance().rename(n.jid,e),qi("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",t=>{const r=t.find(e=>e.jid===n.jid);return r&&r.name===e})):Promise.reject({type:Vi,reason:"no matching user"})}}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})}return e===o.displayName?Promise.resolve():s||n?(dl.rename(o.userId,Jn(e),Jn(o.displayName)),qi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t=>t.displayName===e)):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host disallow rename themselves"})}makeHost(e){return dl.assignHost(e,!1),Sc(e,e=>!0===e.isHost)}makeCoHost(e){const t=this[zu].getState(),r=Os(t).find(t=>t.userId===e);return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:Vi,reason:`user:[${e}] is already co-host `}):(dl.assignHost(e,!0),Sc(e,e=>!0===e.bCoHost))}revokeCoHost(e){const t=this[zu].getState(),r=Os(t).find(t=>t.userId===e);return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:Vi,reason:`user:[${e}] is not a co-host`}):(dl.revokeCoHost(e),Sc(e,e=>!1===e.bCoHost))}isHost(){const e=this[zu].getState(),t=Ss(e);return!!t&&t.isHost}isCoHost(){const e=this[zu].getState(),t=Ss(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[Ju]();return e}getCurrentUserInfo(){const e=this[zu].getState(),t=Ss(e);if(t){const r={userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:ls(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,sharePause:t.sharerPause,feedback:t.feedback};if(e.meeting.isWebinar&&hs(t.userRole)){const{participants:{allowTalkAttendeesList:n}}=e,o=n.find(e=>e.userId===t.userId),i=!!o;Object.assign(r,{isAllowToTalk:i}),o&&Object.assign(r,{audio:o.audio,muted:o.muted})}return r}return null}getParticipantsList(){const e=this[zu].getState(),{meeting:{meetingStatus:t}}=e,r=Ss(e);return"joined"===t&&r&&!r.bHold?Os(e).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,isPhoneUser:ls(e.userType),bRaiseHand:e.bRaiseHand,bHold:e.bHold,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause,feedback:e.feedback})):[]}getMeetingHost(){const e=this[Ju](),t=Cs(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:ls(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,encType:a,region:c,network:d,topic:u,zlkJwtToken:l,userId:p}}=this[Ju](),h="joined"===e&&!t;if(l)return{topic:u,password:n,userName:o,isInMeeting:h,userId:p};{let e="";return 0===a?e="None":1===a?e="AES ECB":2===a&&(e="AES GCM"),{meetingNumber:r,password:n,userName:o,userEmail:i,meetingTopic:s,encryptionType:e,region:c,network:d,isInMeeting:h,userId:p}}}}).prototype,"end",[el,Zu],Object.getOwnPropertyDescriptor(cl.prototype,"end"),cl.prototype),l(cl.prototype,"changeName",[Zu],Object.getOwnPropertyDescriptor(cl.prototype,"changeName"),cl.prototype),l(cl.prototype,"makeHost",[il,el,Zu],Object.getOwnPropertyDescriptor(cl.prototype,"makeHost"),cl.prototype),l(cl.prototype,"makeCoHost",[sl,el,Zu],Object.getOwnPropertyDescriptor(cl.prototype,"makeCoHost"),cl.prototype),l(cl.prototype,"revokeCoHost",[al,el,Zu],Object.getOwnPropertyDescriptor(cl.prototype,"revokeCoHost"),cl.prototype),cl);!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"}(ul||(ul={})),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"}(ll||(ll={})),function(e){e[e.None=0]="None",e[e.Delete=1]="Delete",e[e.Modify=2]="Modify"}(pl||(pl={})),function(e){e[e.Success=0]="Success",e[e.Delete=1]="Delete",e[e.Block=3]="Block"}(hl||(hl={}));const fl=[ul.All,ul.Host,ul.NoOne,ul.EveryonePublicly],vl=[ul.NoAttendee,ul.All,ul.AllPanelist],yl={userId:ll.All,displayName:"Everyone",isHost:!1,isCoHost:!1},El={userId:ll.Panelist,displayName:"All panelists"},gl={userId:ll.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};var Sl=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>un(e,"Message").pipe(wt(t),Ve(([e,t])=>{const{payload:{data:{sn:r,senderName:n,senderJid:o,receiver:i,text:s,type:a}}}=e,c=Ss(t),d=Is(t),{meeting:{jid:u,userId:l},participants:{xmppAttendeeList:p}}=t;return ei.beginDecrypt({decryptedText:s,type:Jo.XMPP_CHAT,zoomId:r}).then(({message:e})=>{var t;let r=null,s=0,h="";c&&hs(c.userRole)&&u===i?(r=p.find(e=>e.jid===o),s=l,h=c.displayName):a===ll.Panelist&&(r=d.find(e=>e.jid===o),s=ll.Panelist,h=El.displayName);const _={message:e,sender:{name:n,userId:(null===(t=r)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:h,userId:s},timestamp:(new Date).getTime()};return Wi("CHAT_RECEIVE_MESSAGE_EVENTS",_),xa(_)})})),receiveChatMessageFromRWGEpic:(e,t)=>dn(e,7944).pipe(wt(t),Ve(([e,t])=>{const{meeting:{bIbDisableChat:r,isWebinar:n},participants:{attendeesList:o}}=t,{payload:{body:{attendeeNodeID:i,sn:s,destNodeID:a,text:c,senderName:d,msgID:u}}}=e,l=Ss(t),p=Is(t);if(l){const e=hs(null==l?void 0:l.userRole)&&i===l.userId&&!u;if(!r&&!e){let e,t=s;if(!s){const e=o.find(e=>e.userId===a);e&&(t=e.zoomID)}if(i===ll.SilentModeUsers){const t=Qn(c),r={id:u,message:t,sender:{name:"Host",userId:a},receiver:{name:"Everyone (in Waiting Room)",userId:i},timestamp:(new Date).getTime()};e=Promise.resolve(r)}else e=ei.beginDecrypt({decryptedText:c,zoomId:t,type:Jo.RWG_CHAT}).then(({message:e})=>{const t=o.find(e=>e.userId===a),r=d?Qn(d):null==t?void 0:t.displayName;let s="";if(i===ll.All)s=n?"All panelists and attendees":"Everyone";else if(i===ll.Panelist)s="All panelists";else if(n&&p.findIndex(e=>e.userId===i)>-1)s=p.find(e=>e.userId===i).displayName;else{const e=o.find(e=>e.userId===i);e&&(s=e.displayName)}return{id:u,message:e,sender:{name:r,userId:a,avatar:null==t?void 0:t.avatar},receiver:{name:s,userId:i},timestamp:(new Date).getTime()}});return e.then(e=>(Wi("CHAT_RECEIVE_MESSAGE_EVENTS",e),xa(e)))}}return ee})),changePrivilegeResponse:(e,t)=>dn(e,7938).pipe(Qe(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)}),wt(t),Oe(([e,t])=>{const{payload:{body:{chatPriviledge:r,bAllowAttendeeChat:n}}}=e,{chat:{chatPrivilege:o}}=t;return void 0!==n?(Wi("CHAT_PRIVILEGE_CHANGE",!0===n?{chatPrivilege:o}:{chatPrivilege:ul.NoAttendee}),Ga(n)):(Wi("CHAT_PRIVILEGE_CHANGE",{chatPrivilege:r}),Ha(r))})),chatResponseEpic:(e,t)=>dn(e,4136).pipe(wt(t),Ve(([e,t])=>{const{payload:{body:{result:r,destNodeID:n,msgID:o}}}=e,{meeting:{userId:i}}=t;return r===hl.Success?(Wi("CHAT_MESSAGE_RESPONSE",{msgId:o,receiverId:n}),ae(Ba({destNodeID:n,msgID:o,userId:i}))):r===hl.Delete||r===hl.Block?ae(Wa({msgId:o})):ee})),chatCmdResponseEpic:e=>dn(e,4238).pipe(Ve(e=>{const{payload:{body:{bSuccess:t,cmd:r,msgID:n}}}=e,o=[];if(t)switch(r){case pl.Delete:o.push(Wa({msgId:n})),Wi("CHAT_DELETE_MESSAGE_REPONSE",{id:n})}return Ue(o)})),chatCmdIndicationEpic:e=>dn(e,7960).pipe(Ve(e=>{const{payload:{body:{cmd:t,msgID:r}}}=e,n=[];switch(t){case pl.Delete:n.push(Wa({msgId:r})),Wi("CHAT_DELETE_MESSAGE_REPONSE",{id:r})}return Ue(n)}))});const bl={chatHistory:[],chatPrivilege:ul.All,isAllowAttendeeChat:!0},ml=Nr({[""+xa]:Id((e,{payload:t})=>{e.chatHistory.push(t)}),[""+Ha]:Id((e,{payload:t})=>{e.chatPrivilege=t}),[""+Ga]:Id((e,{payload:t})=>{e.isAllowAttendeeChat=t}),[""+Ba]:Id((e,{payload:t})=>{const{destNodeID:r,msgID:n,userId:o}=t;for(let t=e.chatHistory.length-1;t>=0;t--){const i=e.chatHistory[t];if(!i.id&&i.sender.userId===o&&[ll.All,ll.Panelist,r].includes(i.receiver.userId)){i.id=n;break}}}),[""+Wa]:Id((e,{payload:t})=>{const{msgId:r}=t,n=e.chatHistory.findIndex(e=>e.id===r);n>=0&&e.chatHistory.splice(n,1)}),[""+Fa]:()=>u({},bl)},bl);function Il(e,t,r){if(null==r?void 0:r.host)return[Cs(e),...Ts(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=[Cs(e),...Ts(e),...e.participants.attendeesList.filter(e=>!(e.bCoHost||e.isHost))];if(null==r?void 0:r.includeAttendee){const t=Is(e).filter(e=>!ls(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 Al;const Ol=ni.createAgent(),Cl=Ud.getInstance(),Tl=e=>{const{text:t,destId:r,sn:n,attendeeId:o}=e;return ei.beginEncrypt({text:t,type:Jo.RWG_CHAT}).then(e=>{Ol.chat(e,r,n,o)})};let wl=(l((Al=class extends ol{send(e,t){if(!e)return Promise.reject({type:Vi,reason:"Text is empty"});const{[Ju]:r,[Qu]:n}=this,o=r(),i=Ss(o),s=function(e,t){if(t===ll.All)return yl;if(t===ll.Panelist)return El;if(t===ll.SilentModeUsers)return gl;{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?void 0:e.zoomID)||!(null==t?void 0:t.displayName)||n===e.userId)return{type:Vi,reason:"invalid target user"};const{chat:{chatPrivilege:o},meeting:{isWebinar:i}}=r,s=bs(r),a=t.isHost||t.bCoHost;if(!s)if(i&&hs(e.userRole)){if(o===ul.NoAttendee||o===ul.AllPanelist&&n!==ll.Panelist||o===ul.All&&n!==ll.All&&n!==ll.Panelist)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"}}else if(o===ul.NoAttendee||o===ul.Host&&!a||n===ll.SilentModeUsers||o===ul.EveryonePublicly&&n!==ll.All&&!a)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"};return null})(i,s,o);if(a)return Promise.reject(a);const{meeting:{isWebinar:c,encType:d}}=o,l=d===zo.AES_GCM;let p=Promise.resolve(),h=!1;return t===ll.SilentModeUsers?Ol.chat(Jn(e),t):c?s.userRole===ds.Attendee?8==(8&s.clientCap)?p=Tl({text:e,destId:ll.IndividualCcPanelist,sn:null==i?void 0:i.zoomID,attendeeId:t}):(p=Tl({text:e,destId:ll.Panelist,sn:null==i?void 0:i.zoomID,attendeeId:t}).then(()=>(e=>{const{text:t,jid:r,isGCMEnabled:n}=e;return ei.beginEncrypt({text:t,type:Jo.XMPP_CHAT}).then(e=>{Cl.sendWebinarMsg(e,r,ll.IndividualCcPanelist,n)})})({text:e,jid:s.jid,isGCMEnabled:l})),h=!0):s&&(p=Tl({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID})):p=Tl({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID}),p.then(()=>{const r={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:(new Date).getTime()};return n(xa(r)),h?(Wi("CHAT_RECEIVE_MESSAGE_EVENTS",r),r):qi("CHAT_MESSAGE_RESPONSE",e=>({ret:[e.receiverId,ll.All,ll.Panelist].includes(t)||e.receiverId===ll.IndividualCcPanelist?0:-1,body:e})).then(e=>{const{msgId:t}=e,n=u({id:t},r);return Wi("CHAT_RECEIVE_MESSAGE_EVENTS",n),n})})}setPrivilege(e){const t=this[Ju](),{meeting:{isWebinar:r},chat:{chatPrivilege:n}}=t;return n===e?Promise.resolve(""):!r&&!fl.includes(e)||r&&!vl.includes(e)?Promise.reject({type:Vi,reason:"invalid privilege value of parameter"}):(Ol.setChatPriviledge(e),qi("CHAT_PRIVILEGE_CHANGE",t=>t.chatPrivilege===e))}deleteMessage(e){const t=this[Ju](),{chat:{chatHistory:r},meeting:{meetingOptions:n,userId:o}}=t;if(null==n?void 0:n.isEnableDeleteChatMsg){const n=bs(t),i=r.find(t=>t.id===e);if(i){const{sender:t}=i;if(n)Ol.chatCmdReq(e,pl.Delete);else{if(t.userId!==o)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"can not delete message"});Ol.chatCmdReq(e,pl.Delete)}return qi("CHAT_DELETE_MESSAGE_REPONSE",t=>t.id===e).then(()=>({id:e}))}return Promise.reject({type:Vi,reason:"msgId is wrong"})}return Promise.reject({type:Ui,reason:"can not delete messages"})}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[Ju]();return t?e:ul.NoAttendee}getReceivers(){const e=this[Ju](),{chat:{chatPrivilege:t,isAllowAttendeeChat:r},meeting:{isWebinar:n}}=e;if(!r)return[];const o=Ss(e);if(o)if(n){if(!hs(o.userRole)){const t=Il(e,o.userId,{includeAttendee:!0});return[El,yl,...t]}if(t===ul.All)return[El,yl];if(t===ul.AllPanelist)return[El];if(t===ul.NoAttendee)return[]}else{const r=bs(e);if(t===ul.All||r){const t=Il(e,o.userId);return[yl,...t]}if(t===ul.Host)return Il(e,o.userId,{host:!0});if(t===ul.EveryonePublicly){const t=Il(e,o.userId,{host:!0});return[yl,...t]}if(t===ul.NoOne)return[]}return[]}getHistory(){return this[Ju]().chat.chatHistory.map(e=>u({},e))}isAllowToDeleteMessages(){const e=this[Ju](),{meeting:{meetingOptions:t}}=e;return null==t?void 0:t.isEnableDeleteChatMsg}}).prototype,"send",[Zu],Object.getOwnPropertyDescriptor(Al.prototype,"send"),Al.prototype),l(Al.prototype,"setPrivilege",[$u,Zu],Object.getOwnPropertyDescriptor(Al.prototype,"setPrivilege"),Al.prototype),l(Al.prototype,"deleteMessage",[Zu],Object.getOwnPropertyDescriptor(Al.prototype,"deleteMessage"),Al.prototype),Al);const Rl=cn(Sl),Nl=(t,r)=>{const{store:{getState:n,dispatch:o},mediaAgent:i}=t,s=n(),{meeting:{bIbDisableShare:a},share:{sharePrivilege:c,ssrc:d,isChromeExtensionInstalled:l,isVerifiedCaptureCanvasAfterFailover:p},media:{sharingEncodeStatus:h}}=s;if(a)return Promise.reject({type:Ui,reason:"information barrier"});const _=bs(s),f=Tc(s);if(c===e.SharePrivilege.OnlyHost&&!_)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can start screen share"});if(c===e.SharePrivilege.HostGrab&&!_&&f.length>0)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can grab screen share"});const v=Ss(s);if(!0===(null==v?void 0:v.sharerOn))return Promise.reject({type:Ui,reason:"you have already started screen share."});let y=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(),y=zi("SHARE_CHECK_CHROME_SHARING_EXTENSION",1)),r.id||(r.id="__ZOOM_SDK_SHARE_CANVAS_@__".replace("@",""+Math.floor(1e4*Math.random()))),Ge([gu("sharing",h,"success"),y]).subscribe(([e,t])=>{const[n]=e;if(n&&t){!1===p&&(bu(r),o(aa(!0)));let e=document.querySelector("#__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(d,r.id,"__ZOOM_SDK_SHARING_VIDEO__")}}),new Promise((e,t)=>{$e(zi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1),zi("SHARE_CHECK_CHROME_SHARING_EXTENSION").pipe(Qe(e=>!e),lt(1),yt(ce({reason:"required extension",extensionUrl:"https://chrome.google.com/webstore/detail/zoom-scheduler/kgjfgplpablkjnlkjmjdecgdpfankdle"}))),zi("SHARE_START_DESKTOP_SHARE_FAILED",1).pipe(yt(ce({reason:"user deny screen share"})))).subscribe(r=>{!0===r.sharerOn?e(""):t({type:"INTERNAL_ERROR"})},e=>{t(u({type:Ui},e))})})},Dl=ss([Os],e=>e.filter(e=>e.bVideoOn));var Pl,Ml,kl,Ul,Vl,Ll,jl,Hl,xl,Fl,Gl,Bl,Wl,Kl,ql,zl,Jl,Ql,Yl,Xl,Zl,$l,ep,tp;let rp=(Pl=tl("audio"),Ml=tl("audio"),kl=tl("audio"),Ul=tl("audio"),Vl=tl("audio"),Ll=tl("audio"),jl=tl("video"),Hl=tl("video"),xl=tl("video"),Fl=tl("video"),Gl=tl("video"),Bl=tl("video"),Wl=tl("video"),Kl=tl("video"),ql=tl("share"),zl=tl("share"),Jl=tl("share"),Ql=tl("share"),Yl=tl("share"),Xl=tl("share"),Zl=tl("share"),$l=tl("share"),np="isShareOptionLocked",ep=function(e,t,r){const n=r.value;r.value=function(...e){const t=this[zu];if(t){const{meeting:{meetingOptions:e}}=t.getState();if(!0===e[np])return Promise.reject({type:"OPERATION_LOCKED",reason:np+" is locked"})}return n.apply(this,e)}},l((tp=class extends ol{constructor(e){super(e),this[zu].dispatch(Qr()),this[Xu]={store:e,mediaAgent:si.getInstance(),rwgAgent:ni.createAgent()}}startAudio(){return(e=>{const{store:{getState:t,dispatch:r},rwgAgent:n}=e,o=t(),i=Ss(o);if("computer"===(null==i?void 0:i.audio))return Promise.resolve();if("phone"===(null==i?void 0:i.audio))return Promise.reject({type:Ui,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:t,canPlayAudio:s},media:{audioDecodeStatus:a,audioEncodeStatus:c}}=o;if(t)return Promise.reject({type:Ui,reason:"Computer audio has been loading, please wait."});if(i){r(zs(!0));const{userRole:t}=i,o=hs(t);gu("audio",o&&!e?"success":c,a).subscribe(([e,t])=>{if(e&&t){let e=s?Promise.resolve():function(){const e=document.createElement("audio");return e.muted=!1,e.volume=.1,e.src=URL.createObjectURL(Si),e.play()}();void 0===e&&(e=Promise.resolve()),e.then(()=>{n.joinOrLeaveVoip(!0)}).catch(()=>{r(Ks(!1))})}})}return"failed"===c||"failed"===a?(r(zs(!1)),Promise.reject({type:"INTERNAL_ERROR",reason:"audio encode or decode error"})):new Promise((e,t)=>{$e(zi(Di.JoinComputerAudio.success,1),ze(...Di.JoinComputerAudio.fail.map(e=>zi(e,1).pipe(Ve(()=>ce({type:"INSUFFICIENT_PRIVILEGES",reason:e}))))),rt(3e4).pipe(Ve(()=>ce({type:"OPERATION_TIMEOUT"})))).subscribe(()=>{r(zs(!1)),e("")},e=>{n.joinOrLeaveVoip(!1),r(zs(!1)),t(e)})})}})(this[Xu])}stopAudio(){return(e=>{const{store:{getState:t,dispatch:r},mediaAgent:n,rwgAgent:o}=e,i=t(),{audio:{isComputerAudioLoading:s}}=i,a=Ss(i);return s?Promise.reject({type:Ui,reason:"Computer audio has not finished joining, please wait."}):"computer"===(null==a?void 0:a.audio)?(n.leaveComputerAudio(),o.joinOrLeaveVoip(!1),r(xs(0)),qi("AUDIO_CURRENT_USER_LEAVE_AUDIO")):Promise.resolve("")})(this[Xu])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=Ss(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:Ui,reason:"no audio joined"}):!0===(null==a?void 0:a.muted)?Promise.resolve(""):(n(Us(!0)),o.mute(a.userId,!0),qi("AUDIO_CURRENT_USER_MUTED").then(()=>(i.muteAudio(),"")));if(bs(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:Ui,reason:"no audio joined"}):!1===n.muted?(o.mute(t,!0),qi("AUDIO_PARTICIPANT_AUDIO_UPDATE",e=>e.id===t&&1==e.muted)):Promise.resolve(""):Promise.reject({type:Vi,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[Xu],e)}unmuteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=Ss(s);if(void 0===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:Ui,reason:"no audio joined"}):!1===(null==a?void 0:a.muted)?Promise.resolve(""):(n(Us(!0)),s.audio.bCanUnmute?(o.mute(a.userId,!1),qi("AUDIO_CURRENT_USER_UNMUTED").then(()=>(i.unmuteAudio(),""))):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host not allow unmute themselves"}));if(bs(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:Ui,reason:"no audio joined"}):(!0===n.muted&&o.mute(t,!1),Promise.resolve("")):Promise.reject({type:Vi,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[Xu],e)}switchMicrophone(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{microphoneDevicesList:i,activeMicrophone:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeMicrophone(t),n(Bs(t))),Promise.resolve(""))})(this[Xu],e)}switchSpeaker(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{speakerDevicesList:i,activeSpeaker:s}}=r();return-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeSpeaker(t),n(Ws(t))),Promise.resolve(""))})(this[Xu],e)}getMicList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.microphoneDevicesList]:[]})(this[Xu])}getSpeakerList(){return(({store:{getState:e}})=>{const t=e();return t.audio?[...t.audio.speakerDevicesList]:[]})(this[Xu])}isAudioMuted(e){return(({store:{getState:e}},t)=>{const r=e(),{meeting:{isWebinar:n}}=r;let o=null;return void 0===t?o=Ss(r):(o=r.participants.attendeesList.find(e=>e.userId===t),n&&!o&&(o=r.participants.xmppAttendeeList.find(e=>e.userId===t))),!!o&&!!o.muted})(this[Xu],e)}getActiveMicrophone(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeMicrophone:null})(this[Xu])}getActiveSpeaker(){return(({store:{getState:e}})=>{const t=e();return t.audio?t.audio.activeSpeaker:null})(this[Xu])}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}}=i;return l?Promise.reject({type:Ui,reason:"Video is started"}):u?Promise.reject({type:Ui,reason:"Camera is starting,please wait."}):p&&!bs(i)?Promise.reject({type:Ui,reason:"Video is muted by the host"}):(n(Sa(!0)),gu("video",a,s).subscribe(([e])=>{if(e){const{cameraId:e=d,captureWidth:r=640,captureHeight:i=360,videoDOMId:s}=t||{};o.startCaptureVideo(c,e,r,i,s),d!==e&&n(ha(e))}else n(Sa(!1))}),Ki(Ti).then(()=>{n(ba(!1)),n(va(!1))}).finally(()=>{n(Sa(!1))}))})(this[Xu],e)}stopVideo(){return(e=>{const{store:{getState:t},mediaAgent:r}=e,{video:{isCaptureCameraLoading:n,isCurrentUserStartedVideo:o}}=t();return n?Promise.reject({type:Ui,reason:"Camera is starting,please wait."}):o?(r.stopCaptureVideo(),qi("VIDEO_CAPTURE_STOP_RESULT",e=>!0!==(null==e?void 0:e.failed))):Promise.reject({type:Ui,reason:"carmera is closed"})})(this[Xu])}switchCamera(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{video:{cameraDevicesList:s,isCurrentUserStartedVideo:a}}=i;return-1===s.map(e=>e.deviceId).indexOf(t)?Promise.reject({type:Vi,reason:"Cannot find cameraDeviceId in camera devices list."}):(a&&o.changeCamera(t),n(ha(t)),Promise.resolve())})(this[Xu],e)}renderVideo(t,r,n,o,i,s,a,c){return((t,r,n,o,i,s,a,c,d,u)=>{const{store:{getState:l,dispatch:p},mediaAgent:h,rwgAgent:_}=t,f=l(),{meeting:{userId:v},video:{subscribedVideoList:y}}=f;if(!r)return Promise.reject({type:Vi,reason:"Received canvas is falsy"});if(!y.includes(n)&&y.length>=9)return Promise.reject({type:Ui,reason:"subscribe video counts greater than maximum size (9)"});if(-1===Dl(f).findIndex(e=>e.userId===n))return Promise.reject({type:Vi,reason:"user is not send video"});const{media:{videoDecodeStatus:E}}=f;return r.id||(r.id="__ZOOM_SDK_VIDEO_CANVAS_@__".replace("@",""+Math.floor(1e4*Math.random()))),gu("video","success",E).subscribe(([t])=>{if(t){const{video:{isVerifiedVideoRenderCanvasAfterFailover:t,highDefinitionVideoId:u,isSupportHDVideo:f,renderedVideoList:E}}=l();let g=r;!1===t&&(g=bu(r),p(ma(!0)));const S=n===v,b=d||"__ZOOM_SDK_VIDEO_ZONE__";let m=c;c===e.VideoQuality.Video_720P&&(f?u?u!==n&&(console.warn("Web Video SDK only supports subscribing one 720P video stream, will downgrade to 360P stream"),m=e.VideoQuality.Video_360P):p(Ma(n)):(console.warn("Can not subscribe 720P video stream,will downgrade to 360P stream"),m=e.VideoQuality.Video_360P)),E.some(e=>e.userId===n&&e.key===b&&e.canvasId===g.id)||h.renderVideo(g.id,n,b,o,i,s,a,m,S,"",!1),n===u&&m===e.VideoQuality.Video_720P||_.subscribeVideo(n,m,!1),y.includes(n)||p(Ca(n)),u===n&&m!==e.VideoQuality.Video_720P&&p(Ma(void 0)),p(Na({userId:n,key:b,canvasId:g.id}))}}),"failed"===E?Promise.reject({type:"INTERNAL_ERROR",reason:"Video decode status is failed"}):Promise.resolve("")})(this[Xu],t,r,n,o,i,s,a,c)}stopRenderVideo(e,t,r,n,o=!1){return((e,t,r,n,o,i=!1)=>{const{store:{getState:s,dispatch:a},mediaAgent:c,rwgAgent:d}=e,u=s(),{video:{subscribedVideoList:l,renderedVideoList:p,highDefinitionVideoId:h}}=u;if(!t||!t.id)return Promise.reject({type:Vi,reason:"canvas is falsy"});if(l.includes(r)){let e=o;e||(e={R:0,G:0,B:0,A:0});const s=n||"__ZOOM_SDK_VIDEO_ZONE__";p.find(e=>e.userId===r&&e.key===s)&&(c.stopRenderVideo(t.id,r,s,e,i),1==p.filter(e=>e.userId===r).length&&(d.unsubscribeVideo(r),a(Ta(r)),h===r&&a(Ma(void 0))),a(Da({userId:r,key:s,canvasId:t.id})))}return Promise.resolve("")})(this[Xu],e,t,r,n,o)}updateVideoCanvasDimension(e,t,r){return((e,t,r,n)=>{const{mediaAgent:o}=e;return t&&t.id?(o.updateRenderedVideoCanvasDimension(t.id,r,n),Promise.resolve("")):Promise.reject({type:Vi,reason:"canvas is falsy"})})(this[Xu],e,t,r)}adjustRenderedVideoPosition(e,t,r,n,o,i,s){return((e,t,r,n,o,i,s,a)=>{const{store:{getState:c},mediaAgent:d}=e;if(!t||!t.id)return Promise.reject({type:Vi,reason:"canvas is falsy"});const{video:{subscribedVideoList:u}}=c();return u.includes(r)?(d.adjustRenderedVideoPosition(t.id,r,a||"__ZOOM_SDK_VIDEO_ZONE__",i,s,n,o),Promise.resolve("")):Promise.reject({type:Vi,reason:"userId is not correct"})})(this[Xu],e,t,r,n,o,i,s)}clearVideoCanvas(e,t){return((e,t,r)=>{const{mediaAgent:n}=e;if(!t||!t.id)return Promise.reject({type:Vi,reason:"canvas is falsy"});let o=r;return o||(o={R:0,G:0,B:0,A:0}),n.clearVideoCanvas(t.id,o),Promise.resolve("")})(this[Xu],e,t)}isCapturingVideo(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCurrentUserStartedVideo})(this[Xu])}isCameraTaken(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCameraTaken})(this[Xu])}isCaptureForbidden(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.video&&r.video.isCaptureForbidden})(this[Xu])}getCameraList(){return(e=>{const{store:{getState:t}}=e,r=t();if(!r.video)return[];const{video:{cameraDevicesList:n}}=r;return n.map(e=>Object.assign({},e))})(this[Xu])}getActiveCamera(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeCamera:""})(this[Xu])}getActiveVideoId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.activeVideoId:0})(this[Xu])}getVideoMaxQuality(){return(t=>{const{store:{getState:r}}=t,n=r();return n.video?n.video.receivedVideoMaxQuality:e.VideoQuality.Video_90P})(this[Xu])}getReceivedVideoDimension(){return(e=>{const{store:{getState:t}}=e,r=t();return r.video?r.video.receivedVideoDimension:null})(this[Xu])}isSupportMultipleVideos(){return"function"==typeof OffscreenCanvas&&"function"==typeof SharedArrayBuffer}isSupportHDVideo(){return(e=>{var t;const{store:{getState:r}}=e;return null===(t=r().video)||void 0===t?void 0:t.isSupportHDVideo})(this[Xu])}startShareView(t,r){return((t,r,n,o)=>{const{store:{getState:i,dispatch:s},mediaAgent:a,rwgAgent:c}=t,{share:{isReceiveSharing:d,isRemoteSharingActive:u,activeNodeId:l,activeSsrc:p,shareQuality:h,status:_,isVerifiedRenderCanvasAfterFailover:f},media:{sharingDecodeStatus:v}}=i();if(!r||n!==l)return Promise.reject({type:Vi,reason:""});if(!u||d||_!==e.ShareStatus.End)return Promise.reject({type:Ui,reason:""});return gu("sharing","success",v).subscribe(([,e])=>{if(e){let e=r;!1===f&&(e=bu(r),s(sa(!0))),s(Ys(!0)),c.subscribeSharing(n,h),a.renderSharing(p,e,!1,o)}}),"failed"===v?Promise.reject({type:"INTERNAL_ERROR",reason:""}):qi("SHARE_RECEIVED_DIMENSION_CHANGE",e=>!!e,6e4)})(this[Xu],t,r)}stopShareView(){return(e=>{const{store:{dispatch:t,getState:r},rwgAgent:n,mediaAgent:o}=e,{share:{isReceiveSharing:i,activeNodeId:s}}=r();return i?(o.stopRenderSharing(),n.unsubscribeSharing(s),t(Ys(!1)),Promise.resolve("")):Promise.resolve("")})(this[Xu])}switchShareView(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),{share:{isReceiveSharing:a,activeNodeId:c,isRemoteControlApproved:d,isGrabRemoteControl:u,shareQuality:l}}=s;return a?t===c?Promise.resolve(""):Tc(s).findIndex(e=>e.userId===c)>-1?(d&&(u&&o.subscribeGrabRemoteControl(c,!1),o.sharingRequestRemoteControl(c,!1)),o.unsubscribeSharing(c),o.subscribeSharing(t,l),i.switchSharingSource(t),n(Qs({bStatus:1,activeNodeID:t,ssrc:t})),Promise.resolve("")):Promise.reject({type:Vi,reason:"no matching user id"}):Promise.reject({type:Ui})})(this[Xu],e)}updateSharingCanvasDimension(e,t){return((e,t,r)=>{const{store:{getState:n},mediaAgent:o}=e,i=n(),{share:{isReceiveSharing:s}}=i;return s&&o.updateRenderedSharingDimension(t,r),Promise.resolve("")})(this[Xu],e,t)}startShareScreen(e){return Nl(this[Xu],e)}stopShareScreen(){return(t=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=t,{share:{status:s},meeting:{userId:a}}=r();return s===e.ShareStatus.End?Promise.resolve(""):(n(ea(e.ShareStatus.End)),o.stopSharing(a),i.stopDesktopSharing(),qi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!1===e.sharerOn))})(this[Xu])}pauseShareScreen(){return(t=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=t,{share:{status:s}}=r();return s===e.ShareStatus.Sharing?(o.pauseSharing(),i.pauseDesktopSharing(),qi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerPause).then(()=>(n(ea(e.ShareStatus.Paused)),""))):Promise.reject({type:Ui})})(this[Xu])}resumeShareScreen(){return(t=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=t,{share:{status:s}}=r();return s===e.ShareStatus.Paused?(o.resumeSharing(),i.resumeDesktopSharing(),qi("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.sharerOn&&!1===e.sharerPause).then(()=>(n(ea(e.ShareStatus.Sharing)),""))):Promise.reject({type:Ui})})(this[Xu])}lockShare(t){return((t,r)=>((t,r)=>{const{store:{getState:n},rwgAgent:o}=t,{share:{sharePrivilege:i}}=n();return i===r?Promise.resolve(""):Object.values(e.SharePrivilege).includes(r)?(o.lockSharing(r),qi("UPDATE_MEETING_ATTRIBUTE",e=>e.lockShare===r)):Promise.reject({type:Vi})})(t,r?e.SharePrivilege.OnlyHost:e.SharePrivilege.HostGrab))(this[Xu],t)}getShareUserList(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?Tc(r).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,avatar:e.avatar,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause})):[]})(this[Xu])}getActiveShareUserId(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share&&r.share.isRemoteSharingActive?r.share.activeNodeId:0})(this[Xu])}isReceiveSharing(){return(e=>{const{store:{getState:t}}=e,r=t();return!!r.share&&r.share.isReceiveSharing})(this[Xu])}getSharedContentDimension(){return(t=>{const{store:{getState:r}}=t,n=r();if(n.share){if(n.share.status!==e.ShareStatus.End)return u({},n.share.shareDimension);{const{share:{receivedShareDimension:e}}=n;return{width:e.width,height:e.height}}}return null})(this[Xu])}getShareStatus(){return(e=>{const{store:{getState:t}}=e,r=t();return r.share?r.share.status:null})(this[Xu])}}).prototype,"startAudio",[Zu,Pl],Object.getOwnPropertyDescriptor(tp.prototype,"startAudio"),tp.prototype),l(tp.prototype,"stopAudio",[Zu,Ml],Object.getOwnPropertyDescriptor(tp.prototype,"stopAudio"),tp.prototype),l(tp.prototype,"muteAudio",[Zu,kl],Object.getOwnPropertyDescriptor(tp.prototype,"muteAudio"),tp.prototype),l(tp.prototype,"unmuteAudio",[Zu,Ul],Object.getOwnPropertyDescriptor(tp.prototype,"unmuteAudio"),tp.prototype),l(tp.prototype,"switchMicrophone",[Zu,Vl],Object.getOwnPropertyDescriptor(tp.prototype,"switchMicrophone"),tp.prototype),l(tp.prototype,"switchSpeaker",[Zu,Ll],Object.getOwnPropertyDescriptor(tp.prototype,"switchSpeaker"),tp.prototype),l(tp.prototype,"startVideo",[Zu,jl],Object.getOwnPropertyDescriptor(tp.prototype,"startVideo"),tp.prototype),l(tp.prototype,"stopVideo",[Zu,Hl],Object.getOwnPropertyDescriptor(tp.prototype,"stopVideo"),tp.prototype),l(tp.prototype,"switchCamera",[Zu,xl],Object.getOwnPropertyDescriptor(tp.prototype,"switchCamera"),tp.prototype),l(tp.prototype,"renderVideo",[Zu,Fl],Object.getOwnPropertyDescriptor(tp.prototype,"renderVideo"),tp.prototype),l(tp.prototype,"stopRenderVideo",[Zu,Gl],Object.getOwnPropertyDescriptor(tp.prototype,"stopRenderVideo"),tp.prototype),l(tp.prototype,"updateVideoCanvasDimension",[Zu,Bl],Object.getOwnPropertyDescriptor(tp.prototype,"updateVideoCanvasDimension"),tp.prototype),l(tp.prototype,"adjustRenderedVideoPosition",[Zu,Wl],Object.getOwnPropertyDescriptor(tp.prototype,"adjustRenderedVideoPosition"),tp.prototype),l(tp.prototype,"clearVideoCanvas",[Zu,Kl],Object.getOwnPropertyDescriptor(tp.prototype,"clearVideoCanvas"),tp.prototype),l(tp.prototype,"startShareView",[Zu,ql],Object.getOwnPropertyDescriptor(tp.prototype,"startShareView"),tp.prototype),l(tp.prototype,"stopShareView",[Zu,zl],Object.getOwnPropertyDescriptor(tp.prototype,"stopShareView"),tp.prototype),l(tp.prototype,"switchShareView",[Zu,Jl],Object.getOwnPropertyDescriptor(tp.prototype,"switchShareView"),tp.prototype),l(tp.prototype,"updateSharingCanvasDimension",[Zu,Ql],Object.getOwnPropertyDescriptor(tp.prototype,"updateSharingCanvasDimension"),tp.prototype),l(tp.prototype,"startShareScreen",[Zu,Yl],Object.getOwnPropertyDescriptor(tp.prototype,"startShareScreen"),tp.prototype),l(tp.prototype,"stopShareScreen",[Zu,Xl],Object.getOwnPropertyDescriptor(tp.prototype,"stopShareScreen"),tp.prototype),l(tp.prototype,"pauseShareScreen",[Zu,Zl],Object.getOwnPropertyDescriptor(tp.prototype,"pauseShareScreen"),tp.prototype),l(tp.prototype,"resumeShareScreen",[Zu,$l],Object.getOwnPropertyDescriptor(tp.prototype,"resumeShareScreen"),tp.prototype),l(tp.prototype,"lockShare",[$u,ep,Zu],Object.getOwnPropertyDescriptor(tp.prototype,"lockShare"),tp.prototype),tp);var np,op;const ip={chat:{epic:Rl,reducer:ml,Client:wl}},sp=ni.createAgent();let ap=(l((op=class extends _l{constructor(e){super(e),this.mediaStream=void 0,this[Yu]=ip}getMediaStream(){return void 0===this.mediaStream&&(this.mediaStream=new rp(this[zu])),this.mediaStream}joinInstant(e,t,r,n,o){const{[Ju]:i,[Qu]:s}=this,{meeting:{lang:a,meetingStatus:c},socket:{zoomSocketStatus:d}}=i();return t?"initial"===c&&"closed"===d?(s(to({topic:e,password:o||"",userName:r,zlk:t,lang:a,cv:n})),Ki(ci)):Promise.reject({type:Ui,reason:"duplicated operation"}):Promise.reject({type:Ui,reason:"invalid signature"})}removeUser(e){const t=this[zu].getState(),{participants:{attendeesList:r}}=t;return r.find(t=>t.userId===e)?(sp.expel(e),qi("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t=>t.some(t=>t.userId===e))):Promise.reject({type:Vi,reason:"no matched user"})}}).prototype,"removeUser",[$u,Zu],Object.getOwnPropertyDescriptor(op.prototype,"removeUser"),op.prototype),op);class cp{constructor(e){this.instant=void 0,this.context=void 0,this.script=void 0,this.mic=void 0,this.instant=0,this.context=e,this.mic=null,this.script=e.createScriptProcessor(2048,1,1),this.script.onaudioprocess=e=>{const t=e.inputBuffer.getChannelData(0);let r,n=0;for(r=0;re.stop()),this.audioStream=null,this.isAudioStarted=!1}async toggleMicIsMuted(e){if(e){if(!this.audioContext){const e=window.AudioContext||window.webkitAudioContext;this.audioContext=new e}this.inputMicDetector=new cp(this.audioContext),this.inputMicDetector.connectToSource(this.audioStream)}else this.inputMicDetector&&this.inputMicDetector.stop(),this.inputMicDetector=null;this.isMicUnmuted=e}getAudioConstraints(){return{audio:""===this.deviceId||{deviceId:this.deviceId},video:!1}}}const up={width:{min:1024,ideal:1280,max:1920},height:{min:576,ideal:720,max:1080},aspectRatio:{ideal:1.777777778}};class lp{constructor(e=""){this.isVideoStarted=void 0,this.videoStream=void 0,this.deviceId=void 0,this.isVideoStarted=!1,this.videoStream=null,this.deviceId=e}async start(e){if(!e)throw new Error("Video DOM element is falsy");if(this.isVideoStarted||this.videoStream)throw new Error("VideoAlreadyStartedError");const t=async t=>{if(!t||"OverconstrainedError"!==t.name&&"ConstraintNotSatisfiedError"!==t.name)throw t;console.log(`Warning: detected ${t.name} -- trying to fall back to lower aspect ratio`);try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints(!0));return this.tryPlayVideo(e,t)}catch(e){throw e}};try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints());return this.tryPlayVideo(e,t)}catch(e){return t(e)}}async stop(){if(!this.videoStream||!this.isVideoStarted)throw new Error("VideoNotStartedError");this.videoStream.getVideoTracks().forEach(e=>e.stop()),this.videoStream=null,this.isVideoStarted=!1}getVideoConstraints(e=!1){let t=up;return e?t=""===this.deviceId||{deviceId:this.deviceId}:""!==this.deviceId&&(t.deviceId=this.deviceId),{audio:!1,video:t}}async tryPlayVideo(e,t){if(!e)throw new Error("Video DOM element is falsy");try{this.videoStream=t,e.srcObject=this.videoStream,await e.play(),this.isVideoStarted=!0}catch(e){throw e}}}class pp{static createClient(){if(!this.meetingClient){const e=function(){const e=[Wu],t=v(qu(),Ku(function(){for(var e=arguments.length,t=new Array(e),r=0;r{void 0===t.asyncReducers[e]&&(t.asyncReducers[e]=r,t.replaceReducer(qu(t.asyncReducers)))},t.injectEpic=e=>{Fu.next(e)},Wu.run(Gu),t}();this.meetingClient=new ap(e)}return this.meetingClient}static destroyClient(){this.meetingClient&&(this.meetingClient.leave().then(()=>{rt(500).subscribe(()=>{Ji()})}),this.meetingClient=null)}static checkSystemRequirements(){return{audio:jo()&&Ho(),video:jo()&&void 0!==navigator.mediaDevices,screen:jo()&&void 0!==(navigator.mediaDevices&&navigator.mediaDevices).getDisplayMedia}}static getDevices(e){return e?navigator.mediaDevices.enumerateDevices():navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(e=>(e.getTracks().forEach(e=>e.stop()),navigator.mediaDevices.enumerateDevices()))}static createLocalAudioTrack(e=""){return new dp(e)}static createLocalVideoTrack(e=""){return new lp(e)}}pp.meetingClient=void 0,pp.VERSION="2.0.0";var hp,_p,fp="https://dmogdx0jrul3u.cloudfront.net/videosdk/".concat("1.1.3","/lib"),vp="https://source.zoom.us/videosdk/".concat("1.1.3","/lib"),yp="https://jssdk.zoomus.cn/videosdk/".concat("1.1.3","/lib"),Ep=Symbol("stream"),gp=function(){function e(r){t(this,e),this[Ep]=void 0,this[Ep]=r}return n(e,[{key:"startAudio",value:function(){return this[Ep].startAudio()}},{key:"stopAudio",value:function(){return this[Ep].stopAudio()}},{key:"muteAudio",value:function(e){return this[Ep].muteAudio(e)}},{key:"unmuteAudio",value:function(e){return this[Ep].unmuteAudio(e)}},{key:"isAudioMuted",value:function(e){return this[Ep].isAudioMuted(e)}},{key:"getMicList",value:function(){return this[Ep].getMicList()}},{key:"getSpeakerList",value:function(){return this[Ep].getSpeakerList()}},{key:"getActiveMicrophone",value:function(){return this[Ep].getActiveMicrophone()}},{key:"getActiveSpeaker",value:function(){return this[Ep].getActiveSpeaker()}},{key:"switchMicrophone",value:function(e){return this[Ep].switchMicrophone(e)}},{key:"switchSpeaker",value:function(e){return this[Ep].switchSpeaker(e)}},{key:"startVideo",value:function(e){return this[Ep].startVideo(e)}},{key:"stopVideo",value:function(){return this[Ep].stopVideo()}},{key:"renderVideo",value:function(e,t,r,n,o,i,s,a){return this[Ep].renderVideo(e,t,r,n,o,i,s,a)}},{key:"stopRenderVideo",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this[Ep].stopRenderVideo(e,t,r,n,o)}},{key:"updateVideoCanvasDimension",value:function(e,t,r){return this[Ep].updateVideoCanvasDimension(e,t,r)}},{key:"adjustRenderedVideoPosition",value:function(e,t,r,n,o,i,s){return this[Ep].adjustRenderedVideoPosition(e,t,r,n,o,i,s)}},{key:"clearVideoCanvas",value:function(e,t){return this[Ep].clearVideoCanvas(e,t)}},{key:"getCameraList",value:function(){return this[Ep].getCameraList()}},{key:"switchCamera",value:function(e){return this[Ep].switchCamera(e)}},{key:"isCapturingVideo",value:function(){return this[Ep].isCapturingVideo()}},{key:"isCameraTaken",value:function(){return this[Ep].isCameraTaken()}},{key:"getActiveVideoId",value:function(){return this[Ep].getActiveVideoId()}},{key:"getActiveCamera",value:function(){return this[Ep].getActiveCamera()}},{key:"isCaptureForbidden",value:function(){return this[Ep].isCaptureForbidden()}},{key:"getVideoMaxQuality",value:function(){return this[Ep].getVideoMaxQuality()}},{key:"getReceivedVideoDimension",value:function(){return this[Ep].getReceivedVideoDimension()}},{key:"isSupportMultipleVideos",value:function(){return this[Ep].isSupportMultipleVideos()}},{key:"isSupportHDVideo",value:function(){return this[Ep].isSupportHDVideo()}},{key:"startShareView",value:function(e,t){return this[Ep].startShareView(e,t)}},{key:"stopShareView",value:function(){return this[Ep].stopShareView()}},{key:"startShareScreen",value:function(e){return this[Ep].startShareScreen(e)}},{key:"pauseShareScreen",value:function(){return this[Ep].pauseShareScreen()}},{key:"resumeShareScreen",value:function(){return this[Ep].resumeShareScreen()}},{key:"stopShareScreen",value:function(){return this[Ep].stopShareScreen()}},{key:"lockShare",value:function(e){return this[Ep].lockShare(e)}},{key:"isShareLocked",value:function(){return this[Ep].isShareLocked()}},{key:"getActiveShareUserId",value:function(){return this[Ep].getActiveShareUserId()}}]),e}(),Sp=Symbol("chat"),bp=function(){function e(r){t(this,e),this[Sp]=void 0,this[Sp]=r}return n(e,[{key:"send",value:function(e,t){return this[Sp].send(e,t)}},{key:"sendToAll",value:function(e){return this[Sp].send(e,ll.All)}},{key:"setPrivilege",value:function(e){return this[Sp].setPrivilege(e)}},{key:"getPrivilege",value:function(){return this[Sp].getPrivilege()}},{key:"getReceivers",value:function(){return this[Sp].getReceivers().map((function(e){return s({isManager:e.isCoHost},a(e,["isCoHost"]))}))}}]),e}(),mp=function(e){return"string"==typeof e&&e.length>0},Ip=Symbol("Client"),Ap=function(){function e(){t(this,e),this[Ip]=void 0,this.stream=void 0,this.chat=void 0,this[Ip]=pp.createClient()}return n(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Global",r=arguments.length>2?arguments[2]:void 0,n="";switch(t){case"Global":n=vp;break;case"CN":n=yp;break;case"CDN":n=fp;break;default:n=t}return this[Ip].init("","",{language:e,dependentAssets:n,constraints:s({},pp.checkSystemRequirements()),additionalFeatures:["chat"],webEndpoint:r||"zoom.us"})}},{key:"join",value:function(e,t,r,n){return mp(e)&&mp(t)&&mp(r)?e.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of topic is 200"}):r.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of username is 200"}):!n||mp(n)&&!void/^([!@#$%^&*?=]|\w|\d){1,10}$/gi.test(n)?this[Ip].joinInstant(e,t,r,"1.1.3",n):Promise.reject({type:"INVALID_PARAMETERS",reason:"Password can contain English characters, numbers and special characters like !@#$%^&*?=, and the max length of password is 10"}):Promise.reject({type:"INVALID_PARAMETERS",reason:"topic, token and userName must be string and required"})}},{key:"leave",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?this[Ip].end():this[Ip].leave()}},{key:"getSessionInfo",value:function(){var e=this[Ip].getMeetingInfo();return{isInMeeting:e.isInMeeting||!1,password:e.password||"",topic:e.topic,userName:e.userName,userId:e.userId}}},{key:"on",value:function(e,t){this[Ip].on(e,t)}},{key:"off",value:function(e,t){this[Ip].off(e,t)}},{key:"getMediaStream",value:function(){return this.stream||(this.stream=new gp(this[Ip].getMediaStream())),this.stream}},{key:"getChatClient",value:function(){return this.chat||(this.chat=new bp(this[Ip].getFeatureModule("chat"))),this.chat}},{key:"coverntUser",value:function(e){return{userId:e.userId,avatar:e.avatar||"",displayName:e.displayName,isHost:e.isHost,isManager:e.isCoHost||!1,audio:e.audio,muted:e.muted,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharerPause:e.sharerPause}}},{key:"getCurrentUserInfo",value:function(){var e=this[Ip].getCurrentUserInfo();if(e)return this.coverntUser(e)}},{key:"getUser",value:function(e){var t=this[Ip].getParticipantsList().find((function(t){return t.userId===e}));if(t)return this.coverntUser(t)}},{key:"getAllUser",value:function(){var e=this;return this[Ip].getParticipantsList().map((function(t){return e.coverntUser(t)}))}},{key:"changeName",value:function(e,t){return this[Ip].changeName(e,t)}},{key:"makeHost",value:function(e){return this[Ip].makeHost(e)}},{key:"makeManager",value:function(e){return this[Ip].makeCoHost(e)}},{key:"revokeManager",value:function(e){return this[Ip].revokeCoHost(e)}},{key:"removeUser",value:function(e){return this[Ip].removeUser(e)}},{key:"isHost",value:function(){return this[Ip].isHost()}},{key:"isManager",value:function(){return this[Ip].isCoHost()}}]),e}(),Op=function(){function e(){t(this,e)}return n(e,null,[{key:"createClient",value:function(){return this.videoClient||(this.videoClient=new Ap),this.videoClient}},{key:"destroyClient",value:function(){this.videoClient&&(this.videoClient.leave(),this.videoClient=null)}},{key:"checkSystemRequirements",value:function(){return pp.checkSystemRequirements()}},{key:"getDevices",value:function(e){return pp.getDevices(e)}},{key:"createLocalAudioTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return pp.createLocalAudioTrack(e)}},{key:"createLocalVideoTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return pp.createLocalVideoTrack(e)}}]),e}();Op.videoClient=void 0,Op.VERSION="1.1.3",(hp=e.ChatPrivilege||(e.ChatPrivilege={}))[hp.All=1]="All",hp[hp.NoOne=4]="NoOne",hp[hp.EveryonePublicly=5]="EveryonePublicly",(_p=e.ChatMsgType||(e.ChatMsgType={}))[_p.All=0]="All",e.default=Op,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/dist/lib/audio.encode.wasm b/dist/lib/audio.encode.wasm old mode 100755 new mode 100644 index 5fc1ff4..95a8a8f Binary files a/dist/lib/audio.encode.wasm and b/dist/lib/audio.encode.wasm differ diff --git a/dist/lib/audio.simd.wasm b/dist/lib/audio.simd.wasm old mode 100755 new mode 100644 index 47f391a..73d60e6 Binary files a/dist/lib/audio.simd.wasm and b/dist/lib/audio.simd.wasm differ diff --git a/dist/lib/audio_simd.min.js b/dist/lib/audio_simd.min.js old mode 100755 new mode 100644 index 6c09810..845ca62 --- a/dist/lib/audio_simd.min.js +++ b/dist/lib/audio_simd.min.js @@ -1,4 +1,4 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=152)}([function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(46)("wks"),i=n(32),a=n(1).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){var r=n(1),i=n(0),a=n(8),o=n(9),s=n(10),u=function(e,t,n){var c,_,f,l=e&u.F,h=e&u.G,E=e&u.S,d=e&u.P,A=e&u.B,p=e&u.W,v=h?i:i[t]||(i[t]={}),b=v.prototype,T=h?r:E?r[t]:(r[t]||{}).prototype;for(c in h&&(n=t),n)(_=!l&&T&&void 0!==T[c])&&s(v,c)||(f=_?T[c]:n[c],v[c]=h&&"function"!=typeof T[c]?n[c]:A&&_?a(f,r):p&&T[c]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):d&&"function"==typeof f?a(Function.call,f):f,d&&((v.virtual||(v.virtual={}))[c]=f,e&u.R&&b&&!b[c]&&o(b,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(7),i=n(42),a=n(41),o=Object.defineProperty;t.f=n(5)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(4);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(16);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(6),i=n(23);e.exports=n(5)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports={}},function(e,t,n){var r=n(37),i=n(27);e.exports=function(e){return r(i(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(8),i=n(64),a=n(65),o=n(7),s=n(24),u=n(39),c={},_={};(t=e.exports=function(e,t,n,f,l){var h,E,d,A,p=l?function(){return e}:u(e),v=r(n,f,t?2:1),b=0;if("function"!=typeof p)throw TypeError(e+" is not iterable!");if(a(p)){for(h=s(e.length);h>b;b++)if((A=t?v(o(E=e[b])[0],E[1]):v(e[b]))===c||A===_)return A}else for(d=p.call(e);!(E=d.next()).done;)if((A=i(d,v,E.value,t))===c||A===_)return A}).BREAK=c,t.RETURN=_},function(e,t,n){var r=n(27);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(6).f,i=n(10),a=n(2)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){var r=n(68),i=n(44);e.exports=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var a=i&&r?r(e,n):{};a.get||a.set?i(t,n,a):t[n]=e[n]}return t.default=e,t}},function(e,t,n){"use strict";var r=n(79)(!0);n(33)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIDEO_NV12=t.VIDEO_I420=t.VIDEO_RGBA=t.VIDEO_INVALID=t.SET_INTERVAL_MODE=t.RQUEST_ANIMATION_MODE=t.serverHeartbeatMaxTimeoutSeconds=t.INTERPRETATION_SET_INTERPRETER=t.INTERPRETATION_MUTE=t.INTERPRETATION_SET_LANG=t.INTERPRETATION_ENABLE=t.CURRENT_DESKTOP_SHARING_WIDTH_HEIGHT=t.CURRENT_CAPTURE_VIDEO_WIDTH_HEIGHT=t.VIDEO_CAPTURER_RESOLUTION_CHANGE=t.CURRENT_SSRC_TIME=t.AES_GCM_IV_CALLBACK_FROM_WASM=t.AES_GCM_IV_TO_WASM=t.SHARING_GET_IMAGE_DATA_WRONG=t.SHARING_RENDER_MONITOR_LOG=t.Sharing_Width_And_Height_Info=t.VIDEO_RENDER_MONITOR_LOG=t.CURRENT_VIDEO_RESOLUTION=t.VIDEO_CAPTURER_RESOLUTION_720P=t.VIDEO_CAPTURER_RESOLUTION_360P=t.MEDIA_VIDEO_RTCP=t.MEDIA_VIDEO_DATA=t.MEDIA_AUDIO_RTCP=t.MEDIA_AUDIO_DATA=t.MEDIA_VIDEO_REPORT_DROP_RATIO=t.MULTIVIEW_WEBGL_CONTEXT_LOST=t.AUDIO_CLIPPING=t.Sharing_Dec_WebSocket_FAILED=t.Sharing_Handle_FAILED=t.Audio_Mute=t.Sharing_Dec_WASM_FAILED=t.Video_Enc_Handle_FAILED=t.Video_Enc_WASM_FAILED=t.Video_Dec_WebSocket_FAILED=t.Video_Dec_Handle_FAILED=t.Video_Dec_WASM_FAILED=t.Audio_Enc_Handle_FAILED=t.Audio_Enc_WASM_FAILED=t.Audio_Dec_WebSocket_FAILED=t.Audio_Dec_Handle_FAILED=t.Audio_Dec_WASM_FAILED=t.WASMPTR=t.THREAD_ENCODE_BUFFER=t.THREAD_STATE_CREATED=t.THREAD_STATE_CREATING=t.THREAD_STATE_IDLE=t.AUDIO_ENCODED_DATA=t.VIDEO_DATA_DROP_RATIO=t.VIDEO_DROP_RATIO_FROM_WCL=t.VIDEO_ENCODED_DATA=t.SHARING_DECODE_MESSAGE=t.MOUSE_DATA_VIDEO_MODE=t.SHARING_DATA_VIDEO_MODE=t.WCL_TROUBLESHOOTING_INFO=t.DELTA_S=t.DELTA_C=t.DELTA_D=t.APP_TROUBLESHOOTING_INFO=t.DOWNLOAD_WASM_FROM_MAIN_THREAD=t.WORKER_MAIN_VIDEO_DECODE_RINGBUFFER_TICK=t.WORKER_MAIN_AUDIO_ENCODE_RINGBUFFER_TICK=t.WORKER_MAIN_VIDEO_ENCODE_RINGBUFFER_TICK=t.MONITOR_MESSAGE=t.Video_Capture_Tick=t.DECODE_MESSAGE=t.Sharing_Data=t.Sharing_Handle_OK=t.Sharing_Dec_WebSocket_OK=t.AUDIO_DELAY=t.Sharing_Dec_PICTURE=t.Sharing_Dec_WASM_OK=t.Video_Enc_Handle_OK=t.Video_Enc_WASM_OK=t.Video_Dec_WebSocket_OK=t.Video_Dec_Handle_OK=t.Video_Dec_WASM_OK=t.Audio_Enc_Handle_OK=t.Audio_Enc_WASM_OK=t.Audio_Dec_WebSocket_OK=t.Audio_Dec_Handle_OK=t.Audio_Dec_WASM_OK=void 0;t.Audio_Dec_WASM_OK=1;t.Audio_Dec_Handle_OK=2;t.Audio_Dec_WebSocket_OK=3;t.Audio_Enc_WASM_OK=4;t.Audio_Enc_Handle_OK=5;t.Video_Dec_WASM_OK=7;t.Video_Dec_Handle_OK=8;t.Video_Dec_WebSocket_OK=9;t.Video_Enc_WASM_OK=10;t.Video_Enc_Handle_OK=11;t.Sharing_Dec_WASM_OK=12;t.Sharing_Dec_PICTURE=13;t.AUDIO_DELAY=14;t.Sharing_Dec_WebSocket_OK=15;t.Sharing_Handle_OK=16;t.Sharing_Data=17;t.DECODE_MESSAGE=18;t.Video_Capture_Tick=20;t.MONITOR_MESSAGE=21;t.WORKER_MAIN_VIDEO_ENCODE_RINGBUFFER_TICK=22;t.WORKER_MAIN_AUDIO_ENCODE_RINGBUFFER_TICK=23;t.WORKER_MAIN_VIDEO_DECODE_RINGBUFFER_TICK=24;t.DOWNLOAD_WASM_FROM_MAIN_THREAD=30;t.APP_TROUBLESHOOTING_INFO=31;t.DELTA_D=32;t.DELTA_C=33;t.DELTA_S=34;t.WCL_TROUBLESHOOTING_INFO=35;t.SHARING_DATA_VIDEO_MODE=36;t.MOUSE_DATA_VIDEO_MODE=37;t.SHARING_DECODE_MESSAGE=38;t.VIDEO_ENCODED_DATA=39;t.VIDEO_DROP_RATIO_FROM_WCL=40;t.VIDEO_DATA_DROP_RATIO=41;t.AUDIO_ENCODED_DATA=42;t.THREAD_STATE_IDLE=43;t.THREAD_STATE_CREATING=44;t.THREAD_STATE_CREATED=45;t.THREAD_ENCODE_BUFFER=46;t.WASMPTR=47;t.Audio_Dec_WASM_FAILED=-1;t.Audio_Dec_Handle_FAILED=-2;t.Audio_Dec_WebSocket_FAILED=-3;t.Audio_Enc_WASM_FAILED=-4;t.Audio_Enc_Handle_FAILED=-5;t.Video_Dec_WASM_FAILED=-7;t.Video_Dec_Handle_FAILED=-8;t.Video_Dec_WebSocket_FAILED=-9;t.Video_Enc_WASM_FAILED=-10;t.Video_Enc_Handle_FAILED=-11;t.Sharing_Dec_WASM_FAILED=-12;t.Audio_Mute=-13;t.Sharing_Handle_FAILED=-14;t.Sharing_Dec_WebSocket_FAILED=-15;t.AUDIO_CLIPPING=-23;t.MULTIVIEW_WEBGL_CONTEXT_LOST=-26;t.MEDIA_VIDEO_REPORT_DROP_RATIO=100;t.MEDIA_AUDIO_DATA=1;t.MEDIA_AUDIO_RTCP=6;t.MEDIA_VIDEO_DATA=2;t.MEDIA_VIDEO_RTCP=7;t.VIDEO_CAPTURER_RESOLUTION_360P=10;t.VIDEO_CAPTURER_RESOLUTION_720P=11;t.CURRENT_VIDEO_RESOLUTION=50;t.VIDEO_RENDER_MONITOR_LOG=51;t.Sharing_Width_And_Height_Info=52;t.SHARING_RENDER_MONITOR_LOG=53;t.SHARING_GET_IMAGE_DATA_WRONG=54;t.AES_GCM_IV_TO_WASM=55;t.AES_GCM_IV_CALLBACK_FROM_WASM=56;t.CURRENT_SSRC_TIME=57;t.VIDEO_CAPTURER_RESOLUTION_CHANGE=66;t.CURRENT_CAPTURE_VIDEO_WIDTH_HEIGHT=67;t.CURRENT_DESKTOP_SHARING_WIDTH_HEIGHT=68;t.INTERPRETATION_ENABLE=0;t.INTERPRETATION_SET_LANG=1;t.INTERPRETATION_MUTE=2;t.INTERPRETATION_SET_INTERPRETER=3;t.serverHeartbeatMaxTimeoutSeconds=65;t.RQUEST_ANIMATION_MODE=0;t.SET_INTERVAL_MODE=1;t.VIDEO_INVALID=-1;t.VIDEO_RGBA=0;t.VIDEO_I420=1;t.VIDEO_NV12=2},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(29),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(15),i=n(2)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,n){n(84);for(var r=n(1),i=n(9),a=n(13),o=n(2)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u0?r:n)(e)}},function(e,t,n){var r=n(46)("keys"),i=n(32);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports=!0},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";var r=n(31),i=n(3),a=n(80),o=n(9),s=n(13),u=n(81),c=n(19),_=n(83),f=n(2)("iterator"),l=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,E,d,A,p){u(n,t,E);var v,b,T,S=function(e){if(!l&&e in O)return O[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},D=t+" Iterator",I="values"==d,y=!1,O=e.prototype,m=O[f]||O["@@iterator"]||d&&O[d],g=m||S(d),R=d?I?S("entries"):g:void 0,M="Array"==t&&O.entries||m;if(M&&(T=_(M.call(new e)))!==Object.prototype&&T.next&&(c(T,D,!0),r||"function"==typeof T[f]||o(T,f,h)),I&&m&&"values"!==m.name&&(y=!0,g=function(){return m.call(this)}),r&&!p||!l&&!y&&O[f]||o(O,f,g),s[t]=g,s[D]=h,d)if(v={values:I?g:S("values"),keys:A?g:S("keys"),entries:R},p)for(b in v)b in O||a(O,b,v[b]);else i(i.P+i.F*(l||y),t,v);return v}},function(e,t,n){var r=n(9);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){"use strict";var r=n(16);function i(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(15);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(76),i=n(47);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(25),i=n(2)("iterator"),a=n(13);e.exports=n(0).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,t,n){e.exports=n(86)},function(e,t,n){var r=n(4);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){e.exports=!n(5)&&!n(12)(function(){return 7!=Object.defineProperty(n(28)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(3),i=n(0),a=n(12);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*a(function(){n(1)}),"Object",o)}},function(e,t,n){e.exports=n(72)},function(e,t,n){e.exports=n(74)},function(e,t,n){var r=n(0),i=n(1),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(31)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(7),i=n(82),a=n(47),o=n(30)("IE_PROTO"),s=function(){},u=function(){var e,t=n(28)("iframe"),r=a.length;for(t.style.display="none",n(49).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("