PageSourceSearch

https://dstanza.transiti.net/9939.1f5c41c4f84de217.js

js transiti.net collected 2026-10-06 05:27:32 UTC 710,590 bytes, 1 lines download raw bytes

1(self.webpackChunkwebapp=self.webpackChunkwebapp||[]).push([[9939],{1336:(l,E,e)=>{"use strict";e.d(E,{g:()=>s});var t=e(5e3),r=e(7146),n=e(9808),i=e(4164);function o(a,c){if(1&a){const u=t.EpF();t.TgZ(0,"ui-button",1),t.NdJ("click",function(){return t.CHM(u),t.oxw().openVideocall()}),t._uU(1,"Avvia D-stanza"),t.qZA()}if(2&a){const u=t.oxw();t.Q6J("color",u.color)("fill",u.fill)("size",u.size)("block",u.block)("disabled",!u.canCall)}}let s=(()=>{class a{constructor(u){this.videocallService=u,this.color="primary",this.fill="solid",this.size="default",this.block=!1,this.callClosed=new t.vpe}ngOnInit(){this.canCall=this.appointment.canCall;const u=setInterval(()=>{this.canCall=this.appointment.canCall,this.canCall&&clearInterval(u)},3e4)}get width(){return this.block?100:null}openVideocall(){this.videocallService.open({appointment:this.appointment}).afterClosed$.subscribe(u=>{this.callClosed.emit(u)})}}return a.\u0275fac=function(u){return new(u||a)(t.Y36(r.N))},a.\u0275cmp=t.Xpm({type:a,selectors:[["lib-videocall-button"]],hostVars:2,hostBindings:function(u,d){2&u&&t.Udp("width",d.width,"%")},inputs:{appointment:"appointment",color:"color",fill:"fill",size:"size",block:"block"},outputs:{callClosed:"callClosed"},decls:1,vars:1,consts:[[3,"color","fill","size","block","disabled","click",4,"ngIf"],[3,"color","fill","size","block","disabled","click"]],template:function(u,d){1&u&&t.YNc(0,o,2,5,"ui-button",0),2&u&&t.Q6J("ngIf",d.appointment.showCallButton)},directives:[n.O5,i.r],styles:[""]}),a})()},9164:(l,E,e)=>{"use strict";e.d(E,{r:()=>g});var t=e(6786),r=e(2654),n=e(9251),i=e(1392),o=e(5e3),s=e(9665),a=e(2582),c=e(5525),u=e(7576);function d(v,m){if(1&v){const p=o.EpF();o.TgZ(0,"lib-videocall-setup",4),o.NdJ("close",function(){return o.CHM(p),o.oxw().ref.close()})("next",function(S){return o.CHM(p),o.oxw().step=S}),o.qZA()}if(2&v){const p=o.oxw();o.Q6J("appointment",p.appointment)}}function f(v,m){if(1&v){const p=o.EpF();o.TgZ(0,"lib-videocall-waiting",5),o.NdJ("next",function(){return o.CHM(p),o.oxw().step=3})("close",function(){return o.CHM(p),o.oxw().ref.close()}),o.qZA()}}function h(v,m){if(1&v){const p=o.EpF();o.TgZ(0,"lib-videocall-room",6),o.NdJ("sessionClosed",function(){return o.CHM(p),o.oxw().ref.close(!0)})("endCall",function(){return o.CHM(p),o.oxw().ref.close()}),o.qZA()}if(2&v){const p=o.oxw();o.Q6J("appointment",p.appointment)}}let g=(()=>{class v{constructor(p,y,S,T){this.ref=p,this.appointmentService=y,this.overlayService=S,this.userService=T,this.step=1,this.subscription=new r.w,this.ref.data&&(this.appointment=this.ref.data.appointment)}ngOnInit(){var p,y;this.isTherapist=this.userService.user instanceof t.$,this.isTherapist||((null===(p=this.appointment.patient)||void 0===p?void 0:p.roomState)===n.l7.ready?this.step=2:(null===(y=this.appointment.patient)||void 0===y?void 0:y.roomState)===n.l7.accepted&&(this.step=3)),this.subscription.add(this.appointmentService.videocallEvents$(this.appointment.id).subscribe(S=>{var T;if(S.event===i.o.APPOINTMENT_PATIENT_ACCEPTED&&S.data.patient.id===(null===(T=this.userService.user)||void 0===T?void 0:T.id)){const b=this.overlayService.info("Il terapeuta ti ha ammesso alla D-stanza!","Tra pochi secondi verrai redirezionato alla seduta, oppure clicca su OK per entrare subito.");b.afterClosed$.subscribe(()=>{this.step=3}),setTimeout(()=>{b.close()},5e3)}}))}ngOnDestroy(){this.subscription.unsubscribe()}}return v.\u0275fac=function(p){return new(p||v)(o.Y36(s.S),o.Y36(a.H),o.Y36(c.F),o.Y36(u.K))},v.\u0275cmp=o.Xpm({type:v,selectors:[["lib-videocall"]],decls:4,vars:3,consts:[[1,"fixed","top-0","right-0","bottom-0","left-0","bg-brand-100","overflow-y-auto"],[3,"appointment","close","next",4,"ngIf"],[3,"next","close",4,"ngIf"],[3,"appointment","sessionClosed","endCall",4,"ngIf"],[3,"appointment","close","next"],[3,"next","close"],[3,"appointment","sessionClosed","endCall"]],template:function(p,y){1&p&&(o.TgZ(0,"div",0),o.YNc(1,d,1,1,"lib-videocall-setup",1),o.YNc(2,f,1,0,"lib-videocall-waiting",2),o.YNc(3,h,1,1,"lib-videocall-room",3),o.qZA()),2&p&&(o.xp6(1),o.Q6J("ngIf",1===y.step),o.xp6(1),o.Q6J("ngIf",2===y.step),o.xp6(1),o.Q6J("ngIf",3===y.step))},styles:[""]}),v})()},7146:(l,E,e)=>{"use strict";e.d(E,{N:()=>v});var t=e(1314),r=e(9665),n=e(7429),i=e(9164),o=e(5e3),s=e(9808);function a(m,p){1&m&&o.GkF(0)}let c=(()=>{class m{constructor(y){this.ref=y}}return m.\u0275fac=function(y){return new(y||m)(o.Y36(r.S))},m.\u0275cmp=o.Xpm({type:m,selectors:[["lib-videocall-overlay"]],decls:2,vars:1,consts:[[1,"pointer-events-auto","bg-white","absolute","top-0","right-0","bottom-0","left-0","p-8"],[4,"ngComponentOutlet"]],template:function(y,S){1&y&&(o.TgZ(0,"div",0),o.YNc(1,a,1,0,"ng-container",1),o.qZA()),2&y&&(o.xp6(1),o.Q6J("ngComponentOutlet",S.ref.content))},directives:[s.$G],styles:[""]}),m})();
1var u=e(2382),d=e(7094),f=e(2916),h=e(5525),g=e(5008);let v=(()=>{class m{constructor(y,S,T,b,O){this.overlay=y,this.overlayService=S,this.snackbar=T,this.rollbar=b,this.injector=O}open(y){const S=new t.X_({hasBackdrop:!0,panelClass:["flex","items-center","justify-center","fixed","bottom-0","top-0","left-0","right-0","pointer-events-none"],backdropClass:["bg-black","bg-opacity-5"]}),T=this.overlay.create(S),b=new r.S(T,i.r,y),O=this.createInjector(b,this.injector);return 1===u.checkSystemRequirements()?T.attach(new n.C5(c,null,O)):this.overlayService.info("Videochiamata non supportata","Siamo spiacenti ma il tuo browser non supporta la videochiamata. Prova con un browser o sistema operativo differente."),b}createInjector(y,S){const T=new WeakMap([[r.S,y]]);return new n.nK(S,T)}setPublisher(y,S){return new f.y(T=>{const b=u.initPublisher(y.nativeElement,{height:"100%",width:"100%",insertMode:"append",showControls:!1,resolution:"1280x720",name:null==S?void 0:S.fullName,publishVideo:!this.videoDisabled,publishAudio:!this.audioDisabled},O=>{O?(this.rollbar.error("PUBLISHER:connect error",O.name,O.message),this.videoDisabled=!0,this.audioDisabled=!0,T.next(O.name)):T.next(b)})})}}return m.\u0275fac=function(y){return new(y||m)(o.LFG(t.aV),o.LFG(h.F),o.LFG(g.o),o.LFG(d.t2),o.LFG(o.zs3))},m.\u0275prov=o.Yz7({token:m,factory:m.\u0275fac}),m})()},2787:(l,E,e)=>{"use strict";e.d(E,{A:()=>a});var t=e(2654),r=e(5e3),n=e(6165),i=e(9808);function o(c,u){if(1&c&&(r.TgZ(0,"p",2),r._uU(1),r.qZA()),2&c){const d=u.$implicit;r.xp6(1),r.Oqu(d)}}function s(c,u){if(1&c&&(r.ynx(0),r.YNc(1,o,2,1,"p",1),r.BQk()),2&c){const d=r.oxw();r.xp6(1),r.Q6J("ngForOf",d.errors)}}let a=(()=>{class c{constructor(d){this.formErrorsService=d,this.subscription=new t.w}ngOnInit(){var d;this.control&&this.subscription.add(null===(d=this.control.statusChanges)||void 0===d?void 0:d.subscribe(()=>{this.errors=this.formErrorsService.getControlErrors(this.control)}))}ngOnDestroy(){this.subscription.unsubscribe()}}return c.\u0275fac=function(d){return new(d||c)(r.Y36(n.u))},c.\u0275cmp=r.Xpm({type:c,selectors:[["ui-form-errors"]],inputs:{control:"control"},decls:1,vars:1,consts:[[4,"ngIf"],["class","text-xs text-error-600 whitespace-nowrap",4,"ngFor","ngForOf"],[1,"text-xs","text-error-600","whitespace-nowrap"]],template:function(d,f){1&d&&r.YNc(0,s,2,1,"ng-container",0),2&d&&r.Q6J("ngIf",f.control&&f.control.dirty&&f.control.invalid)},directives:[i.O5,i.sg],styles:[""]}),c})()},6165:(l,E,e)=>{"use strict";e.d(E,{u:()=>i});var t=e(3075),r=e(5e3),n=e(5008);let i=(()=>{class o{constructor(a){this.snackbar=a,this.messages={required:"Campo obbligatorio",email:"Indirizzo email non valido",endTimeBeforeStart:"L'orario di fine non pu\xf2 essere minore di quello di inizio",startTimeBeforeEnd:"L'orario di inizio non pu\xf2 essere minore di quello di fine precedente"}}markAllAsTouched(a){a instanceof t.NI?(a.markAsDirty(),a.updateValueAndValidity()):Object.keys(a.controls).forEach(c=>{var u,d;null===(u=a.get(c))||void 0===u||u.markAsDirty(),null===(d=a.get(c))||void 0===d||d.updateValueAndValidity(),a.get(c)instanceof t.cw&&this.markAllAsTouched(a.get(c))})}setErrors(a,c){c.error?c.error.errors?Object.keys(c.error.errors).forEach(u=>{var d;const f={};c.error.errors[u].forEach(h=>f[h]=!0),a.get(u)?null===(d=a.get(u))||void 0===d||d.setErrors(f):this.snackbar.error(this.messages[c.error.errors[u][0]]||c.error.errors[u][0],"Errore")}):c.error.error&&this.snackbar.error(c.error.error,"Errore"):this.showMessage()}showMessage(){this.snackbar.error("Si \xe8 verificato un errore, si prega di riprovare.","Errore")}getControlErrors(a){return a.errors?Object.keys(a.errors).map(c=>this.messages[c]?this.messages[c]:c):[]}}return o.\u0275fac=function(a){return new(a||o)(r.LFG(n.o))},o.\u0275prov=r.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},1927:(l,E,e)=>{"use strict";e.d(E,{a:()=>g});var t=e(5e3),r=e(3075),n=e(9808),i=e(1072),o=e(2787);const s=["input"];function a(v,m){if(1&v&&(t.TgZ(0,"label",6),t._uU(1),t.qZA()),2&v){const p=t.oxw();t.xp6(1),t.Oqu(p.label)}}const c=function(v,m,p){return{"border-error-600":v,"border-grey-300":m,"pl-12":p}};function u(v,m){if(1&v){const p=t.EpF();t.TgZ(0,"input",7,8),t.NdJ("ngModelChange",function(S){return t.CHM(p),t.oxw().model=S})("ngModelChange",function(S){return t.CHM(p),t.oxw().onModelChange(S)}),t.qZA()}if(2&v){const p=t.oxw();t.Q6J("ngClass",t.kEZ(5,c,(null==p.ngControl?null:p.ngControl.dirty)&&(null==p.ngControl?null:p.ngControl.invalid),!(null!=p.ngControl&&p.ngControl.dirty&&null!=p.ngControl&&p.ngControl.invalid),p.icon))("type",p.type)("ngModel",p.model)("readonly",p.readonly)("placeholder",p.placeholder)}}const d=function(v,m,p,y){return{"border-error-600":v,"border-grey-300":m,"pl-12":p,"h-44":y}};function f(v,m){if(1&v){const p=t.EpF();t.TgZ(0,"textarea",9,8),t.NdJ("ngModelChange",function(S){return t.CHM(p),t.oxw().model=S})("ngModelChange",function(S){return t.CHM(p),t.oxw().onModelChange(S)}),t.qZA()}if(2&v){const p=t.oxw();t.Q6J("ngClass",t.l5B(5,d,(null==p.ngControl?null:p.ngControl.dirty)&&(null==p.ngControl?null:p.ngControl.invalid),!(null!=p.ngControl&&p.ngControl.dirty&&null!=p.ngControl&&p.ngControl.invalid),p.icon,!p.rows))("ngModel",p.model)("readonly",p.readonly)("placeholder",p.placeholder)("rows",p.rows)}}function h(v,m){if(1&v&&t._UZ(0,"svg-icon",10),2&v){const p=t.oxw();t.Q6J("key",p.icon)}}let g=(()=>{class v{constructor(p){this.ngControl=p,this.type="input",this.placeholder="",this.onChange=y=>{},this.onTouched=()=>{},p&&(p.valueAccessor=this)}ngOnInit(){}onModelChange(p){this.onChange(p)}registerOnChange(p){this.onChange=p}registerOnTouched(p){this.onTouched=p}writeValue(p){this.model=p}focus(){this.input.nativeElement.focus()}}return v.\u0275fac=function(p){return new(p||v)(t.Y36(r.a5,10))},v.\u0275cmp=t.Xpm({type:v,selectors:[["ui-input"]],viewQuery:function(p,y){if
1(1&p&&t.Gf(s,5),2&p){let S;t.iGM(S=t.CRH())&&(y.input=S.first)}},inputs:{type:"type",label:"label",icon:"icon",placeholder:"placeholder",readonly:"readonly",rows:"rows"},decls:6,vars:5,consts:[["class","font-medium text-grey-500 text-sm block mb-2.5",4,"ngIf"],[1,"relative"],["class","appearance-none h-11 border shadow w-full text-dark text-sm rounded px-3 leading-tight focus:outline-none placeholder-grey-500",3,"ngClass","type","ngModel","readonly","placeholder","ngModelChange",4,"ngIf"],["class","appearance-none border shadow w-full text-dark text-sm rounded p-3 focus:outline-none placeholder-grey-500",3,"ngClass","ngModel","readonly","placeholder","rows","ngModelChange",4,"ngIf"],["class","absolute top-2.5 left-3 text-grey-500",3,"key",4,"ngIf"],[1,"absolute",3,"control"],[1,"font-medium","text-grey-500","text-sm","block","mb-2.5"],[1,"appearance-none","h-11","border","shadow","w-full","text-dark","text-sm","rounded","px-3","leading-tight","focus:outline-none","placeholder-grey-500",3,"ngClass","type","ngModel","readonly","placeholder","ngModelChange"],["input",""],[1,"appearance-none","border","shadow","w-full","text-dark","text-sm","rounded","p-3","focus:outline-none","placeholder-grey-500",3,"ngClass","ngModel","readonly","placeholder","rows","ngModelChange"],[1,"absolute","top-2.5","left-3","text-grey-500",3,"key"]],template:function(p,y){1&p&&(t.YNc(0,a,2,1,"label",0),t.TgZ(1,"div",1),t.YNc(2,u,2,9,"input",2),t.YNc(3,f,2,10,"textarea",3),t.YNc(4,h,1,1,"svg-icon",4),t.qZA(),t._UZ(5,"ui-form-errors",5)),2&p&&(t.Q6J("ngIf",y.label),t.xp6(2),t.Q6J("ngIf","textarea"!==y.type),t.xp6(1),t.Q6J("ngIf","textarea"===y.type),t.xp6(1),t.Q6J("ngIf",y.icon),t.xp6(1),t.Q6J("control",y.ngControl))},directives:[n.O5,r.Fj,n.mk,r.JJ,r.On,i.bk,o.A],styles:["[_nghost-%COMP%]{display:block;position:relative}input[type=time][_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none}"]}),v})()},2382:module=>{var e;window,e=function(){return function(l){var E={};function e(t){if(E[t])return E[t].exports;var r=E[t]={i:t,l:!1,exports:{}};return l[t].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=l,e.c=E,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r||4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var i in t)e.d(n,i,function(o){return t[o]}.bind(null,i));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=323)}([function(l,E,e){(function(t){l.exports=function(){"use strict";function n(X){return"function"==typeof X}var o=Array.isArray?Array.isArray:function(X){return"[object Array]"===Object.prototype.toString.call(X)},s=0,a=void 0,c=void 0,u=function(te,le){C[s]=te,C[s+1]=le,2===(s+=2)&&(c?c(R):A())};var h="undefined"!=typeof window?window:void 0,g=h||{},v=g.MutationObserver||g.WebKitMutationObserver,m="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function O(){var X=setTimeout;return function(){return X(R,1)}}var C=new Array(1e3);function R(){for(var X=0;X<s;X+=2)(0,C[X])(C[X+1]),C[X]=void 0,C[X+1]=void 0;s=0}var A=void 0;function P(X,te){var le=this,be=new this.constructor(L);void 0===be[D]&&ve(be);var De=le._state;if(De){var he=arguments[De-1];u(function(){return se(De,be,he,le._result)})}else ie(le,be,X,te);return be}function x(X){if(X&&"object"==typeof X&&X.constructor===this)return X;var le=new this(L);return w(le,X),le}A=m?function y(){return function(){return t.nextTick(R)}}():v?function T(){var X=0,te=new v(R),le=document.createTextNode("");return te.observe(le,{characterData:!0}
1),function(){le.data=X=++X%2}}():p?function b(){var X=new MessageChannel;return X.port1.onmessage=R,function(){return X.port2.postMessage(0)}}():void 0===h?function I(){try{var X=Function("return this")().require("vertx");return a=X.runOnLoop||X.runOnContext,function S(){return void 0!==a?function(){a(R)}:O()}()}catch(te){return O()}}():O();var D=Math.random().toString(36).substring(2);function L(){}var N=void 0;function z(X,te,le){te.constructor===X.constructor&&le===P&&te.constructor.resolve===x?function F(X,te){1===te._state?W(X,te._result):2===te._state?Z(X,te._result):ie(te,void 0,function(le){return w(X,le)},function(le){return Z(X,le)})}(X,te):void 0===le?W(X,te):n(le)?function M(X,te,le){u(function(be){var De=!1,he=function j(X,te,le,be){try{X.call(te,le,be)}catch(De){return De}}(le,te,function(Ze){De||(De=!0,te!==Ze?w(be,Ze):W(be,Ze))},function(Ze){De||(De=!0,Z(be,Ze))});!De&&he&&(De=!0,Z(be,he))},X)}(X,te,le):W(X,te)}function w(X,te){if(X===te)Z(X,function V(){return new TypeError("You cannot resolve a promise with itself")}());else if(function r(X){var te=typeof X;return null!==X&&("object"===te||"function"===te)}(te)){var le=void 0;try{le=te.then}catch(be){return void Z(X,be)}z(X,te,le)}else W(X,te)}function k(X){X._onerror&&X._onerror(X._result),_(X)}function W(X,te){X._state===N&&(X._result=te,X._state=1,0!==X._subscribers.length&&u(_,X))}function Z(X,te){X._state===N&&(X._state=2,X._result=te,u(k,X))}function ie(X,te,le,be){var De=X._subscribers,he=De.length;X._onerror=null,De[he]=te,De[he+1]=le,De[he+2]=be,0===he&&X._state&&u(_,X)}function _(X){var te=X._subscribers,le=X._state;if(0!==te.length){for(var be=void 0,De=void 0,he=X._result,Ze=0;Ze<te.length;Ze+=3)De=te[Ze+le],(be=te[Ze])?se(le,be,De,he):De(he);X._subscribers.length=0}}function se(X,te,le,be){var De=n(le),he=void 0,Ze=void 0,ze=!0;if(De){try{he=le(be)}catch(tt){ze=!1,Ze=tt}if(te===he)return void Z(te,function H(){return new TypeError("A promises callback cannot return that same promise.")}())}else he=be;te._state!==N||(De&&ze?w(te,he):!1===ze?Z(te,Ze):1===X?W(te,he):2===X&&Z(te,he))}var ue=0;function ve(X){X[D]=ue++,X._state=void 0,X._result=void 0,X._subscribers=[]}var Me=function(){function X(te,le){this._instanceConstructor=te,this.promise=new te(L),this.promise[D]||ve(this.promise),o(le)?(this.length=le.length,this._remaining=le.length,this._result=new Array(this.length),0===this.length?W(this.promise,this._result):(this.length=this.length||0,this._enumerate(le),0===this._remaining&&W(this.promise,this._result))):Z(this.promise,function Re(){return new Error("Array Methods must be provided an Array")}())}return X.prototype._enumerate=function(le){for(var be=0;this._state===N&&be<le.length;be++)this._eachEntry(le[be],be)},X.prototype._eachEntry=function(le,be){var De=this._instanceConstructor,he=De.resolve;if(he===x){var Ze=void 0,ze=void 0,tt=!1;try{Ze=le.then}catch(Ne){tt=!0,ze=Ne}if(Ze===P&&le._state!==N)this._settledAt(le._state,be,le._result);else if("function"!=typeof Ze)this._remaining--,this._result[be]=le;else if(De===xe){var He=new De(L);tt?Z(He,ze):z(He,le,Ze),this._willSettleAt(He,be)}else this._willSettleAt(new De(function(Ne){return Ne(le)}),be)}else this._willSettleAt(he(le),be)},X.prototype._settledAt=function(le,be,De){var he=this.promise;he._state===N&&(this._remaining--,2===le?Z(he,De):this._result[be]=De),0===this._remaining&&W(he,this._result)},X.prototype._willSettleAt=function(le,be){var De=this;ie(le,void 0,function(he){return De._settledAt(1,be,he)},function(he){return De._settledAt(2,be,he)})},X}();var xe=function(){function X(te){this[D]=function me(){return ue++}(),this._result=this._state=void 0,this._subscribers=[],L!==te&&("function"!=typeof te&&function de(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof X?function pe(X,te){try{te(function(be){w(X,be)},function(be){Z(X,be)})}catch(le){Z(X,le)}}(this,te):function Oe(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
1onstructor cannot be called as a function.")}())}return X.prototype.catch=function(le){return this.then(null,le)},X.prototype.finally=function(le){var De=this.constructor;return n(le)?this.then(function(he){return De.resolve(le()).then(function(){return he})},function(he){return De.resolve(le()).then(function(){throw he})}):this.then(le,le)},X}();return xe.prototype.then=P,xe.all=function Q(X){return new Me(this,X).promise},xe.race=function K(X){var te=this;return o(X)?new te(function(le,be){for(var De=X.length,he=0;he<De;he++)te.resolve(X[he]).then(le,be)}):new te(function(le,be){return be(new TypeError("You must pass an array to race."))})},xe.resolve=x,xe.reject=function re(X){var le=new this(L);return Z(le,X),le},xe._setScheduler=function d(X){c=X},xe._setAsap=function f(X){u=X},xe._asap=u,xe.polyfill=function ke(){var X=void 0;if(void 0!==(void 0!==typeof window?window:global))X=void 0!==typeof window?window:global;else if("undefined"!=typeof self)X=self;else try{X=Function("return this")()}catch(be){throw new Error("polyfill failed because global object is unavailable in this environment")}var te=X.Promise;if(te){var le=null;try{le=Object.prototype.toString.call(te.resolve())}catch(be){}if("[object Promise]"===le&&!te.cast)return}X.Promise=xe},xe.Promise=xe,xe}()}).call(this,e(69))},function(l,E,e){"use strict";const t=e(391),r=e(190),n=e(119),i=r(o=>{const s={};return Object.keys(n).forEach(c=>{const u=n[c].method,d=t(`OpenTok:${o}:${c.toLowerCase()}`);d.log=console[u].bind(console),s[c.toLowerCase()]=d}),s});i.setLogLevel=o=>{let s;try{s=(void 0!==typeof window?window:global).localStorage.debug}catch(u){s=""}const c=[...Object.keys(n).map(u=>`${o>=n[u].priority?"":"-"}(autogen)?OpenTok:*:${u.toLowerCase()}`),...(s||"").split(/[\s,]/).filter(u=>-1===u.indexOf("(autogen)?"))].filter(u=>u).join(",");t.enable(c)},l.exports=i},function(l,E,e){"use strict";(function(t){var r,n,i,o,s;const a={version:-1,name:"unknown"},c=e(530),u=e(531),d=e(532),f=(null==(r=void 0!==typeof window?window:global)||null==(n=r.navigator)?void 0:n.userAgent.toLowerCase().indexOf("electron"))>=0;if("string"!=typeof(null==(i=void 0!==typeof window?window:global)||null==(o=i.process)||null==(s=o.versions)?void 0:s.node)||f){if(a.userAgent=(void 0!==typeof window?window:global).navigator.userAgent.toLowerCase(),a.name="unknown",a.userAgent.indexOf("opera")>-1||a.userAgent.indexOf("opr/")>-1)a.name="Opera",a.isOpera=!0,null!==/opr\/([0-9]{1,}[.0-9]{0,})/.exec(a.userAgent)&&(a.version=parseFloat(RegExp.$1));else if(a.userAgent.indexOf("firefox")>-1)a.name="Firefox",a.isFirefox=!0,null!==/firefox\/([0-9]{1,}[.0-9]{0,})/.exec(a.userAgent)&&(a.version=parseFloat(RegExp.$1));else if(a.userAgent.match(/edge?\/(\d+)(?:\.\d+)+$/)){a.name="Edge",a.isEdge=!0;const h=RegExp.$1;a.version=parseInt(h,10)}else a.userAgent.indexOf("chrome")>-1?(a.name="Chrome",a.isElectron=f,a.isElectron?a.electronVersion=d((void 0!==typeof window?window:global).navigator.userAgent):a.isChrome=!0,null!==/chrome\/([0-9]{1,}[.0-9]{0,})/.exec(a.userAgent)&&(a.version=parseFloat(RegExp.$1))):(void 0!==typeof window?window:global).navigator.vendor&&(void 0!==typeof window?window:global).navigator.vendor.toLowerCase().indexOf("apple")>-1?(a.name="Safari",a.isSafari=!0,a.isiOS=c(),a.isiOS&&(a.iOSVersion=parseFloat(u())),(null!==/version\/([0-9]{1,}[.0-9]{0,})/.exec(a.userAgent)||null!==/fxios\/([0-9]{1,}[.0-9]{0,})/.exec(a.userAgent)||null!==/crios\/([0-9]{1,}[.0-9]{0,})/.exec(a.userAgent))&&(a.version=parseFloat(RegExp.$1))):a.userAgent.indexOf("applewebkit")>-1&&-1===a.userAgent.indexOf("version")&&(a.isIosWebView=!0);a.isChromiumEdge="Edge"===a.name&&a.version>=79,a.isLegacyEdge="Edge"===a.name&&a.version<79,a.isLegacyElectron=a.isElectron&&a.electronVersion<2,a.isAndroid=a.userAgent.indexOf("android")>-1,a.userAgent=(void 0!==typeof window?window:global).navigator.userAgent,a.protocol=(void 0!==typeof window?window:global).location.protocol,a.hostName=(void 0!==typeof window?window:global).location.hostName,(-1===a.version||"unknown"===a.name||a.isiOS&&!a.iOSVersion)&&(a.error=!0)}else a.name="Node",a.isNode=!0,a.version=parseInt(t.versions.node,10),a.userAgent=`${a.name} ${a.version}`;l.exports=a}).call(this,e(69))},function(l,E){l.exports=function e(t){return t&&t.__esModule?t:{default:t}}},function(l,E,e){"use strict";l.exports={AUTHENTICATION_ERROR:"OT_AUTHENTICATION_ERROR",BADLY_FORMED_RESPONSE:"OT_BADLY_FORMED_RESPONSE",CHROME_MICROPHONE_ACQUISITION_ERROR:"OT_CHROME_MICROPHONE_ACQUISITION_ERROR",CONNECT_FAILED:"OT_CONNECT_FAILED",CONNECTION_LIMIT_EXCEEDED:"OT_CONNECTION_LIMIT_EXCEEDED",CONSTRAINTS_NOT_SATISFIED:"OT_CONSTRAINTS_NOT_SATISFIED",CREATE_PEER_CONNECTION_FAILED:"OT_CREATE_PEER_CONNECTION_FAILED",DISCONNECTED:"OT_DISCONNECTED",EMPTY_RESPONSE_BODY:"OT_EMPTY_RESPONSE_BODY",GET_RTC_STATS_REPORT_NOT_SUPPORTED:"OT_GET_RTC_STATS_REPORT_NOT_SUPPORTED",HARDWARE_UNAVAILABLE:"OT_HARDWARE_UNAVAILABLE",ICE_WORKFLOW_FAILED:"OT_ICE_WORKFLOW_FAILED",INVALID_HTTP_STATUS:"OT_INVALID_HTTP_STATUS",INVALID_PARAMETER:"OT_INVALID_PARAMETER",INVALID_SESSION_ID:"OT_INVALID_SESSION_ID",MEDIA_ERR_ABORTED:"OT_MEDIA_ERR_ABORTED",MEDIA_ERR_DECODE:"OT_MEDIA_ERR_DECODE",MEDIA_ERR_NETWORK:"OT_MEDIA_ERR_NETWORK",MEDIA_ERR_SRC_NOT_SUPPORTED:"OT_MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ENDED:"OT_MEDIA_ENDED",NO_DEVICES_FOUND:"OT_NO_DEVICES_FOUND",NO_VALID_CONSTRAINTS:"OT_NO_VALID_CONSTRAINTS",NOT_CONNECTED:"OT_NOT_CONNECTED",NOT_FOUND:"OT_NOT_FOUND",NOT_SUPPORTED:"OT_NOT_SUPPORTED",PEER_CONNECTION_NOT_CONNECTED:"OT_PEER_CONNECTION_NOT_CONNECTED",PERMISSION_DENIED:"OT_PERMISSION_DENIED",RATE_LIMIT_EXCEEDED:"OT_RATE_LIMIT_EXCEEDED",REPORT_ISSUE_FAILED:"OT_REPORT_ISSUE_FAILED",SCREEN_SHARING_EXTENSION_NOT_INSTALLED:"OT_SCREEN_SHARING_EXTENSION_NOT_INSTALLED",SCREEN_SHARING_EXTENSION_NOT_REGISTERED:"OT_SCREEN_SHARING_EXTENSION_NOT_REGISTERED",SCREEN_SHARING_NOT_SUPPORTED:"OT_SCREEN_SHARING_NOT_SUPPORTED",SET_REMOTE_DESCRIPTION_FAILED:"OT_SET_REMOTE_DESCRIPTION_FAILED",SOCKET_ALREADY_CONNECTED_CONNECTING:"OT_SOCKET_ALREADY_CONNECTED_CONNECTING",SOCKET_CLOSE_ABNORMAL:"OT_SOCKET_CLOSE_ABNORMAL",SOCKET_CLOSE_CONNECT_EXCEPTION:"OT_SOCKET_CLOSE_CONNECT_EXCEPTION",SOCKET_CLOSE_CONNECTIVITY_LOSS:"OT_SOCKET_CLOSE_CONNECTIVITY_LOSS",SOCKET_CLOSE_FA
1LLBACK_CODE:"OT_SOCKET_CLOSE_FALLBACK_CODE",SOCKET_CLOSE_INCONSISTENT_DATA:"OT_SOCKET_CLOSE_INCONSISTENT_DATA",SOCKET_CLOSE_NO_STATUS:"OT_SOCKET_CLOSE_NO_STATUS",SOCKET_CLOSE_POLICY_VIOLATION:"OT_SOCKET_CLOSE_POLICY_VIOLATION",SOCKET_CLOSE_GOING_AWAY:"OT_SOCKET_CLOSE_GOING_AWAY",SOCKET_CLOSE_PROTOCOL_ERROR:"OT_SOCKET_CLOSE_PROTOCOL_ERROR",SOCKET_CLOSE_TIMEOUT:"OT_SOCKET_CLOSE_TIMEOUT",SOCKET_CLOSE_TOO_LARGE:"OT_SOCKET_CLOSE_TOO_LARGE",SOCKET_CLOSE_UNEXPECTED_CONDITION:"OT_SOCKET_CLOSE_UNEXPECTED_CONDITION",SOCKET_CLOSE_UNSUPPORTED:"OT_SOCKET_CLOSE_UNSUPPORTED",STREAM_CREATE_FAILED:"OT_STREAM_CREATE_FAILED",STREAM_DESTROYED:"OT_STREAM_DESTROYED",STREAM_LIMIT_EXCEEDED:"OT_STREAM_LIMIT_EXCEEDED",STREAM_NOT_FOUND:"OT_STREAM_NOT_FOUND",UNABLE_TO_SUBSCRIBE:"OT_UNABLE_TO_SUBSCRIBE",TERMS_OF_SERVICE_FAILURE:"OT_TERMS_OF_SERVICE_FAILURE",TIMEOUT:"OT_TIMEOUT",CANCEL:"OT_CANCEL",UNABLE_TO_CAPTURE_MEDIA:"OT_UNABLE_TO_CAPTURE_MEDIA",UNABLE_TO_CAPTURE_SCREEN:"OT_UNABLE_TO_CAPTURE_SCREEN",UNEXPECTED_ERROR_CODE:"OT_UNEXPECTED_ERROR_CODE",UNEXPECTED_HTTP_STATUS:"OT_UNEXPECTED_HTTP_STATUS",UNEXPECTED_SERVER_RESPONSE:"OT_UNEXPECTED_SERVER_RESPONSE",UNKNOWN_HTTP_ERROR:"OT_UNKNOWN_HTTP_ERROR",UNSUPPORTED_BROWSER:"OT_UNSUPPORTED_BROWSER",USER_MEDIA_ACCESS_DENIED:"OT_USER_MEDIA_ACCESS_DENIED",XDOMAIN_OR_PARSING_ERROR:"OT_XDOMAIN_OR_PARSING_ERROR",API_KEY_DISABLED:"OT_API_KEY_DISABLED",UNABLE_TO_ACCESS_MEDIA_ENGINE:"OT_UNABLE_TO_ACCESS_MEDIA_ENGINE",SET_PROXY_URL_TIMING_ERROR:"OT_SET_PROXY_URL_TIMING_ERROR",PROXY_URL_ALREADY_SET_ERROR:"OT_PROXY_URL_ALREADY_SET_ERROR",SET_VIDEO_SOURCE_FAILURE:"OT_SET_VIDEO_SOURCE_FAILURE",INVALID_VIDEO_SOURCE:"OT_INVALID_VIDEO_SOURCE",REQUESTED_DEVICE_PERMISSION_DENIED:"OT_REQUESTED_DEVICE_PERMISSION_DENIED",INVALID_AUDIO_OUTPUT_SOURCE:"OT_INVALID_AUDIO_OUTPUT_SOURCE"}},function(l,E,e){"use strict";const t=e(245),r=e(249),n=e(6),i=e(1);t.logging=i("OT.$"),t.ElementCollection=e(246),t.env=e(2),t.ajax=e(244),t.statable=e(538),t.Analytics=e(243),t.Collection=e(248),t.domExtras=e(539),t.Error=e(250),r(t,"useLogHelpers",{value(o){const s=i("useLogHelpersDeprecatedMixin");return Object.keys(s).forEach(a=>{o[a]=s[a]}),o},name:"OT.useLogHelpers",getWarning:"Please use an external library for your debugging needs"}),t.defaults=e(140),r(t,"eventing",{value:n,name:"OT.$.eventing",getWarning:"Please use an external library to create an event emitter."}),Object.keys(t).forEach(o=>{const a=t[o]._attachToOTHelpers||{};Object.keys(a).forEach(c=>{Object.hasOwnProperty.call(t,c)&&!("util"===o&&"bind"===c)&&console.warn(`More than one module is trying to define ${c} on OTHelpers.`),t[c]=a[c]})}),l.exports=t},function(l,E,e){"use strict";const t=e(41),r=e(15),n=e(1)("Events"),i=e(7),o=e(396);l.exports=function(a){const c=new t;return c.on("newListener",d=>{c.emit(`${d}:added`)}),c.on("removeListener",d=>{c.emit(`${d}:removed`)}),i(a,{on(d,f,h){return"string"==typeof d&&f?d.split(" ").forEach(g=>{c.on(g,o(f,h))}):Object.keys(d).forEach(g=>{c.on(g,o(d[g],f))}),this},off(d,f,h){return"string"==typeof d?this.off(d.split(" "),f,h):Array.isArray(d)?d.forEach(g=>{f&&r(f)?c.removeListener(g,o(f,h)):c.removeAllListeners(g)}):d?Object.keys(d).forEach(g=>{c.removeListener(g,o(d[g],f))}):c.removeAllListeners(),this},once(d,f,h){return"string"==typeof d&&f?d.split(" ").forEach(g=>{c.once(g,o(f,h))}):Object.keys(d).forEach(g=>{c.once(g,o(d[g],f))}),this},dispatchEvent(d){if(!d.type)throw new Error("dispatchEvent: Event has no type");return d.target||(d.target=this),this.trigger(d.type,d),this},trigger(d){try{for(var f=arguments.length,h=new Array(f>1?f-1:0),g=1;g<f;g++)h[g-1]=arguments[g];c.emit(d,...h)}catch(v){n.error("An error occurred in an event handler",v)}return this},emit(){return a.trigger(...arguments)},addEventListener:(d,f,h)=>(n.warn("The addEventListener() method is deprecated. Use on() or once() instead."),a.on(d,f,h)),removeEventListener:(d,f,h)=>(n.warn("The removeEventListener() method is deprecated. Use off() instead."),a.off(d,f,h)),listenerCount:d=>c.listenerCount(d)})}},function(l,E,e){var t=e(83),r=e(39),n=e(191),i=e(24),o=e(68),s=e(30),c=Object.prototype.hasOwnProperty,u=n(function(d,f){if(o(f)||i(f))r(f,s(f),d);else for(var h in f)c.call(f,h)&&t(d,h,f[h])});l.exports=u},function(l,E,e){"use strict";l.exports={JS_EXCEPTION:2e3,AUTHENTICATION_ERROR:1004,INVALID_SESSION_ID:1005,CONNECT_FAILED:1006,CONNECT_REJECTED:1007,CONNECTION_TIMEOUT:1008,NOT_CONNECTED:1010,INVALID_PARAMETER:1011,P2P_CONNECTION_FAILED:1013,API_RESPONSE_FAILURE:1014,PEER_CONNECTION_NOT_CONNECTED:1015,TERMS_OF_SERVICE_FAILURE:1026,CONNECTION_LIMIT_EXCEEDED:1027,UNABLE_TO_PUBLISH:1500,UNABLE_TO_SUBSCRIBE:1
1501,UNSUPPORTED_VIDEO_CODEC:1502,UNABLE_TO_FORCE_DISCONNECT:1520,UNABLE_TO_FORCE_UNPUBLISH:1530,UNABLE_TO_FORCE_MUTE:1540,PUBLISHER_ICE_WORKFLOW_FAILED:1553,SUBSCRIBER_ICE_WORKFLOW_FAILED:1554,STREAM_LIMIT_EXCEEDED:1605,UNEXPECTED_SERVER_RESPONSE:2001,REPORT_ISSUE_ERROR:2011,SET_PROXY_URL_TIMING_ERROR:2021,PROXY_URL_ALREADY_SET_ERROR:2022,GET_RTC_STATS_REPORT_NOT_SUPPORTED:2031,ANVIL_BADLY_FORMED_RESPONSE:3001,ANVIL_INVALID_HTTP_STATUS:3002,ANVIL_XDOMAIN_OR_PARSING_ERROR:3003,ANVIL_UNKNOWN_HTTP_ERROR:3004,ANVIL_UNEXPECTED_ERROR_CODE:3005,ANVIL_EMPTY_RESPONSE_BODY:3006,ANVIL_CONNECT_FAILED:3007,UNABLE_TO_ACCESS_MEDIA_ENGINE:5001}},function(l,E){l.exports=function e(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}},function(l,E){l.exports=Array.isArray},function(l,E,e){"use strict";l.exports=function(r){void 0===r&&(r={});const n=r.Errors||e(4),i=r.OTErrorClass||e(21),o=Object.keys(n).map(s=>n[s]);return function(a,c,u){if(-1===o.indexOf(a))return new Error(`Attempt to use invalid error name (${a}). Original message: ${c.message}`);if(!(c instanceof Error||/^\[object .*Error\]$/.test(Object.prototype.toString.call(c))))return new Error(`Did not pass Error as second argument: ${c}`);const d=new i(void 0,c.message);if(d.name=a,!c.stack)try{throw c}catch(f){}return d.stack=c.stack,u&&(d.code=u),d}}},function(l,E,e){l.exports=e(600)},function(l,E,e){(function(t){function r(i,o,s,a,c,u,d){try{var f=i[u](d),h=f.value}catch(g){return void s(g)}f.done?o(h):t.resolve(h).then(a,c)}l.exports=function n(i){return function(){var o=this,s=arguments;return new t(function(a,c){var u=i.apply(o,s);function d(h){r(u,a,c,d,f,"next",h)}function f(h){r(u,a,c,d,f,"throw",h)}d(void 0)})}}}).call(this,e(0))},function(l,E,e){var t=e(173),r="object"==typeof self&&self&&self.Object===Object&&self,n=t||r||Function("return this")();l.exports=n},function(l,E,e){var t=e(29),r=e(9);l.exports=function a(c){if(!r(c))return!1;var u=t(c);return"[object Function]"==u||"[object GeneratorFunction]"==u||"[object AsyncFunction]"==u||"[object Proxy]"==u}},function(l,E){l.exports=function e(t){return null!=t&&"object"==typeof t}},function(l,E,e){"use strict";var t=e(207),r=Object.prototype.toString;function n(A){return"[object Array]"===r.call(A)}function i(A){return void 0===A}function f(A){return null!==A&&"object"==typeof A}function h(A){if("[object Object]"!==r.call(A))return!1;var P=Object.getPrototypeOf(A);return null===P||P===Object.prototype}function p(A){return"[object Function]"===r.call(A)}function O(A,P){if(null!=A)if("object"!=typeof A&&(A=[A]),n(A))for(var x=0,D=A.length;x<D;x++)P.call(null,A[x],x,A);else for(var L in A)Object.prototype.hasOwnProperty.call(A,L)&&P.call(null,A[L],L,A)}l.exports={isArray:n,isArrayBuffer:function s(A){return"[object ArrayBuffer]"===r.call(A)},isBuffer:function o(A){return null!==A&&!i(A)&&null!==A.constructor&&!i(A.constructor)&&"function"==typeof A.constructor.isBuffer&&A.constructor.isBuffer(A)},isFormData:function a(A){return"undefined"!=typeof FormData&&A instanceof FormData},isArrayBufferView:function c(A){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(A):A&&A.buffer&&A.buffer instanceof ArrayBuffer},isString:function u(A){return"string"==typeof A},isNumber:function d(A){return"number"==typeof A},isObject:f,isPlainObject:h,isUndefined:i,isDate:function g(A){return"[object Date]"===r.call(A)},isFile:function v(A){return"[object File]"===r.call(A)},isBlob:function m(A){return"[object Blob]"===r.call(A)},isFunction:p,isStream:function y(A){return f(A)&&p(A.pipe)},isURLSearchParams:function S(A){return"undefined"!=typeof URLSearchParams&&A instanceof URLSearchParams},isStandardBrowserEnv:function b(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:O,merge:function C(){var A={};function P(L,N){A[N]=h(A[N])&&h(L)?C(A[N],L):h(L)?C({},L):n(L)?L.slice():L}for(var x=0,D=arguments.length;x<D;x++)O(arguments[x],P);return A},extend:function R(A,P,x){return O(P,function(L,N){A[N]=x&&"function"==typeof L?t(L,x):L}
1),A},trim:function T(A){return A.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function I(A){return 65279===A.charCodeAt(0)&&(A=A.slice(1)),A}}},function(l,E){l.exports=function e(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}},function(l,E,e){var t=e(525),r=e(526),n=r;n.v1=t,n.v4=r,l.exports=n},function(l,E,e){"use strict";const t=e(248),r={publishers:new t("guid"),subscribers:new t("widgetId"),sessions:new t};l.exports=r},function(l,E,e){"use strict";const t=e(1)("GlobalExceptionHandler"),r=e(6),n=e(26),i=e(537),o=e(22)(),s=function(c,u){Error.call(this),this.code=c,this.message=u};(s.prototype=Object.create(Error.prototype)).constructor=s,l.exports=s,r(s),s.getTitleByCode=function(a){return i[+a]},s.handleJsException=a=>{let c=a.error,u=a.errorMsg,d=a.code,f=a.target,h=a.analytics;if(!f)throw new Error("handleJsException requires target");const g=()=>void 0!==d?d:c&&c.code,v=()=>void 0!==u?u:c&&c.message,m=s.getTitleByCode(g());t.error(`OT.exception :: title: ${m} (${g()}) msg: ${v()}`);try{const p={partnerId:f.session?f.session.apiKey:f.apiKey,sessionId:f.session?f.session.sessionId:f.sessionId};h.logError(g(),"tb.exception",m,{details:v()},p);const y=new o.ExceptionEvent(n.EXCEPTION,v(),m,g(),f,f,c);if(c)y.stack=c.stack;else try{throw new Error}catch(S){y.stack=S.stack}s.dispatchEvent(y)}catch(p){t.error(`OT.exception :: Failed to dispatch exception - ${p.toString()}`)}}},function(l,E,e){"use strict";var t=e(3),r=t(e(45)),n=t(e(59));const i=e(126),o=e(26);l.exports=function(a){void 0===a&&(a={});const c=a.logging||e(1)("Events"),u={ExceptionEvent:function(p,y,S,T,b,O,C){return new i(p,!1,{error:C,message:y,title:S,code:T,component:b,target:O})},IssueReportedEvent:function(p,y){return new i(p,!1,{issueId:y})},EnvLoadedEvent:function(p){return new i(p,!1)}};let d=!1;u.ConnectionEvent=function(m){function p(y,S,T){return m.call(this,y,!1,{connection:S,reason:T})||this}return(0,n.default)(p,m),(0,r.default)(p,[{key:"connections",get:function(){return d||(c.warn("OT.ConnectionEvent connections property is deprecated, use connection instead."),d=!0),[this.connection]}}]),p}(i);let f=!1;u.StreamEvent=function(m){function p(y,S,T,b){return m.call(this,y,b,{stream:S,reason:T})||this}return(0,n.default)(p,m),(0,r.default)(p,[{key:"streams",get:function(){return f||(c.warn("OT.StreamEvent streams property is deprecated, use stream instead."),f=!0),[this.stream]}}]),p}(i);let h=!1,g=!1,v=!1;return u.SessionConnectEvent=function(m){function p(y){return m.call(this,y,!1)||this}return(0,n.default)(p,m),(0,r.default)(p,[{key:"connections",get:function(){return h||(c.warn("OT.SessionConnectedEvent no longer includes connections. Listen for connectionCreated events instead."),h=!0),[]}},{key:"streams",get:function(){return g||(c.warn("OT.SessionConnectedEvent no longer includes streams. Listen for streamCreated events instead."),g=!0),[]}},{key:"archives",get:function(){return v||(c.warn("OT.SessionConnectedEvent no longer includes archives. Listen for archiveStarted events instead."),v=!0),[]}}]),p}(i),u.SessionReconnectingEvent=function(){return new i(o.SESSION_RECONNECTING,!1)},u.SessionReconnectedEvent=function(){return new i(o.SESSION_RECONNECTED)},u.SessionDisconnectEvent=function(p,y,S){return new i(p,S,{reason:y})},u.StreamPropertyChangedEvent=function(p,y,S,T,b){return new i(p,!1,{stream:y,changedProperty:S,oldValue:T,newValue:b})},u.VideoDimensionsChangedEvent=function(p,y,S){return new i("videoDimensionsChanged",!1,{target:p,oldValue:y,newValue:S})},u.ArchiveEvent=function(p,y){return new i(p,!1,{id:y.id,name:y.name,status:y.status,archive:y})},u.ArchiveUpdatedEvent=function(p,y,S,T){return new i("updated",!1,{target:p,changedProperty:y,oldValue:S,newValue:T})},u.SignalEvent=function(p,y,S){return new i(p?`signal:${p}`:o.SIGNAL,!1,{data:y,from:S})},u.StreamUpdatedEvent=function(p,y,S,T){return new i("updated",!1,{target:p,changedProperty:y,oldValue:S,newValue:T})},u.DestroyedEvent=function(p,y,S){return new i(p,!1,{target:y,reason:S})},u.ConnectionStateChangedEvent=function(p,y){return new i(p,!1,{target:y})},u.VideoEnabledChangedEvent=function(p,y){return new i(p,!1,{reason:y.reason})},u.VideoDisableWarningEvent=function(p){return new i(p,!1)},u.AudioLevelUpdatedEvent=function(p){return new i(o.AUDIO_LEVEL_UPDATED,!1,{audioLevel:p})},u.MediaStoppedEvent=function(p,y){return new i(o.MEDIA_STOPPED,!0,{target:p,track:y})},u.MuteForcedEvent=function(p){return new i(o.MUTE_FORCED,!1,p)},u.VideoElementCreatedEvent=function(p){return new i(o.VIDEO_ELEMENT_CREATED,!1,{element:p})},u}},function(l,E,e){"use strict";(function(t){var r=e(3),n=r(e(12)),i=r(e(13));l.exports=function(o){void 0===o&&(o={});const s=o.getNativeEnumerateDevices||e(286)(),a=o.getNativeMediaDevices||e(624)(),u=(o.currentAudioOutputDevice||e(105)).getCurrentAudioOutputDeviceId,d=o.env||e(2),f=o.global||(void 0!==typeof window?window:global),h={},g={audio:"audioInput",video:"videoInput",audioinput:"audioInput",videoinput:"videoInput",audiooutput:"audioOutput",audio
1Input:"audioInput",videoInput:"videoInput",audioOutput:"audioOutput"};return h.getNativeMediaDevices=()=>a(),h.hasEnumerateDevicesCapability=()=>"function"==typeof s(),h.hasDeviceChangeCapability=()=>{const m=a();return!(!m||!("ondevicechange"in m))},h.hasSetSinkIdCapability=()=>"setSinkId"in(null==f?void 0:f.HTMLMediaElement.prototype),h.hasAudioOutputApiSupport=()=>h.hasSetSinkIdCapability()&&h.hasDeviceChangeCapability(),h.hasEnumerateDevicesBug=()=>d.isSafari&&13.1===d.version,h.getMediaDevices=()=>h.hasEnumerateDevicesCapability()?s()().then(m=>m.map(p=>({deviceId:p.deviceId||p.id,label:p.label,kind:g[p.kind]}))):t.reject(new Error("This browser does not support enumerateDevices APIs")),h.getInputMediaDevices=()=>h.getMediaDevices().then(m=>m.filter(p=>/^(audio|video)Input$/.test(p.kind))),h.getAudioOutputMediaDevices=()=>h.getMediaDevices().then(m=>m.filter(p=>"audioOutput"===p.kind).map(p=>({deviceId:p.deviceId,label:p.label}))),h.shouldAskForDevices=()=>h.hasEnumerateDevicesCapability()?h.getInputMediaDevices().then(m=>{if(0===m.length)return{video:!0,audio:!0};const p=m.filter(S=>"audioInput"===S.kind),y=m.filter(S=>"videoInput"===S.kind);return h.hasEnumerateDevicesBug()&&0===y.length?{audio:!0,video:!0}:{video:y.length>0,audio:p.length>0,videoDevices:y,audioDevices:p}}).catch(()=>({video:!0,audio:!0})):t.resolve({video:!0,audio:!0}),h.getDefaultAudioOutputDeviceId=m=>Array.isArray(m)&&0!==m.length?(m.find(S=>"default"===S.deviceId)||m[0]).deviceId:"",h.hasDevice=(m,p)=>{let y=m;return Array.isArray(y)||(y=[]),y.some(S=>S.deviceId===p)},h.getActiveAudioOutputDevice=(0,i.default)(n.default.mark(function m(){var p,y,S;return n.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.prev=0,b.next=3,h.getAudioOutputMediaDevices();case 3:p=b.sent,b.next=9;break;case 6:throw b.prev=6,b.t0=b.catch(0),b.t0;case 9:if(0!==p.length){b.next=11;break}return b.abrupt("return",{deviceId:null,label:null});case 11:return(y=p.find(O=>O.deviceId===u()))||(S=h.getDefaultAudioOutputDeviceId(p),y=p.find(O=>O.deviceId===S)),b.abrupt("return",y);case 14:case"end":return b.stop()}},m,null,[[0,6]])})),h}}).call(this,e(0))},function(l,E,e){var t=e(15),r=e(112);l.exports=function n(i){return null!=i&&r(i.length)&&!t(i)}},function(l,E){function e(){return l.exports=e=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},e.apply(this,arguments)}l.exports=e},function(l,E,e){"use strict";l.exports={ACTIVE:"active",INACTIVE:"inactive",UNKNOWN:"unknown",PER_SESSION:"perSession",PER_STREAM:"perStream",EXCEPTION:"exception",ISSUE_REPORTED:"issueReported",SESSION_CONNECTED:"sessionConnected",SESSION_RECONNECTING:"sessionReconnecting",SESSION_RECONNECTED:"sessionReconnected",SESSION_DISCONNECTED:"sessionDisconnected",STREAM_CREATED:"streamCreated",STREAM_DESTROYED:"streamDestroyed",CONNECTION_CREATED:"connectionCreated",CONNECTION_DESTROYED:"connectionDestroyed",SIGNAL:"signal",STREAM_PROPERTY_CHANGED:"streamPropertyChanged",MICROPHONE_LEVEL_CHANGED:"microphoneLevelChanged",RESIZE:"resize",SETTINGS_BUTTON_CLICK:"settingsButtonClick",DEVICE_INACTIVE:"deviceInactive",INVA
1LID_DEVICE_NAME:"invalidDeviceName",ACCESS_ALLOWED:"accessAllowed",ACCESS_DENIED:"accessDenied",ACCESS_DIALOG_OPENED:"accessDialogOpened",ACCESS_DIALOG_CLOSED:"accessDialogClosed",ECHO_CANCELLATION_MODE_CHANGED:"echoCancellationModeChanged",MEDIA_STOPPED:"mediaStopped",PUBLISHER_DESTROYED:"destroyed",MUTE_FORCED:"muteForced",SUBSCRIBER_DESTROYED:"destroyed",SUBSCRIBER_CONNECTED:"connected",SUBSCRIBER_DISCONNECTED:"disconnected",DEVICES_DETECTED:"devicesDetected",DEVICES_SELECTED:"devicesSelected",CLOSE_BUTTON_CLICK:"closeButtonClick",MICLEVEL:"microphoneActivityLevel",MICGAINCHANGED:"microphoneGainChanged",ENV_LOADED:"envLoaded",ENV_UNLOADED:"envUnloaded",AUDIO_LEVEL_UPDATED:"audioLevelUpdated",VIDEO_ELEMENT_CREATED:"videoElementCreated"}},function(l,E,e){"use strict";var t=e(3),r=t(e(25)),n=t(e(45)),i=t(e(18));const o=e(240),s=e(243),a=e(141),c=e(44)(),u=e(6),d=e(540);let h=function(){function g(m){let p=void 0===m?{}:m,y=p.staticConfig,S=void 0===y?c.onlyLocal():y,T=p.sessionInfo,b=void 0===T?new a:T,O=p.ajax,C=p.queue;(0,i.default)(this,"getTurnServerName",R=>{let I,A;return R&&"object"==typeof R?((Array.isArray(R)?R:[R]).forEach(x=>{const D=x.urls||x.url;(Array.isArray(D)?D:[D]).forEach(N=>{const U=N.indexOf(":")+1,B=N.lastIndexOf(":");N.includes("turns")?A=N.substring(U,B):I=N.substring(U,B)})}),A||I):I}),this.ajax=O,this.queue=C,this.sessionInfo=b,this.staticConfig=S}var v=g.prototype;return v._getCommon=function(){return{clientVersion:this.staticConfig.clientVersion,buildHash:this.staticConfig.buildHash,source:(void 0!==typeof window?window:global).location&&(void 0!==typeof window?window:global).location.href,logVersion:"2",apiServer:this.staticConfig.apiUrl,clientSystemTime:(new Date).getTime(),sessionId:this.sessionInfo.sessionId,mediaServerName:this.sessionInfo.mediaServerName,relayServer:this.getTurnServerName(this.sessionInfo.iceServers),p2p:this.sessionInfo.p2pEnabled,messagingServer:this.sessionInfo.messagingServer,messagingUrl:this.sessionInfo.messagingURL,version:this.staticConfig.version,partnerId:this.sessionInfo.partnerId}},v.logError=function(p,y,S,T,b){void 0===b&&(b={}),o.get((O,C)=>{if(O)return;const R=[p,y,S,T,(0,r.default)({guid:C},this.combineWithCommon(b))];g.emit("logError",...R),this._analytics.logError(...R)})},v.combineWithCommon=function(p){return(0,r.default)({},this._getCommon(),p)},v.logEvent=function(p,y,S){void 0===p&&(p={}),o.get((T,b)=>{if(T)return;const O=(0,r.default)({guid:b},this.combineWithCommon(p));g.emit("logEvent",O),this._analytics.logEvent(O,!1,y,S)})},v.logQOS=function(p){void 0===p&&(p={}),o.get((y,S)=>{if(y)return;const T=(0,r.default)({guid:S,duration:0},this.combineWithCommon(p));d(T),g.emit("logQOS",T),this._analytics.logQOS(T)})},(0,n.default)(g,[{key:"staticConfig",get:function(){return this._staticConfig},set:function(p){this._staticConfig=p,this._analytics=new s({loggingUrl:this.staticConfig.loggingUrl,ajax:this.ajax,queue:this.queue})}}]),g}();u(h),l.exports=h},function(l,E,e){"use strict";var t=!0,r=!0;function n(o,s,a){var c=o.match(s);return c&&c.length>=a&&parseInt(c[a],10)}l.exports={extractVersion:n,wrapPeerConnectionEvent:function i(o,s,a){if(o.RTCPeerConnection){var c=o.RTCPeerConnection.prototype,u=c.addEventListener;c.addEventListener=function(f,h){if(f!==s)return u.apply(this,arguments);var g=function(v){var m=a(v);m&&h(m)};return this._eventMap=this._eventMap||{},this._eventMap[h]=g,u.apply(this,[f,g])};var d=c.removeEventListener;c.removeEventListener=function(f,h){if(f!==s||!this._eventMap||!this._eventMap[h])return d.apply(this,arguments);var g=this._eventMap[h];return delete this._eventMap[h],d.apply(this,[f,g])},Object.defineProperty(c,"on"+s,{get:function(){return this["_on"+s]},set:function(f){this["_on"+s]&&(this.removeEventListener(s,this["_on"+s]),delete this["_on"+s]),f&&this.addEventListener(s,this["_on"+s]=f)},enumerable:!0,configurable:!0})}},disableLog:function(o){return"boolean"!=typeof o?new Error("Argument type: "+typeof o+". Please use a boolean."):(t=o,o?"adapter.js logging disabled":"adapter.js logging enabled")},disableWarnings:function(o){return"boolean"!=typeof o?new Error("Argument type: "+typeof o+". Please use a boolean."):(r=!o,"adapter.js deprecation warnings "+(o?"disabled":"enabled"))},log:function(){if("object"==typeof window){if(t)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}},deprecated:function(o,s){!r||console.warn(o+" is deprecated, please use "+s+" instead.")},detectBrowser:function(o){var s=o&&o.navigator,a={browser:null,version:null};if(void 0===o||!o.navigator)return a.browser="Not a browser.",a;
1if(s.mozGetUserMedia)a.browser="firefox",a.version=n(s.userAgent,/Firefox\/(\d+)\./,1);else if(s.webkitGetUserMedia)a.browser="chrome",a.version=n(s.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(s.mediaDevices&&s.userAgent.match(/Edge\/(\d+).(\d+)$/))a.browser="edge",a.version=n(s.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!o.RTCPeerConnection||!s.userAgent.match(/AppleWebKit\/(\d+)\./))return a.browser="Not a supported browser.",a;a.browser="safari",a.version=n(s.userAgent,/AppleWebKit\/(\d+)\./,1)}return a}}},function(l,E,e){var t=e(38),r=e(352),n=e(353),s=t?t.toStringTag:void 0;l.exports=function a(c){return null==c?void 0===c?"[object Undefined]":"[object Null]":s&&s in Object(c)?r(c):n(c)}},function(l,E,e){var t=e(177),r=e(114),n=e(24);l.exports=function i(o){return n(o)?t(o):r(o)}},function(l,E,e){"use strict";var t=e(42);l.exports=function(r){if(!t(r))throw new TypeError("Cannot use null or undefined");return r}},function(l,E,e){"use strict";var t=e(54),r=e(198),n=e(125),i=e(199),o=e(200),s=l.exports=function(a,c){var u,d,f,h,g;return arguments.length<2||"string"!=typeof a?(h=c,c=a,a=null):h=arguments[2],t(a)?(u=o.call(a,"c"),d=o.call(a,"e"),f=o.call(a,"w")):(u=f=!0,d=!1),g={value:c,configurable:u,enumerable:d,writable:f},h?n(i(h),g):g};s.gs=function(a,c,u){var d,f,h,g;return"string"!=typeof a?(h=u,u=c,c=a,a=null):h=arguments[3],t(c)?r(c)?t(u)?r(u)||(h=u,u=void 0):u=void 0:(h=c,c=u=void 0):c=void 0,t(a)?(d=o.call(a,"c"),f=o.call(a,"e")):(d=!0,f=!1),g={get:c,set:u,configurable:d,enumerable:f},h?n(i(h),g):g}},function(l,E){l.exports=function e(t,r){for(var n=-1,i=null==t?0:t.length,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}},function(l,E,e){var t=e(496),r=e(502),n=e(88),i=e(10),o=e(507);l.exports=function s(a){return"function"==typeof a?a:null==a?n:"object"==typeof a?i(a)?r(a[0],a[1]):t(a):o(a)}},function(l,E,e){"use strict";const t=e(5);l.exports=function(n,i){let o;const s=i||{};n.setDisplayMode=function(a){const c=a||"auto";o!==c&&(t.removeClass(this.domElement,`OT_mode-${o}`),t.addClass(this.domElement,`OT_mode-${c}`),o=c)},n.getDisplayMode=function(){return o},n.showAfterLoading=function(){t.removeClass(this.domElement,"OT_hide-forced")},n.hideWhileLoading=function(){t.addClass(this.domElement,"OT_hide-forced")},n.destroy=function(){return s.onDestroy&&s.onDestroy(this.domElement),this.domElement&&t.removeElement(this.domElement),n},n.appendTo=function(a){return this.domElement=t.createElement(s.nodeName||"div",s.htmlAttributes,s.htmlContent),s.onCreate&&s.onCreate(this.domElement),n.setDisplayMode(s.mode),"auto"===s.mode&&(t.addClass(n.domElement,"OT_mode-on-hold"),setTimeout(()=>{t.removeClass(n.domElement,"OT_mode-on-hold")},2e3)),a.appendChild(this.domElement),n}}},function(l,E,e){var t=e(77);l.exports=function n(i){return t(i,4)}},function(l,E,e){var t=e(351),r=e(356);l.exports=function n(i,o){var s=r(i,o);return t(s)?s:void 0}},function(l,E,e){var t=e(14);l.exports=t.Symbol},function(l,E,e){var t=e(83),r=e(63);l.exports=function n(i,o,s,a){var c=!s;s||(s={});for(var u=-1,d=o.length;++u<d;){var f=o[u],h=a?a(s[f],i[f],f,s,i):void 0;void 0===h&&(h=i[f]),c?r(s,f,h):t(s,f,h)}return s}},function(l,E,e){var t=e(380),r=e(109),n=e(381),i=e(185),o=e(186),s=e(29),a=e(174),c="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",g="[object DataView]",v=a(t),m=a(r),p=a(n),y=a(i),S=a(o),T=s;(t&&T(new t(new ArrayBuffer(1)))!=g||r&&T(new r)!=c||n&&T(n.resolve())!=d||i&&T(new i)!=f||o&&T(new o)!=h)&&(T=function(b){var O=s(b),C="[object Object]"==O?b.constructor:void 0,R=C?a(C):"";if(R)switch(R){case v:return g;case m:return c;case p:return d;case y:return f;case S:return h}return O}),l.exports=T},function(l,E,e){"use strict";(function(t){var i,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(O,C,R){return Function.prototype.apply.call(O,C,R)};i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:function(O){return Object.getOwnPropertyNames(O)};var s=Number.isNaN||function(O){return O!=O};function a(){a.init.call(this)}l.exports=a,l.exports.once=function T(b,O){return new t(function(C,R){function I(){void 0!==A&&b.removeListener("error",A),C([].slice.call(arguments))}var A;"error"!==O&&(A=function(x){b.removeListener(O,I),R(x)},b.once("error",A)),b.once(O,I)})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(b){if("function"!=typeof b)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof b)}function d(b){return void 0===b._maxListeners?a.defaultMaxListeners:b._maxListeners}function f(b,O,C,R){var I,A,P;if(u(C),void 0===(A=b._events)?(A=b._events=Object.create(null),b._eventsCount=0):(void 0!==A.newListener&&(b.emit("newListener",O,C.listener?C.listener:C),A=b._events),P=A[O]),void 0===P)P=A[O]=C,++b._eventsCount;else if("function"==typeof P?P=A[O]=R?[C,P]:[P,C]:R?P.unshift(C):P.push(C),(I=d(b))>0&&P.length>
1I&&!P.warned){P.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=b,x.type=O,x.count=P.length,function o(b){console&&console.warn&&console.warn(b)}(x)}return b}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(b,O,C){var R={fired:!1,wrapFn:void 0,target:b,type:O,listener:C},I=h.bind(R);return I.listener=C,R.wrapFn=I,I}function v(b,O,C){var R=b._events;if(void 0===R)return[];var I=R[O];return void 0===I?[]:"function"==typeof I?C?[I.listener||I]:[I]:C?function S(b){for(var O=new Array(b.length),C=0;C<O.length;++C)O[C]=b[C].listener||b[C];return O}(I):p(I,I.length)}function m(b){var O=this._events;if(void 0!==O){var C=O[b];if("function"==typeof C)return 1;if(void 0!==C)return C.length}return 0}function p(b,O){for(var C=new Array(O),R=0;R<O;++R)C[R]=b[R];return C}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(b){if("number"!=typeof b||b<0||s(b))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+b+".");c=b}}),a.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(O){if("number"!=typeof O||O<0||s(O))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+O+".");return this._maxListeners=O,this},a.prototype.getMaxListeners=function(){return d(this)},a.prototype.emit=function(O){for(var C=[],R=1;R<arguments.length;R++)C.push(arguments[R]);var I="error"===O,A=this._events;if(void 0!==A)I=I&&void 0===A.error;else if(!I)return!1;if(I){var P;if(C.length>0&&(P=C[0]),P instanceof Error)throw P;var x=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw x.context=P,x}var D=A[O];if(void 0===D)return!1;if("function"==typeof D)n(D,this,C);else{var L=D.length,N=p(D,L);for(R=0;R<L;++R)n(N[R],this,C)}return!0},a.prototype.on=a.prototype.addListener=function(O,C){return f(this,O,C,!1)},a.prototype.prependListener=function(O,C){return f(this,O,C,!0)},a.prototype.once=function(O,C){return u(C),this.on(O,g(this,O,C)),this},a.prototype.prependOnceListener=function(O,C){return u(C),this.prependListener(O,g(this,O,C)),this},a.prototype.off=a.prototype.removeListener=function(O,C){var R,I,A,P,x;if(u(C),void 0===(I=this._events))return this;if(void 0===(R=I[O]))return this;if(R===C||R.listener===C)0==--this._eventsCount?this._events=Object.create(null):(delete I[O],I.removeListener&&this.emit("removeListener",O,R.listener||C));else if("function"!=typeof R){for(A=-1,P=R.length-1;P>=0;P--)if(R[P]===C||R[P].listener===C){x=R[P].listener,A=P;break}if(A<0)return this;0===A?R.shift():function y(b,O){for(;O+1<b.length;O++)b[O]=b[O+1];b.pop()}(R,A),1===R.length&&(I[O]=R[0]),void 0!==I.removeListener&&this.emit("removeListener",O,x||C)}return this},a.prototype.removeAllListeners=function(O){var C,R,I;if(void 0===(R=this._events))return this;if(void 0===R.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==R[O]&&(0==--this._eventsCount?this._events=Object.create(null):delete R[O]),this;if(0===arguments.length){var P,A=Object.keys(R);for(I=0;I<A.length;++I)"removeListener"!==(P=A[I])&&this.removeAllListeners(P);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(C=R[O]))this.removeListener(O,C);else if(void 0!==C)for(I=C.length-1;I>=0;I--)this.removeListener(O,C[I]);return this},a.prototype.listeners=function(O){return v(this,O,!0)},a.prototype.rawListeners=function(O){return v(this,O,!1)},a.listenerCount=function(b,O){return"function"==typeof b.listenerCount?b.listenerCount(O):m.call(b,O)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}}).call(this,e(0))},function(l,E,e){"use strict";var t=e(399)();l.exports=function(r){return r!==t&&null!==r}},function(l,E,e){"use strict";l.exports=e(413)()?e(91).Symbol:e(416)},function(l,E,e){"use strict";(function(t){var r=e(3),n=r(e(25)),i=r(e(45));const o=e(206),s=e(55),a=e(470),c=e(517),u=e(1)("StaticConfig"),f=e(138).prependProxyToUrlIfNeeded,h=s({version:"v2.21.8",buildHash:"7aaf383c1",minimumVersion:{firefox:52,chrome:49},debug:"false",websiteURL:"http://www.tokbox.com",configURL:"https://config.opentok.com",ipWhitelistConfigURL:"",cdnURL:"https://static.opentok.com",loggingURL:"https://hlg.tokbox.com/prod",apiURL:"https://anvil.opentok.com"}),g=a(["apiURL","assetURL","cdnURL","sessionInfoOverrides","loggingURL"]),v={apiUrl:"apiURL",loggingUrl:"loggingURL"},m=c(y=>v[y]);l.exports=function p(y){let T=(void 0===y?{}:y).axios,b=void 0===T?o:T;return function(){function C(R){Object.defineProperty(this,"config",{value:Object.freeze(s(R))})}return C.onlyLocal=function(){const I=s((void 0!==typeof window?window:global).OTProperties);return new C((0,n.default)({},h,g(I)))},C.get=function(I){let A=I.partnerId,P=I.token,x=I.useIpWhitelistConfigUrl,D=I.proxyUrl;return(()=>{const N=this.onlyLocal();if(!N.configUrl)return t.resolve({});if(!0===x&&!N.ipWhitelistConfigUrl)return t.resolve({});let U=!0===x?N.ipWhitelistConfigUrl:N.configUrl;return U=f(U,D),b.get(`${U}/project/${A}/config.json`,{headers:{"X-TB-TOKEN-AUTH":P}}).then(B=>B.data)})().catch(N=>(u.error("could not reach live config service",N),{})).then(N=>{const U=s((void 0!==typeof window?window:global).OTProperties);return new C((0,n.default)({},h,g(U),m(N)))})}
1,(0,i.default)(C,[{key:"configUrl",get:function(){return this.config.configURL}},{key:"ipWhitelistConfigUrl",get:function(){return this.config.ipWhitelistConfigURL}},{key:"apiUrl",get:function(){return this.config.apiURL}},{key:"loggingUrl",get:function(){return this.config.loggingURL}},{key:"apiEnabled",get:function(){return void 0===this.config.apiEnabled||this.config.apiEnabled}},{key:"version",get:function(){return this.config.version}},{key:"clientVersion",get:function(){return`js-${(this.version||"unknown").replace("v","")}`}},{key:"buildHash",get:function(){return this.config.buildHash}},{key:"minimumVersion",get:function(){return this.config.minimumVersion}},{key:"websiteUrl",get:function(){return this.config.websiteURL}},{key:"debug",get:function(){return"true"===this.config.debug||!0===this.config.debug}},{key:"sessionInfoOverrides",get:function(){return this.config.sessionInfoOverrides}},{key:"cdnUrl",get:function(){return this.config.cdnURL||`${(void 0!==typeof window?window:global).location.protocol}//${(void 0!==typeof window?window:global).location.host}`}},{key:"assetUrl",get:function(){return this.config.assetURL||`${this.cdnUrl}/webrtc/${this.version}`}}]),C}()}}).call(this,e(0))},function(l,E){function e(r,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}l.exports=function t(r,n,i){return n&&e(r.prototype,n),i&&e(r,i),r}},function(l,E,e){var t=e(71);l.exports=function n(i){if("string"==typeof i||t(i))return i;var o=i+"";return"0"==o&&1/i==-1/0?"-0":o}},function(l,E,e){var t=e(514),n=e(137)(function(i,o){return null==i?{}:t(i,o)});l.exports=n},function(l,E,e){"use strict";const t=(void 0!==typeof window?window:global).performance||{};l.exports=function(){return t.now?t.timing.navigationStart+t.now():Date.now()}},function(l,E,e){var t=e(573);l.exports=function r(n){return t(2,n)}},function(l,E,e){"use strict";const t=e(7),r=e(61),n=e(272),i=e(127),o=e(273),s=e(1)("SDPHelpers"),u={getSections:h=>h.split(/\r\n|\r|\n/).reduce((g,v)=>{const m=v.match(/^m=(\w+) \d+/);return m&&(g.sections[g.section=m[1]]=[]),g.sections[g.section].push(v),g},{sections:{header:[]},section:"header"}).sections,getCodecsAndCodecMap(h,g){const v=u.getSections(h)[g];if(!v)throw new Error(`no mediaType ${g}`);return{codecs:v[0].match(/m=\w+ \d+ [A-Z/]+ ([\d ]+)$/)[1].split(" "),codecMap:t(...v.filter(y=>y.match(/^a=rtpmap:\d+/)).map(y=>y.match(/^a=rtpmap:(\d+) ([\w-]+)/).splice(1)).map(y=>({[y[0]]:y[1]})))}},getCodecs(h,g){const v=u.getCodecsAndCodecMap(h,g);return v.codecs.map(m=>v.codecMap[m]||"Unknown codec")},mediaDirections:{INACTIVE:"inactive",RECVONLY:"recvonly"}};l.exports=u,u.getMLineIndex=function(g,v){const m=`m=${v}`;return n(g,p=>-1!==p.indexOf(m))},u.getMLine=function(g,v){const m=u.getMLineIndex(g,v);return m>-1?g[m]:void 0},u.hasMediaType=(h,g)=>{const v=new RegExp(`^m=${g}`),m=h.split("\r\n");return n(m,p=>v.test(p))>=0},u.hasMLinePayloadType=function(g,v,m){const p=u.getMLine(g,v);return u.getMLinePayloadTypes(p,v).indexOf(m)>-1},u.getMLinePayloadTypes=function(g,v){const m=new RegExp(`^m=${v} \\d+(/\\d+)? [a-zA-Z0-9/]+(( [a-zA-Z0-9/]+)+)$`,"i"),p=g.match(m);return!p||p.length<2?[]:p[2].trim().split(" ")},u.splitSections=function(g){return g.split("\nm=").map((m,p)=>(p>0?"m="+m:m).trim()+"\r\n")},u.changeMediaDirection=function(g,v){const p=u.splitSections(g);return p.shift()+(b=>{const C=new RegExp(v===u.mediaDirections.RECVONLY?"a=inactive":"a=recvonly","g");return b.replace(C,`a=${v}`)})(p.join(""))},u.removeTypesFromMLine=function(g,v){const m=/[0-9 ]*$/.exec(g)[0],p=m.split(" ").filter(y=>""!==y&&-1===v.indexOf(y));return g.replace(m,` ${p.join(" ")}`)},u.removeMediaEncoding=function(g,v,m){let p,y,S,T,b=g.split("\r\n");const O=u.getMLineIndex(b,v),C=O>-1?b[O]:void 0,R=[];if(-1===O||(p=u.getMLinePayloadTypes(C,v),0===p.length))return b.join("\r\n");for(y=O;y<b.length;y++){const I=new RegExp(m,"i");0===b[y].indexOf("a=rtpmap:")&&(T=b[y].split(" "),2===T.length&&I.test(T[1])&&R.push(T[0].substr(9)))}if(!R.length)return b.join("\r\n");for(y=O;y<b.length;y++)if(0===b[y].indexOf("a=fmtp:"))for(T=b[y].split(" "),S=0;S<R.length;S++)2===T.length&&T[1]===`apt=${R[S]}`&&R.push(T[0].substr(7));return b=b.filter(I=>{for(let A=0;A<R.length;A++)if(0===I.indexOf(`a=rtpmap:${R[A]} `)||0===I.indexOf(`a=fmtp:${R[A]} `)||0===I.indexOf(`a=rtcp-fb:${R[A]} `))return!1;return!0}),R.length>0&&O>-1&&(b[O]=u.removeTypesFromMLine(C,R)),b.join("\r\n")},u.disableMediaType=function(g,v){const m=g.split("\r\n"),p=[];let y;m.forEach(b=>{let O=b;/^m=/.test(O)&&(y=void 0),y||(y=[],p.push(y)),y.push(O)});const S=new RegExp(`^m=${v} \\d+ ([^ ]+) [0-9 ]+$`),T=p.map(b=>{const O=b[0].match(S);return O?[`m=${v} 0 ${O[1]} 0`,"a=inactive",...b.filter(C=>/^c=/.test(C)||/^a=mid:/.test(C)||""===C)]:b});return[].concat(...T).join("\r\n")},u.removeVideoCodec=function(g,v){return u.removeMediaEncoding(g,"video",v)};const d=function(g,v){let m=v.filterByName("ssrc-group:FID");switch(m=0===m.length?[]:m[0].value.split(" "),m.length){case 0:case 1:var y=v.find(T=>0===T.name.indexOf("rtpmap:")&&T.value.indexOf("rtx/90000")>-1);if(!y)return!1;var S=y.name.split(":")[1];return S.indexOf("/")>-1&&(S=S.split("/")[0]),u.hasMLinePayloadType(g,"video",S);default:return s.debug("SDP Helpers: There are more than two FIDs, RTX is definitely enabled"),!0}};u.getAttributesForMediaType=function(g,v){let m,p,y,S,T,b,O,C,R,I;const A=u.getMLineIndex(g,v),P=new RegExp(`m=(?!${v}).+ `,"i"),x=new RegExp("a=ssrc:\\d+ .*","i"),D=new RegExp("a=ssrc-group:(SIM|FID) (\\d+).*?","i"),L=new RegExp("a=([a-z0-9:/-]+) (.*)","i"),N=[];for(let U=A+1;U<g.length;U++){if(P.test(g[U])){void 0!==m&&(p=U-1);break}T=g[U].match(D),b=g[U].match(x),void 0===m&&(T||b)&&(m=U,T&&(S=/^(FID|SIM)$/.test(T[1])?T[2]:T[1])),O=g[U].match(`a=ssrc:${S} msid:(.+)`),O&&(C=O[1]);const B=x.test(g[U]),V=D.test(g[U]);void 0!==m&&(void 0!==p||B||V?U===g.length-1&&(p=U):p=U-1);const H=g[U].match(/a=mid:(.+)/);H&&(R=H[1],I=U),y=L.exec(g[U]),y&&3===y.length&&N.push({lineIndex:U,name:y[1],value:y[2]})}return N.ssrcStartIndex=m,N.ssrcEndIndex=p,N.msid=C,N.mid=R,N.midIndex=I,N.isUsingRTX=d.bind(null,g,N),N.filterByName=function(B){return this.filter(V=>V.name===B)},N.getRtpNumber=U=>{const B=new RegExp("rtpmap:(.+)");return r(N.map(V=>{const H=V.name.match(B);return H&&V.value.indexOf(U)>=0?H[1]:null}),V=>null!==V)},N},u.modifyDtx=(h,g)=>{const v=h.split("\r\n");if(!u.getMLine(v,"audio"))return s.debug("No audio m-line, not enabling dtx."),h;const m=u.getAttributesForMediaType(v,"audio"),p=m.getRtpNumber("opus");if(!p)return s.debug("Could not find rtp number for opus, not enabling dtx."),h;const y=m.find(b=>b.name===`fmtp:${p}`);
1if(!y)return s.debug("Could not find a=fmtp line for opus, not enabling dtx."),h;let S=v[y.lineIndex];const T=/usedtx=\d+([\s;]*)/;return T.test(y.value)?S=S.replace(T,g?"usedtx=1$1":""):g&&(S+="; usedtx=1"),S=S.replace(/[;\s]*$/,""),v[y.lineIndex]=S,v.join("\r\n")};const f=(h,g,v)=>{const m=g.split("\r\n");if(!u.getMLine(m,"audio"))return s.debug("No audio m-line, not enabling stereo."),g;const p=u.getAttributesForMediaType(m,"audio"),y=p.getRtpNumber("opus");if(!y)return s.debug("Could not find rtp number for opus, not enabling stereo."),g;const S=p.find(O=>O.name===`fmtp:${y}`);if(!S)return s.debug("Could not find a=fmtp line for opus, not enabling stereo."),g;let b,T=m[S.lineIndex];switch(h){case"send":b=/sprop-stereo=\d+([\s;]*)/,b.test(S.value)?T=T.replace(b,v?"sprop-stereo=1$1":""):v&&(T+="; sprop-stereo=1");break;case"receive":b=/([^-])stereo=\d+([\s;]*)/,b.test(S.value)?T=T.replace(b,v?"$1stereo=1$2":"$1"):v&&(T+="; stereo=1");break;default:throw new Error(`Invalid type ${h} passed into enableStereo`)}return T=T.replace(/[;\s]*$/,""),m[S.lineIndex]=T,m.join("\r\n")};u.modifySendStereo=f.bind(null,"send"),u.modifyReceiveStereo=f.bind(null,"receive"),u.setAudioBitrate=(h,g)=>{const v=u.getAudioBitrate(h);if(void 0!==v)return s.debug(`Audio bitrate already set to ${v}, not setting audio bitrate`),h;const m=h.split("\r\n");if(!u.getMLine(m,"audio"))return s.debug("No audio m-line, not setting audio bitrate"),h;const p=u.getAttributesForMediaType(m,"audio"),y=p.getRtpNumber("opus");if(!y)return s.debug("Could not find rtp number for opus, not setting audio bitrate."),h;const S=p.find(b=>b.name===`fmtp:${y}`);if(!S)return s.debug("Could not find a=fmtp line for opus, not setting audio bitrate."),h;let T=m[S.lineIndex];return T+=`; maxaveragebitrate=${g}`,T=T.replace(/[;\s]*$/,""),m[S.lineIndex]=T,m.join("\r\n")},u.hasSendStereo=h=>/[\s;]sprop-stereo=1/.test(h),u.hasSendDtx=h=>/[\s;]usedtx=1/.test(h),u.getAudioBitrate=h=>{const g=h.match(/[\s;]maxaveragebitrate=(\d+)/);if(g)return Number(g[1])},u.MAX_SSRCS=10,u.getSSRCGroupType=h=>["SIM","FID"].find(v=>h.filterByName(`ssrc-group:${v}`)[0]),u.getSSRCGroup=h=>{const g=u.getSSRCGroupType(h);return h.filterByName(`ssrc-group:${g}`)[0]},u.getSSRCGroupSSRCs=h=>{const g=u.getSSRCGroup(h);return g?g.value.split(" ").slice(0,u.MAX_SSRCS):[]},u.getAllowedSSRCs=(h,g)=>{const v=g.slice();return h.filterByName("ssrc-group:FID").forEach(m=>{const p=m.value.split(" ");i(v,p).length&&Array.prototype.push.apply(v,p)}),o(v)},u.filterExcessSSRCs=h=>{const g=h.split("\r\n"),v=u.getAttributesForMediaType(g,"video"),m=u.getSSRCGroupType(v),p=v.ssrcStartIndex;if(void 0===p)return h;let y;const S=b=>{let O=null;return b.match(/^a=ssrc:(\d+)/)&&(O=RegExp.$1),O};if(m){const b=u.getSSRCGroupSSRCs(v),O=[`a=ssrc-group:${m}`,...b].join(" ");g[v.find(R=>R.name.startsWith("ssrc-group:")).lineIndex]=O,y=u.getAllowedSSRCs(v,b)}else y=[],v.ssrcStartIndex&&y.push(S(g[v.ssrcStartIndex]));return g.filter((b,O)=>{if(O<p||O>v.ssrcEndIndex)return!0;if(O===p){if(!m){const R=S(b);return R?y.includes(R):!/^a=ssrc:(\d+)/.test(b)}return!0}const C=S(b);if(C)return y.includes(C);if(b.match(/^a=ssrc-group:FID (\d+)/)){const R=RegExp.$1;return y.includes(R)}return!b.match(/^a=ssrc-group:SIM /)}).join("\r\n")},u.enableSimulcast=function(g,v){let m,p;const y=g.split("\r\n");if(!u.getMLine(y,"video"))return s.debug("No video m-line, not enabling simulcast."),g;const S=u.getAttributesForMediaType(y,"video");if(S.filterByName("ssrc-group:SIM").length>0)return s.debug("Simulcast is already enabled in this SDP, not attempting to enable again."),u.filterExcessSSRCs(g);if(!S.msid)return s.debug("No local stream attached, not enabling simulcast."),g;const T=S.isUsingRTX(),b=[],O=[];for(p=0;p<v;++p)b.push(1e4+p),T&&O.push(2e4+p);if(m=[`a=ssrc-group:SIM ${b.join(" ")}`],T)for(p=0;p<v;++p)m.push(`a=ssrc-group:FID ${b[p]} ${O[p]}`);for(p=0;p<v;++p)m.push(`a=ssrc:${b[p]} cname:localCname`,`a=ssrc:${b[p]} msid:${S.msid}`);if(T)for(p=0;p<v;++p)m.push(`a=ssrc:${O[p]} cname:localCname`,`a=ssrc:${O[p]} msid:${S.msid}`);return m.unshift(S.ssrcStartIndex,S.ssrcEndIndex-S.ssrcStartIndex+1),y.splice(...m),y.join("\r\n")},u.reprioritizeVideoCodec=function(g,v,m){const p=g.split("\r\n"),y=u.getMLineIndex(p,"video");if(-1===y)return g;const S=u.getMLinePayloadTypes(p[y],"video"),T=new RegExp(`^a=rtpmap:(\\d+).* ${v}`,"i"),b=p.map(I=>I.match(T)).filter(I=>null!==I);if(0===b.length)return g;const O=b.map(I=>I[1]);let C=S.filter(I=>-1===O.indexOf(I));"top"===m?C.unshift(...O):"bottom"===m?C.push(...O):(s.error(`Unexpected location param: ${m}; not changing ${v} priority`),C=S);const R=p[y].replace(S.join(" "),C.join(" "));return p[y]=R,p.join("\r\n")}},function(l,E){l.exports=function e(t,r){return t===r||t!=t&&r!=r}},function(l,E,e){var t=e(177),r=e(375),n=e(24);l.exports=function i(o){return n(o)?t(o,!0):r(o)}},function(l,E){l.exports=function e(t,r){var n=-1,i=t.length;for(r||(r=Array(i));++n<i;)r[n]=t[n];return r}},function(l,E,e){"use strict";l.exports=function(r){return null!=r}},function(l,E,e){var t=e(77);l.exports=function i(o){return t(o,5)}},function(l,E,e){var t=e(98);l.exports=function r(n,i,o){var s=null==n?void 0:t(n,i);return void 0===s?o:s}},function(l,E,e){var t=e(10),r=e(136),n=e(235),i=e(58);l.exports=function o(s,a){return t(s)?s:r(s,a)?[s]:n(i(s))}},function(l,E,e){var t=e(504);l.exports=function r(n){return null==n?"":t(n)}},function(l,E){l.exports=function e(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r}},function(l,E,e){"use strict";const t=e(49),r=e(44)();E.check=function(n){void 0===n&&(n={});const i=n.env||e(2),o=n.hasGetUserMediaCapability||e(582),s=n.hasPeerConnectionCapability||e(583),a=n.logging||e(1)("hasOpenTokSupport"),d=((n.staticConfig||r.onlyLocal()).minimumVersion||{})[i.name.toLowerCase()];return d&&d>i.version?(a.debug("Support for",i.name,"is disabled because we require",d,"but this is",i.version),!1):"Node"===i.name||o()&&s()},E.once=t(()=>E.check())},function(l,E,e){var n=e(596)(e(272));l.exports=n},function(l,E,e){"use strict";l.exports=function(r){const n=[];return{on(i,o){for(var s=arguments.length,a=new Array(s>2?s-2:0),c=2;c<s;c++)a[c-2]=arguments[c];if(n.push({eventName:i,handler:o,args:a}),r.on)r.on(i,o);else{if(!r.addEventListener)throw new Error("Object does not support events",r);r.addEventListener(i,o,...a)}},off(i,o){if(r.off)r.off(i,o);else{if(!r.removeEventListener)throw new Error("Object does not support events",r);for(var s=arguments.length,a=new Array(s>2?s-2:0),c=2;c<s;c++)a[c-2]=arguments[c];r.removeEventListener(i,o,...a)}},once(i,o){for(var s=arguments.length,a=new Array(s>2?s-2:0),c=2;c<s;c++)a[c-2]=arguments[c];n.push({eventName:i,handler:o,args:a}),r.once(i,o)}
1,removeAll(){n.forEach(i=>{this.off(i.eventName,i.handler,...i.args)}),n.splice(0,n.length)}}}},function(l,E,e){var t=e(175);l.exports=function r(n,i,o){"__proto__"==i&&t?t(n,i,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[i]=o}},function(l,E,e){var t=e(370),r=e(16),n=Object.prototype,i=n.hasOwnProperty,o=n.propertyIsEnumerable,s=t(function(){return arguments}())?t:function(a){return r(a)&&i.call(a,"callee")&&!o.call(a,"callee")};l.exports=s},function(l,E,e){(function(t){var r=e(14),n=e(371),i=E&&!E.nodeType&&E,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0;t.exports=(a?a.isBuffer:void 0)||n}).call(this,e(84)(l))},function(l,E){var t=/^(?:0|[1-9]\d*)$/;l.exports=function r(n,i){var o=typeof n;return!!(i=null==i?9007199254740991:i)&&("number"==o||"symbol"!=o&&t.test(n))&&n>-1&&n%1==0&&n<i}},function(l,E){l.exports=function e(t){return function(r){return t(r)}}},function(l,E){var e=Object.prototype;l.exports=function t(r){var n=r&&r.constructor;return r===("function"==typeof n&&n.prototype||e)}},function(l,E){var t,r,e=l.exports={};function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(m){if(t===setTimeout)return setTimeout(m,0);if((t===n||!t)&&setTimeout)return t=setTimeout,setTimeout(m,0);try{return t(m,0)}catch(p){try{return t.call(null,m,0)}catch(y){return t.call(this,m,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:n}catch(m){t=n}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(m){r=i}}();var u,a=[],c=!1,d=-1;function f(){!c||!u||(c=!1,u.length?a=u.concat(a):d=-1,a.length&&h())}function h(){if(!c){var m=o(f);c=!0;for(var p=a.length;p;){for(u=a,a=[];++d<p;)u&&u[d].run();d=-1,p=a.length}u=null,c=!1,function s(m){if(r===clearTimeout)return clearTimeout(m);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(m);try{r(m)}catch(p){try{return r.call(null,m)}catch(y){return r.call(this,m)}}}(m)}}function g(m,p){this.fun=m,this.array=p}function v(){}e.nextTick=function(m){var p=new Array(arguments.length-1);if(arguments.length>1)for(var y=1;y<arguments.length;y++)p[y-1]=arguments[y];a.push(new g(m,p)),1===a.length&&!c&&o(h)},g.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=v,e.addListener=v,e.once=v,e.off=v,e.removeListener=v,e.removeAllListeners=v,e.emit=v,e.prependListener=v,e.prependOnceListener=v,e.listeners=function(m){return[]},e.binding=function(m){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(m){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},function(l,E,e){"use strict";l.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(l,E,e){var t=e(29),r=e(16);l.exports=function i(o){return"symbol"==typeof o||r(o)&&"[object Symbol]"==t(o)}},function(l,E,e){"use strict";if("Node"===e(5).env.name)l.exports={value:""};else{var r,n;const i=null==(r=Array.prototype.slice.call(document.getElementsByTagName("script")))||null==(n=r.pop())?void 0:n.getAttribute("src"),o=i&&i.match(/[?&]apikey=([^&]+)/i)||[];l.exports={value:o[1]||""}}},function(l,E,e){"use strict";const t=e(2);l.exports=()=>!((t.isChrome||t.isElectron)&&t.version>=90||t.isOpera&&t.version>=76)&&(t.isChrome&&t.version>71||t.isChromiumEdge&&t.version<90||t.isOpera&&t.version>58)},function(l,E,e){"use strict";l.exports=function t(r,n,i){void 0===i&&(i=1/0);let o=null,s=!1,a=1;const c=1e3/n,u=()=>{!s||a>i||(a+=1,r(),o=setTimeout(u,c))};this.start=()=>{s||(s=!0,setTimeout(u,c))},this.stop=()=>{(void 0!==typeof window?window:global).clearTimeout(o),s=!1}}},function(l,E,e){"use strict";const t=e(47),r=e(639),n=e(9),i=e(157),o={};function s(h){return Number(h.framerateMean||h.googFrameRateSent||h.googFrameRateReceived||h.googFrameRateInput||h.googFrameRateOutput||0)}function a(h){return Number(h.framesEncoded||h.framesDecoded)}function c(h,g){if(s(h))return s(h);if(!a(h))return;let v=0;const m=o[h.id]?o[h.id].frames:0,p=o[h.id]?o[h.id].timestamp:g;return v=i({currentStatFrames:a(h),currentTimestamp:h.timestamp,prevStatFrames:m,prevTimestamp:p}),o[h.id]={frames:a(h),timestamp:h.timestamp},v}function u(h,g){if(!g)return{};const v=g.filter(m=>m.id===h.mediaTrackId);return v.length?v[0]:{}}function d(h,g){return"packetsLost"in g?h+g.packetsLost:h}const f={isVideoStat(h,g){const v=u(h,g);
1return"video"===h.kind&&["outbound-rtp","inbound-rtp"].includes(h.type)||"video"===h.mediaType||"googFrameWidthReceived"in h||"googFrameWidthInput"in h||"inbound-rtp"===h.type&&-1!==h.id.indexOf("Video")||"inboundrtp"===h.type&&0!==v.frameWidth},isAudioStat(h,g){const v=u(h,g);return"audio"===h.kind&&["outbound-rtp","inbound-rtp"].includes(h.type)||"audio"===h.mediaType||"audioInputLevel"in h||"audioOutputLevel"in h||"inbound-rtp"===h.type&&-1!==h.id.indexOf("Audio")||"inboundrtp"===h.type&&0===v.frameWidth},isInboundStat:h=>"bytesReceived"in h||"packetsReceived"in h,isOutboundStat:h=>"bytesSent"in h||"packetsSent"in h,isVideoTrackStat:h=>"track"===h.type&&(h.frameHeight>0||h.frameWidth>0||h.framesCorrupted>0||h.framesDecoded>0||h.framesPerSecond>0||h.framesSent>0||h.framesReceived>0),isVideoRemoteInboundRtpStat:h=>"remote-inbound-rtp"===h.type&&"video"===h.kind,isAudioRemoteInboundRtpStat:h=>"remote-inbound-rtp"===h.type&&"audio"===h.kind,isVideoInboundRtpStat:h=>"inbound-rtp"===h.type&&"video"===h.kind,parseStatCategory(h){const g={packetsLost:0,packetsReceived:0,bytesReceived:0};return"packetsReceived"in h&&(g.packetsReceived=parseInt(h.packetsReceived,10)),"packetsLost"in h&&(g.packetsLost=parseInt(h.packetsLost,10)),"bytesReceived"in h&&(g.bytesReceived=parseInt(h.bytesReceived,10)),this.isVideoStat(h)&&("framerateMean"in h?g.frameRate=Number(h.framerateMean):"googFrameRateOutput"in h?g.frameRate=Number(h.googFrameRateOutput):"googFrameRateInput"in h&&(g.frameRate=Number(h.googFrameRateInput))),g},getVideoPacketsLost(h){return h.filter(g=>this.isVideoRemoteInboundRtpStat(g,h)).reduce(d,0)},getAudioPacketsLost(h){return h.filter(g=>this.isAudioRemoteInboundRtpStat(g,h)).reduce(d,0)},normalizeTimestamp:(h,g)=>(void 0===g&&(g=Date.now()),n(h)&&"getTime"in h?h.getTime():Math.abs(h/(1e3*g)-1)<.05?h/1e3:h),normalizeStats(h,g,v){void 0===g&&(g=!0);const m=h.filter(A=>f.isVideoStat(A,h)).filter(A=>f.isInboundStat(A)===g),p=h.filter(A=>this.isAudioStat(A,h)).filter(A=>this.isInboundStat(A)===g)[0],y=m[0];if(!p&&!y)throw new Error("could not find stats for either audio or video");const S=f.normalizeTimestamp(y?y.timestamp:p.timestamp),T={timestamp:S};y&&!g&&void 0===y.packetsLost&&(y.packetsLost=this.getVideoPacketsLost(h)),p&&!g&&void 0===p.packetsLost&&(p.packetsLost=this.getAudioPacketsLost(h));const b=["packetsSent","packetsLost","bytesSent"],R=g?A=>t(A,["packetsReceived","packetsLost","bytesReceived"]):A=>t(A,b);if(m&&m.length>0){const A=(A=>{const x=b.concat(["framerateMean","googFrameRateSent","googFrameRateReceived","googFrameRateInput","googFrameRateOutput","framesEncoded","framesDecoded"]),D={timestamp:S,id:y.id};return x.forEach(L=>{D[L]=A.map(N=>Number(N[L]||0)).reduce((N,U)=>N+U,0)}),D})(m);T.video=Object.assign({frameRate:c(A,v)},r(R(A),Number))}return p&&(T.audio=r(R(p),Number)),T}};l.exports=f},function(l,E,e){"use strict";E.__esModule=!0,E.codes=E.messages=void 0,E.messages={1001:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.",1002:"The endpoint is terminating the connection due to a protocol error. (CLOSE_PROTOCOL_ERROR)",1003:"The connection is being terminated because the endpoint has indicated that reconnections are not available. (CLOSE_UNSUPPORTED)",1005:"Indicates that no status code was provided even though one was expected. (CLOSE_NO_STATUS)",1006:"Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected. (CLOSE_ABNORMAL)",1007:"Indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message)",1008:"Indicates that an endpoint is terminating the connection because it has received a message that violates its policy.  This is a generic status code that can be returned when there is no other more suitable status code (e.g., 1003 or 1009) or if there is a need to hide specific details about the policy",1009:"Indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process (CLOSE_TOO_LARGE)",1011:"Indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request",4001:"Connectivity loss was detected as it was too long since the socket received the last PONG message",4010:"Timed out while waiting for the Rumor socket to connect.",4020:"Error code unavailable.",4030:"Exception was thrown during Rumor connection, possibly because of a blocked port."},E.codes={CLOSE_NORMAL:1e3,CLOSE_GOING_AWAY:1001,CLOSE_PROTOCOL_ERROR:1002,CLOSE_UNSUPPORTED:1003,CLOSE_NO_STATUS:1005,CLOSE_ABNORMAL:1006,CLOSE_INCONSISTENT_DATA:1007,CLOSE_POLICY_VIOLATION:1008,CLOSE_TOO_LARGE:1009,CLOSE_UNEXPECTED_CONDITION:1011,CLOSE_CONNECTIVITY_LOSS:4001,CLOSE_TIMEOUT:4010,CLOSE_FA
1LLBACK_CODE:4020,CLOSE_CONNECT_EXCEPTION:4030,ALREADY_CONNECTED_CONNECTING:null}},function(l,E,e){var t=e(78),r=e(111),n=e(83),i=e(176),o=e(374),s=e(179),a=e(53),c=e(377),u=e(379),d=e(182),f=e(184),h=e(40),g=e(382),v=e(383),m=e(189),p=e(10),y=e(65),S=e(387),T=e(9),b=e(389),O=e(30),C=e(52),P="[object Arguments]",U="[object Function]",j="[object Object]",Q={};Q[P]=Q["[object Array]"]=Q["[object ArrayBuffer]"]=Q["[object DataView]"]=Q["[object Boolean]"]=Q["[object Date]"]=Q["[object Float32Array]"]=Q["[object Float64Array]"]=Q["[object Int8Array]"]=Q["[object Int16Array]"]=Q["[object Int32Array]"]=Q["[object Map]"]=Q["[object Number]"]=Q[j]=Q["[object RegExp]"]=Q["[object Set]"]=Q["[object String]"]=Q["[object Symbol]"]=Q["[object Uint8Array]"]=Q["[object Uint8ClampedArray]"]=Q["[object Uint16Array]"]=Q["[object Uint32Array]"]=!0,Q["[object Error]"]=Q[U]=Q["[object WeakMap]"]=!1,l.exports=function K(re,de,Oe,xe,ke,X){var te,le=1&de,be=2&de,De=4&de;if(Oe&&(te=ke?Oe(re,xe,ke,X):Oe(re)),void 0!==te)return te;if(!T(re))return re;var he=p(re);if(he){if(te=g(re),!le)return a(re,te)}else{var Ze=h(re),ze=Ze==U||"[object GeneratorFunction]"==Ze;if(y(re))return s(re,le);if(Ze==j||Ze==P||ze&&!ke){if(te=be||ze?{}:m(re),!le)return be?u(re,o(te,re)):c(re,i(te,re))}else{if(!Q[Ze])return ke?re:{};te=v(re,Ze,le)}}X||(X=new t);var tt=X.get(re);if(tt)return tt;X.set(re,te),b(re)?re.forEach(function(Ge){te.add(K(Ge,de,Oe,Ge,re,X))}):S(re)&&re.forEach(function(Ge,St){te.set(St,K(Ge,de,Oe,St,re,X))});var Ne=he?void 0:(De?be?f:d:be?C:O)(re);return r(Ne||re,function(Ge,St){Ne&&(Ge=re[St=Ge]),n(te,St,K(Ge,de,Oe,St,re,X))}),te}},function(l,E,e){var t=e(79),r=e(346),n=e(347),i=e(348),o=e(349),s=e(350);function a(c){var u=this.__data__=new t(c);this.size=u.size}a.prototype.clear=r,a.prototype.delete=n,a.prototype.get=i,a.prototype.has=o,a.prototype.set=s,l.exports=a},function(l,E,e){var t=e(341),r=e(342),n=e(343),i=e(344),o=e(345);function s(a){var c=-1,u=null==a?0:a.length;for(this.clear();++c<u;){var d=a[c];this.set(d[0],d[1])}}s.prototype.clear=t,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=i,s.prototype.set=o,l.exports=s},function(l,E,e){var t=e(51);l.exports=function r(n,i){for(var o=n.length;o--;)if(t(n[o][0],i))return o;return-1}},function(l,E,e){var r=e(37)(Object,"create");l.exports=r},function(l,E,e){var t=e(365);l.exports=function r(n,i){var o=n.__data__;return t(i)?o["string"==typeof i?"string":"hash"]:o.map}},function(l,E,e){var t=e(63),r=e(51),i=Object.prototype.hasOwnProperty;l.exports=function o(s,a,c){var u=s[a];(!i.call(s,a)||!r(u,c)||void 0===c&&!(a in s))&&t(s,a,c)}},function(l,E){l.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(l,E,e){var t=e(372),r=e(67),n=e(113),i=n&&n.isTypedArray,o=i?r(i):t;l.exports=o},function(l,E,e){var t=e(9),r=Object.create,n=function(){function i(){}return function(o){if(!t(o))return{};if(r)return r(o);i.prototype=o;var s=new i;return i.prototype=void 0,s}}();l.exports=n},function(l,E,e){var t=e(88),r=e(192),n=e(121);l.exports=function i(o,s){return n(r(o,s,t),o+"")}},function(l,E){l.exports=function e(t){return t}},function(l,E,e){"use strict";var t=Object.prototype.toString,r=t.call(function(){return arguments}());l.exports=function(n){return t.call(n)===r}},function(l,E,e){"use strict";var t=Object.prototype.toString,r=t.call("");l.exports=function(n){return"string"==typeof n||n&&"object"==typeof n&&(n instanceof String||t.call(n)===r)||!1}},function(l,E,e){"use strict";l.exports=e(414)()?globalThis:e(415)},function(l,E,e){var t=e(110),r=e(447),n=e(448);function i(o){var s=-1,a=null==o?0:o.length;for(this.__data__=new t;++s<a;)this.add(o[s])}i.prototype.add=i.prototype.push=r,i.prototype.has=n,l.exports=i},function(l,E,e){var t=e(449);l.exports=function r(n,i){return!(null==n||!n.length)&&t(n,i,0)>-1}},function(l,E){l.exports=function e(t,r){return t.has(r)}},function(l,E,e){var t=e(86),r=e(9);l.exports=function n(i){return function(){var o=arguments;switch(o.length){case 0:return new i;case 1:return new i(o[0]);case 2:return new i(o[0],o[1]);case 3:return new i(o[0],o[1],o[2]);case 4:return new i(o[0],o[1],o[2],o[3]);case 5:return new i(o[0],o[1],o[2],o[3],o[4]);case 6:return new i(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new i(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var s=t(i.prototype),a=i.apply(s,o);return r(a)?a:s}}},function(l,E,e){var t=e(489);l.exports=function r(n){var i=t(n),o=i%1;return i==i?o?i-o:i:0}},function(l,E){l.exports=function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}},function(l,E,e){var t=e(57),r=e(46);l.exports=function n(i,o){for(var s=0,a=(o=t(o,i)).length;null!=i&&s<a;)i=i[r(o[s++])];return s&&s==a?i:void 0}},function(l,E,e){var t=e(238),r=e(30);l.exports=function n(i,o){return i&&t(i,o,r)}},function(l,E,e){"use strict";E.adaptIceServers=function(r){return r.map(n=>({url:n.url,urls:n.urls||[n.url],username:n.username,credential:n.credential}))},E.parseIceServers=function(r){let n;try{n=JSON.parse(r.data).content.iceServers}catch(i){return[]}return E.adaptIceServers(n)}},function(l,E,e){"use strict";(function(t){const r=e(153),n=e(48),i=e(7),o=e(55),s=e(127),a=e(147),c=e(271),u=e(19),d=e(6),f=e(250),h=e(154),g=e(50),v=e(73);l.exports=function(p){void 0===p&&(p={});const y=p.hasValidPeerConnection||e(599),S=p.applySdpTransform||e(155),T=p.createPeerConnection||e(602),b=p.env||e(2),O=p.sdpTransformDefaults||e(604),C=p.getStatsAdapter||e(274),R=p.getRtcStatsReportAdapter||e(277),I=p.getSynchronizationSources||e(608),A=p.IceCandidateProcessor||e(609),P=p.logging||e(1),x=p.offerProcessor||e(611),D=p.PeerConnectionChannels||e(613),L=p.subscribeProcessor||e(615),N=p.changeMediaDirection||e(616),U=N.changeMediaDirectionToInactive,B=N.changeMediaDirectionToRecvOnly,V=p.Qos||e(278).default,H=p.global||(void 0!==typeof window?window:global),j=p.debounce||e(620),M=p.needsToSwapH264Profiles||e(622).once,z=p.NativeRTCIceCandidate||H.RTCIceCandidate,w=p.NativeRTCSessionDescription||H.RTCSessionDescription,k=p.Errors||e(4),W=p.OTErrorClass||e(21),Z=p.ExceptionCodes||e(8),se=()=>{};return function(ue){void 0===ue&&(ue={});let me=!1;const Re=ue.iceConfig,Me=void 0===Re?{servers:[]}:Re,Q=ue.isPublisher,K=ue.logAnalyticsEvent,re=void 0===K?se:K,de=ue.offerOverrides,Oe=ue.answerOverrides,xe=ue.sdpTransformOptions,ke=ue.sendMessage,X=ue.p2p,te=ue.codecFlags,le=ue.sourceStreamId;let Ze,be=!1,De=!1,he=!1;const ze=M();let tt=0,He=!1;const Ne=h();function Ge(ye,Ie){me||["candidate","offer","answer","pranswer"].indexOf(ye)>-1&&(me=-1!==("candidate"===ye?Ie.candidate:Ie.sdp).indexOf("typ relay")),ke(ye,Ie)}const St=n();re("createPeerConnection","Attempt");const Se={};Se.id=u();const nt=P(`PeerConnection:${Se.id}`);nt.debug("construct",{id:Se.id,options:ue});const Nt=a({},O,xe),on=ye=>"relay"===Me.transportPolicy&&null!=ye&&-1===ye.candidate.indexOf("typ relay"),xt=c(ue,["isPublisher","logAnalyticsEvent","offerOverrides","answerOverrides","sendMessage","sdpTransformOptions"]);let Te,sn,Vt,lt,qt,Ut=[];const Dt=(()=>{let ye=xt.overrideSimulcastEnabled||!1;return{get:()=>ye,set(Ie){const Ve=Boolean(Ie)&&xt.capableSimulcastStreams>1;Ve!==ye&&void 0===xt.overrideSimulcastEnabled&&(ye=Ve,Se.generateOffer())}}})(),Ke=(()=>{let ye=!1;return{get:()=>ye,set(Ie){const Ve=Boolean(Ie);Ve!==ye&&(ye=Ve,ye&&!Se.iceConnectionStateIsConnected()?Se.generateOffer():nt.debug("iceRestart is going to wait until we disconnect and then restart ice"))}}})(),Ct={clean(){delete this.promise,delete this.resolve,delete this.reject}};Ct.promise=new t((ye,Ie)=>{Ct.resolve=ye,Ct.reject=Ie});let ft=new A,Pt="new";Object.defineProperty(Se,"signalingState",{get:()=>Te.signalingState,set:ye=>(Te.signalingState=ye,ye)}),d(Se),Se.once("iceConnected",()=>{const Ie={pcc:parseInt(n()-St,10),hasRelayCandidates:me,proxyInfo:""};Te&&Te.proxyInfo&&(Ie.proxyInfo=Te.proxyInfo),re("createPeerConnection","Success",Ie)}),Ct.resolve();const En=ye=>{if(nt.debug("internalCreatePeerConnection: called"),Te)return nt.debug("internalCreatePeerConnection: resolving synchronously"),void ye.call(null,null,Te);if(Ut.push(ye),Ut.length>1)return;const Ie={optional:[{DtlsSrtpKeyAgreement:!0}]};if(nt.debug(`Creating peer connection config "${JSON.stringify(xt)}".`),0===Me.servers.length&&(nt.error("No ice servers present"),re("Error","noIceServers")),"relay"===Me.transportPolicy){const Ve=rt=>rt&&0===rt.indexOf("turn");Me.servers=Me.servers.map(rt=>{const at=o(rt);return Array.isArray(at.urls)||(at.urls=[at.urls]),at.urls=at.urls.filter(Ve),0===at.urls.length?void 0:at}).filter(rt=>void 0!==rt)}xt.iceTransportPolicy=Me.transportPolicy,xt.iceServers=Me.servers,y(H.RTCPeerConnection).then(Ve=>{if(!Ve)throw nt.error("createPeerConnection: Invalid RTCPeerConnection object"),new Error("Failed to create valid RTCPeerConnection object");return T({window:H,config:xt,constraints:Ie})}).then(Ve=>en(null,Ve),Ve=>en(Ve))},en=(ye,Ie)=>{if(ye)return an({reason:`Failed to create PeerConnection, exception: ${ye}`,prefix:"NewPeerConnection"}),void(Ut=[]);nt.debug("OT attachEventsToPeerConnection"),Te=Ie,ft&&ft.setPeerConnection(Ie),sn=new D(Te),xt.channels&&sn.addMany(xt.channels);const Ve=(pe=>{let ue=pe.sendMessage,me=pe.logging;const ve={};return Re=>{Re.candidate?(ve[Re.candidate.sdpMid]=Re.candidate.sdpMLineIndex,ue("candidate",{candidate:Re.candidate.candidate,sdpMid:Re.candidate.sdpMid||"",sdpMLineIndex:Re.candidate.sdpMLineIndex||
10})):me.debug("IceCandidateForwarder: No more ICE candidates.")}})({sendMessage:Ge,logging:nt}),rt=ce=>{Ct.resolve(),on(ce.candidate)?nt.debug("Ignore candidate",ce.candidate.candidate):Ve(ce)};let at=Te.iceConnectionState;const Xt=ce=>{Te?(nt.debug("iceconnectionstatechange",Te.iceConnectionState),"connected"===Te.iceConnectionState?("disconnected"===at&&Se.clearFailedTimeout(),Se.emit("iceConnected"),Ke.set(!1)):"completed"===Te.iceConnectionState&&b.isLegacyEdge&&setTimeout(()=>At.startCollecting(Te),1e3)):nt.debug("iceconnectionstatechange on peerConnection that no longer exists",Se);const fe=ce.target.iceConnectionState;Se.trigger("iceConnectionStateChange",fe),re("attachEventsToPeerConnection","iceconnectionstatechange",fe),"disconnected"===fe&&(Ke.get()?(nt.debug("Restarting ice!"),Se.generateOffer()):v()||(qt=setTimeout(()=>{const Ae="failed";re("attachEventsToPeerConnection","iceconnectionstatechange",Ae),at=Ae,Se.trigger("iceConnectionStateChange",Ae)},1e4))),"disconnected"!==at&&"failed"===fe&&an({reason:"The stream was unable to connect due to a network error. Make sure your connection isn't blocked by a firewall.",prefix:"ICEWorkflow"}),at=fe},ne=()=>{re("peerConnection:negotiationNeeded","Event"),Q&&Se.generateOffer()};Te.onaddstream=se,Te.addEventListener("icecandidate",rt),Te.addEventListener("addstream",tn),Te.addEventListener("removestream",it),Te.addEventListener("signalingstatechange",$t),Te.addEventListener("negotiationneeded",ne),Te.addEventListener("iceconnectionstatechange",Xt),Ne.add(()=>{!Te||(Te.onaddstream=null,Te.removeEventListener("icecandidate",rt),Te.removeEventListener("addstream",tn),Te.removeEventListener("removestream",it),Te.removeEventListener("signalingstatechange",$t),Te.removeEventListener("negotiationneeded",ne),Te.removeEventListener("iceconnectionstatechange",Xt))}),Mt(null)},Mt=()=>{for(;Ut.length;)Ut.shift().call(null)},Je=()=>{ft&&(ft.destroy(),ft=null),Ut=[],At.stopCollecting(),Ne.releaseAll(),Ct.clean(),null!==Te&&(Te.destroy&&Te.destroy(),Te=null,Se.trigger("close")),Se.off()},$t=ye=>{const Ie=ye.target.signalingState;Se.emit("signalingStateChange",Ie),"stable"===Ie&&Se.emit("signalingStateStable"),Ie&&Ie!==Pt&&"closed"===(Pt=Ie,nt.debug(`stateChange: ${Pt}`),Pt)&&Je()},dn=()=>{let ye;if(Te.getRemoteStreams)ye=Te.getRemoteStreams();else{if(!Te.remoteStreams)throw new Error("Invalid Peer Connection object implements no method for retrieving remote streams");ye=Te.remoteStreams}return Array.prototype.slice.call(ye)},tn=ye=>{re("createPeerConnection","StreamAdded"),Se.trigger("streamAdded",ye.stream)},it=ye=>{re("peerConnection:streamRemoved","Event"),Se.trigger("streamRemoved",ye.stream)},Nn=(ye,Ie,Ve)=>{he=!1,an({reason:`PeerConnection.offerProcessor ${ye}: ${Ie}`,prefix:Ve})},qe=ye=>{if(he)return void(Ze=ye);he=!0,re("peerConnection:processOffer","Event");const Ie=new w({type:"offer",sdp:ye.content.sdp}
1),Ve=at=>{he=!1,ft&&ft.process(),Ge("answer",at),b.isLegacyEdge||At.startCollecting(Te,Q),Ze&&(qe(Ze),Ze=null)},rt=at=>Se.trigger("remoteVideoSupported",at);En(()=>{x(Te,H.RTCPeerConnection,H.RTCSessionDescription,w,Nt,Ie,te,X,Ve,Nn,rt,ze)})};Se.generateOffer=j(()=>{be?De=!0:(()=>{var ye,Ie;if("closed"===(null==(ye=Te)||null==(Ie=ye.signalingState)?void 0:Ie.toLowerCase()))return;be=!0,re("peerConnection:processSubscribe","Event"),nt.debug("processSubscribe: Sending offer to subscriber.");let Ve=Dt.get()?xt.capableSimulcastStreams:1;"P2P"===le&&!X&&(Ve=1),En(()=>{L({peerConnection:Te,NativeRTCSessionDescription:w,sdpTransforms:Nt,numSimulcastStreams:Ve,offerOverrides:de,offerConstraints:{iceRestart:Ke.get()},replaceBaselineProfile:ze}).then(at=>{nt.debug("processSubscribe: got offer, waiting for _readyToSendOffer"),Vt=at,Ct.promise.then(()=>{nt.debug("processSubscribe: sending offer"),Ge("offer",Vt)})},at=>{an({reason:`subscribeProcessor ${at.message}: ${at.reason}`,prefix:at.prefix})}),Ke.set(!1)})})()},100);const an=ye=>{let Ie=ye.reason,Ve=ye.prefix;nt.error(Ie,"in state",Te?{connectionState:Te.connectionState,iceConnectionState:Te.iceConnectionState,iceGatheringState:Te.iceGatheringState,signalingState:Te.signalingState}:"(none)"),Se.trigger("error",{reason:Ie,prefix:Ve})};function Mn(ye){this.track=ye}Se.addTrack=(ye,Ie)=>{const Ve=new t((rt,at)=>{En(Xt=>{if(Xt)return at(Xt);rt()})}).then(()=>{if(Te.addTrack)return Te.addTrack(ye,Ie);const rt=Te.getLocalStreams()[0];if(void 0===rt)throw new Error("PeerConnection has no existing streams, cannot addTrack");rt.addTrack(ye),Se.generateOffer()}).then(()=>new t(rt=>{Se.once("signalingStateStable",()=>{rt()})}));return r(Ve,15e3,"Renegotiation timed out")},Se.removeTrack=ye=>{const Ie=t.resolve().then(()=>ye instanceof Mn?(Te.getLocalStreams()[0].removeTrack(ye.track),void Se.generateOffer()):Te.removeTrack(ye)).then(()=>new t(Ve=>{Se.once("signalingStateStable",()=>{Ve()})}));return r(Ie,15e3,"Renegotiation timed out")},Se.addLocalStream=ye=>new t((Ie,Ve)=>{En(rt=>{if(rt)Ve(rt);else{try{Te.addStream(ye)}catch(at){return void Ve(at)}Ie()}})}),Se.getLocalStreams=()=>Te.getLocalStreams(),Se.getSenders=()=>Te.getSenders?Te.getSenders():Te.getLocalStreams()[0].getTracks().map(ye=>new Mn(ye)),Se.disconnect=()=>{var ye;ft&&(ft.destroy(),ft=null),(null==(ye=Te)?void 0:ye.signalingState)&&"closed"!==Te.signalingState.toLowerCase()&&(Te.close(),setTimeout(Je))},Se.iceRestart=()=>Ke.set(!0),Se.clearFailedTimeout=()=>clearTimeout(qt),Se.changeMediaDirectionToRecvOnly=()=>B(Te),Se.changeMediaDirectionToInactive=()=>U(Te),Se.processMessage=(ye,Ie)=>{switch(nt.debug(`processMessage: Received ${ye} from ${Ie.fromAddress}`,Ie),nt.debug(Ie),ye){case"generateoffer":Ie.content&&void 0!==Ie.content.simulcastEnabled&&Dt.set(Ie.content.simulcastEnabled),Se.generateOffer(),rt();break;case"offer":qe(Ie),rt();break;case"answer":case"pranswer":(ye=>{re("peerConnection:processAnswer","Event");const Ie=Ve=>{an({reason:`Error while setting RemoteDescription ${Ve}`,prefix:"SetRemoteDescription"})};ye.content.sdp?(lt=new w({type:"answer",sdp:S(Nt,"remote","answer",i({replaceBaselineProfile:ze},Oe),ye.content.sdp).local}),Te.setRemoteDescription(lt).then(()=>{nt.debug("processAnswer: setRemoteDescription Success"),ft&&ft.process()}).catch(Ie),be=!1,De&&(De=!1,Se.generateOffer()),b.isLegacyEdge||At.startCollecting(Te,Q)):Ie("Weird answer message, no SDP.")})(Ie);break;case"candidate":var Ve=new z(Ie.content);if(on(Ve))return nt.debug("Ignore candidate",Ve.candidate),Se;ft&&ft.addIceCandidate(Ve).catch(at=>{nt.warn(`Error while adding ICE candidate: ${JSON.stringify(Ve)}: ${at.toString()}`)});break;default:nt.debug(`processMessage: Received an unexpected message of type ${ye} from ${Ie.fromAddress}: ${JSON.stringify(Ie)}`)}function rt(){tt+=1,At.handleOfferMessageReceived(),tt>1&&(re("Renegotiation","Attempt"),He=!0)}return Se},Se.remoteStreams=()=>Te?dn():[],Se.remoteTracks=()=>Te?Te.getReceivers?Array.prototype.slice.apply(Te.getReceivers()).map(ye=>ye.track):Array.prototype.concat.apply([],dn().map(ye=>ye.getTracks())):[],Se.remoteDescription=()=>Te.remoteDescription,Se.getStats=ye=>{if(Te)C(Te,ye);else{const Ie=Z.PEER_CONNECTION_NOT_CONNECTED;ye(new f(W.getTitleByCode(Ie),k.PEER_CONNECTION_NOT_CONNECTED,{code:Ie}))}},Se.getRtcStatsReport=ye=>{if(Te)R(Te,ye);else{const Ie=Z.PEER_CONNECTION_NOT_CONNECTED;ye(new f(W.getTitleByCode(Ie),k.PEER_CONNECTION_NOT_CONNECTED,{code:Ie}))}},Se.getSynchronizationSources=ye=>{if(!Q){if(!Te){const Ie=Z.PEER_CONNECTION_NOT_CONNECTED;return void ye(new f(W.getTitleByCode(Ie),k.PEER_CONNECTION_NOT_CONNECTED,{code:Ie}))}
1I(Te,ye)}};const In=function ye(Ie,Ve,rt,at){let Xt;const ne=sn.get(Ve,rt);if(!ne){if(Ie>0)return void setTimeout(ye.bind(null,Ie-1,Ve,rt,at),200);Xt=new f(`A channel with that label and options could not be found. Label:${Ve}. Options: ${JSON.stringify(rt)}`)}at(Xt,ne)};Se.getDataChannel=(ye,Ie,Ve)=>{Te?In(100,ye,Ie,Ve):Ve(new f("Cannot create a DataChannel before there is a connection."))},Se.getSourceStreamId=()=>le,Se.iceConnectionStateIsConnected=()=>Te&&["connected","completed"].indexOf(Te.iceConnectionState)>-1,Se.findAndReplaceTrack=(ye,Ie)=>t.resolve().then(()=>{const Ve=Te.getSenders().filter(rt=>rt.track===ye)[0];if(!Ve)return t.resolve();if("function"!=typeof Ve.replaceTrack)throw new Error("Sender does not support replaceTrack");return Ve.replaceTrack(Ie)}),Se.hasRelayCandidates=()=>me,Se.getNegotiatedCodecs=()=>{if(!Te.localDescription||!Te.remoteDescription)return null;const ye=Ie=>s(g.getCodecs(Te.localDescription.sdp,Ie),g.getCodecs(Te.remoteDescription.sdp,Ie));return{audio:ye("audio"),video:ye("video")}},Se.on("signalingStateStable",()=>{He&&(He=!1,re("Renegotiation","Success",Se.getNegotiatedCodecs()))}),Se.on("error",ye=>{He&&-1!==["CreateOffer","SetRemoteDescription"].indexOf(ye.prefix)&&(He=!1,re("Renegotiation","Failure"))}),Se.on("close",()=>{He&&(He=!1,re("Renegotiation","Cancel"))});const At=new V;return At.on("stats",ye=>{ye.dataChannels=sn.sampleQos(),Se.trigger("qos",{parsedStats:ye,simulcastEnabled:Dt.get()})}),Se}}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(2);l.exports=()=>"Chrome"===t.name&&t.version>=58||-1!==["Firefox","Edge","Safari","Opera"].indexOf(t.name)},function(l,E,e){"use strict";l.exports=function(r){let n=null,i=!1;const o=()=>{!i||(r(),n=window.requestAnimationFrame(o))};this.start=()=>{i||(i=!0,window.requestAnimationFrame(o))},this.stop=()=>{window.cancelAnimationFrame(n),i=!1}}},function(l,E,e){"use strict";const t=e(7);l.exports=(n,i)=>{const o={};
1Object.keys(i).forEach(s=>{o[s]=((n,i,o)=>i&&!o?()=>i.call(n):i&&o?s=>(void 0!==s&&o.call(n,s),i.call(n)):s=>{void 0!==s&&o.call(n,s)})(n,i[s].get,i[s].set)}),t(n,o)}},function(l,E,e){"use strict";let t="";l.exports={getCurrentAudioOutputDeviceId:()=>t,setCurrentAudioOutputDeviceId:i=>{t=i}}},function(l,E,e){"use strict";(function(t){l.exports=function(n){return new t(i=>setTimeout(i,n))}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(293);l.exports=function r(n){let o=(void 0===n?{}:n).NativeVideoElementWrapper;const a=void 0===o?t():o;return function u(d){let f=void 0===d?{}:d,h=f.fallbackText;return new a({fallbackText:void 0===h?"Sorry, Web RTC is not available in your browser":h,fitMode:f.fitMode,muted:f.muted,defaultAudioVolume:50,_inject:f._inject,widgetType:f.widgetType})}}},function(l,E){l.exports=function e(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};i.get||i.set?Object.defineProperty(r,n,i):r[n]=t[n]}return r.default=t,r}},function(l,E,e){var n=e(37)(e(14),"Map");l.exports=n},function(l,E,e){var t=e(357),r=e(364),n=e(366),i=e(367),o=e(368);function s(a){var c=-1,u=null==a?0:a.length;for(this.clear();++c<u;){var d=a[c];this.set(d[0],d[1])}}s.prototype.clear=t,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=i,s.prototype.set=o,l.exports=s},function(l,E){l.exports=function e(t,r){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==r(t[n],n,t););return t}},function(l,E){l.exports=function t(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}},function(l,E,e){(function(t){var r=e(173),n=E&&!E.nodeType&&E,i=n&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===n&&r.process,a=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(u){}}();t.exports=a}).call(this,e(84)(l))},function(l,E,e){var t=e(68),r=e(373),i=Object.prototype.hasOwnProperty;l.exports=function o(s){if(!t(s))return r(s);var a=[];for(var c in Object(s))i.call(s,c)&&"constructor"!=c&&a.push(c);return a}},function(l,E,e){var t=e(378),r=e(180),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;l.exports=o?function(a){return null==a?[]:(a=Object(a),t(o(a),function(c){return i.call(a,c)}))}:r},function(l,E){l.exports=function e(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}},function(l,E,e){var r=e(178)(Object.getPrototypeOf,Object);l.exports=r},function(l,E,e){var t=e(187);l.exports=function r(n){var i=new n.constructor(n.byteLength);return new t(i).set(new t(n)),i}},function(l,E,e){"use strict";l.exports={error:{priority:1,method:"error"},warn:{priority:2,method:"warn"},info:{priority:3,method:"info"},log:{priority:4,method:"log"},debug:{priority:5,method:"debug"},spam:{priority:6,method:"log"}}},function(l,E){l.exports=function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}},function(l,E,e){var t=e(394),n=e(193)(t);l.exports=n},function(l,E,e){var t=e(51),r=e(24),n=e(66),i=e(9);l.exports=function o(s,a,c){if(!i(c))return!1;var u=typeof a;return!!("number"==u?r(c)&&n(a,c.length):"string"==u&&a in c)&&t(c[a],s)}},function(l,E,e){"use strict";l.exports=e(195)()?Object.setPrototypeOf:e(196)},function(l,E,e){"use strict";var t=e(54),r={object:!0,function:!0,undefined:!0};l.exports=function(n){return!!t(n)&&hasOwnProperty.call(r,typeof n)}},function(l,E,e){"use strict";l.exports=e(405)()?Object.assign:e(406)},function(l,E,e){"use strict";const t=e(1)("Event"),r=e(7),n=e(127);l.exports=function(){function i(s,a,c){void 0===a&&(a=!0),void 0===c&&(c={}),this.type=s,this.cancelable=a,this._defaultPrevented=!1;const u=n(Object.keys(this),Object.keys(c));if(u.length>0)throw new Error(`Cannot used reserved property names: ${u.join(",")}`);r(this,c)}var o=i.prototype;return o.preventDefault=function(){this.cancelable?this._defaultPrevented=!0:t.warn("Event.preventDefault :: Trying to preventDefault on an event that isn't cancelable")},o.isDefaultPrevented=function(){return this._defaultPrevented},i}()},function(l,E,e){var t=e(33),r=e(446),n=e(87),i=e(452),o=n(function(s){var a=t(s,i);return a.length&&a[0]===s[0]?r(a):[]});l.exports=o},function(l,E){l.exports=function e(t,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;)if(n(r,t[i]))return!0;return!1}},function(l,E,e){var t=e(24),r=e(16);l.exports=function n(i){return r(i)&&t(i)}},function(l,E){l.exports={}}
1,function(l,E,e){var t=e(216),r=e(475),n=e(476),i=e(218),o=e(487),s=e(222),a=e(488),c=e(225),u=e(226),d=e(96),S=Math.max;l.exports=function T(b,O,C,R,I,A,P,x){var D=2&O;if(!D&&"function"!=typeof b)throw new TypeError("Expected a function");var L=R?R.length:0;if(L||(O&=-97,R=I=void 0),P=void 0===P?P:S(d(P),0),x=void 0===x?x:d(x),L-=I?I.length:0,64&O){var N=R,U=I;R=I=void 0}var B=D?void 0:s(b),V=[b,O,C,R,I,N,U,A,P,x];if(B&&a(V,B),b=V[0],O=V[1],C=V[2],R=V[3],I=V[4],!(x=V[9]=void 0===V[9]?D?0:b.length:S(V[9]-L,0))&&24&O&&(O&=-25),O&&1!=O)H=8==O||16==O?n(b,O,x):32!=O&&33!=O||I.length?i.apply(void 0,V):o(b,O,C,R);else var H=r(b,O,C);return u((B?t:c)(H,V),b,O)}},function(l,E,e){var t=e(86),r=e(133);function i(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}(i.prototype=t(r.prototype)).constructor=i,l.exports=i},function(l,E){l.exports=function e(){}},function(l,E){var e="__lodash_placeholder__";l.exports=function t(r,n){for(var i=-1,o=r.length,s=0,a=[];++i<o;){var c=r[i];(c===n||c===e)&&(r[i]=e,a[s++]=i)}return a}},function(l,E,e){var t=e(29),r=e(117),n=e(16),a=Function.prototype.toString,c=Object.prototype.hasOwnProperty,u=a.call(Object);l.exports=function d(f){if(!n(f)||"[object Object]"!=t(f))return!1;var h=r(f);if(null===h)return!0;var g=c.call(h,"constructor")&&h.constructor;return"function"==typeof g&&g instanceof g&&a.call(g)==u}},function(l,E,e){var t=e(10),r=e(71),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;l.exports=function o(s,a){if(t(s))return!1;var c=typeof s;return!("number"!=c&&"symbol"!=c&&"boolean"!=c&&null!=s&&!r(s))||i.test(s)||!n.test(s)||null!=a&&s in Object(a)}},function(l,E,e){var t=e(511),r=e(192),n=e(121);l.exports=function i(o){return n(r(o,void 0,t),o+"")}},function(l,E,e){"use strict";const t=e(239),r=i=>i.replace(/\/$/,"");l.exports={prependProxyToUrlIfNeeded:(i,o)=>{if(!o)return i;const s=t.parse(o),a=t.parse(i);if(!s.protocol||!a.protocol)return i;const c=s.protocol.match(/^https/),d=(a.protocol.match(/^ws/i)?"ws":"http")+(c?"s":"");return`${r(`${d}://${s.host}${s.pathname}`)}/${r(`${a.host}${a.pathname}${a.search||""}`)}`}}},function(l,E,e){"use strict";const t=e(20),r=e(11),n=e(4),i=e(8),o=e(21);let s;const a={SET_PROXY_URL_TIMING_ERROR:"The proxyUrl was set after a session or publisher was created.",PROXY_URL_ALREADY_SET_ERROR:"The proxyUrl has already been set. Setting it again will not have any effect."};l.exports={errorMessages:a,setProxyUrl:c=>{const u=e(27),d=e(72),f=new u,h=t.sessions.length()>0,g=t.publishers.length()>0;let v;if(h){const p=t.sessions.find(y=>"connected"===y.currentState);v=p?p.sessionId:t.sessions.find().sessionId}else v="";const m={sessionId:v,apiKey:d.value};if(g||h){const p=r()(n.SET_PROXY_URL_TIMING_ERROR,new Error(a.SET_PROXY_URL_TIMING_ERROR),i.SET_PROXY_URL_TIMING_ERROR);o.handleJsException({error:p,target:m,analytics:f})}else if(s){const p=r()(n.PROXY_URL_ALREADY_SET_ERROR,new Error(a.PROXY_URL_ALREADY_SET_ERROR),i.PROXY_URL_ALREADY_SET_ERROR);o.handleJsException({error:p,target:m,analytics:f})}else s=c},getProxyUrl:()=>s,clearProxyUrl:()=>{s=null}}},function(l,E,e){var t=e(87),r=e(51),n=e(122),i=e(52),o=Object.prototype,s=o.hasOwnProperty,a=t(function(c,u){c=Object(c);var d=-1,f=u.length,h=f>2?u[2]:void 0;for(h&&n(u[0],u[1],h)&&(f=1);++d<f;)for(var g=u[d],v=i(g),m=-1,p=v.length;++m<p;){var y=v[m],S=c[y];(void 0===S||r(S,o[y])&&!s.call(c,y))&&(c[y]=g[y])}return c});l.exports=a},function(l,E,e){"use strict";var r=e(3)(e(45));const n=e(56),i=e(55);l.exports=function(){function s(a){void 0===a&&(a={}),Object.defineProperty(this,"_rawSessionInfo",{value:i(a)})}return(0,r.default)(s,[{key:"sessionId",get:function(){return this._rawSessionInfo.session_id}},{key:"partnerId",get:function(){return this._rawSessionInfo.partner_id}},{key:"messagingServer",get:function(){return this._rawSessionInfo.messaging_server_url}},{key:"mediaServerName",get:function(){return this._rawSessionInfo.media_server_hostname}},{key:"messagingURL",get:function(){return this._rawSessionInfo.messaging_url}},{key:"symphonyAddress",get:function(){return this._rawSessionInfo.symphony_address}},{key:"iceServers",get:function(){return this._rawSessionInfo.ice_servers}},{key:"simulcast",get:function(){return n(this._rawSessionInfo,"properties.simulcast")}},{key:"reconnection",get:function(){return n(this._rawSessionInfo,"properties.reconnection",!1)}},{key:"renegotiation",get:function(){return n(this._rawSessionInfo,"properties.renegotiation",!1)}},{key:"p2pEnabled",get:function(){return"enabled"===n(this._rawSessionInfo,"properties.p2p.preference.value")}},{key:"hybridSession",get:function(){return n(this._rawSessionInfo,"properties.hybridSession",!1)}},{key:"isAdaptiveEnabled",get:function(){return"adaptive"===n(this._rawSessionInfo,"properties.p2p.preference.value")}},{key:"priorityVideoCodec",get:function(){return n(this._rawSessionInfo,"properties.priorityVideoCodec","")}},{key:"h264",get:function(){return n(this._rawSessionInfo,"properties.h264",!0)}},{key:"vp8",get:function(){return n(this._rawSessionInfo,"properties.vp8",!0)}},{key:"vp9",get:function(){return n(this._rawSessionInfo,"properties.vp9",!0)}},{key:"clientCandidates",get:function(){const c=n(this._rawSessionInfo,"properties.clientCandidates");return"relayed"===c?"relay":c}}]),s}()},function(module,exports,__nested_webpack_require_450021__){"use strict";const extendES5Native=__nested_webpack_require_450021__(546),webrtcAdapter=__nested_webpack_require_450021__(547),logging=__nested_webpack_require_450021__(1)("createWindowMock"),env=__nested_webpack_require_450021__(2),windowKeys=[{key:"location",type:"object"},{key:"setTimeout",type:"function"},{key:"requestAnimationFrame",type:"function"},{key:"URL",type:"function"},{key:"MediaStream",type:"class"},{key:"webkitMediaStream",type:"class"},{key:"RTCIceCandidate",type:"class"},{key:"mozRTCIceCandidate",type:"class"},{key:"RTCSessionDescription",type:"class"},{key:"mozRTCSessionDescription",type:"class"},{key:"RTCIceGatherer",type:"class"},{key:"RTCIceTransport",type:"class"}
1,{key:"RTCDtlsTransport",type:"class"},{key:"RTCSctpTransport",type:"class"},{key:"RTCRtpReceiver",type:"class"},{key:"HTMLMediaElement",type:"class"},{key:"RTCPeerConnection",type:"class"},{key:"webkitRTCPeerConnection",type:"class"},{key:"mozRTCPeerConnection",type:"class"},{key:"MediaStreamTrack",type:"class"},{key:"RTCRtpSender",type:"class"},{key:"RTCTrackEvent",type:"class"},{key:"RTCTransceiver",type:"class"},{key:"RTCDtmfSender",type:"class"},{key:"RTCDTMFSender",type:"class"},{key:"MediaStreamTrackEvent",type:"class"}],navigatorKeys=[{key:"userAgent",type:"string"},{key:"getUserMedia",type:"function"},{key:"getDisplayMedia",type:"function"},{key:"webkitGetUserMedia",type:"function"},{key:"mozGetUserMedia",type:"function"}],mediaDevicesKeys=[{key:"getUserMedia",type:"function"},{key:"getDisplayMedia",type:"function"},{key:"enumerateDevices",type:"function"},{key:"getSupportedConstraints",type:"function"},{key:"addEventListener",type:"function"},{key:"removeEventListener",type:"function"}],bindWithStaticProperties=(l,E)=>{if("function"!=typeof E)return logging.warn("Non-function passed into bindWithStaticProperties()"),E;const e=E.bind(l);
1return Object.keys(E).forEach(t=>{e[t]=E[t]}),e},extendParentClass=ParentClass=>{try{const ChildClass=eval('\n      "use strict"; // Chrome<49 requires strict mode\n\n      const getOwnProperties = (target) => {\n        const properties = {};\n        Object.getOwnPropertyNames(target).forEach((key) => {\n          properties[key] = Object.getOwnPropertyDescriptor(target, key);\n        });\n        return properties;\n      };\n\n      class ChildClass extends ParentClass {\n        constructor(...args) {\n          super(...args);\n          try {\n            this.__proto__ = ChildClass.prototype;\n          } catch (e) {}\n        }\n      };\n\n      Object.defineProperties(ChildClass.prototype, getOwnProperties(ParentClass.prototype));\n      Object.keys(ParentClass)\n        .forEach((staticKey) => {\n          ChildClass[staticKey] = ParentClass[staticKey];\n        });\n\n      ChildClass; // Ensure the final statement is returned in FF\n    ');if(ChildClass&&ChildClass.prototype instanceof ParentClass)return ChildClass}catch(l){}return null},canUseES6Class=l=>{const e=extendParentClass(l.RTCPeerConnection||l.webkitRTCPeerConnection||l.mozRTCPeerConnection);if(e)try{e.prototype.foo="bar";const t=new e({iceServers:[]}),r="bar"===t.foo;try{t.close()}catch(n){}return r}catch(t){}return!1},extendClass=(l,E,e)=>{if("function"!=typeof l)return logging.warn("Non-function passed into extendClass()"),l;let t=e&&extendParentClass(l);return t||(t=extendES5Native(l)),t},getCopyProperties=l=>(E,e,t)=>{t.forEach(r=>{let n=r.key,i=r.type,o=e[n];if(void 0!==o){switch(i){case"function":o=bindWithStaticProperties(e,o);break;case"class":o=extendClass(o,n,l);break;case"string":case"object":break;default:throw new Error(`Invalid type of window key: ${i}`)}E[n]=o}})},cloneWindow=l=>{const E={},e=getCopyProperties(canUseES6Class(l));return e(E,l,windowKeys),void 0!==l.navigator&&(E.navigator={},e(E.navigator,l.navigator,navigatorKeys),void 0!==l.navigator.mediaDevices&&(E.navigator.mediaDevices={},e(E.navigator.mediaDevices,l.navigator.mediaDevices,mediaDevicesKeys))),E};module.exports=function l(E){if(void 0!==E.adapter||env.isLegacyEdge)return E;const e=cloneWindow(E);return webrtcAdapter({window:e}),e}},function(l,E,e){"use strict";l.exports=function(){let r=null;this.transform=n=>{r=null===r||n>=r?n:.3*n+.7*r;const i=Math.log(r)/Math.LN10/1.5+1;return Math.min(Math.max(i,0),1)}}},function(l,E,e){"use strict";const t=e(6),r=i=>Object.keys(i).map(o=>i[o]),n=e(7);l.exports=function(o){const s={},a=(c,u)=>{n(u,{parent:this}),u.appendTo(o.parent),s[c]=u,this[c]=u};!o.parent||(t(this),this.destroy=()=>{this.off(),this.hideWhileLoading(),r(s).forEach(c=>c.destroy())},this.showAfterLoading=()=>{r(s).forEach(c=>c.showAfterLoading())},this.hideWhileLoading=()=>{r(s).forEach(c=>c.hideWhileLoading())},this.set=(c,u)=>("string"==typeof c&&u?a(c,u):Object.keys(c).forEach(d=>{a(d,c[d])}),this))}},function(l,E,e){"use strict";var r=e(3)(e(18));l.exports=function(){function i(s){(0,r.default)(this,"_analyser",null),(0,r.default)(this,"_timeDomainData",null),(0,r.default)(this,"_sourceNode",null),this._audioContext=s}var o=i.prototype;return o._initAudioAnalyser=function(a){this._analyser=this._audioContext.createAnalyser(),this._sourceNode=this._audioContext.createMediaStreamSource(a),this._sourceNode.connect(this._analyser),this._timeDomainData=new Uint8Array(this._analyser.frequencyBinCount)},o.webRTCStream=function(a){this._sourceNode&&this._sourceNode.disconnect(this._analyser),"suspended"===this._audioContext.state&&this._audioContext.resume(),this._initAudioAnalyser(a)},o.destroy=function(){this._sourceNode&&this._sourceNode.disconnect(this._analyser),this._timeDomainData=null},o.sample=function(a){if("function"==typeof a)throw new Error("sample no longer takes a callback");if(this._analyser&&this._timeDomainData){this._analyser.getByteTimeDomainData(this._timeDomainData);let c=0;for(let u=this._timeDomainData.length-1;u>=0;u-=1)c=Math.max(c,Math.abs(this._timeDomainData[u]-128));return c/128}return null},i}()},function(l,E,e){"use strict";const t=e(558),r=e(26),n=e(6),i=e(22)();l.exports=new function o(){const s=this;function a(){return t.isDomLoaded()&&!t.isDomUnloaded()}function d(){s.dispatchEvent(new i.EnvLoadedEvent(r.ENV_UNLOADED))}n(s),t.whenLoaded.then(function u(){t.whenUnloaded.then(d),function c(){a()&&s.dispatchEvent(new i.EnvLoadedEvent(r.ENV_LOADED))}()}),this.onLoad=function(f,h){a()?f.call(h):s.on(r.ENV_LOADED,f,h)},this.onUnload=function(f,h){this.isUnloaded()?f.call(h):s.on(r.ENV_UNLOADED,f,h)},this.isUnloaded=function(){return t.isDomUnloaded()}}},function(l,E,e){var t=e(559),n=e(191)(function(i,o,s){t(i,o,s)});l.exports=n},function(l,E,e){"use strict";var t=e(563);function r(x,D){if(x===D)return 0;for(var L=x.length,N=D.length,U=0,B=Math.min(L,N);U<B;++U)if(x[U]!==D[U]){L=x[U],N=D[U];break}return L<N?-1:N<L?1:0}function n(x){return(void 0!==typeof window?window:global).Buffer&&"function"==typeof(void 0!==typeof window?window:global).Buffer.isBuffer?(void 0!==typeof window?window:global).Buffer.isBuffer(x):!(null==x||!x._isBuffer)}var i=e(564),o=Object.prototype.hasOwnProperty,s=Array.prototype.slice,a="foo"===function(){}.name;function c(x){return Object.prototype.toString.call(x)}function u(x){return!n(x)&&"function"==typeof(void 0!==typeof window?window:global).ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(x):!!x&&!!(x instanceof DataView||x.buffer&&x.buffer instanceof ArrayBuffer))}var d=l.exports=y,f=/\s*function\s+([^\(\s]*)\s*/;function h(x){if(i.isFunction(x)){if(a)return x.name;var L=x.toString().match(f);return L&&L[1]}}function g(x,D){return"string"==typeof x?x.length<D?x:x.slice(0,D):x}function v(x){if(a||!i.isFunction(x))return i.inspect(x);var D=h(x);return"[Function"+(D?": "+D:"")+"]"}function p(x,D,L,N,U){throw new d.AssertionError({message:L,actual:x,expected:D,operator:N,stackStartFunction:U})}function y(x,D){x||p(x,!0,D,"==",d.ok)}
1function S(x,D,L,N){if(x===D)return!0;if(n(x)&&n(D))return 0===r(x,D);if(i.isDate(x)&&i.isDate(D))return x.getTime()===D.getTime();if(i.isRegExp(x)&&i.isRegExp(D))return x.source===D.source&&x.global===D.global&&x.multiline===D.multiline&&x.lastIndex===D.lastIndex&&x.ignoreCase===D.ignoreCase;if(!(null!==x&&"object"==typeof x||null!==D&&"object"==typeof D))return L?x===D:x==D;if(u(x)&&u(D)&&c(x)===c(D)&&!(x instanceof Float32Array||x instanceof Float64Array))return 0===r(new Uint8Array(x.buffer),new Uint8Array(D.buffer));if(n(x)!==n(D))return!1;var U=(N=N||{actual:[],expected:[]}).actual.indexOf(x);return-1!==U&&U===N.expected.indexOf(D)||(N.actual.push(x),N.expected.push(D),function b(x,D,L,N){if(null==x||null==D)return!1;if(i.isPrimitive(x)||i.isPrimitive(D))return x===D;if(L&&Object.getPrototypeOf(x)!==Object.getPrototypeOf(D))return!1;var U=T(x),B=T(D);if(U&&!B||!U&&B)return!1;if(U)return S(x=s.call(x),D=s.call(D),L);var j,M,V=P(x),H=P(D);if(V.length!==H.length)return!1;for(V.sort(),H.sort(),M=V.length-1;M>=0;M--)if(V[M]!==H[M])return!1;for(M=V.length-1;M>=0;M--)if(!S(x[j=V[M]],D[j],L,N))return!1;return!0}(x,D,L,N))}function T(x){return"[object Arguments]"==Object.prototype.toString.call(x)}function C(x,D){if(!x||!D)return!1;if("[object RegExp]"==Object.prototype.toString.call(D))return D.test(x);try{if(x instanceof D)return!0}catch(L){}return!Error.isPrototypeOf(D)&&!0===D.call({},x)}function I(x,D,L,N){var U;if("function"!=typeof D)throw new TypeError('"block" argument must be a function');"string"==typeof L&&(N=L,L=null),U=function R(x){var D;try{x()}catch(L){D=L}return D}(D),N=(L&&L.name?" ("+L.name+").":".")+(N?" "+N:"."),x&&!U&&p(U,L,"Missing expected exception"+N);var B="string"==typeof N,H=!x&&U&&!L;if((!x&&i.isError(U)&&B&&C(U,L)||H)&&p(U,L,"Got unwanted exception"+N),x&&U&&L&&!C(U,L)||!x&&U)throw U}d.AssertionError=function(D){this.name="AssertionError",this.actual=D.actual,this.expected=D.expected,this.operator=D.operator,D.message?(this.message=D.message,this.generatedMessage=!1):(this.message=function m(x){return g(v(x.actual),128)+" "+x.operator+" "+g(v(x.expected),128)}(this),this.generatedMessage=!0);var L=D.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,L);else{var N=new Error;if(N.stack){var U=N.stack,B=h(L),V=U.indexOf("\n"+B);if(V>=0){var H=U.indexOf("\n",V+1);U=U.substring(H+1)}this.stack=U}}},i.inherits(d.AssertionError,Error),d.fail=p,d.ok=y,d.equal=function(D,L,N){D!=L&&p(D,L,N,"==",d.equal)},d.notEqual=function(D,L,N){D==L&&p(D,L,N,"!=",d.notEqual)},d.deepEqual=function(D,L,N){S(D,L,!1)||p(D,L,N,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(D,L,N){S(D,L,!0)||p(D,L,N,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(D,L,N){S(D,L,!1)&&p(D,L,N,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function O(x,D,L){S(x,D,!0)&&p(x,D,L,"notDeepStrictEqual",O)},d.strictEqual=function(D,L,N){D!==L&&p(D,L,N,"===",d.strictEqual)},d.notStrictEqual=function(D,L,N){D===L&&p(D,L,N,"!==",d.notStrictEqual)},d.throws=function(x,D,L){I(!0,x,D,L)},d.doesNotThrow=function(x,D,L){I(!1,x,D,L)},d.ifError=function(x){if(x)throw x},d.strict=t(function A(x,D){x||p(x,!0,D,"==",A)},d,{equal:d.strictEqual,deepEqual:d.deepStrictEqual,notEqual:d.notStrictEqual,notDeepEqual:d.notDeepStrictEqual}),d.strict.strict=d.strict;var P=Object.keys||function(x){var D=[];for(var L in x)o.call(x,L)&&D.push(L);return D}},function(l,E,e){"use strict";const t=e(268),r=e(6),n=e(1)("StreamChannel"),i=e(150)();l.exports=function(s){this.id=s.id,this.type=s.type,this.active=t(s.active),this.orientation=s.orientation||i.ROTATED_NORMAL,s.frameRate&&(this.frameRate=parseFloat(s.frameRate)),s.preferredFrameRate&&(this.preferredFrameRate=parseFloat(s.preferredFrameRate)),s.preferredWidth&&(this.preferredWidth=parseInt(s.preferredWidth,10)),s.preferredHeight&&(this.preferredHeight=parseInt(s.preferredHeight,10)),this.width=parseInt(s.width,10),this.height=parseInt(s.height,10),this.source=s.source||"camera",this.fitMode=s.fitMode||"cover",r(this),this.update=function(a){const c={},u={};
1for(const d in a){if(!a.hasOwnProperty(d))continue;const f=this[d];switch(d){case"active":this.active=t(a[d]);break;case"disableWarning":this.disableWarning=t(a[d]);break;case"frameRate":this.frameRate=parseFloat(a[d],10);break;case"width":case"height":this[d]=parseInt(a[d],10),c[d]=this[d],u[d]=f;break;case"orientation":this[d]=a[d],c[d]=this[d],u[d]=f;break;case"fitMode":case"source":this[d]=a[d];break;default:return n.warn(`Tried to update unknown key ${d} on ${this.type} channel ${this.id}`),!1}this.trigger("update",this,d,f,this[d])}return Object.keys(c).length&&this.trigger("update",this,"videoDimensions",u,c),!0}}},function(l,E,e){"use strict";l.exports=function(){return{ROTATED_NORMAL:0,ROTATED_LEFT:270,ROTATED_RIGHT:90,ROTATED_UPSIDE_DOWN:180}}},function(l,E,e){"use strict";const t=e(579),r=e(1)("StylableComponent"),n=e(580),i=e(581);l.exports=function(s,a,c,u){if(!s.trigger)throw new Error("OT.StylableComponent is dependent on the eventing mixin. Ensure that this is included in the object before StylableComponent.");u=u||function(){};let d=!1;!1===c&&(a={buttonDisplayMode:"off",nameDisplayMode:"off",audioLevelDisplayMode:"off",videoDisabledDisplayMode:"off",audioBlockedDisplayMode:"off"},d=!0,u({showControls:!1}));const h=new n(a,function(v,m,p){p?s.trigger("styleValueChanged",v,m,p):s.trigger("styleValueChanged",v,m)});s.getStyle=function(g){return h.get(g)},s.setStyle=function(g,v,m){if(d)return r.warn("Calling setStyle() has no effect because theshowControls option was set to false"),this;let p;return"string"!=typeof g?p=g:(p={},p[g]=v),p.backgroundImageURI&&(p.backgroundImageURI=t(p.backgroundImageURI)),h.setAll(p,m),u(i(p)),this}}},function(l,E,e){"use strict";const t=e(49),r=e(44)(),n=e(27),i=e(72),o=e(146),s=e(60).once,a=e(584),c=e(5),u=e(1)("systemRequirements"),d=e(585),f=e(586),h=r.onlyLocal(),g=new n,v=t(()=>{g.logEvent({action:"checkSystemRequirements",variation:"notHasRequirements",partnerId:i.value,payload:{userAgent:c.env.userAgent}})});let m=!1;l.exports={check(){u.debug("OT.checkSystemRequirements()");const p=Number(a&&s());return p||v(),p},upgrade(p){let y=void 0===p?{}:p,S=y.isSupportedButOld,T=void 0===S?c.env.name.toLowerCase()in h.minimumVersion:S,b=y.userAgent,O=void 0===b?navigator.userAgent:b;o.onLoad(()=>{if(m)return;const C=new f(d);let R;m=!0,C.on("close",()=>{m=!1}),C.open(),R=O.match(/(iPad|iPhone|iPod|android|webOS)/i)?(T?"supported-":"")+"mobile-browser":(T?"upgrade":"normal")+"-install",C.el(`#section-${R}`).style.display="block"})}}},function(l,E,e){"use strict";(function(t){var r=e(3),n=r(e(59)),i=r(e(587));const o=e(591);let s=function(a){function c(u){var d;return(d=a.call(this,u)||this).name="TimeoutError",d}return(0,n.default)(c,a),c}((0,i.default)(Error));l.exports=(a,c,u)=>new t((d,f)=>{if("number"!=typeof c||c<0)throw new TypeError("Expected `ms` to be a positive number");const h=setTimeout(()=>{if("function"==typeof u){try{d(u())}catch(m){f(m)}return}const v=u instanceof Error?u:new s("string"==typeof u?u:`Promise timed out after ${c} milliseconds`);"function"==typeof a.cancel&&a.cancel(),f(v)},c);o(a.then(d,f),()=>{clearTimeout(h)})}),l.exports.TimeoutError=s}).call(this,e(0))},function(l,E,e){"use strict";l.exports=function t(){const r=[];return{add(n){r.push(n)},remove(n){const i=r.indexOf(n);i>=0&&r.splice(i,1)},releaseAll(){const n=[];for(;r.length>0;){const o=r.pop();try{o()}catch(s){n.push(s)}}const i=n.length;if(i>0)throw new Error(`Failed to complete ${i} cleanup job${1===i?"":"s"}: ${n.map(o=>`<${o}>`).join(", ")}`)}}}},function(l,E,e){"use strict";const t=e(1)("applySdpTransform");l.exports=(r,n,i,o,s)=>{const a=r[n][i],c=`${n} ${i}`,d=`sdpTransforms (${"local offer"===c||"remote answer"===c?"publisher":"subscriber"}): ${n} ${i}`;t.debug(`${d}: ${"local"===n?"created":"received"}:\n${s}`);const h=a(o,s);return t.debug(h.local===s?`${d}: not modified`:`${d}: modified to:\n${h.local}`),h}},function(l,E){l.exports=function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(l,E,e){"use strict";l.exports=function(n){if(void 0===n&&(n={}),!n)return 0;const o=n.currentStatFrames,s=void 0===o?0:o,a=n.prevStatFrames,c=void 0===a?0:a,u=n.currentTimestamp,d=void 0===u?0:u,f=n.prevTimestamp,h=void 0===f?0:f;return s>=c&&d>
1h?Math.round((s-c)/((d-h)/1e3)*100)/100:0}},function(l,E,e){"use strict";let t;l.exports=function(n){void 0===n&&(n={});const i=n.AudioContext||(void 0!==typeof window?window:global).AudioContext||(void 0!==typeof window?window:global).webkitAudioContext;return function(){if(t=t||i&&new i,null==t)throw new Error("AudioContext could not be created, hardware limit reached.");return t}}},function(l,E,e){"use strict";var t=e(3);E.__esModule=!0,E.default=void 0;var r=t(e(56)),i="function"==typeof(0,r.default)(void 0!==typeof window?window:global,"navigator.getDisplayMedia",(0,r.default)(void 0!==typeof window?window:global,"navigator.mediaDevices.getDisplayMedia"));E.default=i},function(l,E,e){"use strict";const t=e(36);l.exports=function(){return function(i,o,s){const a=o.slice(),c=t(s);return function(f){let h=i,g=null;function v(p,y){f({message:p,newState:y,currentState:h,previousState:g})}this.current=h,this.set=function(p){!function m(p){return function(h){return-1!==a.indexOf(h)}(p)?!!function(h,g){return c[h]&&-1!==c[h].indexOf(g)}(h,p)||(v(`'${h}' cannot transition to '${p}'`,p),!1):(v(`'${p}' is not a valid state`,p),!1)}(p)||(g=h,this.current=p,h=p)}}}}},function(l,E,e){"use strict";(function(t){const r=e(61);l.exports=function(i){void 0===i&&(i={});const o=i.chromeExtensionHelper||e(280)(),s=i.electronExtensionHelper||e(627)(),a=i.Errors||e(4),c=i.firefoxExtensionHelper||e(629),u=i.getDisplayMediaExtensionHelper||e(287),d=i.otError||e(11)(),f=i.OTHelpers||e(5),h={extensionByKind:{},extensionClasses:{},registerExtensionHelper:(m,p)=>{h.extensionClasses[m]=p,p.autoRegisters&&p.isSupportedInThisBrowser&&h.registerExtension(m)},registerExtension:function(m){if(null==h.extensionClasses[m])throw new Error("Unsupported kind passed to OT.registerScreenSharingExtension");for(var p=arguments.length,y=new Array(p>1?p-1:0),S=1;S<p;S++)y[S-1]=arguments[S];const T=h.extensionClasses[m].register(...y);h.extensionByKind[m]=T}},g=()=>{const m=r(Object.keys(h.extensionClasses).sort(p=>"electron"===p?-1:1),p=>h.extensionClasses[p].isSupportedInThisBrowser);return void 0===m?{}:{name:m,proto:h.extensionClasses[m],instance:h.extensionByKind[m]}};h.pickHelper=()=>g(),h.checkCapability=m=>{const p={supported:!1,extensionRequired:void 0,extensionRegistered:void 0,extensionInstalled:void 0,supportedSources:{}},y=g();if(void 0!==y.name)return p.supported=!0,p.extensionRequired=y.proto.extensionRequired?y.name:void 0,p.supportedSources={screen:y.proto.sources.screen,application:y.proto.sources.application,window:y.proto.sources.window,browser:y.proto.sources.browser},y.instance?(p.extensionRegistered=!!p.extensionRequired||void 0,void y.instance.isInstalled(S=>{p.extensionInstalled=p.extensionRequired||"Firefox"===f.env.name?S:void 0,m(p)})):(p.extensionRegistered=!1,p.extensionRequired&&(p.extensionInstalled=!1),void setTimeout(m.bind(null,p)));setTimeout(m.bind(null,p))},h.registerExtensionHelper("electron",s),h.registerExtensionHelper("getDisplayMedia",u),h.registerExtensionHelper("chrome",o),h.registerExtensionHelper("firefox",c);const v=()=>{};return h.getConstraints=m=>{const p=m.onAccessDialogOpened,y=void 0===p?v:p,S=m.onAccessDialogClosed,T=void 0===S?v:S,b=m.videoSource,O=m.constraints;return new t((C,R)=>{h.checkCapability(I=>
1{if(I.supported)if(!1===I.extensionRegistered)R(d(a.SCREEN_SHARING_EXTENSION_NOT_REGISTERED,new Error("Screen Sharing support in this browser requires an extension, but one has not been registered.")));else if(I.extensionRequired&&!1===I.extensionInstalled)R(d(a.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,new Error("Screen Sharing support in this browser requires an extension, but the extension is not installed.")));else{const A=h.pickHelper();A.proto.getConstraintsShowsPermissionUI&&y(),A.instance.getConstraints(b,O,(P,x)=>{A.proto.getConstraintsShowsPermissionUI&&T(),P?R(P):C(x)})}else{let A="Screen Sharing is not supported in this browser";f.env.isElectron?A="Set the webPreferences.contextIsolation option of the Electron BrowserWindow to false or use a preload script to access the desktop capturer. For more information, see https://tokbox.com/developer/guides/screen-sharing/js/.":"Chrome"===f.env.name&&f.env.version>73&&"https:"!==(void 0!==typeof window?window:global).location.protocol&&(A="https:// is required for screen sharing"),R(d(a.SCREEN_SHARING_NOT_SUPPORTED,new Error(A)))}})})},h}}).call(this,e(0))},function(l,E,e){"use strict";l.exports=function(r){void 0===r&&(r={});const n=r.Errors||e(4),i=r.ExceptionCodes||e(8),o=r.otError||e(11)(),s={ICEWorkflow:n.ICE_WORKFLOW_FAILED,NewPeerConnection:n.CREATE_PEER_CONNECTION_FAILED,SetRemoteDescription:n.SET_REMOTE_DESCRIPTION_FAILED,Subscribe:{404:n.STREAM_NOT_FOUND,[i.STREAM_LIMIT_EXCEEDED]:n.STREAM_LIMIT_EXCEEDED}};return function(c,u,d,f,h){const g=`${(d?`${d}: `:"")+h} PeerConnection with connection ${f} failed: ${u}`,v=s[d]||{},m="string"==typeof v?v:v[c],p="Publisher"===h?i.UNABLE_TO_PUBLISH:i.UNABLE_TO_SUBSCRIBE;if(!m){const S=new Error(g);return S.code=p,S}const y="ICEWorkflow"===d?"Publisher"===h?i.PUBLISHER_ICE_WORKFLOW_FAILED:i.SUBSCRIBER_ICE_WORKFLOW_FAILED:m===n.STREAM_LIMIT_EXCEEDED?i.STREAM_LIMIT_EXCEEDED:p;return o(m,new Error(g),y)}}},function(l,E,e){"use strict";l.exports=function(r){void 0===r&&(r={});const n=r.OTHelpers||e(5),o=(r.global||(void 0!==typeof window?window:global)).RTCPeerConnection;return function(a,c){"Firefox"===n.env.name&&o&&o.generateCertificate?o.generateCertificate({name:"RSASSA-PKCS1-v1_5",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])}).catch(u=>{c(u)}).then(u=>{a.certificates=[u],c(void 0,a)}):setTimeout(()=>{c(void 0,a)})}}},function(l,E,e){"use strict";var t=e(3),r=t(e(12)),n=t(e(13)),i=t(e(45)),o=t(e(18));const s=e(6),a=e(643),c=e(1)("WidgetView"),u=e(5),d=e(644),f=e(2),h=e(165),g=h.default,v=h.CancellationError,m=e(166),p=e(646),y=e(647),S=e(648),T=e(649),b=e(650),O=e(62),C=e(107);C(),l.exports=function I(A){let P=void 0===A?{}:A,x=P.logging,D=void 0===x?c:x,L=P.OTHelpers,N=void 0===L?u:L,U=P.versionGreaterThan,B=void 0===U?d:U,V=P.VideoElementFacade,H=void 0===V?C():V,j=P.env,M=void 0===j?f:j;const F=a({window:void 0!==typeof window?window:global});let z=function(){function w(W,Z){let ie=void 0===Z?{}:Z,_=ie.insertDefaultUI,se=void 0===_||_,pe=ie.width,ue=void 0===pe?264:pe,me=ie.height,ve=void 0===me?198:me,Re=ie.fitMode,Me=void 0===Re?"cover":Re,Q=ie.mirror,K=void 0!==Q&&Q,re=ie.insertMode,de=ie.classNames,Oe=ie.style,xe=ie.widgetType;(0,o.default)(this,"_videoElementFacade",void 0),(0,o.default)(this,"_container",void 0),(0,o.default)(this,"_posterContainer",document.createElement("div")),(0,o.default)(this,"_widgetContainer",document.createElement("div")),(0,o.default)(this,"_loading",!0),(0,o.default)(this,"_audioOnly",!1),(0,o.default)(this,"_showPoster",void 0),(0,o.default)(this,"_poster",void 0),(0,o.default)(this,"_cancelBind",void 0),s(this),!1===/^(contain|cover)$/.test(Me)&&D.warn(`Invalid fit value "${Me}" passed. Only "contain" and "cover" can be used.`),this._widgetType=xe,this._fitMode=Me,this._insertDefaultUI=se;const ke=O(this._widgetContainer);if(ke.on("click",this.userGesture.bind(this)),ke.on("touchstart",this.userGesture.bind(this),!!F&&{passive:!0}),this.once("destroy",()=>ke.removeAll()),this._widgetContainer.classList.add("OT_widget-container"),this._widgetContainer.style.width="100%",this._widgetContainer.style.height="100%",!1!==se){this._container=T(W,re),M.isSafari&&M.isiOS&&M.iOSVersion&&B("11.2",M.iOSVersion)&&this._container.classList.add("OT_ForceContain"),this._container.style.width=b(ue),this._container.style.height=b(ve),this._container.style.overflow="hidden",S(this._container),K&&N.addClass(this._container,"OT_mirrored"),de&&de.trim().split(/\s+/).forEac
1h(he=>this._container.classList.add(he)),this._container.classList.add("OT_loading"),this._container.classList.add(`OT_fit-mode-${Me}`),this._container.appendChild(this._widgetContainer);const be=N(this._container).observeSize(()=>S(this._container))[0],De=N.observeNodeOrChildNodeRemoval(this._container,he=>{this._videoElementFacade&&he.some(ze=>ze===this._widgetContainer||ze===this._videoElementFacade.domElement())&&this.destroyVideo()});this.once("destroy",()=>{D.debug("disconnecting observers"),be.disconnect(),De.disconnect()})}this._posterContainer.classList.add("OT_video-poster"),this._widgetContainer.appendChild(this._posterContainer);const X=document.createElement("div");X.classList.add("OT_video-loading");const te=document.createElement("div");te.classList.add("OT_video-loading-spinner"),X.appendChild(te),this._widgetContainer.appendChild(X),Oe&&Oe.backgroundImageURI&&this.setBackgroundImageURI(Oe.backgroundImageURI)}var k=w.prototype;return k.addError=function(Z,ie,_){this._container&&(this._container.innerHTML=`<p>${Z}${ie?` <span class="ot-help-message">${ie}</span>`:""}</p>`,N.addClass(this._container,_||"OT_subscriber_error"),this._container.querySelector("p").offsetHeight>this._container.offsetHeight&&(this._container.querySelector("span").style.display="none"))},k.destroy=function(){this.emit("destroy"),this.destroyVideo(),this._container&&(N.removeElement(this._container),this._container=null)},k.setBackgroundImageURI=function(Z){N.css(this._posterContainer,"backgroundImage",`url(${Z})`),N.css(this._posterContainer,"backgroundSize","contain"),N.css(this._posterContainer,"opacity","1.0")},k.isAudioBlocked=function(){return Boolean(this._videoElementFacade&&this._videoElementFacade.isAudioBlocked())},k.unblockAudio=function(){return this._videoElementFacade.unblockAudio()},k.userGesture=function(){this.isAudioBlocked()&&m().then(()=>D.debug("Successfully unblocked audio"),Z=>D.error("Error retrying audio on user interaction:",Z))},k.setAudioBlockedUi=function(Z){!this._container||(Z?this._container.classList.add("OT_container-audio-blocked"):this._container.classList.remove("OT_container-audio-blocked"))},k.rebindSrcObject=function(){this._videoElementFacade&&this._videoElementFacade._rebindSrcObject()},k.pauseAndPlayVideoElement=function(){this._videoElementFacade&&this._videoElementFacade._pauseAndPlay()},k.bindVideo=function(){var W=(0,n.default)(r.default.mark(function ie(_,se){var pe,ue,me,ve,Re,Me,Q,K,re;return r.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(pe=se.audioVolume,ue=se.muted,me=se.fallbackText,ve=se._inject,D.debug("bindVideo ",{webRTCStream:_}),Re=this._videoElementFacade,Me=document.createElement("div"),this._cancelBind&&(D.debug("Cancelling last bindVideo request"),this._cancelBind.cancel()),this._cancelBind=new g,Q=this._cancelBind,this.once("destroy",()=>Q.cancel()),this._videoElementFacade=new w.VideoElementFacade({defaultAudioVolume:parseFloat(pe,100),fallbackText:me,fitMode:this._fitMode,_inject:ve,muted:ue,widgetType:this._widgetType}),K=O(this._videoElementFacade),this._videoFacadeEvents&&(D.debug("Remove event listeners from old video facade"),this._videoFacadeEvents.removeAll()),this._videoFacadeEvents=K,K.on("error",()=>{this.trigger("error")}),K.on("videoDimensionsChanged",(ke,X)=>{this.trigger("videoDimensionsChanged",ke,X)}),K.on("mediaStopped",ke=>{this.trigger("mediaStopped",ke)}),K.on("audioBlocked",()=>this.trigger("audioBlocked")),K.on("audioUnblocked",()=>this.trigger("audioUnblocked")),void 0!==pe)try{this._videoElementFacade.setAudioVolume(pe)}catch(ke){D.warn(`bindVideo ${ke}`)}return this._videoElementFacade.audioChannelType("telephony"),Re?this._videoElementFacade.appendTo(Me):(D.debug("Appending the video facade"),this._videoElementFacade.appendTo(this._widgetContainer)),xe.prev=20,xe.next=23,this._videoElementFacade.bindToStream(_);case 23:xe.next=34;break;case 25:if(xe.prev=25,xe.t0=xe.catch(20),!Q.isCanceled()){xe.next=32;break}
1throw D.debug("Refusing to destroyVideo as bindVideo was cancelled"),new v("CANCEL");case 32:throw this.destroyVideo(),xe.t0;case 34:if(Re||(this._videoElementFacade.domElement()&&this.trigger("videoElementCreated",this._videoElementFacade.domElement()),K.on("videoElementCreated",ke=>{this.trigger("videoElementCreated",ke)})),!Q.isCanceled()){xe.next=38;break}throw D.debug("bindVideo bailing due to cancellation"),new v("CANCEL");case 38:if(re=y(this._videoElementFacade,5e3),this.audioOnly()&&"subscriber"===this._widgetType||!(_.getVideoTracks().length>0)){xe.next=45;break}return D.debug("Waiting for correct resolution"),xe.next=44,p(this._videoElementFacade,5e3);case 44:D.debug(`Resolution: ${this._videoElementFacade.videoWidth()}x${this._videoElementFacade.videoHeight()}`);case 45:return D.debug("Waiting for video to be playing"),xe.next=48,re;case 48:if(D.debug("Video is playing"),!Q.isCanceled()){xe.next=52;break}throw D.debug("bindVideo bailing due to cancellation"),new v("CANCEL");case 52:Re&&(this._videoElementFacade.domElement()&&this.trigger("videoElementCreated",this._videoElementFacade.domElement()),K.on("videoElementCreated",ke=>{this.trigger("videoElementCreated",ke)}),D.debug("Destroy the old video facade"),Re.destroy(),D.debug("Insert the new video facade"),this._videoElementFacade.appendTo(this._widgetContainer)),!1!==this._insertDefaultUI&&N.addClass(this._videoElementFacade.domElement(),"OT_video-element");case 54:case"end":return xe.stop()}},ie,this,[[20,25]])}));return function Z(ie,_){return W.apply(this,arguments)}}(),k.bindAudioTrackOnly=function(){this._videoElementFacade&&this._videoElementFacade.bindAudioTrackOnly()},k.destroyVideo=function(){this._videoElementFacade&&(this._videoElementFacade.destroy(),this._videoElementFacade=null)},k.video=function(){return this._videoElementFacade},k.showPoster=function(Z){return void 0===Z?!N.isDisplayNone(this._posterContainer):(this._showPoster=Z,N[Z?"show":"hide"](this._posterContainer),this.showPoster())},k.poster=function(Z){return void 0===Z?N.css(this._posterContainer,"backgroundImage"):(this._poster=Z,N.css(this._posterContainer,"backgroundImage",`url(${Z})`),this.poster())},k.loading=function(Z){return void 0===Z?this._loading:(this._loading=Boolean(Z),this._container&&this._container.classList[Z?"add":"remove"]("OT_loading"),this.loading())},k.audioOnly=function(Z){return void 0===Z?this._audioOnly:(this._audioOnly=Z,this._container&&this._container.classList[Z?"add":"remove"]("OT_audio-only"),this.audioOnly())},k.domId=function(){return this._container&&this._container.getAttribute("id")},k.setSinkId=function(Z){if(this._videoElementFacade)return this._videoElementFacade.setSinkId(Z)},(0,i.default)(w,[{key:"domElement",get:function(){return this._container}},{key:"videoElement",get:function(){return this._videoElementFacade&&this._videoElementFacade.domElement()||void 0}},{key:"width",get:function(){return this.videoElement&&this.videoElement.offsetWidth}},{key:"height",get:function(){return this.videoElement&&this.videoElement.offsetHeight}}]),w}();return z.VideoElementFacade=H,z}},function(l,E,e){"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.CancellationError=E.default=void 0;var r=o(e(645)),i=o(e(298));function o(s){return s&&s.__esModule?s:{default:s}}E.default=r.default,E.CancellationError=i.default},function(l,E,e){"use strict";(function(t){const r=e(20);l.exports=()=>t.all(r.subscribers.where().map(n=>{if(n.isAudioBlocked())return n._.unblockAudio()}))}).call(this,e(0))},function(l,E,e){"use strict";l.exports=t=>"P2P"===t?"RELAYED":"ROUTED"},function(l,E,e){"use strict";(function(t){var r=e(3),n=r(e(12)),i=r(e(13)),o=r(e(25));const s=e(56),a=e(148),c=e(7),u=e(55),d=e(61),f=e(275),h=e(47),g=e(49),v=e(664),m=e(19),p=e(258),y=e(194),S=e(165),T=S.CancellationError,b=S.default,O=e(2),C=e(674),R=e(307),I=e(75),A=e(26),P=e(6),x=e(106),D=e(126),L=e(27),N=e(74),U=e(154),B=e(675),V=e(164)(),H=e(676),j=e(677),M=e(166),z=e(23)().getInputMediaDevices,w=e(678),k=e(269),W=e(306),Z=e(679),ie=e(680),_=e(290),se=_.setVideoContentHint,pe=_.getVideoContentHint,ue=e(167);l.exports=function(Me){void 0===Me&&(Me={});let K=(0,o.default)({},Me);["processPubOptions"].forEach(Ut=>{a(K[Ut],`${Ut} dependency must be injected into Publisher`)});const re=K.AnalyticsHelper||L,de=K.calculateCapableSimulcastStreams||e(252),Oe=K.createChromeMixin||e(281)(),xe=K.deviceHelpers||e(23)(),ke=K.EnvironmentLoader||e(146),X=K.Errors||e(4),te=K.Events||e(22)(),le=K.ExceptionCodes||e(8),be=K.interpretPeerConnectionError||e(162)(),De=K.IntervalRunner||N,he=K.logging||e(1)("Publisher"),Ze=K.Microphone||e(291)(),ze=K.otError||e(11)(),tt=K.OTErrorClass||e(21),He=K.OTHelpers||e(5),Ne=K.parseIceServers||e(100).parseIceServers,Ge=K.PUBLISH_MAX_DELAY||e(267),St=K.PublisherPeerConnection||e(295)(),Se=K.PublishingState||e(297)(),nt=K.StreamChannel||e(149),Nt=K.systemRequirements||e(152),on=K.VideoOrientation||e(150)(),xt=K.WidgetView||V,Te=K.global||(void 0!==typeof window?window:global),sn=K.createSendMethod||e(304),Vt=K.setEncodersActiveState||C,lt=K.processPubOptions;return function(Dt){var Ke=this;void 0===Dt&&(Dt={});let Ct=P({});
1const ft=new y,Pt=$=>ft.get($);P(this);const en=U();let Mt=new re;Nt.check()||Nt.upgrade();let Je,$t,Be,dn,tn,it,Nn,qe,fn,hn,an,Mn,At,ye,Ie,In=!1;const Ve={},rt={};let at,ne,ce;const fe=()=>this.session||ce||{isConnected:()=>!1},Ae=[];function Fe(){return{connectionId:fe().isConnected()?fe().connection.connectionId:null,streamId:$t,widgetType:"Publisher"}}this.once("publishComplete",$=>{var G;$||(In=!0,At=(null==(G=this.session)?void 0:G.sessionInfo.p2pEnabled)?"P2P":"MANTIS")}),this.on("sourceStreamIdChanged",$=>{At=$}),this.on("audioAcquisitionProblem",$=>{ot("publisher:audioAcquisitionProblem","Event",{didPublishComplete:In,method:$.method})});const Xe=$=>{const G=Object.keys(X).map(ae=>X[ae]),Y=ze(G.indexOf($.name)>-1?$.name:X.MEDIA_ERR_ABORTED,$,le.UNABLE_TO_PUBLISH);he.error(`onStreamAvailableError ${Y.name}: ${Y.message}`),it.set("Failed"),Je&&(Je.destroy(),Je=null);const ee={failureReason:"GetUserMedia",failureCode:le.UNABLE_TO_PUBLISH,failureMessage:`OT.Publisher failed to access camera/mic: ${Y.message}`};kt("Failure",{},ee),tt.handleJsException({error:Y,errorMsg:ee.failureReason,code:ee.failureCode,target:this,analytics:Mt}),this.trigger("publishComplete",Y)},Rt=$=>{const G=u($);G.code=le.UNABLE_TO_PUBLISH,he.error(`OT.Publisher.onScreenSharingError ${G.message}`),it.set("Failed"),G.message=`Screensharing: ${G.message}`,this.trigger("publishComplete",G),kt("Failure",{},{failureReason:"ScreenSharing",failureMessage:G.message}),Je&&(Je.destroy(),Je=null)},Lt=$=>{const G=u($);let Y;try{Y=window.self!==window.top}catch(ee){}"https:"!==(void 0!==typeof window?window:global).location.protocol&&(zt?G.message+=" Note: https:// is required for screen sharing.":k()&&"localhost"!==He.env.hostName&&(G.message+=` Note: ${He.env.name} requires HTTPS for camera and microphone access.`)),Y&&!zt&&(G.message+=" Note: Check that the iframe has the allow attribute for camera and microphone"),he.error(G.message),it.set("Failed"),G.message=`OT.Publisher Access Denied: Permission Denied: ${G.message}`,G.code=le.UNABLE_TO_PUBLISH,Je&&(Je.destroy(),Je=null),kt("Cancel",{reason:"AccessDenied"}),this.trigger("publishComplete",G),this.dispatchEvent(new D(A.ACCESS_DENIED))},It=$=>{throw $.name===X.USER_MEDIA_ACCESS_DENIED||$.name===X.NOT_SUPPORTED&&$.originalMessage.match(/Only secure origins/)?Lt($):lt.isScreenSharing?Rt($):Xe($),$},Ft=()=>{ot("accessDialog","Opened"),this.dispatchEvent(new D(A.ACCESS_DIALOG_OPENED,!0))},pt=()=>{ot("accessDialog","Closed"),this.dispatchEvent(new D(A.ACCESS_DIALOG_CLOSED,!1))},Sn=m(),Bt={};let pn=!1,mt={},Tn=!1,Tt=lt(Dt,"OT.Publisher",()=>it&&it.isDestroyed());Tt.on({accessDialogOpened:Ft,accessDialogClosed:pt});const zt=Tt.isScreenSharing,Rr=Tt.isCustomAudioTrack,nn=Tt.isCustomVideoTrack,fr=Tt.shouldAllowAudio,$e=Tt.properties,Kn=Tt.getUserMedia;function $n($){$.forEach(G=>G())}Object.defineProperty(this,"loudness",{writable:!1,value:void 0,configurable:!0});const Cn=($,G,Y)=>$.addEventListener?($.addEventListener(G,Y),()=>$.removeEventListener(G,Y)):()=>{};(function(){const G=[];Ct.on("streamDestroy",()=>$n(G)),Ct.on("streamChange",()=>{$n(G);const Y=Be.getAudioTracks().map(ee=>Cn(ee,"ended",()=>{Tn=!0,this.trigger("audioAcquisitionProblem",{method:"trackEndedEvent"})}));G.splice(0,G.length,...Y)})}).call(this),function(){const G=[];Ct.on("streamDestroy",()=>$n(G)),Ct.on("streamChange",()=>{$n(G),tr()||Be.getTracks().forEach(Y=>{Y.addEventListener&&(G.push(Cn(Y,"mute",()=>{wn()})),G.push(Cn(Y,"unmute",()=>{wn()})))})})}();const tr=()=>{if(zt)return!0;const G=["text","detail"].includes($e.videoContentHint);return nn&&G},ot=Dt.logAnalyticsEvent||(($,G,Y,ee,ae)=>{let Ee=c({action:$,variation:G,payload:Y},Fe(),ee);"Failure"===G&&(Ee=c(mt,Ee)),mt=h(Ee,"sessionId","connectionId","partnerId"),Mt.logEvent(Ee,ae)}),kt=function(G,Y,ee){void 0===Y&&(Y={}),void 0===ee&&(ee={}),"Non-fatal"!==ee.failureReason&&("Attempt"===G&&(qe=(new Date).getTime(),ne&&(ne.stop(),he.error("_connectivityAttemptPinger should have been cleaned up")),ne=new De(()=>{ot("Publish","Attempting",Y,(0,o.default)({},Fe(),ee))},.2,6)),"Failure"===G||"Success"===G||"Cancel"===G?(ne?(ne.stop(),ne=void 0):he.warn(`Received connectivity event: "${G}" without "Attempt"`),ot("Publish",G,(0,o.default)({videoInputDevices:hn,audioInputDevices:fn,videoInputDeviceCount:hn?hn.length:void 0,audioInputDeviceCount:fn?fn.length:void 0,selectedVideoInputDeviceId:an,selectedAudioInputDeviceId:Mn},Y),(0,o.default)({attemptDuration:(new Date).getTime()-qe},ee))):ot("Publish",G,Y,ee))},bn=($,G)=>{ot("ICERestart",$,G)},hr=($,G,Y)=>{"Attempt"===G?(Ve[$]=(new Date).getTime(),ot($,G,Y)):("Failure"===G||"Success"===G)&&ot($,G,Y,{attemptDuration:(new Date).getTime()-Ve[$]})},Yt=function(G,Y){void 0===Y&&(Y={}),hr("RoutedToRelayedTransition",G,Y)},un=function(G,Y){void 0===Y&&(Y={}),hr("RelayedToRoutedTransition",G,Y)},On=g(()=>{ot("GetStats","Called")}),Jn=g(()=>{ot("GetRtcStatsReport","Called")}),pr=$=>{let G=$.parsedStats,Y=$.simulcastEnabled,ee=$.remoteConnectionId,Ee=$.sourceStreamId;const je={peerId:$.peerId,widgetType:"Publisher",connectionId:this.session&&this.session.isConnected()?this.session.connection.connectionId:null,
1streamId:$t,width:Je.width,height:Je.height,audioTrack:Be&&Be.getAudioTracks().length>0,hasAudio:kn(),publishAudio:$e.publishAudio,videoTrack:Be&&Be.getVideoTracks().length>0,hasVideo:vn(),publishVideo:$e.publishVideo,audioSource:Rr?"Custom":void 0,duration:dn?Math.round(((new Date).getTime()-dn.getTime())/1e3):0,remoteConnectionId:ee,scalableVideo:Y,sourceStreamId:ue(Ee)};let Pe=(zt&&nn?"Screen":zt&&Dt.videoSource)||nn&&"Custom"||$e.constraints.video&&"Camera"||null;f(Pe)&&(Pe=v(Pe)),je.videoSource=Pe;const Ue={videoWidth:this.videoWidth(),videoHeight:this.videoHeight()},dt=c(je,G),We=c(dt,Ue);Mt.logQOS(dt),this.trigger("qos",We)},Hn=()=>{let $,G;const Y=Je&&Je.video();return $e.videoDimensions?($=Math.min($e.videoDimensions.width,Y&&Y.videoWidth()||640),G=Math.min($e.videoDimensions.height,Y&&Y.videoHeight()||480)):($=Y&&Y.videoWidth()||640,G=Y&&Y.videoHeight()||480),{width:$,height:G}},vt=()=>{it.isDestroyed()?Je&&Je.destroyVideo():(he.debug("OT.Publisher.onLoaded; resolution:",`${this.videoWidth()}x${this.videoHeight()}`),it.set("MediaBound"),M().catch(he.error),Je.loading(!!this.session&&!this.stream),pn=!0)},jn=$=>{const G=ze(X.CONNECT_FAILED,$,le.P2P_CONNECTION_FAILED);G.message=`OT.Publisher PeerConnection Error: ${G.message}`,kt("Failure",{},{failureReason:"PeerConnectionError",failureCode:G.code,failureMessage:G.message}),it.set("Failed"),this.trigger("publishComplete",G),tt.handleJsException({error:G,target:this,analytics:Mt})},rn=()=>{Be&&(Ct.emit("streamDestroy"),Te.MediaStreamTrack&&Te.MediaStreamTrack.prototype.stop?Be.getTracks().forEach($=>$.stop()):Be.stop())},gn=function(){var $=(0,i.default)(n.default.mark(function G(){var Y;return n.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(Y={muted:!0}
1,Je){ae.next=3;break}throw new Error("Cannot bind video after widget view has been destroyed");case 3:return ae.abrupt("return",Je.bindVideo(Be,Y));case 4:case"end":return ae.stop()}},G)}));return function(){return $.apply(this,arguments)}}(),zn=$=>{he.debug("OT.Publisher.onStreamAvailable"),it.set("BindingMedia"),void 0!==$e.videoContentHint&&se($,$e.videoContentHint),rn(),Be=$,Ct.emit("streamChange"),(()=>{const $=O.isiOS&&O.iOSVersion>=13.3,G=Be.getAudioTracks()[0];$&&G&&(G.onmute=()=>br(G),G.onunmute=()=>Or(G))})(),(()=>{const $=O.isiOS&&O.iOSVersion>=15,G=Be.getVideoTracks()[0];$&&G&&document.addEventListener("visibilitychange",()=>{!document.hidden&&Je&&Je.rebindSrcObject()})})();const G=(Y,ee)=>{let ae;return Y.forEach(Ee=>{if(Ee.deviceId)ae=Ee.deviceId.toString();else if(Ee.label&&ee){const je=d(ee,Pe=>Pe.label===Ee.label);je&&(ae=je.deviceId)}}),ae};an=G(Be.getVideoTracks(),hn),Mn=G(Be.getAudioTracks(),fn),tn=new Ze(Be,!$e.publishAudio),wt(),Gn(),this.accessAllowed=!0,this.dispatchEvent(new D(A.ACCESS_ALLOWED,!1))},Wt=$=>{let G,Y;he.error("OT.Publisher.onPublishingTimeout"),Tn?(G=X.CHROME_MICROPHONE_ACQUISITION_ERROR,Y="Unable to publish because your browser failed to get access to your microphone. You may need to fully quit and restart your browser to get it to work. See https://bugs.chromium.org/p/webrtc/issues/detail?id=4799 for more details."):(G=X.TIMEOUT,Y="Could not publish in a reasonable amount of time");const ee={failureReason:"ICEWorkflow",failureCode:le.UNABLE_TO_PUBLISH,failureMessage:"OT.Publisher failed to publish in a reasonable amount of time (timeout)"};kt("Failure",{},ee),tt.handleJsException({errorMsg:ee.failureReason,code:ee.failureCode,target:this,analytics:Mt}),$.isConnected()&&this.streamId&&$._.streamDestroy(this.streamId),this.disconnect(),this.session=null,it.isDestroyed()||it.set("MediaBound"),this.trigger("publishComplete",ze(G,new Error(Y),le.UNABLE_TO_PUBLISH))},Zn=$=>{const G=ze(X.MEDIA_ERR_DECODE,$,le.UNABLE_TO_PUBLISH);G.message=`OT.Publisher while playing stream: ${G.message}`,he.error("OT.Publisher.onVideoError:",G),ot("stream",null,{reason:G.message});const Y=it.isAttemptingToPublish();it.set("Failed"),Y?this.trigger("publishComplete",G):this.trigger("error",G.message),tt.handleJsException({error:G,target:this,analytics:Mt})};this._removePeerConnection=$=>{const G=Pt($);delete Bt[G.peerConnectionId],$.destroy()},this._removeSubscriber=$=>{this.session.sessionInfo.isAdaptiveEnabled&&"P2P"===At&&this._.startRelayedToRoutedTransition(),An($).then(Y=>{Y.forEach(ee=>this._removePeerConnection(ee))})};const mr=$=>{const G=Pt($),Y=G.remoteSubscriberId,ee=G.peerConnectionId;he.debug("Subscriber has been disconnected from the Publisher's PeerConnection"),ot("disconnect","PeerConnection",{subscriberConnection:ee}),this._removeSubscriber(Y)},nr=function(){var $=(0,i.default)(n.default.mark(function G(Y,ee){var ae,Ee,je,Pe,Ue,We,ct,ht,gt;return n.default.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(ae=ee.reason,je=Ke.session&&Ke.session.sessionInfo,!("ICEWorkflow"===(Ee=ee.prefix)&&je&&je.reconnection&&pn)){Zt.next=5;break}return he.debug("Ignoring peer connection failure due to possibility of reconnection."),Zt.abrupt("return");case 5:return Pe=Pt(Y)||{},We=Pe.peerConnectionId,ct=be(void 0,ae,Ee,void 0===(Ue=Pe.remoteConnectionId)?"(not found)":Ue,"Publisher"),ht={hasRelayCandidates:Y&&Y.hasRelayCandidates()},gt={failureReason:Ee||"PeerConnectionError",failureCode:ct.code,failureMessage:ct.message},it.isPublishing()?gt.reason="Non-fatal":Ke.trigger("publishComplete",ct),kt("Failure",ht,gt),tt.handleJsException({errorMsg:`OT.Publisher PeerConnection Error: ${ae}`,code:ct.code,target:Ke,analytics:Mt}),Zt.next=14,Bt[We];case 14:Zt.sent.destroy(),delete Bt[We];case 17:case"end":return Zt.stop()}},G)}));return function(Y,ee){return $.apply(this,arguments)}}(),Vn=$=>this.session.sessionInfo.isAdaptiveEnabled&&"P2P"===$.getSourceStreamId(),st=function(){var $=(0,i.default)(n.default.mark(function G(Y,ee){var ae,Ee,je,Pe,Ue;return n.default.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(ae=Ke.session.sessionInfo.isAdaptiveEnabled,Ee=ee.getSourceStreamId(),rt[
1Ee]=Y,"disconnected"===Y&&setTimeout(()=>{const gt=Ke.session._.isSocketReconnecting,Jt=Ke.session._.getSocket().is("connected")&&!gt();if("disconnected"===rt[Ee]&&Jt){const Zt=Pt(ee);bn("Attempt",{remoteConnectionId:Zt.remoteConnectionId}),ee.iceRestart()}},2e3),"connected"!==Y){ht.next=14;break}if(clearTimeout(at),!ae){ht.next=14;break}return ht.next=9,Bn();case 9:return je=ht.sent.iceConnectionStateIsConnected(),ht.next=12,xn();case 12:Pe=ht.sent.iceConnectionStateIsConnected(),je&&Pe&&Ir();case 14:if("failed"!==Y){ht.next=21;break}if(Ue=Ke.session._.isSocketReconnecting,Ke.session._.getSocket().is("connected")&&!Ue()){ht.next=20;break}return ht.abrupt("return");case 20:ae&&Ee===At&&"P2P"===Ee?Ke._.startRelayedToRoutedTransition():at=setTimeout(()=>{Ke.session._.streamDestroy(Ke.streamId,Ee)},5e3);case 21:case"end":return ht.stop()}},G)}));return function(Y,ee){return $.apply(this,arguments)}}(),Yn=$=>{let G=$.peerConnectionId,Y=$.send,ee=$.log,ae=$.logQoS,Ee=$.sourceStreamId;if(Ln(G))return t.reject(new Error("PeerConnection already exists"));const je=de({isChromiumEdge:He.env.isChromiumEdge,browserName:He.env.name,isScreenSharing:zt,isCustomVideoTrack:nn,sessionInfo:this.session.sessionInfo,constraints:$e.constraints,videoDimensions:Hn()});return Bt[G]=t.all([this.session._.getIceConfig(),this.session._.getVideoCodecsCompatible(Be)]).then(Pe=>{let Ue=Pe[0],We=Be;if(!Pe[1]){We=Be.clone();const gt=We.getVideoTracks()[0];gt&&(gt.stop(),We.removeTrack(gt))}const ct=new St({iceConfig:Ue,sendMessage:(ht,gt)=>{"offer"===ht&&this.trigger("connected"),Y(ht,gt)},webRTCStream:We,channels:$e.channels,capableSimulcastStreams:je,overrideSimulcastEnabled:Dt._enableSimulcast,logAnalyticsEvent:ee,offerOverrides:{enableDtx:$e.enableDtx,enableStereo:$e.enableStereo,audioBitrate:$e.audioBitrate,priorityVideoCodec:$e._priorityVideoCodec||this.session.sessionInfo.priorityVideoCodec,codecFlags:$e._codecFlags||this.session._.getCodecFlags()},answerOverrides:this.session.sessionInfo.p2pEnabled?void 0:{audioBitrate:$e.audioBitrate},sourceStreamId:Ee,isP2pEnabled:this.session.sessionInfo.p2pEnabled});return ct.on({disconnected:()=>mr(ct),error:ht=>nr(ct,{reason:ht.reason,prefix:ht.prefix}),qos:ae,iceRestartSuccess:()=>($=>{const G=Pt($);bn("Success",{remoteConnectionId:G.remoteConnectionId})})(ct),iceRestartFailure:()=>($=>{const G=Pt($);bn("Failure",{reason:"ICEWorkflow",message:"OT.Publisher PeerConnection Error: The stream was unable to connect due to a network error. Make sure your connection isn't blocked by a firewall.",remoteConnectionId:G.remoteConnectionId})})(ct),iceConnectionStateChange:ht=>st(ht,ct),audioAcquisitionProblem:()=>{Tn=!0,this.trigger("audioAcquisitionProblem",{method:"getStats"})}}),ct.once("connected",()=>($=>{Vn($)&&Yt("Success")})(ct)),new t((ht,gt)=>{const Ht=Jt=>{gt(Jt)};ct.once("error",Ht),ct.init(Nn,Jt=>{if(Jt)return gt(Jt);ct.off("error",Ht),ht(ct)})})}),Ln(G)},mn=()=>t.all(Object.keys(Bt).map(Ln)),An=$=>mn().then(G=>G.filter(Y=>Pt(Y).remoteSubscriberId===$)),Ln=$=>Bt[$],Xn=$=>{const G=Object.keys(Bt).find(Y=>Y.endsWith(`~${$}`));return Bt[G]},Bn=()=>Xn("MANTIS"),xn=()=>Xn("P2P");let Gt=Oe(this,{name:$e.name,publishAudio:$e.publishAudio,publishVideo:$e.publishVideo,audioSource:$e.audioSource,showControls:$e.showControls,shouldAllowAudio:fr,logAnalyticsEvent:ot});const _e=()=>{this.off("publishComplete",wn),Gt&&Gt.reset(),en.releaseAll(),this.disconnect(),tn=null,rn(),Be=null,Je&&(Je.destroy(),Je=null),this.session&&this._.unpublishFromSession(this.session,"reset"),this.id=null,this.stream=null,pn=!1,this.session=null,it.isDestroyed()||it.set("NotPublishing")},vn=()=>
1{if(!Be||0===Be.getVideoTracks().length)return!1;const G=["text","detail"].includes($e.videoContentHint),ee=He.env.isChrome&&(zt||nn&&G);return Be.getVideoTracks().reduce((ae,Ee)=>ae&&(!Ee.muted||!!ee)&&Ee.enabled&&"ended"!==Ee.readyState,$e.publishVideo)},kn=()=>!(!Be||0===Be.getAudioTracks().length)&&Be.getAudioTracks().length>0&&Be.getAudioTracks().reduce(($,G)=>$&&!G.muted&&G.enabled&&"ended"!==G.readyState,$e.publishAudio),wn=$=>{Je&&(Je.audioOnly(!vn()),Je.showPoster(!vn())),Gt&&Gt.setAudioOnly(!vn()&&kn()),this.stream?(this.stream.setChannelActiveState("audio",kn(),$),this.stream.setChannelActiveState("video",vn(),$)):this.once("publishComplete",wn)},Wn=($,G)=>{let Y=!1;if("function"==typeof $?G=$:Y="rtcStatsReport"===$,Y?Jn():On(),!Y||W)mn().then(ee=>{if(0===ee.length){const ae=le.PEER_CONNECTION_NOT_CONNECTED;throw ze(X.PEER_CONNECTION_NOT_CONNECTED,new Error(tt.getTitleByCode(ae)),ae)}return ee}).then(ee=>this.session.sessionInfo.isAdaptiveEnabled?ee.filter(Ee=>Ee.getSourceStreamId()===At):ee).then(ee=>t.all(ee.map(ae=>R(Y?ae.getRtcStatsReport.bind(ae):ae.getStats.bind(ae))().then(Ee=>({pc:ae,stats:Ee}))))).then(ee=>{const ae=dn?dn.getTime():Date.now(),Ee=ee.map(je=>{let Ue=je.stats;const dt=Pt(je.pc),We=dt.remoteConnectionId,ct=dt.remoteSubscriberId;return c(We.match(/^symphony\./)?{}:{subscriberId:ct,connectionId:We},Y?{rtcStatsReport:Ue}:{stats:I.normalizeStats(Ue,!1,ae)})});G(null,Ee)}).catch(G);else{const ee=le.GET_RTC_STATS_REPORT_NOT_SUPPORTED;G(ze(X.GET_RTC_STATS_REPORT_NOT_SUPPORTED,new Error(tt.getTitleByCode(ee)),ee))}},Pn=($,G)=>{this.session._.streamCreate($e.name||"",this.streamId,$e.audioFallbackEnabled,Ae,$e.minVideoBitrate,$,G)},Ir=function(){var $=(0,i.default)(n.default.mark(function G(){var Y;return n.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return Ie=!1,ae.next=3,Bn();case 3:if(!(Y=ae.sent)){ae.next=16;break}return Ke.trigger("sourceStreamIdChanged","P2P"),ae.next=8,x(3e3);case 8:if(!Ie){ae.next=11;break}return he.debug("Cancelling stop sending RTP to MANTIS."),ae.abrupt("return");case 11:return ae.next=13,Y.changeMediaDirectionToInactive();case 13:if(!(He.env.isFirefox&&He.env.version<96)){ae.next=16;break}return ae.next=16,sr();case 16:case"end":return ae.stop()}},G)}));return function(){return $.apply(this,arguments)}}(),vr=function(){var $=(0,i.default)(n.default.mark(function G(){var Y;return n.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return Ie=!0,ae.next=3,Bn();case 3:if(!(Y=ae.sent)){ae.next=9;break}return ae.next=7,Y.changeMediaDirectionToRecvOnly();case 7:ye&&clearTimeout(ye),Ke.trigger("sourceStreamIdChanged","MANTIS");case 9:case"end":return ae.stop()}},G)}));return function(){return $.apply(this,arguments)}}(),sr=function(){var $=(0,i.default)(n.default.mark(function G(){var Y;return n.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return ae.next=2,Bn();case 2:(Y=ae.sent)&&(ye=setTimeout((0,i.default)(n.default.mark(function Ee(){return n.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if("P2P"!==At){Pe.next=9;break}return Pe.next=3,Y.changeMediaDirectionToRecvOnly();case 3:return Pe.next=5,x(3e3);case 5:return Pe.next=7,Y.changeMediaDirectionToInactive();case 7:return Pe.next=9,sr();case 9:case"end":return Pe.stop()}},Ee)})),3e4));case 4:case"end":return ae.stop()}},G)}));return function(){return $.apply(this,arguments)}}();this.publish=$=>(he.debug("OT.Publisher: publish"),(it.isAttemptingToPublish()||it.isPublishing())&&_e(),it.set("GetUserMedia"),$e.style&&this.setStyle($e.style,null,!0),$e.classNames="OT_root OT_publisher",ke.onLoad(()=>{he.debug("OT.Publisher: publish: environment loaded"),Je=new xt($,(0,o.default)({},$e,{widgetType:"publisher"})),fr&&H({publisher:this,widgetView:Je}),Je.on("error",Zn),this.id=Je.domId(),this.element=Je.domElement,this.element&&Gt&&Gt.init(Je),Je.on("videoDimensionsChanged",(G,Y)=>{this.stream&&this.stream.setVideoDimensions(Y.width,Y.height),this.dispatchEvent(new te.VideoDimensionsChangedEvent(this,G,Y))}),Je.on("mediaStopped",G=>{const Y=new te.MediaStoppedEvent(this,G);
1if(this.dispatchEvent(Y),!Y.isDefaultPrevented()){if(G){const ee=String(G.kind).toLowerCase();return void("audio"===ee?Gn():"video"===ee?wt():he.warn(`Track with invalid kind has ended: ${G.kind}`))}this.session?this._.unpublishFromSession(this.session,"mediaStopped"):this.destroy("mediaStopped")}}),Je.on("videoElementCreated",G=>{const Y=new te.VideoElementCreatedEvent(G);this.dispatchEvent(Y)}),Kn().catch(It).then(G=>(fn=Tt.audioDevices,hn=Tt.videoDevices,zn(G),$e.publishVideo||this._toggleVideo($e.publishVideo),!zt&&!nn&&(ln=Z(G,hn)),gn().catch(Y=>{if(!(Y instanceof T))throw Y}).then(()=>{vt(),it.isDestroyed()||(this.trigger("initSuccess"),this.trigger("loaded",this))},Y=>{he.error(`OT.Publisher.publish failed to bind video: ${Y}`),jn(Y)})))}),this),this._setScalableValues=function(){var $=(0,i.default)(n.default.mark(function G(Y,ee){var Ee,je;return n.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return Ue.next=2,mn().then(dt=>dt[0].getSenders().filter(We=>"video"===We.track.kind));case 2:return(je=(Ee=Ue.sent[0]).getParameters()).encodings.forEac
1h((dt,We)=>{dt[Y]=ee[We]}),Ue.next=8,Ee.setParameters(je);case 8:case"end":return Ue.stop()}},G)}));return function(G,Y){return $.apply(this,arguments)}}(),this._setScalableFramerates=function(){var $=(0,i.default)(n.default.mark(function G(Y){var ee;return n.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(!(ee=Er(Y))||!yr(ee)){Ee.next=4;break}return Ee.next=4,Ke._setScalableValues("maxFramerate",ee);case 4:case"end":return Ee.stop()}},G)}));return function(G){return $.apply(this,arguments)}}(),this._setScalableVideoLayers=function(){var $=(0,i.default)(n.default.mark(function G(Y){var ee;return n.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(!(ee=Er(Y))||!xr(ee)){Ee.next=4;break}return Ee.next=4,Ke._setScalableValues("scaleResolutionDownBy",ee);case 4:case"end":return Ee.stop()}},G)}));return function(G){return $.apply(this,arguments)}}();const yr=$=>{let G=0;return $.every(Y=>!(15!==Y&&30!==Y||Y<G||(G=Y,0)))},xr=$=>{let G=17;return $.every(Y=>!(Y<1||Y>=G||(G=Y,0)))},Er=$=>{let G;if("string"!=typeof $)return G;const Y=$.split(":");return 0===Y.length||Y.length>3||!Y.every(ee=>!isNaN(ee))||(G=Y.map(ee=>parseInt(ee,10)).reverse()),G},Ot=$=>Be&&Be[`get${p($)}Tracks`]().length>0&&Be[`get${p($)}Tracks`]().every(G=>"ended"!==G.readyState),Gn=$=>{const G=Ot("audio")&&$e.publishAudio;Gt&&Gt.setMuted(!G),tn&&tn.muted(!G),wn($)};this.publishAudio=$=>{ot("publishAudio","Attempt",{publishAudio:$}),$e.publishAudio=$;
1try{Gn(),ot("publishAudio","Success",{publishAudio:$})}catch(G){ot("publishAudio","Failure",{message:G.message})}return this};let Un,Qn=!1;const wt=()=>{const $=Ot("video")&&$e.publishVideo;"Chrome"===O.name&&O.version>=69&&(0,i.default)(n.default.mark(function G(){var Y,ee;return n.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Un&&Un.cancel(),Un=new b,Y=Un,Ee.next=5,mn();case 5:ee=Ee.sent,Y.isCanceled()||ee.forEach(je=>{Vt(je,$)});case 7:case"end":return Ee.stop()}},G)}))(),Be&&Be.getVideoTracks().forEach(G=>{G.enabled=$,G.isCreatedCanvas&&(G.enabled=!1)}),wn()};let ln;this._toggleVideo=j(function(){var $=(0,i.default)(n.default.mark(function G(Y){var ee,ae,Ee,je,Pe,Ue;return n.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(!(zt||nn||Qn)){We.next=2;break}return We.abrupt("return");case 2:if(ee=cr()){We.next=5;break}throw ze(X.NOT_SUPPORTED,new Error("Publisher._toggleVideo cannot toggleVideo when you have no video source."));case 5:if("ended"!==ee.readyState){We.next=8;break}return Qn=!0,We.abrupt("return");case 8:Ee=void 0===(ae=$e.videoDimensions)?Hn():ae,We.prev=9,je=w(Ee),We.next=16;break;case 13:return We.prev=13,We.t0=We.catch(9),We.abrupt("return");case 16:return We.next=18,Cr();case 18:if(Pe=We.sent,Y&&He.env.isAndroid&&He.env.isChrome&&ee&&ee.stop&&ee.stop(),Y||(ln=Pe.find(ct=>ct.label===ee.label).deviceId),!ln||-1!==Pe.findIndex(ct=>ct.deviceId===ln)){We.next=23;break}throw ze(X.NO_DEVICES_FOUND,new Error("Previous device no longer available - deviceId not found"));case 23:if(Ct.emit("streamDestroy"),!Y){We.next=30;break}return We.next=27,Tr(ln);case 27:We.t1=We.sent,We.next=31;break;case 30:We.t1=je;case 31:return Ue=We.t1,We.next=34,Sr(ee,Ue);case 34:case"end":return We.stop()}},G,null,[[9,13]])}));return function(G){return $.apply(this,arguments)}}()),this.publishVideo=$=>{ot("publishVideo","Attempt",{publishVideo:$}),$e.publishVideo=$;try{this._toggleVideo($e.publishVideo),wt(),ot("publishVideo","Success",{publishVideo:$})}catch(G){ot("publishVideo","Failure",{message:G.message})}return this},this.setVideoContentHint=$=>se(Be,$),this.getVideoContentHint=()=>pe(Be),this.destroy=function($,G){return it.isAttemptingToPublish()&&this.session&&kt("Cancel",{reason:"destroy"}),it.isDestroyed()||(it.set("Destroyed"),_e(),Tt&&(Tt.off(),Tt=null),Gt&&(Gt.destroy(),Gt=null),Ct&&(Ct.off(),Ct=null),!0!==G&&this.dispatchEvent(new te.DestroyedEvent(A.PUBLISHER_DESTROYED,this,$)),this.off()),this},this.disconnect=()=>{Object.keys(Bt).forEach($=>{const G=Ln($);delete Bt[$],G.then(Y=>this._removePeerConnection(Y))})},this.processMessage=($,G,Y)=>{const ee=s(Y,"params.subscriber",G).replace(/^INVALID-STREAM$/,G),ae=s(Y,"content.peerId"),Ee=s(Y,"content.sourceStreamId","MANTIS"),je=`${ee}~${ae}~${Ee}`;he.debug(`OT.Publisher.processMessage: Received ${$} from ${G} for ${je}`),he.debug(Y);const Pe=Ln(je),Ue=()=>{const We=sn({socket:this.session._.getSocket(),uri:Y.uri,content:{peerId:ae,sourceStreamId:Ee}});Yn({peerConnectionId:je,send:We,log:function(Ht,Jt,Zt,et,Qt){void 0===et&&(et={});const dr=(0,o.default)({peerId:ae,sourceStreamId:ue(Ee)},et);return ot(Ht,Jt,Zt,dr,Qt)},logQoS:gt=>{Ee===At&&pr((0,o.default)({},gt,{peerId:ae,remoteConnectionId:G,sourceStreamId:Ee}))},sourceStreamId:Ee}).then(gt=>((($,G)=>{ft.set($,G)})(gt,{remoteConnectionId:G,remoteSubscriberId:ee,peerId:ae,sourceStreamId:Ee,peerConnectionId:je}),gt.processMessage($,Y),null)).catch(gt=>{he.error("OT.Publisher failed to create a peerConnection",gt)})},dt=this.session.sessionInfo.isAdaptiveEnabled;if("unsubscribe"===$)this._removeSubscriber(ee);else if(Pe)Pe.then(We=>We.processMessage($,Y));else{if(dt&&xn())return;Ue()}},this.getImgData=function(){if(!pn)return he.error("OT.Publisher.getImgData: Cannot getImgData before the Publisher is publishing."),null;const $=Je&&Je.video();return $?$.imgData():null};const qn=$=>{rn(),Be=$,Ct.emit("streamChange"),tn=new Ze(Be,!$e.publishAudio)},ar=$=>{$.getSenders().forEach(G=>"audio"===G.track.kind&&Be.getAudioTracks().length?G.replaceTrack(Be.getAudioTracks()[0]):"video"===G.track.kind&&Be.getVideoTracks().length?G.replaceTrack(Be.getVideoTracks()[0]):void 0)},Dr=function(G){return void 0===G&&(G=ar),mn().then(Y=>(Y.map(G),t.all([])))};{let $=0;this.cycleVideo=j((0,i.default)(n.default.mark(function G(){var Y,ee,je;return n.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(!He.env.isLegacyEdge&&Te.RTCRtpSender&&"function"==typeof Te.RTCRtpSender.prototype.replaceTrack){Ue.next=2;break}throw ze(X.UNSUPPORTED_BROWSER,new Error("Publisher#cycleVideo is not supported in your browser."),le.UNABLE_TO_PUBLISH);case 2:if(!nn&&!zt){Ue.next=4;break}throw ze(X.NOT_SUPPORTED,new Error("Publisher#cycleVideo: The publisher is not using a camera video source"));case 4:if(Y=cr()){Ue.next=7;break}throw ze(X.NOT_SUPPORTED,new Error("Publisher#cycleVideo cannot cycleVideo when you have no video source."));case 7:return $+=1,Ue.next=10,Cr();case 10:if((ee=Ue.sent).filter(dt=>dt.label!==Y.label).length>0)for(;ee[$%ee.length].label===Y.label;)$+=1;return Ct.emit("streamDestroy"),je=ee[$%ee.length].deviceId,Ue.next=18,lr(je);case 18:return Ue.abrupt("return",{deviceId:ln});case 19:case"end":return Ue.stop()}},G)})))}const Sr=function(){var $=(0,i.default)(n.default.mark(function G(Y,ee){var ae,Ee;return n.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Pe.next=2,mn();case 2:return ae=Pe.sent,Pe.next=5,t.all(ae.map(Ue=>Ue.findAndReplaceTrack(Y,ee)));case 5:Be.addTrack(ee),Be.removeTrack(Y),Y&&Y.stop&&Y.stop(),("Firefox"===He.env.name||"Safari"===He.env.name)&&(Ke.videoElement().srcObject=null,Ke.videoElement().srcObject=Be),(Ee=Je&&Je.video())&&Ee.refreshTracks(),Ct.emit("streamChange"),wt();case 13:case"end":return Pe.stop()}},G)}));return function(Y,ee){return $.apply(this,arguments)}}(),Tr=function(){var $=(0,i.default)(n.default.mark(function G(Y){var ee,Ee,je;return n.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return(ee=u(Dt)).audioSource=null,ee.videoSource=Y,Tt=lt(ee,"OT.Publisher.getTrackFromDeviceId",()=>it&&it.isDestroyed()),Tt.on({accessDialogOpened:Ft,accessDialogClosed:pt}),Ee=Tt.getUserMedia,Ue.prev=6,Ue.next=9,Ee();case 9:je=Ue.sent,Ue.next=15;break;case 12:Ue.prev=12,Ue.t0=Ue.catch(6),he.error(Ue.t0);case 15:return Ue.abrupt("return",je&&je.getVideoTracks()[0]);case 16:case"end":return Ue.stop()}},G,null,[[6,12]])}));return function(Y){return $.apply(this,arguments)}}(),cr=()=>Be.getVideoTracks()[0],Cr=function(){var $=(0,i.default)(n.default.mark(function G(){var Y,ee;return n.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.next=2,xe.shouldAskForDevices();case 2:if(ee=(Y=Ee.sent).videoDevices,Y.video&&ee&&ee.length){Ee.next=6;break}throw ze(X.NO_DEVICES_FOUND,new Error("No video devices available"),le.UNABLE_TO_PUBLISH);case 6:return Ee.abrupt("return",ee);case 7:case"end":return Ee.stop()}},G)}));return function(){return $.apply(this,arguments)}}(),Pr=($,G)=>{G&&Be.addTrack(G),$&&Be.removeTrack($);const Y=Je&&Je.video();Y&&Y.refreshTracks(),Gt&&(G&&!$&&Gt.addAudioTrack(),$&&!G&&Gt.removeAudioTrack()),$&&$.stop&&$.stop(),G&&(Gn(),tn=new Ze(Be,!$e.publishAudio)),Ct.emit("streamChange"),wn()},ur=function(){var $=(0,i.default)(n.default.mark(function G(Y){var ee,ae;return n.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ee=Y.getSettings().deviceId,je.prev=1,je.next=4,Ke.setAudioSource(ee);case 4:(ae=Be.getAudioTracks()[0])&&(ae.onmute=()=>br(ae),ae.onunmute=()=>Or(ae)),je.next=11;break;case 8:je.prev=8,je.t0=je.catch(1),he.error(je.t0);case 11:case"end":return je.stop()}},G,null,[[1,8]])}));return function(Y){return $.apply(this,arguments)}}(),br=$=>{let G=!1;$e.publishVideo&&document.hidden&&(G=!0,this.publishVideo(!1));const Y=function(){var ee=(0,i.default)(n.default.mark(function ae(){return n.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:if(document.hidden){je.next=5;break}return je.next=3,ur($);case 3:G&&Ke.publishVideo(!0),document.removeEventListener("visibilitychange",Y);case 5:case"end":return je.stop()}},ae)}));return function(){return ee.apply(this,arguments)}}();document.addEventListener("visibilitychange",Y)},Or=$=>{kn()&&(vn()?this.videoElement().pause():ur($)),this.session.trigger("gsmCallEnded")};let Fn;const Ar=function(){var $=(0,i.default)(n.default.mark(function G(Y){var ee,ae,Ee,je,Pe,Ue,dt,We,ht,gt,Ht,Jt;return n.default.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(ee="Operation did not succeed due to a new request.",Fn&&Fn.cancel(),Fn=new b,ae=Fn,Ee=Qt=>{if(ae.isCanceled())throw Qt.getTracks(dr=>dr.stop()),ze(X.CANCEL,new Error(ee));return Ar(Qt.getAudioTracks()[0])},!He.env.isLegacyEdge&&Te.RTCRtpSender&&"function"==typeof Te.RTCRtpSender.prototype.replaceTrack){et.next=7;break}throw ze(X.UNSUPPORTED_BROWSER,new Error("Publisher#setAudioSource is not supported in your browser."));case 7:if(je=Ke.getAudioSource()){et.next=10;break}throw ze(X.NOT_SUPPORTED,new Error("Publisher#setAudioSource cannot add an audio source when you started without one."));case 10:if(!(Y instanceof MediaStreamTrack)){et.next=21;break}return et.next=13,mn();case 13:if(Pe=et.sent,!ae.isCanceled()){et.next=16;break}throw ze(X.CANCEL,new Error(ee));case 16:return et.next=18,t.all(Pe.map(Qt=>Qt.findAndReplaceTrack(je,Y)));case 18:return et.abrupt("return",Pr(je,Y));case 21:if("string"!=typeof Y){et.next=68;break}return(Ue=u(Dt)).audioSource=Y,Ue.videoSource=null,Tt=lt(Ue,"OT.Publisher.setAudioSource",()=>ae.isCanceled()||it&&it.isDestroyed()),Tt.on({accessDialogOpened:Ft,accessDialogClosed:pt}),dt=je.label,We=je.getConstraints&&je.getSettings().deviceId||void 0,je&&je.stop(),ht=Tt.getUserMedia,et.prev=31,et.t0=Ee,et.next=35,ht();case 35:return et.t1=et.sent,et.next=38,(0,et.t0)(et.t1);case 38:return et.abrupt("return",et.sent);case 41:if(et.prev=41,et.t2=et.catch(31),!ae.isCanceled()){et.next=45;break}throw ze(X.CANCEL,new Error(ee));case 45:if((gt=u(Dt)).videoSource=null,gt.audioSource=We,gt.audioSource||!dt){et.next=55;break}return et.next=51,z();case 51:if(Ht=et.sent.find(Qt=>Qt.label===dt),!ae.isCanceled()){et.next=54;break}throw ze(X.CANCEL,new Error(ee));case 54:Ht&&(gt.audioSource=Ht.deviceId);case 55:if(gt.audioSource){et.next=58;break}throw et.t2.message+=" (could not determine previous audio device)",ze(X.NOT_FOUND,et.t2);case 58:return Tt=lt(gt,"OT.Publisher.setAudioSource",()=>ae.isCanceled()||it&&it.isDestroyed()),et.next=61,Tt.getUserMedia().catch(Qt=>{throw Qt.message+=" (could not obtain previous audio device)",Qt});case 61:return Jt=et.sent,et.next=64,Ee(Jt);case 64:throw et.t2.message+=" (reverted to previous audio device)",et.t2;case 66:et.next=69;break;case 68:throw ze(X.INVALID_PARAMETER,new Error("Invalid parameter passed to OT.Publisher.setAudioSource(). Expected string or MediaStreamTrack."));case 69:case"end":return et.stop()}},G,null,[[31,41]])}));return function(Y){return $.apply(this,arguments)}}();this.setAudioSource=Ar,this.getAudioSource=()=>Be&&Be.getAudioTracks().length>0?Be.getAudioTracks()[0]:null;const Nr=function(){var $=(0,i.default)(n.default.mark(function Y(ee){var ae,Ee,je;return n.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(ae=ze(X.INVALID_VIDEO_SOURCE,new Error("Invalid video source. Video source must be a valid video input deviceId"),1041),Ee=ze(X.SET_VIDEO_SOURCE_FAILURE,new Error("You cannot reset the video source on a publisher that does not currently use a camera source."),1040),!He.env.isLegacyEdge&&Te.RTCRtpSender&&"function"==typeof Te.RTCRtpSender.prototype.replaceTrack){We.next=4;break}throw ze(X.UNSUPPORTED_BROWSER,new Error("setVideoSource is not supported in your browser."),le.UNABLE_TO_PUBLISH);case 4:if("string"==typeof ee){We.next=6;break}throw ae;case 6:if(je=!Be||0===Be.getVideoTracks().length,!(nn||zt||je)){We.next=9;break}throw Ee;case 9:return We.next=11,z();case 11:if(We.sent.find(ct=>"videoInput"===ct.kind&&ct.deviceId===ee)){We.next=15;break}throw ae;case 15:return We.next=17,lr(ee);case 17:case"end":return We.stop()}},Y)}));return function G(Y){return $.apply(this,arguments)}}();this.setVideoSource=Nr;const lr=function(){var $=(0,i.default)(n.default.mark(function G(Y){var ee,ae,Ee;return n.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(ee=ln,ln=Y,$e.publishVideo){Pe.next=4;break}return Pe.abrupt("return");case 4:return ae=cr(),$e.publishVideo&&He.env.isAndroid&&(He.env.isChrome||He.env.isFirefox)&&ae&&ae.stop&&ae.stop(),Pe.prev=6,Pe.next=9,Tr(Y);case 9:Ee=Pe.sent,Pe.next=17;break;case 12:return Pe.prev=12,Pe.t0=Pe.catch(6),ln=ee,he.error(Pe.t0),Pe.abrupt("return");case 17:return Pe.next=19,Sr(ae,Ee);case 19:$e.publishVideo&&(Qn=!1);case 20:case"end":return Pe.stop()}},G,null,[[6,12]])}));return function(Y){return $.apply(this,arguments)}}();var $;this.getVideoSource=()=>{const $={},G=!Be||0===Be.getVideoTracks().length;return $.track=Be&&$e.publishVideo&&Be.getVideoTracks()[0]||null,$.deviceId=zt||nn||!ln?null:ln,$.type=nn?"custom"
1:zt?"screen":G?null:"camera",$},this._={publishToSession:($,G)=>{G&&(Mt=G),ce=$,this.session=$;const Y=m();$t=Y,this.streamId=Y,kt("Attempt",{dataChannels:$e.channels,properties:B($e)});const ee=new t((Pe,Ue)=>{pn?Pe():(this.once("initSuccess",Pe),this.once("destroyed",dt=>{let We=dt.reason,ct="";We&&(ct=` Reason: ${We}`),Ue(new Error(`Publisher destroyed before it finished loading.${ct}`))}))});he.debug("publishToSession: waiting for publishComplete, which is triggered by stream#created from rumor");const ae=new t((Pe,Ue)=>{this.once("publishComplete",dt=>{dt?Ue(dt):(this._setScalableFramerates($e.scalableFramerates),this._setScalableVideoLayers($e.scalableVideoLayers),he.debug("publishToSession: got publishComplete"),Pe())})}),Ee=Pe=>{const Ue=ie(Pe);throw kt("Failure",{},{failureReason:"Publish",failureCode:Ue.code,failureMessage:Ue.message}),it.isAttemptingToPublish()&&this.trigger("publishComplete",Ue),tt.handleJsException({errorMsg:Pe.message,code:Ue.code,target:this,error:Pe,analytics:Mt}),Ue};he.debug("publishToSession: waiting for loaded");const je=ee.then(()=>$._.getVideoCodecsCompatible(Be)).then(Pe=>{if(he.debug("publishToSession: loaded"),!this.session)return;const Ue=setTimeout(()=>{Wt($)},Ge);this.once("publishComplete",()=>{clearTimeout(Ue)}),it.set("PublishingToSession");const dt=Pe&&Je&&Je.video(),We=Be.getVideoTracks().length>0;dt&&We&&null!==$e.videoSource&&!1!==$e.videoSource&&Ae.push(new nt({id:"video1",type:"video",active:$e.publishVideo,orientation:on.ROTATED_NORMAL,frameRate:$e.frameRate,width:dt.videoWidth(),height:dt.videoHeight(),source:zt?"screen":nn?"custom":"camera",fitMode:$e.fitMode}));const ht=Be.getAudioTracks().length>0;return null!==$e.audioSource&&!1!==$e.audioSource&&ht&&Ae.push(new nt({id:"audio1",type:"audio",active:$e.publishAudio})),he.debug("publishToSession: creating rumor stream id"),new t((Ht,Jt)=>{Pn(null,(Zt,et,Qt)=>{Zt?Jt(Ee(Zt)):Ht({streamId:et,message:Qt})})})}).then(Pe=>{if(void 0===Pe)return;const Ue=Pe.streamId,dt=Pe.message;if(he.debug("publishToSession: rumor stream id created:",Ue,"(this is different from stream#created, which requires media to actually be flowing for mantis sessions)"),Ue!==Y)throw new Error("streamId response does not match request");this.streamId=Ue,Nn=Ne(dt)}).catch(Pe=>{throw this.trigger("publishComplete",Pe),Pe});return t.all([je,ae])},unpublishFromSession:($,G)=>{if(!this.session||$.id!==this.session.id)return"unpublished"===G&&he.warn(`The publisher ${Sn} is trying to unpublish from a session ${$.id} it is not attached to (it is attached to ${this.session&&this.session.id||"no session"})`),this;if($.isConnected()&&(this.stream||it.isAttemptingToPublish())&&$._.streamDestroy(this.streamId),en.releaseAll(),this.disconnect(),it.isAttemptingToPublish()){kt("Cancel",{reason:"unpublish"});const ee=new Error((()=>{switch(G){case"mediaStopped":return"The video element fired the ended event, indicating there is an issue with the media";case"unpublished":return"The publisher was unpublished before it could be published";case"reset":return"The publisher was reset";default:return`The publisher was destroyed due to ${G}`}})());this.trigger("publishComplete",ze("mediaStopped"===G?X.MEDIA_ENDED:X.CANCEL,ee))}return this.session=null,ot("unpublish","Success"),this._.streamDestroyed(G),this},unpublishStreamFromSession:($,G,Y)=>$t&&$.id===$t?this._.unpublishFromSession(G,Y):(he.warn(`The publisher ${Sn} is trying to destroy a stream ${$.id} that is not attached to it (it has ${$t||"no stream"} attached to it)`),this),streamDestroyed:$=>{["reset"].indexOf($)<0&&(it.isDestroyed()||it.set("MediaBound"));const G=new te.StreamEvent("streamDestroyed",this.stream,$,!0);this.dispatchEvent(G),G.isDefaultPrevented()||this.destroy()},archivingStatus:$=>(Gt&&Gt.setArchivingStatus($),$),webRtcStream:()=>Be,switchTracks:()=>(0,i.default)(n.default.mark(function $(){var G;return n.default.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return ee.prev=0,ee.next=3,Kn().catch(It);case 3:G=ee.sent,ee.next=10;break;case 6:throw ee.prev=6,ee.t0=ee.catch(0),he.error(`OT.Publisher.switchTracks failed to getUserMedia: ${ee.t0}`),ee.t0;case 10:qn(G),ee.prev=11,gn(),ee.next=21;break;case 15:if(ee.prev=15,ee.t1=ee.catch(11),!(ee.t1 instanceof T)){ee.next=19;break}return ee.abrupt("return");case 19:throw he.error("Error while binding video",ee.t1),ee.t1;case 21:ee.prev=21,Dr(),ee.next=29;break;case 25:throw ee.prev=25,ee.t2=ee.catch(21),he.error("Error replacing tracks",ee.t2),ee.t2;case 29:case"end":return ee.stop()}},$,null,[[0,6],[11,15],[21,25]])}
1))(),getDataChannel($,G,Y){const ee=Ln(Object.keys(Bt)[0]);ee?ee.then(ae=>{ae.getDataChannel($,G,Y)}):Y(new He.Error("Cannot create a DataChannel before there is a subscriber."))},iceRestart(){mn().then($=>{$.forEach(G=>{const Y=Pt(G);bn("Attempt",{remoteConnectionId:Y.remoteConnectionId}),he.debug("Publisher: ice restart attempt"),G.iceRestart()})})},getState:()=>it,demoOnlyCycleVideo:this.cycleVideo,testOnlyGetFramesEncoded:()=>(0,i.default)(n.default.mark(function $(){var G;return n.default.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return ee.next=2,mn();case 2:if((G=ee.sent).length){ee.next=5;break}throw new Error("No established PeerConnections yet");case 5:return ee.abrupt("return",G[0]._testOnlyGetFramesEncoded());case 6:case"end":return ee.stop()}},$)}))(),onStreamAvailable:zn,startRoutedToRelayedTransition:()=>{Yt("Attempt");const $=Y=>{const ee=ie(Y);this.trigger("streamCreateForP2PComplete",ee),Yt("Failure",{reason:ee.message})};if(!this.session)return void Yt("Failure",{reason:"Not connected to the session."});const G=setTimeout(()=>{Yt("Failure",{reason:"Timeout"})},Ge);this.once("streamCreateForP2PComplete",()=>{clearTimeout(G)}),he.debug(`streamCreateWithSource: send a message to RUMOR for creating the stream with the sourceStreaId P2P and stream ${this.streamId}`),Pn("P2P",Y=>{Y?$(Y):this.trigger("streamCreateForP2PComplete")})},startRelayedToRoutedTransition:($=(0,i.default)(n.default.mark(function Y(){return n.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(un("Attempt"),Ke.session){ae.next=4;break}return un("Failure",{reason:"Not connected to the session."}),ae.abrupt("return");case 4:if(Ke.streamId){ae.next=7;break}return un("Failure",{reason:"No streamId available"}),ae.abrupt("return");case 7:if(xn()){ae.next=10;break}return un("Failure",{reason:"There is no Relayed Peer connection created."}),ae.abrupt("return");case 10:return Ke.session._.streamDestroy(Ke.streamId,"P2P"),ae.t0=Ke,ae.next=14,xn();case 14:return ae.t1=ae.sent,ae.t0._removePeerConnection.call(ae.t0,ae.t1),ae.next=18,vr();case 18:un("Success"),Ke.trigger("streamDestroyForP2PComplete");case 20:case"end":return ae.stop()}},Y)})),function G(){return $.apply(this,arguments)}),forceMuteAudio:function(){ot("publishAudio","Attempt",{publishAudio:!1}),$e.publishAudio=!1;try{Gn("auto"),this.dispatchEvent(new te.MuteForcedEvent),ot("publishAudio","Success",{publishAudio:!1})}catch($){ot("publishAudio","Failure",{message:$.message})}}.bind(this)},this.detectDevices=function(){he.warn("Publisher.detectDevices() is not implemented.")},this.detectMicActivity=function(){he.warn("Publisher.detectMicActivity() is not implemented.")},this.getEchoCancellationMode=function(){return he.warn("Publisher.getEchoCancellationMode() is not implemented."),"fullDuplex"},this.setMicrophoneGain=function(){he.warn("Publisher.setMicrophoneGain() is not implemented.")},this.getMicrophoneGain=function(){return he.warn("Publisher.getMicrophoneGain() is not implemented."),.5},this.setCamera=function(){he.warn("Publisher.setCamera() is not implemented.")},this.setMicrophone=function(){he.warn("Publisher.setMicrophone() is not implemented.")},this.guid=function(){return Sn},this.videoElement=function(){const $=Je&&Je.video();return $?$.domElement():null},this.setStream=$=>{if("PublishingToSession"!==it.current)throw new Error("assignStream called when publisher is not successfully publishing");en.releaseAll(),this.stream=$,this.stream.on("destroyed",this.disconnect,this),en.add(()=>{this.stream&&this.stream.off("destroyed",this.disconnect,this)}),it.set("Publishing"),Je.loading(!pn),dn=new Date,this.dispatchEvent(new te.StreamEvent("streamCreated",$,null,!1)),kt("Success"),this.trigger("publishComplete",null,this)},this.isWebRTC=!0,this.isLoading=function(){return Je&&Je.loading()},this.videoWidth=function(){const $=Je&&Je.video();return $?$.videoWidth():void 0},this.videoHeight=function(){const $=Je&&Je.video();return $?$.videoHeight():void 0}
1,this.getStats=function(G){Wn((Y,ee)=>{Y?G(Y):G(null,ee)})},this.getRtcStatsReport=()=>new t(($,G)=>{($=>{Wn("rtcStatsReport",$)})((Y,ee)=>{Y?G(Y):$(ee)})}),it=new Se($=>{he.error("OT.Publisher State Change Failed: ",$.message),he.debug($)}),this.accessAllowed=!1}}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(60).once;l.exports=function(n){this.publish=-1!==n.indexOf("publish")?1:0,this.subscribe=-1!==n.indexOf("subscribe")?1:0,this.forceUnpublish=-1!==n.indexOf("forceunpublish")?1:0,this.forceDisconnect=-1!==n.indexOf("forcedisconnect")?1:0,this.forceMute=-1!==n.indexOf("forcemute")?1:0,this.supportsWebRTC=t()?1:0,this.permittedTo=i=>Object.prototype.hasOwnProperty.call(this,i)&&1===this[i]}},function(l,E,e){"use strict";const t=e(1)("Stream"),r=e(5),n=e(20),i=e(6),o=e(22)(),s=["name","archiving"];l.exports=function(c,u,d,f,h,g){const v=this;let m;this.id=c,this.streamId=c,this.name=u,this.creationTime=Number(d),this.connection=f,this.channel=g,this.publisher=n.publishers.find({streamId:this.id}),i(this);const p=function(R,I,A,P){let x=I;switch(x){case"active":x="audio"===R.type?"hasAudio":"hasVideo",v[x]=P;break;case"disableWarning":if(x="audio"===R.type?"audioDisableWarning":"videoDisableWarning",v[x]=P,!v["audio"===R.type?"hasAudio":"hasVideo"])return;break;case"fitMode":x="defaultFitMode",v[x]=P;break;case"source":x="audio"===R.type?"audioType":"videoType",v[x]=P;break;case"videoDimensions":v.videoDimensions=P;break;case"orientation":case"width":case"height":return}"screen"===v.videoType&&"hasVideo"===x&&!1===P||v.dispatchEvent(new o.StreamUpdatedEvent(v,x,A,P))},y=function(){return v.publisher?v.publisher:n.subscribers.find(R=>R.stream&&R.stream.id===v.id&&R.session.id===h.id)},S=function(){return!v.publisher};this.getChannelsOfType=function(R){return v.channel.filter(I=>I.type===R)},this.getChannel=function(R){for(let I=0;I<v.channel.length;++I)if(v.channel[I].id===R)return v.channel[I];return null};const T=this.getChannelsOfType("audio")[0],b=this.getChannelsOfType("video")[0];this.hasAudio=null!=T&&T.active,this.hasVideo=null!=b&&b.active,this.videoType=b&&b.source,this.defaultFitMode=b&&b.fitMode,this.videoDimensions={}
1,b&&(this.videoDimensions.width=b.width,this.videoDimensions.height=b.height,this.videoDimensions.orientation=b.orientation,b.on("update",p),this.frameRate=b.frameRate),T&&T.on("update",p),this.setChannelActiveState=function(R,I,A){const P={active:I};A&&(P.activeReason=A),O(R,P)},this.setVideoDimensions=function(R,I){O("video",{width:R,height:I,orientation:0})},this.setRestrictFrameRate=function(R){O("video",{restrictFrameRate:R})},this.setPreferredResolution=function(R){if(!S())return void t.warn("setPreferredResolution has no affect when called by a publisher");if(h.sessionInfo.p2pEnabled)return void t.warn("Stream.setPreferredResolution will not work in a P2P Session");if(R&&void 0===R.width&&void 0===R.height)return;const I=v.getChannelsOfType("video")[0];if(I){if(R&&R.width){if(isNaN(parseInt(R.width,10)))throw new r.Error("stream preferred width must be an integer","Subscriber");I.preferredWidth=parseInt(R.width,10)}else I.preferredWidth=void 0;if(R&&R.height){if(isNaN(parseInt(R.height,10)))throw new r.Error("stream preferred height must be an integer","Subscriber");I.preferredHeight=parseInt(R.height,10)}else I.preferredHeight=void 0;h._.subscriberChannelUpdate(v,y(),I,{preferredWidth:I.preferredWidth||0,preferredHeight:I.preferredHeight||0})}},this.getPreferredResolution=function(){const R=v.getChannelsOfType("video")[0];if(R&&(R.preferredWidth||R.preferredHeight))return{width:R.preferredWidth,height:R.preferredHeight}},this.setPreferredFrameRate=function(R){if(!S())return void t.warn("setPreferredFrameRate has no affect when called by a publisher");if(h.sessionInfo.p2pEnabled)return void t.warn("Stream.setPreferredFrameRate will not work in a P2P Session");if(R&&isNaN(parseFloat(R)))throw new r.Error("stream preferred frameRate must be a number","Subscriber");const I=v.getChannelsOfType("video")[0];I&&(I.preferredFrameRate=R?parseFloat(R):null,h._.subscriberChannelUpdate(v,y(),I,{preferredFrameRate:I.preferredFrameRate||0}))},this.getPreferredFrameRate=function(){const R=v.getChannelsOfType("video")[0];return R?R.preferredFrameRate:null};let O=function(R,I){let A;if(v.publisher)A=P=>h._.streamChannelUpdate(v,P,I);else{const P=y();A=x=>h._.subscriberChannelUpdate(v,P,x,I)}v.getChannelsOfType(R).forEach(A)};this.destroyed=!1,this.destroyedReason=void 0,this.destroy=function(R,I){void 0===R&&(R="clientDisconnected"),m=R,v.destroyed=!0,v.destroyedReason=m,!0!==I&&v.dispatchEvent(new o.DestroyedEvent("destroyed",v,m))},this._={},this._.updateProperty=function(R,I){if(-1===s.indexOf(R))return void t.warn(`Unknown stream property "${R}" was modified to "${I}".`);const A=v[R],P=I;switch(R){case"name":v[R]=P;break;case"archiving":var x=y();v.publisher&&x&&x._.archivingStatus(P),v[R]=P}const D=new o.StreamUpdatedEvent(v,R,A,P);v.dispatchEvent(D)},this._.update=function(R){for(const I in R)!R.hasOwnProperty(I)||v._.updateProperty(I,R[I])},this._.forceMute=function(R){R.hasOwnProperty("channels")&&R.channels.includes("audio")&&v.publisher&&v.publisher._.forceMuteAudio()},this._.updateChannel=function(R,I){const A=v.getChannel(R);A&&A.update(I)}}},function(l,E,e){"use strict";E.__esModule=!0,E.STATUS=E.PONG=E.PING=E.DISCONNECT=E.CONNECT=E.MESSAGE=E.UNSUBSCRIBE=E.SUBSCRIBE=void 0,E.SUBSCRIBE=0,E.UNSUBSCRIBE=1,E.MESSAGE=2,E.CONNECT=3,E.DISCONNECT=4,E.PING=7,E.PONG=8,E.STATUS=9},function(l,E,e){"use strict";const t=e(7),r=e(169),n=e(6),i=e(22)(),o=e(710);function s(a,c,u,d,f){let h;this.id=a,this.connectionId=a,this.creationTime=c?Number(c):null,this.data=u,this.capabilities=o(d),this.permissions=new r(f),this.quality=null,n(this),this.destroy=(g,v)=>{h=g||"clientDisconnected",!0!==v&&this.dispatchEvent(new i.DestroyedEvent("destroyed",this,h))},this.destroyed=()=>void 0!==h,this.destroyedReason=()=>h}s.fromHash=a=>{let h=a.permissions;return new s(a.id,a.creationTime,a.data,t(a.capablities||{},{supportsWebRTC:!0}),h||[])},l.exports=s},function(l,E){var e="object"==typeof(void 0!==typeof window?window:global)&&(void 0!==typeof window?window:global)&&(void 0!==typeof window?window:global).Object===Object&&(void 0!==typeof window?window:global);l.exports=e},function(l,E){var t=Function.prototype.toString;l.exports=function r(n){if(null!=n){try{return t.call(n)}catch(i){}try{return n+""}catch(i){}}return""}},function(l,E,e){var t=e(37),r=function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch(i){}}();l.exports=r},function(l,E,e){var t=e(39),r=e(30);l.exports=function n(i,o){return i&&t(o,r(o),i)}},function(l,E,e){var t=e(369),r=e(64),n=e(10),i=e(65),o=e(66),s=e(85),c=Object.prototype.hasOwnProperty;l.exports=function u(d,f){var h=n(d),g=!h&&r(d),v=!h&&!g&&i(d),m=!h&&!g&&!v&&s(d),p=h||g||v||m,y=p?t(d.length,String):[],S=y.length;for(var T in d)(f||c.call(d,T))&&(!p||!("length"==T||v&&("offset"==T||"parent"==T)||m&&("buffer"==T||"byteLength"==T||"byteOffset"==T)||o(T,S)))&&y.push(T);return y}},function(l,E){l.exports=function e(t,r){return function(n){return t(r(n))}}},function(l,E,e){(function(t){var r=e(14),n=E&&!E.nodeType&&E,i=n&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===n?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function c(u,d){if(d)return u.slice();var f=u.length,h=a?a(f):new u.constructor(f);return u.copy(h),h}}).call(this,e(84)(l))},function(l,E){l.exports=function e(){return[]}},function(l,E,e){var t=e(116),r=e(117),n=e(115),i=e(180);l.exports=Object.getOwnPropertySymbols?function(a){for(var c=[];a;)t(c,n(a)),a=r(a);return c}:i},function(l,E,e){var t=e(183),r=e(115),n=e(30);l.exports=function i(o){return t(o,n,r)}},function(l,E,e){var t=e(116),r=e(10);l.exports=function n(i,o,s){var a=o(i);return r(i)?a:t(a,s(i))}},function(l,E,e){var t=e(183),r=e(181),n=e(52);l.exports=function i(o){return t(o,n,r)}},function(l,E,e){var n=e(37)(e(14),"Set");l.exports=n},function(l,E,e){var n=e(37)(e(14),"WeakMap");l.exports=n},function(l,E,e){var t=e(14);l.exports=t.Uint8Array},function(l,E,e){var t=e(118);l.exports=function r(n,i){var o=i?t(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}},function(l,E,e){var t=e(86),r=e(117),n=e(68);l.exports=function i(o){return"function"!=typeof o.constructor||n(o)?{}:t(r(o))}},function(l,E,e){var t=e(110);function n(i,o){if("function"!=typeof i||null!=o&&"function"!=typeof o)throw new TypeError("Expected a function");var s=function(){var a=arguments,c=o?o.apply(this,a):a[0],u=s.cache;if(u.has(c))return u.get(c);var d=i.apply(this,a);return s.cache=u.set(c,d)||u,d};return s.cache=new(n.Cache||t),s}n.Cache=t,l.exports=n},function(l,E,e){var t=e(87),r=e(122);l.exports=function n(i){return t(function(o,s){var a=-1,c=s.length,u=c>1?s[c-1]:void 0,d=c>2?s[2]:void 0;for(u=i.length>3&&"function"==typeof u?(c--,u):void 0,d&&r(s[0],s[1],d)&&(u=c<3?void 0:u,c=1),o=Object(o);++a<c;){var f=s[a];f&&i(o,f,a,u)}return o}
1)}},function(l,E,e){var t=e(120),r=Math.max;l.exports=function n(i,o,s){return o=r(void 0===o?i.length-1:o,0),function(){for(var a=arguments,c=-1,u=r(a.length-o,0),d=Array(u);++c<u;)d[c]=a[o+c];c=-1;for(var f=Array(o+1);++c<o;)f[c]=a[c];return f[o]=s(d),t(i,this,f)}}},function(l,E){var r=Date.now;l.exports=function n(i){var o=0,s=0;return function(){var a=r(),c=16-(a-s);if(s=a,c>0){if(++o>=800)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}},function(l,E,e){"use strict";l.exports=e(397)()?WeakMap:e(398)},function(l,E,e){"use strict";var t=Object.create,r=Object.getPrototypeOf,n={};l.exports=function(){var i=Object.setPrototypeOf,o=arguments[0]||t;return"function"==typeof i&&r(i(o(null),n))===n}},function(l,E,e){"use strict";var s,a,c,u,t=e(197),r=e(31),n=Object.prototype.isPrototypeOf,i=Object.defineProperty,o={configurable:!0,enumerable:!1,writable:!0,value:void 0};s=function(a,c){if(r(a),null===c||t(c))return a;throw new TypeError("Prototype must be null or an object")},l.exports=(a=function(){var u,a=Object.create(null),c={},d=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(d){try{(u=d.set).call(a,c)}catch(f){}if(Object.getPrototypeOf(a)===c)return{set:u,level:2}}return a.__proto__=c,Object.getPrototypeOf(a)===c?{level:2}:((a={}).__proto__=c,Object.getPrototypeOf(a)===c&&{level:1})}(),a?(2===a.level?a.set?(u=a.set,c=function(d,f){return u.call(s(d,f),f),d}):c=function(d,f){return s(d,f).__proto__=f,d}:c=function d(f,h){var g;return s(f,h),(g=n.call(d.nullPolyfill,f))&&delete d.nullPolyfill.__proto__,null===h&&(h=d.nullPolyfill),f.__proto__=h,g&&i(d.nullPolyfill,"__proto__",o),f},Object.defineProperty(c,"level",{configurable:!1,enumerable:!1,writable:!1,value:a.level})):null),e(400)},function(l,E,e){"use strict";var t=e(42),r={function:!0,object:!0};l.exports=function(n){return t(n)&&r[typeof n]||!1}},function(l,E,e){"use strict";var t=e(403),r=/^\s*class[\s{/}]/,n=Function.prototype.toString;l.exports=function(i){return!(!t(i)||r.test(n.call(i)))}},function(l,E,e){"use strict";var t=e(42),r=Array.prototype.forEach,n=Object.create,i=function(o,s){var a;for(a in o)s[a]=o[a]};l.exports=function(o){var s=n(null);return r.call(arguments,function(a){!t(a)||i(Object(a),s)}),s}},function(l,E,e){"use strict";l.exports=e(410)()?String.prototype.contains:e(411)},function(l,E,e){"use strict";var t=e(89),r=e(90),n=e(412),i=e(441),o=e(442),s=e(43).iterator;l.exports=function(a){return"function"==typeof o(a)[s]?a[s]():t(a)?new n(a):r(a)?new i(a):new n(a)}},function(l,E,e){"use strict";var t=e(417);l.exports=function(r){if(!t(r))throw new TypeError(r+" is not a symbol");return r}},function(l,E,e){"use strict";var d,t=e(421),r=e(125),n=e(70),i=e(31),o=e(32),s=e(422),a=e(43),c=Object.defineProperty,u=Object.defineProperties;l.exports=d=function(f,h){if(!(this instanceof d))throw new TypeError("Constructor requires 'new'");u(this,{__list__:o("w",i(f)),__context__:o("w",h),__nextIndex__:o("w",0)}),h&&(n(h.on),h.on("_add",this._onAdd),h.on("_delete",this._onDelete),h.on("_clear",this._onClear))},delete d.prototype.constructor,u(d.prototype,r({_next:o(function(){var f;if(this.__list__){if(this.__redo__&&void 0!==(f=this.__redo__.shift()))return f;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:o(function(){return this._createResult(this._next())}),_createResult:o(function(f){return void 0===f?{done:!0,value:void 0}:{done:!1,value:this._resolve(f)}}),_resolve:o(function(f){return this.__list__[f]}),_unBind:o(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:o(function(){return"[object "+(this[a.toStringTag]||"Object")+"]"})},s({_onAdd:o(function(f){if(!(f>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void c(this,"__redo__",o("c",[f]));this.__redo__.forEach(function(h,g){h>=f&&(this.__redo__[g]=++h)},this),this.__redo__.push(f)}}),_onDelete:o(function(f){var h;f>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(h=this.__redo__.indexOf(f))&&this.__redo__.splice(h,1),this.__redo__.forEach(function(g,v){g>f&&(this.__redo__[v]=--g)},this)))}),_onClear:o(function(){this.__redo__&&t.call(this.__redo__),this.__nextIndex__=0})}))),c(d.prototype,a.iterator,o(function(){return this}))},function(l,E,e){"use strict";var t=e(54),r=e(124),n=e(424),i=e(425),o=function(s,a){return s.replace("%v",i(a))};l.exports=function(s,a,c){if(!r(c))throw new TypeError(o(a,s));
1if(!t(s)){if("default"in c)return c.default;if(c.isOptional)return null}var u=n(c.errorMessage);throw t(u)||(u=a),new TypeError(o(u,s))}},function(l,E){l.exports=function e(t,r,n,i){for(var o=t.length,s=n+(i?1:-1);i?s--:++s<o;)if(r(t[s],s,t))return s;return-1}},function(l,E,e){l.exports=e(453)},function(l,E,e){"use strict";l.exports=function(r,n){return function(){for(var o=new Array(arguments.length),s=0;s<o.length;s++)o[s]=arguments[s];return r.apply(n,o)}}},function(l,E,e){"use strict";var t=e(17);function r(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}l.exports=function(i,o,s){if(!o)return i;var a;if(s)a=s(o);else if(t.isURLSearchParams(o))a=o.toString();else{var c=[];t.forEach(o,function(f,h){null==f||(t.isArray(f)?h+="[]":f=[f],t.forEach(f,function(v){t.isDate(v)?v=v.toISOString():t.isObject(v)&&(v=JSON.stringify(v)),c.push(r(h)+"="+r(v))}))}),a=c.join("&")}if(a){var u=i.indexOf("#");-1!==u&&(i=i.slice(0,u)),i+=(-1===i.indexOf("?")?"?":"&")+a}return i}},function(l,E,e){"use strict";l.exports=function(r){return!(!r||!r.__CANCEL__)}},function(l,E,e){"use strict";(function(t){var r=e(17),n=e(458),i={"Content-Type":"application/x-www-form-urlencoded"};function o(c,u){!r.isUndefined(c)&&r.isUndefined(c["Content-Type"])&&(c["Content-Type"]=u)}var a={adapter:function s(){var c;return("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(c=e(211)),c}(),transformRequest:[function(u,d){return n(d,"Accept"),n(d,"Content-Type"),r.isFormData(u)||r.isArrayBuffer(u)||r.isBuffer(u)||r.isStream(u)||r.isFile(u)||r.isBlob(u)?u:r.isArrayBufferView(u)?u.buffer:r.isURLSearchParams(u)?(o(d,"application/x-www-form-urlencoded;charset=utf-8"),u.toString()):r.isObject(u)?(o(d,"application/json;charset=utf-8"),JSON.stringify(u)):u}],transformResponse:[function(u){if("string"==typeof u)try{u=JSON.parse(u)}catch(d){}return u}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(u){return u>=200&&u<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(u){a.headers[u]={}}),r.forEach(["post","put","patch"],function(u){a.headers[u]=r.merge(i)}),l.exports=a}).call(this,e(69))},function(l,E,e){"use strict";(function(t){var r=e(17),n=e(459),i=e(461),o=e(208),s=e(462),a=e(465),c=e(466),u=e(212);l.exports=function(f){return new t(function(g,v){var m=f.data,p=f.headers;r.isFormData(m)&&delete p["Content-Type"];var y=new XMLHttpRequest;if(f.auth){var S=f.auth.username||"",T=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";p.Authorization="Basic "+btoa(S+":"+T)}var b=s(f.baseURL,f.url);if(y.open(f.method.toUpperCase(),o(b,f.params,f.paramsSerializer),!0),y.timeout=f.timeout,y.onreadystatechange=function(){if(y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))){var R="getAllResponseHeaders"in y?a(y.getAllResponseHeaders()):null;n(g,v,{data:f.responseType&&"text"!==f.responseType?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:R,config:f,request:y}),y=null}},y.onabort=function(){!y||(v(u("Request aborted",f,"ECONNABORTED",y)),y=null)},y.onerror=function(){v(u("Network Error",f,null,y)),y=null},y.ontimeout=function(){var R="timeout of "+f.timeout+"ms exceeded";f.timeoutErrorMessage&&(R=f.timeoutErrorMessage),v(u(R,f,"ECONNABORTED",y)),y=null},r.isStandardBrowserEnv()){var O=(f.withCredentials||c(b))&&f.xsrfCookieName?i.read(f.xsrfCookieName):void 0;O&&(p[f.xsrfHeaderName]=O)}if("setRequestHeader"in y&&r.forEach(p,function(R,I){void 0===m&&"content-type"===I.toLowerCase()?delete p[I]:y.setRequestHeader(I,R)}),r.isUndefined(f.withCredentials)||(y.withCredentials=!!f.withCredentials),f.responseType)try{y.responseType=f.responseType}catch(C){if("json"!==f.responseType)throw C}"function"==typeof f.onDownloadProgress&&y.addEventListener("progress",f.onDownloadProgress),"function"==typeof f.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",f.onUploadProgress),f.cancelToken&&f.cancelToken.promise.then(function(R){!y||(y.abort(),v(R),y=null)}),m||(m=null),y.send(m)})}}).call(this,e(0))},function(l,E,e){"use strict";var t=e(460);l.exports=function(n,i,o,s,a){var c=new Error(n);return t(c,i,o,s,a)}},function(l,E,e){"use strict";var t=e(17);l.exports=function(n,i){i=i||{};var o={},s=["url","method","data"],a=["headers","auth","proxy","params"],c=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function d(v,m){return t.isPlainObject(v)&&t.isPlainObject(m)?t.merge(v,m):t.isPlainObject(m)?t.merge({},m):t.isArray(m)?m.slice():m}function f(v){t.isUndefined(i[v])?t.isUndefined(n[v])||(o[v]=d(void 0,n[v])):o[v]=d(n[v],i[v])}t.forEach(s,function(m){t.isUndefined(i[m])||(o[m]=d(void 0,i[m]))}),t.forEach(a,f),t.forEach(c,function(m){t.isUndefined(i[m])?t.isUndefined(n[m])||(o[m]=d(void 0,n[m])):o[m]=d(void 0,i[m])}
1),t.forEach(u,function(m){m in i?o[m]=d(n[m],i[m]):m in n&&(o[m]=d(void 0,n[m]))});var h=s.concat(a).concat(c).concat(u),g=Object.keys(n).concat(Object.keys(i)).filter(function(m){return-1===h.indexOf(m)});return t.forEach(g,f),o}},function(l,E,e){"use strict";function t(r){this.message=r}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,l.exports=t},function(l,E,e){var t=e(471),r=e(473);l.exports=function n(i,o,s){return t(r,i,o,s)}},function(l,E,e){var t=e(88),r=e(217);l.exports=r?function(i,o){return r.set(i,o),i}:t},function(l,E,e){var t=e(186),r=t&&new t;l.exports=r},function(l,E,e){var t=e(219),r=e(220),n=e(477),i=e(95),o=e(221),s=e(227),a=e(486),c=e(134),u=e(14);l.exports=function p(y,S,T,b,O,C,R,I,A,P){var x=128&S,D=1&S,L=2&S,N=24&S,U=512&S,B=L?void 0:i(y);return function V(){for(var H=arguments.length,j=Array(H),M=H;M--;)j[M]=arguments[M];if(N)var F=s(V),z=n(j,F);if(b&&(j=t(j,b,O,N)),C&&(j=r(j,C,R,N)),H-=z,N&&H<P){var w=c(j,F);return o(y,S,p,V.placeholder,T,j,w,I,A,P-H)}var k=D?T:this,W=L?k[y]:y;return H=j.length,I?j=a(j,I):U&&H>1&&j.reverse(),x&&A<H&&(j.length=A),this&&this!==u&&this instanceof V&&(W=B||i(W)),W.apply(k,j)}}},function(l,E){var e=Math.max;l.exports=function t(r,n,i,o){for(var s=-1,a=r.length,c=i.length,u=-1,d=n.length,f=e(a-c,0),h=Array(d+f),g=!o;++u<d;)h[u]=n[u];for(;++s<c;)(g||s<a)&&(h[i[s]]=r[s]);for(;f--;)h[u++]=r[s++];return h}},function(l,E){var e=Math.max;l.exports=function t(r,n,i,o){for(var s=-1,a=r.length,c=-1,u=i.length,d=-1,f=n.length,h=e(a-u,0),g=Array(h+f),v=!o;++s<h;)g[s]=r[s];for(var m=s;++d<f;)g[m+d]=n[d];for(;++c<u;)(v||s<a)&&(g[m+i[c]]=r[s++]);return g}},function(l,E,e){var t=e(478),r=e(225),n=e(226);l.exports=function d(f,h,g,v,m,p,y,S,T,b){var O=8&h;h|=O?32:64,4&(h&=~(O?64:32))||(h&=-4);var P=[f,h,m,O?p:void 0,O?y:void 0,O?void 0:p,O?void 0:y,S,T,b],x=g.apply(void 0,P);return t(f)&&r(x,P),x.placeholder=v,n(x,f,h)}},function(l,E,e){var t=e(217),r=e(223);l.exports=t?function(i){return t.get(i)}:r},function(l,E){l.exports=function e(){}},function(l,E,e){var t=e(86),r=e(133);function n(i,o){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=void 0}(n.prototype=t(r.prototype)).constructor=n,l.exports=n},function(l,E,e){var t=e(216),n=e(193)(t);l.exports=n},function(l,E,e){var t=e(483),r=e(484),n=e(121),i=e(485);l.exports=function o(s,a,c){var u=a+"";return n(s,r(u,i(t(u),c)))}},function(l,E){l.exports=function e(t){return t.placeholder}},function(l,E,e){var t=e(490),r=e(9),n=e(71),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt;l.exports=function u(d){if("number"==typeof d)return d;if(n(d))return NaN;if(r(d)){var f="function"==typeof d.valueOf?d.valueOf():d;d=r(f)?f+"":f}if("string"!=typeof d)return 0===d?d:+d;d=t(d);var h=s.test(d);return h||a.test(d)?c(d.slice(2),h?2:8):o.test(d)?NaN:+d}},function(l,E,e){var t=e(498),r=e(16);l.exports=function n(i,o,s,a,c){return i===o||(null==i||null==o||!r(i)&&!r(o)?i!=i&&o!=o:t(i,o,s,a,n,c))}},function(l,E,e){var t=e(92),r=e(231),n=e(94);l.exports=function s(a,c,u,d,f,h){var g=1&u,v=a.length,m=c.length;if(v!=m&&!(g&&m>v))return!1;var p=h.get(a),y=h.get(c);if(p&&y)return p==c&&y==a;var S=-1,T=!0,b=2&u?new t:void 0;for(h.set(a,c),h.set(c,a);++S<v;){var O=a[S],C=c[S];if(d)var R=g?d(C,O,S,c,a,h):d(O,C,S,a,c,h);if(void 0!==R){if(R)continue;T=!1;break}if(b){if(!r(c,function(I,A){if(!n(b,A)&&(O===I||f(O,I,u,d,h)))return b.push(A)})){T=!1;break}}else if(O!==C&&!f(O,C,u,d,h)){T=!1;break}}return h.delete(a),h.delete(c),T}},function(l,E){l.exports=function e(t,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}},function(l,E){l.exports=function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}},function(l,E,e){var t=e(9);l.exports=function r(n){return n==n&&!t(n)}},function(l,E){l.exports=function e(t,r){return function(n){return null!=n&&n[t]===r&&(void 0!==r||t in Object(n))}}},function(l,E,e){var t=e(503),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,i=t(function(o){var s=[];
1return 46===o.charCodeAt(0)&&s.push(""),o.replace(r,function(a,c,u,d){s.push(u?d.replace(n,"$1"):c||a)}),s});l.exports=i},function(l,E,e){var t=e(505),r=e(506);l.exports=function n(i,o){return null!=i&&r(i,o,t)}},function(l,E,e){var t=e(116),r=e(512);l.exports=function n(i,o,s,a,c){var u=-1,d=i.length;for(s||(s=r),c||(c=[]);++u<d;){var f=i[u];o>0&&s(f)?o>1?n(f,o-1,s,a,c):t(c,f):a||(c[c.length]=f)}return c}},function(l,E,e){var r=e(519)();l.exports=r},function(l,E,e){"use strict";var t=e(520),r=e(521);function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}E.parse=T,E.resolve=function O(R,I){return T(R,!1,!0).resolve(I)},E.resolveObject=function C(R,I){return R?T(R,!1,!0).resolveObject(I):I},E.format=function b(R){return r.isString(R)&&(R=T(R)),R instanceof n?R.format():n.prototype.format.call(R)},E.Url=n;var i=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),f=["/","?","#"],g=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=e(522);function T(R,I,A){if(R&&r.isObject(R)&&R instanceof n)return R;var P=new n;return P.parse(R,I,A),P}n.prototype.parse=function(R,I,A){if(!r.isString(R))throw new TypeError("Parameter 'url' must be a string, not "+typeof R);var P=R.indexOf("?"),x=-1!==P&&P<R.indexOf("#")?"?":"#",D=R.split(x);D[0]=D[0].replace(/\\/g,"/");var N=R=D.join(x);if(N=N.trim(),!A&&1===R.split("#").length){var U=s.exec(N);if(U)return this.path=N,this.href=N,this.pathname=U[1],U[2]?(this.search=U[2],this.query=I?S.parse(this.search.substr(1)):this.search.substr(1)):I&&(this.search="",this.query={}),this}var B=i.exec(N);if(B){var V=(B=B[0]).toLowerCase();this.protocol=V,N=N.substr(B.length)}if(A||B||N.match(/^\/\/[^@\/]+@[^@\/]+/)){var H="//"===N.substr(0,2);H&&(!B||!p[B])&&(N=N.substr(2),this.slashes=!0)}if(!p[B]&&(H||B&&!y[B])){for(var j=-1,M=0;M<f.length;M++)-1!==(F=N.indexOf(f[M]))&&(-1===j||F<j)&&(j=F);var z,w;for(-1!==(w=-1===j?N.lastIndexOf("@"):N.lastIndexOf("@",j))&&(z=N.slice(0,w),N=N.slice(w+1),this.auth=decodeURIComponent(z)),j=-1,M=0;M<d.length;M++){var F;-1!==(F=N.indexOf(d[M]))&&(-1===j||F<j)&&(j=F)}-1===j&&(j=N.length),this.host=N.slice(0,j),N=N.slice(j),this.parseHost(),this.hostname=this.hostname||"";var k="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!k)for(var W=this.hostname.split(/\./),Z=(M=0,W.length);M<Z;M++){var ie=W[M];if(ie&&!ie.match(g)){for(var _="",se=0,pe=ie.length;se<pe;se++)ie.charCodeAt(se)>127?_+="x":_+=ie[se];if(!_.match(g)){var ue=W.slice(0,M),me=W.slice(M+1),ve=ie.match(v);ve&&(ue.push(ve[1]),me.unshift(ve[2])),me.length&&(N="/"+me.join(".")+N),this.hostname=ue.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),k||(this.hostname=t.toASCII(this.hostname)),this.host=(this.hostname||"")+(this.port?":"+this.port:""),this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==N[0]&&(N="/"+N))}if(!m[V])for(M=0,Z=u.length;M<Z;M++){var Q=u[M];if(-1!==N.indexOf(Q)){var K=encodeURIComponent(Q);K===Q&&(K=escape(Q)),N=N.split(Q).join(K)}}var re=N.indexOf("#");-1!==re&&(this.hash=N.substr(re),N=N.slice(0,re));var de=N.indexOf("?");return-1!==de?(this.search=N.substr(de),this.query=N.substr(de+1),I&&(this.query=S.parse(this.query)),N=N.slice(0,de)):I&&(this.search="",this.query={}),N&&(this.pathname=N),y[V]&&this.hostname&&!this.pathname&&(this.pathname="/"),(this.pathname||this.search)&&(this.path=(this.pathname||"")+(this.search||"")),this.href=this.format(),this},n.prototype.format=function(){var R=this.auth||"";R&&(R=(R=encodeURIComponent(R)).replace(/%3A/i,":"),R+="@");var I=this.protocol||"",A=this.pathname||"",P=this.hash||"",x=!1,D="";this.host?x=R+this.host:this.hostname&&(x=R+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&r.isObject(this.query)&&Object.keys(this.query).length&&(D=S.stringify(this.query));var L=this.search||D&&"?"+D||"";return I&&":"!==I.substr(-1)&&(I+=":"),this.slashes||(!I||y[I])&&!1!==x?(x="//"+(x||""),A&&"/"!==A.charAt(0)&&(A="/"+A)):x||(x=""),P&&"#"!==P.charAt(0)&&(P="#"+P),L&&"?"!==L.charAt(0)&&(L="?"+L),I+x+(A=A.replace(/[?#]/g,function(N){return encodeURIComponent(N)}))+(L=L.replace("#","%23"))+P},n.prototype.resolve=function(R){return this.resolveObject(T(R,!1,!0)).format()},n.prototype.resolveObject=function(R){if(r.isString(R)){var I=new n;I.parse(R,!1,!0),R=I}for(var A=new n,P=Object.keys(this),x=0;x<P.length;x++){var D=P[x];A[D]=this[D]}if(A.hash=R.hash,""===R.href)return A.href=A.format(),A;if(R.slashes&&!R.protocol){for(var L=Object.keys(R),N=0;N<L.length;N++){var U=L[N];"protocol"!==U&&(A[U]=R[U])}return y[A.protocol]&&A.hostname&&!A.pathname&&(A.path=A.pathname="/"),A.href=A.format(),A}if(R.protocol&&R.protocol!==A.protocol){if(!y[R.protocol]){for(var B=Object.keys(R),V=0;V<B.length;V++){var H=B[V];A[H]=R[H]}return A.href=A.format(),A}if(A.protocol=R.protocol,R.host||p[R.protocol])A.pathname=R.pathname;else{for(var Z=(R.pathname||"").split("/");Z.length&&!(R.host=Z.shift()););R.host||(R.host=""),R.hostname||(R.hostname=""),""!==Z[0]&&Z.unshift(""),Z.length<2&&Z.unshift(""),A.pathname=Z.join("/")}
1return A.search=R.search,A.query=R.query,A.host=R.host||"",A.auth=R.auth,A.hostname=R.hostname||R.host,A.port=R.port,(A.pathname||A.search)&&(A.path=(A.pathname||"")+(A.search||"")),A.slashes=A.slashes||R.slashes,A.href=A.format(),A}var F=A.pathname&&"/"===A.pathname.charAt(0),z=R.host||R.pathname&&"/"===R.pathname.charAt(0),w=z||F||A.host&&R.pathname,k=w,W=A.pathname&&A.pathname.split("/")||[],ie=(Z=R.pathname&&R.pathname.split("/")||[],A.protocol&&!y[A.protocol]);if(ie&&(A.hostname="",A.port=null,A.host&&(""===W[0]?W[0]=A.host:W.unshift(A.host)),A.host="",R.protocol&&(R.hostname=null,R.port=null,R.host&&(""===Z[0]?Z[0]=R.host:Z.unshift(R.host)),R.host=null),w=w&&(""===Z[0]||""===W[0])),z)A.host=R.host||""===R.host?R.host:A.host,A.hostname=R.hostname||""===R.hostname?R.hostname:A.hostname,A.search=R.search,A.query=R.query,W=Z;else if(Z.length)W||(W=[]),W.pop(),W=W.concat(Z),A.search=R.search,A.query=R.query;else if(!r.isNullOrUndefined(R.search))return ie&&(A.hostname=A.host=W.shift(),(_=!!(A.host&&A.host.indexOf("@")>0)&&A.host.split("@"))&&(A.auth=_.shift(),A.host=A.hostname=_.shift())),A.search=R.search,A.query=R.query,(!r.isNull(A.pathname)||!r.isNull(A.search))&&(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.href=A.format(),A;if(!W.length)return A.pathname=null,A.path=A.search?"/"+A.search:null,A.href=A.format(),A;for(var se=W.slice(-1)[0],pe=(A.host||R.host||W.length>1)&&("."===se||".."===se)||""===se,ue=0,me=W.length;me>=0;me--)"."===(se=W[me])?W.splice(me,1):".."===se?(W.splice(me,1),ue++):ue&&(W.splice(me,1),ue--);if(!w&&!k)for(;ue--;ue)W.unshift("..");w&&""!==W[0]&&(!W[0]||"/"!==W[0].charAt(0))&&W.unshift(""),pe&&"/"!==W.join("/").substr(-1)&&W.push("");var _,ve=""===W[0]||W[0]&&"/"===W[0].charAt(0);return ie&&(A.hostname=A.host=ve?"":W.length?W.shift():"",(_=!!(A.host&&A.host.indexOf("@")>0)&&A.host.split("@"))&&(A.auth=_.shift(),A.host=A.hostname=_.shift())),(w=w||A.host&&W.length)&&!ve&&W.unshift(""),W.length?A.pathname=W.join("/"):(A.pathname=null,A.path=null),(!r.isNull(A.pathname)||!r.isNull(A.search))&&(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.auth=R.auth||A.auth,A.slashes=A.slashes||R.slashes,A.href=A.format(),A},n.prototype.parseHost=function(){var R=this.host,I=o.exec(R);I&&(":"!==(I=I[0])&&(this.port=I.substr(1)),R=R.substr(0,R.length-I.length)),R&&(this.hostname=R)}},function(l,E,e){"use strict";const t=e(15),r=e(19),n=e(1)("guidStorage"),i={};let o,s;l.exports=i,i.override=u=>{if(!t((d=u).get)||!t(d.set))throw new Error("The storageInterface argument does not seem to be valid, it must implement get and set methods");var d;o!==u&&(o=u,s&&o.set(s,d=>{d&&n.error(`Failed to send initial Guid value (${s}) to the newly assigned Guid Storage. The error was: ${d}`)}))},i.get=u=>{var d;d=(d,f)=>{d?u(d):(f?s||(s=f):(f=r(),o.set(f,h=>{h?u(h):s=f})),u(null,s))},s?d(null,s):o.get(d)},i.override({get(u){let d;try{d=(void 0!==typeof window?window:global).localStorage.getItem("opentok_client_id")}catch(f){d||(d=r())}u(null,d)},set(u,d){try{(void 0!==typeof window?window:global).localStorage.setItem("opentok_client_id",u)}catch(f){}d(null)}}),i.set=u=>{s=u}},function(l,E){var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var t=new Uint8Array(16);l.exports=function(){return e(t),t}}else{var r=new Array(16);l.exports=function(){for(var o,i=0;i<16;i++)0==(3&i)&&(o=4294967296*Math.random()),r[i]=o>>>((3&i)<<3)&255;return r}}},function(l,E){for(var e=[],t=0;t<256;++t)e[t]=(t+256).toString(16).substr(1);l.exports=function r(n,i){var o=i||0;return[e[n[o++]],e[n[o++]],e[n[o++]],e[n[o++]],"-",e[n[o++]],e[n[o++]],"-",e[n[o++]],e[n[o++]],"-",e[n[o++]],e[n[o++]],"-",e[n[o++]],e[n[o++]],e[n[o++]],e[n[o++]],e[n[o++]],e[n[o++]]].join("")}},function(l,E,e){"use strict";const t=e(7),r=e(1)("analytics"),n=e(527),i=e(19),o=e(244),a=e(138).prependProxyToUrlIfNeeded,u=e(139).getProxyUrl,d=i(),f=new n;l.exports=function(g){var v=this;let p=g.queue,y=void 0===p?f:p,S=g.ajax,T=void 0===S?o:S;this.loggingUrl=g.loggingUrl,this.updateEndPoints=()=>
1{if(!this.proxyUrl){this.proxyUrl=u();const R=a(this.loggingUrl,this.proxyUrl);this.loggingUrl=R}this.endPoint=`${this.loggingUrl}/logging/ClientEvent`,this.endPointQos=`${this.loggingUrl}/logging/ClientQos`},this.updateEndPoints();const b={};this.logError=function(R,I,A,P,x){void 0===P&&(P=null),void 0===x&&(x={});const L=x.partnerId;if(((R,I,A)=>{if(!A)return!1;const P=[A,I,R].join("_");return(b[P]||0)>=100})(R,I,L))return;const N=[L,I,R].join("_"),U=P;b[N]=void 0!==b[N]?b[N]+1:1,v.logEvent(t(x,{action:`${I}.${R}`,payload:U}),!1)},this.logEvent=function(R,I,A,P){if(void 0===I&&(I=!1),void 0===P&&(P=()=>{}),v.updateEndPoints(),R.clientInstanceId=d,A&&!isNaN(A)&&Math.random()>A)return void r.debug("skipping sending analytics due to throttle:",R);let x;r.debug("queueing analytics:",v.loggingUrl,R);try{x=JSON.stringify(R)}catch(D){return void P(D)}!function(I,A,P){void 0===A&&(A=()=>{}),y.add(x=>{r.debug("sending analytics:",v.loggingUrl,I),T.post(P?v.endPointQos:v.endPoint,{body:I,overrideMimeType:"text/plain",headers:{Accept:"text/plain","Content-Type":"application/json"}},D=>{D&&r.debug("Failed to send ClientEvent, moving on to the next item."),A(D||void 0),x()})})}(x,P,I)},this.logQOS=R=>this.logEvent(R,!0)}},function(l,E,e){"use strict";const t=e(245),r=e(2),n=e(247),i=e(7),o={};l.exports=o,"Node"!==r.name&&(o.request=function(a,c,u){const d=new(void 0!==typeof window?window:global).XMLHttpRequest,f=c||{};if(f.method){c.overrideMimeType&&(d.overrideMimeType&&d.overrideMimeType(c.overrideMimeType),delete c.overrideMimeType),u&&(t(d).on("load",g=>{const v=g.target.status;v>=200&&(v<300||304===v)?u(null,g):u(g)}),t(d).on("error",u)),d.open(c.method,a,!0),f.headers||(f.headers={});for(const g in f.headers)!Object.prototype.hasOwnProperty.call(f.headers,g)||d.setRequestHeader(g,f.headers[g]);d.send(c.body&&function s(a){if("string"==typeof a)return a;const c=[];return Object.keys(a).forEach(u=>{c.push(`${encodeURIComponent(u)}=${encodeURIComponent(a[u])}`)}),c.join("&").replace(/\+/g,"%20")}(c.body))}else u(new Error("No HTTP method specified in options"))},o.get=function(a,c,u){const d=i(c||{},{method:"GET"});o.request(a,d,u)},o.post=function(a,c,u){const d=i(c||{},{method:"POST"});o.request(a,d,u)},o.getJSON=function(a,c,u){const f=i({Accept:"application/json"},(c=c||{}).headers||{});o.get(a,i(c||{},{headers:f}),function(g,v){if(g)u(g,v&&v.target&&v.target.responseText);else{let m;try{m=JSON.parse(v.target.responseText)}catch(p){return void u(p,v&&v.target&&v.target.responseText)}u(null,m,v)}})},n(o))},function(l,E,e){"use strict";const t=e(246);l.exports=function(r,n){return new t(r,n)}},function(l,E,e){"use strict";const t=e(15),r={attributes:e(528),css:e(529),classNames:e(533),observers:e(535)},n=/^#([\w-]*)$/,i=function(u){return Array.prototype.slice.call(u)},s=function(u,d){const f=function(u,d){let f;if(void 0===u)return[];if("string"==typeof u){f=[];const h=n.exec(u);if(d=d||document,h&&h[1]){const g=d.getElementById(h[1]);g&&f.push(g)}else f=d.querySelectorAll(u)}else u&&(u.nodeType||(void 0!==typeof window?window:global).XMLHttpRequest&&u instanceof(void 0!==typeof window?window:global).XMLHttpRequest||u===(void 0!==typeof window?window:global))?(f=[u],d=u):Array.isArray(u)?(f=u.slice(),d=null):f=i(f);return f}(u,d);this.context=d,this.toArray=function(){return f},this.length=f.length,this.first=f[0],this.last=f[f.length-1],this.get=function(h){return void 0===h?f:f[h]}};l.exports=s,(s._attachToOTHelpers={}).removeElement=function(c){return new s(c).remove()},s.prototype.getAsArray=function(){let c=this.get();return t(c.forEach)||(c=i(c)),c},s.prototype.some=function(c,u){return this.getAsArray().some(c,u)},s.prototype.forEach=function(c,u){return this.getAsArray().forEach(c,u),this},s.prototype.map=function(c,u){return new s(this.getAsArray().map(c,u),this.context)},s.prototype.filter=function(c,u){return new s(this.getAsArray().filter(c,u),this.context)},s.prototype.find=function(c){return new s(c,this.first)},s.prototype.on=function(c,u){return this.forEach(d=>{d.addEventListener(c,u,!1)})},s.prototype.off=function(c,u){return this.forEach(d=>{d.removeEventListener(c,u,!1)})},s.prototype.once=function(c,u){const d=function(){this.off(c,d),u(...arguments)}.bind(this);return this.on(c,d)},s.prototype.appendTo=function(c){if(!c)throw new Error("appendTo requires a DOMElement to append to.");return this.forEach(u=>{c.appendChild(u)})},s.prototype.append=function(){const c=this.first;return c?(Array.prototype.forEach.call(arguments,u=>{c.appendChild(u)}),this):this},s.prototype.prepend=function(){if(0===arguments.length)return this;const c=this.first;let u;return c?(u=Array.prototype.slice.call(arguments),c.firstElementChild||c.appendChild(u.shift()),u.forEach(d=>{c.insertBefore(d,c.firstElementChild)}),this):this},s.prototype.after=function(c){if(!c)throw new Error("after requires a DOMElement to insert after");return this.forEach(u=>{u.parentElement&&(c!==u.parentNode.lastChild?u.parentElement.insertBefore(u,c):u.parentElement.appendChild(u))})},s.prototype.before=function(c){if(!c)throw new Error("before requires a DOMElement to insert before");return this.forEach(u=>{u.parentElement&&u.parentElement.insertBefore(u,c)})},s.prototype.remove=function(){return this.forEach(c=>{c.parentNode&&c.parentNode.removeChild(c)})},s.prototype.empty=function(){return this.forEach(c=>{for(;c.firstChild;)c.removeChild(c.firstChild)})},s.prototype.isDisplayNone=function(){return this.some(c=>(0===c.offsetWidth||0===c.offsetHeight)&&"none"===new s(c).css("display")||!(!c.parentNode||!c.parentNode.style)&&new s(c.parentNode).isDisplayNone())};const a=function c(u){return 0!==u.offsetWidth&&0!==u.offsetHeight||"none"!==new s(u).css("display")?u.parentNode&&u.parentNode.style?c(u.parentNode):null:u};s._attachToOTHelpers.emptyElement=function(c){return new s(c).empty()},s._attachToOTHelpers._findElementWithDisplayNone=a,r.css(s,a),r.attributes(s),r.classNames(s),r.observers(s),["on","off","isDisplayNone","show","hide","css","makeVisibleAndYield","addClass","removeClass"].forEach(c=>{s._attachToOTHelpers[c]=function(){const u=Array.prototype.slice.apply(arguments),d=u.shift(),f=new s(d);return s.prototype[c].apply(f,u)}})},function(l,E,e){"use strict";l.exports=function(t){const r={};Object.keys(t).forEach(n=>{r[n]=t[n]}),t._attachToOTHelpers=r}},function(l,E,e){"use strict";const t=e(15),r=e(6),n=e(1)("Collection");l.exports=function(o){let s=[],a={};const c=o||"id";r(this);const u=function(g,v){return t(g[v])?g[v]():g[v]},d=function(g){this.trigger("update",g),this.trigger(`update:${g.target.id}`,g)}.bind(this),f=function(g){this.remove(g.target,g.reason)}.bind(this);
1this.reset=function(){s.forEach(function(h){h.off("updated",d,this),h.off("destroyed",f,this)},this),s=[],a={}},this.destroy=function(h){s.forEach(g=>{g&&"function"==typeof g.destroy&&g.destroy(h,!0)}),this.reset(),this.off()},this.get=function(h){return h&&void 0!==a[h]?s[a[h]]:void 0},this.has=function(h){return h&&void 0!==a[h]},this.toString=function(){return s.toString()},this.where=function(h,g){return t(h)?s.filter(h,g):s.filter(v=>{for(const m in h)if(h.hasOwnProperty(m)&&u(v,m)!==h[m])return!1;return!0})},this.find=function(h,g){let v;v=t(h)?h:function(p){for(const y in h)if(h.hasOwnProperty(y)&&u(p,y)!==h[y])return!1;return!0},v=v.bind(g);for(let m=0;m<s.length;++m)if(!0===v(s[m]))return s[m];return null},this.forEach=function(h,g){return s.forEach(h,g),this},this.map=function(h){return s.map(h)},this.add=function(h){const g=u(h,c);return this.has(g)?(n.warn(`Model ${g} is already in the collection`,s),this):(a[g]=s.push(h)-1,h.on("updated",d,this),h.on("destroyed",f,this),this.trigger("add",h),this.trigger(`add:${g}`,h),this)},this.remove=function(h,g){const v=u(h,c);s.splice(a[v],1);for(let m=a[v];m<s.length;++m)a[u(s[m],c)]=m;return delete a[v],h.off("updated",d,this),h.off("destroyed",f,this),this.trigger("remove",h,g),this.trigger(`remove:${v}`,h,g),this},this._triggerAddEvents=function(){this.where.apply(this,arguments).forEach(function(h){this.trigger("add",h),this.trigger(`add:${u(h,c)}`,h)},this)},this.length=function(){return s.length}}},function(l,E,e){"use strict";const t=e(1)("deprecation");l.exports=function(n,i,o){let s=void 0===o?{}:o,c=s.name,u=void 0===c?`${i}`:c,d=s.getWarning,f=void 0===d?"":d,h=s.setWarning,g=void 0===h?"":h,v=s.canSet,m=void 0!==v&&v,p=s.warnOnSet,S=s.value,T=!1,b=!(void 0!==p&&p);Object.defineProperty(n,i,{get:()=>(T||(T=!0,t.warn(`${u} is deprecated, and will be removed in the future. ${f}`.trim())),S),set(C){m&&(S=C),b||(b=!0,t.warn(m?`${u} is deprecated. ${g}`.trim():`${u} is deprecated, and will be removed in the future. ${g}`.trim()))}})}},function(l,E,e){"use strict";const t=e(2),r=e(9);let n;const i=["description","fileName","lineNumber","message","name","number","stack"],o=function(c,u,d){switch(arguments.length){case 1:r(c)&&(d=c,u=void 0,c=void 0);break;case 2:r(u)&&(d=u,u=void 0)}if(d instanceof Error)for(let f=0,h=i.length;f<h;++f)this[i[f]]=d[i[f]];else if(r(d))for(const f in d)d.hasOwnProperty(f)&&(this[f]=d[f]);if(!(this.fileName&&this.lineNumber&&this.columnNumber&&this.stack)){const f=n();!this.fileName&&f.fileName&&(this.fileName=f.fileName),!this.lineNumber&&f.lineNumber&&(this.lineNumber=f.lineNumber),!this.columnNumber&&f.columnNumber&&(this.columnNumber=f.columnNumber),!this.stack&&f.stack&&(this.stack=f.stack)}!this.message&&c&&(this.message=c),(!this.name||"Error"===this.name)&&u&&(this.name=u)};l.exports=o,(o.prototype=Object.create(Error.prototype)).valueOf=o.prototype.toString=function(){let a="";return this.fileName&&(a+=` ${this.fileName}`),this.lineNumber&&(a+=` ${this.lineNumber}`,this.columnNumber&&(a+=`:${this.columnNumber}`)),`<${this.name?`${this.name} `:""}${this.message}${a}>`};const s=function(c,u){return u.slice(2).map(d=>{const f={fileName:d.getFileName(),linenumber:d.getLineNumber(),columnNumber:d.getColumnNumber()};return d.getFunctionName()&&(f.functionName=d.getFunctionName()),d.getMethodName()&&(f.methodName=d.getMethodName()),d.getThis()&&(f.self=d.getThis()),f})};n=function(){const c={};let u,d,f;switch(t.name){case"Firefox":case"Safari":try{(void 0!==typeof window?window:global).call.js.is.explody()}catch(v){f=v}u=(f.stack||"").split("\n"),u.shift(),u.shift(),c.stack=u,d=/@(.+?):([0-9]+)(:([0-9]+))?$/.exec(u[0]),d&&(c.fileName=d[1],c.lineNumber=parseInt(d[2],10),d.length>3&&(c.columnNumber=parseInt(d[4],10)));break;case"Chrome":case"Node":case"Opera":var h=Error.prepareStackTrace;Error.prepareStackTrace=s,f=new Error,c.stack=f.stack,Error.prepareStackTrace=h;var g=c.stack[0];c.lineNumber=g.lineNumber,c.columnNumber=g.columnNumber,c.fileName=g.fileName,g.functionName&&(c.functionName=g.functionName),g.methodName&&(c.methodName=g.methodName),g.self&&(c.self=g.self);break;default:f=new Error,f.stack&&(c.stack=f.stack.split("\n"))}return f.message&&(c.message=f.message),c}},function(l,E,e){"use strict";var t={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};t.localCName=t.generateIdentifier(),t.splitLines=function(r){return r.trim().split("\n").map(function(n){return n.trim()})},t.splitSections=function(r){return r.split("\nm=").map(function(i,o){return(o>0?"m="+i:i).trim()+"\r\n"})},t.getDescription=function(r){var n=t.splitSections(r);return n&&n[0]},t.getMediaSections=function(r){var n=t.splitSections(r);return n.shift(),n},t.matchPrefix=function(r,n){return t.splitLines(r).filter(function(i){return 0===i.indexOf(n)})},t.parseCandidate=function(r){for(var n,i={foundation:(n=0===r.indexOf("a=candidate:")?r.substring(12).split(" "):r.substring(10).split(" "))[0],component:parseInt(n[1],10),protocol:n[2].toLowerCase(),priority:parseInt(n[3],10),ip:n[4],address:n[4],port:parseInt(n[5],10),type:n[7]},o=8;o<n.length;o+=2)switch(n[o]){case"raddr":i.relatedAddress=n[o+1];break;case"rport":i.relatedPort=parseInt(n[o+1],10);break;case"tcptype":i.tcpType=n[o+1];break;case"ufrag":i.ufrag=n[o+1],i.usernameFragment=n[o+1];break;default:i[n[o]]=n[o+1]}return i},t.writeCandidate=function(r){var n=[];n.push(r.foundation),n.push(r.component),n.push(r.protocol.toUpperCase()),n.push(r.priority),n.push(r.address||r.ip),n.push(r.port);var i=r.type;return n.push("typ"),n.push(i),"host"!==i&&r.relatedAddress&&r.relatedPort&&(n.push("raddr"),n.push(r.relatedAddress),n.push("rport"),n.push(r.relatedPort)),r.tcpType&&"tcp"===r.protocol.toLowerCase()&&(n.push("tcptype"),n.push(r.tcpType)),(r.usernameFragment||r.ufrag)&&(n.push("ufrag"),n.push(r.usernameFragment||r.ufrag)),"candidate:"+n.join(" ")},t.parseIceOptions=function(r){return r.substr(14).split(" ")},t.parseRtpMap=function(r){var n=r.substr(9).split(" "),i={payloadType:parseInt(n.shift(),10)};return n=n[0].split("/"),i.name=n[0],i.clockRate=parseInt(n[1],10),i.channels=3===n.length?parseInt(n[2],10):1,i.numChannels=i.channels,i},t.writeRtpMap=function(r){var n=r.payloadType;void 0!==r.preferredPayloadType&&(n=r.preferredPayloadType);var i=r.channels||r.numChannels||1;return"a=rtpmap:"+n+" "+r.name+"/"+r.clockRate+(1!==i?"/"+i:"")+"\r\n"},t.parseExtmap=function(r){var n=r.substr(9).split(" ");return{id:parseInt(n[0],10),direction:n[0].indexOf("/")>0?n[0].split("/")[1]:"sendrecv",uri:n[1]}},t.writeExtmap=function(r){return"a=extmap:"+(r.id||r.preferredId)+(r.direction&&"sendrecv"!==r.direction?"/"+r.direction:"")+" "+r.uri+"\r\n"},t.parseFmtp=function(r){for(var i,n={},o=r.substr(r.indexOf(" ")+1).split(";"),s=0;s<o.length;s++)n[(i=o[s].trim().split("="))[0].trim()]=i[1];return n},t.writeFmtp=function(r){var n="",i=r.payloadType;if(void 0!==r.preferredPayloadType&&(i=r.preferredPayloadType),r.parameters&&Object.keys(r.parameters).length){var o=[];
1Object.keys(r.parameters).forEach(function(s){o.push(r.parameters[s]?s+"="+r.parameters[s]:s)}),n+="a=fmtp:"+i+" "+o.join(";")+"\r\n"}return n},t.parseRtcpFb=function(r){var n=r.substr(r.indexOf(" ")+1).split(" ");return{type:n.shift(),parameter:n.join(" ")}},t.writeRtcpFb=function(r){var n="",i=r.payloadType;return void 0!==r.preferredPayloadType&&(i=r.preferredPayloadType),r.rtcpFeedback&&r.rtcpFeedback.length&&r.rtcpFeedback.forEach(function(o){n+="a=rtcp-fb:"+i+" "+o.type+(o.parameter&&o.parameter.length?" "+o.parameter:"")+"\r\n"}),n},t.parseSsrcMedia=function(r){var n=r.indexOf(" "),i={ssrc:parseInt(r.substr(7,n-7),10)},o=r.indexOf(":",n);return o>-1?(i.attribute=r.substr(n+1,o-n-1),i.value=r.substr(o+1)):i.attribute=r.substr(n+1),i},t.parseSsrcGroup=function(r){var n=r.substr(13).split(" ");return{semantics:n.shift(),ssrcs:n.map(function(i){return parseInt(i,10)})}},t.getMid=function(r){var n=t.matchPrefix(r,"a=mid:")[0];if(n)return n.substr(6)},t.parseFingerprint=function(r){var n=r.substr(14).split(" ");return{algorithm:n[0].toLowerCase(),value:n[1]}},t.getDtlsParameters=function(r,n){return{role:"auto",fingerprints:t.matchPrefix(r+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(r,n){var i="a=setup:"+n+"\r\n";return r.fingerprints.forEach(function(o){i+="a=fingerprint:"+o.algorithm+" "+o.value+"\r\n"}),i},t.parseCryptoLine=function(r){var n=r.substr(9).split(" ");return{tag:parseInt(n[0],10),cryptoSuite:n[1],keyParams:n[2],sessionParams:n.slice(3)}},t.writeCryptoLine=function(r){return"a=crypto:"+r.tag+" "+r.cryptoSuite+" "+("object"==typeof r.keyParams?t.writeCryptoKeyParams(r.keyParams):r.keyParams)+(r.sessionParams?" "+r.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(r){if(0!==r.indexOf("inline:"))return null;var n=r.substr(7).split("|");return{keyMethod:"inline",keySalt:n[0],lifeTime:n[1],mkiValue:n[2]?n[2].split(":")[0]:void 0,mkiLength:n[2]?n[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(r){return r.keyMethod+":"+r.keySalt+(r.lifeTime?"|"+r.lifeTime:"")+(r.mkiValue&&r.mkiLength?"|"+r.mkiValue+":"+r.mkiLength:"")},t.getCryptoParameters=function(r,n){return t.matchPrefix(r+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(r,n){var i=t.matchPrefix(r+n,"a=ice-ufrag:")[0],o=t.matchPrefix(r+n,"a=ice-pwd:")[0];return i&&o?{usernameFragment:i.substr(12),password:o.substr(10)}:null},t.writeIceParameters=function(r){return"a=ice-ufrag:"+r.usernameFragment+"\r\na=ice-pwd:"+r.password+"\r\n"},t.parseRtpParameters=function(r){for(var n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},o=t.splitLines(r)[0].split(" "),s=3;s<o.length;s++){var a=o[s],c=t.matchPrefix(r,"a=rtpmap:"+a+" ")[0];if(c){var u=t.parseRtpMap(c),d=t.matchPrefix(r,"a=fmtp:"+a+" ");switch(u.parameters=d.length?t.parseFmtp(d[0]):{},u.rtcpFeedback=t.matchPrefix(r,"a=rtcp-fb:"+a+" ").map(t.parseRtcpFb),n.codecs.push(u),u.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(u.name.toUpperCase())}}}return t.matchPrefix(r,"a=extmap:").forEach(function(f){n.headerExtensions.push(t.parseExtmap(f))}),n},t.writeRtpDescription=function(r,n){var i="";i+="m="+r+" ",i+=n.codecs.length>0?"9":"0",i+=" UDP/TLS/RTP/SAVPF ",i+=n.codecs.map(function(s){return void 0!==s.preferredPayloadType?s.preferredPayloadType:s.payloadType}).join(" ")+"\r\n",i+="c=IN IP4 0.0.0.0\r\n",i+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(function(s){i+=t.writeRtpMap(s),i+=t.writeFmtp(s),i+=t.writeRtcpFb(s)});var o=0;return n.codecs.forEach(function(s){s.maxptime>o&&(o=s.maxptime)}),o>0&&(i+="a=maxptime:"+o+"\r\n"),i+="a=rtcp-mux\r\n",n.headerExtensions&&n.headerExtensions.forEach(function(s){i+=t.writeExtmap(s)}),i},t.parseRtpEncodingParameters=function(r){var u,n=[],i=t.parseRtpParameters(r),o=-1!==i.fecMechanisms.indexOf("RED"),s=-1!==i.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(r,"a=ssrc:").map(function(h){return t.parseSsrcMedia(h)}).filter(function(h){return"cname"===h.attribute}),c=a.length>0&&a[0].ssrc,d=t.matchPrefix(r,"a=ssrc-group:FID").map(function(h){return h.substr(17).split(" ").map(function(v){return parseInt(v,10)})});d.length>0&&d[0].length>
11&&d[0][0]===c&&(u=d[0][1]),i.codecs.forEach(function(h){if("RTX"===h.name.toUpperCase()&&h.parameters.apt){var g={ssrc:c,codecPayloadType:parseInt(h.parameters.apt,10)};c&&u&&(g.rtx={ssrc:u}),n.push(g),o&&((g=JSON.parse(JSON.stringify(g))).fec={ssrc:c,mechanism:s?"red+ulpfec":"red"},n.push(g))}}),0===n.length&&c&&n.push({ssrc:c});var f=t.matchPrefix(r,"b=");return f.length&&(f=0===f[0].indexOf("b=TIAS:")?parseInt(f[0].substr(7),10):0===f[0].indexOf("b=AS:")?1e3*parseInt(f[0].substr(5),10)*.95-16e3:void 0,n.forEach(function(h){h.maxBitrate=f})),n},t.parseRtcpParameters=function(r){var n={},i=t.matchPrefix(r,"a=ssrc:").map(function(a){return t.parseSsrcMedia(a)}).filter(function(a){return"cname"===a.attribute})[0];i&&(n.cname=i.value,n.ssrc=i.ssrc);var o=t.matchPrefix(r,"a=rtcp-rsize");n.reducedSize=o.length>0,n.compound=0===o.length;var s=t.matchPrefix(r,"a=rtcp-mux");return n.mux=s.length>0,n},t.parseMsid=function(r){var n,i=t.matchPrefix(r,"a=msid:");if(1===i.length)return{stream:(n=i[0].substr(7).split(" "))[0],track:n[1]};var o=t.matchPrefix(r,"a=ssrc:").map(function(s){return t.parseSsrcMedia(s)}).filter(function(s){return"msid"===s.attribute});return o.length>0?{stream:(n=o[0].value.split(" "))[0],track:n[1]}:void 0},t.parseSctpDescription=function(r){var o,n=t.parseMLine(r),i=t.matchPrefix(r,"a=max-message-size:");i.length>0&&(o=parseInt(i[0].substr(19),10)),isNaN(o)&&(o=65536);var s=t.matchPrefix(r,"a=sctp-port:");if(s.length>0)return{port:parseInt(s[0].substr(12),10),protocol:n.fmt,maxMessageSize:o};if(t.matchPrefix(r,"a=sctpmap:").length>0){var c=t.matchPrefix(r,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(c[0],10),protocol:c[1],maxMessageSize:o}}},t.writeSctpDescription=function(r,n){var i=[];return i="DTLS/SCTP"!==r.protocol?["m="+r.kind+" 9 "+r.protocol+" "+n.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+n.port+"\r\n"]:["m="+r.kind+" 9 "+r.protocol+" "+n.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+n.port+" "+n.protocol+" 65535\r\n"],void 0!==n.maxMessageSize&&i.push("a=max-message-size:"+n.maxMessageSize+"\r\n"),i.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,21)},t.writeSessionBoilerplate=function(r,n,i){var s=void 0!==n?n:2;return"v=0\r\no="+(i||"thisisadapterortc")+" "+(r||t.generateSessionId())+" "+s+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.writeMediaSection=function(r,n,i,o){var s=t.writeRtpDescription(r.kind,n);if(s+=t.writeIceParameters(r.iceGatherer.getLocalParameters()),s+=t.writeDtlsParameters(r.dtlsTransport.getLocalParameters(),"offer"===i?"actpass":"active"),s+="a=mid:"+r.mid+"\r\n",s+=r.direction?"a="+r.direction+"\r\n":r.rtpSender&&r.rtpReceiver?"a=sendrecv\r\n":r.rtpSender?"a=sendonly\r\n":r.rtpReceiver?"a=recvonly\r\n":"a=inactive\r\n",r.rtpSender){var a="msid:"+o.id+" "+r.rtpSender.track.id+"\r\n";s+="a="+a,s+="a=ssrc:"+r.sendEncodingParameters[0].ssrc+" "+a,r.sendEncodingParameters[0].rtx&&(s+="a=ssrc:"+r.sendEncodingParameters[0].rtx.ssrc+" "+a,s+="a=ssrc-group:FID "+r.sendEncodingParameters[0].ssrc+" "+r.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return s+="a=ssrc:"+r.sendEncodingParameters[0].ssrc+" cname:"+t.localCName+"\r\n",r.rtpSender&&r.sendEncodingParameters[0].rtx&&(s+="a=ssrc:"+r.sendEncodingParameters[0].rtx.ssrc+" cname:"+t.localCName+"\r\n"),s},t.getDirection=function(r,n){for(var i=t.splitLines(r),o=0;o<i.length;o++)switch(i[o]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return i[o].substr(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(r){return t.splitLines(r)[0].split(" ")[0].substr(2)},t.isRejected=function(r){return"0"===r.split(" ",2)[1]},t.parseMLine=function(r){var i=t.splitLines(r)[0].substr(2).split(" ");return{kind:i[0],port:parseInt(i[1],10),protocol:i[2],fmt:i.slice(3).join(" ")}},t.parseOLine=function(r){var i=t.matchPrefix(r,"o=")[0].substr(2).split(" ");return{username:i[0],sessionId:i[1],sessionVersion:parseInt(i[2],10),netType:i[3],addressType:i[4],address:i[5]}},t.isValidSDP=function(r){if("string"!=typeof r||0===r.length)return!1;for(var n=t.splitLines(r),i=0;i<n.length;i++)if(n[i].length<2||"="!==n[i].charAt(1))return!1;return!0},l.exports=t},function(l,E,e){"use strict";l.exports=function(r){return-1===["Chrome","Safari","Edge","Opera"].indexOf(r.browserName)||"Edge"===r.browserName&&!r.isChromiumEdge||r.isScreenSharing||r.sessionInfo.p2pEnabled||!r.constraints.video&&!r.isCustomVideoTrack?1:r.videoDimensions.width>640&&r.videoDimensions.height>480?3:2}},function(l,E,e){"use strict";var r=e(3)(e(18));const i=e(48);l.exports=function(){function o(a,c){var u;let f=(void 0===c?{}:c).requestAnimationFrame,h=void 0===f?(u=window).requestAnimationFrame.bind(u):f;(0,r.default)(this,"_lastCalled",i()),(0,r.default)(this,"_audioLevel",void 0),(0,r.default)(this,"_running",!1),this._requestAnimationFrame=h,this._getAudioLevel=a,this._startLoop()}var s=o.prototype;return s._startLoop=function(){this._running||(this._running=!0,this._requestAnimationFrame(this._loop.bind(this)))},s._loop=function(){this._getAudioLevel((c,u)=>{let d=null;if(!c){for(let f=0;f<u.length;f+=1){const h=u[f];let g=null;if(void 0!==h.audioOutputLevel){const v=parseFloat(h.audioOutputLevel)/32768;isNaN(v)||(g=v)}else void 0!==h.audioLevel&&(g=h.audioLevel);null!==g&&(null===d||g>d)&&(d=g)}this._audioLevel=d,this._running&&i()-this._lastCalled<1e4?this._requestAnimationFrame(this._loop.bind(this)):this._running=!1}})},s.destroy=function(){this._running=!1},s.sample=function(c){if("function"==typeof c)throw new Error("sample no longer takes a callback");return this._startLoop(),this._lastCalled=i(),this._audioLevel},o}()},function(l,E,e){"use strict";const t=e(147),r=e(562),n=e(264);function i(c,u,d){return!(!c.publish&&u)&&("boolean"==typeof c.source?c.source:d?{mandatory:{sourceId:c.source}}:n(c.source)?{}:{deviceId:{exact:c.source}})}function o(c){let u=i(c.audio,c.enableRenegotiation,c.usingOptionalMandatoryStyle);if(!1===u)return!1;const d=c.usingOptionalMandatoryStyle,f=c.enableStereo,m=c.disableAudioProcessing,p=y=>{"object"==typeof u&&(d?(t(u,{optional:[]}
1),u.optional.push(y)):t(u,y))};return(f||m||!c.echoCancellation||!c.noiseSuppression||!c.autoGainControl)&&!0===u&&(u={}),f&&p({channelCount:2}),["echoCancellation","autoGainControl","noiseSuppression"].forEach(y=>{p({[y]:!m&&c[y]})}),u}function s(c){let u=i(c.video,c.enableRenegotiation,c.usingOptionalMandatoryStyle);if(!1===u)return!1;const d=c.videoDimensions,f=c.frameRate,h=c.maxResolution,g=c.facingMode,v=c.usingOptionalMandatoryStyle;if((d||f||h||g)&&!0===u&&(u={}),d){const m=d.width,p=d.height;v?(t(u,{optional:[]}),u.optional.push({minWidth:m},{maxWidth:m},{minHeight:p},{maxHeight:p})):t(u,{width:{ideal:m},height:{ideal:p}})}return f&&(v?(t(u,{optional:[]}),u.optional.push({minFrameRate:f},{maxFrameRate:f})):t(u,{frameRate:{ideal:f}})),h&&t(u,v?{mandatory:{maxWidth:h.width,maxHeight:h.height}}:{width:{max:h.width},height:{max:h.height}}),g&&(v?(t(u,{optional:[]}),u.optional.push({facingMode:g})):t(u,{facingMode:{ideal:g}})),u}l.exports=function(u){const d=r(u);return{constraints:(c=d,{audio:o(c),video:s(c)}),publishAudio:d.audio.publish,publishVideo:d.video.publish,frameRate:d.frameRate,videoDimensions:d.videoDimensions,audioDeviceId:"string"==typeof d.audio.source?d.audio.source:void 0,videoDeviceId:"string"==typeof d.video.source?d.video.source:void 0};var c}},function(l,E,e){var t=e(63),r=e(51);l.exports=function n(i,o,s){(void 0!==s&&!r(i[o],s)||void 0===s&&!(o in i))&&t(i,o,s)}},function(l,E){l.exports=function e(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]}},function(l,E,e){"use strict";const t=e(2),r=t.name,n=t.version;l.exports=t.isChromiumEdge||"Chrome"===r&&n>=72||"Firefox"===r&&n>=66||"Opera"===r&&n>=60||"Safari"===r},function(l,E,e){var t=e(58),r=e(259);l.exports=function n(i){return r(t(i).toLowerCase())}},function(l,E,e){var r=e(567)("toUpperCase");l.exports=r},function(l,E){l.exports=function e(t,r,n){var i=-1,o=t.length;r<0&&(r=-r>o?0:o+r),(n=n>o?o:n)<0&&(n+=o),o=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(o);++i<o;)s[i]=t[i+r];return s}},function(l,E){var a=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");l.exports=function c(u){return a.test(u)}},function(l,E,e){var t=e(569),r=e(261),n=e(570);l.exports=function i(o){return r(o)?n(o):t(o)}},function(l,E,e){"use strict";const t=e(2);l.exports=Boolean(t.isChrome&&t.version>=74||t.isEdge&&t.version>=79)},function(l,E,e){"use strict";const t=e(571),r=e(265),n=e(2);l.exports=i=>n.isElectron?"screen"===i||r(i):t.indexOf(i)>-1},function(l,E,e){"use strict";const t=e(2);l.exports=r=>!!t.isElectron&&r instanceof MediaStreamTrack&&"Screen"===r.label},function(l,E,e){var t=e(99),n=e(576)(t);l.exports=n},function(l,E,e){"use strict";l.exports=15e3},function(l,E,e){"use strict";l.exports=function(t,r){return void 0===r&&(r=!1),void 0===t?r:"true"===t||!0===t}},function(l,E,e){"use strict";const t=e(2);l.exports=()=>!t.isNode&&!t.isElectron&&((t.isChrome||t.isOpera||t.isChromiumEdge)&&t.version>=74||t.isFirefox&&t.version>=68||t.isSafari&&t.version>=11)},function(l,E){function e(t,r){return l.exports=e=Object.setPrototypeOf||function(i,o){return i.__proto__=o,i},e(t,r)}l.exports=e},function(l,E,e){var t=e(33),r=e(77),n=e(592),i=e(57),o=e(39),s=e(595),a=e(137),c=e(184),h=a(function(g,v){var m={};if(null==g)return m;var p=!1;v=t(v,function(S){return S=i(S,g),p||(p=S.length>1),S}),o(g,c(g),m),p&&(m=r(m,7,s));for(var y=v.length;y--;)n(m,v[y]);return m});l.exports=h},function(l,E,e){var t=e(205),r=e(34),n=e(96),i=Math.max;l.exports=function o(s,a,c){var u=null==s?0:s.length;if(!u)return-1;var d=null==c?0:n(c);return d<0&&(d=i(u+d,0)),t(s,r(a,3),d)}},function(l,E,e){var t=e(597);l.exports=function r(n){return n&&n.length?t(n):[]}},function(l,E,e){"use strict";const t=e(605),r=e(277),n=e(102)();l.exports=(i,o)=>{r(i,(s,a)=>{let c=[];n?"function"==typeof a.values?c=t(a.values()):"function"!=typeof a.forEach?c=Object.keys(a).map(u=>a[u]):a.forEach(u=>{c.push(u)}):a.result().forEach(u=>{const d={};u.names().forEach(f=>{d[f]=u.stat(f)}),d.id=u.id,d.type=u.type,d.timestamp=u.timestamp,c.push(d)}),o(null,c)})}},function(l,E,e){var t=e(29),r=e(10),n=e(16);l.exports=function o(s){return"string"==typeof s||!r(s)&&n(s)&&"[object String]"==t(s)}},function(l,E,e){var t=e(607),r=e(30);l.exports=function n(i){return null==i?[]:t(i,r(i))}},function(l,E,e){"use strict";const t=e(102)(),r=(o,s)=>
1{o.getStats(null).then(a=>s(null,a)).catch(s)},n=(o,s)=>{o.getStats(a=>{s(null,a)},s)};l.exports=(o,s)=>{(t?r:n)(o,s)}},function(l,E,e){"use strict";var t=e(3);E.__esModule=!0,E.default=void 0;var r=t(e(156)),n=t(e(59)),i=t(e(18)),o=e(41),s=t(e(36)),a=t(e(617)),c=t(e(619)),u=t(e(48));const f=(0,t(e(1)).default)("QoS");let h=function(v){function m(){for(var y,S=arguments.length,T=new Array(S),b=0;b<S;b++)T[b]=arguments[b];return y=v.call(this,...T)||this,(0,i.default)((0,r.default)(y),"_peerConnection",void 0),(0,i.default)((0,r.default)(y),"_isPublisher",void 0),(0,i.default)((0,r.default)(y),"timeoutId",void 0),(0,i.default)((0,r.default)(y),"_creationTime",(0,u.default)()),(0,i.default)((0,r.default)(y),"offerMessagesReceived",0),(0,i.default)((0,r.default)(y),"prevStats",{timeStamp:(0,u.default)()}),(0,i.default)((0,r.default)(y),"changeCounters",{videoCodec:new c.default,audioCodec:new c.default}),y}(0,n.default)(m,v);var p=m.prototype;return p.startCollecting=function(S,T){if(!S||!S.getStats)return;this._isPublisher=T;const b=Boolean(this._peerConnection);if(this._peerConnection=S,b)return;const O=C=>{const R=(0,u.default)(),I={timeStamp:R,duration:Math.round((R-this._creationTime)/1e3),period:Math.round((R-this.prevStats.timeStamp)/1e3)};(0,a.default)(this._peerConnection,this.prevStats,I,this._isPublisher,(A,P)=>{A?f.error("Failed to Parse QOS Stats:",A):(this.handleParsedStats(P),clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>O(m.INTERVAL),C))})};this.timeoutId=setTimeout(()=>O(m.INTERVAL-m.INITIAL_INTERVAL),m.INITIAL_INTERVAL)},p.stopCollecting=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this._peerConnection=null},p.handleOfferMessageReceived=function(){this.offerMessagesReceived+=1},p.handleParsedStats=function(S){Object.keys(this.changeCounters).forEach(O=>{this.changeCounters[O].onValue(S[O]),S[`${O}ChangeCount`]=this.changeCounters[O].changeCount}),S.offerMessagesReceived=this.offerMessagesReceived;const T=(0,s.default)(S);["audioSentBytes","audioSentPackets","audioSentPacketsLost","videoSentBytes","videoSentPackets","videoSentPacketsLost","audioRecvBytes","audioRecvPackets","audioRecvPacketsLost","videoRecvBytes","videoRecvPackets","videoRecvPacketsLost"].forEach(O=>{T[O]=this.prevStats&&this.prevStats[O]?S[O]-this.prevStats[O]:S[O]}),this.prevStats&&this.prevStats.videoFramesReceived&&(T.videoFrameRateReceived=Math.round((S.videoFramesReceived-this.prevStats.videoFramesReceived)/S.period)),this.prevStats=S,delete T.framesDecoded,delete T.framesEncoded,this.emit("stats",T)},m}(o.EventEmitter);h.INITIAL_INTERVAL=1e3,h.INTERVAL=3e4,E.default=h},function(l,E,e){"use strict";l.exports=t=>{switch(t>>24){case 0:return"TURN/TLS";case 1:return"TURN/TCP";case 2:return"TURN/UDP";default:return""}}},function(l,E,e){"use strict";const t=e(19),n=e(159).default,i=e(4),o=e(11);l.exports=function(a){let c=void 0===a?{}:a,u=c.haveGetDisplayMedia,d=void 0===u?n:u,f=c.global,h=void 0===f?void 0!==typeof window?window:global:f,g=c.Errors,v=void 0===g?i:g,m=c.otError,p=void 0===m?o():m;const y=!d&&!!h.navigator.webkitGetUserMedia&&!h.navigator.userAgent.match(/android/i)&&void 0!==h.chrome;return{isSupportedInThisBrowser:y,autoRegisters:!1,extensionRequired:!0,getConstraintsShowsPermissionUI:!0,sources:{screen:!0,application:!1,window:!0,browser:!0},register(S,T){return 2===T?this.registerVersion2(S):this.registerVersion1(S)},registerVersion1(S){if(!S)throw new Error("initChromeScreenSharingExtensionHelper: extensionID is required.");const T=y,b={};let O;const C=`com.tokbox.screenSharing.${S}`,R=function(D,L){const N={payload:L,from:"jsapi"};return N[C]=D,N},I=function(D,L){let N;const U=t();return b[U]=function(){clearTimeout(N),N=null,D(...arguments)},L&&(N=setTimeout(()=>{delete b[U],D(p(v.TIMEOUT,new Error("Timeout waiting for response to screensharing request.")))},L)),U},A=function(D){if(!D)throw new Error("isAvailable: callback is required.");if(T)if(void 0!==O)setTimeout(D.bind(null,O));else{const L=I(U=>{!0!==O&&(O="extensionLoaded"===U),D(O)},2e3),N=R("isExtensionInstalled",{requestId:L});h.postMessage(N,"*")}else setTimeout(D.bind(null,!1))};return h.addEventListener("message",x=>{if(x.origin!==h.location.origin||null==x.data||"object"!=typeof x.data||"extension"!==x.data.from)return;const D=x.data[C],L=x.data.payload;if(L&&L.requestId){const N=b[L.requestId];delete b[L.requestId],N&&N(D,L)}"extensionLoaded"===D&&(O=!0)}),{extensionAPIVersion:1,extensionID:S,isInstalled:A,getConstraints:function(D,L,N){if
1(!N)throw new Error("getSourceId: callback is required");A(U=>{if(!U)return N(p(v.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,new Error("Extension is not installed")));const B=I((V,H)=>{"object"==typeof V&&V.name&&V.stack?N(V):"permissionDenied"===V?N(p(v.USER_MEDIA_ACCESS_DENIED,new Error("User denied access to screensharing"))):(L.video||(L.video={}),L.video.mandatory||(L.video.mandatory={}),L.video.mandatory.chromeMediaSource="desktop",L.video.mandatory.chromeMediaSourceId=H.sourceId,N(void 0,L))});h.postMessage(R("getSourceId",{requestId:B,source:D}),"*")})}}},registerVersion2(S){const T=y&&void 0!==h.chrome.runtime,b=function(R){if(!R)throw new Error("isAvailable: callback is required.");T?h.chrome.runtime.sendMessage(S,{type:"isInstalled"},null,I=>{setTimeout(R.bind(null,!!I))}):setTimeout(R.bind(null,!1))};return{extensionAPIVersion:2,extensionID:S,isInstalled:b,getConstraints:function(R,I,A){if(!A)throw new Error("getSourceId: callback is required");b(P=>{if(!P)return A(p(v.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,new Error("Extension is not installed")));h.chrome.runtime.sendMessage(S,{type:"getSourceId",source:R},null,x=>{"permissionDenied"===x.error?A(p(v.USER_MEDIA_ACCESS_DENIED,new Error("User denied access to screensharing"))):x.error?A(new Error(`UnexpectError: ${x.error}`)):(I.video||(I.video={}),I.video.mandatory||(I.video.mandatory={}),I.video.mandatory.chromeMediaSource="desktop",I.video.mandatory.chromeMediaSourceId=x.sourceId,A(void 0,I))})})}}}}}},function(l,E,e){"use strict";(function(t){const r=e(154),n=e(103);l.exports=function(o){void 0===o&&(o={});const s=o.Archiving||e(623),a=o.AudioLevelMeter||e(282),c=o.AudioLevelTransformer||e(143),u=o.BackingBar||e(283),d=o.Chrome||e(144),f=o.MuteButton||e(284)(),h=o.NamePanel||e(285),g=o.StylableComponent||e(151),v=o.logging||e(1)("createChromeMixin");return function(p,y){let P,x,D,S=void 0===y?{}:y,T=S.name,b=S.publishAudio,O=S.publishVideo,C=S.audioSource,R=S.showControls,I=S.shouldAllowAudio,A=S.logAnalyticsEvent;const L={},N=r(),U=H=>{if(!1===H)return"off";const j=p.getStyle("buttonDisplayMode");return!1===j?"on":j};let B=new t((H,j)=>{L.init=M=>{p.getStyle("showArchiveStatus")||A("showArchiveStatus","createChrome",{mode:"off"});const F={backingBar:new u({nameMode:T?p.getStyle("nameDisplayMode"):"off",muteMode:U(p.getStyle("buttonDisplayMode"))}),name:new h({name:T,mode:p.getStyle("nameDisplayMode")}),archive:new s({show:Boolean(p.getStyle("showArchiveStatus"))&&"off"!==p.getStyle("archiveStatusDisplayMode"),archiving:!1}),muteButton:new f({muted:!1===b,mode:U.call(null,p.getStyle("buttonDisplayMode"))})};P=new a({mode:p.getStyle("audioLevelDisplayMode")});const z=new c,w=new n(()=>{const k=b?z.transform(p.loudness):0;P.setValue(k)});P.watchVisibilityChanged(k=>{k?w.start():w.stop()}),P.audioOnly(!O&&b),F.audioLevel=P,M&&M.domElement&&(D=M,x=new d({parent:D.domElement}).set(F).on({muted:()=>p.publishAudio(!1),unmuted:()=>p.publishAudio(!0)}),(null===C||!1===C)&&L.removeAudioTrack(),H())},L.reset=()=>{j(new Error("Chrome still being created")),x&&(x.destroy(),x=null)},L.destroy=()=>{L.reset(),N.releaseAll(),B=null}});B.catch(H=>{(!H||"Chrome still being created"!==H.message)&&v.error("createChromeMixin failed to setup UI",H)}),L.setAudioOnly=H=>{P&&P.audioOnly(H)},L.setArchivingStatus=H=>{x&&x.archive.setArchiving(H)},L.setMuted=H=>{x&&x.muteButton&&x.muteButton.muted(H)},L.removeAudioTrack=()=>{x&&x.muteButton&&x.muteButton.remove()},L.addAudioTrack=()=>{x&&x.muteButton&&x.muteButton.add()},g(p,{showArchiveStatus:!0,nameDisplayMode:"auto",buttonDisplayMode:"auto",audioLevelDisplayMode:I?"auto":"off",archiveStatusDisplayMode:"auto",backgroundImageURI:null},R,H=>{A("SetStyle","Publisher",H,null,.1)});const V=(H,j)=>{B.then(()=>{switch(H){case"nameDisplayMode":x.name.setDisplayMode(j),x.backingBar.setNameMode(j);break;case"showArchiveStatus":A("showArchiveStatus","styleChange",{mode:j?"on":"off"}),x.archive.setShowArchiveStatus(Boolean(j));break;case"archiveStatusDisplayMode":x.archive.setShowArchiveStatus("off"!==j);break;case"buttonDisplayMode":x.muteButton.setDisplayMode(j),x.backingBar.setMuteMode(j);break;case"audioLevelDisplayMode":x.audioLevel.setDisplayMode(j);break;
1case"backgroundImageURI":D.setBackgroundImageURI(j)}})};return p.on("styleValueChanged",V),N.add(()=>p.off("styleValueChanged",V)),L}}}).call(this,e(0))},function(l,E,e){"use strict";(function(t){const r=e(104),n=e(35),i=e(5),o=e(41);l.exports=function(a){const c=this,u=new o;let d,f,h,g,v=!0,m=!1,p="auto";const y=a.maxValue||1,S=a.minValue||0;function C(){const I=(m&&"auto"===p||"on"===p)&&v;g!==I&&(g=I,u.emit("visibilityChanged",I))}r(c,{audioOnly:{get:()=>m,set(I){m=I,C()}}}),c.setValue=function(I){h=I,function O(){f.style.transform=`scale(${Math.sqrt((h-S)/(y-S))})`}()},c.watchVisibilityChanged=function(I){return u.on("visibilityChanged",I),t.resolve().then(()=>{I(g)}),function(){u.removeListener("visibilityChanged",I)}},n(this,{mode:a?a.mode:"auto",nodeName:"div",htmlAttributes:{className:"OT_audio-level-meter"},onCreate:function T(){f=i.createElement("div",{className:"OT_audio-level-meter__value"},""),d=i.createElement("div",{className:"OT_audio-level-meter__audio-only-img"},"");const I=c.domElement;I.appendChild(d),I.appendChild(f),c.watchVisibilityChanged(A=>{A?i.removeClass(c.domElement,"OT_hide-forced"):i.addClass(c.domElement,"OT_hide-forced")})},onDestroy:function b(){u.removeAllListeners("visibilityChanged")}}),c.setDisplayMode=function(I){p=I,C()},c.getDisplayMode=function(){return p},c.showAfterLoading=function(){v=!0,C()},c.hideWhileLoading=function(){v=!1,C()},C()}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(35);l.exports=function(n){let i=n.nameMode,o=n.muteMode;function s(){return"on"===i||"on"===o?"on":"mini"===i||"mini"===o?"mini":"mini-auto"===i||"mini-auto"===o?"mini-auto":"auto"===i||"auto"===o?"auto":"off"}t(this,{mode:s(),nodeName:"div",htmlContent:"",htmlAttributes:{className:"OT_bar OT_edge-bar-item"}}),this.setNameMode=function(a){i=a,this.setDisplayMode(s())},this.setMuteMode=function(a){o=a,this.setDisplayMode(s())}}},function(l,E,e){"use strict";const t=e(5),r=e(35),n=e(104);l.exports=function(o){void 0===o&&(o={});const s=o.OTHelpers||t,a=o.Widget||r;return function(u){let d=u.muted||!1;const f=()=>{d?s.addClass(this.domElement,"OT_active"):s.removeClass(this.domElement,"OT_active ")},h=()=>(d=!d,f(),this.parent.trigger(d?"muted":"unmuted",this),!1);let p;n(this,{muted:{get:()=>d,set(y){d=y,f()}}}),a(this,{mode:u.mode,nodeName:"button",htmlContent:"Mute",htmlAttributes:{className:d?"OT_edge-bar-item OT_mute OT_active":"OT_edge-bar-item OT_mute",type:"button"},onCreate:y=>{s.on(y,"click",h)},onDestroy:y=>{s.off(y,"click",h)}}),this.remove=()=>{this.domElement&&this.domElement.parentNode&&(p=this.domElement.parentNode,this.domElement.parentNode.removeChild(this.domElement))},this.add=()=>{p&&this.domElement&&!this.domElement.parentNode&&p.appendChild(this.domElement)}}}},function(l,E,e){"use strict";const t=e(35),r=n=>{const i=document.createElement("div");return i.textContent=n,i.innerHTML};l.exports=function(i){let o=i.name;(!o||""===o.trim().length)&&(o=null,i.mode="off"),this.setName=function(s){o||this.setDisplayMode("auto"),o=r(s),this.domElement.innerHTML=o}.bind(this),o=r(o),t(this,{mode:i.mode,nodeName:"h1",htmlContent:o,htmlAttributes:{className:"OT_name OT_edge-bar-item"}})}},function(l,E,e){"use strict";l.exports=function(r){void 0===r&&(r={});const n=r.global||(void 0!==typeof window?window:global);return function(){if(n.navigator.mediaDevices){const o=n.navigator.mediaDevices;return o.enumerateDevices&&o.enumerateDevices.bind(o)}}}},function(l,E,e){"use strict";const t=e(2),r=e(159).default;l.exports={isSupportedInThisBrowser:!t.isLegacyEdge&&!t.isElectron&&r&&!t.isAndroid,autoRegisters:!0,extensionRequired:!1,getConstraintsShowsPermissionUI:!1,sources:{screen:!0,application:!1,window:"Safari"!==t.name,browser:"Safari"!==t.name},register:()=>({isInstalled(i){i(void 0)},getConstraints(i,o,s){s(void 0,{video:o.video,audio:o.audio})}})}},function(l,E,e){"use strict";E.isMediaStreamTrack=r=>r&&"object"==typeof r&&"string"==typeof r.kind&&"function"==typeof r.stop&&"boolean"==typeof r.enabled},function(l,E,e){"use strict";e.r(E),function(t){var r=function(a,c,u,d){return new(u||(u=t))(function(f,h){function g(p){try{m(d.next(p))}catch(y){h(y)}}function v(p){try{m(d.throw(p))}catch(y){h(y)}}function m(p){p.done?f(p.value):new u(function(y){y(p.value)}).then(g,v)}m((d=d.apply(a,c||[])).next())})},n=function(a,c){var d,f,h,g,u={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return g={next:v(0),throw:v(1),return:v(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function v(p){return function(y){return function m(p){if(d)throw new TypeError("Generator is already executing.");for(;u;)try{if(d=1,f&&(h=f[2&p[0]?"return":p[0]?"throw":"next"])&&!(h=h.call(f,p[1])).done)return h;switch(f=0,h&&(p=[0,h.value]),p[0]){case 0:case 1:h=p;break;case 4:return u.label++,{value:p[1],done:!1};case 5:u.label++,f=p[1],p=[0];continue;case 7:p=u.ops.pop(),u.trys.pop();continue;default:if(!(h=(h=u.trys).length>0&&h[h.length-1])&&(6===p[0]||2===p[0])){u=0;continue}if(3===p[0]&&(!h||p[1]>h[0]&&p[1]<h[3])){u.label=p[1];break}if(6===p[0]&&u.label<h[1]){u.label=h[1],h=p;break}if(h&&u.label<h[2]){u.label=h[2],u.ops.push(p);break}
1h[2]&&u.ops.pop(),u.trys.pop();continue}p=c.call(a,u)}catch(y){p=[6,y],f=0}finally{d=h=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([p,y])}}};function i(){return"undefined"!=typeof window||void 0!==typeof window?window:global}var o="onFailure must return boolean, or delay in ms";E.default=function s(a,c,u){return void 0===u&&(u=10),function(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];return r(this,void 0,void 0,function(){var h,g,v;return n(this,function(m){switch(m.label){case 0:h=0,g=function(){var p,y,S;return n(this,function(T){switch(T.label){case 0:return T.trys.push([0,2,,6]),p={},[4,a.apply(void 0,d)];case 1:return[2,(p.value=T.sent(),p)];case 2:if(y=T.sent(),!1===(S=c(y,h))||null==S||h>=u)throw y;return"number"!=typeof S?[3,4]:[4,new t(function(b){return i().setTimeout(b,S)})];case 3:return T.sent(),[3,5];case 4:if(!0!==S)throw new Error(o);T.label=5;case 5:return[3,6];case 6:return[2]}})},m.label=1;case 1:return(h+=1)?[5,g()]:[3,3];case 2:return"object"==typeof(v=m.sent())?[2,v.value]:[3,1];case 3:return[2]}})})}}}.call(this,e(0))},function(l,E,e){"use strict";const t=e(1)("videoContentHint"),r=["","text","motion","detail"],n=a=>r.includes(a),i=a=>{var c;return null==a||null==(c=a.getVideoTracks())?void 0:c[0]};l.exports={isValidVideoContentHint:n,setVideoContentHint:(a,c)=>{if(!n(c))return void t.warn('Invalid content hint. Valid content hints are "text", "detail", "motion", or ""');const u=i(a);u?void 0!==u.contentHint?u.contentHint=c:t.warn("contentHint not supported by this browser"):t.warn("Tried to set contentHint but no video track is present")},getVideoContentHint:a=>{const c=i(a);return(null==c?void 0:c.contentHint)||""}}},function(l,E,e){"use strict";const t=e(104);l.exports=function(){return function(i,o){let s;t(this,{muted:{get:()=>s,set(a){if(s===a)return;s=a;const c=i.getAudioTracks();for(let u=0,d=c.length;u<d;++u)c[u].enabled=!s}}}),void 0!==o?this.muted(!0===o):i.getAudioTracks().length?this.muted(!i.getAudioTracks()[0].enabled):this.muted(!1)}}},function(l,E,e){"use strict";l.exports=function(r){void 0===r&&(r={});const n=r.Errors||e(4),i=r.otError||e(11)(),o={};return(void 0!==typeof window?window:global).MediaError&&(o[(void 0!==typeof window?window:global).MediaError.MEDIA_ERR_ABORTED]={name:n.MEDIA_ERR_ABORTED,message:"The fetching process for the media resource was aborted by the user agent at the user's request."},o[(void 0!==typeof window?window:global).MediaError.MEDIA_ERR_NETWORK]={name:n.MEDIA_ERR_NETWORK,message:"A network error of some description caused the user agent to stop fetching the media resource, after the resource was established to be usable."},o[(void 0!==typeof window?window:global).MediaError.MEDIA_ERR_DECODE]={name:n.MEDIA_ERR_DECODE,message:"An error of some description occurred while decoding the media resource, after the resource was established to be usable."},o[(void 0!==typeof window?window:global).MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]={name:n.MEDIA_ERR_SRC_NOT_SUPPORTED,message:"The media resource indicated by the src attribute was not suitable."}),function(a){const c=o[a.code];return c?i(c.name,new Error(`There was an unexpected problem with the Video Stream: ${c.message}`)):new Error("An unknown error occurred"+(a.message?`: ${a.message}`:"."))}}},function(l,E,e){"use strict";(function(t){var r=e(3),n=r(e(25)),i=r(e(12)),o=r(e(13)),s=r(e(18));const a=e(6),c=e(62),u=e(634),d=e(635),f=e(636),h=e(106),g=e(2),m=e(23)().hasAudioOutputApiSupport,p=e(294),S=e(105).getCurrentAudioOutputDeviceId;function T(C,R){const I=document.createElement("video");return d(I),I.autoplay=!0,I.playsinline=!0,I.innerHTML=C,I.setAttribute("autoplay",""),I.setAttribute("playsinline",""),!0===R&&(I.muted="true"),I}function b(){const C=T("");return C.setAttribute("style","display:none"),C}l.exports=function O(C){void 0===C&&(C={});const R=C.audioContext||e(158)(),I=C.canBeOrientatedMixin||e(637),A=C.document||(void 0!==typeof window?window:global).document,P=C.listenForTracksEnded||e(638)(),x=C.logging||e(1),D=C.OTHelpers||e(5),L=C.videoElementErrorMap||e(292)(),N=C.WebaudioAudioLevelSampler||e(145),U=C.global||(void 0!==typeof window?window:global);let B=1;return function(){function H(M,F){var z=this;let w=M._inject,k=void 0===w?{}:w,W=k.createVideoElement,Z=void 0===W?T:W,ie=k.createAudioOnlyVideoElement,_=void 0===ie?b:ie,se=M.muted,pe=M.fallbackText,ue=M.widgetType;(0,s.default)(this,"_domElement",void 0),(0,s.default)(this,"_domAudioOnlyVideoElement",void 0),(0,s.default)(this,"_blockedVolume",void 0),(0,s.default)(this,"_mediaStoppedListener",void 0),(0,s.default)(this,"_audioLevelSampler",void 0),(0,s.default)(this,"_playInterrupts",0),(0,s.default)(this,"_isVideoLoadedMetaData",!1),(0,s.default)(this,"_audioOnlyVideoElementWatcher",void 0),this.logging=x(`NativeVideoElementWrapper:${B}`),B+=1,a(this),this._defaultAudioVolume=F,this._widgetType=ue;let me=!1;this._domElement=Z(pe,se),this.trigger("videoElementCreated",this._domElement),this._domElementEvents=c(this._domElement),this._domElementEvents.on("loadstart",()=>this._onDomElementLoadStart()),this._domElementEvents.on("timeupdate",function(){for(var Me=arguments.length,Q=new Array(Me),K=0;K<Me;K++)Q[K]=arguments[K];return z.trigger("timeupdate",...Q)}),this._domElementEvents.on("loadedmetadata",(0,o.default)(i.default.mark(function Me(){var Q,K,re,de,Oe=arguments;return i.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:for(z._isVideoLoadedMetaData=!0,Q=Oe.length,K=new Array(Q),re=0;re<Q;re++)K[re]=Oe[re];if(z.trigger("loadedmetadata",...K),!z._domAudioOnlyVideoElement){ke.next=10;break}if(de=z._domAudioOnlyVideoElement.srcObject,z._removeAudioOnlyVideoElement(),!de){ke.next=10;break}return ke.next=9,p();case 9:z.play();case 10:case"end":return ke.stop()}},Me)}))),this._domElementEvents.on("error",Me=>{this.trigger("error",L(Me.target.error))},!1),this._domElementEvents.on("pause",()=>{me||(this.logging.warn("Video element paused, auto-resuming. If you intended to do this, use publishVideo(false) or subscribeToVideo(false) instead."),me=!0),this.play()}),this.on("destroyed",()=>{this._domElementEvents.removeAll(),this._domAudioOnlyVideoElementEvents&&this._domAudioOnlyVideoElementEvents.removeAll()}),I(this,()=>this._domElement),"Safari"===g.name&&"subscriber"===this._widgetType&&(this._domAudioOnlyVideoElement=_(),this._bindAudioOnlyVideoElementEvents())}var j=H.prototype;return j._onDomElementLoadStart=function(){var M=(0,o.default)(i.default.mark(function z(){return i.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if("subscriber"!==this._widgetType||!m()){k.next=3;break}return k.next=3,this._setActiveAudioOutputDevice();case 3:case"end":return k.stop()}},z,this)}));return function F(){return M.apply(this,arguments)}}(),j._setActiveAudioOutputDevice=function(){var M=(0,o.default)(i.default.mark(function z(){var w;return i.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(""!==(w=S())&&"default"!==w){W.next=3;break}return W.abrupt("return");case 3:return W.next=5,this.setSinkId(w);case 5:case"end":return W.stop()}},z,this)}));return function F(){return M.apply(this,arguments)}}(),j._rebindSrcObject=function(){this._domElement&&(this._domElement.srcObject=this._domElement.srcObject)},j._pauseAndPlay=function(){this._domElement&&(this._domElement.pause(),this._domElement.play())},j._startAudioOnlyVideoElementWatcher=function(){var M=(0,o.default)(i.default.mark(function z(){var k;return i.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return k=g.isiOS,this._audioOnlyVideoElementWatcher=setInterval(()=>{this._domAudioOnlyVideoElement&&this._domAudioOnlyVideoElement.paused&&(this._domAudioOnlyVideoElement.srcObject=this._domAudioOnlyVideoElement.srcObject,k&&this._domAudioOnlyVideoElement.play())},100),Z.next=5,h(1e3);case 5:clearInterval(this._audioOnlyVideoElementWatcher),this._audioOnlyVideoElementWatcher=null;case 7:case"end":return Z.stop()}},z,this)}));return function F(){return M.apply(this,arguments)}}(),j._removeAudioOnlyVideoElement=function(){var M=(0,o.default)(i.default.mark(function z(){return i.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:this._domAudioOnlyVideoElement.srcObject=null,this._domAudioOnlyVideoElement.parentNode.removeChild(this._domAudioOnlyVideoElement),this._domAudioOnlyVideoElementEvents&&this._domAudioOnlyVideoElementEvents.removeAll(),this._domAudioOnlyVideoElement=null;case 4:case"end":return k.stop()}},z,this)}));return function F(){return M.apply(this,arguments)}}(),j.bindAudioTrackOnly=function(){var M=(0,o.default)(i.default.mark(function z(){var w,k,W,Z,ie,_,se;return i.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return w=this._stream.getVideoTracks(),k=this._stream.getAudioTracks(),Z=void 0===(W=w[0])?{}:W,_=void 0===(ie=k[0])?{}:ie,ue.next=6,p();case 6:se=!Z.enabled&&_.enabled,!this._isVideoLoadedMetaData&&se&&this._domAudioOnlyVideoElement&&(this._domAudioOnlyVideoElement.srcObject=ne
1w U.MediaStream(k),this._startAudioOnlyVideoElementWatcher());case 8:case"end":return ue.stop()}},z,this)}));return function F(){return M.apply(this,arguments)}}(),j._bindAudioOnlyVideoElementEvents=function(){var F=this;this._domAudioOnlyVideoElementEvents=c(this._domAudioOnlyVideoElement),this._domAudioOnlyVideoElementEvents.on("pause",()=>this.play()),this._domAudioOnlyVideoElementEvents.on("timeupdate",function(){for(var z=arguments.length,w=new Array(z),k=0;k<z;k++)w[k]=arguments[k];return F.trigger("timeupdate",...w)}),this._domAudioOnlyVideoElementEvents.on("loadedmetadata",function(){for(var z=arguments.length,w=new Array(z),k=0;k<z;k++)w[k]=arguments[k];return F.trigger("loadedmetadata",...w)})},j.whenTimeIncrements=function(F,z){this.once("timeupdate",()=>{F.call(z,this)})},j.domElement=function(){return this._domElement},j.videoWidth=function(){return this._domElement?Number(this._domElement["video"+(this.isRotated()?"Height":"Width")]):0},j.videoHeight=function(){return this._domElement?Number(this._domElement["video"+(this.isRotated()?"Width":"Height")]):0},j.aspectRatio=function(){return this.videoWidth()/this.videoHeight()},j.imgData=function(){const F=D.createElement("canvas",{width:this.videoWidth(),height:this.videoHeight(),style:{display:"none"}});A.body.appendChild(F);let z=null;try{F.getContext("2d").drawImage(this._domElement,0,0,F.width,F.height),z=F.toDataURL("image/png")}catch(w){}return D.removeElement(F),null===z||"data:,"===z?(this.logging.warn("Cannot get image data yet"),null):z.replace("data:image/png;base64,","").trim()},j.appendTo=function(F){return F.appendChild(this._domElement),this._domAudioOnlyVideoElement&&F.appendChild(this._domAudioOnlyVideoElement),this},j.isAudioBlocked=function(){return void 0!==this._blockedVolume},j.unblockAudio=function(){var M=(0,o.default)(i.default.mark(function z(){var w;return i.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(this.isAudioBlocked()){W.next=3;break}return this.logging.warn("Unexpected call to unblockAudio() without blocked audio"),W.abrupt("return");case 3:return w=this._blockedVolume,this._blockedVolume=void 0,this.setAudioVolume(w),W.prev=6,W.next=9,this.play();case 9:W.next=16;break;case 11:throw W.prev=11,W.t0=W.catch(6),this._blockedVolume=w,this._domElement.muted=!0,W.t0;case 16:this.trigger("audioUnblocked");case 17:case"end":return W.stop()}},z,this,[[6,11]])}));return function F(){return M.apply(this,arguments)}}(),j.rebind=function(){var M=(0,o.default)(i.default.mark(function z(){return i.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if(this._domElement){k.next=2;break}throw new Error("Can't rebind because _domElement no longer exists");case 2:this._playInterrupts++,this._domElement.srcObject=this._domElement.srcObject,this._hasAudioOnlyVideoElement()&&(this._domAudioOnlyVideoElement.srcObject=this._domAudioOnlyVideoElement.srcObject);case 5:case"end":return k.stop()}},z,this)}));return function F(){return M.apply(this,arguments)}}(),j._createAudioLevelSampler=function(){if(this._removeAudioLevelSampler(),this._stream.getAudioTracks().length>0){try{this._audioContext=R()}catch(F){this.logging.warn("Failed to get AudioContext(), audio level visualisation will not work",F)}this._audioContext&&(this._audioLevelSampler=new N(this._audioContext),this._audioLevelSampler.webRTCStream(this._stream))}},j._removeAudioLevelSampler=function(){this._audioContext&&(delete this._audioContext,delete this._audioLevelSampler)},j._toggleVideoTracks=function(){var M=(0,o.default)(i.default.mark(function z(){var w,W;return i.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(!((w=this._domElement.srcObject.getTracks().filter(_=>_.enabled)).length>1)){ie.next=8;break}return(W=w.filter(_=>"video"===_.kind)).forEach(_=>{_.enabled=!1}),ie.next=7,p();case 7:W.forEach(_=>{_.enabled=!0});case 8:case"end":return ie.stop()}},z,this)}));return function F(){return M.apply(this,arguments)}}(),j._hasAudioOnlyVideoElement=function(){return this._domAudioOnlyVideoElement&&this._domAudioOnlyVideoElement.srcObject},j.play=function(){var M=(0,o.default)(i.default.mark(function z(){var w,k,W,Z,ie,_,se,pe,ue,me;return i.default.wrap(function(K){for(;;
1)switch(K.prev=K.next){case 0:if(w=this._playInterrupts,k="Safari"===g.name,W=this._hasAudioOnlyVideoElement()?this._domAudioOnlyVideoElement:this._domElement,!k){K.next=6;break}return K.next=6,p();case 6:if(!g.isiOS||!g.isSafari){K.next=16;break}if("publisher"!==this._widgetType){K.next=15;break}if(Z=g.iOSVersion>=14&&g.iOSVersion<=14.2,ie=this._stream.getVideoTracks(),se=void 0===(_=ie[0])?{}:_,pe=this._stream.getAudioTracks(),me=void 0===(ue=pe[0])?{}:ue,!Z||f(W)||!se.enabled){K.next=13;break}return K.abrupt("return");case 13:if(!me.muted){K.next=15;break}return K.abrupt("return");case 15:this._toggleVideoTracks();case 16:return K.prev=16,K.next=19,W.play();case 19:return K.abrupt("return");case 22:if(K.prev=22,K.t0=K.catch(16),"AbortError"===(K.t0||{}).name&&this._playInterrupts++,!(this._playInterrupts>w)){K.next=31;break}return K.next=30,this.play();case 30:return K.abrupt("return");case 31:throw K.t0;case 32:case"end":return K.stop()}},z,this,[[16,22]])}));return function F(){return M.apply(this,arguments)}}(),j._bindToStream=function(F){this._stream=F,this._domElement.srcObject=F,this._domAudioOnlyVideoElement&&this.bindAudioTrackOnly()},j.bindToStream=function(){var M=(0,o.default)(i.default.mark(function z(w){var W,Z,ie,k=this;return i.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(this._domElement){se.next=2;break}throw new Error("Can't bind because _domElement no longer exists");case 2:return this._bindToStream(w),(0,o.default)(i.default.mark(function pe(){var ue;return i.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return ve.prev=0,ve.next=3,k.play();case 3:ve.next=26;break;case 5:if(ve.prev=5,ve.t0=ve.catch(0),ue=!!w.getAudioTracks().length,!k._hasAudioOnlyVideoElement()||"NotAllowedError"!==ve.t0.name){ve.next=15;break}return k._domAudioOnlyVideoElement.muted=!0,ve.next=12,k.play();case 12:k._domAudioOnlyVideoElement.muted=!1,ve.next=26;break;case 15:if(!ue){ve.next=23;break}return k._blockedVolume=k.getAudioVolume(),k._domElement.muted=!0,ve.next=20,k.play();case 20:k.trigger("audioBlocked"),ve.next=26;break;case 23:return k._domElement.muted=!0,ve.next=26,k.play();case 26:case"end":return ve.stop()}},pe,null,[[0,5]])}))().catch(pe=>{this.logging.debug(".play() failed: ",pe)}),this.trigger("videoDimensionsChanged",(0,n.default)({},W={width:this._domElement.videoWidth,height:this._domElement.videoHeight}),(0,n.default)({},W)),this._domElementEvents.on("resize",()=>{const pe=this._domElement,ue=pe.videoWidth,me=pe.videoHeight;(ue!==W.width||me!==W.height)&&(this.trigger("videoDimensionsChanged",(0,n.default)({},W),{width:ue,height:me}),W.width=ue,W.height=me)}),Z=()=>{this._mediaStoppedListener.stop(),this._domElement&&(this._domElement.onended=null),this.trigger("mediaStopped")},ie=pe=>{this.trigger("mediaStopped",pe)},this._domElement.onended=()=>Z(),this._mediaStoppedListener=P(w,Z,ie),this._createAudioLevelSampler(),se.abrupt("return",void 0);case 13:case"end":return se.stop()}},z,this)}));return function F(z){return M.apply(this,arguments)}}(),j.unbindStream=function(){return this._domElement&&(this._domElement.srcObject=null),this._domAudioOnlyVideoElement&&(this._domAudioOnlyVideoElement.srcObject=null),this._removeAudioLevelSampler(),this},j.setAudioVolume=function(F){if(this.isAudioBlocked())return void(this._blockedVolume=F);const z=parseFloat(F)/100,w=[this.domElement()];this._domAudioOnlyVideoElement&&w.push(this._domAudioOnlyVideoElement),w.forEach(k=>{k&&(k.volume=z,k.muted=0===z)})},j.getAudioVolume=function(){if(this.isAudioBlocked())return this._blockedVolume;const F=this.domElement();return F?F.muted?0:100*F.volume:this._defaultAudioVolume},j.audioChannelType=function(F){const z=this.domElement();return void 0!==F&&(z.mozAudioChannelType=F),"mozAudioChannelType"in this._domElement?z.mozAudioChannelType:"unknown"},j.getAudioInputLevel=function(){return this._audioLevelSampler.sample()},j.refreshTracks=function(){this._mediaStoppedListener&&this._mediaStoppedListener.refresh(),this._createAudioLevelSampler()},j.destroy=function(){this._mediaStoppedListener&&this._mediaStoppedListener.stop(),this.logging.debug("removing domElementEvents"),this._domElementEvents.removeAll(),this._domAudioOnlyVideoElementEvents&&this._domAudioOnlyVideoElementEvents.removeAll(),this._audioOnlyVideoElementWatcher&&clearInterval(this._audioOnlyVideoElementWatcher),this.unbindStream(),this._domElement&&(D.removeElement(this._domElement),this._domElement=null),this._domAudioOnlyVideoElement&&(D.removeElement(this._domAudioOnlyVideoElement),this._domAudioOnlyVideoElement=null),this.trigger("destroyed"),u("NativeVideoElementWrapper",this)},j.setSinkId=function(F){const w=[this._domElement,this._domAudioOnlyVideoElement].map(k=>{if(k)return k.setSinkId(F)});return t.all(w)},H}()}}).call(this,e(0))},function(l,E,e){"use strict";(function(t){l.exports=()=>new t(r=>setTimeout(r))}).call(this,e(0))},function(l,E,e){"use strict";(function(t){const r=e(7),n=e(47),i=e(61),o=e(6);l.exports=function(a){void 0===a&&(a={});const c=a.getStatsHelpers||e(75),u=a.OTHelpers||e(5),d=a.PeerConnection||e(101)(),f=a.setCertificates||e(163)(),h=a.watchAudioAcquisition||e(640);return function(v){let P,D,m=v.iceConfig,p=v.webRTCStream,y=v.channels,S=v.sendMessage,T=v.capableSimulcastStreams,b=v.overrideSimulcastEnabled,O=v.logAnalyticsEvent,C=v.offerOverrides,R=v.answerOverrides,I=v.sourceStreamId,A=v.isP2pEnabled,x=!1;const L=function(){this.destroy(),x&&(x=!1,this.trigger("iceRestartFailure")),this.trigger("disconnected")},N=function(V){this.trigger("error",{reason:V.reason,prefix:V.prefix})},U=function(V){x&&P.iceConnectionStateIsConnected()&&(x=!1,this.trigger("iceRestartSuccess")),"connected"===V&&("Chrome"===u.env.name&&(D&&D(),D=h(P.getStats.bind(P),()=>this.trigger("audioAcquisitionProblem"))),this.trigger("connected")),this.trigger("iceConnectionStateChange",V)};o(this),this.changeMediaDirectionToInactive=()=>{P&&P.changeMediaDirectionToInactive()},this.changeMediaDirectionToRecvOnly=()=>{P&&P.changeMediaDirectionToRecvOnly()}
1,this.getDataChannel=function(B,V,H){P.getDataChannel(B,V,H)},this.getSourceStreamId=()=>P.getSourceStreamId(),this.destroy=function(){D&&(D(),D=null),P&&(P.disconnect(),P=null),this.off()},this.processMessage=function(B,V){P.processMessage(B,V)},this.addTrack=function(B,V,H){return P.addTrack(B,V,H)},this.removeTrack=function(B){return P.removeTrack(B)},this.getLocalStreams=function(){return P.getLocalStreams()},this.init=function(B,V){const H={iceConfig:m.needRumorIceServersFallback?r(m,{servers:[...B,...m.servers]}):m,channels:y,capableSimulcastStreams:T,overrideSimulcastEnabled:b};f(H,(j,M)=>{if(j)return void V(j);const F=r({logAnalyticsEvent:O,isPublisher:!0,offerOverrides:C,answerOverrides:R,sourceStreamId:I,p2p:A},M);P=new d(r({sendMessage:S},F)),P.on({close:L,error:N,qos:z=>this.trigger("qos",z),iceConnectionStateChange:U},this),P.addLocalStream(p).then(()=>{V(void 0)}).catch(V)})},this.getSenders=function(){return P.getSenders()},this.iceRestart=function(){P&&(x=!0,P.iceRestart())},this.hasRelayCandidates=()=>P.hasRelayCandidates(),this.iceConnectionStateIsConnected=function(){return P.iceConnectionStateIsConnected()},this.findAndReplaceTrack=(B,V)=>P.findAndReplaceTrack(B,V),this._testOnlyGetFramesEncoded=()=>new t((B,V)=>{P.getStats((H,j)=>{if(H)return void V(H);const M=i(j,F=>c.isVideoStat(F,j)&&c.isOutboundStat(F));M?B(n(M,["timestamp","framesEncoded"])):V(new Error("Could not find framesEncoded in getStats report"))})}),this.getStats=B=>P.getStats(B),this.getRtcStatsReport=B=>P.getRtcStatsReport(B)}}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(7),r=e(6);l.exports=function(i){void 0===i&&(i={});const o=i.OTHelpers||e(5),s=i.PeerConnection||e(101)(),a=i.setCertificates||e(163)(),c=i.Errors||e(4),u=i.ExceptionCodes||e(8),d=i.OTErrorClass||e(21),f=i.watchSubscriberAudio||e(641);return function(g){let v=g.clientCandidates,m=g.iceConfig,p=g.send,y=g.logAnalyticsEvent,S=g.p2p,T=g.codecFlags,b=g.sourceStreamId;const O=this;let C,R=!1,I=!1,A=null;const P=function(){this.destroy(),I&&this.trigger("iceRestartFailure",this),this.trigger("disconnected",this)},x=function(F){this.trigger("remoteStreamAdded",F,this)},D=function(F){this.trigger("remoteStreamRemoved",F,this)},L=M=>{this.trigger("remoteVideoSupported",M)},N=function(F){this.trigger("error",null,F.reason,this,F.prefix)},U=function(F){I&&("connected"===F||"completed"===F)&&(I=!1,this.trigger("iceRestartSuccess")),"connected"===F&&this.trigger("connected"),this.trigger("iceConnectionStateChange",F)},B=function(F){this.trigger("signalingStateChange",F)},V=function(F){this.trigger("signalingStateStable",F)},H=(M,F)=>{("answer"===M||"pranswer"===M)&&this.trigger("connected"),p(M,F)};r(this),this.close=function(){R||(R=!0,C&&(C.disconnect(),C=null),this.off())},this.destroy=function(){this.stopAudioStatsWatcher(),!R&&this.close()},this.getDataChannel=function(M,F,z){C.getDataChannel(M,F,z)},this.getSourceStreamId=()=>C.getSourceStreamId(),this.processMessage=function(M,F){C.processMessage(M,F)},this.remoteDescription=function(){return C.remoteDescription()}
1,this.getStats=function(M){if(C)C.getStats(M);else{const F=u.PEER_CONNECTION_NOT_CONNECTED;M(new o.Error(d.getTitleByCode(F),c.PEER_CONNECTION_NOT_CONNECTED,{code:F}))}},this.getSynchronizationSources=function(M){if(C)C.getSynchronizationSources(M);else{const F=u.PEER_CONNECTION_NOT_CONNECTED;M(new o.Error(d.getTitleByCode(F),c.PEER_CONNECTION_NOT_CONNECTED,{code:F}))}},this.getRtcStatsReport=function(M){if(C)C.getRtcStatsReport(M);else{const F=u.PEER_CONNECTION_NOT_CONNECTED;M(new o.Error(d.getTitleByCode(F),c.PEER_CONNECTION_NOT_CONNECTED,{code:F}))}},this.startAudioStatsWatcher=function(M){A||(A=f(C.getStats.bind(C),F=>{this.stopAudioStatsWatcher(),this.trigger("audioLevelStuckWarning",F)},M))},this.stopAudioStatsWatcher=function(){A&&A.stop(),A=null};const j=function(F){return function(z){!C||C.remoteTracks().forEach(w=>{w.kind===F&&w.enabled!==z&&(w.enabled=z)})}};this.subscribeToAudio=j("audio"),this.subscribeToVideo=j("video"),this.hasRelayCandidates=function(){return C.hasRelayCandidates()},this.iceRestart=function(){return I=!0,C.iceRestart()},this.iceConnectionStateIsConnected=function(){return C.iceConnectionStateIsConnected()},this.init=function(M){a({iceConfig:m},(z,w)=>{if(z)return void M(z);const k=t({logAnalyticsEvent:y,clientCandidates:v,codecFlags:T,sourceStreamId:b},w);C=new s(t({sendMessage:H,p2p:S},k)),C.on({iceConnected:()=>O.emit("iceConnected"),close:P,streamAdded:x,streamRemoved:D,signalingStateChange:B,signalingStateStable:V,error:N,qos:W=>this.trigger("qos",W),iceConnectionStateChange:U,remoteVideoSupported:L},O),C.remoteTracks().length>0?C.remoteStreams().forEach(x,O):M(void 0,O)})}}}},function(l,E,e){"use strict";l.exports=function(r){void 0===r&&(r={});const a=(r.generateSimpleStateMachine||e(160)())("NotPublishing",["NotPublishing","GetUserMedia","BindingMedia","MediaBound","PublishingToSession","Publishing","Failed","Destroyed"],{NotPublishing:["NotPublishing","GetUserMedia","Destroyed"],GetUserMedia:["BindingMedia","Failed","NotPublishing","Destroyed"],BindingMedia:["MediaBound","Failed","NotPublishing","Destroyed"],MediaBound:["NotPublishing","PublishingToSession","Failed","Destroyed"],PublishingToSession:["NotPublishing","Publishing","Failed","Destroyed","MediaBound"],Publishing:["NotPublishing","MediaBound","Failed","Destroyed"],Failed:["Destroyed"],Destroyed:[]});return a.prototype.isDestroyed=function(){return"Destroyed"===this.current},a.prototype.isAttemptingToPublish=function(){return-1!==["GetUserMedia","BindingMedia","MediaBound","PublishingToSession"].indexOf(this.current)},a.prototype.isPublishing=function(){return"Publishing"===this.current},a}},function(l,E,e){"use strict";function t(r){this.message=r||"Operation has been canceled.",this.name="CancellationError",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}Object.defineProperty(E,"__esModule",{value:!0}),E.default=t,(t.prototype=Object.create(Error.prototype)).constructor=t},function(l,E,e){var t=e(0);Object.defineProperty(E,"__esModule",{value:!0}),E.default=function r(n,i){return t.resolve(n).then(o=>t.resolve(i()).then(()=>o),o=>t.resolve(i()).then(()=>t.reject(o)))}},function(l,E,e){"use strict";(function(t){var r=e(3),n=r(e(25)),i=r(e(12)),o=r(e(13));const s=e(140),a=e(147),c=e(7),u=e(276),d=e(56),f=e(49),g=e(165).CancellationError,v=e(19),m=e(41),p=e(48),y=e(268),S=e(26),T=e(6),b=e(651),O=e(103),C=e(62),R=e(652),I=e(4),A=e(164)(),P=e(653),x=e(282),D=e(143),L=e(283),N=e(144),U=e(2),B=e(4),V=e(22)(),H=e(8),j=e(75),M=e(301),F=e(302),z=e(654),w=e(162)(),k=e(1)("Subscriber"),W=e(284)(),Z=e(285),ie=e(11)(),_=e(21),se=e(5),pe=e(151),ue=e(142)(void 0!==typeof window?window:global),me=e(101)({global:ue}),ve=e(296)({PeerConnection:me}),Re=e(303),Me=e(657),Q=e(658),K=e(659),re=e(660),de=e(304),Oe=e(100).parseIceServers,xe=e(661),ke=e(662),X=e(663),te=e(306),le=e(167),De=(He,Ne)=>He.connection.id===Ne.connection.id;function Ze(He,Ne){const Ge=Ne&&Ne.hasVideo&&He&&0===He.getVideoTracks().length,St=Ne&&Ne.hasAudio&&He&&0===He.getAudioTracks().length;return!(Ge||St)}l.exports=function(Ne){let Ge=void 0===Ne?{}
1:Ne,St=Ge.AudioLevelMeter,Se=void 0===St?x:St,nt=Ge.AudioLevelTransformer,Nt=void 0===nt?D:nt,on=Ge.BackingBar,xt=void 0===on?L:on,Te=Ge.Chrome,sn=void 0===Te?N:Te,Vt=Ge.env,lt=void 0===Vt?U:Vt,qt=Ge.Errors,Ut=void 0===qt?B:qt,Dt=Ge.Events,Ke=void 0===Dt?V:Dt,Ct=Ge.ExceptionCodes,ft=void 0===Ct?H:Ct,Pt=Ge.audioLevelSampler,En=void 0===Pt?z:Pt,en=Ge.getStatsHelpers,Mt=void 0===en?j:en,Je=Ge.hasAudioOutputLevelStatCapability,Be=Ge.hasRemoteStreamsWithWebAudio,dn=void 0===Be?F:Be,tn=Ge.interpretPeerConnectionError,it=void 0===tn?w:tn,Nn=Ge.logging,qe=void 0===Nn?k:Nn,fn=Ge.MuteButton,hn=void 0===fn?W:fn,an=Ge.NamePanel,Mn=void 0===an?Z:an,In=Ge.otError,At=void 0===In?ie:In,ye=Ge.OTErrorClass,Ie=void 0===ye?_:ye,Ve=Ge.OTHelpers,rt=void 0===Ve?se:Ve,at=Ge.StylableComponent,Xt=void 0===at?pe:at,ne=Ge.SubscriberPeerConnection,ce=void 0===ne?ve:ne,fe=Ge.SubscribingState,Ae=void 0===fe?Re:fe,Fe=Ge.VideoDisabledIndicator,Xe=void 0===Fe?Me:Fe,Rt=Ge.AudioBlockedIndicator,Lt=void 0===Rt?Q:Rt,It=Ge.VideoUnsupportedIndicator,Ft=void 0===It?K:It,pt=Ge.watchFrameRate,Sn=void 0===pt?re:pt,Bt=Ge.createSendMethod,pn=void 0===Bt?de:Bt,mt=Ge.parseIceServers,Tn=void 0===mt?Oe:mt,Tt=Ge.document,cn=void 0===Tt?(void 0!==typeof window?window:global).document:Tt,zt=Ge.WidgetView,Rr=void 0===zt?A:zt;const $e=function Kn($n,Cn,tr){var ot=this;if(void 0===Cn&&(Cn={}),void 0===tr&&(tr=()=>{}),void 0===Cn.analytics)throw new Error("Subscriber requires an instance of analytics");const kt=Cn.analytics,bn=v(),hr=Kn.hasAudioOutputLevelStatCapability()||dn(),Yt=this,un={},On={},Jn={},pr={},Hn={};let we,vt,jn,rn,gr,yt,gn,zn,Wt,Zn,mr,nr,Vn,Kt,Yn,An,vn,rr=!1,ir=$n||bn,st=Cn.session,Ye=Cn.stream,mn=!1,Ln={},Xn=null,Bn=!1,xn=!0,Gt=[],_e=s({},Cn,{showControls:!0,testNetwork:!1,fitMode:Ye.defaultFitMode||"cover",insertDefaultUI:!0});const kn={P2P:S.SUBSCRIBER_DISCONNECTED,MANTIS:S.SUBSCRIBER_DISCONNECTED},wn="Chrome"===lt.name&&lt.version>=58||lt.isChromiumEdge||lt.isOpera,Wn=st._.getSocket(),Dn=()=>u(On),or=J=>On[J],Pn=()=>On[vn],Ir=function(){var J=(0,o.default)(i.default.mark(function q(oe){return i.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,On[oe];case 2:Ce.sent.close(),delete On[oe];case 5:case"end":return Ce.stop()}},q)}));return function(oe){return J.apply(this,arguments)}}(),vr=J=>{delete Jn[J]},sr=function(){var J=(0,o.default)(i.default.mark(function q(oe){var ge;return i.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(oe){Ce.next=2;break}return Ce.abrupt("return");case 2:return ge={error:Fn,audioVolume:Kt},Ce.prev=3,Ce.next=6,we.bindVideo(oe,ge);case 6:Ce.next=14;break;case 8:if(Ce.prev=8,Ce.t0=Ce.catch(3),!(Ce.t0 instanceof g||yt.isDestroyed())){Ce.next=12;break}return Ce.abrupt("return");case 12:throw Fn(Ce.t0),Ce.t0;case 14:case"end":return Ce.stop()}},q,null,[[3,8]])}));return function(oe){return J.apply(this,arguments)}}(),yr=function(){var J=(0,o.default)(i.default.mark(function q(oe,ge){var Le,Ce,Qe;return i.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(Le=!1,"function"==typeof oe?ge=oe:Le="rtcStatsReport"===oe,Le?Ht():gt(),!Le||te){ut.next=7;break}return Ce=ft.GET_RTC_STATS_REPORT_NOT_SUPPORTED,ge(At(I.GET_RTC_STATS_REPORT_NOT_SUPPORTED,new Error(Ie.getTitleByCode(Ce)),Ce)),ut.abrupt("return");case 7:if(Pn()){ut.next=11;break}return Ce=ft.PEER_CONNECTION_NOT_CONNECTED,ge(At(Ut.PEER_CONNECTION_NOT_CONNECTED,new Error(Ie.getTitleByCode(Ce)),Ce)),ut.abrupt("return");case 11:return ut.next=13,Pn();case 13:Qe=ut.sent,(Le?Qe.getRtcStatsReport:Qe.getStats)((Rn,jt)=>{Rn?(Rn.code===ft.PEER_CONNECTION_NOT_CONNECTED&&(Rn=At(Ut.PEER_CONNECTION_NOT_CONNECTED,Rn,ft.PEER_CONNECTION_NOT_CONNECTED)),ge(Rn)):ge(null,jt)});case 16:case"end":return ut.stop()}},q)}));return function(oe,ge){return J.apply(this,arguments)}}(),Ot=(J,q,oe,ge,Le)=>{let Ce=c({action:J,variation:q,payload:oe,streamId:Ye?Ye.id:null,sessionId:st?st.sessionId:null,connectionId:st&&st.isConnected()?st.connection.connectionId:null,partnerId:st&&st.sessionInfo?st.sessionInfo.partnerId:null,subscriberId:bn,widgetType:"Subscriber"},ge);("Failure"===q||"iceconnectionstatechange"===q&&"closed"===oe)&&(Ce=c(Ce,Ln));const Qe=[Ce];Le&&Qe.push(Le),kt.logEvent(...Qe)},Gn=(J,q,oe)=>{"Attempt"===q?(pr[J]=(new Date).getTime(),Ot(J,q,oe)):("Failure"===q||"Success"===q)&&Ot(J,q,oe,{attemptDuration:(new Date).getTime()-pr[J]})},Un=function(q,oe){void 0===oe&&(oe={}),Gn("RoutedToRelayedTransition",q,oe)},Qn=function(q,oe){void 0===oe&&(oe={}),Gn("RelayedToRoutedTransition",q,oe)},wt=ke({onInvalidTransition(J,q){const oe=`Invalid state transition: Event '${J}' not possible in state '${q}'`;qe.error(oe),Ot("Subscriber:InvalidStateTransition","Event",{details:oe})}});{const J="Unable to subscribe to stream in a reasonable amount of time";xe({connectivityState:wt,onWarning(){qn("Warning",{})},onTimeout:()=>{if(we&&we.addError(J),yt.isAttemptingToSubscribe()){yt.set("Failed"),this._disconnect({
1noStateTransition:!0});const q=At(I.TIMEOUT,new Error(J),ft.UNABLE_TO_SUBSCRIBE);wt.fail({options:{failureReason:"Subscribe",failureMessage:J,failureCode:ft.UNABLE_TO_SUBSCRIBE},error:q})}},warningMs:15e3,timeoutMs:3e4})}if(un.promise=new t((J,q)=>{un.resolve=J,un.reject=q}),_e.testNetwork&&st.sessionInfo.p2pEnabled&&qe.warn("You cannot test your network with a relayed session. Use a routed session."),this.id=ir,this.widgetId=bn,this.session=st,this.stream=_e.stream,Ye=_e.stream,this.streamId=Ye.id,!st)return Ie.handleJsException({errorMsg:"OT.Subscriber must be passed a session option",code:2e3,target:this,analytics:kt}),null;T(this),Yt.once("subscribeComplete",function(){try{tr(...arguments)}catch(J){qe.error("Completion handler threw an exception",J)}}),wt.observe({onEnterConnecting(){qn("Attempt",null,{})},onEnterConnected(){qn("Success",null,{})},onEnterDisconnected(J,q){let oe=void 0===q?{}:q,ge=oe.options,Le=void 0===ge?{}:ge,Ce=oe.payload,Qe=void 0===Ce?null:Ce;qn((J=>{let q=J.transition,oe=J.from;return"fail"===q?"connected"===oe?"Disconnect":"Failure":"disconnect"===q&&"connected"===oe?"Disconnect":"Cancel"})(J),Qe,Le)}}),wt.observe({onEnterConnected:()=>{this.trigger("subscribeComplete",void 0,this)},onEnterDisconnected:function(q,oe){"connecting"===q.from&&ot.trigger("subscribeComplete",(void 0===oe?{}:oe).error||new Error("An unknown error occurred"),ot)}}),X({connectivityState:wt,logAttempt(){Ot("Subscribe","Attempting",null,{connectionId:st&&st.isConnected()?st.connection.connectionId:null})}});const qn=(J,q,oe)=>{"Attempt"===J&&(mr=(new Date).getTime()),Ot("Subscribe",J,q,"Failure"===J||"Success"===J||"Cancel"===J?(0,n.default)({},oe,{attemptDuration:(new Date).getTime()-mr}):oe)},ar=(J,q)=>{Ot("ICERestart",J,q)},Dr=J=>{let q=J.parsedStats,oe=J.remoteConnectionId,ge=J.peerId,Le=J.sourceStreamId;const Ce={widgetType:"Subscriber",width:we.width,height:we.height,audioTrack:Wt&&Wt.getAudioTracks().length>0,hasAudio:Ye&&Ye.hasAudio,subscribeToAudio:Vn,audioVolume:this.getAudioVolume(),videoTrack:Wt&&Wt.getVideoTracks().length>0,connectionId:st?st.connection.connectionId:null,hasVideo:Ye&&Ye.hasVideo,subscribeToVideo:_e.subscribeToVideo,congestionLevel:Xn,streamId:Ye.id,subscriberId:bn,duration:Math.round((p()-gr)/1e3),remoteConnectionId:oe,peerId:ge,sourceStreamId:le(Le)},Qe=c(Ce,q);kt.logQOS(Qe),this.trigger("qos",kt.combineWithCommon(Qe))},Tr=()=>{yt.isSubscribing()||!we||!we.video()||(rr=!0,Bn||(wt.connect(),Bn=!0),qe.debug("OT.Subscriber.onLoaded"),yt.set("Subscribing"),gr=p(),we.loading(!1),vt&&vt.showAfterLoading(),mn&&Ye.setRestrictFrameRate(!0),rn&&rn.audioOnly(we.audioOnly()),this.setAudioVolume(Kt),this.trigger("loaded",this))},cr=()=>Ye&&Ye.hasAudio&&Vn&&this.getAudioVolume()>0&&!this.isAudioBlocked(),Pr=J=>{let oe=!1;if(("audioLevelStuckAt0"!==J||!(!cr()||Ye&&Ye.hasVideo))&&(Ot("subscriber:onAudioWarning","Event",{reason:J}),we)){if(we.rebindSrcObject(),Ot("subscriber:rebindSrcObject","Called"),"audioLevelStuck"===J)return;oe=!0}ur(oe)},ur=function(){var J=(0,o.default)(i.default.mark(function q(oe){return i.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(void 0===oe&&(oe=!1),!wn){Ce.next=6;break}return Ce.next=4,Pn();case 4:Ce.sent.startAudioStatsWatcher(oe);case 6:case"end":return Ce.stop()}},q)}));return function(oe){return J.apply(this,arguments)}}(),Or=()=>{qe.debug("OT.Subscriber has been disconnected from the Publisher's PeerConnection"),wt.fail({options:{failureReason:"PeerConnectionError",failureCode:ft.UNABLE_TO_PUBLISH,failureMessage:"PeerConnection disconnected"},error:At(Ut.DISCONNECTED,new Error("ClientDisconnected"))}),this._disconnect({noStateTransition:!0}),(yt.isAttemptingToSubscribe()||yt.isSubscribing())&&yt.set("Failed")},Fn=J=>{const q=At(Ut.MEDIA_ERR_DECODE,J,J.code||ft.P2P_CONNECTION_FAILED);q.message=`OT.Subscriber while playing stream: ${q.message}`,qe.error("OT.Subscriber.onVideoError"),wt.fail({options:{failureReason:"VideoElement",failureMessage:q.message,failureCode:q.code||ft.P2P_CONNECTION_FAILED},error:q});const oe=yt.isAttemptingToSubscribe();yt.set("Failed"),oe||Yt.trigger("error",q.message),Ie.handleJsException({error:q,code:ft.UNABLE_TO_SUBSCRIBE,target:Yt,analytics:kt})},Ar=J=>{const q=R(J);Ie.handleJsException({error:q,code:q.code,target:Yt,analytics:kt}
1),this._disconnect({noStateTransition:!0});const oe={failureReason:"Subscribe",failureMessage:`OT.Subscriber PeerConnection Error: ${q.message}`,failureCode:ft.P2P_CONNECTION_FAILED};ct(q.code),wt.fail({options:oe,error:At(q.name,new Error(`Subscribe: Subscriber PeerConnection with connection (not found) failed: ${q.message}`),q.code)}),q.name===I.STREAM_NOT_FOUND&&this._destroy({reason:"streamNotFound",noStateTransition:!0})},Nr=(J,q,oe,ge)=>{if("SetRemoteDescription"===ge&&!xn&&q.match(/Unsupported video without audio for fallback/)){let Et;return we&&we.addError("The stream is unable to be played.","Your browser does not support the video format."),Et="Safari"===rt.env.name?new Error("VP8 is not supported in this version of Safari. You might want to consider switching to an H264 project. See https://tokbox.com/safari for more information."):new Error("Video format not supported in this browser."),Et.code=ft.UNSUPPORTED_VIDEO_CODEC,void Fn(Et)}if("ICEWorkflow"===ge&&st.sessionInfo.reconnection&&rr)return void qe.debug("Ignoring peer connection failure due to possibility of reconnection.");let Le;Le="ICEWorkflow"===ge?ft.SUBSCRIBER_ICE_WORKFLOW_FAILED:J===ft.STREAM_LIMIT_EXCEEDED?J:ft.P2P_CONNECTION_FAILED;const Ce={failureReason:ge||"PeerConnectionError",failureMessage:`OT.Subscriber PeerConnection Error: ${q}`,failureCode:Le},Qe=it(J,q,ge,"(not found)","Subscriber");if(wt.fail({options:Ce,error:Qe}),yt.isAttemptingToSubscribe()){const Et={hasRelayCandidates:oe&&oe.hasRelayCandidates()};Ot("createPeerConnection","Failure",Et,Ce),yt.set("Failed")}else yt.isSubscribing()&&(yt.set("Failed"),this.trigger("error",q));this._disconnect({noStateTransition:!0}),404===Number(J)&&this._destroy({noStateTransition:!0}),Ie.handleJsException({errorMsg:`OT.Subscriber PeerConnection Error: ${q}`,errorCode:Le,target:this,analytics:kt}),ct(J)},lr=function(){var J=(0,o.default)(i.default.mark(function q(oe,ge){var Le,Ce,Et,_t,ut,Rn,jt;return i.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return Le=1===Object.keys(Jn).length,Ce=null==ge?void 0:ge.getSourceStreamId(),Et=st.sessionInfo,Wt=oe,Ce&&(Jn[Ce]=oe),qe.debug("OT.Subscriber.onRemoteStreamAdded with sourceStreamId",Ce),bt.prev=6,bt.next=9,b(()=>Ze(Wt,Ye));case 9:bt.next=18;break;case 11:if(bt.prev=11,bt.t0=bt.catch(6),"TIMEOUT"!==bt.t0.message){bt.next=17;break}qe.error("The expected tracks never arrived"),bt.next=18;break;case 17:throw bt.t0;case 18:return yt.set("BindingRemoteStream"),ot.subscribeToAudio(Vn),Zn="loading",ot.subscribeToVideo(_e.subscribeToVideo,"loading"),!Et.p2pEnabled&&"P2P"!==Ce&&(ot.setPreferredResolution(_e.preferredResolution),ot.setPreferredFrameRate(_e.preferredFrameRate)),oe.getVideoTracks().forEach(yn=>{yn.enabled=!(void 0!==typeof window?window:global).webkitMediaStream&&Ye.hasVideo&&_e.subscribeToVideo}),bt.next=26,sr(oe);case 26:if(ur(),!yt.isDestroyed()){bt.next=29;break}throw new Error("Subscriber destroyed");case 29:return(void 0!==typeof window?window:global).webkitMediaStream&&oe.getVideoTracks().forEach(yn=>{yn.enabled=Ye.hasVideo&&_e.subscribeToVideo}),(_t=we&&we.video())&&_t.orientation({width:Ye.videoDimensions.width,height:Ye.videoDimensions.height,videoOrientation:Ye.videoDimensions.orientation}),(ut=vt&&vt.videoUnsupportedIndicator)&&ut.setVideoUnsupported(!xn),Rn=new t((yn,Mr)=>{const er=we&&we.video();er&&er.domElement()?yn():(we.once("videoElementCreated",yn),Yt.once("destroyed",Mr))}),bt.next=37,Rn;case 37:return bt.next=39,un.promise;case 39:if(Le?yt.set("Subscribing"):Tr(),gn&&"webRTCStream"in gn&&oe.getAudioTracks().length>0&&gn.webRTCStream(oe),!((jt=rt.env).isSafari||jt.isChromiumEdge||jt.isOpera||"Chrome"===jt.name&&jt.version>=58||jt.isFirefox&&jt.version>=96)){bt.next=48;break}return An&&(An.destroy(),An=null),bt.next=46,Pn();case 46:(ge=bt.sent)&&(An=Sn(ge.getStats.bind(ge)));case 48:Le||ot.trigger("streamAdded",ot);case 49:case"end":return bt.stop()}},q,null,[[6,11]])}));return function(oe,ge){return J.apply(this,arguments)}}(),$=J=>{Wt=null,qe.debug("OT.Subscriber.onStreamRemoved");const q=we&&we.video();q&&q.stream===J&&we.destroyVideo(),vr(vn),this.trigger("streamRemoved",this)},G=J=>{xn!==J&&this.dispatchEvent(new Ke.VideoEnabledChangedEvent(J?"videoEnabled":"videoDisabled",{reason:J?"codecChanged":"codecNotSupported"})),xn=J},Y=J=>{we.setAudioBlockedUi(J);const q=vt&&vt.audioBlockedIndicator;q&&q.setAudioBlocked(J);const oe=vt&&vt.videoUnsupportedIndicator;oe&&oe.setVideoUnsupported(!J&&!xn)};this.on("audioBlocked",()=>{Y(!0)}),this.on("audioUnblocked",()=>{Y(!1)});const ee={new:S.SUBSCRIBER_DISCONNECTED,checking:S.SUBSCRIBER_DISCONNECTED,connected:S.SUBSCRIBER_CONNECTED,completed:S.SUBSCRIBER_CONNECTED,disconnected:S.SUBSCRIBER_DISCONNECTED},ae=(J,q)=>{const oe=ee[J],ge=q.getSourceStreamId();oe&&oe!==kn[ge]&&(kn[ge]=oe,"disconnected"===J&&"P2P"!==ge&&setTimeout((0,o.default)(i.default.mark(function Qe(){var Et;return i.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(Et=st._.isSocketReconnecting,"disconnected"!==kn[ge]||!Wn.is("connected")||Et()){ut.next=4;break}return ut.next=4,ot._.iceRestart("peer connection disconnected");case 4:case"end":return ut.stop()}},Qe)})),2e3),we&&we.loading(oe!==S.SUBSCRIBER_CONNECTED),qe.debug(`OT.Subscriber.connectionStateChanged to ${J}`),this.dispatchEvent(new Ke.ConnectionStateChangedEvent(oe,this)))},Ee=()=>{ar("Success")},je=()=>{ar("Failure",{reason:"ICEWorkflow",message:"OT.Subscriber PeerConnection 
1Error: The stream was unable to connect due to a network error. Make sure your connection isn't blocked by a firewall."})};jn={get:()=>Ye.getChannelsOfType("audio").length>0?Yt.getStyle("buttonDisplayMode"):"off",update(){const J=jn.get();vt&&(vt.muteButton.setDisplayMode(J),vt.backingBar.setMuteMode(J))}};const ct=J=>{let q,oe;we&&(J===ft.STREAM_LIMIT_EXCEEDED?(q="The stream was unable to connect.",oe="The limit for the number of media streams has been reached."):(q="The stream was unable to connect due to a network error.",oe=Bn?"Ensure you have a stable connection and try again.":"Make sure you have a stable network connection and that it isn't blocked by a firewall."),we.addError(q,oe))};function ht(J){Dn().forEach(function(){var q=(0,o.default)(i.default.mark(function oe(ge){return i.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,ge;case 2:Ce.sent.subscribeToVideo(!J);case 3:case"end":return Ce.stop()}},oe)}));return function(oe){return q.apply(this,arguments)}}()),we&&(we.audioOnly(J),we.showPoster(J)),rn&&rn.audioOnly(J)}Xt(this,{nameDisplayMode:"auto",buttonDisplayMode:"auto",audioLevelDisplayMode:"auto",videoDisabledDisplayMode:"auto",audioBlockedDisplayMode:"auto",backgroundImageURI:null,showArchiveStatus:!0,showMicButton:!0},_e.showControls,J=>{Ot("SetStyle","Subscriber",J,null,.1)});const gt=f(()=>{Ot("GetStats","Called")}),Ht=f(()=>{Ot("GetRtcStatsReport","Called")}),Jt=J=>{zn&&(zn.destroy(),zn=void 0),Wt.getAudioTracks().length&&(gn=En(J),gn?zn=P({subscriber:this,audioLevelSampler:gn}):Object.prototype.hasOwnProperty.call(this,"loudness")||(Object.defineProperty(this,"loudness",{value:void 0,configurable:!0,writable:!1}),qe.error("No suitable audio level samplers found, audio level visualisation will not work")))},Zt=(J,q)=>{if(Hn[q]){Hn[q].removeAll();const ge=()=>{J.off("error",ge),J.off("disconnected",ge)};J.on("error",ge),J.on("disconnected",ge)}const oe=C(J);oe.once("connected",()=>(J=>{st.sessionInfo.isAdaptiveEnabled&&"P2P"===J.getSourceStreamId()&&Un("Success")})(J)),oe.on("disconnected",Or),oe.on("error",Nr),oe.on("remoteStreamAdded",(0,o.default)(i.default.mark(function ge(){var Le=arguments;return i.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.prev=0,Qe.next=3,lr(...Le);case 3:Qe.next=8;break;case 5:Qe.prev=5,Qe.t0=Qe.catch(0),qe.error(Qe.t0);case 8:case"end":return Qe.stop()}},ge,null,[[0,5]])}))),oe.on("audioLevelStuckWarning",Pr),oe.on("remoteStreamRemoved",$),oe.on("signalingStateStable",(0,o.default)(i.default.mark(function ge(){return i.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:Yt.trigger("signalingStateStable"),we&&we.video()&&Wt&&gn&&"webRTCStream"in gn&&Wt.getAudioTracks().length>0&&gn.webRTCStream(Wt);case 3:case"end":return Qe.stop()}},ge)}))),oe.on("iceConnectionStateChange",ge=>ae(ge,J)),oe.on("iceRestartSuccess",Ee),oe.on("iceRestartFailure",je),oe.on("remoteVideoSupported",G),oe.once("remoteStreamAdded",Jt.bind(this,J)),Hn[q]=Hn};this._destroy=J=>{let q=J.reason,oe=void 0===q?"Unknown":q,ge=J.quiet,Le=J.noStateTransition,Ce=void 0!==Le&&Le;return yt.isDestroyed()||(yt.set("Destroyed"),An&&(An.destroy(),An=null),Ln={sessionId:st.sessionId,connectionId:st&&st.isConnected()?st.connection.connectionId:null,partnerId:st&&st.sessionInfo?st.sessionInfo.partnerId:null,streamId:Ye&&!Ye.destroyed?Ye.id:null},this._disconnect({reason:oe,noStateTransition:Ce}),vt&&(vt.destroy(),vt=null),we&&(we.destroy(),we.off(),we=null,this.element=null),Ye&&!Ye.destroyed&&Ot("unsubscribe",null,{streamId:Ye.id}),Ye.off(nr,this),this.id=null,ir=null,this.stream=null,Ye=null,this.streamId=null,this.session=null,st=null,_e=null,!0!==ge&&(this.dispatchEvent(new Ke.DestroyedEvent(S.SUBSCRIBER_DESTROYED,this,oe)),this.off())),this},this.destroy=function(J,q){void 0===J&&(J="Unsubscribe"),qe.warn("Subscriber#destroy is deprecated and will be removed. Please use Session#unsubscribe instead"),ot._destroy({reason:J,quiet:q})},this._disconnect=function(J){let q=void 0===J?{}:J,oe=q.reason,ge=void 0===oe?"Unknown":oe;if(!q.noStateTransition&&!wt.is("disconnected")){const Ce="Unsubscribe"===ge?void 0:At(Ut.STREAM_DESTROYED,new Error("Stream was destroyed before it could be subscribed to"));wt.disconnect({payload:{reason:ge},error:Ce})}!yt.isDestroyed()&&!yt.isFailed()&&yt.set("NotSubscribing"),we&&we.destroyVideo(),Dn().forEac
1h(function(){var Ce=(0,o.default)(i.default.mark(function Qe(Et){return i.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return ut.next=2,Et;case 2:ut.sent.destroy();case 3:case"end":return ut.stop()}},Qe)}));return function(Qe){return Ce.apply(this,arguments)}}()),Object.keys(On).forEach(Ce=>{delete On[Ce]}),Wn.is("connected")&&Ye&&!Ye.destroyed&&Wn.subscriberDestroy(Ye.id,ot.widgetId)},this.disconnect=()=>{qe.warn("Subscriber#disconnect is deprecated and will be removed. Please use Session#unsubscribe instead"),this._disconnect({reason:"Unsubscribe"})};const et=function(){var J=(0,o.default)(i.default.mark(function q(oe){var ge,Le,Ce,Qe,Et;return i.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return ge=oe.peerId,Le=oe.fromConnectionId,Ce=oe.sourceStreamId,Qe=["/v2/partner",(He={apiKey:st.apiKey,sessionId:st.sessionId,streamId:Ye.id,subscriberId:ot.widgetId}).apiKey,"session",He.sessionId,"stream",He.streamId,"subscriber",He.subscriberId].join("/"),Et=pn({socket:ot.session._.getSocket(),uri:Qe,content:{peerId:ge,sourceStreamId:Ce}}),jt.abrupt("return",ot._setupPeerConnection({send:Et,log:function(bt,yn,Mr,er,jr){void 0===er&&(er={});const Vr=(0,n.default)({peerId:ge,sourceStreamId:le(Ce)},er);return Ot(bt,yn,Mr,Vr,jr)},logQoS:_n=>{vn===Ce&&Dr((0,n.default)({},_n,{peerId:ge,remoteConnectionId:Le,sourceStreamId:Ce}))},sourceStreamId:Ce}));case 6:case"end":return jt.stop()}var He},q)}));return function(oe){return J.apply(this,arguments)}}();function Qt(J){const q=we&&we.video();if(q)try{q.setAudioVolume(J)}catch(oe){qe.warn(`setAudioVolume: ${oe}`),0===Kt&&(qe.info("Using subscribeToAudio to mute Audio because setAudioVolume(0) failed"),Yt.subscribeToAudio(!1))}vt&&vt.muteButton.muted(0===J)}this.processMessage=function(){var J=(0,o.default)(i.default.mark(function q(oe,ge,Le){var Ce,Qe,Et;return i.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return qe.debug(`OT.Subscriber.processMessage: Received ${oe} message from ${ge}`),qe.debug(Le),Ce=d(Le,"content.peerId"),Qe=d(Le,"content.sourceStreamId"),ut.next=6,or(Qe);case 6:if(!(Et=ut.sent)){ut.next=11;break}Et.processMessage(oe,Le),ut.next=16;break;case 11:if("offer"!==oe){ut.next=16;break}return ut.next=14,et({peerId:Ce,fromConnectionId:ge,sourceStreamId:Qe});case 14:ot.session._.addSubscriberToPeerConnectionsQueue(Et=ut.sent,Le);case 16:case"end":return ut.stop()}},q)}));return function(q,oe,ge){return J.apply(this,arguments)}}(),this.disableVideo=J=>{if(J){if("auto"!==Zn)return void qe.info("Video was not re-enabled because it was manually disabled");qe.info("Video has been re-enabled")}else qe.warn("Due to high packet loss and low bandwidth, video has been disabled");this.subscribeToVideo(J,"auto"),Ot("updateQuality","video",J?{videoEnabled:!0}:{videoDisabled:!0})},this.getImgData=()=>{if(!this.isSubscribing())return qe.error("OT.Subscriber.getImgData: Cannot getImgData before the Subscriber is subscribing."),null;const J=we&&we.video();return J?J.imgData():null},this.getStats=J=>{(J=>{yr(J)})((q,oe)=>{if(q)return void J(q);const ge={timestamp:0};oe.forEach(Le=>{if(Mt.isInboundStat(Le)){const Ce=Mt.isVideoStat(Le,oe),Qe=Mt.isAudioStat(Le,oe);(Qe||Ce)&&(ge.timestamp=Mt.normalizeTimestamp(Le.timestamp)),Ce?(a(ge,{video:Mt.parseStatCategory(Le)}),An&&a(ge,{video:{frameRate:An.getFrameRateFromStat(Le)}})):Qe&&a(ge,{audio:Mt.parseStatCategory(Le)})}}),J(null,ge)})},this.getRtcStatsReport=()=>new t((J,q)=>{(J=>{yr("rtcStatsReport",J)})((oe,ge)=>{oe?q(oe):J(ge)})}),this.setAudioVolume=J=>{const q=function ze(He){return Math.max(0,Math.min(100,parseInt(He,10)))}(J);return Ot("setAudioVolume","Attempt",{audioVolume:q}),isNaN(q)?(qe.error("OT.Subscriber.setAudioVolume: value should be an integer between 0 and 100"),Ot("setAudioVolume","Failure",{message:"value should be an integer between 0 and 100"}),this):(q!==J&&qe.warn("OT.Subscriber.setAudioVolume: value should be an integer between 0 and 100"),q===Kt?(Qt(Kt),Ot("setAudioVolume","Success",{audioVolume:Kt,message:"Requested volume is same as already set audioVolume"}),this):(Kt>0&&(Yn=Kt),Kt=q,Qt(Kt),Kt>0&&!Vn&&(Yn=Kt,this.subscribeToAudio(!0)),Ot("setAudioVolume","Success",{audioVolume:Kt}),this))},this.getAudioVolume=()=>{const J=we&&we.video();if(J)try{return J.getAudioVolume()}catch(q){qe.warn(`getAudioVolume ${q}`)}return Kt},this.subscribeToAudio=J=>{const q=y(J,!0);
1Dn().forEach(function(){var ge=(0,o.default)(i.default.mark(function Le(Ce){return i.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,Ce;case 2:Et.sent.subscribeToAudio(q);case 3:case"end":return Et.stop()}},Le)}));return function(Le){return ge.apply(this,arguments)}}()),Ye&&0!==Dn().length&&Ye.setChannelActiveState("audio",q);const oe=Vn!==q;return Vn=q,oe&&this.setAudioVolume(q?Yn:0),Ot("subscribeToAudio","Event",{subscribeToAudio:q}),this};const dr={auto:"quality",publishVideo:"publishVideo",subscribeToVideo:"subscribeToVideo"};if("Safari"===lt.name){const J=()=>{!cn.hidden&&_e.subscribeToVideo&&(qe.debug("document visibility restored in Safari - resubscribing to video"),this.subscribeToVideo(!1),this.subscribeToVideo(!0))};cn.addEventListener("visibilitychange",J),this.once("destroyed",()=>{cn.removeEventListener("visibilitychange",J)})}if(this.subscribeToVideo=(J,q)=>{const oe=y(J,!0);return Ot("subscribeToVideo","Attempt",{subscribeToVideo:oe,reason:q}),ht(!oe||!Ye.hasVideo||!(Wt&&Wt.getVideoTracks().length>0)),Ye.hasVideo&&Wt&&0===Wt.getVideoTracks().length?(oe&&qe.info("Subscriber is audio-only due to incompatibility, can't subscribeToVideo."),_e.subscribeToVideo=!1,Ot("subscribeToVideo","Failure",{message:"No video tracks available"}),this):(vt&&vt.videoDisabledIndicator&&vt.videoDisabledIndicator.disableVideo("auto"===q&&!oe),Dn().length>0&&st&&Ye&&(oe!==_e.subscribeToVideo||q!==Zn)&&Ye.setChannelActiveState("video",oe,q),_e.subscribeToVideo=oe,Zn=q,Ot("subscribeToVideo","Success",{subscribeToVideo:oe,reason:q}),"loading"!==q&&(this.dispatchEvent(new Ke.VideoEnabledChangedEvent(oe?"videoEnabled":"videoDisabled",{reason:dr[q]||"subscribeToVideo"})),"videoDisabled"===oe&&"auto"===q&&(Xn=2)),this)},this.setPreferredResolution=J=>{if(yt.isDestroyed()||0===Dn().length&&"Connecting"===!yt.current)return void qe.warn("Cannot set the max Resolution when not subscribing to a publisher");if(_e.preferredResolution=J,st.sessionInfo.p2pEnabled)return void qe.warn("OT.Subscriber.setPreferredResolution will not work in a P2P Session");if(!yt.isStreamAdded())return;const q=Ye.getPreferredResolution();q&&J&&q.width===J.width&&q.height===J.height||!q&&!J||Ye.setPreferredResolution(J)},this.setPreferredFrameRate=J=>{if(yt.isDestroyed()||0===Dn().length&&"Connecting"===!yt.current)return void qe.warn("Cannot set the max frameRate when not subscribing to a publisher");if(_e.preferredFrameRate=J,st.sessionInfo.p2pEnabled)return void qe.warn("OT.Subscriber.setPreferredFrameRate will not work in a P2P Session");const q=Ye.getPreferredFrameRate();J&&q&&q===J||!q&&!J||Ye.setPreferredFrameRate(J)},this.isSubscribing=()=>yt.isSubscribing(),this.isWebRTC=!0,this.isLoading=()=>we&&we.loading(),this.isAudioBlocked=()=>Boolean(we&&we.isAudioBlocked()),this.videoElement=()=>{const J=we&&we.video();return J?J.domElement():null},this.videoWidth=()=>{const J=we&&we.video();return J?J.videoWidth():void 0},this.videoHeight=()=>{const J=we&&we.video();return J?J.videoHeight():void 0},this._subscribeToSelf=(0,o.default)(i.default.mark(function J(){var q;return i.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if((q=st.getPublisherForStream(Ye))&&q._.webRtcStream()){ge.next=5;break}wt.fail({payload:{reason:"streamNotFound"},error:At(Ut.STREAM_DESTROYED,new Error("Tried to subscribe to a local publisher, but its stream no longer exists"))}),ge.next=14;break;case 5:return un.resolve(),ge.prev=6,ge.next=9,lr(q._.webRtcStream());case 9:ge.next=14;break;case 11:ge.prev=11,ge.t0=ge.catch(6),qe.error(ge.t0);case 14:case"end":return ge.stop()}},J,null,[[6,11]])})),this._setupPeerConnection=function(){var J=(0,o.default)(i.default.mark(function q(oe){var ge,Le,Ce,Qe;return i.default.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return ge=oe.send,Le=oe.log,Ce=oe.logQoS,Qe=oe.sourceStreamId,_e.testNetwork&&ot.setAudioVolume(0),0===Dn().length&&yt.set("Connecting"),vn=Qe,On[Qe]=new t((ut,Rn)=>{st._.getIceConfig().then(jt=>{jt.needRumorIceServersFallback&&(jt.servers=[...Gt||[],...jt.servers||[]]);const _n={iceConfig:jt,subscriberId:ot.widgetId,send:ge,logAnalyticsEvent:Le,p2p:st.sessionInfo.p2pEnabled,sourceStreamId:Qe};Object.prototype.hasOwnProperty.call(_e,"codecFlags")&&(_n.codecFlags=_e.codecFlags);const bt=new Kn.SubscriberPeerConnection(_n);bt.once("iceConnected",un.resolve),bt.once("error",un.reject),bt.on("qos",Ce),Zt(bt,Qe),bt.init(yn=>{yn?Rn(yn):ut(bt)})})}),_t.abrupt("return",On[Qe]);case 6:case"end":return _t.stop()}},q)}));return function(q){return J.apply(this,arguments)}}(),this.restrictFrameRate=J=>(qe.debug(`OT.Subscriber.restrictFrameRate(${J})`),Ot("restrictFrameRate",J.toString(),{streamId:Ye.id}),st.sessionInfo.p2pEnabled&&qe.warn("OT.Subscriber.restrictFrameRate: Cannot restrictFrameRate on a P2P session"),"boolean"!=typeof J?qe.error("OT.Subscriber.restrictFrameRate: expected a boolean value got a "+typeof J):(mn=J,Ye.setRestrictFrameRate(J)),this),this.on("styleValueChanged",(J,q)=>{if(vt)switch(J){case"nameDisplayMode":vt.name.setDisplayMode(q),vt.backingBar.setNameMode(q);break;case"videoUnsupportedDisplayMode":vt.videoUnsupportedIndicator.setDisplayMode(q);break;case"videoDisabledDisplayMode":vt.videoDisabledIndicator.setDisplayMode(q);break;
1case"audioBlockedDisplayMode":vt.audioBlockedIndicator.setDisplayMode(q);break;case"showArchiveStatus":vt.archive.setShowArchiveStatus(q);break;case"buttonDisplayMode":jn.update();break;case"audioLevelDisplayMode":vt.audioLevel.setDisplayMode(q);break;case"bugDisplayMode":break;case"backgroundImageURI":we.setBackgroundImageURI(q)}},this),this._={getDataChannel:(J,q,oe)=>(0,o.default)(i.default.mark(function ge(){return i.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(Pn()){Ce.next=3;break}return oe(new rt.Error("Cannot create a DataChannel before there is a publisher connection.")),Ce.abrupt("return");case 3:return Ce.next=5,Pn();case 5:Ce.sent.getDataChannel(J,q,oe);case 6:case"end":return Ce.stop()}},ge)}))(),iceRestart:J=>(0,o.default)(i.default.mark(function q(){var oe;return i.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.next=2,or("MANTIS");case 2:(oe=Le.sent)?(ar("Attempt",{reason:J}),qe.debug("Subscriber: iceRestart attempt"),oe.iceRestart()):qe.debug("Subscriber: Skipping ice restart, we have no peer connection");case 4:case"end":return Le.stop()}},q)}))(),unblockAudio:()=>we&&we.unblockAudio(),webRtcStream:()=>Wt,privateEvents:new m,startRoutedToRelayedTransition:()=>(0,o.default)(i.default.mark(function J(){var q;return i.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(!_e.testNetwork&&!De(Ye,st)){ge.next=2;break}return ge.abrupt("return");case 2:return Un("Attempt"),ge.next=5,or("MANTIS");case 5:if(null==(q=ge.sent)?void 0:q.iceConnectionStateIsConnected()){ge.next=9;break}return Un("Failure",{reason:"Attempted to transition to Relayed without being connected in Routed mode."}),ge.abrupt("return");case 9:Wn.subscriberCreate(Ye.id,bn,Lr,"P2P",(Le,Ce)=>{Le&&!wt.is("disconnected")&&Un("Failure",Le),qe.debug("message received when created a subscriber with source",Ce)});case 10:case"end":return ge.stop()}},J)}))(),startRelayedToRoutedTransition:()=>(0,o.default)(i.default.mark(function J(){var q;return i.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(!_e.testNetwork&&!De(Ye,st)){Le.next=2;break}return Le.abrupt("return");case 2:return Qn("Attempt"),Wt=q=Jn.MANTIS,Le.next=7,sr(q);case 7:return we.loading(!1),Ir("P2P"),vn="MANTIS",vr("P2P"),Le.next=13,Pn();case 13:Jt(Le.sent),Qn("Success");case 16:case"end":return Le.stop()}},J)}))(),setSinkId(J){if(we&&we.video())return we.setSinkId(J);qe.debug("Called setAudioOutputDevice on a subscriber without a video element")},pauseAndPlayVideoElement(){we&&we.pauseAndPlayVideoElement()}},yt=new Ae(J=>{qe.error("OT.Subscriber State Change Failed: ",J.message),qe.debug(J)}),qe.debug(`OT.Subscriber: subscribe to ${Ye.id}`),yt.set("Init"),!Ye)return qe.error("OT.Subscriber: No stream parameter."),!1;nr={updated:J=>{const q=we&&we.video();switch(J.changedProperty){case"videoDimensions":if(!q)break;q.orientation({width:J.newValue.width,height:J.newValue.height,videoOrientation:J.newValue.orientation}),this.dispatchEvent(new Ke.VideoDimensionsChangedEvent(this,J.oldValue,J.newValue));break;case"videoDisableWarning":vt&&vt.videoDisabledIndicator.setWarning(J.newValue),this.dispatchEvent(new Ke.VideoDisableWarningEvent(J.newValue?"videoDisableWarning":"videoDisableWarningLifted")),Xn="videoDisableWarning"===J.newValue?1:null;break;case"hasVideo":ht(!Ye.hasVideo||!_e.subscribeToVideo),"Safari"===lt.name&&!Ye.hasVideo&&we&&we.bindAudioTrackOnly(),this.dispatchEvent(new Ke.VideoEnabledChangedEvent(Ye.hasVideo?"videoEnabled":"videoDisabled",{reason:"publishVideo"}));break;case"hasAudio":jn.update()}}},Ye.on(nr,this),_e.name=_e.name||Ye.name,_e.classNames="OT_root OT_subscriber",_e.style&&this.setStyle(_e.style,null,!0),Yn=100,_e.subscribeToVideo=y(_e.subscribeToVideo,!0),_e.subscribeToAudio=y(_e.subscribeToAudio,!0),this.subscribeToAudio(_e.subscribeToAudio),this.setAudioVolume(function tt(He){return void 0!==He.audioVolume?He.audioVolume:!1===He.subscribeToAudio?0:100}(_e)),we=new Kn.WidgetView($n,(0,n.default)({},_e,{widgetType:"subscriber"})),we.on("error",Fn),we.on("audioBlocked",()=>this.trigger("audioBlocked")),we.on("audioUnblocked",()=>this.trigger("audioUnblocked")),this.id=we.domId(),ir=we.domId(),this.element=we.domElement,we.on("videoElementCreated",J=>{const q=new Ke.VideoElementCreatedEvent(J),oe=this;rr?this.dispatchEvent(q):this.once("loaded",()=>{oe.dispatchEvent(q)})}),this.element&&(()=>
1{const J={backingBar:new xt({nameMode:_e.name?this.getStyle("nameDisplayMode"):"off",muteMode:jn.get()}),name:new Mn({name:_e.name,mode:this.getStyle("nameDisplayMode")}),muteButton:new hn({muted:0===Kt,mode:jn.get()})};if(hr){const q=new Nt;rn=new Se({mode:Yt.getStyle("audioLevelDisplayMode")});const oe=new O(()=>{rn.setValue(q.transform(this.loudness))});rn.watchVisibilityChanged(ge=>{ge?oe.start():oe.stop()}),rn.setDisplayMode(this.getStyle("audioLevelDisplayMode")),rn.audioOnly(!1),J.audioLevel=rn}J.videoDisabledIndicator=new Xe({mode:this.getStyle("videoDisabledDisplayMode")}),J.audioBlockedIndicator=new Lt({mode:this.getStyle("audioBlockedDisplayMode")}),J.videoUnsupportedIndicator=new Ft({mode:this.getStyle("videoUnsupportedDisplayMode")}),we&&we.domElement&&(vt=new sn({parent:we.domElement}).set(J).on({muted(){Yt.setAudioVolume(0)},unmuted(){Yt.setAudioVolume(Yn)}},this),vt.hideWhileLoading())}).call(this);const wr=Ye.getChannelsOfType("audio"),Ur=Ye.getChannelsOfType("video"),Lr=wr.map(J=>({id:J.id,type:J.type,active:_e.subscribeToAudio})).concat(Ur.map(J=>{const q={id:J.id,type:J.type,active:_e.subscribeToVideo,restrictFrameRate:void 0!==_e.restrictFrameRate&&_e.restrictFrameRate};return void 0!==_e.preferredFrameRate&&(q.preferredFrameRate=parseFloat(_e.preferredFrameRate)),void 0!==_e.preferredHeight&&(q.preferredHeight=parseInt(_e.preferredHeight,10)),void 0!==_e.preferredWidth&&(q.preferredWidth=parseInt(_e.preferredWidth,10)),q})),Fr=!_e.testNetwork&&De(Ye,st);return wt.beginConnect(),Fr?(this._subscribeToSelf(),this):(Wn.subscriberCreate(Ye.id,bn,Lr,null,(J,q)=>{J&&!wt.is("disconnected")&&Ar(J),Gt=Tn(q)}),this)};return $e.hasAudioOutputLevelStatCapability=void 0===Je?M:Je,$e.WidgetView=Rr,$e.SubscriberPeerConnection=ce,$e}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(2);l.exports=()=>["Chrome","Opera","Safari"].indexOf(t.name)>-1},function(l,E,e){"use strict";const r=e(2).name;l.exports=()=>["Firefox","Safari","Edge","Chrome","Opera"].indexOf(r)>-1},function(l,E,e){"use strict";const o=e(160)()("NotSubscribing",["NotSubscribing","Init","Connecting","BindingRemoteStream","Subscribing","Failed","Destroyed"],{NotSubscribing:["NotSubscribing","Init","Destroyed"],Init:["NotSubscribing","Connecting","BindingRemoteStream","Destroyed"],Connecting:["NotSubscribing","BindingRemoteStream","Failed","Destroyed"],BindingRemoteStream:["NotSubscribing","Subscribing","Failed","Destroyed","BindingRemoteStream"],Subscribing:["NotSubscribing","Failed","Destroyed","BindingRemoteStream"],Failed:["Destroyed"],Destroyed:[]});o.prototype.isDestroyed=function(){return"Destroyed"===this.current},o.prototype.isFailed=function(){return"Failed"===this.current},o.prototype.isSubscribing=function(){return"Subscribing"===this.current},o.prototype.isAttemptingToSubscribe=function(){return-1!==["Init","Connecting","BindingRemoteStream"].indexOf(this.current)},o.prototype.isStreamAdded=function(){return"BindingRemoteStream"===this.current||this.isSubscribing()},l.exports=o},function(l,E,e){"use strict";var r=e(3)(e(25));l.exports=n=>{let i=n.socket,o=n.uri,s=n.content;return(a,c)=>i.send({uri:o,method:a,content:(0,r.default)({},s,c)})}},function(l,E,e){l.exports=function(t){var r={};function n(i){if(r[i])return r[i].exports;var o=r[i]={i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=r,n.i=function(i){return i},n.d=function(i,o,s){n.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(o,"a",o),o},n.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},n.p="",n(n.s=5)}([function(t,r,n){"use strict";t.exports=function(i,o){var s,a,c;for(s=1;s<arguments.length;s++)for(c in a=arguments[s])a.hasOwnProperty(c)&&(i[c]=a[c]);return i}},function(t,r,n){"use strict";var i=n(0);t.exports={build:function(o,s){var a,c,u,d=s.plugins;for(a=0,c=d.length;a<c;a++)(u=d[a]).methods&&i(o,u.methods),u.properties&&Object.defineProperties(o,u.properties)},hook:function(o,s,a){var c,u,d,h=o.config.plugins,g=[o.context];for(a&&(g=g.concat(a)),c=0,u=h.length;c<u;c++)(d=h[c][s])&&d.apply(h[c],g)}}},function(t,r,n){"use strict";function i(o){if(0===o.length)return o;var s,a,u=o.split(/[_-]/);if(1===u.length&&u[0][0].toLowerCase()===u[0][0])return o;for(a=u[0].toLowerCase(),s=1;s<u.length;s++)a=a+u[s].charAt(0).toUpperCase()+u[s].substring(1).toLowerCase();return a}i.prepended=function(o,s){return o+(s=i(s))[0].toUpperCase()+s.substring(1)},t.exports=i},function(t,r,n){"use strict";var i=n(0),o=n(2);function s(a,c){this.options=a=a||{},this.defaults=c.defaults,this.states=[],this.transitions=[],this.map={},this.lifecycle=this.configureLifecycle(),this.init=this.configureInitTransition(a.init),this.data=this.configureData(a.data),this.methods=this.configureMethods(a.methods),this.map[this.defaults.wildcard]={},this.configureTransitions(a.transitions||[]),this.plugins=this.configurePlugins(a.plugins,c.plugin)}
vendor: 4,815 bytes, line 1
1i(s.prototype,{addState:function(a){this.map[a]||(this.states.push(a),this.addStateLifecycleNames(a),this.map[a]={})},addStateLifecycleNames:function(a){this.lifecycle.onEnter[a]=o.prepended("onEnter",a),this.lifecycle.onLeave[a]=o.prepended("onLeave",a),this.lifecycle.on[a]=o.prepended("on",a)},addTransition:function(a){this.transitions.indexOf(a)<0&&(this.transitions.push(a),this.addTransitionLifecycleNames(a))},addTransitionLifecycleNames:function(a){this.lifecycle.onBefore[a]=o.prepended("onBefore",a),this.lifecycle.onAfter[a]=o.prepended("onAfter",a),this.lifecycle.on[a]=o.prepended("on",a)},mapTransition:function(a){var c=a.name,u=a.from,d=a.to;return this.addState(u),"function"!=typeof d&&this.addState(d),this.addTransition(c),this.map[u][c]=a,a},configureLifecycle:function(){return{onBefore:{transition:"onBeforeTransition"},onAfter:{transition:"onAfterTransition"},onEnter:{state:"onEnterState"},onLeave:{state:"onLeaveState"},on:{transition:"onTransition"}}},configureInitTransition:function(a){return"string"==typeof a?this.mapTransition(i({},this.defaults.init,{to:a,active:!0})):"object"==typeof a?this.mapTransition(i({},this.defaults.init,a,{active:!0})):(this.addState(this.defaults.init.from),this.defaults.init)},configureData:function(a){return"function"==typeof a?a:"object"==typeof a?function(){return a}:function(){return{}}},configureMethods:function(a){return a||{}},configurePlugins:function(a,c){var u,d,f;for(u=0,d=(a=a||[]).length;u<d;u++)"function"==typeof(f=a[u])&&(a[u]=f=f()),f.configure&&f.configure(this);return a},configureTransitions:function(a){var c,u,d,f,h,g=this.defaults.wildcard;for(u=0;u<a.length;u++)for(d=a[u],f=Array.isArray(d.from)?d.from:[d.from||g],h=d.to||g,c=0;c<f.length;c++)this.mapTransition({name:d.name,from:f[c],to:h})},transitionFor:function(a,c){return this.map[a][c]||this.map[this.defaults.wildcard][c]},transitionsFor:function(a){var c=this.defaults.wildcard;return Object.keys(this.map[a]).concat(Object.keys(this.map[c]))},allStates:function(){return this.states},allTransitions:function(){return this.transitions}}),t.exports=s},function(t,r,n){var i=n(0),o=n(6),s=n(1),a=[null,[]];function c(u,d){this.context=u,this.config=d,this.state=d.init.from,this.observers=[u]}i(c.prototype,{init:function(u){if(i(this.context,this.config.data.apply(this.context,u)),s.hook(this,"init"),this.config.init.active)return this.fire(this.config.init.name,[])},is:function(u){return Array.isArray(u)?u.indexOf(this.state)>=0:this.state===u},isPending:function(){return this.pending},can:function(u){return!this.isPending()&&!!this.seek(u)},cannot:function(u){return!this.can(u)},allStates:function(){return this.config.allStates()},allTransitions:function(){return this.config.allTransitions()},transitions:function(){return this.config.transitionsFor(this.state)},seek:function(u,d){var f=this.config.defaults.wildcard,h=this.config.transitionFor(this.state,u),g=h&&h.to;return"function"==typeof g?g.apply(this.context,d):g===f?this.state:g},fire:function(u,d){return this.transit(u,this.state,this.seek(u,d),d)},transit:function(u,d,f,h){var g=this.config.lifecycle,v=this.config.options.observeUnchangedState||d!==f;return f?this.isPending()?this.context.onPendingTransition(u,d,f):(this.config.addState(f),this.beginTransit(),h.unshift({transition:u,from:d,to:f,fsm:this.context}),this.observeEvents([this.observersForEvent(g.onBefore.transition),this.observersForEvent(g.onBefore[u]),v?this.observersForEvent(g.onLeave.state):a,v?this.observersForEvent(g.onLeave[d]):a,this.observersForEvent(g.on.transition),v?["doTransit",[this]]:a,v?this.observersForEvent(g.onEnter.state):a,v?this.observersForEvent(g.onEnter[f]):a,v?this.observersForEvent(g.on[f]):a,this.observersForEvent(g.onAfter.transition),this.observersForEvent(g.onAfter[u]),this.observersForEvent(g.on[u])],h)):this.context.onInvalidTransition(u,d,f)},beginTransit:function(){this.pending=!0},endTransit:function(u){return this.pending=!1,u},failTransit:function(u){throw this.pending=!1,u},doTransit:function(u){this.state=u.to},observe:function(u){if(2===u.length){var d={};d[u[0]]=u[1],this.observers.push(d)}else this.observers.push(u[0])},observersForEvent:function(u){for(var h,d=0,f=this.observers.length,g=[];d<f;d++)(h=this.observers[d])[u]&&g.push(h);return[u,g,!0]},observeEvents:function(u,d,f,h){if(0===u.length)return this.endTransit(void 0===h||h);var g=u[0][0],v=u[0][1],m=u[0][2];if(d[0].event=g,g&&m&&g!==f&&s.hook(this,"lifecycle",d),0===v.length)return u.shift(),this.observeEvents(u,d,g,h);var p=v.shift(),y=p[g].apply(p,d);return y&&"function"==typeof y.then?y.then(this.observeEvents.bind(this,u,d,g)).catch(this.failTransit.bind(this)):!1===y?this.endTransit(!1):this.observeEvents(u,d,g,y)},onInvalidTransition:function(u,d,f){throw new o("transition is invali
1d in current state",u,d,f,this.state)},onPendingTransition:function(u,d,f){throw new o("transition is invalid while previous transition is still in progress",u,d,f,this.state)}}),t.exports=c},function(t,r,n){"use strict";var i=n(0),o=n(2),s=n(1),a=n(3),c=n(4),u={is:function(m){return this._fsm.is(m)},can:function(m){return this._fsm.can(m)},cannot:function(m){return this._fsm.cannot(m)},observe:function(){return this._fsm.observe(arguments)},transitions:function(){return this._fsm.transitions()},allTransitions:function(){return this._fsm.allTransitions()},allStates:function(){return this._fsm.allStates()},onInvalidTransition:function(m,p,y){return this._fsm.onInvalidTransition(m,p,y)},onPendingTransition:function(m,p,y){return this._fsm.onPendingTransition(m,p,y)}},d={state:{configurable:!1,enumerable:!0,get:function(){return this._fsm.state},set:function(m){throw Error("use transitions to change state")}}};function f(m){return g(this||{},m)}function g(m,p){return v(m,new a(p,f)),m._fsm(),m}function v(m,p){if("object"!=typeof m||Array.isArray(m))throw Error("StateMachine can only be applied to objects");s.build(m,p),Object.defineProperties(m,d),i(m,u),i(m,p.methods),p.allTransitions().forEach(function(y){m[o(y)]=function(){return this._fsm.fire(y,[].slice.call(arguments))}}),m._fsm=function(){this._fsm=new c(this,p),this._fsm.init(arguments)}}f.version="3.0.1",f.factory=function h(){var m,p;"function"==typeof arguments[0]?(m=arguments[0],p=arguments[1]||{}):(m=function(){this._fsm.apply(this,arguments)},p=arguments[0]||{});var y=new a(p,f);return v(m.prototype,y),m.prototype._fsm.config=y,m},f.apply=g,f.defaults={wildcard:"*",init:{name:"init",from:"none"}},t.exports=f},function(t,r,n){"use strict";t.exports=function(i,o,s,a,c){this.message=i,this.transition=o,this.from=s,this.to=a,this.current=c}}])},function(l,E,e){"use strict";const t=e(102)();l.exports=t},function(l,E,e){"use strict";(function(t){l.exports=function(n){return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return new t((c,u)=>{n(...s,function(d){if(d)u(d);else{for(var f=arguments.length,h=new Array(f>1?f-1:0),g=1;g<f;g++)h[g-1]=arguments[g];c(1!==h.length?h:h[0])}})})}}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(15),r=e(9),n=e(681),i=e(682);l.exports=function(s){void 0===s&&(s={});const a=s.Errors||e(4),c=s.ExceptionCodes||e(8),u=s.logging||e(1)("publisherInit"),d=s.otError||e(11)(),f=s.OTHelpers||e(5),h=s.Publisher||e(168)(),g=s.sessionObjects||e(20);return function(m,p,y){let S;u.debug(`OT.initPublisher(${m})`),"string"==typeof m&&!document.getElementById(m)&&(m=p,p=y,y=arguments[3]),"function"==typeof m?(y=m,p=void 0,m=void 0):r(m)&&!f.isElementNode(m)&&(y=p,p=m,m=void 0),"function"==typeof p&&(y=p,p=void 0),p&&(r(p)?!1===p.insertDefaultUI&&m?S="You cannot specify a target element if insertDefaultUI is false":n(p.audioSource)&&n(p.videoSource)&&(S="You cannot specify both audioSource and videoSource as null or false"):(S="properties argument to Publisher constructor, if provided, should be an object",p=void 0)),i(p);const T=new h(p||{});g.publishers.add(T);const b=function(){y&&t(y)&&(y(...arguments),y=void 0)};void 0!==S&&(u.error(S),b(d(a.INVALID_PARAMETER,new Error(S),c.INVALID_PARAMETER)));const O=function(I){T.off("publishComplete",C),b(I)};let C=function(I){T.off("initSuccess",O),I&&b(I)};return T.once("initSuccess",O),T.once("publishComplete",C),T.publish(m),T}}},function(l,E,e){"use strict";(function(t){var n=e(3)(e(25));const i=e(41),o=e(683),s=e(9),a=e(15),c=e(7),u=e(26),d=e(6),f=e(27),h=e(44)(),g=e(74),v=e(307),m=e(685),p=e(686),S=e(138).prependProxyToUrlIfNeeded,b=e(139).getProxyUrl;l.exports=function(C){void 0===C&&(C={});const R=C.adaptIceServers||e(100).adaptIceServers,I=C.AnalyticsHelper||f,A=C.APIKEY||e(72),P=C.Capabilities||e(169),x=C.convertAnvilErrorCode||e(687),D=C.convertRumorError||e(310),L=C.Errors||e(4),N=C.Events||e(22)(),U=C.Stream||e(170),B=C.ExceptionCodes||e(8),V=C.hasIceRestartsCapability||e(311),H=C.logging||e(1)("Session"),j=C.otError||e(11)(),M=C.OTErrorClass||e(21),F=C.OTHelpers||e(5),z=e(688),w=C.StaticConfig||h,k=C.staticConfig||w.onlyLocal(),W=C.Publisher||e(168)(),Z=C.RaptorSocket||e(689).default(),ie=C.SessionDispatcher||e(318),_=C.sessionObjects||e(20),se=C.sessionTag||e(317),pe=C.socketCloseCodes||e(76),ue=C.Subscriber||e(300)(),me=C.systemRequirements||e(152),ve=C.uuid||e(19),Re=p({otError:j}),Me=C.global||(void 0!==typeof window?window:global),Q=C.getSessionInfo||e(713)(),K=e(141),re=C.initPublisher||e(308)({Publisher:W});return function(xe,ke,X){var te=this;let le=void 0===X?{}:X,be=le.iceConfig,De=le.connectionEventsSuppressed,he=le.ipWhitelist,Ze=void 0!==he&&he;const ze=b(),tt=new I,He=ne=>"string"==typeof ne?this.streams.get(ne)||{id:ne}:ne;d(this),this._tag=se,me.check()||me.upgrade(),null==ke&&(ke=xe,xe=null),Re(be),this.id=ke,this.sessionId=ke;let Ne,Ge,St,Se,nt,Nt,on,xt,Te=!0,sn=!1,Vt=xe;const lt=this;let qt=ke,Ut=ve(),Dt=ve(),Ke=H,Ct=!1;
1const ft=[];let En,en,Mt,Je,Pt=null;const $t=F.statable(this,["disconnected","connecting","connected","disconnecting"],"disconnected");this.connection=null,this.connections=new F.Collection,this.streams=new F.Collection,this.archives=new F.Collection;const Be=function(ce){$t("disconnected"),ce.code||(ce.code=B.CONNECT_FAILED),Ke.error(`${ce.name||"Unknown Error"}: ${ce.message}`),M.handleJsException({error:ce,target:this,analytics:tt}),this.trigger("sessionConnectFailed",ce)},dn=function(ce){sn=!1;const fe=ce.reason;this.logEvent("Connect","Disconnected",{reason:ce.reason});const Ae=new N.SessionDisconnectEvent("sessionDisconnected",fe.replace("networkTimedout","networkDisconnected"));this.isConnected()&&this.disconnect(),en(),En.call(this,fe),setTimeout(()=>{this.dispatchEvent(Ae),Mt.call(this,Ae.reason),Ae.isDefaultPrevented()||Je.call(this,Ae.reason)})},tn=function(ce){De||ce.id.match(/^symphony\./)||this.dispatchEvent(new N.ConnectionEvent(u.CONNECTION_CREATED,ce))},it=function(ce,fe){ce.id.match(/^symphony\./)||Ne&&ce.id===Ne.id()||this.dispatchEvent(new N.ConnectionEvent(u.CONNECTION_DESTROYED,ce,fe))},Nn=function(ce){ce&&ce.connection&&(!this.connection||ce.connection.id!==this.connection.id)&&this.dispatchEvent(new N.StreamEvent(u.STREAM_CREATED,ce,null,!1))},qe=function(ce){const Ae=ce.changedProperty;let Fe=ce.newValue;"videoDisableWarning"===Ae||"audioDisableWarning"===Ae||("videoDimensions"===Ae&&(Fe={width:Fe.width,height:Fe.height}),this.dispatchEvent(new N.StreamPropertyChangedEvent(u.STREAM_PROPERTY_CHANGED,ce.target,Ae,ce.oldValue,Fe)))},fn=function(ce,fe){void 0===fe&&(fe="clientDisconnected");const Ae=new N.StreamEvent("streamDestroyed",ce,fe,!0);ce.connection.id===this.connection.id?_.publishers.where({streamId:ce.id}).forEach(function(Xe){Xe._.unpublishStreamFromSession(ce,this,fe)},this):this.dispatchEvent(Ae),(()=>{_.subscribers.where({streamId:ce.id}).filter(Xe=>Xe.session.id===this.id&&Xe.stream).forEach(Xe=>{Xe._disconnect({reason:fe}),Ae.isDefaultPrevented()||Xe._destroy({reason:fe,noStateTransition:!0})})})()},hn=function(ce){this.dispatchEvent(new N.ArchiveEvent("archiveStarted",ce))},an=function(ce){this.dispatchEvent(new N.ArchiveEvent("archiveDestroyed",ce))},Mn=function(ce){this.dispatchEvent(new N.ArchiveEvent("status"===ce.changedProperty&&"stopped"===ce.newValue?"archiveStopped":"archiveUpdated",ce.target))},In=()=>_.subscribers.forEach(ne=>ne._.pauseAndPlayVideoElement()),At=function(){lt.token=null,St=null,$t("disconnected"),Ne=null,Ge&&(Ge.stop(),Ge=null),lt.connection=null,lt.capabilities=new P([]),lt.connections.destroy(),lt.streams.destroy(),lt.archives.destroy()};en=function(){Dt=ve(),At()},En=function(ce){_.publishers.where({session:this}).forEach(fe=>{fe.disconnect(ce)}),_.subscribers.where({session:this}).forEach(fe=>{fe._disconnect()})},Mt=function(ce){_.publishers.where({session:this}).forEach(fe=>{fe._.streamDestroyed(ce)})},Je=function(ce){_.subscribers.where({session:this}).forEach(fe=>{fe._destroy({reason:ce})})};const ye=function(){Ke.debug("OT.Session: connecting to Raptor");const ce=S(this.sessionInfo.messagingURL,ze);Ne=new Z(Dt,Ut,ce,this.sessionInfo.symphonyAddress,ie(this,{connectionEventsSuppressed:De}),tt,["forceMute","adaptive"]),Ne.connect(St,this.sessionInfo,{connectionEventsSuppressed:De},(Fe,Xe)=>{if(Fe){const Lt={};let It;if("ConnectToSession"===Fe.reason||"GetSessionState"===Fe.reason){const pt=D(Fe);c(Lt,{originalMessage:Fe.message,originalCode:Fe.code}),Fe.code=pt.code,Fe.message=pt.message}(Fe.code||Fe.message||Fe.reason)&&(It={failureCode:Fe.code,failureMessage:Fe.message,failureReason:Fe.reason,socketId:Ne.socketId}),Ne=null,this.logConnectivityEvent("Failure",Lt,It);const Ft=function Ae(Fe,Xe){let Rt;switch(Fe){case"WebSocketConnection":if(Rt=o(pe.codes,Lt=>Lt===Xe),Rt)return L[`SOCKET_${Rt}`];break;case"ConnectToSession":case"GetSessionState":switch(Xe){case B.CONNECT_FAILED:return L.CONNECT_FAILED;case B.UNEXPECTED_SERVER_RESPONSE:return L.UNEXPECTED_SERVER_RESPONSE;case B.CONNECTION_LIMIT_EXCEEDED:return L.CONNECTION_LIMIT_EXCEEDED}}}(Fe.reason,Fe.code);return Ft&&(Fe=j(Ft,new Error(Fe.message),Fe.code)),void Be.call(this,Fe)}Ke.debug("OT.Session: Received session state from Raptor",Xe),this.connection=this.connections.get(Ne.id()),this.connection&&(this.capabilities=this.connection.permissions),$t("connected"),this.logConnectivityEvent("Success",{connectionId:this.connection.id}),this.connection.on("destroyed",dn,this),this.dispatchEvent(new N.SessionConnectEvent(u.SESSION_CONNECTED)),this.connections.on({add:tn,remove:it},this),this.streams.on({add:Nn,remove:fn,update:qe},this),this.archives.on({add:hn,remove:an,update:Mn},this),this.connections._triggerAddEvents(),this.streams._triggerAddEvents(),this.archives._triggerAddEvents(),F.env.isiOS&&F.env.iOSVersion>=13.3&&this.on("gsmCallEnded",In)})},Ie=ne=>this.capabilities.permittedTo(ne),Ve=(ne,ce)=>{H.error(`${ne.name}: ${ne.message}`),"function"==typeof ce&&ce(ne),M.handleJsException({error:ne,target:this,analytics:tt})},rt=ne=>{const ce=j(ne.code,new Error(ne.message),ne.exceptionCode);return Ve(ce),ce},at=()=>this.isNot("connected")?rt(z.NOT_CONNECTED):Ie("forceMute")?null:rt(z.PERMISSION_DENIED),Xt=ne=>rt("404"===ne.code?z.NOT_FOUND:"403"===ne.code?z.PERMISSION_DENIED:z.UNEXPECTED_SERVER_RESPONSE);this.reportIssue=ne=>{let ce=ne.id;return v(tt.logEvent.bind(tt))({action:"ReportIssue",variation:"Event",connectionId:Dt,payload:{reportIssueId:ce}},null)},this.logEvent=function(ne,ce,fe,Ae){let Fe={action:ne,variation:ce,payload:fe,sessionId:qt,messagingServer:nt,p2p:Se,partnerId:Vt,connectionId:Dt};Ae&&(Fe=c(Ae,Fe)),tt.logEvent(Fe)},this.logConfigurationFileEvent=function(ne,ce,fe){if(void 0===ce&&(ce=null),void 0===fe&&(fe={}),"Attempt"===ne)on=(new Date).getTime();else if("Failure"===ne||"Success"===ne){const Ae=(new Date).getTime()-on;c(fe,{attemptDuration:Ae})}ze&&(fe.proxyUrl=ze),this.logEvent("ConfigurationFile",ne,ce,(0,n.default)({},fe))},this.logConnectivityEvent=function(ne,ce,fe){if(void 0===ce&&(ce=null),void 0===fe&&(fe={}),ze&&(fe.proxyUrl=ze),"Attempt"===ne&&(Ge&&(Ge.stop(),H.error("_connectivityAttemptPinger should have been cleaned up")),Nt=(new Date).getTime(),Ge=new g(()=>{this.logEvent("Connect","Attempting",ce,(0,n.default)({},fe))},.2,6),Ge.start()),"Failure"===ne||"Success"===ne||"Cancel"===ne){const Ae=Fe=>{Ge&&(Ge.stop(),Ge=void 0),this.logEvent("Connect",ne,ce,(0,n.default)({},fe,{attemptDuration:(new Date).getTime()-Nt,iceConfig:Fe,ipWhitelist:Ze}))};"Success"===ne?this._.getIceConfig().then(Fe=>{const Xe={includeServers:be&&be.includeServers||"all",transportPolicy:Fe.transportPolicy};Xe.servers=Fe.servers?Fe.servers.map(Rt=>({url:Rt.urls})):[],Ae(Xe)}):Ae()}else this.logEvent("Connect",ne,ce,fe)},this.connect=function(){let ne;for(var ce=arguments.length,fe=new Array(ce),Ae=0;Ae<ce;
1Ae++)fe[Ae]=arguments[Ae];fe.length>1&&("string"==typeof fe[0]||"number"==typeof fe[0])&&"string"==typeof fe[1]?(null==xe&&(Vt=fe[0].toString()),ne=fe[1]):ne=fe[0];const Fe=fe[fe.length-1];if(te.is("connecting","connected"))return Ke.warn(`OT.Session: Cannot connect, the session is already ${te.state}`),te;tt.sessionInfo=new K,At(),$t("connecting");const Xe=Dt;function Rt(){const pt=Dt!==Xe;return pt&&H.debug("Connection was interrupted"),pt}if(te.token=!a(ne)&&ne,St=!a(ne)&&ne,Te?Te=!1:Ut=ve(),Fe&&a(Fe)){let pt;const Sn=function(){pt();for(var mt=arguments.length,Tn=new Array(mt),Tt=0;Tt<mt;Tt++)Tn[Tt]=arguments[Tt];Fe(void 0,...Tn)},Bt=function(){pt(),Fe(...arguments)};pt=()=>{te.off("sessionConnected",Sn),te.off("sessionConnectFailed",Bt)},te.once("sessionConnected",Sn),te.once("sessionConnectFailed",Bt)}if(null==Vt||a(Vt))return setTimeout(Be.bind(te,j(L.AUTHENTICATION_ERROR,new Error("API Key is undefined. You must pass an API Key to initSession."),B.AUTHENTICATION_ERROR))),te;if(!qt||s(qt)||Array.isArray(qt)){let pt;return qt?(pt="SessionID is not a string. You must use string as the session ID passed into OT.initSession().",qt=qt.toString()):pt="SessionID is undefined. You must pass a sessionID to initSession.",setTimeout(Be.bind(te,j(L.INVALID_SESSION_ID,new Error(pt),B.INVALID_SESSION_ID))),te.logConnectivityEvent("Attempt"),te.logConnectivityEvent("Failure",null,{failureReason:"ConnectToSession",failureCode:B.INVALID_SESSION_ID,failureMessage:pt}),te}te.apiKey=Vt.toString(),Vt=Vt.toString(),0===A.value.length&&(A.value=Vt);const Lt=Boolean(w.onlyLocal().configUrl),It=!0===Ze&&Boolean(w.onlyLocal().ipWhitelistConfigUrl);return Lt||It?te.logConfigurationFileEvent("Attempt"):te.logConfigurationFileEvent("Event",{message:"No configUrl, using local config only"}),(Lt||It?w.get({partnerId:Vt,token:ne,useIpWhitelistConfigUrl:It,proxyUrl:ze}):t.resolve(w.onlyLocal())).then(pt=>((Lt||It)&&te.logConfigurationFileEvent("Success"),pt),pt=>((Lt||It)&&te.logConfigurationFileEvent("Failure",{failureMessage:pt.message,failureStack:pt.stack}),w.onlyLocal())).then(pt=>{if(te.staticConfig=pt,tt.staticConfig=pt,!1===pt.apiEnabled)throw j(L.API_KEY_DISABLED,new Error("The API KEY has been disabled. Access to the service is currently being restricted. Please contact support."));if(Rt())return;te.logConnectivityEvent("Attempt"),ze?te.logEvent("SessionInfo","Attempt",null,{proxyUrl:ze}):te.logEvent("SessionInfo","Attempt");const Sn=mt=>{mt.code=x(mt.code),te.logConnectivityEvent("Failure",null,{failureReason:"GetSessionInfo",failureCode:mt.code||"No code",failureMessage:mt.message,failureName:mt.name}),mt.name&&(mt=j(mt.name,new Error(`${mt.message}${mt.code?` (${mt.code})`:""}`),mt.code)),Be.call(te,mt)},pn=S(pt.apiUrl,ze);return Q({anvilUrl:pn,sessionId:ke,token:St,connectionId:Dt,clientVersion:pt.clientVersion}).then(mt=>{if(Rt())return;if(mt.partnerId&&mt.partnerId!==Vt)return void Sn(j(L.AUTHENTICATION_ERROR,new Error("Authentication Error: The API key does not match the token or session."),B.AUTHENTICATION_ERROR));tt.sessionInfo=mt;const Tn={features:{reconnection:mt.reconnection,renegotiation:V()&&mt.renegotiation,simulcast:void 0!==mt.simulcast&&mt.simulcast&&"Chrome"===F.env.name}};if(ze&&(Tn.proxyUrl=ze),te.is("connecting")){te.sessionInfo=mt,te._.setIceServers(te.sessionInfo.iceServers),Se=mt.p2pEnabled,nt=mt.messagingServer,te.logEvent("SessionInfo","Success",null,Tn,{messagingServer:mt.messagingServer});const Tt=pt.sessionInfoOverrides;null!=Tt&&"object"==typeof Tt&&Object.keys(Tt).forEach(cn=>{Object.defineProperty(te.sessionInfo,cn,{value:Tt[cn]})}),ye.call(te)}},Sn)}).catch(pt=>{Be.call(te,pt)}),te},this.disconnect=function(){Ne&&Ne.isNot("disconnected")?Ne.isNot("disconnecting")&&(Ne.isNot("connecting")||this.logConnectivityEvent("Cancel"),$t("disconnecting"),Ne.disconnect(),this.off("gsmCallEnded",In)):en()},this.destroy=function(){this.streams.destroy(),this.connections.destroy(),this.archives.destroy(),this.disconnect()},this.publish=function(ne,ce,fe){if("function"==typeof ne&&(fe=ne,ne=void 0),"function"==typeof ce&&(fe=ce,ce=void 0),fe=fe||function(){},this.isNot("connected"))return tt.logError(1010,"OT.exception","We need to be connected before you can publish",null,{action:"Publish",variation:"Failure",failureReason:"unconnected",failureCode:B.NOT_CONNECTED,failureMessage:"We need to be connected before you can publish",sessionId:qt,streamId:ne&&ne.stream?ne.stream.id:null,p2p:this.sessionInfo?this.sessionInfo.p2pEnabled:void 0,messagingServer:this.sessionInfo?this.sessionInfo.messagingServer:null,partnerId:Vt}),Ve(j(L.NOT_CONNECTED,new Error("We need to be connected before you can publish"),B.NOT_CONNECTED),fe),null;if(!Ie("publish")){const Ae="This token does not allow publishing. The role must be at least `publisher` to enable this functionality";return this.logEvent("Publish","Failure",null,{failureReason:"Permission",failureCode:B.UNABLE_TO_PUBLISH,failureMessage:Ae}),Ve(j(L.PERMISSION_DENIED,new Error(Ae),B.UNABLE_TO_PUBLISH),fe),null}if(!ne||"string"==typeof ne||F.isElementNode(ne))ne=re(ne,ce);else{if(!(ne instanceof W))return void Ve(j(L.INVALID_PARAMETER,new Error("Session.publish :: First parameter passed in is neither a string nor an instance of the Publisher"),B.UNABLE_TO_PUBLISH),fe);"session"in ne&&ne.session&&"sessionId"in ne.session&&Ke.warn(ne.session.sessionId===this.sessionId?`Cannot publish ${ne.guid()} again to ${this.sessionId}. Please call session.unpublish(publisher) first.`:`Cannot publish ${ne.guid()} publisher already attached to ${ne.session.sessionId}. Please call session.unpublish(publisher) first.`)}return Ct&&ne._.forceMuteAudio(),ne._.publishToSession(this,tt).catch(Ae=>{throw Ae.message=`Session.publish :: ${Ae.message}`,Ke.error(Ae.code,Ae.message),Ae}).then(()=>ne).then(function(){for(var Ae=arguments.length,Fe=new Array(Ae),Xe=0;Xe<Ae;Xe++)Fe[Xe]=arguments[Xe];return fe(null,...Fe)},Ae=>fe(Ae)),ne},this.unpublish=function(ne){ne?ne._.unpublishFromSession(this,"unpublished"):Ke.error("OT.Session.unpublish: publisher parameter missing.")},this.subscribe=function(ne,ce,fe,Ae){if("function"==typeof ce&&(Ae=ce,ce=void 0,fe=void 0),"function"==typeof fe&&(Ae=fe,fe=void 0),Ae=Ae||function(){},!this.connection||!this.connection.connectionId)return void Ve(j(L.NOT_CONNECTED,new Error("Session.subscribe :: Connection required to subscribe"),B.UNABLE_TO_SUBSCRIBE),Ae);
1if(!ne)return void Ve(j(L.INVALID_PARAMETER,new Error("Session.subscribe :: stream cannot be null"),B.UNABLE_TO_SUBSCRIBE),Ae);if(!Object.prototype.hasOwnProperty.call(ne,"streamId"))return void Ve(j(L.INVALID_PARAMETER,new Error("Session.subscribe :: invalid stream object"),B.UNABLE_TO_SUBSCRIBE),Ae);if(fe&&!1===fe.insertDefaultUI&&ce)return void Ve(j(L.INVALID_PARAMETER,new Error("You cannot specify a target element if insertDefaultUI is false"),B.INVALID_PARAMETER),Ae);ce&&!1===ce.insertDefaultUI&&(fe=ce,ce=void 0);const Fe=new ue(ce,c(fe||{},{stream:ne,session:this,analytics:tt}),Xe=>{Xe?Ve(Xe,Ae):Ae(null,Fe)});return _.subscribers.add(Fe),Fe},this.unsubscribe=function(ne){if(!ne){const ce="OT.Session.unsubscribe: subscriber cannot be null";throw Ke.error(ce),new Error(ce)}return ne.stream?(Ke.debug(`OT.Session.unsubscribe: subscriber ${ne.id}`),ne._destroy({reason:"Unsubscribe"}),!0):(Ke.warn("OT.Session.unsubscribe:: tried to unsubscribe a subscriber that had no stream"),!1)},this.getSubscribersForStream=function(ne){return _.subscribers.where({streamId:ne.id})},this.getPublisherForStream=function(ne){let ce,fe;if("string"==typeof ne)ce=ne;else{if("object"!=typeof ne||!ne||!Object.hasOwnProperty.call(ne,"id"))throw fe="Session.getPublisherForStream :: Invalid stream type",Ke.error(fe),new Error(fe);ce=ne.id}return _.publishers.where({streamId:ce})[0]},this._={getProxyUrl:()=>ze,isSocketReconnecting:()=>sn,getSocket:()=>Ne,reconnecting:function(){sn=!0,this.dispatchEvent(new N.SessionReconnectingEvent)}.bind(this),reconnected:function(){sn=!1,this.dispatchEvent(new N.SessionReconnectedEvent),this.sessionInfo.reconnection&&(_.publishers.where({session:this}).forEach(ne=>{ne._.iceRestart()}),this.sessionInfo.p2pEnabled||_.subscribers.where({session:this}).forEach(ne=>{ne._.iceRestart("socket reconnected")}))}.bind(this),dispatchSignal:function(ne,ce,fe){const Ae=new N.SignalEvent(ce,fe,ne);Ae.target=this,this.trigger(u.SIGNAL,Ae),ce&&this.dispatchEvent(Ae)}.bind(this),subscriberChannelUpdate:(ne,ce,fe,Ae)=>Ne?Ne.subscriberChannelUpdate(ne.id,ce.widgetId,fe.id,Ae):(Ke.warn("You are disconnected, cannot update subscriber properties ",Ae),null),streamCreate(ne,ce,fe,Ae,Fe,Xe,Rt){Ne?Ne.streamCreate(ne,ce,fe,Ae,Fe,void 0,Xe,Rt):Ke.warn("You are disconnected, cannot create stream ",ce)},streamDestroy(ne,ce){Ne?Ne.streamDestroy(ne,ce):Ke.warn("You are disconnected, cannot destroy stream ",ne)},streamChannelUpdate(ne,ce,fe){Ne?Ne.streamChannelUpdate(ne.id,ce.id,fe):Ke.warn("You are disconnected, cannot update stream properties ",fe)},setSocket(ne){Ne=ne},setLogging(ne){Ke=ne},setState:$t,setIceServers(ne){!ne||(xt={iceServers:R(ne),timestamp:Date.now()})},getOtIceServerInfo(){return 864e5-(xt?Date.now()-xt.timestamp:1/0)>3e5?t.resolve({transportPolicy:lt&&lt.sessionInfo&&lt.sessionInfo.clientCandidates,servers:xt&&xt.iceServers}):St?Q({anvilUrl:(this.staticConfig||k).apiUrl,sessionId:ke,token:St,connectionId:Dt,clientVersion:k.clientVersion}).then(Xe=>(lt._.setIceServers(Xe.iceServers),xt?{transportPolicy:lt&&lt.sessionInfo&&lt.sessionInfo.clientCandidates,servers:xt&&xt.iceServers}:{transportPolicy:lt.sessionInfo.clientCandidates,servers:[],needRumorIceServersFallback:!0})):t.resolve({transportPolicy:lt&&lt.sessionInfo&&lt.sessionInfo.clientCandidates,servers:[],needRumorIceServersFallback:!0})},getCodecFlags:()=>({h264:lt.sessionInfo.h264,vp9:lt.sessionInfo.vp9,vp8:lt.sessionInfo.vp8}),getVideoCodecsCompatible:ne=>m({RTCPeerConnection:Me.RTCPeerConnection,env:F.env,stream:ne,codecFlags:lt._.getCodecFlags()}),getIceConfig:()=>{if(!be)return lt._.getOtIceServerInfo();const ne=be&&"relay"===be.transportPolicy?"relay":lt.sessionInfo.clientCandidates;return("custom"===be.includeServers?t.resolve({servers:[]}):lt._.getOtIceServerInfo()).then(fe=>c(fe,{transportPolicy:ne,servers:[...fe.servers,...be.customServers]}))},forceMute:function(ne){this.dispatchEvent(new N.MuteForcedEvent(ne))}.bind(this),enableMuteOnEntry:()=>{Ct=!0},addSubscriberToPeerConnectionsQueue:(ne,ce)=>{ft.push({pc:ne,message:ce}),Pt||(Pt=setInterval(()=>{const fe=ft.pop();fe?fe.pc.processMessage("offer",fe.message):(clearInterval(Pt),Pt=null)},100))},disableMuteOnEntry:()=>{Ct=!1},privateEvents:new i},this.signal=function(ne,ce){let fe=ne,Ae=ce||function(){};function Fe(Xe){switch(Xe){case 400:case 413:return L.INVALID_PARAMETER;case 429:return L.RATE_LIMIT_EXCEEDED;case 404:return L.NOT_FOUND;case 500:return L.NOT_CONNECTED;case 403:return L.PERMISSION_DENIED;case 2001:return L.UNEXPECTED_SERVER_RESPONSE;default:return}}a(fe)&&(Ae=fe,fe=null),this.isNot("connected")?Ve(j(L.NOT_CONNECTED,new Error("Unable to send signal - you are not connected to the session."),500),Ae):(Ne.signal(fe,function(Xe){if(Xe){const Ft=Fe(Xe.code);return Ft&&(Xe=j(Ft,new Error(Xe.message),Xe.code)),void Ae(Xe)}
1for(var Rt=arguments.length,Lt=new Array(Rt>1?Rt-1:0),It=1;It<Rt;It++)Lt[It-1]=arguments[It];Ae(Xe,...Lt)},this.logEvent),ne&&ne.data&&"string"!=typeof ne.data&&Ke.warn("Signaling of anything other than Strings is deprecated. Please update the data property to be a string."))},this.forceDisconnect=function(ne,ce){if(this.isNot("connected"))return void Ve(j(L.NOT_CONNECTED,new Error("Cannot call forceDisconnect(). You are not connected to the session."),B.NOT_CONNECTED),ce);const fe="string"==typeof ne?ne:ne.id,Ae="Invalid Parameter. Check that you have passed valid parameter values into the method call.";fe?Ie("forceDisconnect")?Ne.forceDisconnect(fe,function(Xe){if(Xe)Ve(j(L.INVALID_PARAMETER,new Error(Ae),B.INVALID_PARAMETER),ce);else if(ce&&a(ce)){for(var Rt=arguments.length,Lt=new Array(Rt>1?Rt-1:0),It=1;It<Rt;It++)Lt[It-1]=arguments[It];ce(Xe,...Lt)}}):Ve(j(L.PERMISSION_DENIED,new Error("This token does not allow forceDisconnect. The role must be at least `moderator` to enable this functionality"),B.UNABLE_TO_FORCE_DISCONNECT),ce):Ve(j(L.INVALID_PARAMETER,new Error(Ae),B.INVALID_PARAMETER),ce)},this.forceUnpublish=function(ne,ce){void 0===ce&&(ce=()=>{});const fe=Ft=>Ve(j(Ft.name,new Error(Ft.msg),Ft.code),ce),Fe={msg:"Cannot call forceUnpublish(). You are not connected to the session.",code:B.NOT_CONNECTED,name:L.NOT_CONNECTED},Xe={msg:"This token does not allow forceUnpublish. The role must be at least `moderator` to enable this functionality",code:B.UNABLE_TO_FORCE_UNPUBLISH,name:L.PERMISSION_DENIED},Rt={msg:"The stream does not exist.",name:L.NOT_FOUND},Lt={msg:"An unexpected error occurred.",name:L.UNEXPECTED_SERVER_RESPONSE,code:B.UNEXPECTED_SERVER_RESPONSE};if(!ne)return void fe({msg:"Invalid Parameter. Check that you have passed valid parameter values into the method call.",code:B.INVALID_PARAMETER,name:L.INVALID_PARAMETER});if(te.isNot("connected"))return void fe(Fe);const It=He(ne);Ie("forceUnpublish")?Ne.forceUnpublish(It.id,Ft=>{Ft?fe("404"===Ft.code?Rt:"403"===Ft.code?Xe:Lt):ce(null)}):fe(Xe)},this.forceMuteStream=ne=>new t((ce,fe)=>{const Ae=at();Ae?fe(Ae):ne&&ne.id?Ne.forceMuteStream(ne.id,Fe=>{Fe?fe(Xt(Fe)):ce()}):fe(rt(z.INVALID_PARAMETER))}),this.forceMuteAll=ne=>new t((ce,fe)=>{const Ae=at();if(Ae)return void fe(Ae);if(Array.isArray(ne)&&!ne.every(Xe=>Xe instanceof U)||ne&&!Array.isArray(ne))return void fe(rt(z.INVALID_PARAMETER));const Fe=(ne||[]).map(Xe=>Xe.id);Ne.forceMuteAll(Fe,!0,Xe=>{Xe?fe(Xt(Xe)):ce()})}),this.disableForceMute=()=>new t((ne,ce)=>{const fe=at();fe?ce(fe):Ne.forceMuteAll([],!1,Ae=>{Ae?ce(Xt(Ae)):ne()})}),this.isConnected=()=>this.is("connected"),this.capabilities=new P([])}}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(8),r=e(21),n=[400,403,409,t.CONNECTION_LIMIT_EXCEEDED];l.exports=function(s){let a,c;if("ConnectToSession"===s.reason&&s.code===t.CONNECT_FAILED)a=s.code,c=r.getTitleByCode(s.code);else if(s.code&&n.indexOf(Number(s.code))>-1)switch(a=t.CONNECT_FAILED,s.reason){case"ConnectToSession":s.code===t.CONNECTION_LIMIT_EXCEEDED?(a=s.code,c="Cannot connect -- the limit for concurrent connections to the session has been reached"):c="Received error response to connection create message.";break;case"GetSessionState":c="Received error response to session read";break;default:c=""}else a=t.UNEXPECTED_SERVER_RESPONSE,c="Unexpected server response. Try this operation again later.";return{code:a,message:c}}},function(l,E,e){"use strict";const t=e(2),r=e(60).once;l.exports=()=>r()&&(t.isChromiumEdge||["Chrome","Safari","Firefox","Opera"].includes(t.name))},function(l,E,e){"use strict";l.exports=function(r){return JSON.stringify(r)}},function(l,E,e){"use strict";E.__esModule=!0,E.default=void 0,E.default=r=>{let n=r.logger,i=r.obj;r.eventNames.forEach(s=>{i.on(s,function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];return n.spam("emitted",s,c)})})}},function(l,E,e){"use strict";const t=e(15),r=e(21),n=e(6),i=e(1)("Dispatcher"),o=e(171),s=e(704),a=function(){n(this),this.callbacks={}};l.exports=a,a.prototype.registerCallback=function(c,u){this.callbacks[c]=u},a.prototype.triggerCallback=function(c){if(!c)return;const u=this.callbacks[c];if(u&&t(u)){const d=Array.prototype.slice.call(arguments);d.shift(),u(...d)}delete this.callbacks[c]}
1,a.prototype.onClose=function(c){this.emit("close",c)},a.prototype.onReconnected=function(){this.emit("reconnected")},a.prototype.onReconnecting=function(){this.emit("reconnecting")},a.prototype.dispatch=function(c){if(c.type===o.STATUS){var u;let f;if(i.debug(c),c.isError){let g;if("string"==typeof c.data)try{const v=JSON.parse(c.data);v&&"object"==typeof v&&(g=v.reason)}catch(v){i.warn("Failed to parse rumorMessage.data",v)}f=new r(c.status,g)}const h=c.data?JSON.parse(c.data):"";return(null==h||null==(u=h.mute)?void 0:u.active)&&this.dispatchMuteOnEntry(),void this.triggerCallback(c.transactionId,f,c)}const d=s(c);switch(i.debug(`${d.signature}:`,d),d.resource){case"session":this.dispatchSession(d);break;case"connection":this.dispatchConnection(d);break;case"stream":this.dispatchStream(d);break;case"stream_channel":this.dispatchStreamChannel(d);break;case"subscriber":this.dispatchSubscriber(d);break;case"subscriber_channel":this.dispatchSubscriberChannel(d);break;case"signal":this.dispatchSignal(d);break;case"archive":this.dispatchArchive(d);break;case"source":this.dispatchSource(d);break;default:i.debug(`Type ${d.resource} is not currently implemented`)}},a.prototype.dispatchSession=function(c){switch(c.method){case"read":this.emit("session#read",c.content,c.transactionId);break;
1case"update":this.emit("session#update",c.content);break;default:i.debug(`${c.signature} is not currently implemented`)}},a.prototype.dispatchMuteOnEntry=function(){this.emit("session#muted")},a.prototype.dispatchConnection=function(c){switch(c.method){case"created":this.emit("connection#created",c.content);break;case"deleted":this.emit("connection#deleted",c.params.connection,c.reason);break;default:i.debug(`${c.signature} is not currently implemented`)}},a.prototype.dispatchStream=function(c){switch(c.method){case"created":this.emit("stream#created",c.content,c.transactionId);break;case"deleted":this.emit("stream#deleted",c.params.stream,c.reason,c.content);break;case"updated":this.emit("stream#updated",c.params.stream,c.content);break;case"update":this.emit("stream#update",c.params.stream,c.content);break;case"generateoffer":case"answer":case"pranswer":case"offer":case"candidate":this.dispatchJsep(c.method,c);break;default:i.debug(`${c.signature} is not currently implemented`)}},a.prototype.dispatchStreamChannel=function(c){"updated"===c.method?this.emit("streamChannel#updated",c.params.stream,c.params.channel,c.content):i.debug(`${c.signature} is not currently implemented`)},a.prototype.dispatchJsep=function(c,u){this.emit(`jsep#${c}`,u.params.stream,u.fromAddress,u)},a.prototype.dispatchSubscriberChannel=function(c){switch(c.method){case"updated":this.emit("subscriberChannel#updated",c.params.stream,c.params.channel,c.content);break;
vendor: 1,042 bytes, line 1
1case"update":this.emit("subscriberChannel#update",c.params.subscriber,c.params.stream,c.content);break;default:i.debug(`${c.signature} is not currently implemented`)}},a.prototype.dispatchSubscriber=function(c){switch(c.method){case"created":this.emit("subscriber#created",c.params.stream,c.fromAddress,c.content.id);break;case"deleted":this.dispatchJsep("unsubscribe",c),this.emit("subscriber#deleted",c.params.stream,c.fromAddress);break;case"generateoffer":case"answer":case"pranswer":case"offer":case"candidate":this.dispatchJsep(c.method,c);break;default:i.debug(`${c.signature} is not currently implemented`)}},a.prototype.dispatchSignal=function(c){"signal"===c.method?this.emit("signal",c.fromAddress,c.content):i.debug(`${c.signature} is not currently implemented`)},a.prototype.dispatchArchive=function(c){switch(c.method){case"created":this.emit("archive#created",c.content);break;case"updated":this.emit("archive#updated",c.params.archive,c.content)}},a.prototype.dispatchSource=function(c){switch(c.method){case"create":this.emit
1("source#create",c.params.source,c.params.stream,c.reason);break;case"delete":this.emit("source#delete",c.params.source,c.params.stream,c.reason);break;default:i.debug(`${c.signature} is not currently implemented`)}}},function(l,E,e){"use strict";const t=e(19),r=e(5),n=e(707),i=e(708),o=e(312),s=e(709),a=e(44)().onlyLocal(),c={};l.exports=c,c.connections={},c.connections.create=function(u){return o({method:"create",uri:`/v2/partner/${u.apiKey}/session/${u.sessionId}/connection/${u.connectionId}`,content:{userAgent:r.env.userAgent,clientVersion:a.clientVersion,capabilities:u.capabilities||[],connectionEventsSuppressed:u.connectionEventsSuppressed}})},c.connections.destroy=function(u){return o({method:"delete",uri:`/v2/partner/${u.apiKey}/session/${u.sessionId}/connection/${u.connectionId}`,content:{}})},c.sessions={},c.sessions.get=function(u,d){return o({method:"read",uri:`/v2/partner/${u}/session/${d}`,content:{}})},c.streams={},c.streams.get=function(u,d,f){return o({method:"read",uri:`/v2/partner/${u}/session/${d}/stream/${f}`,content:{}})},c.streams.channelFromOTChannel=function(u){const d={id:u.id,type:u.type,active:u.active};return"video"===u.type&&(d.width=u.width,d.height=u.height,d.orientation=u.orientation,d.frameRate=u.frameRate,"default"!==u.source&&(d.source=u.source),d.fitMode=u.fitMode),d},c.streams.create=function(u){void 0===u&&(u={});const f=u.apiKey,h=u.sessionId,g=u.streamId,y=u.minBitrate,S=u.maxBitrate,T=u.sourceStreamId,b={id:g,name:u.name,audioFallbackEnabled:u.audioFallbackEnabled,channel:u.channels.map(O=>c.streams.channelFromOTChannel(O))};return y&&(b.minBitrate=Math.round(y)),S&&(b.maxBitrate=Math.round(S)),T&&(b.sourceStreamId=T),o({method:"create",uri:`/v2/partner/${f}/session/${h}/stream/${g}`,content:b})},c.streams.destroy=function(u,d,f,h){const g={};return h&&(g.sourceStreamId=h),o({method:"delete",uri:`/v2/partner/${u}/session/${d}/stream/${f}`,content:g})},c.streamChannels={},c.streamChannels.update=function(u,d,f,h,g){return o({method:"update",uri:`/v2/partner/${u}/session/${d}/stream/${f}/channel/${h}`,content:g})},c.subscribers={},c.subscribers.create=function(u){void 0===u&&(u={});const f=u.apiKey,h=u.sessionId,g=u.streamId,v=u.subscriberId,p=u.channelsToSubscribeTo,y=u.sourceStreamId,S={id:v,connection:u.connectionId,keyManagementMethod:s,bundleSupport:n(),rtcpMuxSupport:i()};return p&&(S.channel=p),y&&(S.sourceStreamId=y),o({method:"create",uri:`/v2/partner/${f}/session/${h}/stream/${g}/subscriber/${v}`,content:S})},c.subscribers.destroy=function(u,d,f,h){return o({method:"delete",uri:`/v2/partner/${u}/session/${d}/stream/${f}/subscriber/${h}`,content:{}})},c.subscribers.update=function(u,d,f,h,g){return o({method:"update",uri:`/v2/partner/${u}/session/${d}/stream/${f}/subscriber/${h}`,content:g})},c.subscriberChannels={},c.subscriberChannels.update=function(u,d,f,h,g,v){return o({method:"update",uri:`/v2/partner/${u}/session/${d}/stream/${f}/subscriber/${h}/channel/${g}`,content:v})},c.signals={},c.signals.create=function(u,d,f,h,g){const v={};return void 0!==h&&(v.type=h),void 0!==g&&(v.data=g),o({method:"signal",uri:`/v2/partner/${u}/session/${d}${void 0!==f?`/connection/${f}`:""}/signal/${t()}`,content:v})},c.forceMute={},c.forceMute.update=u=>{const d=u.apiKey,f=u.sessionId,h=u.streamId,v=u.excludedStreamIds,m={reason:"mute",channels:["audio"],active:u.active,locked:!1};return v&&(m.exclusion=v),o({method:"update",uri:`/v2/partner/${d}/session/${f}${h?`/stream/${h}`:""}`,content:m})}},function(l,E,e){"use strict";const t=e(36),r=e(72),n=e(172),i=e(315),o=e(317);l.exports=function(u,d,f){var S;this.toRaptorMessage=function(){let y=this.to;return y&&"string"!=typeof y&&(y=y.id),i.signals.create(r.value,u,y,this.type,this.data)},this.toHash=function(){return f},this.error=null,this.retryAfterReconnect=!0,f&&(f.hasOwnProperty("data")&&(this.data=t(f.data),this.error=function(S){let T=null;if(null==S)T={code:400,reason:"The signal data was null or undefined. Either set it to a String value or omit it"};else try{JSON.stringify(S).length>8192&&(T={code:413,reason:"The data field was too long, the maximum size of it is 8192 characters"})}
1catch(b){T={code:400,reason:"The data field was not valid JSON"}}return T}(this.data)),f.hasOwnProperty("to")&&(this.to=f.to,this.error||(this.error=(S=this.to)?S instanceof n||S._tag===o?null:{code:400,reason:"The To field was invalid"}:{code:400,reason:"The signal to field was invalid. Either set it to a OT.Connection, OT.Session, or omit it entirely"})),f.hasOwnProperty("type")&&(this.error||(this.error=function(S){let T=null;return null==S?T={code:400,reason:"The signal type was null or undefined. Either set it to a String value or omit it"}:S.length>128?T={code:413,reason:"The signal type was too long, the maximum length of it is 128 characters"}:function(S){return!/^[a-zA-Z0-9\-\._~]+$/.exec(S)}(S)&&(T={code:400,reason:"The signal type was invalid, it can only contain letters, numbers, '-', '_', and '~'."}),T}(f.type)),this.type=f.type),f.hasOwnProperty("retryAfterReconnect")&&(this.error||(this.error=function(S){let T=null;return!0===S||!1===S||(T={code:400,reason:"The signal retryAfterReconnect was not true or false. Either set it to a Boolean value or omit it"}),T}(f.retryAfterReconnect)),this.retryAfterReconnect=f.retryAfterReconnect)),this.valid=null===this.error}},function(l,E,e){"use strict";l.exports={}},function(l,E,e){"use strict";var t=e(3),r=t(e(12)),n=t(e(13));const i=e(319),o=e(48),s=e(172),a=e(712),c=e(314),u=e(1)("SessionDispatcher"),d=e(20),f=e(170),h=e(149),g=e(167);function p(O,C){if(C.streams.has(O.id))return;const R=function m(O,C){const R=O.channel.map(A=>new h(A));return new f(O.id,O.name,O.creationTime,C.connections.get(O.connectionId?O.connectionId:O.connection.id),C,R)}(O,C);return C.streams.add(R),R}function S(O,C){if(C.archives.has(O.id))return;const R=function y(O){return new i(O.id,O.name,O.status)}(O);return C.archives.add(R),R}const T=function(C){const R={};this.enqueue=function(){const A=arguments[0],P=Array.prototype.slice.call(arguments,1);R[A]||(R[A]=new a(C)),R[A].enqueue.apply(R[A],P)},this.triggerConnectionCreated=function(A){R[`connectionCreated${A.id}`]&&R[`connectionCreated${A.id}`].triggerAll()},this.triggerSessionConnected=function(A){R.sessionConnected&&R.sessionConnected.triggerAll(),A.forEach(function(P){this.triggerConnectionCreated(P)},this)}},b={};l.exports=function(C,R){let A=(void 0===R?{}:R).connectionEventsSuppressed;const P=new c;let x=!1;const D=new T(P);P.on("reconnecting",()=>{C._.reconnecting()}),P.on("reconnected",()=>{C._.reconnected()}),P.on("close",U=>{const B=C.connection;if(B){if(B.destroyedReason())return void u.debug(`Socket was closed but the connection had already been destroyed. Reason: ${B.destroyedReason()}`);B.destroy(U)}});const L=function(B,V){return C.connections.has(B.id)?C.connections.get(B.id):(B=s.fromHash(B),(V||C.connection&&B.id!==C.connection.id)&&(C.connections.add(B),D.triggerConnectionCreated(B)),Object.keys(b).forEach(H=>{const j=b[H];j&&B.id===j.connection.id&&(p(j,C),delete b[j.id],C.logEvent("streamCreated","warning",{debug:V?"connection came in session#read":"connection came in connection#created",streamId:j.id,connectionId:B.id}))}),B)};P.on("session#read",(U,B)=>{let V;const H={streams:[],connections:[],archives:[]};U.connection.forEach(j=>{V=L(j,!0),H.connections.push(V)}),U.stream.forEach(j=>{H.streams.push(p(j,C))}),(U.archive||U.archives).forEach(j=>{H.archives.push(S(j,C))}),P.triggerCallback(B,null,H),x=!0,D.triggerSessionConnected(C.connections)}),P.on("session#update",U=>{if("mute"!==U.reason)return void u.debug("session#update that handle this reason is not currently implemented");const B=!0===U.active;C._.forceMute({active:B}),B?C._.enableMuteOnEntry():C._.disableMuteOnEntry()}),P.on("session#muted",()=>{C._.enableMuteOnEntry(),C._.forceMute({active:!0})}),P.on("connection#created",U=>{L(U)}),P.on("connection#deleted",(U,B)=>{(U=C.connections.get(U))?U.destroy(B):u.warn("A connection was deleted that we do not know about")}),P.on("stream#created",(U,B)=>{const V=U.id,H=U.sourceStreamId,j=U.connection;let M;if(A){if(null==j||null==j.id)return void C.logEvent("SessionDispatcher:stream#created","Event",{connection:j,info:"Stream did not contain a connection object. Event ignored"});L(j)}if(C.connections.has(U.connectionId||j.id))M=p(U,C);else{b[V]=U;const z={debug:"eventOrderError -- streamCreated event before connectionCreated",streamId:V,sourceStreamId:g(H)};C.logEvent("streamCreated","warning",z)}M?(M.publisher&&M.publisher.setStream(M),P.triggerCallback(B,null,M)):C.sessionInfo.isAdaptiveEnabled&&"P2P"===H&&d.subscribers.where({streamId:V}
1).forEach(z=>{z._.startRoutedToRelayedTransition()})}),P.on("stream#deleted",(U,B,V)=>{const H=C.streams.get(U),z=C.sessionInfo.isAdaptiveEnabled&&"P2P"===V.sourceStreamId;!H&&!z||(z?d.subscribers.where({streamId:U}).forEach(w=>{w._.startRelayedToRoutedTransition()}):H.destroy(B))}),P.on("stream#updated",(U,B)=>{const V=C.streams.get(U);V?V._.update(B):u.error(`A stream does not exist with the id of ${U}, for stream#updated message!`)}),P.on("stream#update",(U,B)=>{const V=C.streams.get(U);V?"mute"===B.reason?B.active&&V._.forceMute(B):u.debug("stream#update that handle this reason is not currently implemented"):u.error(`A stream does not exist with the id of ${U}, for stream#updated message!`)}),P.on("streamChannel#updated",(U,B,V)=>{let H;U&&(H=C.streams.get(U))?H._.updateChannel(B,V):u.error("Unable to determine streamId, or the stream does not exist, for streamChannel message!")});const N=(U,B,V,H)=>{let j,M;const F={streamId:B},z=d.subscribers,w=d.publishers;switch(j=H.params.subscriber?{widgetId:H.params.subscriber}:F,U){case"offer":M=[].concat(z.where(j),w.where(F)).slice(0,1);break;case"answer":case"pranswer":M=[].concat(w.where(F),z.where(j)).slice(0,1);break;case"generateoffer":case"unsubscribe":M=w.where(F);break;case"candidate":M=[].concat(z.where(j),w.where(F));break;default:return void u.debug(`jsep#${U} is not currently implemented`)}if(0===M.length)return;let k=C.connections.get(V);!k&&V.match(/^symphony\./)&&(k=s.fromHash({id:V,creationTime:Math.floor(o())}),C.connections.add(k)),M.forEach(function(){var W=(0,n.default)(r.default.mark(function Z(ie){return r.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return se.prev=0,se.next=3,ie.processMessage(U,V,H);case 3:se.next=8;break;case 5:se.prev=5,se.t0=se.catch(0),u.error("Error occurred during processMessage",se.t0);case 8:case"end":return se.stop()}},Z,null,[[0,5]])}));return function(Z){return W.apply(this,arguments)}}())};return P.on("jsep#offer",N.bind(null,"offer")),P.on("jsep#answer",N.bind(null,"answer")),P.on("jsep#pranswer",N.bind(null,"pranswer")),P.on("jsep#generateoffer",N.bind(null,"generateoffer")),P.on("jsep#unsubscribe",N.bind(null,"unsubscribe")),P.on("jsep#candidate",N.bind(null,"candidate")),P.on("subscriberChannel#updated",(U,B,V)=>{U&&C.streams.has(U)?C.streams.get(U)._.updateChannel(B,V):u.error("Unable to determine streamId, or the stream does not exist, for subscriberChannel#updated message!")}),P.on("subscriberChannel#update",(U,B,V)=>{B&&C.streams.has(B)?d.subscribers.has(U)?d.subscribers.get(U).disableVideo(V.active):u.error("Unable to determine subscriberId, or the subscriber does not exist, for subscriberChannel#update message!"):u.error("Unable to determine streamId, or the stream does not exist, for subscriberChannel#update message!")}),P.on("signal",(U,B)=>{if(A){let M=B.connection||B.fromConnection;(null==M||null==M.id)&&(M=function v(O){return{id:O,creationTime:(new Date).getTime(),data:{},capablities:{},permissions:[]}}(U),C.logEvent("SessionDispatcher:Signal","Event",{fromAddress:U,connection:B.connection,fromConnection:B.fromConnection,info:"Signal did not contain a connection object. One has been constructed",constructedConnection:M})),L(M)}const V=B.type,H=B.data,j=C.connections.get(U);C.connection&&U===C.connection.connectionId?x?C._.dispatchSignal(j,V,H):D.enqueue("sessionConnected","signal",U,V,H):C.connections.get(U)?C._.dispatchSignal(j,V,H):""===U?C._.dispatchSignal(null,V,H):D.enqueue(`connectionCreated${U}`,"signal",U,V,H)}),P.on("archive#created",U=>{S(U,C)}),P.on("archive#updated",(U,B)=>{const V=C.archives.get(U);V?V._.update(B):u.error(`An archive does not exist with the id of ${U}
1, for archive#updated message!`)}),P.on("source#create",(U,B,V)=>{const H=g(U);C.logEvent("SessionDispatcher:source#create","Event",{sourceStreamId:H,streamId:B,reason:V}),u.debug(`Received a request from RUMOR to start a transition to ${U} for the stream ID ${B} with the reason: ${V}`),d.publishers.where({streamId:B}).forEach(j=>{j._.startRoutedToRelayedTransition()})}),P.on("source#delete",(U,B,V)=>{C.logEvent("SessionDispatcher:source#delete","Event",{sourceStreamId:g(U),streamId:B,reason:V}),u.debug(`Received a request from RUMOR to start a transition from P2P to MANTIS for the stream ID ${B} with the reason: ${V}`),d.publishers.where({streamId:B}).forEach(H=>{H._.startRelayedToRoutedTransition()})}),P}},function(l,E,e){"use strict";const t=e(22)(),r=e(6);l.exports=function(i,o,s){this.id=i,this.name=o,this.status=s,this._={},r(this),this._.update=a=>{Object.keys(a).forEach(c=>{const u=this[c];this[c]=a[c];const d=new t.ArchiveUpdatedEvent(this,c,u,this[c]);this.dispatchEvent(d)})},this.destroy=()=>{}}},function(l,E,e){"use strict";const r=e(23)().getAudioOutputMediaDevices;l.exports=()=>r()},function(l,E,e){"use strict";const r=e(23)().getActiveAudioOutputDevice;l.exports=()=>r()},function(l,E,e){"use strict";(function(t){var r=e(3),n=r(e(12)),i=r(e(13));const o=e(20),a=e(105).setCurrentAudioOutputDeviceId,c=e(321),u=e(23)(),d=u.getDefaultAudioOutputDeviceId,f=u.getAudioOutputMediaDevices,h=e(294),v=new(e(27)),m=(b,O)=>{v.logEvent({action:"updateSubscribersSinkId",variation:b,payload:O})},p=b=>{const O=o.subscribers.map(C=>C._.setSinkId(b));return t.all(O)},y=function(){var b=(0,i.default)(n.default.mark(function O(C){return n.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,h();case 2:return I.prev=2,m("Attempt",{deviceId:C}),I.next=6,p(C);case 6:m("Success",{deviceId:C}),I.next=13;break;case 9:throw I.prev=9,I.t0=I.catch(2),m("Failure",{deviceId:C,error:null==I.t0?void 0:I.t0.message}),I.t0;case 13:case"end":return I.stop()}},O,null,[[2,9]])}));return function(C){return b.apply(this,arguments)}}(),S=function(){var b=(0,i.default)(n.default.mark(function O(){var R;return n.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,f();case 2:return R=d(A.sent),A.prev=4,A.next=7,y(R);case 7:a(R),A.next=12;break;case 10:A.prev=10,A.t0=A.catch(4);case 12:case"end":return A.stop()}},O,null,[[4,10]])}));return function(){return b.apply(this,arguments)}}(),T=function(){var b=(0,i.default)(n.default.mark(function O(){var C;return n.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,c();case 2:return C=I.sent,I.prev=3,I.next=6,y(C.deviceId);case 6:I.next=12;break;case 8:return I.prev=8,I.t0=I.catch(3),I.next=12,S();case 12:case"end":return I.stop()}},O,null,[[3,8]])}));return function(){return b.apply(this,arguments)}}();l.exports=function(){var b=(0,i.default)(n.default.mark(function O(C){return n.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.prev=0,m("Attempt",{deviceId:C}),I.next=4,p(C);case 4:m("Success",{deviceId:C}),a(C),I.next=14;break;case 8:return I.prev=8,I.t0=I.catch(0),m("Failure",{deviceId:C,error:null==I.t0?void 0:I.t0.message}),I.next=13,T();case 13:throw I.t0;case 14:case"end":return I.stop()}},O,null,[[0,8]])}));return function(O){return b.apply(this,arguments)}}()}).call(this,e(0))},function(l,E,e){"use strict";e(324);const t=e(36),r=e(26),n=e(6),i=e(126),o=e(44)(),s=e(27),a=e(249),c=e(543),u=e(544),d=o.onlyLocal(),f={};f.noConflict=e(545)(),(void 0!==typeof window?window:global).OT=f,l.exports=f,(()=>{let Se=f;Object.defineProperty(void 0!==typeof window?window:global,"TB",{get:()=>(Se===f&&console.warn("window.TB is deprecated, and will be removed in the future. Please access via window.OT"),Se),set:nt=>{Se=nt},configurable:!0})})();const h=e(142)(void 0!==typeof window?window:global),g=e(5),v=e(72),m=e(143),p=e(252),y=e(144),S=e(145),T=e(253),b=e(146),O=e(4),C=e(8),R=e(254),I=e(240),A=e(1)("OT"),P=e(119),x=e(572),D=e(21),N=e(100).parseIceServers,U=e(267),B=e(20),V=e(149),H=e(151),j=e(152),M=e(101)({global:h}),F=e(11)({}),z=e(158)(),w=e(280)({otError:F}),k=e(281)(),W=e(286)({global:h}),Z=e(23)({getNativeEnumerateDevices:W}),ie=e(22)(),_=e(160)(),se=e(625)({otError:F,global:h}),pe=e(161)({chromeExtensionHelper:w,otError:F}),ue=e(630)({deviceHelpers:Z,generateConstraintInfo:R,getUserMediaHelper:se,global:h,OTHelpers:g,screenSharing:pe}),me=e(633)({otError:F,processPubOptions:ue}),ve=e(162)({otError:F}),Re=e(74),Me=e(291)(),Q=e(292)({otError:F}),K=e(293)({global:h,videoElementErrorMap:Q}),re=e(163)({global:h}),de=e(295)({PeerConnection:M,setCertificates:re}),Oe=e(296)({PeerConnection:M,setCertificates:re}),xe=e(297)(),ke=e(642)({otError:F}),X=e(107)({NativeVideoElementWrapper:K}),te=e(150)(),le=e(164)({VideoElementFacade:X}),be=e(300)({interpretPeerConnectionError:ve,otError:F,SubscriberPeerConnection:Oe,Wi
1dgetView:le}),De=e(168)({APIKEY:v,createChromeMixin:k,deviceHelpers:Z,EnvironmentLoader:b,Errors:O,Events:ie,ExceptionCodes:C,calculateCapableSimulcastStreams:p,global:h,interpretPeerConnectionError:ve,IntervalRunner:Re,Microphone:Me,otError:F,OTErrorClass:D,OTHelpers:g,parseIceServers:N,processPubOptions:ue,PUBLISH_MAX_DELAY:U,PublisherPeerConnection:de,PublishingState:xe,StreamChannel:V,systemRequirements:j,VideoOrientation:te,WidgetView:le}),he=e(308)({otError:F,Publisher:De}),Ze=e(309)({global:h,initPublisher:he,otError:F,Publisher:De,Subscriber:be}),ze=e(716)({Session:Ze});n(f);const tt=e(717);a(f,"$",{name:"OT.$",getMessage:"Please use an external library like jQuery to select elements from the page.",value:g}),f.APIKEY=v.value,f.AnalyserAudioLevelSampler=S,f.Archive=e(319),f.ArchiveEvent=ie.ArchiveEvent,f.ArchiveUpdatedEvent=ie.ArchiveUpdatedEvent,f.AudioLevelTransformer=m,f.AudioLevelUpdatedEvent=ie.AudioLevelUpdatedEvent,f.Capabilities=e(169),f.Chrome=y,f.Connection=e(172),f.ConnectionCapabilities=f.Connection.Capabilities,f.ConnectionEvent=ie.ConnectionEvent,Object.keys(P).forEach(Se=>{f[Se.toUpperCase()]=P[Se].priority}),f.NONE=0,f.debug=A.debug,f.error=A.error,f.info=A.info,f.log=A.log,f.warn=A.warn,f.DestroyedEvent=ie.DestroyedEvent,f.EnvLoadedEvent=ie.EnvLoadedEvent,f.Error=D,f.Error.on(r.EXCEPTION,Se=>{if(Se.target===f.Error){const nt=t(Se);nt.target=f,f.dispatchEvent(nt)}else f.dispatchEvent(Se)}),f.Event=i,f.ExceptionCodes=C,f.ExceptionEvent=ie.ExceptionEvent,f.getDevices=e(720),f.getAudioOutputDevices=e(320),f.getActiveAudioOutputDevice=e(321),f.setAudioOutputDevice=e(721)(),f.GetAudioLevelSampler=T,f.HAS_REQUIREMENTS=1,f.IntervalRunner=Re,f.IssueReportedEvent=ie.IssueReportedEvent,f.MediaStoppedEvent=ie.MediaStoppedEvent,f.Microphone=Me,f.NOT_HAS_REQUIREMENTS=0,f.PeerConnection=M,f.PeerConnection.QOS=e(278).default,f.Publisher=De,f.PublisherPeerConnection=de,f.PublishingState=xe,f.MuteForcedEvent=ie.MuteForcedEvent,f.Session=Ze,f.SessionConnectEvent=ie.SessionConnectEvent,f.SessionDisconnectEvent=ie.SessionDisconnectEvent,f.SessionDispatcher=e(318),f.Signal=e(316),f.SignalEvent=ie.SignalEvent,f.Stream=e(170),f.StreamChannel=V,f.StreamEvent=ie.StreamEvent,f.StreamPropertyChangedEvent=ie.StreamPropertyChangedEvent,f.StreamUpdatedEvent=ie.StreamUpdatedEvent,f.StylableComponent=H,f.Subscriber=be,f.SubscriberPeerConnection=Oe,f.SubscribingState=e(303),f.VideoDimensionsChangedEvent=ie.VideoDimensionsChangedEvent,f.VideoDisableWarningEvent=ie.VideoDisableWarningEvent,f.VideoElement=X,f.VideoEnabledChangedEvent=ie.VideoEnabledChangedEvent,f.VideoOrientation=te,f.WidgetView=le,f.getSupportedCodecs=tt,f._={AnalyticsHelper:s,getClientGuid:I.get,StaticConfig:o},Object.defineProperty(f,"version",{value:d.version});const He={};a(He,"version",{value:d.version,name:"OT.properties.version",getWarning:"Please use OT.version instead",warnOnSet:!0,setWarning:"Mutating version has no effect"}),c.forEach(Se=>{let nt,Nt;if(Array.isArray(Se)){const Te=Se[1];Nt=Se[0],nt=d[Te]||Te}else nt=d[Se],Nt=Se;const on=(Se=>u.includes(Se))(Nt);a(He,Nt,{value:nt,name:`OT.properties.${Nt}`,warnOnSet:!0,canSet:on,setWarning:on?`Mutating ${Nt} can cause side effects`:`Mutating ${Nt} has no effect`})}),f.properties=He,f.audioContext=z,f.checkScreenSharingCapability=pe.checkCapability,f.checkSystemRequirements=j.check,f.components={},f.generateSimpleStateMachine=_,f.getErrorTitleByCode=D.getTitleByCode,f.getLogs=A.getLogs,f.getStatsAdpater=e(274),f.getStatsHelpers=e(75),f.getUserMedia=me,f.handleJsException=D.handleJsException,f.initPublisher=he,f.setProxyUrl=e(139).setProxyUrl,f.initSession=function(Se,nt,Nt){return null==nt&&(nt=Se,Se=null),0===v.value.length&&Se&&(v.value=Se,f.APIKEY=Se),ze(Se,nt,Nt)};const St=(Se,nt)=>()=>(console.warn((Se=>`${Se} is deprecated and will be removed in a future version of OpenTok`)(Se)),nt);Object.defineProperties(f,{isUnloaded:{get:St("OT.isUnloaded",b.isUnloaded)},onLoad:{get:St("OT.onLoad",b.onLoad)},onUnload:{get:St("OT.onUnload",b.onUnload)},overrideGuidStorage:{get:St("OT.overrideGuidStorage",I.override)}}),f.pickScreenSharingHelper=pe.pickHelper,f.publishers=B.publishers,f.registerScreenSharingExtension=pe.registerExtension,f.registerScreenSharingExtensionHelper=pe.registerExtensionHelper,f.reportIssue=ke,f.sessions=B.sessions,f.setLogLevel=x,f.shouldLog=A.shouldLog,f.subscribers=B.subscribers,f.unblockAudio=e(166),f.upgradeSystemRequirements=j.upgrade,b.onUnload(()=>{B.publishers.destroy(),B.subscribers.destroy(),B.sessions.destroy("unloaded")}),e(722)(),e(724)()},function(l,E,e){var t=e(325);"string"==typeof t&&(t=[[l.i,t,""]]);e(339)(t,{hmr:!0,transform:void 0,insertInto:void 0}),t.locals&&(l.exports=t.locals)},function(l,E,e){E=l.exports=e(326)(!1);var t=e(327),r=t(e(328)),n=t(e(329)),i=t(e(330)),o=t(e(331)),s=t(e(332)),a=t(e(333)),c=t(e(334)),u=t(e(335)),d=t(e(336)),f=t(e(337)),h=t(e(338));E.push([l.i,"/*!\n * Copyright (c) 2017 TokBox, Inc.\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n */\n\n/**\n * OT Base styles\n */\n\n/* Root OT object, this is where our CSS reset happens */\n.OT_root,\n.OT_root * {\n  color: #ffffff;\n  margin: 0;\n  padding: 0;\n  border: 0;\n  font-size: 100%;\n  font-family: Arial, Helvetica, sans-serif;\n  vertical-align: baseline;\n}\n\n/**\n * Specific Element Reset\n */\n\n.OT_root h1,\n.OT_root h2,\n.OT_root h3,\n.OT_root h4,\n.OT_root h5,\n.OT_root h6 {\n  color: #ffffff;\n  font-family: Arial, Helvetica, sans-serif;\n  font-size: 100%;\n  font-weight: bold;\n}\n\n.OT_root header {\n\n}\n\n.OT_root footer {\n\n}\n\n.OT_root div {\n\n}\n\n.OT_root section {\n\n}\n\n.OT_root video {\n\n}\n\n.OT_root button {\n\n}\n\n.OT_root strong {\n  font-weight: bold;\n}\n\n.OT_root em {\n  font-style: italic;\n}\n\n.OT_root a,\n.OT_root a:link,\n.OT_root a:visited,\n.OT_root a:hover,\n.OT_root a:active {\n  font-family: Arial, Helvetica, sans-serif;\n}\n\n.OT_root ul, .OT_root ol {\n  margin: 1em 1em 1em 2em;\n}\n\n.OT_root ol {\n  list-style: decimal outside;\n}\n\n.OT_root ul {\n  list-style: disc outside;\n}\n\n.OT_root dl {\n  margin: 4px;\n}\n\n.OT_root dl dt,\n.OT_root dl dd {\n  float: left;\n  margin: 0;\n  padding: 0;\n}\n\n.OT_root dl dt {\n  clear: left;\n  text-align: right;\n  width: 50px;\n}\n\n.OT_root dl dd {\n  margin-left: 10px;\n}\n\n.OT_root img {\n  border: 0 none;\n}\n\n/* Modal dialog styles */\n\n/* Modal dialog styles */\n\n.OT_dialog-centering {\n  display: table;\n  width: 100%;\n  height: 100%;\n}\n\n.OT_dialog-centering-child {\n  display: table-cell;\n  vertical-align: middle;\n}\n\n.OT_dialog {\n  position: relative;\n\n  box-sizing: border-box;\n  max-width: 576px;\n  margin-right: auto;\n  margin-left: auto;\n  padding: 36px;\n  text-align: center; /* centers all the inline content */\n\n  background-color: #363636;\n  color: #fff;\n  box-shadow: 2px 4px 6px #999;\n  font-family: 'Didact Gothic', sans-serif;\n  font-size: 13px;\n  line-height: 1.4;\n}\n\n.OT_dialog * {\n  font-family: inherit;\n  box-sizing: inherit;\n}\n\n.OT_closeButton {\n  color: #999999;\n  cursor: pointer;\n  font-size: 32px;\n  line-height: 36px;\n  position: absolute;\n  right: 18px;\n  top: 0;\n}\n\n.OT_dialog-messages {\n  text-align: center;\n}\n\n.OT_dialog-messages-main {\n  margin-bottom: 36px;\n  line-height: 36px;\n\n  font-weight: 300;\n  font-size: 24px;\n}\n\n.OT_dialog-messages-minor {\n  margin-bottom: 18px;\n\n  font-size: 13px;\n  line-height: 18px;\n  color: #A4A4A4;\n}\n\n.OT_dialog-messages-minor strong {\n  color: #ffffff;\n}\n\n.OT_dialog-actions-card {\n  display: inline-block;\n}\n\n.OT_dialog-button-title {\n  margin-bottom: 18px;\n  line-height: 18px;\n\n  font-weight: 300;\n  text-align: center;\n  font-size: 14px;\n  color: #999999;\n}\n.OT_dialog-button-title label {\n  color: #999999;\n}\n\n.OT_dialog-button-title a,\n.OT_dialog-button-title a:link,\n.OT_dialog-button-title a:active {\n  color: #02A1DE;\n}\n\n.OT_dialog-button-title strong {\n  color: #ffffff;\n  font-weight: 100;\n  display: block;\n}\n\n.OT_dialog-button {\n  display: inline-block;\n\n  margin-bottom: 18px;\n  padding: 0 1em;\n\n  background-color: #1CA3DC;\n  text-align: center;
1\n  cursor: pointer;\n}\n\n.OT_dialog-button:disabled {\n  cursor: not-allowed;\n  opacity: 0.5;\n}\n\n.OT_dialog-button-large {\n  line-height: 36px;\n  padding-top: 9px;\n  padding-bottom: 9px;\n\n  font-weight: 100;\n  font-size: 24px;\n}\n\n.OT_dialog-button-small {\n  line-height: 18px;\n  padding-top: 9px;\n  padding-bottom: 9px;\n\n  background-color: #444444;\n  color: #999999;\n  font-size: 16px;\n}\n\n.OT_dialog-progress-bar {\n  display: inline-block; /* prevents margin collapse */\n  width: 100%;\n  margin-top: 5px;\n  margin-bottom: 41px;\n\n  border: 1px solid #4E4E4E;\n  height: 8px;\n}\n\n.OT_dialog-progress-bar-fill {\n  height: 100%;\n\n  background-color: #29A4DA;\n}\n\n/* Helpers */\n\n.OT_centered {\n  position: fixed;\n  left: 50%;\n  top: 50%;\n  margin: 0;\n}\n\n.OT_dialog-hidden {\n  display: none;\n}\n\n.OT_dialog-button-block {\n  display: block;\n}\n\n.OT_dialog-no-natural-margin {\n  margin-bottom: 0;\n}\n\n/* Publisher and Subscriber styles */\n\n.OT_publisher, .OT_subscriber {\n  position: relative;\n  min-width: 48px;\n  min-height: 48px;\n}\n\n.OT_publisher .OT_video-element,\n.OT_subscriber .OT_video-element {\n  display: block;\n  position: absolute;\n  width: 100%;\n  height: 100%;\n\n  transform-origin: 0 0;\n}\n\n/* Styles that are applied when the video element should be mirrored */\n.OT_publisher.OT_mirrored .OT_video-element {\n  transform: scale(-1, 1);\n  transform-origin: 50% 50%;\n}\n\n.OT_subscriber_error {\n  background-color: #000;\n  color: #fff;\n  text-align: center;\n}\n\n.OT_subscriber_error > p {\n  padding: 20px;\n}\n\n/* The publisher/subscriber name/mute background */\n.OT_publisher .OT_bar,\n.OT_subscriber .OT_bar,\n.OT_publisher .OT_name,\n.OT_subscriber .OT_name,\n.OT_publisher .OT_archiving,\n.OT_subscriber .OT_archiving,\n.OT_publisher .OT_archiving-status,\n.OT_subscriber .OT_archiving-status,\n.OT_publisher .OT_archiving-light-box,\n.OT_subscriber .OT_archiving-light-box {\n  -ms-box-sizing: border-box;\n  box-sizing: border-box;\n  top: 0;\n  left: 0;\n  right: 0;\n  display: block;\n  height: 34px;\n  position: absolute;\n}\n\n.OT_publisher .OT_bar,\n.OT_subscriber .OT_bar {\n  background: rgba(0, 0, 0, 0.4);\n}\n\n.OT_publisher .OT_edge-bar-item,\n.OT_subscriber .OT_edge-bar-item {\n  z-index: 1; /* required to get audio level meter underneath */\n}\n\n/* The publisher/subscriber name panel/archiving status bar */\n.OT_publisher .OT_name,\n.OT_subscriber .OT_name {\n  background-color: transparent;\n  color: #ffffff;\n  font-size: 15px;\n  line-height: 34px;\n  font-weight: normal;\n  padding: 0 4px 0 36px;\n  letter-spacing: normal;\n}\n\n.OT_publisher .OT_archiving-status,\n.OT_subscriber .OT_archiving-status {\n  background: rgba(0, 0, 0, 0.4);\n  top: auto;\n  bottom: 0;\n  left: 34px;\n  padding: 0 4px;\n  color: rgba(255, 255, 255, 0.8);\n  font-size: 15px;\n  line-height: 34px;\n  font-weight: normal;\n  letter-spacing: normal;\n}\n\n.OT_micro .OT_archiving-status,\n.OT_micro:hover .OT_archiving-status,\n.OT_mini .OT_archiving-status,\n.OT_mini:hover .OT_archiving-status {\n  display: none;\n}\n\n.OT_publisher .OT_archiving-light-box,\n.OT_subscriber .OT_archiving-light-box {\n  background: rgba(0, 0, 0, 0.4);\n  top: auto;\n  bottom: 0;\n  right: auto;\n  width: 34px;\n  height: 34px;\n}\n\n.OT_archiving-light {\n  width: 7px;\n  height: 7px;\n  border-radius: 30px;\n  position: absolute;\n  top: 14px;\n  left: 14px;\n  background-color: #575757;\n  box-shadow: 0 0 5px 1px #575757;\n}\n\n.OT_archiving-light.OT_active {\n  background-color: #970d13;\n  -webkit-animation: OT_pulse 1.3s ease-in;\n  -moz-animation: OT_pulse 1.3s ease-in;\n  -webkit-animation: OT_pulse 1.3s ease-in;\n  -webkit-animation-iteration-count: infinite;\n  -moz-animation-iteration-count: infinite;\n  -webkit-animation-iteration-count: infinite;\n}\n\n.OT_mini .OT_bar,\n.OT_bar.OT_mode-mini,\n.OT_bar.OT_mode-mini-auto {\n  bottom: 0;\n  height: auto;\n}\n\n.OT_mini .OT_name.OT_mode-off,\n.OT_mini .OT_name.OT_mode-on,\n.OT_mini .OT_name.OT_mode-auto,\n.OT_mini:hover .OT_name.OT_mode-auto {\n  display: none;\n}\n\n.OT_publisher .OT_name,\n.OT_subscriber .OT_name {\n    left: 10px;\n    right: 37px;\n    height: 34px;\n    padding-left: 0;\n}\n\n.OT_publisher .OT_mute,\n.OT_subscriber .OT_mute {\n    border: none;\n    cursor: pointer;\n    display: block;\n    position: absolute;\n    text-align: center;\n    text-indent: -9999em;\n    background-color: transparent;\n    background-repeat: no-repeat;\n}\n\n.OT_publisher .OT_mute,\n.OT_subscriber .OT_mute {\n  right: 0;\n  top: 0;\n  border-left: 1px solid rgba(255, 255, 255, 0.2);\n  height: 36px;\n  width: 37px;\n}\n\n.OT_mini .OT_mute,\n.OT_publisher.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold,\n.OT_subscriber.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold {\n  top: 50%;\n  left: 50%;\n  right: auto;\n  margin-top: -18px;\n  margin-left: -18.5px;\n  border-left: none;\n}\n\n.OT_publisher .OT_mute {\n  background-image: url("+r+");\n  background-position: 9px 5px;\n}\n\n.OT_publisher .OT_mute.OT_active {\n  background-image: url("+n+");\n  background-position: 9px 4px;\n}\n\n.OT_subscriber .OT_mute {\n  background-image: url("+i+");\n  background-position: 8px 7px;\n}\n\n.OT_subscriber .OT_mute.OT_active {\n  background-image: url("+o+");\n  background-position: 7px 7px;\n}\n\n/**\n * Styles for display modes\n *\n * Note: It's important that these completely control the display and opacity\n * attributes, no other selectors should atempt to change them.\n */\n\n/* Default display mode transitions for various chrome elements */\n.OT_publisher .OT_edge-bar-item,\n.OT_subscriber .OT_edge-bar-item {\n  transition-property: to
1p, bottom, opacity;\n  transition-duration: 0.5s;\n  transition-timing-function: ease-in;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\n.OT_subscriber .OT_edge-bar-item.OT_mode-off,\n.OT_publisher .OT_edge-bar-item.OT_mode-auto,\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto,\n.OT_publisher .OT_edge-bar-item.OT_mode-mini-auto,\n.OT_subscriber .OT_edge-bar-item.OT_mode-mini-auto {\n  top: -25px;\n  opacity: 0;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\n.OT_subscriber .OT_edge-bar-item.OT_mode-off {\n  display: none;\n}\n\n.OT_mini .OT_mute.OT_mode-auto,\n.OT_publisher .OT_mute.OT_mode-mini-auto,\n.OT_subscriber .OT_mute.OT_mode-mini-auto {\n  top: 50%;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto {\n  top: auto;\n  bottom: -25px;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-on,\n.OT_subscriber .OT_edge-bar-item.OT_mode-on,\n.OT_publisher .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-auto,\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-auto,\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-mini-auto,\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-mini-auto {\n  top: 0;\n  opacity: 1;\n}\n\n.OT_mini .OT_mute.OT_mode-on,\n.OT_mini:hover .OT_mute.OT_mode-auto,\n.OT_mute.OT_mode-mini,\n.OT_root:hover .OT_mute.OT_mode-mini-auto {\n  top: 50%;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\n.OT_publisher:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\n.OT_subscriber:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto {\n  top: auto;\n  bottom: 0;\n  opacity: 1;\n}\n\n\n/* Contains the video element, used to fix video letter-boxing */\n.OT_widget-container {\n  position: absolute;\n  background-color: #000000;\n  overflow: hidden;\n}\n\n.OT_hidden-audio {\n  position: absolute !important;\n  height: 1px !important;\n  width: 1px !important;\n}\n\n/* Load animation */\n.OT_root .OT_video-loading {\n  position: absolute;\n  z-index: 1;\n  width: 100%;\n  height: 100%;\n  display: none;\n\n  background-color: rgba(0, 0, 0, .75);\n}\n\n.OT_root .OT_video-loading .OT_video-loading-spinner {\n  background: url("+s+") no-repeat;\n  position: absolute;\n  width: 32px;\n  height: 32px;\n  left: 50%;\n  top: 50%;\n  margin-left: -16px;\n  margin-top: -16px;\n  animation: OT_spin 2s linear infinite;\n}\n@keyframes OT_spin {\n  100% {\n    transform: rotate(360deg);\n  }\n}\n\n.OT_publisher.OT_loading .OT_video-loading,\n.OT_subscriber.OT_loading .OT_video-loading {\n  display: block;\n}\n\n.OT_publisher.OT_loading .OT_video-element,\n.OT_subscriber.OT_loading .OT_video-element {\n  /*display: none;*/\n}\n\n.OT_video-centering {\n  display: table;\n  width: 100%;\n  height: 100%;\n}\n\n.OT_video-container {\n  display: table-cell;\n  vertical-align: middle;\n}\n\n.OT_video-poster {\n  position: absolute;\n  z-index: 1;\n  width: 100%;\n  height: 100%;\n  display: none;\n\n  opacity: .25;\n\n  background-repeat: no-repeat;\n  background-image: url("+a+");\n  background-size: auto 76%;\n}\n\n.OT_fit-mode-cover .OT_video-element {\n  -o-object-fit: cover;\n     object-fit: cover;\n}\n\n/* Workaround for iOS freezing issue when cropping videos */\n/* https://bugs.webkit.org/show_bug.cgi?id=176439 */\n@media only screen\n  and (orientation: portrait) {\n  .OT_subscriber.OT_ForceContain.OT_fit-mode-cover .OT_video-element {\n    -o-object-fit: contain !important;\n       object-fit: contain !important;\n  }\n}\n\n.OT_fit-mode-contain .OT_video-element {\n  -o-object-fit: contain;\n     object-fit: contain;\n}\n\n.OT_fit-mode-cover .OT_video-poster {\n  background-position: center bottom;\n}\n\n.OT_fit-mode-contain .OT_video-poster {\n  background-position: center;\n}\n\n.OT_audio-level-meter {\n  position: absolute;\n  width: 25%;\n  max-width: 224px;\n  min-width: 21px;\n  top: 0;\n  right: 0;\n  overflow: hidden;\n}\n\n.OT_audio-level-meter:before {\n  /* makes the height of the container equals its width */\n  content: '';\n  display: block;\n  padding-top: 100%;\n}\n\n.OT_audio-level-meter__audio-only-img {\n  position: absolute;\n  top: 22%;\n  right: 15%;\n  width: 40%;\n\n  opacity: .7;\n\n  background: url("+c+") no-repeat center;\n}\n\n.OT_audio-level-meter__audio-only-img:before {\n  /* makes the height of the container equals its width */\n  content: '';\n  display: block;\n  padding-top: 100%;\n}\n\n.OT_audio-level-meter__value {\n  will-change: transform;\n  position: absolute;\n  top: -100%;\n  right: -100%;\n  width: 200%;\n  height: 200%;\n  transform: scale(0);\n  border-radius: 50%;\n  background-image: radial-gradient(circle, rgba(151, 206, 0, 1) 0%, rgba(151, 206, 0, 0) 100%);\n}\n\n.OT_audio-level-meter.OT_mode-off {\n    display: none;\n}\n\n.OT_audio-level-meter.OT_mode-on,\n.OT_audio-only .OT_audio-level-meter.OT_mode-auto {\n  display: block;\n}\n\n.OT_audio-only.OT_publisher .OT_video-element,\n.OT_audio-only.OT_subscriber .OT_video-element {\n  display: none;\n}\n\n\n.OT_video-disabled-indicator {\n  opacity: 1;\n  border: none;\n  display: none;\n  position: absolute;\n  background-color: transparent;\n  background-repeat: no-repeat;\n  background-position: bottom right;\n  pointer-events: none;\n  top: 0;\n  left: 0;\n  bottom: 3px;\n  right: 3px;\n}\n\n.OT_video-disabled {\n  background-image: url("+u+");\n  background-size: 33px auto;\n}\n\n.OT_video-disabled-warning {\n  background-image: url("+d+");\n  background-size: 33px auto;\n}\n\n.OT_video-disabled-indicator.OT_active {\n  display: block;\n}\n\n.OT_audio-blocked-indicator {\n  opacity: 1;\n  border: none;\n  display: none;\n  position: absolute;\n  background-color: transparent;\n  background-repeat: no-repeat;\n  background-position: center;\n  pointer-events: none;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n}\n\n.OT_audio-blocked {\n  background-image: url("+f+");\n  background-size: 90px auto;\n}\n\n.OT_container-audio-blocked {\n  cursor: pointer;\n}\n\n.OT_container-audio-blocked.OT_mini .OT_edge-bar-item {\n  display: none;\n}\n\n.OT_container-audio-blocked .OT_mute {\n  display: none;\n}\n\n.OT_audio-blocked-indicator.OT_active {\n  display: block;\n}\n\n.OT_video-unsupported {\n  opacity: 1;\n  border: none;\n  display: none;\n  position: absolute;\n  background-color: transparent;\n  background-repeat: no-repeat;\n  background-position: center;\n  background-image: url("+h+");\n  background-size: 58px auto;\n  pointer-events: none;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  margin-top: -30px;\n}\n\n.OT_video-unsupported-bar {\n  display: none;\n  position: absolute;\n  width: 192%; /* copy the size of the audio meter bar for symmetry */\n  height: 192%;\n  top: -96% /* half of the size */;\n  left: -96%;\n  border-radius: 50%;\n\n  background-color: rgba(0, 0, 0, .8);\n}\n\n.OT_video-unsupported-img {\n  display: none;\n  position: absolute;\n  top: 11%;\n  left: 15%;\n  width: 70%;\n  opacity: .7;\n  background-image: url("+h+");\n  background-repeat: no-repeat;\n  background-position: center;\n  background-size: 100% auto;\n}\n\n.OT_video-unsupported-img:before {\n  /* makes the height of the container 93% of its width (90/97 px) */\n  content: '';\n  display: block;\n  padding-top: 93%;\n}\n\n.OT_video-unsupported-text {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  text-align: center;\n  height: 100%;\n  margin-top: 40px;\n}\n\n.OT_video-unsupported.OT_active {\n  display: block;\n}\n\n.OT_mini .OT_video-unsupported,\n.OT_micro .OT_video-unsupported {\n  position: absolute;\n  width: 25%;\n  max-width: 224px;\n  min-width: 21px;\n  top: 0;\n  left: 0;\n  overflow: hidden;\n  background: none;\n  bottom: auto;\n  right: auto;\n  margin: auto;\n}\n\n.OT_mini .OT_video-unsupported:before,\n.OT_micro .OT_video-unsupported:before {\n  /* makes the height of the container equals its width */\n  content: '';\n  display: block;\n  padding-top: 100%;\n}\n\n.OT_mini .OT_video-unsupported-bar,\n.OT_micro .OT_video-unsupported-bar,\n.OT_mini .OT_video-unsupported-img,\n.OT_micro .OT_video-unsupported-img {\n  display: block;\n}\n\n.OT_mini .OT_video-unsupported-text,\n.OT_micro .OT_video-unsupported-text {\n  display: none;\n}\n\n.OT_hide-forced {\n  display: none;\n}\n\n.OT_ModalDialog {\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  right: 0px;\n  bottom: 0px;\n  z-index: 1000;\n  background-color: rgba(0, 0, 0, 0.2);\n}\n\n#tb_alert {\n  position: fixed;\n  width: 570px;\n  font-family: \"Lucida Grande\", Arial;\n  top: 50%;\n  left: 50%;\n  margin-top: -75px;\n  margin-left: -285px;\n}\n\n#tb_alert * {\n  box-sizing: border-box;\n}\n\n#tb_alert .OT_alert {\n  border-top-right-radius: 5px;\n  border-bottom-right-radius: 5px;\n  background-color: #333;\n  position: relative;\n  padding: 30px;\n  overflow: visible;\n  margin-left: 70px;\n  border-bottom-color: rgba(255, 255, 255, 0.1);\n  border-left-color: rgba(255, 255, 255, 0.1);\n\n  background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2)), linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2));
1\n\n  background-image: -ms-linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2)), -ms-linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2));\n\n  background-size: 4px 4px;\n  background-position: 0 0, 2px 2px;\n  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);\n  border: 1px solid rgba(255, 255, 255, 0.3);\n}\n\n#tb_alert .OT_alert-exclamation {\n  background-color: #9c1408;\n  background-image: linear-gradient(0deg, #dd0c0a 0%, #9c1408 100%);\n  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);\n  border: 1px solid rgba(255, 255, 255, 0.3);\n\n  margin: -1px 0;\n\n  font-family: MS Trebuchet;\n  font-weight: bold;\n  font-size: 60px;\n  text-shadow: -1px -1px 2px rgba(0, 0, 0, 0.5);\n\n  color: white;\n  width: 65px;\n  position: absolute;\n  padding: 42px 0;\n  text-align: center;\n  left: -70px;\n  top: 0;\n  bottom: 0;\n  border-top-left-radius: 5px;\n  border-bottom-left-radius: 5px;\n\n  border-bottom-color: transparent;\n  border-left: none;\n  border-right: none;\n}\n\n#tb_alert .OT_alert-exclamation:after,\n#tb_alert .OT_alert-exclamation:before {\n  content: \" \";\n  position: absolute;\n  right: -24px;\n  top: 40%;\n  border: 12px solid transparent;\n  border-left-color: #9c1408;\n}\n\n#tb_alert .OT_alert-exclamation:before {\n  border-left-color: #bc3428;\n  top: 39%;\n}\n\n#tb_alert .OT_alert-body {\n  color: #c8c5c5;\n  margin: 0;\n  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);\n  font-size: 14px;\n  line-height: 1.3em;\n}\n\n#tb_alert .continue-text {\n  margin-top: 12px\n}\n\n#tb_alert > * a {\n  color: #a7d8df;\n  text-decoration: none;\n}\n\n#tb_alert .OT_alert-header {\n  font-size: 24px;\n  padding-bottom: 5px;\n  color: #aaa;\n  font-weight: bold;\n  position: relative;\n  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);\n  margin: 0;\n}\n\n#tb_alert .OT_alert-header::before {\n  content: attr(data-text);\n  position: absolute;\n  left: 0;\n  color: white;\n  -webkit-mask-image: -webkit-gradient(\n    linear,\n    left top, left bottom,\n    from(rgba(0, 0, 0, 1)),\n    color-stop(60%, rgba(0, 0, 0, 0)),\n    to(rgba(0, 0, 0, 0))\n  );\n}\n\n#tb_alert .OT_alert-close-button {\n  position: absolute;\n  right: 8px;\n  top: 5px;\n  background-color: #000;\n  color: #666;\n  border: none;\n  font-size: 20px;\n  /** Hack to bring it up to the proper line top */\n  line-height: 14px;\n  padding: 0;\n  padding-bottom: 3px;\n  cursor: pointer;\n}\n\n#tb_alert #section-mobile-browser,\n#tb_alert #section-supported-mobile-browser {\n  width: 200px;\n  top: 0px;\n  left: 25%;\n  margin-top: 0;\n  margin-left: 0;\n}\n\n@media all and (max-height: 300px) {\n  #tb_alert {\n    width: 100%;\n    height: 100%;\n    left: 0;\n    top: 0;\n    margin-left: 0;\n    margin-top: 0;\n  }\n  #tb_alert #section-mobile-browser,\n  #tb_alert #section-supported-mobile-browser {\n    margin-left: 0;\n    margin-top: 10px;\n    left: 0;\n  }\n}\n\n#tb_alert #section-normal-install,\n#tb_alert #section-upgrade-install,\n#tb_alert #section-mobile-browser,\n#tb_alert #section-supported-mobile-browser {\n  display: none;\n}\n",""])},function(l,E,e){"use strict";l.exports=function(n){var i=[];return i.toString=function(){return this.map(function(s){var a=function t(n,i){var o=n[1]||"",s=n[3];if(!s)return o;if(i&&"function"==typeof btoa){var a=function r(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}(s),c=s.sources.map(function(u){return"/*# sourceURL="+s.sourceRoot+u+" */"});return[o].concat(c).concat([a]).join("\n")}return[o].join("\n")}(s,n);return s[2]?"@media "+s[2]+"{"+a+"}":a}).join("")},i.i=function(o,s){"string"==typeof o&&(o=[[null,o,""]]);for(var a={},c=0;c<this.length;c++){var u=this[c][0];null!=u&&(a[u]=!0)}for(c=0;c<o.length;c++){var d=o[c];(null==d[0]||!a[d[0]])&&(s&&!d[2]?d[2]=s:s&&(d[2]="("+d[2]+") and ("+s+")"),i.push(d))}},i}},function(l,E,e){"use strict";l.exports=function(r,n){return"string"!=typeof r?r:(/^['"].*['"]$/.test(r)&&(r=r.slice(1,-1)),/["'() \t\n]/.test(r)||n?'"'+r.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':r)}},function(l,E){l.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAcCAMAAAC02HQrAAAA1VBMVEUAAAD3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj39/j3+Pj3+Pn4+Pk/JRMlAAAAQ3RSTlMABAUHCQoLDhAQERwdHiAjLjAxOD9ASFBRVl1mbnZ6fH2LjI+QkaWqrrC1uLzAwcXJycrL1NXj5Ofo6u3w9fr7/P3+d4M3+QAAAQBJREFUGBlVwYdCglAABdCLlr5Unijm3hMUtBzlBLSr//9JgUToOQgVJgceJgU8aHgMeA38K50ZOpcQmTPwcyXn+JM8M3JJIqQypiIkeXelTyIkGZPwKS1NMia1lgKTVkaE3oQQGYsmHNqSMWnTgUFbMiZtGlD2dpaxrL1XgM0i4ZK8MeAmFhsAs29MGZniawagS63oMOQUNXYB5D0D1RMDpyoMLw/fiE2og/V+PVDR5AiBl0/2Uwik+vx4xV3a5G5Ye68Nd1czjUjZckm6VhmPciRzeCZICjwTJAViQq+3e+St167rAoHK8sLYZVkBYPCZAZ/eGa+2R5LH7Wrc0YFf/O9J3yBDFaoAAAAASUVORK5CYII="},function(l,E){l.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAADcElEQVRIiaWVXWhcRRTHf7NNd2aDtUKMIjTpg4ufFIuiUOmDEWm0Vi3VYhXRqIggQh4sWJFSig9+oOhTKSpIRUWMIBIr2kptoTbgU6ooxCiIjR+14kcJmf9sNceHnd3ebnc3Uv9wuXfOzPzmnDMz5zozGwdWAbc65w5
1RUJQ8cC2wDJgFJioh/MJCMrNxq2vOzK4HmIvRRemxKP0RJWt53o7S+d2Yzsx6gQ+AIUDAnUqpBLzXZd4RYFUlhB/bdZacc3PAOmAcCMC7wfvFwLNdoAPAyx09bXyYWRl4E7gDmAdGlNKFwLYu8GolhO9O87RJd64GbMrgEvB68P4osMWdXLtVV7czlooNpVRWSs8DO7NpR/B+3rBHsvetCgtCMTxwQCm9BbyQrc8F7/uBex3uRCeXO0PrUZ4NfKyUPgWeyj3bg/crDNsIRGwBaJQGorQ3Svdn2wHgc2BUKb0DPJHtjwfvbwRucc7tz+N+i9LFUdoXpfVN36I0CVwBTFI/q9e1LPxT8P4qYEdu70q12mYzWw1MYQzjeJF6zq+shHC4B7jklOBPP/TzSunh4P0DwKvAfb5c9krpe+CcwsEoZdbhEvBM9wxRAl5RShcA9wAngE3B+8tLpdLuwrhp4MNmK0pfRWkySr7NXS8+L5nZbWZWy/Vin1IaitJnUTqvwevJ71lgSSWEFKUfHG7Q2m/xqFJaGry/GXgfGPLl8mJgrXPur2JoUC8Qy3OpG+sAbGhEKT0ErAWOA6uBPWbW1wr9BOgFbgKezot0kAPYqJQA1gC/A9cA+82svzksSn1R+jNKX0SpnM/e1x3yqig92JhrZivM7FjO8bSZLSuCR/Ok16K0KMNHojQWpYko7Y7S1igN5PE3ROl4lNaZ2UVmNpPBU01orvZvZPCeKFXbBR+lEKVtUapFaSZKg9njqpl9aWYTrmXCImA7sCWb9lK/jj9TrwkrgA1AH3AQuKsSwkzbrLfxpgpsBtYDxf/R3xm2ExirhNCuHHZXTsmRwiat+S/zSt06eysVA/4pmGr/G3qm6ik28v29FKgCg8BS6pvS0KNRGgZ+Bb4FpsxsOkfUlMuwDcBWYOUZOHYM2AU8WQmhBifDv70O7PjX7KZ+4G7g3FM8zd6uBIaBy4AqxnIcZwFLCovPAhE4Sj38b4BDwEeVEFKD9S94Khjn486v3QAAAABJRU5ErkJggg=="},function(l,E){l.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAATCAYAAAB7u5a2AAABx0lEQVQ4jaWUv48NURiGn3ONmCs32ZBd28ht1gqyZAkF21ylQkEiSp2ehpDlD1BoFGqqVdJohYKI7MaPxMoVNghCWMF+7ybLUewnOXfcMWO9yeQ857zne8+XmZOBGjJpr0kvTIomvTZpS526UCO4DUwD64FjwCFgqZnnR+oc8LfgzKQ73vGsr42ZtGjSQFV9o8KfBCacZwCaef4YmAf2rzjcpN3A2WSpm/AssKcqPDNpDBjs410CViXzTwk/A7b1C4wxDgOngAsZcAXY2buDfp/6S4F3lDS8DjgBzDWAjX/Y/e/QgYS/AhsKHa+OMQ6GEJ4Cj4BOAxgq6aCowyZtdf4OtAr+FHDO+R4wWnVbihr3cQnICt4boO38GWj9a/icjwOACt4m4K3zEPA+AxaAtTWCnwN3lzHkEL8V/OPAGud9wK2GF9XR1Wae/1zG2AI+pGYI4VUIoRtjHAc2A9cz4LRPevYCZ+i9/4sJt4GXJU10gaPAzdI2TTro/5Tfz8XEe2LSZGmxq/SDNvP8BnA5WRrx4BwYBe6vONx1EnjovGvBLAAd4Adwuyq8UiaNmDTvr+a8SQ9MuvbfwckBHZPe+QEfTdpep+4XZmPBHiHgz74AAAAASUVORK5CYII="},function(l,E){l.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAACtklEQVQ4jZ2VSYiURxTHf+/T9Nc9iRrBuYySmIsXUU9iFMEFERRBvAjJLUQi5ioiHvSScfTmgqC4XAT1ZIgLuJHkICaaQAgKI2hAUBT30bjUq7bbv4eukXK029F3+eqtv/fqK6qQdEnSNUmT6CDB/bvgfjO4N9zj2RD8007xg1IABkwEzkma0qb4PGAPMBZYLtSD8eNwAEjqTlNI0gNJM4YU7w7ut4O7gvuhZFsR3C8NC5BBLiTIY0mzM8AvqbiC++pk+zLpE95XuwAws3vAQuBPYDRwWtL84P4tsDSLv5oaug4EYOawAMF9jMdoLxqNZcDvQA04UVYqL4G/svj7AF21mhJscrvCksYBFO7xc2AAGGg2mrdjvf4rcAyomNn+slLZmUEGBgsYdh945xZJmgvckDSrEJpK6ySBgV6q12O8ABwGPjGzfWWlsjdN9rpjoSfA+DYDXARGAksK4Is3XC1Ub4z1f4CDQGFmu6tleQSYk0U+p7WVeefLJc00s4fAeWB6Qeunvj0m2ugx9gO7kmlrtSxvBfcy6fXUZS6rgG/S+jLQUwCVNmMC9HqM14EtSe+rluWazN8YEv8IqKZ1E1qnaIDO0ucx3gX6kv6TpM3AM+D/IbGjgP60/gq4WQA33gMA2OQxPgHWJX1ttSwL4FAeZGYLgB2SasBs4A8L7qOBf9M0uXQB3a+TMYSmVctyDrA9mfcBK82smSdKWgCcAaa1bTm4fxbc/8uuCQX3RanAD5Ka6Wo5IGnE0HxJPZ03pQX5Org3MsD3AO5xXLPZXJ9BjkrqdFg6QjZkgG3Jtsw93pG0VFI9QU5K6voYQBHcTydAfwheBI9HgvvPAJIWS3qeIL9JGvUxkO7gfi1BrqTvwkG/pPmSnibIqTzXPgAyEVgBjAEu1qrVPbk/PVTHgb/NbPGg/RVIzOQqzSTBaQAAAABJRU5ErkJggg=="},function(l,E){l.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAtMjAgMjQwIDI0MCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4Mj0iMCIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjA4Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImMiIHgxPSIxIiB4Mj0iMCIgeTE9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMDgiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjE2Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgyPSIwIiB5MT0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii4xNiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMzMiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZSIgeDI9IjEiIHkxPSIxIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjMzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii42NiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJmIiB4Mj0iMSIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuNjYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiLz48L2xpbmVhckdyYWRpZW50PjxtYXNrIGlkPSJnIj48ZyBmaWxsPSJub25lIiBzdHJva2Utd2lkdGg9IjQwIj48cGF0aCBzdHJva2U9InVybCgjYSkiIGQ9Ik04Ni42LTUwYTEwMCAxMDAgMCAwMTAgMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNiKSIgZD0iTTg2LjYgNTBBMTAwIDEwMCAwIDAxMCAxMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2MpIiBkPSJNMCAxMDBhMTAwIDEwMCAwIDAxLTg2LjYtNTAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2QpIiBkPSJNLTg2LjYgNTBhMTAwIDEwMCAwIDAxMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2UpIiBkPSJNLTg2LjYtNTBBMTAwIDEwMCAwIDAxMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2YpIiBkPSJNMC0xMDBhMTAwIDEwMCAwIDAxODYuNiA1MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwIDEwMCkiLz48L2c+PC9tYXNrPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4PSItMjAiIHk9Ii0yMCIgbWFzaz0idXJsKCNnKSIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg=="},function(l,E){l.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDcxIDQ2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIwIiB4Mj0iMCIgeTE9IjAiIHkyPSIxIj48c3RvcCBvZmZzZXQ9IjY2LjY2JSIgc3RvcC1jb2xvcj0iI2ZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48cGF0aCBmaWxsPSJ1cmwoI2EpIiBkPSJNNzkgMzA4YzE0LjI1LTYuNSA1NC4yNS0xOS43NSA3MS0yOSA5LTMuMjUgMjUtMjEgMjUtMjFzMy43NS0xMyAzLTIyYy0xLjc1LTYuNzUtMTUtNDMtMTUtNDMtMi41IDMtNC43NDEgMy4yNTktNyAxLTMuMjUtNy41LTIwLjUtNDQuNS0xNi01NyAxLjI1LTcuNSAxMC02IDEwLTYtMTEuMjUtMzMuNzUtOC02Ny04LTY3cy4wNzMtNy4zNDYgNi0xNWMtMy40OC42MzctOSA0LTkgNCAyLjU2My0xMS43MjcgMTUtMjEgMTUtMjEgLjE0OC0uMzEyLTEuMzIxLTEuNDU0LTEwIDEgMS41LTIuNzggMTYuNjc1LTguNjU0IDMwLTExIDMuNzg3LTkuMzYxIDEyLjc4Mi0xNy4zOTggMjItMjItMi4zNjUgMy4xMzMtMyA2LTMgNnMxNS42NDctOC4wODggNDEtNmMtMTkuNzUgMi0yNCA2LTI0IDZzNzQuNS0xMC43NSAxMDQgMzdjNy41IDkuNSAyNC43NSA1NS43NSAxMCA4OSAzLjc1LTEuNSA0LjUtNC41IDkgMSAuMjUgMTQuNzUtMTEuNSA2My0xOSA2Mi0yLjc1IDEtNC0zLTQtMy0xMC43NSAyOS41LTE0IDM4LTE0IDM4LTIgNC4yNS0zLjc1IDE4LjUtMSAyMiAxLjI1IDQuNSAyMyAyMyAyMyAyM2wxMjcgNTNjMzcgMzUgMjMgMTM1IDIzIDEzNUwwIDQ2NHMtMy05Ni43NSAxNC0xMjBjNS4yNS02LjI1IDIxLjc1LTE5Ljc1IDY1LTM2eiIvPjwvc3ZnPg=="},function(l,E){l.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNzkgODYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0iTTkuNzU3IDQwLjkyNGMzLjczOC01LjE5MSAxMi43MTEtNC4zMDggMTIuNzExLTQuMzA4IDIuMjIzID
1MuMDE0IDUuMTI2IDI0LjU4NiAzLjYyNCAyOC43MTgtMS40MDEgMS4zMDEtMTEuNjExIDEuNjI5LTEzLjM4LTEuNDM2LTEuMjI2LTguODA0LTIuOTU1LTIyLjk3NS0yLjk1NS0yMi45NzV6bTU4Ljc4NSAwYy0zLjczNy01LjE5MS0xMi43MTEtNC4zMDgtMTIuNzExLTQuMzA4LTIuMjIzIDMuMDE0LTUuMTI2IDI0LjU4Ni0zLjYyNCAyOC43MTggMS40MDEgMS4zMDEgMTEuNjExIDEuNjI5IDEzLjM4LTEuNDM2IDEuMjI2LTguODA0IDIuOTU1LTIyLjk3NSAyLjk1NS0yMi45NzV6Ii8+PHBhdGggZD0iTTY4LjY0NyA1OC42Yy43MjktNC43NTMgMi4zOC05LjU2MSAyLjM4LTE0LjgwNCAwLTIxLjQxMi0xNC4xMTUtMzguNzctMzEuNTI4LTM4Ljc3LTE3LjQxMiAwLTMxLjUyNyAxNy4zNTgtMzEuNTI3IDM4Ljc3IDAgNC41NDEuNTE1IDguOTM2IDEuODAyIDEyLjk1IDEuNjk4IDUuMjk1LTUuNTQyIDYuOTkxLTYuNjE2IDIuMDczQzIuNDEgNTUuMzk0IDAgNTEuNzg3IDAgNDguMTAzIDAgMjEuNTM2IDE3LjY4NSAwIDM5LjUgMCA2MS4zMTYgMCA3OSAyMS41MzYgNzkgNDguMTAzYzAgLjcxOC0yLjg5OSA5LjY5My0zLjI5MiAxMS40MDgtLjc1NCAzLjI5My03Ljc1MSAzLjU4OS03LjA2MS0uOTEyeiIvPjxwYXRoIGQ9Ik01LjA4NCA1MS4zODVjLS44MDQtMy43ODIuNTY5LTcuMzM1IDMuMTM0LTcuOTIxIDIuNjM2LS42MDMgNS40ODUgMi4xNSA2LjI4OSA2LjEzMi43OTcgMy45NDgtLjc1MiA3LjQ1Ny0zLjM4OCA3Ljg1OS0yLjU2Ni4zOTEtNS4yMzctMi4zMTgtNi4wMzQtNi4wN3ptNjguODM0IDBjLjgwNC0zLjc4Mi0uNTY4LTcuMzM1LTMuMTMzLTcuOTIxLTIuNjM2LS42MDMtNS40ODUgMi4xNS02LjI4OSA2LjEzMi0uNzk3IDMuOTQ4Ljc1MiA3LjQ1NyAzLjM4OSA3Ljg1OSAyLjU2NS4zOTEgNS4yMzctMi4zMTggNi4wMzQtNi4wN3ptLTIuMDM4IDguMjg4Yy0uOTI2IDE5LjY1OS0xNS4xMTIgMjQuNzU5LTI1Ljg1OSAyMC40NzUtNS40MDUtLjYwNi0zLjAzNCAxLjI2Mi0zLjAzNCAxLjI2MiAxMy42NjEgMy41NjIgMjYuMTY4IDMuNDk3IDMxLjI3My0yMC41NDktLjU4NS00LjUxMS0yLjM3OS0xLjE4Ny0yLjM3OS0xLjE4N3oiLz48cGF0aCBkPSJNNDEuNjYyIDc4LjQyMmw3LjU1My41NWMxLjE5Mi4xMDcgMi4xMiAxLjE1MyAyLjA3MiAyLjMzNWwtLjEwOSAyLjczOGMtLjA0NyAxLjE4Mi0xLjA1MSAyLjA1NC0yLjI0MyAxLjk0NmwtNy41NTMtLjU1Yy0xLjE5MS0uMTA3LTIuMTE5LTEuMTUzLTIuMDcyLTIuMzM1bC4xMDktMi43MzdjLjA0Ny0xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+PC9zdmc+"},function(l,E){l.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAINUlEQVR42u2aaUxUVxTHcRBmAAEBRVTK4sKwDIsg+wCK7CqIw1CN1YobbbS2qYlJ06Qx1UpdqMbYWq2pSzWmH6ytNbXWJY1Lq7VuqBERtW64V0XFLYae0/xvcp3MMAMzDz6IyT/ge2ce5/7ucpY3Ts3NzZ1ygF57AJ0gO0G2jyZPmdbFyclJSAV1EeoEaUUSLGdSV5KLLFxzFmA7QVqGqDqjixhWkxCVeyRVl38wM6bwj6yYItYK47BAuu9B0gCqs6Ng2r494KQtkj/Dz2jHraw6qw2fdSE4rNmcCPCvZONP8iF1I6kdBdMaQJWZLeJqRWa2kPJAxXY+GxE+zxLI03GRh8lGSwoi9WCY8FWlCEh+8JOnT7MfPGjMuXX7Tt61hoaCi/9cKmKdv3BxeEtim/UbNpnbQiqF4MmT7kqrbr4lkMcTo46TTSpJB5g+8NHuVWnWuaampvhmO/7duHmrGluoO4C6OsJZGRrkDIld43ZqUOTnlkDSmXmabAoBU0vqBf+6KgFSxQ9++uzZ8rZApM81TJ8xM5me0Z/UF7PuBmdVdkGEb5gYDeQmyZNW3SJLIP9Kj64lGyMpmxRN6sOfIbkoAhKOdnv2/PmB1kB88eLFo+olyyrps3rSINIAzLonnqlqK8R9w+L86vtrt5L2nhug3Vc3ULu/Liz8AOuXESlZZONH6kmr7gtLIA9lRNeRzVukAvj3BslLnJNKgfScO69K+/Lly0ZbQW7e8tNK+pwBjqaSIjDrXgJkW1ciAZvbQjQ+RDahpBBKd5ZZsqN758hmImk4KQHnpDd8UwSkCyJarx07d4+3BeKJmlMHyX4qaRxpBCmNFE4KENvHDpAutVERn1kCVBMfeRRgYvZnx62wZPdnZkw92VQA5GClQXYRBze2S+iJmpPVVoJLA9l9QKokjcWKTCT1R5rhLg70NuSsziT16diIKkuAjibrTpJNDkn/e17CahtAjlAWJAYkb29Sb1LE9Rs391kILk8mVkyuIpuZcLKUlEmKkra1WuSTNuesEPzwoEploSVAh9Oiz+BIyd9dOHhtx4OEpFpVg6gbNK3yXX1j48N6U5Dz5i/gc/FDrMY3sTLiSMEkXxGxzUEUAGnbxlPaksMlHUXWAlHS8URCPseSohZbCSLjSSU7ixLXdzhIWVKq4Y7t2a/2bN0qGeKly1fYsVmk6RgIDz4J0bonyUOcjeYqm/8hRoYbWkigV2NH9CHAS60EkUkkw47hSRs6FqT1LR5AVcsrueXlK1d5AO+RpmBrZZEiefByytPCanRGNLZY0uF52gNDYr9sCRB8MHY0SJu2OJWKS2WQV65e4y31DmkCImEi0hBfufRime0RIhpbKen0/Ny9OYNW2ghyYytABjNIaxNuKttAWk6HPLn0k0FevdZwFinPWFIuKZbUV16NVko6jbWSDoPO3pOf8K0jQWLSQ0S9bdpkYck+m7vfWpAiHfKgBsZiGSSt0FqcTeU8WETqAHE2CgcAVd3Gkm4MD3xXYeI6B4NMItvKbcUpQ9gP+KMWnSsW+TaYJtoo+avBWLoKoK0CCSDud+7eXWQGZAXqV3YoQjQCfixJ8+fzj9ta3JHhlUeJ8wJOY2ws6eRKpPS3oqTvHAESEz9ya0naXL5WH6pt3FqSOhTHkTcKEXc6k1POh4Q9YJu/03TT4a8PoGMFI4i2EqSbOZAYaBkpCyD92RkG6KCSbjI/H0HEISBnlOZPFdcEzI2GTO4KBZICGKyAKLTEmJOB2txf5MbgohBINCl4FTqmpJMB2W+HiRn1Q2l6lXyPmiEP6VVE2TfGoaMYrHyPdtAnyI0jEOn9RLWmNEhvBBE7SjpFQZaShtLK+1S+T12lRwxUvrZlVPp8jE1PikeO7C/nyEqBDCB1t7+kUx4kKUWclea0yZC5BIGpiJSNSD9QgFR0RQKkL6KxHSWdsiARHJNYewoGrzG1/bk4dTPSunL2EyDjcbb7MQ+lQfZmkKiN7SjpFAM5CWAyGcwyY84YsZ1lUcbRNNtQMAdtQWGvQ0DyVjzYAKQfQFodeAeC1C8vzymXIZqD+ZEh/2OyLSalS/3VbnJZ+VqDXGjMrTCFuK4s66vVZUNfqaDolcbjOcb899sLpEE+I20GifywXe2QR3KElu99PzqjGufhREqB1pjCnG3IL3fY1v733r2FMsiGhutn0LAoJWWIGbPxjKwgjUbF0m52mPhigrpdXOecEq9pR6MkHbu2LOtrcZ9y3d0ODTb15y9MePz48aF79+8fvXnr9sljx2u2I7KNxDuaMPGVECoRs7mC4eT7SIruFNfNHK15MKuM2evwNq+4qjxvGnd5CHwNNynawW4cOlUZdG8b55IIJHmkItwrZHH6QxB3OSL9kTtAGpIvZiQB3Z4SKBfXQtEE9sashWAW87Bt3sYZNR6zn4uzJwWDKUKXfaKCdqUoBpLxSjYe9nqGiwWRBGipuGZ3Qm76itYLbbJI/PEhUApfw73uOIy9xfse3M9F9BuFJHcYrseSouGkHtCVtkuGTTikI8XgZzhg9SeF4VqcvSWiaSvNHQ8JwkNjIfEHemCmNLD1RaEfLs18mlgNuN6PFALHo7CyU5W2g00gFAQF4ozvibH04muwDbWraSFAyt/AAMzewgGR8uCeWn77xzBxPxgzPRCDDMZ14bQ/3jqGKGoHf2Hjgx3kw5LbaJDYWb52t9FMgw4AuWNWukNeuOYqOsmQi2jgws4PA/DD/z0B2x0/veCs4naw0cgybezid7X9jV3rX2RSs0wfLkll4pBGcgifg+NYxe1kJ2ycTaRq66uG/wBOl0vjcw70xwAAAABJRU5ErkJggg=="},function(l,E){l.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAGMElEQVR4Ae2aA7D0yBaAc7oH12vbRmlLaxYWb23btm3btm2899a2bWuYtPZ01cmtU9lJrib315yqr9I3Oem/5
1/s7acwEnehEJzoxCcX2O+wEeIgRBDDaGjAZOgQ6ihRpLklHZDJIXK1WWymMIhGGkVBKCWMM+Iv/f/b5t7faYtM/sGgIS7j8RNLjceUVl41GvGN1BFiHy9sgtRWaYbhvuVQ6o1VOvV5/tLe3dyssKoZuh8xClkDEi2MMS6ZjR0cScxdK/+HgnJsmLccYOx0e/PUGUqfTJDEHkV5go9lcMQoj4R8RpSIRRUr4a9baTJFCCNfqESKJ7RYJibK0xoi05EhFRTxMi1Rit6xHAuLaKRLwEVi6q1x+EhlVpd3d3Wfh4VQkQhRhxthYLg7SRGqdLlIp7UVOHf+JhEhEMscUolVje3p63saeeOFoKsT7fjj++BNuw2I/0ouUENmGaQcQEilQvUU6xuWC0kqmVWCt8df6kG7WLoFA20VSCOyNh0RKPT+SyrTWtQsvuvTYCy84z3+oAdbgAiLGIvHjTz6bFuu/B3lKKfVkFKknwih6EnnipZdfXQZzepAupXSGSCfwUGZtkrx3t/0dSQGnnXbmdocdetArQoj+4VR23wMP3bj/vnv9Sv/rBmkish09ca655thHSrlWq4TFF1vkNDxsgjiUnPqZnHPABIq47jx7pPMcecShfz7x1DO7D6eit99576X1113nVd8rqLGAuDaNitJonTGIqHgQGQjDsJglMrUH5iDSEQbRa6y2yrNvv/PuWVmV/PTzLz8steTit1B9FtGJeZrJksmWdBzBMcami4xUkaY1A1Qe94WIaPGBApJhaERrLrXkElf8+NPPz6YMLs1DDjn0Wn9PnI/UiQadM4jNEkhzVsEGE8nIHESM1j5/KqRX+/IEiOQ/yifNBlEkpnb00cccesbpp13T3983H88/48xzrrvm6it/8U5JXgX5G6nSvSq1R5LATR7aYGkwMG1RSwkWABH+4jUb3vT/uJ1Z0xpjraTBRltrxUQhksIRmgTJyy69+Pv99tv3qYX6FxgU+fU33352xGEHf5wisU7nNWJpZRMkAjZ6aIN1mwV7h29Jo2wCHlveu/GV169z65E+T6koexCh6c+EEiky3lnxQKFjUeVyOeI5AOBzIiayRhJryd7YYnkIHgvB0qk9Tdql6N3XH4bRUIOIIIKJSiRb0hkSEpZKRd1CpEq8GxtIyCVmDSgFl94GacTgaJw1rUlYhYng0c4ewaUsmKRIJjpiqMSOCh9QeI+UYECmtQIsxEu6OorEcv6Rl0gu0woh8MhFkmSCTXVI4pC704WCFRJvSRNJSzrMMEZO2iKZTCHAZYnmvXCny7ed5vfZK3viHSBdIFCKEFj2+nt+73nw8m2uedcLJlktA++VNMEPaR45aYukcKnnCfY3/DFbZS8t7eHxNgsPM0N1hXhJJwwM1QbpoQFlog2R13a/zBxEYHAQEUYUM6qiVwEyBYoM6JFNF2kFLelI5KQf+fVI4dJFCguDS7oAyx2R6SFQJKRedSDj/cMg/RXQ6ZE05GSIDAaXdCi1I3L021SQWNJ1RLY5OiIdL4/yvuw8ADfWPFrSciaMyH8tEQPwf1uGG54g5+KlJGTmsrxsQdl5PKidnPFe2QS///7Hu+VS6WX/HYnf0sevGL7lXydwod2/9DykZq0s5yff0sgSWCigNOH7TPHL7ufj+/TH8P/+qYpL4HkBDiRYpEXeM8/89/9zzjn7EtY64dfd1nqccM7Bs8+9MKy8555/8TnKS+5MufH6EZVASkgPzf+mJXroet17JirU0ALST3nT0y5ONyLpeo1y64ih+vuQfsoTOeRFSJXa+SvyB90TUmdw49EjLaKpMQ0mzEeTzkWsd/oI6fzfiKM8gWg6X6OjpXstu5ZHnmIb0GFiu29MIUfUewkmVrEN3RqVQ/bY8FzNcquMBv/pCNUZ5pHHem01KdN/I/DG66/lLhKSvTO5M84kav5C5z2ZfyAivi9i9VGd45RH7UWJbjwGG/7NYsRECt7jiOToHedKAui8SW4CsxyRc54mKH/8f7ELhCCACyNcIl/wI+FaAJyc8yzRtinQPzWzuFZrFHq/AAAAAElFTkSuQmCC"},function(l,E){l.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjkwIj48ZGVmcz48cGF0aCBkPSJNNjcgMTJMNi40NDggNzIuNTUyIDAgMzFWMThMMjYgMGw0MSAxMnptMyA3bDYgNDctMjkgMTgtMzUuNTAyLTYuNDk4TDcwIDE5eiIgaWQ9ImEiLz48L2RlZnM+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSI5MCIgcng9IjM1IiByeT0iNDUiIG9wYWNpdHk9Ii41Ii8+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNikiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik0zOS4yNDkgNTEuMzEyYy42OTcgMTAuMzcgMi43ODUgMTcuODk3IDUuMjUxIDE3Ljg5NyAzLjAzOCAwIDUuNS0xMS40MTcgNS41LTI1LjVzLTIuNDYyLTI1LjUtNS41LTI1LjVjLTIuNTEgMC00LjYyOCA3Ljc5Ny01LjI4NyAxOC40NTNBOC45ODkgOC45ODkgMCAwMTQzIDQ0YTguOTg4IDguOTg4IDAgMDEtMy43NTEgNy4zMTJ6TTIwLjk4NSAzMi4yMjRsMTUuNzQ2LTE2Ljg3N2E3LjM4NSA3LjM4NSAwIDAxMTAuMzc0LS40MkM1MS43MDIgMTkuMTE0IDU0IDI5LjIwOCA1NCA0NS4yMDhjMCAxNC41MjctMi4zNDMgMjMuODgtNy4wMyAyOC4wNThhNy4yOCA3LjI4IDAgMDEtMTAuMTY4LS40NjhMMjAuNDA1IDU1LjIyNEgxMmE1IDUgMCAwMS01LTV2LTEzYTUgNSAwIDAxNS01aDguOTg1eiIgZmlsbD0iI0ZGRiIgbWFzaz0idXJsKCNiKSIvPjwvZz48cGF0aCBkPSJNMTA2LjUgMTMuNUw0NC45OTggNzUuMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg=="},function(l,E){l.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMDE1IDVWNTguMThhNSA1IDAgMDEtNSA1SDkuMTFhNSA1IDAgMDEtNS01VjI1Ljk3YTUgNSAwIDAxNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwMTQuMzA0IDIuNzAydjI2LjgzNWEzIDMgMCAwMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg=="},function(l,E,e){var R,I,t={},n=(R=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===I&&(I=R.apply(this,arguments)),I}),i=function(R,I){return I?I.querySelector(R):document.querySelector(R)},o=function(R){var I={};return function(A,P){if("function"==typeof A)return A();if(void 0===I[A]){var x=i.call(this,A,P);if(window.HTMLIFrameElement&&x instanceof window.HTMLIFrameElement)try{x=x.contentDocument.head}catch(D){x=null}I[A]=x}return I[A]}}(),s=null,a=0,c=[],u=e(340);function d(R,I){for(var A=0;A<R.length;A++){var P=R[A],x=t[P.id];if(x){x.refs++;for(var D=0;D<x.parts.length;D++)x.parts[D](P.parts[D]);for(;D<P.parts.length;D++)x.parts.push(S(P.parts[D],I))}else{var L=[];for(D=0;D<P.parts.length;D++)L.push(S(P.parts[D],I));t[P.id]={id:P.id,refs:1,parts:L}}}}function f(R,I){for(var A=[],P={},x=0;x<R.length;x++){var D=R[x],L=I.base?D[0]+I.base:D[0],V={css:D[1],media:D[2],sourceMap:D[3]};P[L]?P[L].parts.push(V):A.push(P[L]={id:L,parts:[V]})}return A}function h(R,I){var A=o(R.insertInto);if(!A)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invali
1d.");var P=c[c.length-1];if("top"===R.insertAt)P?P.nextSibling?A.insertBefore(I,P.nextSibling):A.appendChild(I):A.insertBefore(I,A.firstChild),c.push(I);else if("bottom"===R.insertAt)A.appendChild(I);else{if("object"!=typeof R.insertAt||!R.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var x=o(R.insertAt.before,A);A.insertBefore(I,x)}}function g(R){if(null===R.parentNode)return!1;R.parentNode.removeChild(R);var I=c.indexOf(R);I>=0&&c.splice(I,1)}function v(R){var I=document.createElement("style");if(void 0===R.attrs.type&&(R.attrs.type="text/css"),void 0===R.attrs.nonce){var A=function y(){return e.nc}();A&&(R.attrs.nonce=A)}return p(I,R.attrs),h(R,I),I}function p(R,I){Object.keys(I).forEach(function(A){R.setAttribute(A,I[A])})}function S(R,I){var A,P,x,D;if(I.transform&&R.css){if(!(D="function"==typeof I.transform?I.transform(R.css):I.transform.default(R.css)))return function(){};R.css=D}if(I.singleton){var L=a++;A=s||(s=v(I)),P=b.bind(null,A,L,!1),x=b.bind(null,A,L,!0)}else R.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(A=function m(R){var I=document.createElement("link");return void 0===R.attrs.type&&(R.attrs.type="text/css"),R.attrs.rel="stylesheet",p(I,R.attrs),h(R,I),I}(I),P=C.bind(null,A,I),x=function(){g(A),A.href&&URL.revokeObjectURL(A.href)}):(A=v(I),P=O.bind(null,A),x=function(){g(A)});return P(R),function(U){if(U){if(U.css===R.css&&U.media===R.media&&U.sourceMap===R.sourceMap)return;P(R=U)}else x()}}l.exports=function(R,I){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(I=I||{}).attrs="object"==typeof I.attrs?I.attrs:{},!I.singleton&&"boolean"!=typeof I.singleton&&(I.singleton=n()),I.insertInto||(I.insertInto="head"),I.insertAt||(I.insertAt="bottom");var A=f(R,I);return d(A,I),function(x){for(var D=[],L=0;L<A.length;L++)(U=t[A[L].id]).refs--,D.push(U);for(x&&d(f(x,I),I),L=0;L<D.length;L++){var U;if(0===(U=D[L]).refs){for(var V=0;V<U.parts.length;V++)U.parts[V]();delete t[U.id]}}}};var T=function(){var R=[];return function(I,A){return R[I]=A,R.filter(Boolean).join("\n")}}();function b(R,I,A,P){var x=A?"":P.css;if(R.styleSheet)R.styleSheet.cssText=T(I,x);else{var D=document.createTextNode(x),L=R.childNodes;L[I]&&R.removeChild(L[I]),L.length?R.insertBefore(D,L[I]):R.appendChild(D)}}function O(R,I){var A=I.css,P=I.media;if(P&&R.setAttribute("media",P),R.styleSheet)R.styleSheet.cssText=A;else{for(;R.firstChild;)R.removeChild(R.firstChild);R.appendChild(document.createTextNode(A))}}function C(R,I,A){var P=A.css,x=A.sourceMap;(I.convertToAbsoluteUrls||void 0===I.convertToAbsoluteUrls&&x)&&(P=u(P)),x&&(P+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(x))))+" */");var L=new Blob([P],{type:"text/css"}),N=R.href;R.href=URL.createObjectURL(L),N&&URL.revokeObjectURL(N)}},function(l,E){l.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=t.protocol+"//"+t.host,n=r+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(o,s){var c,a=s.trim().replace(/^"(.*)"$/,function(u,d){return d}).replace(/^'(.*)'$/,function(u,d){return d});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?o:(c=0===a.indexOf("//")?a:0===a.indexOf("/")?r+a:n+a.replace(/^\.\//,""),"url("+JSON.stringify(c)+")")})}},function(l,E){l.exports=function e(){this.__data__=[],this.size=0}},function(l,E,e){var t=e(80),n=Array.prototype.splice;l.exports=function i(o){var s=this.__data__,a=t(s,o);return!(a<0||(a==s.length-1?s.pop():n.call(s,a,1),--this.size,0))}},function(l,E,e){var t=e(80);l.exports=function r(n){var i=this.__data__,o=t(i,n);return o<0?void 0:i[o][1]}},function(l,E,e){var t=e(80);l.exports=function r(n){return t(this.__data__,n)>-1}},function(l,E,e){var t=e(80);l.exports=function r(n,i){var o=this.__data__,s=t(o,n);return s<0?(++this.size,o.push([n,i])):o[s][1]=i,this}},function(l,E,e){var t=e(79);l.exports=function r(){this.__data__=new t,this.size=0}},function(l,E){l.exports=function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}},function(l,E){l.exports=function e(t){return this.__data__.get(t)}},function(l,E){l.exports=function e(t){return this.__data__.has(t)}},function(l,E,e){var t=e(79),r=e(109),n=e(110);l.exports=function o(s,a){var c=this.__data__;if(c instanceof t){var u=c.__data__;if(!r||u.length<199)return u.push([s,a]),this.size=++c.size,this;c=this.__data__=new n(u)}return c.set(s,a),this.size=c.size,this}},function(l,E,e){var t=e(15),r=e(354),n=e(9),i=e(174),s=/^\[object .+?Constructor\]$/,f=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");l.exports=function h(g){return!(!n(g)||r(g))&&(t(g)?f:s).test(i(g))}},function(l,E,e){var t=e(38),r=Object.prototype,n=r.hasOwnProperty,i=r.toString,o=t?t.toStringTag:void 0;l.exports=function s(a){var c=n.call(a,o),u=a[o];try{a[o]=void 0;var d=!0}catch(h){}var f=i.call(a);return d&&(c?a[o]=u:delete a[o]),f}},function(l,E){var t=Object.prototype.toString;l.exports=function r(n){return t.call(n)}},function(l,E,e){var i,t=e(355),r=(i=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(sr
1c)_1."+i:"";l.exports=function n(i){return!!r&&r in i}},function(l,E,e){var t=e(14);l.exports=t["__core-js_shared__"]},function(l,E){l.exports=function e(t,r){return null==t?void 0:t[r]}},function(l,E,e){var t=e(358),r=e(79),n=e(109);l.exports=function i(){this.size=0,this.__data__={hash:new t,map:new(n||r),string:new t}}},function(l,E,e){var t=e(359),r=e(360),n=e(361),i=e(362),o=e(363);function s(a){var c=-1,u=null==a?0:a.length;for(this.clear();++c<u;){var d=a[c];this.set(d[0],d[1])}}s.prototype.clear=t,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=i,s.prototype.set=o,l.exports=s},function(l,E,e){var t=e(81);l.exports=function r(){this.__data__=t?t(null):{},this.size=0}},function(l,E){l.exports=function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}},function(l,E,e){var t=e(81),i=Object.prototype.hasOwnProperty;l.exports=function o(s){var a=this.__data__;if(t){var c=a[s];return"__lodash_hash_undefined__"===c?void 0:c}return i.call(a,s)?a[s]:void 0}},function(l,E,e){var t=e(81),n=Object.prototype.hasOwnProperty;l.exports=function i(o){var s=this.__data__;return t?void 0!==s[o]:n.call(s,o)}},function(l,E,e){var t=e(81);l.exports=function n(i,o){var s=this.__data__;return this.size+=this.has(i)?0:1,s[i]=t&&void 0===o?"__lodash_hash_undefined__":o,this}},function(l,E,e){var t=e(82);l.exports=function r(n){var i=t(this,n).delete(n);return this.size-=i?1:0,i}},function(l,E){l.exports=function e(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}},function(l,E,e){var t=e(82);l.exports=function r(n){return t(this,n).get(n)}},function(l,E,e){var t=e(82);l.exports=function r(n){return t(this,n).has(n)}},function(l,E,e){var t=e(82);l.exports=function r(n,i){var o=t(this,n),s=o.size;return o.set(n,i),this.size+=o.size==s?0:1,this}},function(l,E){l.exports=function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}},function(l,E,e){var t=e(29),r=e(16);l.exports=function i(o){return r(o)&&"[object Arguments]"==t(o)}},function(l,E){l.exports=function e(){return!1}},function(l,E,e){var t=e(29),r=e(112),n=e(16),D={};D["[object Float32Array]"]=D["[object Float64Array]"]=D["[object Int8Array]"]=D["[object Int16Array]"]=D["[object Int32Array]"]=D["[object Uint8Array]"]=D["[object Uint8ClampedArray]"]=D["[object Uint16Array]"]=D["[object Uint32Array]"]=!0,D["[object Arguments]"]=D["[object Array]"]=D["[object ArrayBuffer]"]=D["[object Boolean]"]=D["[object DataView]"]=D["[object Date]"]=D["[object Error]"]=D["[object Function]"]=D["[object Map]"]=D["[object Number]"]=D["[object Object]"]=D["[object RegExp]"]=D["[object Set]"]=D["[object String]"]=D["[object WeakMap]"]=!1,l.exports=function L(N){return n(N)&&r(N.length)&&!!D[t(N)]}},function(l,E,e){var r=e(178)(Object.keys,Object);l.exports=r},function(l,E,e){var t=e(39),r=e(52);l.exports=function n(i,o){return i&&t(o,r(o),i)}},function(l,E,e){var t=e(9),r=e(68),n=e(376),o=Object.prototype.hasOwnProperty;l.exports=function s(a){if(!t(a))return n(a);var c=r(a),u=[];for(var d in a)"constructor"==d&&(c||!o.call(a,d))||u.push(d);return u}},function(l,E){l.exports=function e(t){var r=[];if(null!=t)for(var n in Object(t))r.push(n);return r}},function(l,E,e){var t=e(39),r=e(115);l.exports=function n(i,o){return t(i,r(i),o)}},function(l,E){l.exports=function e(t,r){for(var n=-1,i=null==t?0:t.length,o=0,s=[];++n<i;){var a=t[n];r(a,n,t)&&(s[o++]=a)}return s}},function(l,E,e){var t=e(39),r=e(181);l.exports=function n(i,o){return t(i,r(i),o)}},function(l,E,e){var n=e(37)(e(14),"DataView");l.exports=n},function(l,E,e){var n=e(37)(e(14),"Promise");l.exports=n},function(l,E){var t=Object.prototype.hasOwnProperty;l.exports=function r(n){var i=n.length,o=new n.constructor(i);return i&&"string"==typeof n[0]&&t.call(n,"index")&&(o.index=n.index,o.input=n.input),o}},function(l,E,e){var t=e(118),r=e(384),n=e(385),i=e(386),o=e(188);l.exports=function A(P,x,D){var L=P.constructor;switch(x){case"[object ArrayBuffer]":return t(P);case"[object Boolean]":case"[object Date]":return new L(+P);case"[object DataView]":return r(P,D);
1case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(P,D);case"[object Map]":case"[object Set]":return new L;case"[object Number]":case"[object String]":return new L(P);case"[object RegExp]":return n(P);case"[object Symbol]":return i(P)}}},function(l,E,e){var t=e(118);l.exports=function r(n,i){var o=i?t(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}},function(l,E){var e=/\w*$/;l.exports=function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}},function(l,E,e){var t=e(38),r=t?t.prototype:void 0,n=r?r.valueOf:void 0;l.exports=function i(o){return n?Object(n.call(o)):{}}},function(l,E,e){var t=e(388),r=e(67),n=e(113),i=n&&n.isMap,o=i?r(i):t;l.exports=o},function(l,E,e){var t=e(40),r=e(16);l.exports=function i(o){return r(o)&&"[object Map]"==t(o)}},function(l,E,e){var t=e(390),r=e(67),n=e(113),i=n&&n.isSet,o=i?r(i):t;l.exports=o},function(l,E,e){var t=e(40),r=e(16);l.exports=function i(o){return r(o)&&"[object Set]"==t(o)}},function(l,E,e){(function(t){E.log=function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},E.formatArgs=function n(d){var f=this.useColors;if(d[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+d[0]+(f?"%c ":" ")+"+"+l.exports.humanize(this.diff),f){var h="color: "+this.color;d.splice(1,0,h,"color: inherit");var g=0,v=0;d[0].replace(/%[a-zA-Z%]/g,function(m){"%%"!==m&&(g++,"%c"===m&&(v=g))}),d.splice(v,0,h)}},E.save=function o(d){try{null==d?E.storage.removeItem("debug"):E.storage.setItem("debug",d)}catch(f){}},E.load=function s(){var d;try{d=E.storage.getItem("debug")}catch(f){}return!d&&void 0!==t&&"env"in t&&(d=t.env.DEBUG),d},E.useColors=function r(){var d=function a(d){var f="debug_"+d.toLowerCase();try{return E.storage.getItem(f)}catch(h){return void 0!==t&&"env"in t?t.env[f.toUpperCase()]:void 0}}("colors");return!/^(no|off|false|disabled)$/i.test(d)&&(!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&Boolean("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)))},E.storage=function c(){try{return localStorage}catch(d){}}(),E.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],l.exports=e(392)(E),l.exports.formatters.j=function(d){try{return JSON.stringify(d)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this,e(69))},function(l,E,e){l.exports=function(r){function n(d){var h,f=0;for(h in d)f=(f<<5)-f+d.charCodeAt(h),f|=0;return i.colors[Math.abs(f)%i.colors.length]}function i(d){var f;function h(){if(h.enabled){var g=h,v=+new Date,m=v-(f||v);g.diff=m,g.prev=f,g.curr=v,f=v;for(var p=new Array(arguments.length),y=0;y<p.length;y++)p[y]=arguments[y];p[0]=i.coerce(p[0]),"string"!=typeof p[0]&&p.unshift("%O");var S=0;p[0]=p[0].replace(/%([a-zA-Z%])/g,function(b,O){if("%%"===b)return b;S++;var C=i.formatters[O];return"function"==typeof C&&(b=C.call(g,p[S]),p.splice(S,1),S--),b}),i.formatArgs.call(g,p);var T=g.log||i.log;T.apply(g,p)}}return h.namespace=d,h.enabled=i.enabled(d),h.useColors=i.useColors(),h.color=n(d),h.destroy=o,"function"==typeof i.init&&i.init(h),i.instances.push(h),h}function o(){var d=i.instances.indexOf(this);return-1!==d&&(i.instances.splice(d,1),!0)}return i.debug=i.default=i,i.coerce=function u(d){return d instanceof Error?d.stack||d.message:d},i.disable=function a(){i.enable("")},i.enable=function s(d){i.save(d),i.names=[],i.skips=[];var f,h=("string"==typeof d?d:"").split(/[\s,]+/),g=h.length;for(f=0;f<g;f++)!h[f]||("-"===(d=h[f].replace(/\*/g,".*?"))[0]?i.skips.push(new RegExp("^"+d.substr(1)+"$")):i.names.push(new RegExp("^"+d+"$")));for(f=0;f<i.instances.length;f++){var v=i.instances[f];v.enabled=i.enabled(v.namespace)}},i.enabled=function c(d){if("*"===d[d.length-1])return!0;var f,h;for(f=0,h=i.skips.length;f<h;f++)if(i.skips[f].test(d))return!1;for(f=0,h=i.names.length;f<h;f++)if(i.names[f].test(d))return!0;return!1},i.humanize=e(393),Object.keys(r).forEach(function(d){i[d]=r[d]}),i.instances=[],i.names=[],i.skips=[],i.formatters={},i.selectColor=n,i.enable(i.load()),i}},function(l,E){var e=1e3,t=60*e,r=60*t,n=24*r;function u(d,f,h,g){var v=f>=1.5*h;return Math.round(d/h)+" "+g+(v?"s":"")}l.exports=function(d,f){f=f||{};var h=typeof d;if("string"===h&&d.length>0)return function s(d){if(!((d=String(d)).length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(f){var h=parseFloat(f[1]);switch((f[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*h;case"weeks":case"week":case"w":return 6048e5*h;case"days":case"day":case"d":return h*n;case"hours":case"hour":case"hrs":case"hr":case"h":return h*r;case"minutes":case"minute":case"mins":case"min":case"m":return h*t;case"seconds":case"second":case"secs":case"sec":case"s":return h*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}(d);if("number"===h&&isFinite(d))return f.long?function c(d){var f=Math.abs(d);return f>=n?u(d,f,n,"day"):f>=r?u(d,f,r,"hour"):f>=t?u(d,f,t,"minute"):f>=e?u(d,f,e,"second"):d+" ms"}(d):function a(d){var f=Math.abs(d);return f>=n?Math.round(d/n)+"d":f>=r?Math.round(d/r)+"h":f>=t?Math.round(d/t)+"m":f>=e?Math.round(d/e)+"s":d+"ms"}(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))}},function(l,E,e){var t=e(395),r=e(175),n=e(88);l.exports=r?function(o,s){return r(o,"toString",{configurable:!0,enumerable:!1,value:t(s),writable:!0})}:n},function(l,E){l.exports=function e(t){return function(){return t}}},function(l,E,e){"use strict";const t=e(194),r=new t;l.exports=function n(i,o){if(void 0===o)return i;r.has(o)||r.set(o,new t);const s=r.get(o);return s.has(i)||s.set(i,i.bind(o)),s.get(i)}},function(l,E,e){"use strict";l.exports=function(){var t,r;if("function"!=typeof WeakMap)return!1;try{t=new WeakMap([[r={},"one"],[{},"two"],[{},"three"]])}catch(n){return!1}return!("[object WeakMap]"!==String(t)||"function"!=typeof t.set||t.set({},1)!==t||"function"!=typeof t.delete||"function"!=typeof t.has||"one"!==t.get(r))}},function(l,E,e){"use strict";var m,t=e(42),r=e(123),n=e(401),i=e(31),o=e(402),s=e(32),a=e(201),c=e(444),u=e(43).toStringTag,d=e(445),f=Array.isArray,h=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;l.exports=m=function(){var y,p=arguments[0];if(!(this instanceof m))throw new TypeError("Constructor requires 'new'");return y=d&&r&&WeakMap!==m?r(new WeakMap,v(this)):this,t(p)&&(f(p)||(p=a(p))),h(y,"__weakMapData__",s("c","$weakMap$"+o())),p&&c(p,function(S){i(S),y.set(S[0],S[1])}),y},d&&(r&&r(m,WeakMap),m.prototype=Object.create(WeakMap.prototype,{constructor:s(m)})),Object.defineProperties(m.prototype,{delete:s(function(p){return!!g.call(n(p),this.__weakMapData__)&&(delete p[this.__weakMapData__],!0)}),get:s(function(p){if(g.call(n(p),this.__weakMapData__))return p[this.__weakMapData__]}),has:s(function(p){return g.call(n(p),this.__weakMapData__)}),set:s(function(p,y){return h(n(p),this.__weakMapData__,s("c",y)),this}),toString:s(function(){return"[object WeakMap]"})}),h(m.prototype,u,s("c","WeakMap"))},function(l,E,e){"use strict";l.exports=function(){}},function(l,E,e){"use strict";var r,n,i,o,t=Object.create;e(195)()||(r=e(196)),l.exports=r&&1===r.level?(n={},i={},o={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(s){i[s]="__proto__"!==s?o:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(n,i),Object.defineProperty(r,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:n}),function(s,a){return t(null===s?n:s,a)}):t},function(l,E,e){"use strict";var t=e(197);l.exports=function(r){if(!t(r))throw new TypeError(r+" is not an Object");return r}},function(l,E,e){"use strict";var t=Object.create(null),r=Math.random;l.exports=function(){var n;do{n=r().toString(36).slice(2)}while(t[n]);return n}},function(l,E,e){"use strict";var t=e(404);l.exports=function(r){if("function"!=typeof r||!hasOwnProperty.call(r,"length"))return!1;try{if("number"!=typeof r.length||"function"!=typeof r.call||"function"!=typeof r.apply)return!1}catch(n){return!1}return!t(r)}},function(l,E,e){"use strict";var t=e(124);l.exports=function(r){if(!t(r))return!1;try{return!!r.constructor&&r.constructor.prototype===r}catch(n){return!1}}},function(l,E,e){"use strict";l.exports=function(){var r,t=Object.assign;return"function"==typeof t&&(t(r={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),r.foo+r.bar+r.trzy==="razdwatrzy")}},function(l,E,e){"use strict";var t=e(407),r=e(31),n=Math.max;l.exports=function(i,o){var s,a,u,c=n(arguments.length,2);for(i=Object(r(i)),u=function(d){try{i[d]=o[d]}catch(f){s||(s=f)}},a=1;a<c;
1++a)t(o=arguments[a]).forEach(u);if(void 0!==s)throw s;return i}},function(l,E,e){"use strict";l.exports=e(408)()?Object.keys:e(409)},function(l,E,e){"use strict";l.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(l,E,e){"use strict";var t=e(42),r=Object.keys;l.exports=function(n){return r(t(n)?Object(n):n)}},function(l,E,e){"use strict";var t="razdwatrzy";l.exports=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}},function(l,E,e){"use strict";var t=String.prototype.indexOf;l.exports=function(r){return t.call(this,r,arguments[1])>-1}},function(l,E,e){"use strict";var a,t=e(123),r=e(200),n=e(32),i=e(43),o=e(203),s=Object.defineProperty;a=l.exports=function(c,u){if(!(this instanceof a))throw new TypeError("Constructor requires 'new'");o.call(this,c),u=u?r.call(u,"key+value")?"key+value":r.call(u,"key")?"key":"value":"value",s(this,"__kind__",n("",u))},t&&t(a,o),delete a.prototype.constructor,a.prototype=Object.create(o.prototype,{_resolve:n(function(c){return"value"===this.__kind__?this.__list__[c]:"key+value"===this.__kind__?[c,this.__list__[c]]:c})}),s(a.prototype,i.toStringTag,n("c","Array Iterator"))},function(l,E,e){"use strict";var t=e(91),r={object:!0,symbol:!0};l.exports=function(){var i,n=t.Symbol;if("function"!=typeof n)return!1;i=n("test symbol");try{String(i)}catch(o){return!1}return!(!r[typeof n.iterator]||!r[typeof n.toPrimitive]||!r[typeof n.toStringTag])}},function(l,E,e){"use strict";l.exports=function(){return!("object"!=typeof globalThis||!globalThis)&&globalThis.Array===Array}},function(l,E){var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};l.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()},function(l,E,e){"use strict";var d,f,h,t=e(32),r=e(202),n=e(91).Symbol,i=e(418),o=e(419),s=e(420),a=Object.create,c=Object.defineProperties,u=Object.defineProperty;if("function"==typeof n)try{String(n()),h=!0}catch(g){}else n=null;f=function(v){if(this instanceof f)throw new TypeError("Symbol is not a constructor");return d(v)},l.exports=d=function g(v){var m;if(this instanceof g)throw new TypeError("Symbol is not a constructor");return h?n(v):(m=a(f.prototype),v=void 0===v?"":String(v),c(m,{__description__:t("",v),__name__:t("",i(v))}))},o(d),s(d),c(f.prototype,{constructor:t(d),toString:t("",function(){return this.__name__})}),c(d.prototype,{toString:t(function(){return"Symbol ("+r(this).__description__+")"}),valueOf:t(function(){return r(this)})}),u(d.prototype,d.toPrimitive,t("",function(){var g=r(this);return"symbol"==typeof g?g:g.toString()})),u(d.prototype,d.toStringTag,t("c","Symbol")),u(f.prototype,d.toStringTag,t("c",d.prototype[d.toStringTag])),u(f.prototype,d.toPrimitive,t("c",d.prototype[d.toPrimitive]))},function(l,E,e){"use strict";l.exports=function(t){return!(!t||"symbol"!=typeof t&&(!t.constructor||"Symbol"!==t.constructor.name||"Symbol"!==t[t.constructor.toStringTag]))}},function(l,E,e){"use strict";var t=e(32),n=Object.defineProperty,i=Object.prototype,o=(0,Object.create)(null);l.exports=function(s){for(var c,u,a=0;o[s+(a||"")];)++a;return o[s+=a||""]=!0,n(i,c="@@"+s,t.gs(null,function(d){u||(u=!0,n(this,c,t(d)),u=!1)})),c}},function(l,E,e){"use strict";var t=e(32),r=e(91).Symbol;l.exports=function(n){return Object.defineProperties(n,{hasInstance:t("",r&&r.hasInstance||n("hasInstance")),isConcatSpreadable:t("",r&&r.isConcatSpreadable||n("isConcatSpreadable")),iterator:t("",r&&r.iterator||n("iterator")),match:t("",r&&r.match||n("match")),replace:t("",r&&r.replace||n("replace")),search:t("",r&&r.search||n("search")),species:t("",r&&r.species||n("species")),split:t("",r&&r.split||n("split")),toPrimitive:t("",r&&r.toPrimitive||n("toPrimitive")),toStringTag:t("",r&&r.toStringTag||n("toStringTag")),unscopables:t("",r&&r.unscopables||n("unscopables"))})}},function(l,E,e){"use strict";var t=e(32),r=e(202),n=Object.create(null);l.exports=function(i){return Object.defineProperties(i,{for:t(function(o){return n[o]?n[o]:n[o]=i(String(o))}),keyFor:t(function(o){var s;for(s in r(o),n)if(n[s]===o)return s})})}},function(l,E,e){"use strict";var t=e(31);l.exports=function(){return t(this).length=0,this}},function(l,E,e){"use strict";var d,t=e(54),r=e(423),n=e(427),i=e(428),o=e(199),s=e(438),a=Function.prototype.bind,c=Object.defineProperty,u=Object.prototype.hasOwnProperty;d=function(f,h,g){var m,v=r(h)&&n(h.value);return delete(m=i(h)).writable,delete m.value,m.get=function(){return!g.overwriteDefinition&&u.call(this,f)?v:(h.value=a.call(v,g.resolve
1Context?g.resolveContext(this):this),c(this,f,h),this[f])},m},l.exports=function(f){var h=o(arguments[1]);return t(h.resolveContext)&&n(h.resolveContext),s(f,function(g,v){return d(v,g,h)})}},function(l,E,e){"use strict";var t=e(204),r=e(54);l.exports=function(n){return r(n)?n:t(n,"Cannot use %v",arguments[1])}},function(l,E,e){"use strict";var t=e(54),r=e(124),n=Object.prototype.toString;l.exports=function(i){if(!t(i))return null;if(r(i)){var o=i.toString;if("function"!=typeof o||o===n)return null}try{return""+i}catch(s){return null}}},function(l,E,e){"use strict";var t=e(426),r=/[\n\r\u2028\u2029]/g;l.exports=function(n){var i=t(n);return null===i?"<Non-coercible to string value>":(i.length>100&&(i=i.slice(0,99)+"\u2026"),i=i.replace(r,function(o){switch(o){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))}},function(l,E,e){"use strict";l.exports=function(t){try{return t.toString()}catch(r){try{return String(t)}catch(n){return null}}}},function(l,E,e){"use strict";var t=e(204),r=e(198);l.exports=function(n){return r(n)?n:t(n,"%v is not a plain function",arguments[1])}},function(l,E,e){"use strict";var t=e(429),r=e(125),n=e(31);l.exports=function(i){var o=Object(n(i)),s=arguments[1],a=Object(arguments[2]);if(o!==i&&!s)return o;var c={};
1return s?t(s,function(u){(a.ensure||u in i)&&(c[u]=i[u])}):r(c,i),c}},function(l,E,e){"use strict";l.exports=e(430)()?Array.from:e(431)},function(l,E,e){"use strict";l.exports=function(){var r,n,t=Array.from;return"function"==typeof t&&(n=t(r=["raz","dwa"]),Boolean(n&&n!==r&&"dwa"===n[1]))}},function(l,E,e){"use strict";var t=e(43).iterator,r=e(89),n=e(432),i=e(433),o=e(70),s=e(31),a=e(42),c=e(90),u=Array.isArray,d=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;l.exports=function(g){var p,y,S,T,b,O,C,R,I,A,v=arguments[1],m=arguments[2];if(g=Object(s(g)),a(v)&&o(v),this&&this!==Array&&n(this))p=this;else{if(!v){if(r(g))return 1!==(b=g.length)?Array.apply(null,g):((T=new Array(1))[0]=g[0],T);if(u(g)){for(T=new Array(b=g.length),y=0;y<b;++y)T[y]=g[y];return T}}T=[]}if(!u(g))if(void 0!==(I=g[t])){for(C=o(I).call(g),p&&(T=new p),R=C.next(),y=0;!R.done;)A=v?d.call(v,m,R.value,y):R.value,p?(f.value=A,h(T,y,f)):T[y]=A,R=C.next(),++y;b=y}else if(c(g)){for(b=g.length,p&&(T=new p),y=0,S=0;y<b;++y)A=g[y],y+1<b&&(O=A.charCodeAt(0))>=55296&&O<=56319&&(A+=g[++y]),A=v?d.call(v,m,A,S):A,p?(f.value=A,h(T,S,f)):T[S]=A,++S;b=S}if(void 0===b)for(b=i(g.length),p&&(T=new p(b)),y=0;y<b;++y)A=v?d.call(v,m,g[y],y):g[y],p?(f.value=A,h(T,y,f)):T[y]=A;return p&&(f.value=null,T.length=b),T}},function(l,E,e){"use strict";var t=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);l.exports=function(n){return"function"==typeof n&&r(t.call(n))}},function(l,E,e){"use strict";var t=e(434),r=Math.max;l.exports=function(n){return r(0,t(n))}},function(l,E,e){"use strict";var t=e(435),r=Math.abs,n=Math.floor;l.exports=function(i){return isNaN(i)?0:0!==(i=Number(i))&&isFinite(i)?t(i)*n(r(i)):i}},function(l,E,e){"use strict";l.exports=e(436)()?Math.sign:e(437)},function(l,E,e){"use strict";l.exports=function(){var t=Math.sign;return"function"==typeof t&&1===t(10)&&-1===t(-20)}},function(l,E,e){"use strict";l.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},function(l,E,e){"use strict";var t=e(70),r=e(439),n=Function.prototype.call;l.exports=function(i,o){var s={},a=arguments[2];return t(o),r(i,function(c,u,d,f){s[u]=n.call(o,a,c,u,d,f)}),s}},function(l,E,e){"use strict";l.exports=e(440)("forEach")},function(l,E,e){"use strict";var t=e(70),r=e(31),n=Function.prototype.bind,i=Function.prototype.call,o=Object.keys,s=Object.prototype.propertyIsEnumerable;l.exports=function(a,c){return function(u,d){var f,h=arguments[2],g=arguments[3];return u=Object(r(u)),t(d),f=o(u),g&&f.sort("function"==typeof g?n.call(g,u):void 0),"function"!=typeof a&&(a=f[a]),i.call(a,f,function(v,m){return s.call(u,v)?i.call(d,h,u[v],v,u,m):c})}}},function(l,E,e){"use strict";var s,t=e(123),r=e(32),n=e(43),i=e(203),o=Object.defineProperty;s=l.exports=function(a){if(!(this instanceof s))throw new TypeError("Constructor requires 'new'");a=String(a),i.call(this,a),o(this,"__length__",r("",a.length))},t&&t(s,i),delete s.prototype.constructor,s.prototype=Object.create(i.prototype,{_next:r(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:r(function(a){var u,c=this.__list__[a];return this.__nextIndex__===this.__length__?c:(u=c.charCodeAt(0))>=55296&&u<=56319?c+this.__list__[this.__nextIndex__++]:c})}),o(s.prototype,n.toStringTag,r("c","String Iterator"))},function(l,E,e){"use strict";var t=e(443);l.exports=function(r){if(!t(r))throw new TypeError(r+" is not iterable");return r}},function(l,E,e){"use strict";var t=e(89),r=e(42),n=e(90),i=e(43).iterator,o=Array.isArray;l.exports=function(s){return!(!r(s)||!(o(s)||n(s)||t(s))&&"function"!=typeof s[i])}},function(l,E,e){"use strict";var t=e(89),r=e(70),n=e(90),i=e(201),o=Array.isArray,s=Function.prototype.call,a=Array.prototype.some;l.exports=function(c,u){var d,h,g,v,m,p,y,S,f=arguments[2];if(o(c)||t(c)?d="array":n(c)?d="string":c=i(c),r(u),g=function(){v=!0},"array"!==d)if("string"!==d)for(h=c.next();!h.done;){if(s.call(u,f,h.value,g),v)return;h=c.next()}else for(p=c.length,m=0;m<p&&(y=c[m],m+1<p&&(S=y.charCodeAt(0))>=55296&&S<=56319&&(y+=c[++m]),s.call(u,f,y,g),!v);++m);else a.call(c,function(T){return s.call(u,f,T,g),v})}},function(l,E,e){"use strict";l.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},function(l,E,e){var t=e(92),r=e(93),n=e(128),i=e(33),o=e(67),s=e(94),a=Math.min;l.exports=function c(u,d,f){for(var h=f?n:r,g=u[0].length,v=u.length,m=v,p=Array(v),y=1/0,S=[];m--;){var T=u[m];m&&d&&(T=i(T,o(d))),y=a(T.length,y),p[m]=!f&&(d||g>=120&&T.length>=120)?new t(m&&T):void 0}T=u[0];var b=-1,O=p[0];e:for(;++b<g&&S.length<y;
1){var C=T[b],R=d?d(C):C;if(C=f||0!==C?C:0,!(O?s(O,R):h(S,R,f))){for(m=v;--m;){var I=p[m];if(!(I?s(I,R):h(u[m],R,f)))continue e}O&&O.push(R),S.push(C)}}return S}},function(l,E){l.exports=function t(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this}},function(l,E){l.exports=function e(t){return this.__data__.has(t)}},function(l,E,e){var t=e(205),r=e(450),n=e(451);l.exports=function i(o,s,a){return s==s?n(o,s,a):t(o,r,a)}},function(l,E){l.exports=function e(t){return t!=t}},function(l,E){l.exports=function e(t,r,n){for(var i=n-1,o=t.length;++i<o;)if(t[i]===r)return i;return-1}},function(l,E,e){var t=e(129);l.exports=function r(n){return t(n)?n:[]}},function(l,E,e){"use strict";(function(t){var r=e(17),n=e(207),i=e(454),o=e(213);function a(u){var d=new i(u),f=n(i.prototype.request,d);return r.extend(f,i.prototype,d),r.extend(f,d),f}var c=a(e(210));c.Axios=i,c.create=function(d){return a(o(c.defaults,d))},c.Cancel=e(214),c.CancelToken=e(467),c.isCancel=e(209),c.all=function(d){return t.all(d)},c.spread=e(468),c.isAxiosError=e(469),l.exports=c,l.exports.default=c}).call(this,e(0))},function(l,E,e){"use strict";(function(t){var r=e(17),n=e(208),i=e(455),o=e(456),s=e(213);function a(c){this.defaults=c,this.interceptors={request:new i,response:new i}}a.prototype.request=function(u){"string"==typeof u?(u=arguments[1]||{}).url=arguments[0]:u=u||{},(u=s(this.defaults,u)).method=u.method?u.method.toLowerCase():this.defaults.method?this.defaults.method.toLowerCase():"get";var d=[o,void 0],f=t.resolve(u);for(this.interceptors.request.forEach(function(g){d.unshift(g.fulfilled,g.rejected)}),this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});d.length;)f=f.then(d.shift(),d.shift());return f},a.prototype.getUri=function(u){return u=s(this.defaults,u),n(u.url,u.params,u.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],function(u){a.prototype[u]=function(d,f){return this.request(s(f||{},{method:u,url:d,data:(f||{}).data}))}}),r.forEach(["post","put","patch"],function(u){a.prototype[u]=function(d,f,h){return this.request(s(h||{},{method:u,url:d,data:f}))}}),l.exports=a}).call(this,e(0))},function(l,E,e){"use strict";var t=e(17);function r(){this.handlers=[]}r.prototype.use=function(i,o){return this.handlers.push({fulfilled:i,rejected:o}),this.handlers.length-1},r.prototype.eject=function(i){this.handlers[i]&&(this.handlers[i]=null)},r.prototype.forEach=function(i){t.forEach(this.handlers,function(s){null!==s&&i(s)})},l.exports=r},function(l,E,e){"use strict";(function(t){var r=e(17),n=e(457),i=e(209),o=e(210);function s(a){a.cancelToken&&a.cancelToken.throwIfRequested()}l.exports=function(c){return s(c),c.headers=c.headers||{},c.data=n(c.data,c.headers,c.transformRequest),c.headers=r.merge(c.headers.common||{},c.headers[c.method]||{},c.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(f){delete c.headers[f]}),(c.adapter||o.adapter)(c).then(function(f){return s(c),f.data=n(f.data,f.headers,c.transformResponse),f},function(f){return i(f)||(s(c),f&&f.response&&(f.response.data=n(f.response.data,f.response.headers,c.transformResponse))),t.reject(f)})}}).call(this,e(0))},function(l,E,e){"use strict";var t=e(17);l.exports=function(n,i,o){return t.forEach(o,function(a){n=a(n,i)}),n}},function(l,E,e){"use strict";var t=e(17);l.exports=function(n,i){t.forEach(n,function(s,a){a!==i&&a.toUpperCase()===i.toUpperCase()&&(n[i]=s,delete n[a])})}},function(l,E,e){"use strict";var t=e(212);l.exports=function(n,i,o){var s=o.config.validateStatus;o.status&&s&&!s(o.status)?i(t("Request failed with status code "+o.status,o.config,null,o.request,o)):n(o)}},function(l,E,e){"use strict";l.exports=function(r,n,i,o,s){return r.config=n,i&&(r.code=i),r.request=o,r.response=s,r.isAxiosError=!0,r.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},r}},function(l,E,e){"use strict";var t=e(17);l.exports=t.isStandardBrowserEnv()?{write:function(i,o,s,a,c,u){var d=[];d.push(i+"="+encodeURIComponent(o)),t.isNumber(s)&&d.push("expires="+new Date(s).toGMTString()),t.isString(a)&&d.push("path="+a),t.isString(c)&&d.push("domain="+c),!0===u&&d.push("secure"),document.cookie=d.join("; ")},read:function(i){var o=document.cookie.match(new RegExp("(^|;\\s*)("+i+")=([^;]*)"));
1return o?decodeURIComponent(o[3]):null},remove:function(i){this.write(i,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(l,E,e){"use strict";var t=e(463),r=e(464);l.exports=function(i,o){return i&&!t(o)?r(i,o):o}},function(l,E,e){"use strict";l.exports=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)}},function(l,E,e){"use strict";l.exports=function(r,n){return n?r.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):r}},function(l,E,e){"use strict";var t=e(17),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];l.exports=function(i){var s,a,c,o={};return i&&t.forEach(i.split("\n"),function(d){if(c=d.indexOf(":"),s=t.trim(d.substr(0,c)).toLowerCase(),a=t.trim(d.substr(c+1)),s){if(o[s]&&r.indexOf(s)>=0)return;o[s]="set-cookie"===s?(o[s]?o[s]:[]).concat([a]):o[s]?o[s]+", "+a:a}}),o}},function(l,E,e){"use strict";var t=e(17);l.exports=t.isStandardBrowserEnv()?function(){var o,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function s(a){var c=a;return n&&(i.setAttribute("href",c),c=i.href),i.setAttribute("href",c),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return o=s(window.location.href),function(c){var u=t.isString(c)?s(c):c;return u.protocol===o.protocol&&u.host===o.host}}():function(){return!0}},function(l,E,e){"use strict";(function(t){var r=e(214);function n(i){if("function"!=typeof i)throw new TypeError("executor must be a function.");var o;this.promise=new t(function(c){o=c});var s=this;i(function(c){s.reason||(s.reason=new r(c),o(s.reason))})}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var o;return{token:new n(function(c){o=c}),cancel:o}},l.exports=n}).call(this,e(0))},function(l,E,e){"use strict";l.exports=function(r){return function(i){return r.apply(null,i)}}},function(l,E,e){"use strict";l.exports=function(r){return"object"==typeof r&&!0===r.isAxiosError}},function(l,E,e){var r=e(215)("pick",e(47));r.placeholder=e(130),l.exports=r},function(l,E,e){var t=e(472),r=e(130),n=Array.prototype.push;function o(f,h){return 2==h?function(g,v){return f(g,v)}:function(g){return f(g)}}function s(f){for(var h=f?f.length:0,g=Array(h);h--;)g[h]=f[h];return g}function u(f,h){return function(){var g=arguments.length;if(g){for(var v=Array(g);g--;)v[g]=arguments[g];var m=v[0]=h.apply(void 0,v);return f.apply(void 0,v),m}}}l.exports=function d(f,h,g,v){var m="function"==typeof h,p=h===Object(h);if(p&&(v=g,g=h,h=void 0),null==g)throw new TypeError;v||(v={});var y_cap=!("cap"in v)||v.cap,y_curry=!("curry"in v)||v.curry,y_fixed=!("fixed"in v)||v.fixed,y_immutable=!("immutable"in v)||v.immutable,y_rearg=!("rearg"in v)||v.rearg,S=m?g:r,T="curry"in v&&v.curry,b="fixed"in v&&v.fixed,O="rearg"in v&&v.rearg,C=m?g.runInContext():void 0,R=m?g:{ary:f.ary,assign:f.assign,clone:f.clone,curry:f.curry,forEach:f.forEach,isArray:f.isArray,isError:f.isError,isFunction:f.isFunction,isWeakMap:f.isWeakMap,iteratee:f.iteratee,keys:f.keys,rearg:f.rearg,toInteger:f.toInteger,toPath:f.toPath},I=R.ary,A=R.assign,P=R.clone,x=R.curry,D=R.forEach,L=R.isArray,N=R.isError,U=R.isFunction,B=R.isWeakMap,V=R.keys,H=R.rearg,j=R.toInteger,M=R.toPath,F=V(t.aryMethod),z={castArray:function(Q){return function(){var K=arguments[0];return L(K)?Q(s(K)):Q.apply(void 0,arguments)}},iteratee:function(Q){return function(){var K=arguments[0],re=arguments[1],de=Q(K,re),Oe=de.length;return y_cap&&"number"==typeof re?(re=re>2?re-2:1,Oe&&Oe<=re?de:o(de,re)):de}},mixin:function(Q){return function(K){var re=this;if(!U(re))return Q(re,Object(K));var de=[];return D(V(K),function(Oe){U(K[Oe])&&de.push([Oe,re.prototype[Oe]])}),Q(re,Object(K)),D(de,function(Oe){var xe=Oe[1];U(xe)?re.prototype[Oe[0]]=xe:delete re.prototype[Oe[0]]}),re}},nthArg:function(Q){return function(K){var re=K<0?1:j(K)+1;return x(Q(K),re)}},rearg:function(Q){return function(K,re){var de=re?re.length:0;return x(Q(K,re),de)}},runInContext:function(Q){return function(K){return d(f,Q(K),v)}}};function W(Q,K,re){if(y_fixed&&(b||!t.skipFixed[Q])){var de=t.methodSpread[Q],Oe=de&&de.start;return void 0===Oe?I(K,re):function c(f,h){return function(){for(var g=arguments.length,v=g-1,m=Array(g);g--;)m[g]=arguments[g];var p=m[h],y=m.slice(0,h);return p&&n.apply(y,p),h!=v&&n.apply(y,m.slice(h+1)),f.apply(this,y)}}(K,Oe)}return K}function Z(Q,K,re){return y_rearg&&re>1&&(O||!t.skipRearg[Q])?H(K,t.methodRearg[Q]||t.aryRearg[re]):K}function ie(Q,K){for(var re=-1,de=(K=M(K)).length,Oe=de-1,xe=P(Object(Q)),ke=xe;null!=ke&&++re<de;){var X=K[re],te=ke[X];null!=te&&!(U(te)||N(te)||B(te))&&(ke[X]=P(re==Oe?te:Object(te))),ke=ke[X]}return xe}function se(Q,K){var re=t.aliasToReal[Q]||Q,de=t.remap[re]||re,Oe=v;return function(xe){var ke=m?C:R,X=m?C[de]:K,te=A(A({},Oe),xe);return d(ke,re,X,te)}}function me(Q,K){return function(){var re=arguments.length;if(!re)return Q();for(var de=Array(re);re--;)de[re]=arguments[re];var Oe=y_rearg?0:re-1;return de[Oe]=K(de[Oe]),Q.apply(void 0,de)}}function ve(Q,K,re){var de,Oe=t.aliasToReal[Q]||Q,xe=K,ke=z[Oe];return ke?xe=ke(K):y_immutable&&(t.mutate.array[Oe]?xe=u(K,s):t.mutate.object[Oe]?xe=u(K,function a(f){return function(h){return f({},h)}}(K)):t.mutate.set[Oe]&&(xe=u(K,ie))),D(F,function(X){return D(t.aryMethod[X],function(te){if(Oe==te){var le=t.methodSpread[Oe];return de=le&&le.afterRearg?W(Oe,Z(Oe,xe,X),X):Z(Oe,W(Oe,xe,X),X),de=function k(Q,K,re){return T||y_curry&&re>1?x(K,re):K}(0,de=function w(Q,K){if(y_cap){var re=t.iterateeRearg[Q];if(re)return function ue(Q,K){return me(Q,function(re){var de=K.length;return function i(f,h){return 2==h?function(g,v){return f.apply(void 0,arguments)}:function(g){return f.apply(void 0,arguments)}}(H(o(re,de),K),de)})}(K,re);var de=!m&&t.iterateeAry[Q];if(de)return function pe(Q,K){return me(Q,function(re){return"function"==typeof re?o(re,K):re})}(K,de)}return K}(Oe,de),X),!1}}),!de}),de||(de=xe),de==K&&(de=T?x(de,1):function(){return K.apply(this,arguments)}),de.convert=se(Oe,K),de.placeholder=K.placeholder=re,de}if(!p)return ve(h,g,S);var Re=g,Me=[];return D(F,function(Q){D(t.aryMethod[Q],function(K){var re=Re[t.remap[K]||K];re&&Me.push([K,ve(K,re,Re)])})}),D(V(Re),function(Q){var K=Re[Q];if("function"==typeof K){for(var re=Me.length;re--;)if(Me[re][0]==Q)return;K.convert=se(Q,K),Me.push([Q,K])}}),D(Me,function(Q){Re[Q[0]]=Q[1]}),Re.convert=function _(Q){return Re.runInContext.convert(Q)(void 0)},Re.placeholder=Re,D(V(Re),function(Q){D(t.realToAlias[Q]||[],function(K){Re[K]=Re[Q]})}),Re}}
vendor: 5,859 bytes, line 1
1,function(l,E){E.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},E.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},E.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},E.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},E.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},E.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},E.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},E.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},E.realToAlias=function(){var e=Object.prototype.hasOwnProperty,t=E.aliasToReal,r={};for(var n in t){var i=t[n];e.call(r,i)?r[i].push(n):r[i]=[n]}return r}(),E.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom
1:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},E.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},E.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(l,E,e){l.exports={ary:e(474),assign:e(176),clone:e(36),curry:e(492),forEach:e(111),isArray:e(10),isError:e(493),isFunction:e(15),isWeakMap:e(494),iteratee:e(495),keys:e(114),rearg:e(510),toInteger:e(96),toPath:e(513)}},function(l,E,e){var t=e(131);l.exports=function n(i,o,s){return o=s?void 0:o,t(i,128,void 0,void 0,void 0,void 0,o=i&&null==o?i.length:o)}},function(l,E,e){var t=e(95),r=e(14);l.exports=function i(o,s,a){var c=1&s,u=t(o);return function d(){var f=this&&this!==r&&this instanceof d?u:o;return f.apply(c?a:this,arguments)}}},function(l,E,e){var t=e(120),r=e(95),n=e(218),i=e(221),o=e(227),s=e(134),a=e(14);l.exports=function c(u,d,f){var h=r(u);return function g(){for(var v=arguments.length,m=Array(v),p=v,y=o(g);p--;)m[p]=arguments[p];var S=v<3&&m[0]!==y&&m[v-1]!==y?[]:s(m,y);if((v-=S.length)<f)return i(u,d,n,g.placeholder,void 0,m,S,void 0,void 0,f-v);var T=this&&this!==a&&this instanceof g?h:u;return t(T,this,m)}}},function(l,E){l.exports=function e(t,r){for(var n=t.length,i=0;n--;)t[n]===r&&++i;return i}},function(l,E,e){var t=e(132),r=e(222),n=e(479),i=e(481);l.exports=function o(s){var a=n(s),c=i[a];if("function"!=typeof c||!(a in t.prototype))return!1;if(s===c)return!0;var u=r(c);return!!u&&s===u[0]}},function(l,E,e){var t=e(480),n=Object.prototype.hasOwnProperty;l.exports=function i(o){for(var s=o.name+"",a=t[s],c=n.call(t,s)?a.length:0;c--;){var u=a[c],d=u.func;if(null==d||d==o)return u.name}return s}},function(l,E){l.exports={}},function(l,E,e){var t=e(132),r=e(224),n=e(133),i=e(10),o=e(16),s=e(482),c=Object.prototype.hasOwnProperty;function u(d){if(o(d)&&!i(d)&&!(d instanceof t)){if(d instanceof r)return d;if(c.call(d,"__wrapped__"))return s(d)}return new r(d)}(u.prototype=n.prototype).constructor=u,l.exports=u},function(l,E,e){var t=e(132),r=e(224),n=e(53);l.exports=function i(o){if(o instanceof t)return o.clone();var s=new r(o.__wrapped__,o.__chain__);return s.__actions__=n(o.__actions__),s.__index__=o.__index__,s.__values__=o.__values__,s}},function(l,E){var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;l.exports=function r(n){var i=n.match(e);return i?i[1].split(t):[]}},function(l,E){var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;l.exports=function t(r,n){var i=n.length;if(!i)return r;var o=i-1;return n[o]=(i>1?"& ":"")+n[o],n=n.join(i>2?", ":" "),r.replace(e,"{\n/* [wrapped with "+n+"] */\n")}},function(l,E,e){var t=e(111),r=e(93),h=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];l.exports=function g(v,m){return t(h,function(p){var y="_."+p[0];m&p[1]&&!r(v,y)&&v.push(y)}),v.sort()}},function(l,E,e){var t=e(53),r=e(66),n=Math.min;l.exports=function i(o,s){for(var a=o.length,c=n(s.length,a),u=t(o);c--;){var d=s[c];o[c]=r(d,a)?u[d]:void 0}return o}},function(l,E,e){var t=e(120),r=e(95),n=e(14);l.exports=function o(s,a,c,u){var d=1&a,f=r(s);return function h(){for(var g=-1,v=arguments.length,m=-1,p=u.length,y=Array(p+v),S=this&&this!==n&&this instanceof h?f:s;++m<p;)y[m]=u[m];for(;v--;)y[m++]=arguments[++g];return t(S,d?c:this,y)}}},function(l,E,e){var t=e(219),r=e(220),n=e(134),i="__lodash_placeholder__",f=Math.min;l.exports=function h(g,v){var m=g[1],p=v[1],y=m|p;if(!(y<131||128==p&&8==m||128==p&&256==m&&g[7].length<=v[8]||384==p&&v[7].length<=v[8]&&8==m))return g;1&p&&(g[2]=v[2],y|=1&m?0:4);var b=v[3];if(b){var O=g[3];g[3]=O?t(O,b,v[4]):b,g[4]=O?n(g[3],i):v[4]}return(b=v[5])&&(g[5]=(O=g[5])?r(O,b,v[6]):b,g[6]=O?n(g[5],i):v[6]),(b=v[7])&&(g[7]=b),128&p&&(g[8]=null==g[8]?v[8]:f(g[8],v[8])),null==g[9]&&(g[9]=v[9]),g[0]=v[0],g[1]=y,g}},function(l,E,e){var t=e(228),r=1/0;l.exports=function i(o){return o?(o=t(o))===r||o===-r?17976931348623157e292*(o<0?-1:1):o==o?o:0:0===o?o:0}},function(l,E,e){var t=e(491),r=/^\s+/;l.exports=function n(i){return i&&i.slice(0,t(i)+1).replace(r,"")}},function(l,E){var e=/\s/;l.exports=function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}},function(l,E,e){var t=e(131);function n(i,o,s){var a=t(i,8,void 0,void 0,void 0,void 0,void 0,o=s?void 0:o);return a.placeholder=n.placeholder,a}n.placeholder={},l.exports=n},function(l,E,e){var t=e(29),r=e(16),n=e(135);l.exports=function s(a){if(!r(a))return!1;var c=t(a);return"[object Error]"==c||"[object DOMException]"==c||"string"==typeof a.message&&"string"==typeof a.name&&!n(a)}},function(l,E,e){var t=e(40),r=e(16);
vendor: 1,193 bytes, line 1
1l.exports=function i(o){return r(o)&&"[object WeakMap]"==t(o)}},function(l,E,e){var t=e(77),r=e(34);l.exports=function i(o){return r("function"==typeof o?o:t(o,1))}},function(l,E,e){var t=e(497),r=e(501),n=e(234);l.exports=function i(o){var s=r(o);return 1==s.length&&s[0][2]?n(s[0][0],s[0][1]):function(a){return a===o||t(a,o,s)}}},function(l,E,e){var t=e(78),r=e(229);l.exports=function o(s,a,c,u){var d=c.length,f=d,h=!u;if(null==s)return!f;for(s=Object(s);d--;){var g=c[d];if(h&&g[2]?g[1]!==s[g[0]]:!(g[0]in s))return!1}for(;++d<f;){var v=(g=c[d])[0],m=s[v],p=g[1];if(h&&g[2]){if(void 0===m&&!(v in s))return!1}else{var y=new t;if(u)var S=u(m,p,v,s,a,y);if(!(void 0===S?r(p,m,3,u,y):S))return!1}}return!0}},function(l,E,e){var t=e(78),r=e(230),n=e(499),i=e(500),o=e(40),s=e(10),a=e(65),c=e(85),d="[object Arguments]",f="[object Array]",h="[object Object]",v=Object.prototype.hasOwnProperty;l.exports=function m(p,y,S,T,b,O){var C=s(p),R=s(y),I=C?f:o(p),A=R?f:o(y),P=(I=I==d?h:I)==h,x=(A=A==d?h:A)==h,D=I==A;if(D&&a(p)){if(!a(y))return!1;C=!0,P=!1}if(D&&!P)return O||(O=new t),C||c(p)?r(p,y,S,T,b,O):n(p,y,I,S,T,b,O);if(!(1&S)){var L=P&&v.call(p,"__wrapped__"),N=x&&v.call(y,"__wrapped__");
1if(L||N){var U=L?p.value():p,B=N?y.value():y;return O||(O=new t),b(U,B,S,T,O)}}return!!D&&(O||(O=new t),i(p,y,S,T,b,O))}},function(l,E,e){var t=e(38),r=e(187),n=e(51),i=e(230),o=e(232),s=e(97),b=t?t.prototype:void 0,O=b?b.valueOf:void 0;l.exports=function C(R,I,A,P,x,D,L){switch(A){case"[object DataView]":if(R.byteLength!=I.byteLength||R.byteOffset!=I.byteOffset)return!1;R=R.buffer,I=I.buffer;case"[object ArrayBuffer]":return!(R.byteLength!=I.byteLength||!D(new r(R),new r(I)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+R,+I);case"[object Error]":return R.name==I.name&&R.message==I.message;case"[object RegExp]":case"[object String]":return R==I+"";case"[object Map]":var N=o;case"[object Set]":if(N||(N=s),R.size!=I.size&&!(1&P))return!1;var B=L.get(R);if(B)return B==I;P|=2,L.set(R,I);var V=i(N(R),N(I),P,x,D,L);return L.delete(R),V;case"[object Symbol]":if(O)return O.call(R)==O.call(I)}return!1}},function(l,E,e){var t=e(182),i=Object.prototype.hasOwnProperty;l.exports=function o(s,a,c,u,d,f){var h=1&c,g=t(s),v=g.length;if(v!=t(a).length&&!h)return!1;for(var y=v;y--;){var S=g[y];if(!(h?S in a:i.call(a,S)))return!1}var T=f.get(s),b=f.get(a);if(T&&b)return T==a&&b==s;var O=!0;f.set(s,a),f.set(a,s);for(var C=h;++y<v;){var R=s[S=g[y]],I=a[S];if(u)var A=h?u(I,R,S,a,s,f):u(R,I,S,s,a,f);if(!(void 0===A?R===I||d(R,I,c,u,f):A)){O=!1;break}C||(C="constructor"==S)}if(O&&!C){var P=s.constructor,x=a.constructor;P!=x&&"constructor"in s&&"constructor"in a&&!("function"==typeof P&&P instanceof P&&"function"==typeof x&&x instanceof x)&&(O=!1)}return f.delete(s),f.delete(a),O}},function(l,E,e){var t=e(233),r=e(30);l.exports=function n(i){for(var o=r(i),s=o.length;s--;){var a=o[s],c=i[a];o[s]=[a,c,t(c)]}return o}},function(l,E,e){var t=e(229),r=e(56),n=e(236),i=e(136),o=e(233),s=e(234),a=e(46);l.exports=function d(f,h){return i(f)&&o(h)?s(a(f),h):function(g){var v=r(g,f);return void 0===v&&v===h?n(g,f):t(h,v,3)}}},function(l,E,e){var t=e(190);l.exports=function n(i){var o=t(i,function(a){return 500===s.size&&s.clear(),a}),s=o.cache;return o}},function(l,E,e){var t=e(38),r=e(33),n=e(10),i=e(71),s=t?t.prototype:void 0,a=s?s.toString:void 0;l.exports=function c(u){if("string"==typeof u)return u;if(n(u))return r(u,c)+"";if(i(u))return a?a.call(u):"";var d=u+"";return"0"==d&&1/u==-1/0?"-0":d}},function(l,E){l.exports=function e(t,r){return null!=t&&r in Object(t)}},function(l,E,e){var t=e(57),r=e(64),n=e(10),i=e(66),o=e(112),s=e(46);l.exports=function a(c,u,d){for(var f=-1,h=(u=t(u,c)).length,g=!1;++f<h;){var v=s(u[f]);if(!(g=null!=c&&d(c,v)))break;c=c[v]}return g||++f!=h?g:!!(h=null==c?0:c.length)&&o(h)&&i(v,h)&&(n(c)||r(c))}},function(l,E,e){var t=e(508),r=e(509),n=e(136),i=e(46);l.exports=function o(s){return n(s)?t(i(s)):r(s)}},function(l,E){l.exports=function e(t){return function(r){return null==r?void 0:r[t]}}},function(l,E,e){var t=e(98);l.exports=function r(n){return function(i){return t(i,n)}}},function(l,E,e){var t=e(131),i=e(137)(function(o,s){return t(o,256,void 0,void 0,void 0,s)});l.exports=i},function(l,E,e){var t=e(237);l.exports=function r(n){return null!=n&&n.length?t(n,1):[]}},function(l,E,e){var t=e(38),r=e(64),n=e(10),i=t?t.isConcatSpreadable:void 0;l.exports=function o(s){return n(s)||r(s)||!!(i&&s&&s[i])}},function(l,E,e){var t=e(33),r=e(53),n=e(10),i=e(71),o=e(235),s=e(46),a=e(58);l.exports=function c(u){return n(u)?t(u,s):i(u)?[u]:r(o(a(u)))}},function(l,E,e){var t=e(515),r=e(236);l.exports=function n(i,o){return t(i,o,function(s,a){return r(i,a)})}},function(l,E,e){var t=e(98),r=e(516),n=e(57);l.exports=function i(o,s,a){for(var c=-1,u=s.length,d={};++c<u;){var f=s[c],h=t(o,f);a(h,f)&&r(d,n(f,o),h)}return d}},function(l,E,e){var t=e(83),r=e(57),n=e(66),i=e(9),o=e(46);l.exports=function s(a,c,u,d){if(!i(a))return a;for(var f=-1,h=(c=r(c,a)).length,g=h-1,v=a;null!=v&&++f<h;){var m=o(c[f]),p=u;if("__proto__"===m||"constructor"===m||"prototype"===m)return a;
1if(f!=g){var y=v[m];void 0===(p=d?d(y,m,v):void 0)&&(p=i(y)?y:n(c[f+1])?[]:{})}t(v,m,p),v=v[m]}return a}},function(l,E,e){var r=e(215)("mapKeys",e(518));r.placeholder=e(130),l.exports=r},function(l,E,e){var t=e(63),r=e(99),n=e(34);l.exports=function i(o,s){var a={};return s=n(s,3),r(o,function(c,u,d){t(a,s(c,u,d),c)}),a}},function(l,E){l.exports=function e(t){return function(r,n,i){for(var o=-1,s=Object(r),a=i(r),c=a.length;c--;){var u=a[t?c:++o];if(!1===n(s[u],u,s))break}return r}}},function(l,E,e){(function(t){var r;!function(n){"object"==typeof(void 0!==typeof window?window:global)&&(void 0!==typeof window?window:global);var a,c=2147483647,u=36,y=/^xn--/,S=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=Math.floor,R=String.fromCharCode;function A(F){throw new RangeError(b[F])}function P(F,z){for(var w=F.length,k=[];w--;)k[w]=z(F[w]);return k}function x(F,z){var w=F.split("@"),k="";return w.length>1&&(k=w[0]+"@",F=w[1]),k+P((F=F.replace(T,".")).split("."),z).join(".")}function D(F){for(var W,Z,z=[],w=0,k=F.length;w<k;)(W=F.charCodeAt(w++))>
1=55296&&W<=56319&&w<k?56320==(64512&(Z=F.charCodeAt(w++)))?z.push(((1023&W)<<10)+(1023&Z)+65536):(z.push(W),w--):z.push(W);return z}function L(F){return P(F,function(z){var w="";return z>65535&&(w+=R((z-=65536)>>>10&1023|55296),z=56320|1023&z),w+R(z)}).join("")}function N(F){return F-48<10?F-22:F-65<26?F-65:F-97<26?F-97:u}function U(F,z){return F+22+75*(F<26)-((0!=z)<<5)}function B(F,z,w){var k=0;for(F=w?C(F/700):F>>1,F+=C(F/z);F>455;k+=u)F=C(F/35);return C(k+36*F/(F+38))}function V(F){var k,_,se,pe,ue,me,ve,Re,Me,Q,z=[],w=F.length,W=0,Z=128,ie=72;for((_=F.lastIndexOf("-"))<0&&(_=0),se=0;se<_;++se)F.charCodeAt(se)>=128&&A("not-basic"),z.push(F.charCodeAt(se));for(pe=_>0?_+1:0;pe<w;){for(ue=W,me=1,ve=u;pe>=w&&A("invalid-input"),((Re=N(F.charCodeAt(pe++)))>=u||Re>C((c-W)/me))&&A("overflow"),W+=Re*me,!(Re<(Me=ve<=ie?1:ve>=ie+26?26:ve-ie));ve+=u)me>C(c/(Q=u-Me))&&A("overflow"),me*=Q;ie=B(W-ue,k=z.length+1,0==ue),C(W/k)>c-Z&&A("overflow"),Z+=C(W/k),W%=k,z.splice(W++,0,Z)}return L(z)}function H(F){var z,w,k,W,Z,ie,_,se,pe,ue,me,Re,Me,Q,K,ve=[];for(Re=(F=D(F)).length,z=128,w=0,Z=72,ie=0;ie<Re;++ie)(me=F[ie])<128&&ve.push(R(me));for(k=W=ve.length,W&&ve.push("-");k<Re;){for(_=c,ie=0;ie<Re;++ie)(me=F[ie])>=z&&me<_&&(_=me);for(_-z>C((c-w)/(Me=k+1))&&A("overflow"),w+=(_-z)*Me,z=_,ie=0;ie<Re;++ie)if((me=F[ie])<z&&++w>c&&A("overflow"),me==z){for(se=w,pe=u;!(se<(ue=pe<=Z?1:pe>=Z+26?26:pe-Z));pe+=u)ve.push(R(U(ue+(K=se-ue)%(Q=u-ue),0))),se=C(K/Q);ve.push(R(U(se,0))),Z=B(w,Me,k==W),w=0,++k}++w,++z}return ve.join("")}a={version:"1.4.1",ucs2:{decode:D,encode:L},decode:V,encode:H,toASCII:function M(F){return x(F,function(z){return S.test(z)?"xn--"+H(z):z})},toUnicode:function j(F){return x(F,function(z){return y.test(z)?V(z.slice(4).toLowerCase()):z})}},void 0!==(r=function(){return a}.call(E,e,E,t))&&(t.exports=r)}()}).call(this,e(84)(l))},function(l,E,e){"use strict";l.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(l,E,e){"use strict";E.decode=E.parse=e(523),E.encode=E.stringify=e(524)},function(l,E,e){"use strict";function t(n,i){return Object.prototype.hasOwnProperty.call(n,i)}l.exports=function(n,i,o,s){o=o||"=";var a={};if("string"!=typeof n||0===n.length)return a;var c=/\+/g;n=n.split(i=i||"&");var u=1e3;s&&"number"==typeof s.maxKeys&&(u=s.maxKeys);var d=n.length;u>0&&d>u&&(d=u);for(var f=0;f<d;++f){var v,m,p,y,h=n[f].replace(c,"%20"),g=h.indexOf(o);g>=0?(v=h.substr(0,g),m=h.substr(g+1)):(v=h,m=""),p=decodeURIComponent(v),y=decodeURIComponent(m),t(a,p)?r(a[p])?a[p].push(y):a[p]=[a[p],y]:a[p]=y}return a};var r=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)}},function(l,E,e){"use strict";var t=function(o){switch(typeof o){case"string":return o;case"boolean":return o?"true":"false";case"number":return isFinite(o)?o:"";default:return""}};l.exports=function(o,s,a,c){return s=s||"&",a=a||"=",null===o&&(o=void 0),"object"==typeof o?n(i(o),function(u){var d=encodeURIComponent(t(u))+a;return r(o[u])?n(o[u],function(f){return d+encodeURIComponent(t(f))}).join(s):d+encodeURIComponent(t(o[u]))}).join(s):c?encodeURIComponent(t(c))+a+encodeURIComponent(t(o)):""};var r=Array.isArray||function(o){return"[object Array]"===Object.prototype.toString.call(o)};function n(o,s){if(o.map)return o.map(s);for(var a=[],c=0;c<o.length;c++)a.push(s(o[c],c));return a}var i=Object.keys||function(o){var s=[];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&s.push(a);return s}},function(l,E,e){var n,i,t=e(241),r=e(242),o=0,s=0;l.exports=function a(c,u,d){var f=u&&d||0,h=u||[],g=(c=c||{}).node||n,v=void 0!==c.clockseq?c.clockseq:i;if(null==g||null==v){var m=t();null==g&&(g=n=[1|m[0],m[1],m[2],m[3],m[4],m[5]]),null==v&&(v=i=16383&(m[6]<<8|m[7]))}var p=void 0!==c.msecs?c.msecs:(new Date).getTime(),y=void 0!==c.nsecs?c.nsecs:s+1,S=p-o+(y-s)/1e4;if(S<0&&void 0===c.clockseq&&(v=v+1&16383),(S<0||p>o)&&void 0===c.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
1o=p,s=y,i=v;var T=(1e4*(268435455&(p+=122192928e5))+y)%4294967296;h[f++]=T>>>24&255,h[f++]=T>>>16&255,h[f++]=T>>>8&255,h[f++]=255&T;var b=p/4294967296*1e4&268435455;h[f++]=b>>>8&255,h[f++]=255&b,h[f++]=b>>>24&15|16,h[f++]=b>>>16&255,h[f++]=v>>>8|128,h[f++]=255&v;for(var O=0;O<6;++O)h[f+O]=g[O];return u||r(h)}},function(l,E,e){var t=e(241),r=e(242);l.exports=function n(i,o,s){var a=o&&s||0;"string"==typeof i&&(o="binary"===i?new Array(16):null,i=null);var c=(i=i||{}).random||(i.rng||t)();if(c[6]=15&c[6]|64,c[8]=63&c[8]|128,o)for(var u=0;u<16;++u)o[a+u]=c[u];return o||r(c)}},function(l,E,e){"use strict";var r=e(3)(e(18));l.exports=function(){function i(s){let c=(void 0===s?{}:s).waitTime,u=void 0===c?50:c;(0,r.default)(this,"queue",[]),(0,r.default)(this,"running",!1),this.waitTime=u}var o=i.prototype;return o.add=function(a){this.queue.push(a),this.run()},o.run=function(){if(this.running)return;this.running=!0;const a=()=>{0!==this.queue.length?this.queue.shift()(()=>{setTimeout(a,this.waitTime)}):this.running=!1};a()},i}()},function(l,E,e){"use strict";const t=e(9),r={for:"htmlFor",class:"className"};l.exports=function(n){n.prototype.attr=function(s,a){if(t(s)){let c;Object.keys(s).forEach(u=>{c=r[u]||u,this.first.setAttribute(c,s[u])})}else{if(void 0===a)return this.first.getAttribute(r[s]||s);this.first.setAttribute(r[s]||s,a)}return this},n.prototype.removeAttr=function(s){const a=r[s]||s;return this.forEach(c=>{c.removeAttribute(a)}),this},n.prototype.html=function(s){return void 0!==s&&(this.first.innerHTML=s),this.first.innerHTML},n.prototype.center=function(s,a){let c;return this.forEach(u=>{c=new n(u),s=s||parseInt(c.width(),10),a=a||parseInt(c.height(),10),c.css("margin",`${-.5*a+"px"} 0 0 ${-.5*s+"px"}`).addClass("OT_centered")}),this},n._attachToOTHelpers.centerElement=function(s,a,c){return new n(s).center(a,c)};const i=function(a){return a.offsetWidth>0?`${a.offsetWidth}px`:new n(a).css("width")},o=function(a){return a.offsetHeight>0?`${a.offsetHeight}px`:new n(a).css("height")};n.prototype.width=function(s){return s?(this.css("width",s),this):this.isDisplayNone()?this.makeVisibleAndYield(a=>i(a))[0]:i(this.get(0))},n._attachToOTHelpers.width=function(s,a){const c=new n(s).width(a);return a?n._attachToOTHelpers:c},n.prototype.height=function(s){return s?(this.css("height",s),this):this.isDisplayNone()?this.makeVisibleAndYield(a=>o(a))[0]:o(this.get(0))},n._attachToOTHelpers.height=function(s,a){const c=new n(s).height(a);return a?n._attachToOTHelpers:c}}},function(l,E,e){"use strict";const t=e(2),r=(void 0!==typeof window?window:global).getComputedStyle,n={Firefox:"moz",Opera:"O",Chrome:"Webkit",Safari:"Webkit"};l.exports=function(o,s){const a={},c={},f=function(y,S){if(S in y.style)return S;const b=function i(){return n[t.name]}()+S[0].toUpperCase()+S.slice(1);return b in y.style?b:S};o.prototype.show=function(){return this.forEach(p=>{const y=p.style.display;(""===y||"none"===y)&&(p.style.display=a[p]||"",delete a[p]),function(y){return"none"===r(y).getPropertyValue("display")}(p)&&(a[p]="none",p.style.display=function(y){if(c[y.ownerDocument]&&c[y.ownerDocument][y.nodeName])return c[y.ownerDocument][y.nodeName];c[y.ownerDocument]||(c[y.ownerDocument]={});let T,S=y.ownerDocument.createElement(y.nodeName);return y.ownerDocument.body.appendChild(S),T=new o(S).css("display"),c[y.ownerDocument][y.nodeName]=T,new o(S).remove(),S=null,T}(p))})},o.prototype.hide=function(){return this.forEach(p=>{"none"!==p.style.display&&(a[p]=p.style.display,p.style.display="none")})},o.prototype.css=function(p,y){if(0!==this.length)return"string"!=typeof p?this.forEach(S=>{!function(y,S){const T=y.style;for(const b in S)S.hasOwnProperty(b)&&(T[f(y,b)]=S[b])}(S,p)}):void 0!==y?this.forEach(S=>{!function(y,S,T){y.style[f(y,S)]=T}(S,p,y)}):function(y,S){const T=f(y,S);let O=r(y).getPropertyValue(T);return""===O&&(O=y.style[T]),O}(this.first,p)},o.prototype.makeVisibleAndYield=function(p){const y={display:"block",visibility:"hidden"},S=[];return this.forEach(T=>{const b=s(T);S.push(b?function(y,S,T){const b=new o(y),O={};let C,R;for(C in S)S.hasOwnProperty(C)&&(O[C]=y.style[C],b.css(C,S[C]));for(C in R=T(y),S)S.hasOwnProperty(C)&&b.css(C,O[C]||"");return R}(b,y,p):void 0)}),S}}},function(l,E,e){"use strict";let t="Node";"undefined"!=typeof navigator&&(t=navigator.userAgent),l.exports=function(n){return void 0===n&&(n={userAgent:t}),/iPhone|iPad/.test(n.userAgent)||t.includes("Mac")&&"ontouchend"in document}},function(l,E,e){"use strict";l.exports=function(){const r=navigator.userAgent.match(/OS (\d+_\d+) like Mac/);if(null!==r&&r[1])return r[1].replace("_",".")}},function(l,E,e){"use strict";const t=/(Electron)\/([0-9]{1,}[.0-9]{0,})/;l.exports=r=>{const n=r.match(t);return n&&parseFloat(n[2])}},function(l,E,e){"use strict";const t=e(534);function r(s,a){return!!a&&(t()?s.classList.contains(a):s.className.indexOf(a)>-1)}
1l.exports=function(s){s.prototype.addClass=function(a){if(a){const c=a.trim().split(/\s+/);this.forEach(u=>{!function i(s,a){if(!a||0===a.length||1!==s.nodeType)return;const c=a.length;let u=0;if(t())for(;u<c;++u)s.classList.add(a[u]);else if(s.className||1!==a.length){let d=` ${s.className} `;for(;u<c;++u)~d.indexOf(` ${a[u]} `)||(d+=`${a[u]} `);s.className=d.trim()}else s.className=a.join(" ")}(u,c)})}return this},s.prototype.removeClass=function(a){if(a){const c=a.trim().split(/\s+/);this.forEach(u=>{!function o(s,a){if(!a||0===a.length||1!==s.nodeType)return;const c=a.length;let u=0;if(t()){for(;u<c;++u)s.classList.remove(a[u]);return}let d=` ${s.className} `.replace(/[\s+]/," ");for(;u<c;++u)d=d.replace(` ${a[u]} `," ");s.className=d.trim()}(u,c)})}return this},s.prototype.toggleClass=function(a){if(a){const c=a.trim().split(/\s+/);this.forEach(u=>{!function n(s,a){if(!a||0===a.length||1!==s.nodeType)return;const c=a.length;let u=0;if(t()){for(;u<c;++u)s.classList.toggle(a[u]);return}let d=` ${s.className} `.replace(/[\s+]/," ");for(;u<c;++u)r(s,a[u])?d=d.replace(` ${a[u]} `," "):d+=`${a[u]} `;s.className=d.trim()}(u,c)})}return this},s.prototype.hasClass=function(a){return this.some(c=>r(c,a))}}},function(l,E,e){"use strict";l.exports=()=>"undefined"!=typeof document&&"classList"in document.createElement("a")},function(l,E,e){"use strict";const t=e(536);l.exports=function(r){let n=0,i=0;r.prototype.observeStyleChanges=function(c,u){const d=[];return this.forEach(f=>{d.push(function(u,d,f){const h={},g=function(p){switch(p){case"width":return new r(u).width();case"height":return new r(u).height();default:return new r(u).css(p)}};d.forEach(m=>{h[m]=g(m)});const v=new(void 0!==typeof window?window:global).MutationObserver(m=>{const p={};m.forEach(y=>{if("style"!==y.attributeName)return;const S=new r(u).isDisplayNone();d.forEach(T=>{if(S&&("width"===T||"height"===T))return;const b=g(T);b!==h[T]&&(p[T]=[h[T],b],h[T]=b)})}),t(p)||setTimeout(()=>{f.call(null,p)})});return v.observe(u,{attributes:!0,attributeFilter:["style"],childList:!1,characterData:!1,subtree:!1}),v}(f,c,u))}),d},r.prototype.observeNodeOrChildNodeRemoval=function(c){const u=[];return this.forEach(d=>{u.push(function(u,d){const f=new(void 0!==typeof window?window:global).MutationObserver(g=>{let v=[];g.forEach(m=>{m.removedNodes.length&&(v=v.concat(Array.prototype.slice.call(m.removedNodes)))}),v.length&&setTimeout(()=>{d(new r(v))})});f.observe(u,{attributes:!1,childList:!0,characterData:!1,subtree:!0}),i++;const h=f.disconnect;return f.disconnect=function(){h.apply(f,arguments),i--},f}(d,c))}),u},r.prototype.observeSize=function(c){const u=[];return this.forEach(d=>{u.push(function(u,d){let f={width:0,height:0};const h=setInterval(()=>{const g=u.getBoundingClientRect();(f.width!==g.width||f.height!==g.height)&&(d(g,f),f={width:g.width,height:g.height})},200);return n++,{disconnect(){clearInterval(h),n--}}}(d,c))}),u},r._attachToOTHelpers.observeStyleChanges=function(c,u,d){return new r(c).observeStyleChanges(u,d)[0]},r._attachToOTHelpers.observeNodeOrChildNodeRemoval=function(c,u){return new r(c).observeNodeOrChildNodeRemoval(u)[0]},r.__testOnly||(r.__testOnly={}),r.__testOnly.sizeObserverCount=function(){return n},r.__testOnly.nodeRemovalObserverCount=function(){return i}}},function(l,E,e){var t=e(114),r=e(40),n=e(64),i=e(10),o=e(24),s=e(65),a=e(68),c=e(85),h=Object.prototype.hasOwnProperty;l.exports=function g(v){if(null==v)return!0;if(o(v)&&(i(v)||"string"==typeof v||"function"==typeof v.splice||s(v)||c(v)||n(v)))return!v.length;var m=r(v);if("[object Map]"==m||"[object Set]"==m)return!v.size;if(a(v))return!t(v).length;for(var p in v)if(h.call(v,p))return!1;return!0}},function(l,E,e){"use strict";l.exports={1004:"Authentication error",1005:"Invalid Session ID",1006:"Connect Failed",1007:"Connect Rejected",1008:"Connect Time-out",1009:"Security Error",1010:"Not Connected",1011:"Invalid Parameter",1012:"Peer-to-peer Stream Play Failed",1013:"Connection Failed",1014:"API Response Failure",1015:"PeerConnection not connected, cannot call this method",1021:"Request Timeout",1026:"Terms of Service Violation: Export Compliance",1027:"Connection Limit Exceeded",1040:"Set Video Source Failure",1041:"Invalid Video Source",1500:"Unable to Publish",1501:"Unable to Subscribe",1502:"Unsupported Video Codec",1503:"No TURN server found",1520:"Unable to Force Disconnect",1530:"Unable to Force Unpublish",1540:"Unable to Force Mute",1553:"ICEWorkflow failed",1600:"createOffer, createAnswer, setLocalDescription, setRemoteDescription",1605:"Stream Limit Exceeded",2e3:"Internal Error",2001:"Unexpected Server Response",2021:"Proxy URL Timing Error",2022:"Proxy URL Already Set Error",2031:"getRtcStatsReport is not supported in this browser",4e3:"WebSocket Connection Failed",4001:"WebSocket Network Disconnected",5001:"Unable to access media engine"}},function(l,E,e){"use strict";const t=e(15);l.exports=function(n,i,o,s,a){let c,u=o;return n.currentState=o,n.is=function(){return-1!==Array.prototype.indexOf.call(arguments,u)},n.isNot=function(){return-1===Array.prototype.indexOf.call(arguments,u)},function(h){if(u!==h){if(-1===i.indexOf(h))return void(a&&t(a)&&a("invalidState",h));n.previousState=u,c=u,n.currentState=h,u=h,s&&t(s)&&s(h,c)}}}},function(l,E,e){"use strict";const t=e(247),r={};l.exports=r,r.isElementNode=function(n){return n&&"object"==typeof n&&1===n.nodeType},r.createElement=function(n,i,o,s){const a=(s||document).createElement(n);i=i||{}
1,Object.keys(i).forEach(u=>{if("object"==typeof i[u]){a[u]||(a[u]={});const d=i[u];Object.keys(d).forEach(f=>{a[u][f]=d[f]})}else"className"===u?a.className=i[u]:a.setAttribute(u,i[u])});const c=function(d){"string"==typeof d?a.innerHTML+=d:a.appendChild(d)};return Array.isArray(o)?o.forEach(c):o&&c(o),a},t(r)},function(l,E,e){"use strict";const t=e(541);l.exports=function(r){void 0===r&&(r={}),!(r.isSessionProxied||e(542))(r.sessionId)||t.forEach(s=>{s in r&&(r[s]="")})}},function(l,E,e){"use strict";l.exports=["audioLocalAddress","audioRemoteAddress","videoLocalAddress","videoRemoteAddress"]},function(l,E,e){"use strict";const r=e(20).sessions;l.exports=n=>{const i=r.get(n);return!!i&&!!i._.getProxyUrl()}},function(l,E,e){"use strict";l.exports=["buildHash","minimumVersion","debug",["websiteURL","websiteUrl"],["cdnURL","cdnUrl"],["loggingURL","loggingUrl"],["apiURL","apiUrl"],["supportSSL",!0],["cdnURLSSL","cdnUrl"],["loggingURLSSL","loggingUrl"],["apiURLSSL","apiUrl"],["assetURL","assetUrl"]]},function(l,E,e){"use strict";l.exports=["apiUrl","apiURL","apiURLSSL"]},function(l,E,e){"use strict";l.exports=function(){const r=(void 0!==typeof window?window:global).OT,n=(void 0!==typeof window?window:global).TB;return()=>{const i=(void 0!==typeof window?window:global).OT;return(void 0!==typeof window?window:global).OT=r,(void 0!==typeof window?window:global).TB=n,i}}},function(l,E,e){"use strict";l.exports=function(n){function i(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];const c=new n(...s);return Object.setPrototypeOf(c,i.prototype),c}return i.prototype=Object.create(n.prototype),Object.defineProperties(i.prototype,(r=>{const n={};return Object.getOwnPropertyNames(r).forEach(i=>{n[i]=Object.getOwnPropertyDescriptor(r,i)}),n})(n.prototype)),Object.keys(n).forEach(o=>{i[o]=n[o]}),i}},function(l,E,e){"use strict";var t=e(28);l.exports=function(r,n){var i=r&&r.window,o={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0};for(var s in n)hasOwnProperty.call(n,s)&&(o[s]=n[s]);var a=t.log,c=t.detectBrowser(i),u=e(548)||null,d=e(550)||null,f=e(554)||null,h=e(556)||null,g=e(557)||null,v={browserDetails:c,commonShim:g,extractVersion:t.extractVersion,disableLog:t.disableLog,disableWarnings:t.disableWarnings};switch(c.browser){case"chrome":if(!u||!u.shimPeerConnection||!o.shimChrome)return a("Chrome shim is not included in this adapter release."),v;a("adapter.js shimming chrome."),v.browserShim=u,g.shimCreateObjectURL(i),u.shimGetUserMedia(i),u.shimMediaStream(i),u.shimSourceObject(i),u.shimPeerConnection(i),u.shimOnTrack(i),u.shimAddTrackRemoveTrack(i),u.shimGetSendersWithDtmf(i),u.shimSenderReceiverGetStats(i),u.fixNegotiationNeeded(i),g.shimRTCIceCandidate(i),g.shimMaxMessageSize(i),g.shimSendThrowTypeError(i);break;case"firefox":if(!f||!f.shimPeerConnection||!o.shimFirefox)return a("Firefox shim is not included in this adapter release."),v;a("adapter.js shimming firefox."),v.browserShim=f,g.shimCreateObjectURL(i),f.shimGetUserMedia(i),f.shimSourceObject(i),f.shimPeerConnection(i),f.shimOnTrack(i),f.shimRemoveStream(i),f.shimSenderGetStats(i),f.shimReceiverGetStats(i),f.shimRTCDataChannel(i),g.shimRTCIceCandidate(i),g.shimMaxMessageSize(i),g.shimSendThrowTypeError(i);break;case"edge":if(!d||!d.shimPeerConnection||!o.shimEdge)return a("MS edge shim is not included in this adapter release."),v;a("adapter.js shimming edge."),v.browserShim=d,g.shimCreateObjectURL(i),d.shimGetUserMedia(i),d.shimPeerConnection(i),d.shimReplaceTrack(i),d.shimGetDisplayMedia(i),g.shimMaxMessageSize(i),g.shimSendThrowTypeError(i);break;case"safari":if(!h||!o.shimSafari)return a("Safari shim is not included in this adapter release."),v;a("adapter.js shimming safari."),v.browserShim=h,g.shimCreateObjectURL(i),h.shimRTCIceServerUrls(i),h.shimCreateOfferLegacy(i),h.shimCallbacksAPI(i),h.shimLocalStreamsAPI(i),h.shimRemoteStreamsAPI(i),h.shimTrackEventTransceiver(i),h.shimGetUserMedia(i),g.shimRTCIceCandidate(i),g.shimMaxMessageSize(i),g.shimSendThrowTypeError(i);break;default:a("Unsupported browser!")}return v}},function(l,E,e){"use strict";(function(t){var r=e(28),n=r.log;function i(s,a,c){!a||c.has(a.id)||(c.set(a.id,a),Object.keys(a).forEac
1h(function(u){u.endsWith("Id")?i(s,s.get(a[u]),c):u.endsWith("Ids")&&a[u].forEach(function(d){i(s,s.get(d),c)})}))}function o(s,a,c){var u=c?"outbound-rtp":"inbound-rtp",d=new Map;if(null===a)return d;var f=[];return s.forEach(function(h){"track"===h.type&&h.trackIdentifier===a.id&&f.push(h)}),f.forEach(function(h){s.forEach(function(g){g.type===u&&g.trackId===h.id&&i(s,g,d)})}),d}l.exports={shimGetUserMedia:e(549),shimMediaStream:function(s){s.MediaStream=s.MediaStream||s.webkitMediaStream},shimOnTrack:function(s){if("object"==typeof s&&s.RTCPeerConnection&&!("ontrack"in s.RTCPeerConnection.prototype)){Object.defineProperty(s.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(c){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=c)},enumerable:!0,configurable:!0});var a=s.RTCPeerConnection.prototype.setRemoteDescription;s.RTCPeerConnection.prototype.setRemoteDescription=function(){var c=this;return c._ontrackpoly||(c._ontrackpoly=function(u){u.stream.addEventListener("addtrack",function(d){var f;f=s.RTCPeerConnection.prototype.getReceivers?c.getReceivers().find(function(g){return g.track&&g.track.id===d.track.id}):{track:d.track};var h=new Event("track");h.track=d.track,h.receiver=f,h.transceiver={receiver:f},h.streams=[u.stream],c.dispatchEvent(h)}),u.stream.getTracks().forEach(function(d){var f;f=s.RTCPeerConnection.prototype.getReceivers?c.getReceivers().find(function(g){return g.track&&g.track.id===d.id}):{track:d};var h=new Event("track");h.track=d,h.receiver=f,h.transceiver={receiver:f},h.streams=[u.stream],c.dispatchEvent(h)})},c.addEventListener("addstream",c._ontrackpoly)),a.apply(c,arguments)}}else r.wrapPeerConnectionEvent(s,"track",function(c){return c.transceiver||Object.defineProperty(c,"transceiver",{value:{receiver:c.receiver}}),c})},shimGetSendersWithDtmf:function(s){if("object"==typeof s&&s.RTCPeerConnection&&!("getSenders"in s.RTCPeerConnection.prototype)&&"createDTMFSender"in s.RTCPeerConnection.prototype){var a=function(g,v){return{track:v,get dtmf(){return void 0===this._dtmf&&(this._dtmf="audio"===v.kind?g.createDTMFSender(v):null),this._dtmf},_pc:g}};if(!s.RTCPeerConnection.prototype.getSenders){s.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var c=s.RTCPeerConnection.prototype.addTrack;s.RTCPeerConnection.prototype.addTrack=function(g,v){var m=this,p=c.apply(m,arguments);return p||(p=a(m,g),m._senders.push(p)),p};var u=s.RTCPeerConnection.prototype.removeTrack;s.RTCPeerConnection.prototype.removeTrack=function(g){var v=this;u.apply(v,arguments);var m=v._senders.indexOf(g);-1!==m&&v._senders.splice(m,1)}}var d=s.RTCPeerConnection.prototype.addStream;s.RTCPeerConnection.prototype.addStream=function(g){var v=this;v._senders=v._senders||[],d.apply(v,[g]),g.getTracks().forEach(function(m){v._senders.push(a(v,m))})};var f=s.RTCPeerConnection.prototype.removeStream;s.RTCPeerConnection.prototype.removeStream=function(g){var v=this;v._senders=v._senders||[],f.apply(v,[g]),g.getTracks().forEach(function(m){var p=v._senders.find(function(y){return y.track===m});p&&v._senders.splice(v._senders.indexOf(p),1)})}}else if("object"==typeof s&&s.RTCPeerConnection&&"getSenders"in s.RTCPeerConnection.prototype&&"createDTMFSender"in s.RTCPeerConnection.prototype&&s.RTCRtpSender&&!("dtmf"in s.RTCRtpSender.prototype)){var h=s.RTCPeerConnection.prototype.getSenders;s.RTCPeerConnection.prototype.getSenders=function(){var g=this,v=h.apply(g,[]);return v.forEach(function(m){m._pc=g}),v},Object.defineProperty(s.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&(this._dtmf="audio"===this.track.kind?this._pc.createDTMFSender(this.track):null),this._dtmf}})}},shimSenderReceiverGetStats:function(s){if("object"==typeof s&&s.RTCPeerConnection&&s.RTCRtpSender&&s.RTCRtpReceiver){if(!("getStats"in s.RTCRtpSender.prototype)){var a=s.RTCPeerConnection.prototype.getSenders;a&&(s.RTCPeerConnection.prototype.getSenders=function(){var f=this,h=a.apply(f,[]);return h.forEach(function(g){g._pc=f}),h});var c=s.RTCPeerConnection.prototype.addTrack;c&&(s.RTCPeerConnection.prototype.addTrack=function(){var f=c.apply(this,arguments);return f._pc=this,f}),s.RTCRtpSender.prototype.getStats=function(){var f=this;return this._pc.getStats().then(function(h){return o(h,f.track,!0)})}}if(!("getStats"in s.RTCRtpReceiver.prototype)){var u=s.RTCPeerConnection.prototype.getReceivers;u&&(s.RTCPeerConnection.prototype.getReceivers=function(){var f=this,h=u.apply(f,[]);return h.forEach(function(g){g._pc=f}),h}),r.wrapPeerConnectionEvent(s,"track",function(f){return f.receiver._pc=f.srcElement,f}),s.RTCRtpReceiver.prototype.getStats=function(){var f=this;return this._pc.getStats().then(function(h){return o(h,f.track,!1)})}}if("getStats"in s.RTCRtpSender.prototype&&"getStats"in s.RTCRtpReceiver.prototype){var d=s.RTCPeerConnection.prototype.getStats;s.RTCPeerConnection.prototype.getStats=function(){var f=this;if(arguments.length>0&&arguments[0]instanceof s.MediaStreamTrack){var g,v,m,h=arguments[0];
1return f.getSenders().forEach(function(p){p.track===h&&(g?m=!0:g=p)}),f.getReceivers().forEach(function(p){return p.track===h&&(v?m=!0:v=p),p.track===h}),m||g&&v?t.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):g?g.getStats():v?v.getStats():t.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return d.apply(f,arguments)}}}},shimSourceObject:function(s){var a=s&&s.URL;"object"==typeof s&&s.HTMLMediaElement&&!("srcObject"in s.HTMLMediaElement.prototype)&&Object.defineProperty(s.HTMLMediaElement.prototype,"srcObject",{get:function(){return this._srcObject},set:function(c){var u=this;this._srcObject=c,this.src&&a.revokeObjectURL(this.src),c?(this.src=a.createObjectURL(c),c.addEventListener("addtrack",function(){u.src&&a.revokeObjectURL(u.src),u.src=a.createObjectURL(c)}),c.addEventListener("removetrack",function(){u.src&&a.revokeObjectURL(u.src),u.src=a.createObjectURL(c)})):this.src=""}})},shimAddTrackRemoveTrackWithNative:function(s){s.RTCPeerConnection.prototype.getLocalStreams=function(){var f=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(h){return f._shimmedLocalStreams[h][0]})};var a=s.RTCPeerConnection.prototype.addTrack;s.RTCPeerConnection.prototype.addTrack=function(f,h){if(!h)return a.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var g=a.apply(this,arguments);return this._shimmedLocalStreams[h.id]?-1===this._shimmedLocalStreams[h.id].indexOf(g)&&this._shimmedLocalStreams[h.id].push(g):this._shimmedLocalStreams[h.id]=[h,g],g};var c=s.RTCPeerConnection.prototype.addStream;s.RTCPeerConnection.prototype.addStream=function(f){var h=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},f.getTracks().forEach(function(m){if(h.getSenders().find(function(y){return y.track===m}))throw new DOMException("Track already exists.","InvalidAccessError")});var g=h.getSenders();c.apply(this,arguments);var v=h.getSenders().filter(function(m){return-1===g.indexOf(m)});this._shimmedLocalStreams[f.id]=[f].concat(v)};var u=s.RTCPeerConnection.prototype.removeStream;s.RTCPeerConnection.prototype.removeStream=function(f){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[f.id],u.apply(this,arguments)};var d=s.RTCPeerConnection.prototype.removeTrack;s.RTCPeerConnection.prototype.removeTrack=function(f){var h=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},f&&Object.keys(this._shimmedLocalStreams).forEach(function(g){var v=h._shimmedLocalStreams[g].indexOf(f);-1!==v&&h._shimmedLocalStreams[g].splice(v,1),1===h._shimmedLocalStreams[g].length&&delete h._shimmedLocalStreams[g]}),d.apply(this,arguments)}},shimAddTrackRemoveTrack:function(s){if(s.RTCPeerConnection){var a=r.detectBrowser(s);if(s.RTCPeerConnection.prototype.addTrack&&a.version>=65)return this.shimAddTrackRemoveTrackWithNative(s);var c=s.RTCPeerConnection.prototype.getLocalStreams;s.RTCPeerConnection.prototype.getLocalStreams=function(){var m=this,p=c.apply(this);return m._reverseStreams=m._reverseStreams||{},p.map(function(y){return m._reverseStreams[y.id]})};var u=s.RTCPeerConnection.prototype.addStream;s.RTCPeerConnection.prototype.addStream=function(m){var p=this;if(p._streams=p._streams||{},p._reverseStreams=p._reverseStreams||{},m.getTracks().forEach(function(S){if(p.getSenders().find(function(b){return b.track===S}))throw new DOMException("Track already exists.","InvalidAccessError")}),!p._reverseStreams[m.id]){var y=new s.MediaStream(m.getTracks());p._streams[m.id]=y,p._reverseStreams[y.id]=m,m=y}u.apply(p,[m])};var d=s.RTCPeerConnection.prototype.removeStream;s.RTCPeerConnection.prototype.removeStream=function(m){var p=this;p._streams=p._streams||{},p._reverseStreams=p._reverseStreams||{},d.apply(p,[p._streams[m.id]||m]),delete p._reverseStreams[p._streams[m.id]?p._streams[m.id].id:m.id],delete p._streams[m.id]},s.RTCPeerConnection.prototype.addTrack=function(m,p){var y=this;if("closed"===y.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");
1var S=[].slice.call(arguments,1);if(1!==S.length||!S[0].getTracks().find(function(C){return C===m}))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");var T=y.getSenders().find(function(C){return C.track===m});if(T)throw new DOMException("Track already exists.","InvalidAccessError");y._streams=y._streams||{},y._reverseStreams=y._reverseStreams||{};var b=y._streams[p.id];if(b)b.addTrack(m),t.resolve().then(function(){y.dispatchEvent(new Event("negotiationneeded"))});else{var O=new s.MediaStream([m]);y._streams[p.id]=O,y._reverseStreams[O.id]=p,y.addStream(O)}return y.getSenders().find(function(C){return C.track===m})},["createOffer","createAnswer"].forEach(function(m){var p=s.RTCPeerConnection.prototype[m];s.RTCPeerConnection.prototype[m]=function(){var y=this,S=arguments,T=arguments.length&&"function"==typeof arguments[0];return T?p.apply(y,[function(b){var O=f(y,b);S[0].apply(null,[O])},function(b){S[1]&&S[1].apply(null,b)},arguments[2]]):p.apply(y,arguments).then(function(b){return f(y,b)})}});var g=s.RTCPeerConnection.prototype.setLocalDescription;s.RTCPeerConnection.prototype.setLocalDescription=function(){var m=this;return!arguments.length||!arguments[0].type||(arguments[0]=h(m,arguments[0])),g.apply(m,arguments)};var v=Object.getOwnPropertyDescriptor(s.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(s.RTCPeerConnection.prototype,"localDescription",{get:function(){var p=v.get.apply(this);return""===p.type?p:f(this,p)}}),s.RTCPeerConnection.prototype.removeTrack=function(m){var S,p=this;if("closed"===p.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!m._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(m._pc!==p)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");p._streams=p._streams||{},Object.keys(p._streams).forEach(function(T){p._streams[T].getTracks().find(function(O){return m.track===O})&&(S=p._streams[T])}),S&&(1===S.getTracks().length?p.removeStream(p._reverseStreams[S.id]):S.removeTrack(m.track),p.dispatchEvent(new Event("negotiationneeded")))}}function f(m,p){var y=p.sdp;return Object.keys(m._reverseStreams||[]).forEach(function(S){var T=m._reverseStreams[S];y=y.replace(new RegExp(m._streams[T.id].id,"g"),T.id)}),new RTCSessionDescription({type:p.type,sdp:y})}function h(m,p){var y=p.sdp;return Object.keys(m._reverseStreams||[]).forEach(function(S){var T=m._reverseStreams[S],b=m._streams[T.id];y=y.replace(new RegExp(T.id,"g"),b.id)}),new RTCSessionDescription({type:p.type,sdp:y})}},shimPeerConnection:function(s){var a=r.detectBrowser(s);if(!s.RTCPeerConnection&&s.webkitRTCPeerConnection&&(s.RTCPeerConnection=function(d,f){return n("PeerConnection"),d&&d.iceTransportPolicy&&(d.iceTransports=d.iceTransportPolicy),new s.webkitRTCPeerConnection(d,f)},s.RTCPeerConnection.prototype=s.webkitRTCPeerConnection.prototype,s.webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(s.RTCPeerConnection,"generateCertificate",{get:function(){return s.webkitRTCPeerConnection.generateCertificate}})),s.RTCPeerConnection){var c=s.RTCPeerConnection.prototype.getStats;s.RTCPeerConnection.prototype.getStats=function(d,f,h){var g=this,v=arguments;if(arguments.length>0&&"function"==typeof d)return c.apply(this,arguments);if(0===c.length&&(0===arguments.length||"function"!=typeof arguments[0]))return c.apply(this,[]);var m=function(S){var T={};return S.result().forEach(function(O){var C={id:O.id,timestamp:O.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[O.type]||O.type};O.names().forEach(function(R){C[R]=O.stat(R)}),T[C.id]=C}),T},p=function(S){return new Map(Object.keys(S).map(function(T){return[T,S[T]]}))};if(arguments.length>=2){var y=function(S){v[1](p(m(S)))};return c.apply(this,[y,arguments[0]])}return new t(function(S,T){c.apply(g,[function(b){S(p(m(b)))},T])}).then(f,h)},a.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(d){var f=s.RTCPeerConnection.prototype[d];s.RTCPeerConnection.prototype[d]=function(){var h=arguments,g=this,v=new t(function(m,p){f.apply(g,[h[0],m,p])});return h.length<2?v:v.then(function(){h[1].apply(null,[])},function(m){h.length>=3&&h[2].apply(null,[m])})}}),a.version<52&&["createOffer","createAnswer"].forEach(function(d){var f=s.RTCPeerConnection.prototype[d];s.RTCPeerConnection.prototype[d]=function(){var h=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var g=1===arguments.length?arguments[0]:void 0;return new t(function(v,m){f.apply(h,[v,m,g])})}return f.apply(this,arguments)}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(d){var f=s.RTCPeerConnection.prototype[d];s.RTCPeerConnection.prototype[d]=function(){return arguments[0]=new("addIceCandidate"===d?s.RTCIceCandidate:s.RTCSessionDescription)(arguments[0]),f.apply(this,arguments)}});var u=s.RTCPeerConnection.prototype.addIceCandidate;s.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?u.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),t.resolve())}}},fixNegotiationNeeded:function(s){r.wrapPeerConnectionEvent(s,"negotiationneeded",function(a){if
1("stable"===a.target.signalingState)return a})},shimGetDisplayMedia:function(s,a){if(s.navigator&&s.navigator.mediaDevices&&!("getDisplayMedia"in s.navigator.mediaDevices)){if("function"!=typeof a)return void console.error("shimGetDisplayMedia: getSourceId argument is not a function");s.navigator.mediaDevices.getDisplayMedia=function(c){return a(c).then(function(u){var d=c.video&&c.video.width,f=c.video&&c.video.height;return c.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:u,maxFrameRate:c.video&&c.video.frameRate||3}},d&&(c.video.mandatory.maxWidth=d),f&&(c.video.mandatory.maxHeight=f),s.navigator.mediaDevices.getUserMedia(c)})},s.navigator.getDisplayMedia=function(c){return r.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia"),s.navigator.mediaDevices.getDisplayMedia(c)}}}}}).call(this,e(0))},function(l,E,e){"use strict";(function(t){var r=e(28),n=r.log;l.exports=function(i){var o=r.detectBrowser(i),s=i&&i.navigator,a=function(g){if("object"!=typeof g||g.mandatory||g.optional)return g;var v={};return Object.keys(g).forEach(function(m){if("require"!==m&&"advanced"!==m&&"mediaSource"!==m){var p="object"==typeof g[m]?g[m]:{ideal:g[m]};void 0!==p.exact&&"number"==typeof p.exact&&(p.min=p.max=p.exact);var y=function(T,b){return T?T+b.charAt(0).toUpperCase()+b.slice(1):"deviceId"===b?"sourceId":b};if(void 0!==p.ideal){v.optional=v.optional||[];var S={};"number"==typeof p.ideal?(S[y("min",m)]=p.ideal,v.optional.push(S),(S={})[y("max",m)]=p.ideal,v.optional.push(S)):(S[y("",m)]=p.ideal,v.optional.push(S))}void 0!==p.exact&&"number"!=typeof p.exact?(v.mandatory=v.mandatory||{},v.mandatory[y("",m)]=p.exact):["min","max"].forEach(function(T){void 0!==p[T]&&(v.mandatory=v.mandatory||{},v.mandatory[y(T,m)]=p[T])})}}),g.advanced&&(v.optional=(v.optional||[]).concat(g.advanced)),v},c=function(g,v){if(o.version>=61)return v(g);if((g=JSON.parse(JSON.stringify(g)))&&"object"==typeof g.audio){var m=function(T,b,O){b in T&&!(O in T)&&(T[O]=T[b],delete T[b])};m((g=JSON.parse(JSON.stringify(g))).audio,"autoGainControl","googAutoGainControl"),m(g.audio,"noiseSuppression","googNoiseSuppression"),g.audio=a(g.audio)}if(g&&"object"==typeof g.video){var S,p=g.video.facingMode,y=o.version<66;if((p=p&&("object"==typeof p?p:{ideal:p}))&&("user"===p.exact||"environment"===p.exact||"user"===p.ideal||"environment"===p.ideal)&&(!s.mediaDevices.getSupportedConstraints||!s.mediaDevices.getSupportedConstraints().facingMode||y)&&(delete g.video.facingMode,"environment"===p.exact||"environment"===p.ideal?S=["back","rear"]:("user"===p.exact||"user"===p.ideal)&&(S=["front"]),S))return s.mediaDevices.enumerateDevices().then(function(T){var b=(T=T.filter(function(O){return"videoinput"===O.kind})).find(function(O){return S.some(function(C){return-1!==O.label.toLowerCase().indexOf(C)})});return!b&&T.length&&-1!==S.indexOf("back")&&(b=T[T.length-1]),b&&(g.video.deviceId=p.exact?{exact:b.deviceId}:{ideal:b.deviceId}),g.video=a(g.video),n("chrome: "+JSON.stringify(g)),v(g)});g.video=a(g.video)}return n("chrome: "+JSON.stringify(g)),v(g)},u=function(g){return o.version>=64?g:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[g.name]||g.name,message:g.message,constraint:g.constraint||g.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};s.getUserMedia=function(g,v,m){c(g,function(p){s.webkitGetUserMedia(p,v,function(y){m&&m(u(y))})})};var f=function(g){return new t(function(v,m){s.getUserMedia(g,v,m)})};if(s.mediaDevices||(s.mediaDevices={getUserMedia:f,enumerateDevices:function(){return new t(function(g){var v={audio:"audioinput",video:"videoinput"};return i.MediaStreamTrack.getSources(function(m){g(m.map(function(p){return{label:p.label,kind:v[p.kind],deviceId:p.id,groupId:""}}))})})},getSupportedConstraints:function(){return{deviceId:!0,echoCancellation:!0,facingMode:!0,frameRate:!0,height:!0,width:!0}}}),s.mediaDevices.getUserMedia){var h=s.mediaDevices.getUserMedia.bind(s.mediaDevices);s.mediaDevices.getUserMedia=function(g){return c(g,function(v){return h(v).then(function(m){if(v.audio&&!m.getAudioTracks().length||v.video&&!m.getVideoTracks().length)throw m.getTracks().forEac
1h(function(p){p.stop()}),new DOMException("","NotFoundError");return m},function(m){return t.reject(u(m))})})}}else s.mediaDevices.getUserMedia=function(g){return f(g)};void 0===s.mediaDevices.addEventListener&&(s.mediaDevices.addEventListener=function(){n("Dummy mediaDevices.addEventListener called.")}),void 0===s.mediaDevices.removeEventListener&&(s.mediaDevices.removeEventListener=function(){n("Dummy mediaDevices.removeEventListener called.")})}}).call(this,e(0))},function(l,E,e){"use strict";var t=e(28),r=e(551),n=e(552);l.exports={shimGetUserMedia:e(553),shimPeerConnection:function(i){var o=t.detectBrowser(i);if(i.RTCIceGatherer&&(i.RTCIceCandidate||(i.RTCIceCandidate=function(c){return c}),i.RTCSessionDescription||(i.RTCSessionDescription=function(c){return c}),o.version<15025)){var s=Object.getOwnPropertyDescriptor(i.MediaStreamTrack.prototype,"enabled");Object.defineProperty(i.MediaStreamTrack.prototype,"enabled",{set:function(c){s.set.call(this,c);var u=new Event("enabled");u.enabled=c,this.dispatchEvent(u)}})}i.RTCRtpSender&&!("dtmf"in i.RTCRtpSender.prototype)&&Object.defineProperty(i.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new i.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),i.RTCDtmfSender&&!i.RTCDTMFSender&&(i.RTCDTMFSender=i.RTCDtmfSender);var a=n(i,o.version);i.RTCPeerConnection=function(c){return c&&c.iceServers&&(c.iceServers=r(c.iceServers)),new a(c)},i.RTCPeerConnection.prototype=a.prototype},shimReplaceTrack:function(i){i.RTCRtpSender&&!("replaceTrack"in i.RTCRtpSender.prototype)&&(i.RTCRtpSender.prototype.replaceTrack=i.RTCRtpSender.prototype.setTrack)},shimGetDisplayMedia:function(i,o){if("getDisplayMedia"in i.navigator&&i.navigator.mediaDevices&&!("getDisplayMedia"in i.navigator.mediaDevices)){var s=i.navigator.getDisplayMedia;i.navigator.mediaDevices.getDisplayMedia=function(a){return s.call(i.navigator,a)},i.navigator.getDisplayMedia=function(a){return t.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia"),s.call(i.navigator,a)}}}}},function(l,E,e){"use strict";var t=e(28);l.exports=function(r,n){var i=!1;return(r=JSON.parse(JSON.stringify(r))).filter(function(o){if(o&&(o.urls||o.url)){var s=o.urls||o.url;o.url&&!o.urls&&t.deprecated("RTCIceServer.url","RTCIceServer.urls");var a="string"==typeof s;return a&&(s=[s]),s=s.filter(function(c){return 0!==c.indexOf("turn:")||-1===c.indexOf("transport=udp")||-1!==c.indexOf("turn:[")||i?0===c.indexOf("stun:")&&n>=14393&&-1===c.indexOf("?transport=udp"):(i=!0,!0)}),delete o.url,o.urls=a?s[0]:s,!!s.length}})}},function(l,E,e){"use strict";(function(t){var r=e(251);function i(d,f,h,g,v){var m=r.writeRtpDescription(d.kind,f);if(m+=r.writeIceParameters(d.iceGatherer.getLocalParameters()),m+=r.writeDtlsParameters(d.dtlsTransport.getLocalParameters(),"offer"===h?"actpass":v||"active"),m+="a=mid:"+d.mid+"\r\n",m+=d.rtpSender&&d.rtpReceiver?"a=sendrecv\r\n":d.rtpSender?"a=sendonly\r\n":d.rtpReceiver?"a=recvonly\r\n":"a=inactive\r\n",d.rtpSender){var p=d.rtpSender._initialTrackId||d.rtpSender.track.id;d.rtpSender._initialTrackId=p;var y="msid:"+(g?g.id:"-")+" "+p+"\r\n";m+="a="+y,m+="a=ssrc:"+d.sendEncodingParameters[0].ssrc+" "+y,d.sendEncodingParameters[0].rtx&&(m+="a=ssrc:"+d.sendEncodingParameters[0].rtx.ssrc+" "+y,m+="a=ssrc-group:FID "+d.sendEncodingParameters[0].ssrc+" "+d.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return m+="a=ssrc:"+d.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",d.rtpSender&&d.sendEncodingParameters[0].rtx&&(m+="a=ssrc:"+d.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),m}function s(d,f){var h={codecs:[],headerExtensions:[],fecMechanisms:[]},g=function(m,p){m=parseInt(m,10);for(var y=0;y<p.length;y++)if(p[y].payloadType===m||p[y].preferredPayloadType===m)return p[y]},v=function(m,p,y,S){var T=g(m.parameters.apt,y),b=g(p.parameters.apt,S);return T&&b&&T.name.toLowerCase()===b.name.toLowerCase()};return d.codecs.forEach(function(m){for(var p=0;p<f.codecs.length;p++){var y=f.codecs[p];if(m.name.toLowerCase()===y.name.toLowerCase()&&m.clockRate===y.clockRate){if("rtx"===m.name.toLowerCase()&&m.parameters&&y.parameters.apt&&!v(m,y,d.codecs,f.codecs))continue;(y=JSON.parse(JSON.stringify(y))).numChannels=Math.min(m.numChannels,y.numChannels),h.codecs.push(y),y.rtcpFeedback=y.rtcpFeedback.filter(function(S){for(var T=0;T<m.rtcpFeedback.length;T++)if(m.rtcpFeedback[T].type===S.type&&m.rtcpFeedback[T].parameter===S.parameter)return!0;return!1});break}}}),d.headerExtensions.forEach(function(m){for(var p=0;p<f.headerExtensions.length;p++){var y=f.headerExtensions[p];if(m.uri===y.uri){h.headerExtensions.push(y);break}}}),h}function a(d,f,h){return-1!=={offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[f][d].indexOf(h)}function c(d,f){var h=d.getRemoteCandidates().find(function(g){return f.foundation===g.foundation&&f.ip===g.ip&&f.port===g.port&&f.priority===g.priority&&f.protocol===g.protocol&&f.type===g.type});return h||d.addRemoteCandidate(f),!h}function u(d,f){var h=new Error(f);return h.name=d,h.code={NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:void 0,OperationError:void 0}[d],h}l.exports=function(d,f){function h(S,T){T.addTrack(S),T.dispatchEvent(new d.MediaStreamTrackEvent("addtrack",{track:S}))}function v(S,T,b,O){var C=new Event("track");C.track=T,C.receiver=b,C.transceiver={receiver:b},C.streams=O,d.setTimeout(function(){S._dispatchEvent("track",C)})}var m=function(S){var T=this,b=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(C){T[C]=b[C].bind(b)}),this.canTrickleIceCandidates=null,this.needNegotiation=!1,this.localStreams=[],this.remoteStreams=[],this._localDescription=null,this._remoteDescription=null,this.signalingState="stable",this.iceConnectionState="new",this.connectionState="new",this.iceGatheringState="new",S=JSON.parse(JSON.stringify(S||{})),this.usingBundle="max-bundle"===S.bundlePolicy,"negotiate"===S.rtcpMuxPolicy)throw u("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(S.rtcpMuxPolicy||(S.rtcpMuxPolicy="require"),S.iceTransportPolicy){case"all":case"relay":break;default:S.iceTransportPolicy="all"}switch(S.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:S.bundlePolicy="balanced"}if(S.iceServers=function o(d,f){var h=!1;return(d=JSON.parse(JSON.stringify(d))).filter(function(g){if(g&&(g.urls||g.url)){var v=g.urls||g.url;g.url&&!g.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var m="string"==typeof v;return m&&(v=[v]),v=v.filter(function(p){return 0!==p.indexOf("turn:")||-1===p.indexOf("transport=udp")||-1!==p.indexOf("turn:[")||h?0===p.indexOf("stun:")&&f>=14393&&-1===p.indexOf("?transport=udp"):(h=!0,!0)}),delete g.url,g.urls=m?v[0]:v,!!v.length}})}(S.iceServers||[],f),this._iceGatherers=[],S.iceCandidatePoolSize)for(var O=S.iceCandidatePoolSize;O>0;O--)this._iceGatherers.push(new d.RTCIceGatherer({iceServers:S.iceServers,gatherPolicy:S.iceTransportPolicy}));else S.iceCandidatePoolSize=0;this._config=S,this.transceivers=[],this._sdpSessionId=r.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1}
1;Object.defineProperty(m.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(m.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),m.prototype.onicecandidate=null,m.prototype.onaddstream=null,m.prototype.ontrack=null,m.prototype.onremovestream=null,m.prototype.onsignalingstatechange=null,m.prototype.oniceconnectionstatechange=null,m.prototype.onconnectionstatechange=null,m.prototype.onicegatheringstatechange=null,m.prototype.onnegotiationneeded=null,m.prototype.ondatachannel=null,m.prototype._dispatchEvent=function(S,T){this._isClosed||(this.dispatchEvent(T),"function"==typeof this["on"+S]&&this["on"+S](T))},m.prototype._emitGatheringStateChange=function(){var S=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",S)},m.prototype.getConfiguration=function(){return this._config},m.prototype.getLocalStreams=function(){return this.localStreams},m.prototype.getRemoteStreams=function(){return this.remoteStreams},m.prototype._createTransceiver=function(S,T){var O={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:S,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&this.transceivers.length>
10)O.iceTransport=this.transceivers[0].iceTransport,O.dtlsTransport=this.transceivers[0].dtlsTransport;else{var C=this._createIceAndDtlsTransports();O.iceTransport=C.iceTransport,O.dtlsTransport=C.dtlsTransport}return T||this.transceivers.push(O),O},m.prototype.addTrack=function(S,T){if(this._isClosed)throw u("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");if(this.transceivers.find(function(R){return R.track===S}))throw u("InvalidAccessError","Track already exists.");for(var O,C=0;C<this.transceivers.length;C++)!this.transceivers[C].track&&this.transceivers[C].kind===S.kind&&(O=this.transceivers[C]);return O||(O=this._createTransceiver(S.kind)),this._maybeFireNegotiationNeeded(),-1===this.localStreams.indexOf(T)&&this.localStreams.push(T),O.track=S,O.stream=T,O.rtpSender=new d.RTCRtpSender(S,O.dtlsTransport),O.rtpSender},m.prototype.addStream=function(S){var T=this;if(f>=15025)S.getTracks().forEach(function(O){T.addTrack(O,S)});else{var b=S.clone();S.getTracks().forEach(function(O,C){var R=b.getTracks()[C];O.addEventListener("enabled",function(I){R.enabled=I.enabled})}),b.getTracks().forEach(function(O){T.addTrack(O,b)})}},m.prototype.removeTrack=function(S){if(this._isClosed)throw u("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(S instanceof d.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var T=this.transceivers.find(function(C){return C.rtpSender===S});if(!T)throw u("InvalidAccessError","Sender was not created by this connection.");var b=T.stream;T.rtpSender.stop(),T.rtpSender=null,T.track=null,T.stream=null,-1===this.transceivers.map(function(C){return C.stream}).indexOf(b)&&this.localStreams.indexOf(b)>-1&&this.localStreams.splice(this.localStreams.indexOf(b),1),this._maybeFireNegotiationNeeded()},m.prototype.removeStream=function(S){var T=this;S.getTracks().forEach(function(b){var O=T.getSenders().find(function(C){return C.track===b});O&&T.removeTrack(O)})},m.prototype.getSenders=function(){return this.transceivers.filter(function(S){return!!S.rtpSender}).map(function(S){return S.rtpSender})},m.prototype.getReceivers=function(){return this.transceivers.filter(function(S){return!!S.rtpReceiver}).map(function(S){return S.rtpReceiver})},m.prototype._createIceGatherer=function(S,T){var b=this;if(T&&S>
10)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var O=new d.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(O,"state",{value:"new",writable:!0}),this.transceivers[S].bufferedCandidateEvents=[],this.transceivers[S].bufferCandidates=function(C){var R=!C.candidate||0===Object.keys(C.candidate).length;O.state=R?"completed":"gathering",null!==b.transceivers[S].bufferedCandidateEvents&&b.transceivers[S].bufferedCandidateEvents.push(C)},O.addEventListener("localcandidate",this.transceivers[S].bufferCandidates),O},m.prototype._gather=function(S,T){var b=this,O=this.transceivers[T].iceGatherer;if(!O.onlocalcandidate){var C=this.transceivers[T].bufferedCandidateEvents;this.transceivers[T].bufferedCandidateEvents=null,O.removeEventListener("localcandidate",this.transceivers[T].bufferCandidates),O.onlocalcandidate=function(R){if(!(b.usingBundle&&T>0)){var I=new Event("icecandidate");I.candidate={sdpMid:S,sdpMLineIndex:T};var A=R.candidate,P=!A||0===Object.keys(A).length;if(P)("new"===O.state||"gathering"===O.state)&&(O.state="completed");else{"new"===O.state&&(O.state="gathering"),A.component=1,A.ufrag=O.getLocalParameters().usernameFragment;var x=r.writeCandidate(A);I.candidate=Object.assign(I.candidate,r.parseCandidate(x)),I.candidate.candidate=x,I.candidate.toJSON=function(){return{candidate:I.candidate.candidate,sdpMid:I.candidate.sdpMid,sdpMLineIndex:I.candidate.sdpMLineIndex,usernameFragment:I.candidate.usernameFragment}}}var D=r.getMediaSections(b._localDescription.sdp);D[I.candidate.sdpMLineIndex]+=P?"a=end-of-candidates\r\n":"a="+I.candidate.candidate+"\r\n",b._localDescription.sdp=r.getDescription(b._localDescription.sdp)+D.join("");var L=b.transceivers.every(function(N){return N.iceGatherer&&"completed"===N.iceGatherer.state});"gathering"!==b.iceGatheringState&&(b.iceGatheringState="gathering",b._emitGatheringStateChange()),P||b._dispatchEvent("icecandidate",I),L&&(b._dispatchEvent("icecandidate",new Event("icecandidate")),b.iceGatheringState="complete",b._emitGatheringStateChange())}},d.setTimeout(function(){C.forEach(function(R){O.onlocalcandidate(R)})},0)}},m.prototype._createIceAndDtlsTransports=function(){var S=this,T=new d.RTCIceTransport(null);T.onicestatechange=function(){S._updateIceConnectionState(),S._updateConnectionState()};var b=new d.RTCDtlsTransport(T);return b.ondtlsstatechange=function(){S._updateConnectionState()},b.onerror=function(){Object.defineProperty(b,"state",{value:"failed",writable:!0}),S._updateConnectionState()},{iceTransport:T,dtlsTransport:b}},m.prototype._disposeIceAndDtlsTransports=function(S){var T=this.transceivers[S].iceGatherer;T&&(delete T.onlocalcandidate,delete this.transceivers[S].iceGatherer);var b=this.transceivers[S].iceTransport;b&&(delete b.onicestatechange,delete this.transceivers[S].iceTransport);var O=this.transceivers[S].dtlsTransport;O&&(delete O.ondtlsstatechange,delete O.onerror,delete this.transceivers[S].dtlsTransport)},m.prototype._transceive=function(S,T,b){var O=s(S.localCapabilities,S.remoteCapabilities);T&&S.rtpSender&&(O.encodings=S.sendEncodingParameters,O.rtcp={cname:r.localCName,compound:S.rtcpParameters.compound},S.recvEncodingParameters.length&&(O.rtcp.ssrc=S.recvEncodingParameters[0].ssrc),S.rtpSender.send(O)),b&&S.rtpReceiver&&O.codecs.length>0&&("video"===S.kind&&S.recvEncodingParameters&&f<15019&&S.recvEncodingParameters.forEach(function(C){delete C.rtx}),O.encodings=S.recvEncodingParameters.length?S.recvEncodingParameters:[{}],O.rtcp={compound:S.rtcpParameters.compound},S.rtcpParameters.cname&&(O.rtcp.cname=S.rtcpParameters.cname),S.sendEncodingParameters.length&&(O.rtcp.ssrc=S.sendEncodingParameters[0].ssrc),S.rtpReceiver.receive(O))},m.prototype.setLocalDescription=function(S){var b,O,T=this;if(-1===["offer","answer"].indexOf(S.type))return t.reject(u("TypeError",'Unsupported type "'+S.type+'"'));if(!a("setLocalDescription",S.type,T.signalingState)||T._isClosed)return t.reject(u("InvalidStateError","Can not set local "+S.type+" in state "+T.signalingState));if("offer"===S.type)b=r.splitSections(S.sdp),O=b.shift(),b.forEach(function(R,I){var A=r.parseRtpParameters(R);T.transceivers[I].localCapabilities=A}
1),T.transceivers.forEach(function(R,I){T._gather(R.mid,I)});else if("answer"===S.type){b=r.splitSections(T._remoteDescription.sdp),O=b.shift();var C=r.matchPrefix(O,"a=ice-lite").length>0;b.forEach(function(R,I){var A=T.transceivers[I],P=A.iceGatherer,x=A.iceTransport,D=A.dtlsTransport,L=A.localCapabilities,N=A.remoteCapabilities;if(!(r.isRejected(R)&&0===r.matchPrefix(R,"a=bundle-only").length||A.rejected)){var B=r.getIceParameters(R,O),V=r.getDtlsParameters(R,O);C&&(V.role="server"),(!T.usingBundle||0===I)&&(T._gather(A.mid,I),"new"===x.state&&x.start(P,B,C?"controlling":"controlled"),"new"===D.state&&D.start(V));var H=s(L,N);T._transceive(A,H.codecs.length>0,!1)}})}return T._localDescription={type:S.type,sdp:S.sdp},T._updateSignalingState("offer"===S.type?"have-local-offer":"stable"),t.resolve()},m.prototype.setRemoteDescription=function(S){var T=this;if(-1===["offer","answer"].indexOf(S.type))return t.reject(u("TypeError",'Unsupported type "'+S.type+'"'));if(!a("setRemoteDescription",S.type,T.signalingState)||T._isClosed)return t.reject(u("InvalidStateError","Can not set remote "+S.type+" in state "+T.signalingState));var b={};T.remoteStreams.forEach(function(x){b[x.id]=x});var O=[],C=r.splitSections(S.sdp),R=C.shift(),I=r.matchPrefix(R,"a=ice-lite").length>0,A=r.matchPrefix(R,"a=group:BUNDLE ").length>0;T.usingBundle=A;var P=r.matchPrefix(R,"a=ice-options:")[0];return T.canTrickleIceCandidates=!!P&&P.substr(14).split(" ").indexOf("trickle")>=0,C.forEach(function(x,D){var L=r.splitLines(x),N=r.getKind(x),U=r.isRejected(x)&&0===r.matchPrefix(x,"a=bundle-only").length,B=L[0].substr(2).split(" ")[2],V=r.getDirection(x,R),H=r.parseMsid(x),j=r.getMid(x)||r.generateIdentifier();if(U||"application"===N&&("DTLS/SCTP"===B||"UDP/DTLS/SCTP"===B))T.transceivers[D]={mid:j,kind:N,protocol:B,rejected:!0};else{!U&&T.transceivers[D]&&T.transceivers[D].rejected&&(T.transceivers[D]=T._createTransceiver(N,!0));var M,F,z,w,k,W,Z,ie,_,pe,ue,se=r.parseRtpParameters(x);U||(pe=r.getIceParameters(x,R),(ue=r.getDtlsParameters(x,R)).role="client"),Z=r.parseRtpEncodingParameters(x);var me=r.parseRtcpParameters(x),ve=r.matchPrefix(x,"a=end-of-candidates",R).length>0,Re=r.matchPrefix(x,"a=candidate:").map(function(de){return r.parseCandidate(de)}).filter(function(de){return 1===de.component});if(("offer"===S.type||"answer"===S.type)&&!U&&A&&D>0&&T.transceivers[D]&&(T._disposeIceAndDtlsTransports(D),T.transceivers[D].iceGatherer=T.transceivers[
10].iceGatherer,T.transceivers[D].iceTransport=T.transceivers[0].iceTransport,T.transceivers[D].dtlsTransport=T.transceivers[0].dtlsTransport,T.transceivers[D].rtpSender&&T.transceivers[D].rtpSender.setTransport(T.transceivers[0].dtlsTransport),T.transceivers[D].rtpReceiver&&T.transceivers[D].rtpReceiver.setTransport(T.transceivers[0].dtlsTransport)),"offer"!==S.type||U)"answer"!==S.type||U||(F=(M=T.transceivers[D]).iceGatherer,z=M.iceTransport,w=M.dtlsTransport,k=M.rtpReceiver,W=M.sendEncodingParameters,ie=M.localCapabilities,T.transceivers[D].recvEncodingParameters=Z,T.transceivers[D].remoteCapabilities=se,T.transceivers[D].rtcpParameters=me,Re.length&&"new"===z.state&&(!I&&!ve||A&&0!==D?Re.forEach(function(de){c(M.iceTransport,de)}):z.setRemoteCandidates(Re)),(!A||0===D)&&("new"===z.state&&z.start(F,pe,"controlling"),"new"===w.state&&w.start(ue)),!s(M.localCapabilities,M.remoteCapabilities).codecs.filter(function(de){return"rtx"===de.name.toLowerCase()}).length&&M.sendEncodingParameters[0].rtx&&delete M.sendEncodingParameters[0].rtx,T._transceive(M,"sendrecv"===V||"recvonly"===V,"sendrecv"===V||"sendonly"===V),!k||"sendrecv"!==V&&"sendonly"!==V?delete M.rtpReceiver:(_=k.track,H?(b[H.stream]||(b[H.stream]=new d.MediaStream),h(_,b[H.stream]),O.push([_,k,b[H.stream]])):(b.default||(b.default=new d.MediaStream),h(_,b.default),O.push([_,k,b.default]))));else{(M=T.transceivers[D]||T._createTransceiver(N)).mid=j,M.iceGatherer||(M.iceGatherer=T._createIceGatherer(D,A)),Re.length&&"new"===M.iceTransport.state&&(!ve||A&&0!==D?Re.forEach(function(de){c(M.iceTransport,de)}):M.iceTransport.setRemoteCandidates(Re)),ie=d.RTCRtpReceiver.getCapabilities(N),f<15019&&(ie.codecs=ie.codecs.filter(function(de){return"rtx"!==de.name})),W=M.sendEncodingParameters||[{ssrc:1001*(2*D+2)}];var Q,Me=!1;"sendrecv"===V||"sendonly"===V?(Me=!M.rtpReceiver,k=M.rtpReceiver||new d.RTCRtpReceiver(M.dtlsTransport,N),Me&&(_=k.track,H&&"-"===H.stream||(H?(b[H.stream]||(b[H.stream]=new d.MediaStream,Object.defineProperty(b[H.stream],"id",{get:function(){return H.stream}})),Object.defineProperty(_,"id",{get:function(){return H.track}}),Q=b[H.stream]):(b.default||(b.default=new d.MediaStream),Q=b.default)),Q&&(h(_,Q),M.associatedRemoteMediaStreams.push(Q)),O.push([_,k,Q]))):M.rtpReceiver&&M.rtpReceiver.track&&(M.associatedRemoteMediaStreams.forEach(function(de){var Oe=de.getTracks().find(function(xe){return xe.id===M.rtpReceiver.track.id});Oe&&function g(S,T){T.removeTrack(S),T.dispatchEvent(new d.MediaStreamTrackEvent("removetrack",{track:S}))}(Oe,de)}),M.associatedRemoteMediaStreams=[]),M.localCapabilities=ie,M.remoteCapabilities=se,M.rtpReceiver=k,M.rtcpParameters=me,M.sendEncodingParameters=W,M.recvEncodingParameters=Z,T._transceive(T.transceivers[D],!1,Me)}}}),void 0===T._dtlsRole&&(T._dtlsRole="offer"===S.type?"active":"passive"),T._remoteDescription={type:S.type,sdp:S.sdp},T._updateSignalingState("offer"===S.type?"have-remote-offer":"stable"),Object.keys(b).forEach(function(x){var D=b[x];if(D.getTracks().length){if(-1===T.remoteStreams.indexOf(D)){T.remoteStreams.push(D);var L=new Event("addstream");L.stream=D,d.setTimeout(function(){T._dispatchEvent("addstream",L)})}O.forEach(function(N){D.id===N[2].id&&v(T,N[0],N[1],[D])})}}),O.forEach(function(x){x[2]||v(T,x[0],x[1],[])}),d.setTimeout(function(){!T||!T.transceivers||T.transceivers.forEach(function(x){x.iceTransport&&"new"===x.iceTransport.state&&x.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),x.iceTransport.addRemoteCandidate({}))})},4e3),t.resolve()},m.prototype.close=function(){this.transceivers.forEach(function(S){S.iceTransport&&S.iceTransport.stop(),S.dtlsTransport&&S.dtlsTransport.stop(),S.rtpSender&&S.rtpSender.stop(),S.rtpReceiver&&S.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},m.prototype._updateSignalingState=function(S){this.signalingState=S;var T=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",T)},m.prototype._maybeFireNegotiationNeeded=function(){var S=this;"stable"!==this.signalingState||!0===this.needNegotiation||(this.needNegotiation=!0,d.setTimeout(function(){if(S.needNegotiation){S.needNegotiation=!1;var T=new Event("negotiationneeded");S._dispatchEvent("negotiationneeded",T)}},0))},m.prototype._updateIceConnectionState=function(){var S,T={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};
1if(this.transceivers.forEach(function(O){O.iceTransport&&!O.rejected&&T[O.iceTransport.state]++}),S="new",T.failed>0?S="failed":T.checking>0?S="checking":T.disconnected>0?S="disconnected":T.new>0?S="new":T.connected>0?S="connected":T.completed>0&&(S="completed"),S!==this.iceConnectionState){this.iceConnectionState=S;var b=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",b)}},m.prototype._updateConnectionState=function(){var S,T={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(O){O.iceTransport&&O.dtlsTransport&&!O.rejected&&(T[O.iceTransport.state]++,T[O.dtlsTransport.state]++)}),T.connected+=T.completed,S="new",T.failed>0?S="failed":T.connecting>0?S="connecting":T.disconnected>0?S="disconnected":T.new>0?S="new":T.connected>0&&(S="connected"),S!==this.connectionState){this.connectionState=S;var b=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",b)}},m.prototype.createOffer=function(){var S=this;if(S._isClosed)return t.reject(u("InvalidStateError","Can not call createOffer after close"));var T=S.transceivers.filter(function(I){return"audio"===I.kind}).length,b=S.transceivers.filter(function(I){return"video"===I.kind}).length,O=arguments[0];if(O){if(O.mandatory||O.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==O.offerToReceiveAudio&&(T=!0===O.offerToReceiveAudio?1:!1===O.offerToReceiveAudio?0:O.offerToReceiveAudio),void 0!==O.offerToReceiveVideo&&(b=!0===O.offerToReceiveVideo?1:!1===O.offerToReceiveVideo?0:O.offerToReceiveVideo)}for(S.transceivers.forEach(function(I){"audio"===I.kind?--T<0&&(I.wantReceive=!1):"video"===I.kind&&--b<0&&(I.wantReceive=!1)});T>0||b>0;)T>0&&(S._createTransceiver("audio"),T--),b>0&&(S._createTransceiver("video"),b--);var C=r.writeSessionBoilerplate(S._sdpSessionId,S._sdpSessionVersion++);S.transceivers.forEach(function(I,A){var P=I.track,x=I.kind,D=I.mid||r.generateIdentifier();I.mid=D,I.iceGatherer||(I.iceGatherer=S._createIceGatherer(A,S.usingBundle));var L=d.RTCRtpSender.getCapabilities(x);f<15019&&(L.codecs=L.codecs.filter(function(U){return"rtx"!==U.name})),L.codecs.forEach(function(U){"H264"===U.name&&void 0===U.parameters["level-asymmetry-allowed"]&&(U.parameters["level-asymmetry-allowed"]="1"),I.remoteCapabilities&&I.remoteCapabilities.codecs&&I.remoteCapabilities.codecs.forEach(function(B){U.name.toLowerCase()===B.name.toLowerCase()&&U.clockRate===B.clockRate&&(U.preferredPayloadType=B.payloadType)})}
1),L.headerExtensions.forEach(function(U){(I.remoteCapabilities&&I.remoteCapabilities.headerExtensions||[]).forEach(function(V){U.uri===V.uri&&(U.id=V.id)})});var N=I.sendEncodingParameters||[{ssrc:1001*(2*A+1)}];P&&f>=15019&&"video"===x&&!N[0].rtx&&(N[0].rtx={ssrc:N[0].ssrc+1}),I.wantReceive&&(I.rtpReceiver=new d.RTCRtpReceiver(I.dtlsTransport,x)),I.localCapabilities=L,I.sendEncodingParameters=N}),"max-compat"!==S._config.bundlePolicy&&(C+="a=group:BUNDLE "+S.transceivers.map(function(I){return I.mid}).join(" ")+"\r\n"),C+="a=ice-options:trickle\r\n",S.transceivers.forEach(function(I,A){C+=i(I,I.localCapabilities,"offer",I.stream,S._dtlsRole),C+="a=rtcp-rsize\r\n",I.iceGatherer&&"new"!==S.iceGatheringState&&(0===A||!S.usingBundle)&&(I.iceGatherer.getLocalCandidates().forEach(function(P){P.component=1,C+="a="+r.writeCandidate(P)+"\r\n"}),"completed"===I.iceGatherer.state&&(C+="a=end-of-candidates\r\n"))});var R=new d.RTCSessionDescription({type:"offer",sdp:C});return t.resolve(R)},m.prototype.createAnswer=function(){var S=this;if(S._isClosed)return t.reject(u("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==S.signalingState&&"have-local-pranswer"!==S.signalingState)return t.reject(u("InvalidStateError","Can not call createAnswer in signalingState "+S.signalingState));var T=r.writeSessionBoilerplate(S._sdpSessionId,S._sdpSessionVersion++);S.usingBundle&&(T+="a=group:BUNDLE "+S.transceivers.map(function(C){return C.mid}).join(" ")+"\r\n"),T+="a=ice-options:trickle\r\n";var b=r.getMediaSections(S._remoteDescription.sdp).length;S.transceivers.forEach(function(C,R){if(!(R+1>b)){if(C.rejected)return"application"===C.kind?T+="DTLS/SCTP"===C.protocol?"m=application 0 DTLS/SCTP 5000\r\n":"m=application 0 "+C.protocol+" webrtc-datachannel\r\n":"audio"===C.kind?T+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===C.kind&&(T+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(T+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+C.mid+"\r\n");var I;C.stream&&("audio"===C.kind?I=C.stream.getAudioTracks()[0]:"video"===C.kind&&(I=C.stream.getVideoTracks()[0]),I&&f>=15019&&"video"===C.kind&&!C.sendEncodingParameters[0].rtx&&(C.sendEncodingParameters[0].rtx={ssrc:C.sendEncodingParameters[0].ssrc+1}));var A=s(C.localCapabilities,C.remoteCapabilities);!A.codecs.filter(function(x){return"rtx"===x.name.toLowerCase()}).length&&C.sendEncodingParameters[0].rtx&&delete C.sendEncodingParameters[0].rtx,T+=i(C,A,"answer",C.stream,S._dtlsRole),C.rtcpParameters&&C.rtcpParameters.reducedSize&&(T+="a=rtcp-rsize\r\n")}});var O=new d.RTCSessionDescription({type:"answer",sdp:T});return t.resolve(O)},m.prototype.addIceCandidate=function(S){var b,T=this;return S&&void 0===S.sdpMLineIndex&&!S.sdpMid?t.reject(new TypeError("sdpMLineIndex or sdpMid required")):new t(function(O,C){if(!T._remoteDescription)return C(u("InvalidStateError","Can not add ICE candidate without a remote description"));if(S&&""!==S.candidate){var I=S.sdpMLineIndex;if(S.sdpMid)for(var A=0;A<T.transceivers.length;A++)if(T.transceivers[A].mid===S.sdpMid){I=A;break}var P=T.transceivers[I];if(!P)return C(u("OperationError","Can not add ICE candidate"));if(P.rejected)return O();var x=Object.keys(S.candidate).length>0?r.parseCandidate(S.candidate):{};if("tcp"===x.protocol&&(0===x.port||9===x.port)||x.component&&1!==x.component)return O();if((0===I||I>
10&&P.iceTransport!==T.transceivers[0].iceTransport)&&!c(P.iceTransport,x))return C(u("OperationError","Can not add ICE candidate"));var D=S.candidate.trim();0===D.indexOf("a=")&&(D=D.substr(2)),(b=r.getMediaSections(T._remoteDescription.sdp))[I]+="a="+(x.type?D:"end-of-candidates")+"\r\n",T._remoteDescription.sdp=r.getDescription(T._remoteDescription.sdp)+b.join("")}else for(var R=0;R<T.transceivers.length&&(T.transceivers[R].rejected||(T.transceivers[R].iceTransport.addRemoteCandidate({}),(b=r.getMediaSections(T._remoteDescription.sdp))[R]+="a=end-of-candidates\r\n",T._remoteDescription.sdp=r.getDescription(T._remoteDescription.sdp)+b.join(""),!T.usingBundle));R++);O()})},m.prototype.getStats=function(S){if(S&&S instanceof d.MediaStreamTrack){var T=null;if(this.transceivers.forEach(function(O){O.rtpSender&&O.rtpSender.track===S?T=O.rtpSender:O.rtpReceiver&&O.rtpReceiver.track===S&&(T=O.rtpReceiver)}),!T)throw u("InvalidAccessError","Invalid selector.");return T.getStats()}var b=[];return this.transceivers.forEach(function(O){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(C){O[C]&&b.push(O[C].getStats())})}),t.all(b).then(function(O){var C=new Map;return O.forEach(function(R){R.forEach(function(I){C.set(I.id,I)})}),C})},["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"].forEach(function(S){var T=d[S];if(T&&T.prototype&&T.prototype.getStats){var b=T.prototype.getStats;T.prototype.getStats=function(){return b.apply(this).then(function(O){var C=new Map;return Object.keys(O).forEach(function(R){O[R].type=function n(d){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[d.type]||d.type}(O[R]),C.set(R,O[R])}),C})}}});var y=["createOffer","createAnswer"];return y.forEach(function(S){var T=m.prototype[S];m.prototype[S]=function(){var b=arguments;return"function"==typeof b[0]||"function"==typeof b[1]?T.apply(this,[arguments[2]]).then(function(O){"function"==typeof b[0]&&b[0].apply(null,[O])},function(O){"function"==typeof b[1]&&b[1].apply(null,[O])}):T.apply(this,arguments)}}),(y=["setLocalDescription","setRemoteDescription","addIceCandidate"]).forEach(function(S){var T=m.prototype[S];m.prototype[S]=function(){var b=arguments;return"function"==typeof b[1]||"function"==typeof b[2]?T.apply(this,arguments).then(function(){"function"==typeof b[1]&&b[1].apply(null)},function(O){"function"==typeof b[2]&&b[2].apply(null,[O])}):T.apply(this,arguments)}}),["getStats"].forEach(function(S){var T=m.prototype[S];m.prototype[S]=function(){var b=arguments;return"function"==typeof b[1]?T.apply(this,arguments).then(function(){"function"==typeof b[1]&&b[1].apply(null)}):T.apply(this,arguments)}}),m}}).call(this,e(0))},function(l,E,e){"use strict";(function(t){l.exports=function(r){var n=r&&r.navigator,o=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(s){return o(s).catch(function(a){return t.reject(function(s){return{name:{PermissionDeniedError:"NotAllowedError"}[s.name]||s.name,message:s.message,constraint:s.constraint,toString:function(){return this.name}}}(a))})}}}).call(this,e(0))},function(l,E,e){"use strict";(function(t){var r=e(28);l.exports={shimGetUserMedia:e(555),shimOnTrack:function(n){"object"==typeof n&&n.RTCPeerConnection&&!("ontrack"in n.RTCPeerConnection.prototype)&&Object.defineProperty(n.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(i){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=i),this.addEventListener("addstream",this._ontrackpoly=function(o){o.stream.getTracks().forEach(function(s){var a=new Event("track");a.track=s,a.receiver={track:s},a.transceiver={receiver:a.receiver},a.streams=[o.stream],this.dispatchEvent(a)}.bind(this))}.bind(this))},enumerable:!0,configurable:!0}),"object"==typeof n&&n.RTCTrackEvent&&"receiver"in n.RTCTrackEvent.prototype&&!("transceiver"in n.RTCTrackEvent.prototype)&&Object.defineProperty(n.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimSourceObject:function(n){"object"==typeof n&&n.HTMLMediaElement&&!("srcObject"in n.HTMLMediaElement.prototype)&&Object.defineProperty(n.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(i){this.mozSrcObject=i}})},shimPeerConnection:function(n){var i=r.detectBrowser(n);if("object"==typeof n&&(n.RTCPeerConnection||n.mozRTCPeerConnection)){n.RTCPeerConnection||(n.RTCPeerConnection=function(u,d){if(i.version<38&&u&&u.iceServers){for(var f=[],h=0;h<u.iceServers.length;h++){var g=u.iceServers[h];if(g.hasOwnProperty("urls"))for(var v=0;v<g.urls.length;v++){var m={url:g.urls[v]};0===g.urls[v].indexOf("turn")&&(m.username=g.username,m.credential=g.credential),f.push(m)}else f.push(u.iceServers[h])}u.iceServers=f}return new n.mozRTCPeerConnection(u,d)},n.RTCPeerConnection.prototype=n.mozRTCPeerConnection.prototype,n.mozRTCPeerConnection.generateCertificate&&Object.defineProperty(n.RTCPeerConnection,"generateCertificate",{get:function(){return n.mozRTCPeerConnection.generateCertificate}}),n.RTCSessionDescription=n.mozRTCSessionDescription,n.RTCIceCandidate=n.mozRTCIceCandidate),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(u){var d=n.RTCPeerConnection.prototype[u];n.RTCPeerConnection.prototype[u]=function(){return arguments[0]=new("addIceCandidate"===u?n.RTCIceCandidate:n.RTCSessionDescription)(arguments[0]),d.apply(this,arguments)}});var o=n.RTCPeerConnection.prototype.addIceCandidate;n.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?o.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),t.resolve())};var a={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotec
1andidate:"remote-candidate"},c=n.RTCPeerConnection.prototype.getStats;n.RTCPeerConnection.prototype.getStats=function(u,d,f){return c.apply(this,[u||null]).then(function(h){if(i.version<48&&(h=function(u){var d=new Map;return Object.keys(u).forEach(function(f){d.set(f,u[f]),d[f]=u[f]}),d}(h)),i.version<53&&!d)try{h.forEach(function(g){g.type=a[g.type]||g.type})}catch(g){if("TypeError"!==g.name)throw g;h.forEach(function(v,m){h.set(m,Object.assign({},v,{type:a[v.type]||v.type}))})}return h}).then(d,f)}}},shimSenderGetStats:function(n){if("object"==typeof n&&n.RTCPeerConnection&&n.RTCRtpSender&&(!n.RTCRtpSender||!("getStats"in n.RTCRtpSender.prototype))){var i=n.RTCPeerConnection.prototype.getSenders;i&&(n.RTCPeerConnection.prototype.getSenders=function(){var s=this,a=i.apply(s,[]);return a.forEach(function(c){c._pc=s}),a});var o=n.RTCPeerConnection.prototype.addTrack;o&&(n.RTCPeerConnection.prototype.addTrack=function(){var s=o.apply(this,arguments);return s._pc=this,s}),n.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):t.resolve(new Map)}}},shimReceiverGetStats:function(n){if("object"==typeof n&&n.RTCPeerConnection&&n.RTCRtpSender&&(!n.RTCRtpSender||!("getStats"in n.RTCRtpReceiver.prototype))){var i=n.RTCPeerConnection.prototype.getReceivers;i&&(n.RTCPeerConnection.prototype.getReceivers=function(){var o=this,s=i.apply(o,[]);return s.forEach(function(a){a._pc=o}),s}),r.wrapPeerConnectionEvent(n,"track",function(o){return o.receiver._pc=o.srcElement,o}),n.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}},shimRemoveStream:function(n){!n.RTCPeerConnection||"removeStream"in n.RTCPeerConnection.prototype||(n.RTCPeerConnection.prototype.removeStream=function(i){var o=this;r.deprecated("removeStream","removeTrack"),this.getSenders().forEach(function(s){s.track&&-1!==i.getTracks().indexOf(s.track)&&o.removeTrack(s)})})},shimRTCDataChannel:function(n){n.DataChannel&&!n.RTCDataChannel&&(n.RTCDataChannel=n.DataChannel)},shimGetDisplayMedia:function(n,i){!n.navigator||!n.navigator.mediaDevices||"getDisplayMedia"in n.navigator.mediaDevices||(n.navigator.mediaDevices.getDisplayMedia=function(o){if(!o||!o.video){var s=new DOMException("getDisplayMedia without video constraints is undefined");return s.name="NotFoundError",s.code=8,t.reject(s)}return!0===o.video?o.video={mediaSource:i}:o.video.mediaSource=i,n.navigator.mediaDevices.getUserMedia(o)},n.navigator.getDisplayMedia=function(o){return r.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia"),n.navigator.mediaDevices.getDisplayMedia(o)})}}}).call(this,e(0))},function(l,E,e){"use strict";(function(t){var r=e(28),n=r.log;l.exports=function(i){var o=r.detectBrowser(i),s=i&&i.navigator,a=i&&i.MediaStreamTrack,c=function(y){return{name:{InternalError:"NotReadableError",NotSupportedError:"TypeError",PermissionDeniedError:"NotAllowedError",SecurityError:"NotAllowedError"}[y.name]||y.name,message:{"The operation is insecure.":"The request is not allowed by the user agent or the platform in the current context."}[y.message]||y.message,constraint:y.constraint,toString:function(){return this.name+(this.message&&": ")+this.message}}},u=function(y,S,T){var b=function(O){if("object"!=typeof O||O.require)return O;var C=[];return Object.keys(O).forEach(function(R){if("require"!==R&&"advanced"!==R&&"mediaSource"!==R){var I=O[R]="object"==typeof O[R]?O[R]:{ideal:O[R]};if((void 0!==I.min||void 0!==I.max||void 0!==I.exact)&&C.push(R),void 0!==I.exact&&("number"==typeof I.exact?I.min=I.max=I.exact:O[R]=I.exact,delete I.exact),void 0!==I.ideal){O.advanced=O.advanced||[];var A={};A[R]="number"==typeof I.ideal?{min:I.ideal,max:I.ideal}:I.ideal,O.advanced.push(A),delete I.ideal,Object.keys(I).length||delete O[R]}}}),C.length&&(O.require=C),O};return y=JSON.parse(JSON.stringify(y)),o.version<38&&(n("spec: "+JSON.stringify(y)),y.audio&&(y.audio=b(y.audio)),y.video&&(y.video=b(y.video)),n("ff37: "+JSON.stringify(y))),s.mozGetUserMedia(y,S,function(O){T(c(O))})};if(s.mediaDevices||(s.mediaDevices={getUserMedia:function(y){return new t(function(S,T){u(y,S,T)})},addEventListener:function(){},removeEventListener:function(){}}),s.mediaDevices.enumerateDevices=s.mediaDevices.enumerateDevices||function(){return new t(function(y){y([{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}])})},o.version<41){var f=s.mediaDevices.enumerateDevices.bind(s.mediaDevices);s.mediaDevices.enumerateDevices=function(){return f().then(void 0,function(y){if("NotFoundError"===y.name)return[];throw y})}}if(o.version<49){var h=s.mediaDevices.getUserMedia.bind(s.mediaDevices);s.mediaDevices.getUserMedia=function(y){return h(y).then(function(S){if(y.audio&&!S.getAudioTracks().length||y.video&&!S.getVideoTracks().length)throw S.getTracks().forEac
1h(function(T){T.stop()}),new DOMException("The object can not be found here.","NotFoundError");return S},function(S){return t.reject(c(S))})}}if(!(o.version>55&&"autoGainControl"in s.mediaDevices.getSupportedConstraints())){var g=function(y,S,T){S in y&&!(T in y)&&(y[T]=y[S],delete y[S])},v=s.mediaDevices.getUserMedia.bind(s.mediaDevices);if(s.mediaDevices.getUserMedia=function(y){return"object"==typeof y&&"object"==typeof y.audio&&(y=JSON.parse(JSON.stringify(y)),g(y.audio,"autoGainControl","mozAutoGainControl"),g(y.audio,"noiseSuppression","mozNoiseSuppression")),v(y)},a&&a.prototype.getSettings){var m=a.prototype.getSettings;a.prototype.getSettings=function(){var y=m.apply(this,arguments);return g(y,"mozAutoGainControl","autoGainControl"),g(y,"mozNoiseSuppression","noiseSuppression"),y}}if(a&&a.prototype.applyConstraints){var p=a.prototype.applyConstraints;a.prototype.applyConstraints=function(y){return"audio"===this.kind&&"object"==typeof y&&(y=JSON.parse(JSON.stringify(y)),g(y,"autoGainControl","mozAutoGainControl"),g(y,"noiseSuppression","mozNoiseSuppression")),p.apply(this,[y])}}}s.getUserMedia=function(y,S,T){if(o.version<44)return u(y,S,T);r.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),s.mediaDevices.getUserMedia(y).then(S,T)}}}).call(this,e(0))},function(l,E,e){"use strict";(function(t){var r=e(28);l.exports={shimLocalStreamsAPI:function(n){if("object"==typeof n&&n.RTCPeerConnection){if("getLocalStreams"in n.RTCPeerConnection.prototype||(n.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),"getStreamById"in n.RTCPeerConnection.prototype||(n.RTCPeerConnection.prototype.getStreamById=function(o){var s=null;return this._localStreams&&this._localStreams.forEach(function(a){a.id===o&&(s=a)}),this._remoteStreams&&this._remoteStreams.forEach(function(a){a.id===o&&(s=a)}),s}),!("addStream"in n.RTCPeerConnection.prototype)){var i=n.RTCPeerConnection.prototype.addTrack;n.RTCPeerConnection.prototype.addStream=function(o){this._localStreams||(this._localStreams=[]),-1===this._localStreams.indexOf(o)&&this._localStreams.push(o);var s=this;o.getTracks().forEach(function(a){i.call(s,a,o)})},n.RTCPeerConnection.prototype.addTrack=function(o,s){return s&&(this._localStreams?-1===this._localStreams.indexOf(s)&&this._localStreams.push(s):this._localStreams=[s]),i.call(this,o,s)}}"removeStream"in n.RTCPeerConnection.prototype||(n.RTCPeerConnection.prototype.removeStream=function(o){this._localStreams||(this._localStreams=[]);var s=this._localStreams.indexOf(o);if(-1!==s){this._localStreams.splice(s,1);var a=this,c=o.getTracks();this.getSenders().forEach(function(u){-1!==c.indexOf(u.track)&&a.removeTrack(u)})}})}},shimRemoteStreamsAPI:function(n){if("object"==typeof n&&n.RTCPeerConnection&&("getRemoteStreams"in n.RTCPeerConnection.prototype||(n.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in n.RTCPeerConnection.prototype))){Object.defineProperty(n.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(o){this._onaddstream&&this.removeEventListener("addstream",this._onaddstream),this.addEventListener("addstream",this._onaddstream=o)}});var i=n.RTCPeerConnection.prototype.setRemoteDescription;n.RTCPeerConnection.prototype.setRemoteDescription=function(){var o=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(s){s.streams.forEach(function(a){if(o._remoteStreams||(o._remoteStreams=[]),!(o._remoteStreams.indexOf(a)>=0)){o._remoteStreams.push(a);var c=new Event("addstream");c.stream=a,o.dispatchEvent(c)}})}),i.apply(o,arguments)}}},shimCallbacksAPI:function(n){if("object"==typeof n&&n.RTCPeerConnection){var i=n.RTCPeerConnection.prototype,o=i.createOffer,s=i.createAnswer,a=i.setLocalDescription,c=i.setRemoteDescription,u=i.addIceCandidate;i.createOffer=function(f,h){var g=arguments.length>=2?arguments[2]:arguments[0],v=o.apply(this,[g]);return h?(v.then(f,h),t.resolve()):v},i.createAnswer=function(f,h){var g=arguments.length>=2?arguments[2]:arguments[0],v=s.apply(this,[g]);return h?(v.then(f,h),t.resolve()):v};var d=function(f,h,g){var v=a.apply(this,[f]);return g?(v.then(h,g),t.resolve()):v};i.setLocalDescription=d,i.setRemoteDescription=d=function(f,h,g){var v=c.apply(this,[f]);return g?(v.then(h,g),t.resolve()):v},i.addIceCandidate=d=function(f,h,g){var v=u.apply(this,[f]);return g?(v.then(h,g),t.resolve()):v}}},shimGetUserMedia:function(n){var i=n&&n.navigator;i.getUserMedia||(i.webkitGetUserMedia?i.getUserMedia=i.webkitGetUserMedia.bind(i):i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=function(o,s,a){i.mediaDevices.getUserMedia(o).then(s,a)}.bind(i)))},shimRTCIceServerUrls:function(n){var i=n.RTCPeerConnection;n.RTCPeerConnection=function(o,s){if(o&&o.iceServers){for(var a=[],c=0;c<o.iceServers.length;c++){var u=o.iceServers[c];!u.hasOwnProperty("urls")&&u.hasOwnProperty("url")?(r.deprecated("RTCIceServer.url","RTCIceServer.urls"),(u=JSON.parse(JSON.stringify(u))).urls=u.url,delete u.url,a.push(u)):a.push(o.iceServers[c])}o.iceServers=a}return new i(o,s)},n.RTCPeerConnection.prototype=i.prototype,"generateCertificate"in n.RTCPeerConnection&&Object.defineProperty(n.RTCPeerConnection,"generateCertificate",{get:function(){return i.generateCertificate}})},shimTrackEventTransceiver:function(n){"object"==typeof n&&n.RTCPeerConnection&&"receiver"in n.RTCTrackEvent.prototype&&!n.RTCTransceiver&&Object.defineProperty(n.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimCreateOfferLegacy:function(n){var i=n.RTCPeerConnection.prototype.createOffer;n.RTCPeerConnection.prototype.createOffer=function(o){var s=this;if(o){void 0!==o.offerToReceiveAudio&&(o.offerToReceiveAudio=!!o.offerToReceiveAudio);var a=s.getTransceivers().find(function(u){return u.sender.track&&"audio"===u.sender.track.kind});!1===o.offerToReceiveAudio&&a?"sendrecv"===a.direction?a.setDirection?a.setDirection("sendonly"):a.direction="sendonly":"recvonly"===a.direction&&(a.setDirection?a.setDirection("inactive"):a.direction="inactive"):!0===o.offerToReceiveAudio&&!a&&s.addTransceiver("audio"),void 0!==o.offerToReceiveVideo&&(o.offerToReceiveVideo=!!o.offerToReceiveVideo);var c=s.getTransceivers().find(function(u){return u.sender.track&&"video"===u.sender.track.kind});!1===o.offerToReceiveVideo&&c?"sendrecv"===c.direction?c.setDirection("sendonly"):"recvonly"===c.direction&&c.setDirection("inactive"):!0===o.offerToReceiveVideo&&!c&&s.addTransceiver("video")}return i.apply(s,arguments)}}}}).call(this,e(0))},function(l,E,e){"use strict";var t=e(251),r=e(28);l.exports={shimRTCIceCandidate:function(n){if(!(!n.RTCIceCandidate||n.RTCIceCandidate&&"foundation"in n.RTCIceCandidate.prototype)){var i=n.RTCIceCandidate;
1n.RTCIceCandidate=function(o){if("object"==typeof o&&o.candidate&&0===o.candidate.indexOf("a=")&&((o=JSON.parse(JSON.stringify(o))).candidate=o.candidate.substr(2)),o.candidate&&o.candidate.length){var s=new i(o),a=t.parseCandidate(o.candidate),c=Object.assign(s,a);return c.toJSON=function(){return{candidate:c.candidate,sdpMid:c.sdpMid,sdpMLineIndex:c.sdpMLineIndex,usernameFragment:c.usernameFragment}},c}return new i(o)},n.RTCIceCandidate.prototype=i.prototype,r.wrapPeerConnectionEvent(n,"icecandidate",function(o){return o.candidate&&Object.defineProperty(o,"candidate",{value:new n.RTCIceCandidate(o.candidate),writable:"false"}),o})}},shimCreateObjectURL:function(n){var i=n&&n.URL;if("object"==typeof n&&n.HTMLMediaElement&&"srcObject"in n.HTMLMediaElement.prototype&&i.createObjectURL&&i.revokeObjectURL){var o=i.createObjectURL.bind(i),s=i.revokeObjectURL.bind(i),a=new Map,c=0;i.createObjectURL=function(f){if("getTracks"in f){var h="polyblob:"+ ++c;return a.set(h,f),r.deprecated("URL.createObjectURL(stream)","elem.srcObject = stream"),h}return o(f)},i.revokeObjectURL=function(f){s(f),a.delete(f)};var u=Object.getOwnPropertyDescriptor(n.HTMLMediaElement.prototype,"src");Object.defineProperty(n.HTMLMediaElement.prototype,"src",{get:function(){return u.get.apply(this)},set:function(f){return this.srcObject=a.get(f)||null,u.set.apply(this,[f])}});var d=n.HTMLMediaElement.prototype.setAttribute;n.HTMLMediaElement.prototype.setAttribute=function(){return 2===arguments.length&&"src"===(""+arguments[0]).toLowerCase()&&(this.srcObject=a.get(arguments[1])||null),d.apply(this,arguments)}}},shimMaxMessageSize:function(n){if(!n.RTCSctpTransport&&n.RTCPeerConnection){var i=r.detectBrowser(n);"sctp"in n.RTCPeerConnection.prototype||Object.defineProperty(n.RTCPeerConnection.prototype,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp}});var o=function(d){var f=t.splitSections(d.sdp);return f.shift(),f.some(function(h){var g=t.parseMLine(h);return g&&"application"===g.kind&&-1!==g.protocol.indexOf("SCTP")})},s=function(d){var f=d.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===f||f.length<2)return-1;var h=parseInt(f[1],10);return h!=h?-1:h},a=function(d){var f=65536;return"firefox"===i.browser&&(f=i.version<57?-1===d?16384:2147483637:i.version<60?57===i.version?65535:65536:2147483637),f},c=function(d,f){var h=65536;"firefox"===i.browser&&57===i.version&&(h=65535);var g=t.matchPrefix(d.sdp,"a=max-message-size:");return g.length>0?h=parseInt(g[0].substr(19),10):"firefox"===i.browser&&-1!==f&&(h=2147483637),h},u=n.RTCPeerConnection.prototype.setRemoteDescription;n.RTCPeerConnection.prototype.setRemoteDescription=function(){var d=this;if(d._sctp=null,o(arguments[0])){var v,f=s(arguments[0]),h=a(f),g=c(arguments[0],f);v=0===h&&0===g?Number.POSITIVE_INFINITY:0===h||0===g?Math.max(h,g):Math.min(h,g);var m={};Object.defineProperty(m,"maxMessageSize",{get:function(){return v}}),d._sctp=m}return u.apply(d,arguments)}}},shimSendThrowTypeError:function(n){if(n.RTCPeerConnection&&"createDataChannel"in n.RTCPeerConnection.prototype){var o=n.RTCPeerConnection.prototype.createDataChannel;n.RTCPeerConnection.prototype.createDataChannel=function(){var s=this,a=o.apply(s,arguments);return i(a,s),a},r.wrapPeerConnectionEvent(n,"datachannel",function(s){return i(s.channel,s.target),s})}function i(s,a){var c=s.send;s.send=function(){var u=arguments[0],d=u.length||u.size||u.byteLength;if("open"===s.readyState&&a.sctp&&d>a.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+a.sctp.maxMessageSize+" bytes)");return c.apply(s,arguments)}}}}},function(l,E,e){"use strict";(function(t){const r=e(6);function n(){return"undefined"==typeof document||"complete"===document.readyState||"interactive"===document.readyState&&document.body}let i=!1;const o={isDomLoaded:n,isDomUnloaded:()=>i,whenUnloaded:new t(s=>{"undefined"!=typeof window&&window.addEventListener("unload",()=>{i=!0,o.emit("unload"),s()})}),whenLoaded:new t(s=>{if(n())return void s();const a=()=>{document.removeEventListener("DOMContentLoaded",a),document.removeEventListener("load",a),o.emit("load"),s()};document.addEventListener("DOMContentLoaded",a),document.addEventListener("load",a)})};r(o),l.exports=o}).call(this,e(0))},function(l,E,e){var t=e(78),r=e(255),n=e(238),i=e(560),o=e(9),s=e(52),a=e(256);l.exports=function c(u,d,f,h,g){u!==d&&n(d,function(v,m){if(g||(g=new t),o(v))i(u,d,m,f,c,h,g);
1else{var p=h?h(a(u,m),v,m+"",u,d,g):void 0;void 0===p&&(p=v),r(u,m,p)}},s)}},function(l,E,e){var t=e(255),r=e(179),n=e(188),i=e(53),o=e(189),s=e(64),a=e(10),c=e(129),u=e(65),d=e(15),f=e(9),h=e(135),g=e(85),v=e(256),m=e(561);l.exports=function p(y,S,T,b,O,C,R){var I=v(y,T),A=v(S,T),P=R.get(A);if(P)t(y,T,P);else{var x=C?C(I,A,T+"",y,S,R):void 0,D=void 0===x;if(D){var L=a(A),N=!L&&u(A),U=!L&&!N&&g(A);x=A,L||N||U?a(I)?x=I:c(I)?x=i(I):N?(D=!1,x=r(A,!0)):U?(D=!1,x=n(A,!0)):x=[]:h(A)||s(A)?(x=I,s(I)?x=m(I):(!f(I)||d(I))&&(x=o(A))):D=!1}D&&(R.set(A,x),O(x,A,b,C,R),R.delete(A)),t(y,T,x)}}},function(l,E,e){var t=e(39),r=e(52);l.exports=function n(i){return t(i,r(i))}},function(l,E,e){"use strict";const t=e(148),r=e(257),n=e(258),i=e(263),o=e(1)("normalizeConstraintInput"),s={"320x240":{width:320,height:240},"320x180":{width:320,height:180},"640x480":{width:640,height:480},"640x360":{width:640,height:360},"1280x720":{width:1280,height:720},"1280x960":{width:1280,height:960},"1920x1080":{width:1920,height:1080}},a=[1,7,15,30];function c(v){return v._inject&&v._inject.logging||o}function u(v,m,p,y,S){if(void 0===m)return;const T=p(m);return T||S.warn(`Invalid ${v} passed to the Publisher. Got: ${m}, expecting one of ${y}`),T}function d(v,m){const p=c(m),y=(()=>{const T=m[`publish${n(v)}`];return void 0===T||Boolean(T)})();let S=(()=>{const T=m[`${v}Source`];return void 0===T||null!==T&&!1!==T&&("object"==typeof T?!m[`isCustom${n(v)}Track`]&&("string"!=typeof T.deviceId?(p.warn(`Invalid ${v}Source passed to Publisher. Expected either a device ID or device.`),!0):T.deviceId):"string"!=typeof T?(p.warn(`Ignoring invalid ${v}Source parameter`),!0):T)})();return"audio"===v&&m.isScreenSharing&&!i&&!1!==S&&(m.audioSource&&c(m).warn("Invalid audioSource passed to Publisher - when using screen sharing no audioSource may be used"),S=!1),{source:S,publish:y}}function f(v,m){return"Chrome"===v.name&&-1!==v.userAgent.indexOf("Mac OS X")&&1===m?2:m}const h=["user","environment","left","right"],g=(v,m)=>{if(void 0===v||h.indexOf(v)>=0)return v;c(m).warn(`Invalid facingMode passed to Publisher. Expected one of: ${h.join(", ")}`)};l.exports=function(m){const p=c(m),y=m.env||{},S=m.isScreenSharing,T=m.isCustomAudioTrack,b=m.isCustomVideoTrack;return S&&!r&&t(m.usingOptionalMandatoryStyle,"Screensharing only uses optional-mandatory constraints right now"),["echoCancellation","autoGainControl","noiseSuppression"].forEach(O=>{!1!==m[O]&&Object.assign(m,{[O]:!0})}),{isScreenSharing:S,isCustomAudioTrack:T,isCustomVideoTrack:b,audio:d("audio",m),video:d("video",m),usingOptionalMandatoryStyle:m.usingOptionalMandatoryStyle,enableRenegotiation:m.enableRenegotiation,enableStereo:m.enableStereo,noiseSuppression:m.noiseSuppression,autoGainControl:m.autoGainControl,echoCancellation:m.echoCancellation,disableAudioProcessing:m.disableAudioProcessing,videoDimensions:u("resolution",m.resolution,O=>s[O],`"${Object.keys(s).join('", "')}"`,p),frameRate:f(y,u("frameRate",m.frameRate,O=>-1!==a.indexOf(O)?O:void 0,a.join(","),p)),maxResolution:function(){if(void 0===m.maxResolution)return S?{width:1920,height:1920}:void 0;const O={width:m.maxResolution.width,height:m.maxResolution.height};return Object.keys(O).forEach(C=>{const R=O[C];("number"!=typeof R||R>1920)&&(p.warn(`Invalid maxResolution passed to the Publisher. maxResolution.${C} must be less than or equal to 1920`),O[C]=1920)}),O}(),facingMode:g(m.facingMode,m)}}},function(l,E,e){"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(s){if(null==s)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}l.exports=function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de","5"===Object.getOwnPropertyNames(s)[0])return!1;for(var a={},c=0;c<10;c++)a["_"+String.fromCharCode(c)]=c;if("0123456789"!==Object.getOwnPropertyNames(a).map(function(f){return a[f]}).join(""))return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},d)).join("")}catch(f){return!1}}()?Object.assign:function(s,a){for(var c,d,u=i(s),f=1;f<arguments.length;f++){for(var h in c=Object(arguments[f]))r.call(c,h)&&(u[h]=c[h]);if(t){d=t(c);for(var g=0;g<d.length;g++)n.call(c,d[g])&&(u[d[g]]=c[d[g]])}}return u}},function(l,E,e){(function(t,r){var n=Object.getOwnPropertyDescriptors||function(k){for(var W=Object.keys(k),Z={},ie=0;ie<W.length;ie++)Z[W[ie]]=Object.getOwnPropertyDescriptor(k,W[ie]);return Z},i=/%[sdj%]/g;E.format=function(w){if(!C(w)){for(var k=[],W=0;W<arguments.length;W++)k.push(a(arguments[W]));return k.join(" ")}W=1;for(var Z=arguments,ie=Z.length,_=String(w).replace(i,function(pe){if("%%"===pe)return"%";if(W>=ie)return pe;switch(pe){case"%s":return String(Z[W++]);case"%d":return Number(Z[W++]);case"%j":try{return JSON.stringify(Z[W++])}catch(ue){return"[Circular]"}default:return pe}}),se=Z[W];W<ie;se=Z[++W])T(se)||!P(se)?_+=" "+se:_+=" "+a(se);return _},E.deprecate=function(w,k){if(void 0!==t&&!0===t.noDeprecation)return w;if(void 0===t)return function(){return E.deprecate(w,k).apply(this,arguments)};var W=!1;return function Z(){if(!W){if(t.throwDeprecation)throw new Error(k);t.traceDeprecation?console.trace(k):console.error(k),W=!0}return w.apply(this,arguments)}};var s,o={};function a(w,k){var W={seen:[],stylize:u};return arguments.length>=3&&(W.depth=arguments[2]),arguments.length>=4&&(W.colors=arguments[3]),S(k)?W.showHidden=k:k&&E._extend(W,k),I(W.showHidden)&&(W.showHidden=!1),I(W.depth)&&(W.depth=2),I(W.colors)&&(W.colors=!1),I(W.customInspect)&&(W.customInspect=!0),W.colors&&(W.stylize=c),f(W,w,W.depth)}function c(w,k){var W=a.styles[k];return W?"\x1b["+a.colors[W][0]+"m"+w+"\x1b["+a.colors[W][1]+"m":w}function u(w,k){return w}function f(w,k,W){if(w.customInspect&&k&&L(k.inspect)&&k.inspect!==E.inspect&&(!k.constructor||k.constructor.prototype!==k)){var Z=k.inspect(W,w);return C(Z)||(Z=f(w,Z,W)),Z}var ie=function h(w,k){if(I(k))return w.stylize("undefined","undefined");if(C(k)){var W="'"+JSON.stringify(k).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return w.stylize(W,"string")}return O(k)?w.stylize(""+k,"number"):S(k)?w.stylize(""+k,"boolean"):T(k)?w.stylize("null","null"):void 0}(w,k);if(ie)return ie;var _=Object.keys(k),se=function d(w){var k={};
vendor: 4,751 bytes, line 1
1return w.forEach(function(W,Z){k[W]=!0}),k}(_);if(w.showHidden&&(_=Object.getOwnPropertyNames(k)),D(k)&&(_.indexOf("message")>=0||_.indexOf("description")>=0))return g(k);if(0===_.length){if(L(k))return w.stylize("[Function"+(k.name?": "+k.name:"")+"]","special");if(A(k))return w.stylize(RegExp.prototype.toString.call(k),"regexp");if(x(k))return w.stylize(Date.prototype.toString.call(k),"date");if(D(k))return g(k)}var Me,ue="",me=!1,ve=["{","}"];return y(k)&&(me=!0,ve=["[","]"]),L(k)&&(ue=" [Function"+(k.name?": "+k.name:"")+"]"),A(k)&&(ue=" "+RegExp.prototype.toString.call(k)),x(k)&&(ue=" "+Date.prototype.toUTCString.call(k)),D(k)&&(ue=" "+g(k)),0!==_.length||me&&0!=k.length?W<0?A(k)?w.stylize(RegExp.prototype.toString.call(k),"regexp"):w.stylize("[Object]","special"):(w.seen.push(k),Me=me?function v(w,k,W,Z,ie){for(var _=[],se=0,pe=k.length;se<pe;++se)j(k,String(se))?_.push(m(w,k,W,Z,String(se),!0)):_.push("");return ie.forEach(function(ue){ue.match(/^\d+$/)||_.push(m(w,k,W,Z,ue,!0))}),_}(w,k,W,se,_):_.map(function(Q){return m(w,k,W,se,Q,me)}),w.seen.pop(),function p(w,k,W){var ie=w.reduce(function(_,se){return se.indexOf("\n"),_+se.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ie>60?W[0]+(""===k?"":k+"\n ")+" "+w.join(",\n  ")+" "+W[1]:W[0]+k+" "+w.join(", ")+" "+W[1]}(Me,ue,ve)):ve[0]+ue+ve[1]}function g(w){return"["+Error.prototype.toString.call(w)+"]"}function m(w,k,W,Z,ie,_){var se,pe,ue;if((ue=Object.getOwnPropertyDescriptor(k,ie)||{value:k[ie]}).get?pe=w.stylize(ue.set?"[Getter/Setter]":"[Getter]","special"):ue.set&&(pe=w.stylize("[Setter]","special")),j(Z,ie)||(se="["+ie+"]"),pe||(w.seen.indexOf(ue.value)<0?(pe=T(W)?f(w,ue.value,null):f(w,ue.value,W-1)).indexOf("\n")>-1&&(pe=_?pe.split("\n").map(function(me){return"  "+me}).join("\n").substr(2):"\n"+pe.split("\n").map(function(me){return"   "+me}).join("\n")):pe=w.stylize("[Circular]","special")),I(se)){if(_&&ie.match(/^\d+$/))return pe;(se=JSON.stringify(""+ie)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(se=se.substr(1,se.length-2),se=w.stylize(se,"name")):(se=se.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),se=w.stylize(se,"string"))}return se+": "+pe}function y(w){return Array.isArray(w)}function S(w){return"boolean"==typeof w}function T(w){return null===w}function O(w){return"number"==typeof w}function C(w){return"string"==typeof w}function I(w){return void 0===w}function A(w){return P(w)&&"[object RegExp]"===U(w)}function P(w){return"object"==typeof w&&null!==w}function x(w){return P(w)&&"[object Date]"===U(w)}function D(w){return P(w)&&("[object Error]"===U(w)||w instanceof Error)}function L(w){return"function"==typeof w}function U(w){return Object.prototype.toString.call(w)}function B(w){return w<10?"0"+w.toString(10):w.toString(10)}E.debuglog=function(w){if(I(s)&&(s=t.env.NODE_DEBUG||""),w=w.toUpperCase(),!o[w])if(new RegExp("\\b"+w+"\\b","i").test(s)){var k=t.pid;o[w]=function(){var W=E.format.apply(E,arguments);console.error("%s %d: %s",w,k,W)}}else o[w]=function(){};return o[w]},E.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.isArray=y,E.isBoolean=S,E.isNull=T,E.isNullOrUndefined=function b(w){return null==w},E.isNumber=O,E.isString=C,E.isSymbol=function R(w){return"symbol"==typeof w},E.isUndefined=I,E.isRegExp=A,E.isObject=P,E.isDate=x,E.isError=D,E.isFunction=L,E.isPrimitive=function N(w){return null===w||"boolean"==typeof w||"number"==typeof w||"string"==typeof w||"symbol"==typeof w||void 0===w},E.isBuffer=e(565);var V=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function H(){var w=new Date,k=[B(w.getHours()),B(w.getMinutes()),B(w.getSeconds())].join(":");return[w.getDate(),V[w.getMonth()],k].join(" ")}function j(w,k){return Object.prototype.hasOwnProperty.call(w,k)}E.log=function(){console.log("%s - %s",H(),E.format.apply(E,arguments))},E.inherits=e(566),E._extend=function(w,k){if(!k||!P(k))return w;for(var W=Object.keys(k),Z=W.length;Z--;)w[W[Z]]=k[W[Z]];return w};var M="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function F(w,k){if(!w){var W=new Error("Promise was rejected with a falsy value");W.reason=w,w=W}return k(w)}E.promisify=function(k){if("function"!=typeof k)throw new TypeError('The "original" argument must be of type Function');if(M&&k[M]){var W;if("function"!=typeof(W=k[M]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(W,M,{value:W,enumerable:!1,writable:!1,
1configurable:!0}),W}function W(){for(var Z,ie,_=new r(function(ue,me){Z=ue,ie=me}),se=[],pe=0;pe<arguments.length;pe++)se.push(arguments[pe]);se.push(function(ue,me){ue?ie(ue):Z(me)});try{k.apply(this,se)}catch(ue){ie(ue)}return _}return Object.setPrototypeOf(W,Object.getPrototypeOf(k)),M&&Object.defineProperty(W,M,{value:W,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(W,n(k))},E.promisify.custom=M,E.callbackify=function z(w){if("function"!=typeof w)throw new TypeError('The "original" argument must be of type Function');function k(){for(var W=[],Z=0;Z<arguments.length;Z++)W.push(arguments[Z]);var ie=W.pop();if("function"!=typeof ie)throw new TypeError("The last argument must be of type Function");var _=this,se=function(){return ie.apply(_,arguments)};w.apply(this,W).then(function(pe){t.nextTick(se,null,pe)},function(pe){t.nextTick(F,pe,se)})}return Object.setPrototypeOf(k,Object.getPrototypeOf(w)),Object.defineProperties(k,n(w)),k}}).call(this,e(69),e(0))},function(l,E){l.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(l,E){l.exports="function"==typeof Object.create?function(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}},function(l,E,e){var t=e(568),r=e(261),n=e(262),i=e(58);l.exports=function o(s){return function(a){a=i(a);var c=r(a)?n(a):void 0,u=c?c[0]:a.charAt(0),d=c?t(c,1).join(""):a.slice(1);return u[s]()+d}}},function(l,E,e){var t=e(260);l.exports=function r(n,i,o){var s=n.length;return o=void 0===o?s:o,!i&&o>=s?n:t(n,i,o)}},function(l,E){l.exports=function e(t){return t.split("")}},function(l,E){var e="\\ud800-\\udfff",s="["+e+"]",a="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",c="\\ud83c[\\udffb-\\udfff]",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",v="(?:"+a+"|"+c+")?",m="[\\ufe0e\\ufe0f]?",y=m+v+"(?:\\u200d(?:"+[d,f,h].join("|")+")"+m+v+")*",S="(?:"+[d+a+"?",a,f,h,s].join("|")+")",T=RegExp(c+"(?="+c+")|"+S+y,"g");l.exports=function b(O){return O.match(T)||[]}},function(l,E,e){"use strict";l.exports=["screen","window","tab","browser","application"]},function(l,E,e){"use strict";const t=e(1),r=e(44)(),n=e(49),i=e(119),o=e(574),s=e(577),a="/opentok/webrtc/docs/js/release-notes.html",c=r.onlyLocal(),u=t("setLogLevel"),f=n(()=>{u.info("%c\n \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557   \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557  \u2588\u2588\u2557\n\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2588\u2588\u2557  \u2588\u2588\u2551\u255a\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255d\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2554\u255d\n\u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2557  \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551   \u2588\u2588\u2551   \u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2554\u255d\n\u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u255d \u2588\u2588\u2554\u2550\u2550\u255d  \u2588\u2588\u2551\u255a\u2588\u2588\u2557\u2588\u2588\u2551   \u2588\u2588\u2551   \u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2588\u2588\u2557\n\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551     \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255a\u2588\u2588\u2588\u2588\u2551   \u2588\u2588\u2551   \u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551  \u2588\u2588\u2557\n \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u255d     \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u255d  \u255a\u2550\u2550\u2550\u255d   \u255a\u2550\u255d    \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u255d  \u255a\u2550\u255d",'font-family: "Fire Code", Courier, "Courier New", Consolas, "De
1jaVu Sans Mono"'),u.info(`OpenTok JS SDK ${c.version}`),u.info(`Release notes: ${c.websiteUrl}${a}`),u.info(`Known issues: ${c.websiteUrl}${a}l#knownIssues`)});function h(g){if(void 0===g||!o(i,{priority:g})&&0!==g){const m=s(i,(p,y)=>`OT.${y.toUpperCase()} = ${p.priority}`).join(", ");u.error(`level must be one of: OT.NONE = 0, ${m}`),u.warn("Using OT.WARN instead"),g=i.warn.priority}return t.setLogLevel(g),g>=i.debug.priority&&f(),u.info("OpenTok JS SDK now uses the debug library. More info at https://www.npmjs.com/package/debug#browser-support"),u.info(`Changed log level to: ${g}`),g}h(c.debug?i.debug.priority:i.warn.priority),l.exports=h},function(l,E,e){var t=e(96);l.exports=function n(i,o){var s;if("function"!=typeof o)throw new TypeError("Expected a function");return i=t(i),function(){return--i>0&&(s=o.apply(this,arguments)),i<=1&&(o=void 0),s}}},function(l,E,e){var t=e(231),r=e(34),n=e(575),i=e(10),o=e(122);l.exports=function s(a,c,u){var d=i(a)?t:n;return u&&o(a,c,u)&&(c=void 0),d(a,r(c,3))}},function(l,E,e){var t=e(266);l.exports=function r(n,i){var o;return t(n,function(s,a,c){return!(o=i(s,a,c))}),!!o}},function(l,E,e){var t=e(24);l.exports=function r(n,i){return function(o,s){if(null==o)return o;if(!t(o))return n(o,s);for(var a=o.length,c=i?a:-1,u=Object(o);(i?c--:++c<a)&&!1!==s(u[c],c,u););return o}}},function(l,E,e){var t=e(33),r=e(34),n=e(578),i=e(10);l.exports=function o(s,a){return(i(s)?t:n)(s,r(a,3))}},function(l,E,e){var t=e(266),r=e(24);l.exports=function n(i,o){var s=-1,a=r(i)?Array(i.length):[];return t(i,function(c,u,d){a[++s]=o(c,u,d)}),a}},function(l,E,e){"use strict";l.exports=function(r){return"http:"!==r.substr(0,5)&&"https:"!==r.substr(0,6)&&"data:image/png;base64,"!==r.substr(0,22)?`data:image/png;base64,${r}`:r}},function(l,E,e){"use strict";const t=e(55),r=e(1)("Style");l.exports=function(i,o){const s=this,a={},c={buttonDisplayMode:["auto","mini","mini-auto","off","on"],nameDisplayMode:["auto","off","on"],audioLevelDisplayMode:["auto","off","on"],showSettingsButton:[!0,!1],showSpeakerButton:null,showMicButton:[!0,!1],backgroundImageURI:null,showControlBar:[!0,!1],showArchiveStatus:[!0,!1],archiveStatusDisplayMode:["auto","off","on"],videoDisabledDisplayMode:["auto","off","on"],audioBlockedDisplayMode:["auto","off","on"]};s.getAll=function(){return t(a)},s.get=function(f){return f?a[f]:s.getAll()},s.setAll=function(f,h){return Object.keys(f).forEach(g=>{s.set(g,f[g],h)}),s},s.set=function(f,h,g){let v;r.debug(`setStyle: ${f.toString()}`);const m=function(h){switch(h){case"true":return!0;case"false":return!1;default:return h}}(h);return function(h,g){const v=c[h];return void 0!==v&&(null===v||-1!==v.indexOf(g))}(f,m)?(v=a[f],m!==v&&(a[f]=m,g||o(f,h,v)),s):(r.warn(`Style.set::Invalid style property passed ${f} : ${m}`),s)},i&&s.setAll(i,!0)}},function(l,E,e){"use strict";const t=e(55);l.exports=function(n){const i=t(n);if(i.backgroundImageURI){const o=i.backgroundImageURI.split(":")[0];i.backgroundImageURI=-1!==["http","https","data"].indexOf(o)?o:"other"}return i}},function(l,E,e){"use strict";const t=e(2),r=e(269);l.exports=()=>Boolean("Node"!==t.name&&!t.isIosWebView&&(!!r()||(void 0!==typeof window?window:global).navigator.mediaDevices&&(void 0!==typeof window?window:global).navigator.mediaDevices.getUserMedia||(void 0!==typeof window?window:global).navigator.webkitGetUserMedia||(void 0!==typeof window?window:global).navigator.mozGetUserMedia))},function(l,E,e){"use strict";const t=e(2);l.exports=()=>"Node"!==t.name&&(!!("function"==typeof(void 0!==typeof window?window:global).webkitRTCPeerConnection&&(void 0!==typeof window?window:global).webkitRTCPeerConnection.prototype.addStream||"function"==typeof(void 0!==typeof window?window:global).RTCPeerConnection)||"function"==typeof(void 0!==typeof window?window:global).mozRTCPeerConnection&&t.version>20)},function(l,E,e){"use strict";l.exports=void 0!==(void 0!==typeof window?window:global).WebSocket},function(l,E){l.exports='<div id="tb_alert"><div id="section-normal-install" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application requires <a target="_blank" href="https://www.google.com/chrome/">Google Chrome</a>, <a target="_blank" href="http://www.mozilla.org/firefox">Firefox</a>
1, <a target="_blank" href="https://www.microsoft.com/en-us/edge">Edge</a>, or <a target="_blank" href="https://www.apple.com/safari/">Safari</a>.</div></div><div id="section-upgrade-install" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application requires a newer version of <a target="_blank" href="https://www.google.com/chrome/">Google Chrome</a>, <a target="_blank" href="http://www.mozilla.org/firefox">Firefox</a>, <a target="_blank" href="https://www.microsoft.com/en-us/edge">Edge</a>, or <a target="_blank" href="https://www.apple.com/safari/">Safari</a>.</div><div class="continue-text"><a href="#" role="OT_close">Continue at my own risk.</a></div></div><div id="section-supported-mobile-browser" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application requires a newer version of <a target="_blank" href="https://www.google.com.au/chrome/browser/mobile/">Google Chrome</a>.</div><div class="continue-text"><a href="#" role="OT_close">Continue at my own risk.</a></div></div><div id="section-mobile-browser" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application is not supported on your mobile device\'s browser at this time.</div></div></div>'},function(l,E,e){"use strict";var r=e(3)(e(59));const n=e(41);l.exports=function(i){function o(a,c){var u;let f=(void 0===c?{}:c).destroyOnClose,h=void 0===f||f;(u=i.call(this)||this).modalDiv=document.createElement("div"),u.modalDiv.classList.add("OT_ModalDialog"),u.modalDiv.innerHTML=a;const g=u.modalDiv.querySelectorAll("[role=OT_close]");return[].forEach.call(g,v=>v.addEventListener("click",m=>{m.preventDefault(),u.close()})),u.close(),document.body.appendChild(u.modalDiv),h&&u.on("closed",()=>u.destroy()),u}(0,r.default)(o,i);var s=o.prototype;return s.open=function(){this.modalDiv.style.display="block",this.emit("opened")},s.close=function(){this.modalDiv.style.display="none",this.emit("closed")},s.destroy=function(){this.modalDiv.innerHTML="",this.modalDiv.parentNode.removeChild(this.modalDiv),this.emit("destroyed")},s.el=function(c){return this.modalDiv.querySelector(c)},o}(n)},function(l,E,e){var t=e(588),r=e(270),n=e(589),i=e(590);function o(s){var a="function"==typeof Map?new Map:void 0;return l.exports=o=function(u){if(null===u||!n(u))return u;if("function"!=typeof u)throw new TypeError("Super expression must either be null or a function");if(void 0!==a){if(a.has(u))return a.get(u);a.set(u,d)}function d(){return i(u,arguments,t(this).constructor)}return d.prototype=Object.create(u.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),r(d,u)},o(s)}l.exports=o},function(l,E){function e(t){return l.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},e(t)}l.exports=e},function(l,E){l.exports=function e(t){return-1!==Function.toString.call(t).indexOf("[native code]")}},function(l,E,e){var t=e(270);function r(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}function n(i,o,s){return l.exports=n=r()?Reflect.construct:function(c,u,d){var f=[null];f.push.apply(f,u);var g=new(Function.bind.apply(c,f));return d&&t(g,d.prototype),g},n.apply(null,arguments)}l.exports=n},function(l,E,e){"use strict";(function(t){l.exports=(r,n)=>(n=n||(()=>{}),r.then(i=>new t(o=>{o(n())}).then(()=>i),i=>new t(o=>{o(n())}).then(()=>{throw i})))}).call(this,e(0))},function(l,E,e){var t=e(57),r=e(593),n=e(594),i=e(46);l.exports=function o(s,a){return a=t(a,s),null==(s=n(s,a))||delete s[i(r(a))]}},function(l,E){l.exports=function e(t){var r=null==t?0:t.length;
1return r?t[r-1]:void 0}},function(l,E,e){var t=e(98),r=e(260);l.exports=function n(i,o){return o.length<2?i:t(i,r(o,0,-1))}},function(l,E,e){var t=e(135);l.exports=function r(n){return t(n)?void 0:n}},function(l,E,e){var t=e(34),r=e(24),n=e(30);l.exports=function i(o){return function(s,a,c){var u=Object(s);if(!r(s)){var d=t(a,3);s=n(s),a=function(h){return d(u[h],h,u)}}var f=o(s,a,c);return f>-1?u[d?s[f]:f]:void 0}}},function(l,E,e){var t=e(92),r=e(93),n=e(128),i=e(94),o=e(598),s=e(97);l.exports=function c(u,d,f){var h=-1,g=r,v=u.length,m=!0,p=[],y=p;if(f)m=!1,g=n;else if(v>=200){var S=d?null:o(u);if(S)return s(S);m=!1,g=i,y=new t}else y=d?[]:p;e:for(;++h<v;){var T=u[h],b=d?d(T):T;if(T=f||0!==T?T:0,m&&b==b){for(var O=y.length;O--;)if(y[O]===b)continue e;d&&y.push(b),p.push(T)}else g(y,b,f)||(y!==p&&y.push(b),p.push(T))}return p}},function(l,E,e){var t=e(185),r=e(223),n=e(97),o=t&&1/n(new t([,-0]))[1]==1/0?function(s){return new t(s)}:r;l.exports=o},function(l,E,e){"use strict";(function(t){var r=e(3),n=r(e(12)),i=r(e(13));const s=e(1)("hasValidPeerConnection");function a(d){return new t(f=>{d.addEventListener("signalingstatechange",()=>f(!0)),d.createOffer({offerToReceiveAudio:1}).then(h=>d.setLocalDescription(h)).then(()=>setTimeout(()=>{f(!1)},1e3))})}function u(){return(u=(0,i.default)(n.default.mark(function d(f){var h;return n.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:v.prev=0,h=new f({iceServers:[]}),v.next=8;break;case 4:return v.prev=4,v.t0=v.catch(0),s.error("Error occurred creating PeerConnection",v.t0),v.abrupt("return",!1);case 8:return v.prev=8,v.next=11,a(h);case 11:v.next=18;break;case 13:v.prev=13,v.t1=v.catch(8),s.error("Error occurred checking the validity of the PeerConnection",v.t1);try{h.close()}catch(m){}return v.abrupt("return",!1);case 18:v.prev=18,h.close(),v.next=26;break;case 22:return v.prev=22,v.t2=v.catch(18),s.error("Error occurred closing PeerConnection",v.t2),v.abrupt("return",!1);case 26:return v.abrupt("return",!0);case 27:case"end":return v.stop()}},d,null,[[0,4],[8,13],[18,22]])}))).apply(this,arguments)}l.exports=function c(d){return u.apply(this,arguments)}}).call(this,e(0))},function(l,E,e){var t=function(){return this||"object"==typeof self&&self}()||Function("return this")(),r=t.regeneratorRuntime&&Object.getOwnPropertyNames(t).indexOf("regeneratorRuntime")>=0,n=r&&t.regeneratorRuntime;if(t.regeneratorRuntime=void 0,l.exports=e(601),r)t.regeneratorRuntime=n;else try{delete t.regeneratorRuntime}catch(i){t.regeneratorRuntime=void 0}},function(l,E,e){(function(t){!function(r){"use strict";var o,n=Object.prototype,i=n.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag",d="object"==typeof l,f=r.regeneratorRuntime;if(f)d&&(l.exports=f);else{(f=r.regeneratorRuntime=d?l.exports:{}).wrap=h;var v="suspendedStart",m="suspendedYield",p="executing",y="completed",S={},C={};C[a]=function(){return this};var R=Object.getPrototypeOf,I=R&&R(R(V([])));I&&I!==n&&i.call(I,a)&&(C=I);var A=O.prototype=T.prototype=Object.create(C);b.prototype=A.constructor=O,O.constructor=b,O[u]=b.displayName="GeneratorFunction",f.isGeneratorFunction=function(j){var M="function"==typeof j&&j.constructor;return!!M&&(M===b||"GeneratorFunction"===(M.displayName||M.name))},f.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,O):(j.__proto__=O,u in j||(j[u]="GeneratorFunction")),j.prototype=Object.create(A),j},f.awrap=function(j){return{__await:j}},P(x.prototype),x.prototype[c]=function(){return this},f.AsyncIterator=x,f.async=function(j,M,F,z){var w=new x(h(j,M,F,z));return f.isGeneratorFunction(M)?w:w.next().then(function(k){return k.done?k.value:w.next()})},P(A),A[u]="Generator",A[a]=function(){return this},A.toString=function(){return"[object Generator]"},f.keys=function(j){var M=[];for(var F in j)M.push(F);return M.reverse(),function z(){for(;M.length;){var w=M.pop();if(w in j)return z.value=w,z.done=!1,z}return z.done=!0,z}},f.values=V,B.prototype={constructor:B,reset:function(j){if(this.prev=0,this.next=0,this.sent=this._sent=o,this.done=!1,this.delegate=null,this.method="next",this.arg=o,this.tryEntries.forEac
vendor: 4,230 bytes, line 1
1h(U),!j)for(var M in this)"t"===M.charAt(0)&&i.call(this,M)&&!isNaN(+M.slice(1))&&(this[M]=o)},stop:function(){this.done=!0;var M=this.tryEntries[0].completion;if("throw"===M.type)throw M.arg;return this.rval},dispatchException:function(j){if(this.done)throw j;var M=this;function F(ie,_){return k.type="throw",k.arg=j,M.next=ie,_&&(M.method="next",M.arg=o),!!_}for(var z=this.tryEntries.length-1;z>=0;--z){var w=this.tryEntries[z],k=w.completion;if("root"===w.tryLoc)return F("end");if(w.tryLoc<=this.prev){var W=i.call(w,"catchLoc"),Z=i.call(w,"finallyLoc");if(W&&Z){if(this.prev<w.catchLoc)return F(w.catchLoc,!0);if(this.prev<w.finallyLoc)return F(w.finallyLoc)}else if(W){if(this.prev<w.catchLoc)return F(w.catchLoc,!0)}else{if(!Z)throw new Error("try statement without catch or finally");if(this.prev<w.finallyLoc)return F(w.finallyLoc)}}}},abrupt:function(j,M){for(var F=this.tryEntries.length-1;F>=0;--F){var z=this.tryEntries[F];if(z.tryLoc<=this.prev&&i.call(z,"finallyLoc")&&this.prev<z.finallyLoc){var w=z;break}}w&&("break"===j||"continue"===j)&&w.tryLoc<=M&&M<=w.finallyLoc&&(w=null);var k=w?w.completion:{};return k.type=j,k.arg=M,w?(this.method="next",this.next=w.finallyLoc,S):this.complete(k)},complete:function(j,M){if("throw"===j.type)throw j.arg;return"break"===j.type||"continue"===j.type?this.next=j.arg:"return"===j.type?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):"normal"===j.type&&M&&(this.next=M),S},finish:function(j){for(var M=this.tryEntries.length-1;M>=0;--M){var F=this.tryEntries[M];if(F.finallyLoc===j)return this.complete(F.completion,F.afterLoc),U(F),S}},catch:function(j){for(var M=this.tryEntries.length-1;M>=0;--M){var F=this.tryEntries[M];if(F.tryLoc===j){var z=F.completion;if("throw"===z.type){var w=z.arg;U(F)}return w}}throw new Error("illegal catch attempt")},delegateYield:function(j,M,F){return this.delegate={iterator:V(j),resultName:M,nextLoc:F},"next"===this.method&&(this.arg=o),S}}}function h(j,M,F,z){var k=Object.create((M&&M.prototype instanceof T?M:T).prototype),W=new B(z||[]);return k._invoke=function D(j,M,F){var z=v;return function(k,W){if(z===p)throw new Error("Generator is already running");if(z===y){if("throw"===k)throw W;return H()}for(F.method=k,F.arg=W;;){var Z=F.delegate;if(Z){var ie=L(Z,F);if(ie){if(ie===S)continue;return ie}}if("next"===F.method)F.sent=F._sent=F.arg;else if("throw"===F.method){if(z===v)throw z=y,F.arg;F.dispatchException(F.arg)}else"return"===F.method&&F.abrupt("return",F.arg);z=p;var _=g(j,M,F);if("normal"===_.type){if(z=F.done?y:m,_.arg===S)continue;return{value:_.arg,done:F.done}}"throw"===_.type&&(z=y,F.method="throw",F.arg=_.arg)}}}(j,F,W),k}function g(j,M,F){try{return{type:"normal",arg:j.call(M,F)}}catch(z){return{type:"throw",arg:z}}}function T(){}function b(){}function O(){}function P(j){["next","throw","return"].forEach(function(M){j[M]=function(F){return this._invoke(M,F)}})}function x(j){function M(w,k,W,Z){var ie=g(j[w],j,k);if("throw"!==ie.type){var _=ie.arg,se=_.value;return se&&"object"==typeof se&&i.call(se,"__await")?t.resolve(se.__await).then(function(pe){M("next",pe,W,Z)},function(pe){M("throw",pe,W,Z)}):t.resolve(se).then(function(pe){_.value=pe,W(_)},function(pe){return M("throw",pe,W,Z)})}Z(ie.arg)}var F;this._invoke=function z(w,k){function W(){return new t(function(Z,ie){M(w,k,Z,ie)})}return F=F?F.then(W,W):W()}}function L(j,M){var F=j.iterator[M.method];if(F===o){if(M.delegate=null,"throw"===M.method){if(j.iterator.return&&(M.method="return",M.arg=o,L(j,M),"throw"===M.method))return S;M.method="throw",M.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var z=g(F,j.iterator,M.arg);if("throw"===z.type)return M.method="throw",M.arg=z.arg,M.delegate=null,S;var w=z.arg;return w?w.done?(M[j.resultName]=w.value,M.next=j.nextLoc,"return"!==M.method&&(M.method="next",M.arg=o),M.delegate=null,S):w:(M.method="throw",M.arg=new TypeError("iterator result is not an object"),M.delegate=null,S)}function N(j){var M={tryLoc:j[0]};1 in j&&(M.catchLoc=j[1]),2 in j&&(M.finallyLoc=j[2],M.afterLoc=j[3]),this.tryEntries.push(M)}function U(j){var M=j.completion||{};M.type="normal",delete M.arg,j.completion=M}function B(j){this.tryEntries=[{tryLoc:"root"}
1],j.forEach(N,this),this.reset(!0)}function V(j){if(j){var M=j[a];if(M)return M.call(j);if("function"==typeof j.next)return j;if(!isNaN(j.length)){var F=-1,z=function w(){for(;++F<j.length;)if(i.call(j,F))return w.value=j[F],w.done=!1,w;return w.value=o,w.done=!0,w};return z.next=z}}return{next:H}}function H(){return{value:o,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())}).call(this,e(0))},function(l,E,e){"use strict";(function(t){const r=e(36),n=e(2),i=e(603),o=e(73),s=e(1)("createPeerConnection");l.exports=function(c){let u=c.window,d=c.config,f=c.constraints;s.debug("called");const h=r(d);h.iceServers=i(n,h.iceServers),o()&&(h.sdpSemantics="plan-b");const g=new u.RTCPeerConnection(h,f);return t.resolve(g)}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(7),r=e(271),n={Edge(i){let o=!1;return i.map(s=>{if(!s)return;const a=s.urls||s.url&&[s.url];if(!a)return;const c=a.filter(u=>0!==u.indexOf("turn:")||-1===u.indexOf("transport=udp")||-1!==u.indexOf("turn:[")||o?0===u.indexOf("stun:"):(o=!0,!0));return 0!==c.length?t(r(s,["url","urls"]),{urls:c}):void 0}).filter(s=>void 0!==s)},Safari:i=>i.map(o=>{if(void 0!==o.urls&&void 0===o.url)return o;const s=o.urls||o.url&&[o.url];return t(r(o,["url","urls"]),{urls:s})})};l.exports=function(o,s){let a=o.name;o.isEdge&&(a=o.isLegacyEdge?"Edge":"ChromiumEdge");const c=n[a];return c?c(s):s}},function(l,E,e){"use strict";const t=e(50),r=e(2),n_h264_baseline="42001f",n_h264_constBaseline="42e01f",i=o=>{let c=o.to;return o.sdp.replace(new RegExp(`^(a=fmtp:\\d+ .*profile-level-id=)${o.from}`,"gmi"),`$1${c}`)};l.exports={local:{offer:function(s,a){let c=void 0===s?{}:s,u=c.numSimulcastStreams,d=c.audioBitrate,f=c.priorityVideoCodec,h=void 0===f?"":f,g=c.codecFlags,v=void 0===g?{}:g,m=c.enableStereo,p=void 0!==m&&m,y=c.enableDtx,S=void 0!==y&&y,T=c.replaceBaselineProfile,b=void 0!==T&&T,O=t.filterExcessSSRCs(a);u>1&&(O=t.enableSimulcast(O,u)),d>0&&(O=t.setAudioBitrate(O,d)),O=t.modifyReceiveStereo(O,!1),O=t.modifySendStereo(O,Boolean(p)),O=t.modifyDtx(O,Boolean(S)),r.isLegacyEdge||Object.keys(v).filter(R=>!1===v[R]).forEach(R=>{O=t.removeVideoCodec(O,R)}),h&&!r.isLegacyEdge?O=t.reprioritizeVideoCodec(O,h,"top"):"h264"!==h&&(O=t.reprioritizeVideoCodec(O,"h264","bottom"));let C=O;return b&&(C=i({sdp:C,from:n_h264_baseline,to:n_h264_constBaseline})),{local:O,remote:C}},answer:function(s,a){let c=void 0===s?{}:s,u=c.audioBitrate,d=c.codecFlags,f=c.enableStereo,h=void 0!==f&&f,g=c.enableDtx,v=void 0!==g&&g,m=c.replaceBaselineProfile,p=void 0!==m&&m,y=a;u>0&&(y=t.setAudioBitrate(y,u)),y=t.modifyReceiveStereo(y,Boolean(h)),y=t.modifySendStereo(y,!1),y=t.modifyDtx(y,Boolean(v)),d&&Object.keys(d).filter(T=>!1===d[T]).forEach(T=>{y=t.removeVideoCodec(y,T)});let S=y;return p&&(S=i({sdp:S,from:n_h264_baseline,to:n_h264_constBaseline})),{local:y,remote:S}}},remote:{offer:(o,s)=>{let a=o.replaceBaselineProfile,c=void 0!==a&&a,u=s;return-1===u.indexOf("a=rtcp-fb")&&(u=u.replace(/^m=video(.*)$/gim,"m=video$1\r\na=rtcp-fb:* ccm fir\r\na=rtcp-fb:* nack ")),c&&(u=i({sdp:u,from:n_h264_constBaseline,to:n_h264_baseline})),{local:u}},answer:function(s,a){let c=void 0===s?{}:s,u=c.audioBitrate,d=c.replaceBaselineProfile,f=void 0!==d&&d,h=a;return u>0&&(h=t.setAudioBitrate(h,u)),f&&(h=i({sdp:h,from:n_h264_constBaseline,to:n_h264_baseline})),{local:h}}}}},function(l,E,e){var t=e(38),r=e(53),n=e(40),i=e(24),o=e(275),s=e(606),a=e(232),c=e(97),u=e(262),d=e(276),g=t?t.iterator:void 0;l.exports=function v(m){if(!m)return[];if(i(m))return o(m)?u(m):r(m);if(g&&m[g])return s(m[g]());var p=n(m);return("[object Map]"==p?a:"[object Set]"==p?c:d)(m)}},function(l,E){l.exports=function e(t){for(var r,n=[];!(r=t.next()).done;)n.push(r.value);return n}},function(l,E,e){var t=e(33);l.exports=function r(n,i){return t(i,function(o){return n[o]})}},function(l,E,e){"use strict";l.exports=(t,r)=>{let n=[],i=null;if("function"==typeof t.getReceivers){const o=t.getReceivers().find(s=>"audio"===s.track.kind);o&&(n=o.getSynchronizationSources())}else i=new Error("peerConnection does not support getReceivers function");r&&r(i,n)}},function(l,E,e){"use strict";(function(t){const r=e(610),n=function(o){this.pending=[],this._processBinding=this.maybeProcessPending.bind(this),o&&this.setPeerConnection(o)};
1n.prototype.setPeerConnection=function(o){if(this.pc)throw new Error("Peer connection already set");this.pc=o,this._forwardIceCandidate=r(this.pc,"addIceCandidate"),this.pc.addEventListener("signalingstatechange",this._processBinding),this.maybeProcessPending()},n.prototype.canAddCandidates=function(){return!!(this.pc&&"closed"!==this.pc.iceConnectionState&&this.pc.remoteDescription&&this.pc.remoteDescription.type&&this.pc.localDescription&&this.pc.localDescription.type)},n.prototype.addIceCandidate=function(o){if(this.canAddCandidates())return this._forwardIceCandidate(o);const s=this.pending;return new t((a,c)=>{s.push({iceCandidate:o,resolve:a,reject:c})})},n.prototype.maybeProcessPending=function(){this.canAddCandidates()&&this.process()},n.prototype.process=function(){for(;this.pending.length;){const o=this.pending.shift();this._forwardIceCandidate(o.iceCandidate).then(o.resolve).catch(o.reject)}},n.prototype.destroy=function(){this.pc&&this.pc.removeEventListener("signalingstatechange",this._processBinding),this._processBinding=null,this.pc=null},l.exports=n}).call(this,e(0))},function(l,E,e){"use strict";(function(t){l.exports=function(n,i){const o=n[i];return function(s){return new t((a,c)=>{const u=o.apply(n,[s,a,c]);u&&"function"==typeof u.then&&a(u)})}}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(155),r=e(2),n=e(1)("offerProcessor"),i=e(50),o=e(612);l.exports=function(a,c,u,d,f,h,g,v,m,p,y,S){const T=(A,P)=>x=>{n.error(A),n.error(x),p&&p(A,x,P)},b=A=>{const P=i.hasSendStereo(h.sdp),x=i.hasSendDtx(h.sdp),D=i.getAudioBitrate(h.sdp),L=t(f,"local","answer",{enableStereo:P,enableDtx:x,audioBitrate:D,replaceBaselineProfile:S,codecFlags:g},A.sdp),N=new d({type:A.type,sdp:L.local}),U={type:A.type,sdp:L.remote};return a.setLocalDescription(N).then(()=>m(U)).catch(T("Error while setting LocalDescription","SetLocalDescription"))},C=new d({type:h.type,sdp:t(f,"remote","offer",{replaceBaselineProfile:S},h.sdp).local}),R=T("Error while setting RemoteDescription","SetRemoteDescription");return o(C,v,r,c,u).then(()=>(y(!0),C)).catch(A=>{if(y(!1),!i.hasMediaType(C.sdp,"audio"))throw new Error("Unsupported video without audio for fallback");n.debug("Couldn't set remote description",C,A,", trying without video");const P=new d({type:h.type,sdp:i.disableMediaType(C.sdp,"video")});return n.debug("offer without video",P.sdp),P}).then(A=>a.setRemoteDescription(A)).then(()=>a.createAnswer().then(b).catch(T("Error while setting createAnswer","CreateAnswer"))).catch(R)}},function(l,E,e){"use strict";(function(t){const r=e(73);l.exports=(i,o,s,a,c)=>{if(!a)return t.resolve(!0);const u={iceServers:[]};r()&&(u.sdpSemantics="plan-b");const d=new a(u),f=()=>{try{d.close()}catch(h){}};return d.setRemoteDescription(new c(i)).then(()=>{f()}).catch(h=>{throw f(),h})}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(61),r=e(614);l.exports=function(i){let o=[];const s={};let a={sentMessages:0,recvMessages:0};const u=function(f){const h=new r(f);return o.push(h),h.on("close",()=>{!function(f){o.filter(h=>f!==h)}(h)}),h};return s.add=function(d,f){return u(i.createDataChannel(d,f))},s.addMany=function(d){for(const f in d)d.hasOwnProperty(f)&&s.add(f,d[f])},s.get=function(d,f){return t(o,h=>h.equals(d,f))},s.getOrAdd=function(d,f){let h=s.get(d,f);return h||(h=s.add(d,f)),h},s.getQosData=function(){const d={sentMessages:0,recvMessages:0};return o.forEach(f=>{d.sentMessages+=f.getQosData().sentMessages,d.recvMessages+=f.getQosData().recvMessages}),d},s.sampleQos=function(){const d=s.getQosData(),f={sentMessages:d.sentMessages-a.sentMessages,recvMessages:d.recvMessages-a.recvMessages};return a=d,f},s.destroy=function(){o.forEach(d=>{d.close()}),o=[]},i.addEventListener("datachannel",d=>{u(d.channel)}),s}},function(l,E,e){"use strict";const t=e(6),r=e(1)("DataChannel"),n=function(o){this.data=o.data,this.source=o.source,this.lastEventId=o.lastEventId,this.origin=o.origin,this.timeStamp=o.timeStamp,this.type=o.type,this.ports=o.ports,this.path=o.path};l.exports=function(o){const s={},a=[],c={sentMessages:0,recvMessages:0},u=function(y){return a.push(y),s},d=function(y){return o.send(y),c.sentMessages++,s};return t(s,!0),s.label=o.label,s.id=o.id,s.reliable=o.reliable,s.negotiated=o.negotiated,s.ordered=o.ordered,s.protocol=o.protocol,s._channel=o,s.close=function(){o.close()}
1,s.equals=function(p,y){if(s.label!==p)return!1;for(const S in y)if(y.hasOwnProperty(S)&&s[S]!==y[S])return!1;return!0},s.getQosData=function(){return c},s.send=u,o.addEventListener("open",function(){s.send=d,function(){let y;for(;y=a.shift();)s.send(y)}()},!1),o.addEventListener("close",function(y){s.send=u,s.trigger("close",y)},!1),o.addEventListener("error",function(y){r.error(y)},!1),o.addEventListener("message",function(y){const S=new n(y);c.recvMessages++,s.trigger("message",S)},!1),s}},function(l,E,e){"use strict";const t=e(7),r=e(155),n=e(1)("subscribeProcessor");l.exports=function(o){let s=o.peerConnection,a=o.NativeRTCSessionDescription,c=o.sdpTransforms,u=o.numSimulcastStreams,d=o.offerOverrides,f=o.offerConstraints,h=o.replaceBaselineProfile;const g=(m,p)=>y=>{n.error(m,y);const S=new Error(m);throw S.reason=y,S.prefix=p,S};return n.debug("subscribeProcessor: creating offer"),s.createOffer(f).then(m=>{n.debug("subscribeProcessor: offer created",m);const p=r(c,"local","offer",t({numSimulcastStreams:u,replaceBaselineProfile:h},d),m.sdp),y=new a({type:m.type,sdp:p.local}),S=new a({type:m.type,sdp:p.remote});return n.debug("subscribeProcessor: setting local description"),s.setLocalDescription(y).then(()=>S,g("Error while setting LocalDescription","SetLocalDescription"))},g("Error while creating Offer","CreateOffer")).then(m=>({sdp:m.sdp,type:m.type}))}},function(l,E,e){"use strict";var t=e(3),r=t(e(12)),n=t(e(13));const i=e(50),o=i.mediaDirections,s=o.RECVONLY,a=o.INACTIVE,c=function(){var u=(0,n.default)(r.default.mark(function d(f,h){var g,m;return r.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(f){y.next=2;break}return y.abrupt("return");case 2:return y.next=4,f.createOffer();case 4:return g=y.sent,y.next=7,f.setLocalDescription(g);case 7:m=i.changeMediaDirection(f.remoteDescription.sdp,h),f.setRemoteDescription({type:f.remoteDescription.type,sdp:m});case 10:case"end":return y.stop()}},d)}));return function(f,h){return u.apply(this,arguments)}}();l.exports={changeMediaDirectionToInactive:u=>c(u,a),changeMediaDirectionToRecvOnly:u=>c(u,s)}},function(l,E,e){"use strict";function n(b,O){(null==O||O>b.length)&&(O=b.length);for(var C=0,R=new Array(O);C<O;C++)R[C]=b[C];return R}E.__esModule=!0,E.parseStatsOldAPI=p,E.parseStatsNewAPI=y,E.default=function S(b,O,C,R,I){return d?y(b,O,C,R,I):p(b,0,C,0,I)};const i=e(2),o=e(5),s=e(1)("QoS"),a=e(50),c=e(279),u=e(618),d=e(102)(),f=e(157),h=["audioCodec","audioSentBytes","audioSentPackets","audioSentPacketsLost","audioRtt","videoCodec","videoHeight","videoHeightInput","videoSentBytes","videoFrameRateSent","videoSentPackets","videoRtt","videoSentPacketsLost","videoWidthInput","videoWidth"],g=["audioCodec","audioRecvBytes","audioRecvPackets","audioRecvPacketsLost","videoCodec","videoHeight","videoRecvBytes","videoRecvPackets","videoRecvPacketsLost","videoFrameRateReceived","videoWidth"],v=(b,O)=>s.debug(`Raw stats for peer conn ${b.id}:`,O),m=b=>`${b.ipAddress||b.address||b.ip}:${b.portNumber||b.port}`;function p(b,O,C,R,I){const A=D=>(Number(D.stat("googFrameRateSent"))>0?(C.videoSentBytes=Number(D.stat("bytesSent")),C.videoSentPackets=Number(D.stat("packetsSent")),C.videoSentPacketsLost=Number(D.stat("packetsLost")),C.videoRtt=Number(D.stat("googRtt"))/1e3,C.videoFrameRate=Number(D.stat("googFrameRateInput")),C.videoWidth=Number(D.stat("googFrameWidthSent")),C.videoHeight=Number(D.stat("googFrameHeightSent")),C.videoFrameRateSent=Number(D.stat("googFrameRateSent")),C.videoWidthInput=Number(D.stat("googFrameWidthInput")),C.videoHeightInput=Number(D.stat("googFrameHeightInput")),C.videoCodec=D.stat("googCodecName")):Number(D.stat("googFrameRateReceived"))>0&&(C.videoRecvBytes=Number(D.stat("bytesReceived")),C.videoRecvPackets=Number(D.stat("packetsReceived")),C.videoRecvPacketsLost=Number(D.stat("packetsLost")),C.videoFrameRate=Number(D.stat("googFrameRateOutput")),C.videoFrameRateReceived=Number(D.stat("googFrameRateReceived")),C.videoFrameRateDecoded=Number(D.stat("googFrameRateDecoded")),C.videoWidth=Number(D.stat("googFrameWidthReceived")),C.videoHeight=Number(D.stat("googFrameHeightReceived")),C.videoCodec=D.stat("googCodecName")),null),P=D=>
1{Number(D.stat("audioInputLevel"))>0?(C.audioSentPackets=Number(D.stat("packetsSent")),C.audioSentPacketsLost=Number(D.stat("packetsLost")),C.audioSentBytes=Number(D.stat("bytesSent")),C.audioCodec=D.stat("googCodecName"),C.audioRtt=Number(D.stat("googRtt"))/1e3):Number(D.stat("audioOutputLevel"))>0&&(C.audioRecvPackets=Number(D.stat("packetsReceived")),C.audioRecvPacketsLost=Number(D.stat("packetsLost")),C.audioRecvBytes=Number(D.stat("bytesReceived")),C.audioCodec=D.stat("googCodecName"))};b.getStats(D=>{if(D.result){const L=D.result();v(b,L);const N=(V,H)=>L.filter(j=>j.id===H.stat(V))[0],U=V=>N("localCandidateId",V),B=V=>N("remoteCandidateId",V);for(let V=0;V<L.length;V++){const H=L[V];H.stat&&("true"===H.stat("googActiveConnection")&&(H.stat("googChannelId").indexOf("audio")>-1?(C.audioLocalAddress=H.stat("googLocalAddress"),C.audioRemoteAddress=H.stat("googRemoteAddress"),C.audioLocalCandidateType=H.stat("googLocalCandidateType"),C.audioRemoteCandidateType=H.stat("googRemoteCandidateType"),C.audioTransportType=H.stat("googTrans
1portType"),C.audioLocalRelayProtocol=c(U(H).stat("priority")),C.audioRemoteRelayProtocol=c(B(H).stat("priority"))):H.stat("googChannelId").indexOf("video")>-1&&(C.videoLocalAddress=H.stat("googLocalAddress"),C.videoRemoteAddress=H.stat("googRemoteAddress"),C.videoLocalCandidateType=H.stat("googLocalCandidateType"),C.videoRemoteCandidateType=H.stat("googRemoteCandidateType"),C.videoTransportType=H.stat("googTransportType"),C.videoLocalRelayProtocol=c(U(H).stat("priority")),C.videoRemoteRelayProtocol=c(B(H).stat("priority")))),P(H),A(H))}"videoCodec"in C&&!C.videoLocalAddress&&["LocalAddress","RemoteAddress","LocalCandidateType","RemoteCandidateType","TransportType","LocalRelayProtocol","RemoteRelayProtocol"].forEach(V=>{C[`video${V}`]=C[`audio${V}`]})}I(null,C)})}function y(b,O,C,R,I){const x=L=>{const N={packetsSent:"videoSentPackets",packetsLost:"videoSentPacketsLost",bytesSent:"videoSentBytes",framesPerSecond:"videoFrameRate",framesSent:"videoFrameRateSent",framesReceived:"videoFramesReceived",frameWidth:"videoWidth",frameHeight:"videoHeight"},U=["videoSentPackets","videoSentBytes"];for(const B in N)if(B in L){const V=N[B];U.includes(V)&&Number.isSafeInteger(C[V])?C[V]+=L[B]:C[V]=L[B]}};b.getStats(null).then(L=>{let N,U,B,V,H,j,M,F;const z=[],W=_=>{const se=(_=>_.toLowerCase().replace(/[^a-z]/g,""))(_.type),pe=_.id.toLowerCase();if(/(in|out)boundrtp$/.test(se)){const ue=/rtp/.test(pe),me=ue&&/audio/.test(pe),Me=ue&&/video/.test(pe)||"video"===_.kind;if(me||"audio"===_.kind?((L,N)=>{if("outboundrtp"===N?(C.audioSentPackets=L.packetsSent,C.audioSentPacketsLost=L.packetsLost,C.audioSentBytes=L.bytesSent):"inboundrtp"===N&&(C.audioRecvPackets=L.packetsReceived,C.audioRecvPacketsLost=L.packetsLost,C.audioRecvBytes=L.bytesReceived),void 0===C.audioCodec&&-1!==["Safari"].indexOf(o.env.name)&&void 0!==L.codecId){const B=("answer"===b.remoteDescription.type?b.remoteDescription:b.localDescription).sdp,V=L.codecId.lastIndexOf("_"),H=a.getCodecsAndCodecMap(B,"audio");-1!==V&&void 0!==H&&(C.audioCodec=H.codecMap[L.codecId.substring(V+1)])}})(_,se):Me&&((L,N)=>{if("outboundrtp"===N?x(L):"inboundrtp"===N&&(C.videoRecvPackets=L.packetsReceived,C.videoRecvPacketsLost=L.packetsLost,C.videoRecvBytes=L.bytesReceived),(i.isFirefox&&["outboundrtp","inboundrtp"].includes(N)||!R&&"inboundrtp"===N)&&(C.videoFrameRate=(()=>{if(!("videoSentBytes"in C?C.videoSentBytes>0:C.videoRecvBytes>0))return 0;let V=0;if(i.isFirefox&&i.version<96)V=Number(L.framerateMean);else{const H="outboundrtp"===N?"framesEncoded":"framesDecoded";C[H]=L[H],V=f({currentStatFrames:L[H],currentTimestamp:L.timestamp,prevStatFrames:O[H],prevTimestamp:O.timeStamp||Date.now()})}return V})()),void 0===C.videoCodec&&-1!==["Safari"].indexOf(o.env.name)&&void 0!==L.codecId){const V=("answer"===b.remoteDescription.type?b.remoteDescription:b.localDescription).sdp,H=L.codecId.lastIndexOf("_"),j=a.getCodecsAndCodecMap(V,"video");-1!==H&&void 0!==j&&(C.videoCodec=j.codecMap[L.codecId.substring(H+1)])}})(_,se),_.hasOwnProperty("roundTripTime")){const Q=_.mediaType||_.kind;"video"===Q?z.push(_.roundTripTime):"audio"===Q&&(C.audioRtt=_.roundTripTime)}if("remoteinboundrtp"===se&&_.hasOwnProperty("packetsLost")){const K=`${_.kind}SentPacketsLost`;C[K]||(C[K]=0),C[K]+=_.packetsLost}}else if("transport"===se){const ue=_.selectedCandidatePairId;ue&&(V=u(ue,L))}else"localcandidate"===se?(N=_.candidateType,B=m(_),j=_.protocol||_.transport):"remotecandidate"===se?(U=_.candidateType,H=m(_)):"track"===se&&0!==pe.indexOf("video")?(M=_.frameWidth,F=_.frameHeight,x(_)):"mediasource"===se&&(_.hasOwnProperty("framesPerSecond")&&(C.videoFrameRate=_.framesPerSecond),_.hasOwnProperty("width")&&(C.videoWidthInput=_.width),_.hasOwnProperty("height")&&(C.videoHeightInput=_.height))};if("function"==typeof L[Symbol.iterator]){v(b,Array.from(L));for(var ie,Z=function t(b,O){var C;if("undefined"==typeof Symbol||null==b[Symbol.iterator]){if(Array.isArray(b)||(C=function r(b,O){if(b){if("string"==typeof b)return n(b,O);var C=Object.prototype.toString.call(b).slice(8,-1);if("Object"===C&&b.constructor&&(C=b.constructor.name),"Map"===C||"Set"===C)return Array.from(b);if("Arguments"===C||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return n(b,O)}}(b))||O&&b&&"number"==typeof b.length){C&&(b=C);var R=0;return function(){return R>=b.length?{done:!0}:{done:!1,value:b[R++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(C=b[Symbol.iterator]()).next.bind(C)}(L);!(ie=Z()).done;){const _=ie.value;W(Array.isArray(_)?_[1]:_)}}else{v(b,L);for(const _ in L)L.hasOwnProperty(_)&&W(L[_])}if(b.currentRemoteDescription&&(C.useDtx=a.hasSendDtx(b.currentRemoteDescription.sdp)),R&&(C.videoRtt=(()=>
1{if(0===z.length)return null;const _=z.filter(ue=>ue>0),se=_.reduce((ue,me)=>ue+me,0);return _.length?se/_.length:0})()),(C.audioRecvBytes||C.audioSentBytes)&&(C.audioLocalCandidateType=N,C.audioLocalAddress=B,C.audioRemoteCandidateType=U,C.audioRemoteAddress=H,C.audioTransportType=j,C.audioLocalRelayProtocol=V,void 0===C.audioCodec)){const pe=a.getCodecs(("answer"===b.remoteDescription.type?b.remoteDescription:b.localDescription).sdp,"audio");C.audioCodec=pe[0]}if((C.videoRecvBytes||C.videoSentBytes)&&(C.videoLocalCandidateType=N,C.videoLocalAddress=B,C.videoRemoteCandidateType=U,C.videoRemoteAddress=H,C.videoTransportType=j,C.videoLocalRelayProtocol=V,void 0===C.videoCodec)){const pe=a.getCodecs(("answer"===b.remoteDescription.type?b.remoteDescription:b.localDescription).sdp,"video");C.videoCodec=pe[0]}(function T(b,O){(O?h:g).forEach(R=>{b.hasOwnProperty(R)||(b[R]=null)})})(C,R),C.videoWidth=C.videoWidth||M,C.videoHeight=C.videoHeight||F,I(null,C)}).catch(function(N){I(N)})}},function(l,E,e){"use strict";const t=e(279);l.exports=(r,n)=>{let i="";if(!r||!n)return i;const o=n.get(r);if(o){const s=o.localCandidateId;if(s){const a=n.get(s);if(a){const c=a.relayProtocol,u=a.priority;i=c?`TURN/${c.toUpperCase()}`:t(u)}}}return i}},function(l,E,e){"use strict";var t=e(3);E.__esModule=!0,E.default=void 0;var r=t(e(18));E.default=function(){function i(){(0,r.default)(this,"value",null),(0,r.default)(this,"changeCount",0)}return i.prototype.onValue=function(a){!a||a!==this.value&&(this.value&&(this.changeCount+=1),this.value=a)},i}()},function(l,E,e){var t=e(9),r=e(621),n=e(228),o=Math.max,s=Math.min;l.exports=function a(c,u,d){var f,h,g,v,m,p,y=0,S=!1,T=!1,b=!0;if("function"!=typeof c)throw new TypeError("Expected a function");function O(N){var U=f,B=h;return f=h=void 0,y=N,v=c.apply(B,U)}function C(N){return y=N,m=setTimeout(A,u),S?O(N):v}function I(N){var U=N-p;return void 0===p||U>=u||U<0||T&&N-y>=g}function A(){var N=r();if(I(N))return P(N);m=setTimeout(A,function R(N){var V=u-(N-p);return T?s(V,g-(N-y)):V}(N))}function P(N){return m=void 0,b&&f?O(N):(f=h=void 0,v)}function L(){var N=r(),U=I(N);if(f=arguments,h=this,p=N,U){if(void 0===m)return C(p);if(T)return clearTimeout(m),m=setTimeout(A,u),O(p)}return void 0===m&&(m=setTimeout(A,u)),v}return u=n(u)||0,t(d)&&(S=!!d.leading,g=(T="maxWait"in d)?o(n(d.maxWait)||0,u):g,b="trailing"in d?!!d.trailing:b),L.cancel=function x(){void 0!==m&&clearTimeout(m),y=0,f=p=h=m=void 0},L.flush=function D(){return void 0===m?v:P(r())},L}},function(l,E,e){var t=e(14);l.exports=function(){return t.Date.now()}},function(l,E,e){"use strict";const t=e(49);E.check=function(r){void 0===r&&(r={});const n=r.env||e(2);return"Chrome"===n.name&&n.userAgent.toLowerCase().indexOf("android")>-1&&n.version<65},E.once=t(()=>E.check())},function(l,E,e){"use strict";const t=e(35),r=e(5);l.exports=function(i){let o,s,a,c,u;const d=this;let f=i.archiving;
1const h=i.archivingStarted||"Archiving on",g=i.archivingEnded||"Archiving off";let v=!0;const m=function(S){c.nodeValue=S,o.setAttribute("title",S)},p=function(){u&&(clearTimeout(u),u=null),f?r.addClass(s,"OT_active"):r.removeClass(s,"OT_active"),r.removeClass(d.domElement,"OT_archiving-"+(f?"off":"on")),r.addClass(d.domElement,"OT_archiving-"+(f?"on":"off")),i.show&&f?(m(h),r.addClass(a,"OT_mode-on"),r.removeClass(a,"OT_mode-auto"),d.setDisplayMode("on"),u=setTimeout(()=>{r.addClass(a,"OT_mode-auto"),r.removeClass(a,"OT_mode-on")},5e3)):i.show&&!v?(r.addClass(a,"OT_mode-on"),r.removeClass(a,"OT_mode-auto"),d.setDisplayMode("on"),m(g),u=setTimeout(()=>{d.setDisplayMode("off")},5e3)):d.setDisplayMode("off")};t(this,{mode:f&&i.show?"on":"off",nodeName:"h1",htmlAttributes:{className:"OT_archiving OT_edge-bar-item OT_edge-bottom"},onCreate(){o=r.createElement("div",{className:"OT_archiving-light-box"},""),s=r.createElement("div",{className:"OT_archiving-light"},""),o.appendChild(s),a=r.createElement("div",{className:"OT_archiving-status OT_mode-on OT_edge-bar-item OT_edge-bottom"},""),c=document.createTextNode(""),a.appendChild(c),d.domElement.appendChild(o),d.domElement.appendChild(a),p()}}),this.setShowArchiveStatus=function(y){i.show=y,d.domElement&&p.call(d)},this.setArchiving=function(y){f=y,v=!1,d.domElement&&p.call(d)}}},function(l,E,e){"use strict";l.exports=function(t){void 0===t&&(t={});const r=t.global||(void 0!==typeof window?window:global);return()=>r.navigator&&r.navigator.mediaDevices}},function(l,E,e){"use strict";(function(t){const r=e(7),n=e(9),i=e(106),o=e(626),s=e(27),a=e(21),c=e(6);l.exports=function(d){void 0===d&&(d={});const f=d.env||e(2),h=d.Errors||e(4),g=d.otError||e(11)(),v=d.logging||e(1)("getUserMedia"),m=d.screenSharing||e(161)(),p=d.getDisplayMediaExtensionHelper||e(287),y=d.customGetUserMedia,S=d.global||(void 0!==typeof window?window:global),T=d.analytics||new s,b=S.navigator,O=S.location,C=()=>{return y||(b.mediaDevices?(N=b.mediaDevices).getUserMedia.bind(N):void 0);var N},R=function(){const U=C();return U?U(...arguments):t.reject(new Error("Cannot find getUserMedia"))},I=()=>{return y||(b.mediaDevices&&b.getDisplayMedia?b.getDisplayMedia.bind(b):b.mediaDevices&&b.mediaDevices.getDisplayMedia?(N=b.mediaDevices).getDisplayMedia.bind(N):void 0);var N},A=function(){const U=I();return U?U(...arguments):t.reject(new Error("Cannot find getDisplayMedia"))},P=(()=>{const N={name:h.USER_MEDIA_ACCESS_DENIED,message:"End-user denied permission to hardware devices"},U={name:h.NOT_SUPPORTED,message:"A constraint specified is not supported by the browser."},B={name:h.CONSTRAINTS_NOT_SATISFIED,message:"It's not possible to satisfy one or more constraints passed into the getUserMedia function"},V={name:h.NO_DEVICES_FOUND,message:"No voice or video input devices are available on this machine."},H={name:h.HARDWARE_UNAVAILABLE,message:"The selected voice or video devices are unavailable. Verify that the chosen devices are not in use by another application."},j={name:h.UNABLE_TO_CAPTURE_SCREEN,message:"Unable to capture screen. Unknown error occurred"},F={AbortError:{name:h.UNABLE_TO_CAPTURE_MEDIA,message:"Unable to capture media. Unknown error occurred"},NotAllowedError:N,NotFoundError:V,NotReadableError:H,OverconstrainedError:B,SecurityError:r({},N,{message:"End-user denied permission to hardware devices or user media support may be disabled on this page"}),TypeError:B,PermissionDeniedError:N,PermissionDismissedError:N,NotSupportedError:U,ConstraintNotSatisfiedError:B,MandatoryUnsatisfiedError:B,OverConstrainedError:B,DevicesNotFoundError:V,NoDevicesFoundError:V,HardwareUnavailableError:H,SourceUnavailableError:H,TrackStartError:H,ScreenCaptureError:j,TabCaptureError:j};return o({objectToTrack:F,keys:["PermissionDeniedError","PermissionDismissedError","NotSupportedError","ConstraintNotSatisfiedError","MandatoryUnsatisfiedError","OverConstrainedError","DevicesNotFoundError","NoDevicesFoundError","HardwareUnavailableError","SourceUnavailableError","TrackStartError","ScreenCaptureError","TabCaptureError"],onUsage(z){T.logEvent({action:"DeprecatedPropertyUsage:getUserMedia:errorMap",variation:"Event",payload:{key:z}})}}),F})(),x=(N,U)=>{let B=N;"AbortError"===B&&"string"==typeof U&&U.match(/(screen|tab).?capture/i)&&(B="ScreenCaptureError");const V=P[B];let H;return H=V?g(V.name,new Error(`${V.message} (getUserMedia error: ${N})`)):new Error(`Unknown error while getting user media: ${N}`),H.originalMessage=U,H.originalName=N,H};return function(N,U){if(void 0===U&&(U=!1),v.debug("getUserMedia wrapper called with",N),function(U){
1if(!U||!n(U))return!0;for(const B in U)if(U.hasOwnProperty(B)&&U[B])return!1;return!0}(N))return v.error("Couldn't get UserMedia: All constraints were false"),c(t.reject(g(h.NO_VALID_CONSTRAINTS,new Error("Video and Audio was disabled, you need to enable at least one"))));const V=c((U&&p.isSupportedInThisBrowser?A:R)(N).catch(F=>{const z=(N=>{if(n(N)&&N.name){let U=N.name,B=N.message;if(("Cannot find getUserMedia"===B||"Cannot find getDisplayMedia"===B)&&(U="Chrome"===f.name&&f.version>73&&"https:"!==S.location.protocol?"NotAllowedError":"NotSupportedError"),"Safari"===f.name&&"Error"===U){const j=Object.prototype.toString.call(N).match(/^\[object (\w+Error)\]$/);j&&(U=j[1])}const V=x(U,B);return V.constraintName=N.constraint||N.constraintName,V instanceof a||T.logEvent({action:"UnexpectedError:getUserMedia:parseErrorEvent",variation:"Event",payload:{name:V.name,message:V.message,originalMessage:V.originalMessage}}),V}if("string"==typeof N){const U=x(N);return T.logEvent({action:"CheckUnreachable:getUserMedia:parseErrorEvent",variation:"Event",payload:{info:"error is string",error:N}}),U}return T.logEvent({action:"CheckUnreachable:getUserMedia:parseErrorEvent",variation:"Event",payload:{info:"error was not string or object with name property",error:N}}),new Error("Unknown error type while getting media")})(F);if(z.name===h.UNABLE_TO_CAPTURE_SCREEN)return new t((w,k)=>{m.checkCapability(W=>{if("chrome"===W.extensionRequired){if(W.extensionRegistered&&!W.extensionInstalled){const Z=g(h.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,z);Z.message="Screen sharing extension not installed see https://tokbox.com/developer/guides/screen-sharing/js/#chrome-extension",k(Z)}else if(!W.extensionRegistered){const Z=g(h.SCREEN_SHARING_EXTENSION_NOT_REGISTERED,z);Z.message="Screen sharing extension not registered see https://tokbox.com/developer/guides/screen-sharing/js/#chrome-extension",k(Z)}}else k(z)})});throw z}).then(F=>(v.debug("got stream:",{stream:F,tracks:F.getTracks(),trackLabels:F.getTracks().map(z=>z.label)}),F))),H=-1!==O.protocol.indexOf("https")?500:100;let j=!0;const M=()=>{j=!1};return V.then(M,M),i(H).then(()=>{if(!j)return;const F=()=>V.emit("accessDialogClosed");V.emit("accessDialogOpened"),V.then(F,F)}),V}}}).call(this,e(0))},function(l,E,e){"use strict";l.exports=function(t){let r=void 0===t?{}:t,n=r.objectToTrack,i=r.keys,o=r.onUsage;if(!Array.isArray(i)&&void 0!==i)throw new Error("keys must be an array, or undefined");if("function"!=typeof o)throw new Error("onUsage must be a function");if(null==n)throw new Error("Expected objectToTrack to be a trackable object");Object.keys(n).forEach(s=>{if(void 0!==i&&-1===i.indexOf(s))return;let a=n[s];Object.defineProperty(n,s,{get:()=>(o(s),a),set(c){a=c,o(s,a)},enumerable:!0})})}},function(l,E,e){"use strict";const t=e(2),n=e(628).isCallbackBasedAPI;let i=e(265),o=null;const s=(d,f)=>{o.getSources(d,f)},a=(d,f)=>{o.getSources(d).then(h=>{f(void 0,h)},f)},u=(d,f)=>{(n?s:a)({types:[d]},(g,v)=>{if(g)return void f(g);const m=v[0];m?f(void 0,{audio:!1,video:{mandatory:{chromeMediaSource:d,chromeMediaSourceId:m.id}}}):f(new Error("Could not find Electron source for screensharing"))})};l.exports=function(f){void 0===f&&(f={});try{const h=()=>{let v=void 0!==typeof window?window:global;for(;"function"!=typeof v.require&&v.parent&&v.parent!==v;)v=v.parent;return v},g=()=>{const v=h();return(v.require?v.require("electron"):v.electron).desktopCapturer};o=f.desktopCapturer||(t.isElectron?g():null),i=f.isElectronScreenSharingSource||i}catch(h){}return{isSupportedInThisBrowser:null!==o,autoRegisters:!0,extensionRequired:!1,getConstraintsShowsPermissionUI:!1,sources:{screen:!0,application:!0,window:!0,browser:!0},register:()=>({isInstalled:h=>h(!0),getConstraints(h,g,v){i(h)?v(void 0,{audio:!0,video:!1}):u(h,v)}})}}},function(l,E,e){"use strict";const r=e(2).version<78;l.exports={isCallbackBasedAPI:r,isPromiseBasedAPI:!r}},function(l,E,e){"use strict";const t=e(2),r=e(159).default;l.exports={isSupportedInThisBrowser:!!t.isFirefox&&!r,autoRegisters:!0,extensionRequired:!1,extensionInstalled:!1,getConstraintsShowsPermissionUI:!1,sources:{screen:!0,application:!1,window:!0,browser:!1},register:()=>({isInstalled(i){i("object"==typeof OTScreenSharing)},getConstraints(i,o,s){o.video={mediaSource:i},o.browserWindow&&(o.video.browserWindow=o.browserWindow,delete o.browserWindow),void 0!==o.scrollWithPage&&(o.video.scrollWithPage=o.scrollWithPage,delete o.scrollWithPage),s(void 0,o)}})}},function(l,E,e){"use strict";var t=e(3),r=t(e(12)),n=t(e(13)),i=t(e(25));const s=e(631).normaliseOptions,c=e(288).isMediaStreamTrack,u=e(148),d=e(7),f=e(140),h=e(289).default,g=e(4),v=e(47),m=e(11),y=e(290).isValidVideoContentHint,S=e(6),T=e(264),b=e(2),O=e(263),C="getUserMedia request was aborted";l.exports=function(I){void 0===I&&(I={}),["deviceHelpers","getUserMediaHelper"].forEach(j=>{u(I[j],`${j} dependency must be injected into processPubOptions`)});const A=I.generateConstraintInfo||e(254),P=I.global||(void 0!==typeof window?window:global),x=I.logging||e(1)("processPubOptions"),D=I.navigator||P.navigator,L=I.screenSharing||e(161)(),N=I.env||b,U=e(632)({navigator:D||{}}),V=I.deviceHelpers,H=I.getUserMediaHelper;return(j,M,F)=>{const z=s(j,M,x),w=T(z.videoSource),k=c(z.audioSource),W=c(z.videoSource),_=!k&&null!==z.audioSource||!W&&null!==z.videoSource,se=ve=>"boolean"==typeof ve,pe=!w||k||O,ue=f(z,{mirror:!w&&!W,publishAudio:!0,publishVideo:!0,showControls:!0,fitMode:w?"contain":"cover",audioFallbackEnabled:pe,insertDefaultUI:!0,enableRenegotiation:!1,enableStereo:!1,enableDtx:!1,disableAudioProcessing:!1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0});if(void 0!==ue.videoContentHint&&!y(ue.videoContentHint)&&(x.warn(`${M}: Invalid content hint. Valid content hints are "text", "detail", "motion", or ""`),ue.videoContentHint=""),ue.name&&(ue.name=String(ue.name)),se(ue.enableDtx)||(ue.enableDtx=!1),se(ue.enableStereo)||(ue.enableStereo=!1),ue.constraints)x.warn(`${M}: You have passed your own constraints not using ours`);else{const ve=A((0,i.default)({isScreenSharing:w,isCustomAudioTrack:k,isCu
1stomVideoTrack:W},v(ue,["audioSource","publishAudio","videoSource","publishVideo","resolution","maxResolution","frameRate","facingMode","enableRenegotiation","enableStereo","disableAudioProcessing","echoCancellation","noiseSuppression","autoGainControl"]),{env:N,usingOptionalMandatoryStyle:U(w)}));d(ue,ve)}const me={isScreenSharing:w,isCustomAudioTrack:k,isCustomVideoTrack:W,shouldAllowAudio:pe,properties:ue};return S(me),me.getUserMedia=(0,n.default)(r.default.mark(function ve(){var Re,Me,Q,K,re,de,Oe,xe,ke;return r.default.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(Re=function(){for(var be=arguments.length,De=new Array(be),he=0;he<be;he++)De[he]=arguments[he];return me.emit("accessDialogOpened",...De)},Me=function(){for(var be=arguments.length,De=new Array(be),he=0;he<be;he++)De[he]=arguments[he];return me.emit("accessDialogClosed",...De)},_){te.next=7;break}return Q=new P.MediaStream,k&&Q.addTrack(z.audioSource),W&&Q.addTrack(z.videoSource),te.abrupt("return",Q);case 7:if(!w){te.next=15;break}return te.next=10,L.getConstraints({onAccessDialogOpened:Re,onAccessDialogClosed:Me,videoSource:z.videoSource,constraints:ue.constraints});case 10:if(ue.constraints=te.sent,!F()){te.next=13;break}throw m(g.CANCEL,new Error(C));case 13:te.next=25;break;case 15:return te.next=17,V.shouldAskForDevices();case 17:if(K=te.sent,!F()){te.next=20;break}throw m(g.CANCEL,new Error(C));case 20:x.debug(`${M}: shouldAskForDevices:`,K),K.video||(x.warn(`${M}: Setting video constraint to false, there are no video sources`),ue.constraints.video=!1),K.audio||(x.warn(`${M}: Setting audio constraint to false, there are no audio sources`),ue.constraints.audio=!1),me.videoDevices=K.videoDevices,me.audioDevices=K.audioDevices;case 25:if(x.debug(`${M}: onConstraintsFound`,re=ue.constraints),!F()){te.next=29;break}throw m(g.CANCEL,new Error(C));case 29:return de="Failed to acquire functional stream, this might be caused by the following iOS bug: https://bugs.webkit.org/show_bug.cgi?id=188088",Oe="Failed to acquire functional stream, this might be caused by the following iOS bug: https://bugs.webkit.org/show_bug.cgi?id=204106",xe=le=>"NotReadableError"===le.originalName&&"Failed starting capture of a video track"===le.originalMessage,ke=function(){var le=(0,n.default)(r.default.mark(function be(){var De,he,ze;return r.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return(De=H(re,w)).on("accessDialogOpened",Re),De.on("accessDialogClosed",Me),Ne.prev=3,Ne.next=6,De;case 6:if(he=Ne.sent,!(N.isiOS&&ue.publishVideo&&he.getVideoTracks().length&&"ended"===he.getVideoTracks()[0].readyState)){Ne.next=11;break}throw he.getTracks().forEach(Ge=>Ge.stop()),new Error(de);case 11:return Ne.abrupt("return",he);case 14:if(Ne.prev=14,Ne.t0=Ne.catch(3),!N.isiOS){Ne.next=34;break}if(!(xe(Ne.t0)&&N.iOSVersion>=13&&N.iOSVersion<14)){Ne.next=32;break}return Ne.prev=18,ze=H({audio:!0,video:!1},!1),Ne.next=22,ze;case 22:Ne.sent.getTracks().forEach(Ge=>Ge.stop()),Ne.next=29;break;case 26:Ne.prev=26,Ne.t1=Ne.catch(18),x.debug(`${M}: error disposing audio track`,Ne.t1);case 29:throw new Error(Oe);case 32:if(Ne.t0.name!==g.HARDWARE_UNAVAILABLE){Ne.next=34;break}throw new Error(de);case 34:throw Ne.t0;case 35:return Ne.prev=35,setTimeout(()=>{De.off("accessDialogOpened",Re),De.off("accessDialogClosed",Me)}),Ne.finish(35);case 38:case"end":return Ne.stop()}},be,null,[[3,14,35,38],[18,26]])}));return function(){return le.apply(this,arguments)}}(),te.next=35,h(ke,(le,be)=>!(![de,Oe].includes(le.message)||1!==be||F())&&1e3)();case 35:if(Q=te.sent,!F()){te.next=39;break}throw Q.getTracks().forEach(le=>{le.stop()}),m(g.CANCEL,new Error(C));case 39:return k&&Q.addTrack(z.audioSource),W&&Q.addTrack(z.videoSource),te.abrupt("return",Q);case 42:case"end":return te.stop()}},ve)})),me}}},function(l,E,e){"use strict";const r=e(288).isMediaStreamTrack,n=e(36),i=e(2);E.normaliseOptions=(s,a,c)=>{const u=s&&"object"==typeof s?n(s):{};if(!1===u.audioSource&&(u.audioSource=null),!1===u.videoSource&&(u.videoSource=null),void 0!==u.minVideoBitrate&&!("number"==typeof u.minVideoBitrate&&u.minVideoBitrate>0)&&(c.warn(`${a}: Invalid minVideoBitrate in publisher properties. minVideoBitrate must be a positive number`),delete u.minVideoBitrate),void 0!==u.audioBitrate&&!(u.audioBitrate>=6e3&&u.audioBitrate<=51e4)&&(c.warn(`${a}: Invalid audioBitrate in publisher properties. audioBitrate must be a number between 6000 and 510000 bits per second`),delete u.audioBitrate),"Firefox"===i.name&&i.version<49){const d="Firefox 48 and below";r(u.audioSource)&&(u.audioSource=null,c.warn(`${a}: Cannot use custom tracks with ${d}. Setting audioSource to null`)),r(u.videoSource)&&(u.videoSource=null,c.warn(`${a}: Cannot use custom tracks with ${d}. Setting videoSource to null`))}return u}},function(l,E,e){"use strict";const t=e(2),r=t.name,n=t.version,i=e(257);l.exports=function(s){let c=(void 0===s?{}:s).navigator,u=void 0===c?window.navigator:c;return function(f){return f&&!i||!(u.mediaDevices&&u.mediaDevices.getUserMedia)||"Chrome"===r&&n<61}}},function(l,E,e){"use strict";l.exports=function(r){void 0===r&&(r={}),["processPubOptions"].forEach(a=>{if(!r[a])throw new Error(`${a}
1 dependency must be injected into OT.getUserMedia`)});const n=r.logging||e(1)("getUserMedia"),o=r.processPubOptions;return function(c){return void 0===c&&(c={}),o(c,"OT.getUserMedia",()=>!1).getUserMedia().catch(d=>{throw n.error(`OT.getUserMedia failed to getUserMedia: ${d}`),d})}}},function(l,E,e){"use strict";l.exports=function(r,n){const i=(o,s)=>()=>{throw new Error(`Cannot ${o} ${s}, ${r} is destroyed`)};Object.keys(n).forEach(o=>{"function"==typeof n[o]?n[o]=i("call",o):Object.defineProperty(n,o,{get:i("get",o),set:i("set",o)})})}},function(l,E,e){"use strict";l.exports=t=>{if("srcObject"in t)return;const r=window&&window.URL;"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(t,"srcObject",{get(){return this._srcObject},set(n){const i=this;if(this._srcObject=n,this.src&&r.revokeObjectURL(this.src),n)return this.src=r.createObjectURL(n),n.addEventListener("addtrack",()=>{i.src&&r.revokeObjectURL(i.src),i.src=r.createObjectURL(n)}),n.addEventListener("removetrack",()=>{i.src&&r.revokeObjectURL(i.src),i.src=r.createObjectURL(n)}),this._srcObject;this.src=""}})}},function(l,E,e){"use strict";l.exports=i=>(i=>!(!i||"function"!=typeof i.getBoundingClientRect))(i)&&(i=>{const o=i.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight,a=window.innerWidth||document.documentElement.clientWidth;return o.top<=s&&o.top+o.height>=0&&o.left<=a&&o.left+o.width>=0})(i)&&(i=>{const o=s=>!(!s.style||"hidden"!==s.style.visibility)||!!s.parentNode&&o(s.parentNode);return null!==i.offsetParent&&!o(i)})(i)},function(l,E,e){"use strict";const t=e(104),r=e(5),n={0:"rotate(0deg)",270:"rotate(90deg)",90:"rotate(-90deg)",180:"rotate(180deg)"};l.exports=function(o,s,a){let c=a;t(o,{isRotated:{get(){return this.orientation()&&(270===this.orientation().videoOrientation||90===this.orientation().videoOrientation)}},orientation:{get:()=>c,set(u){c=u;const d=n[u.videoOrientation]||n.ROTATED_NORMAL;switch(r.env.name){case"Chrome":case"Safari":s().style.webkitTransform=d;break;default:s().style.transform=d}o.trigger("orientationChanged",c)}},audioChannelType:{get(){return"mozAudioChannelType"in this.domElement?this.domElement.mozAudioChannelType:"unknown"},set(u){"mozAudioChannelType"in this.domElement&&(this.domElement.mozAudioChannelType=u)}}})}},function(l,E,e){"use strict";l.exports=function(){return function(i,o,s){const a=[];function c(h){setTimeout(()=>{if(a.length)if(function r(n){return n.getTracks().every(i=>"ended"===i.readyState)}(i))d(),"function"==typeof o&&o();else{const g=h.target;u(g),"function"==typeof s&&s(g)}},100)}function u(h){h.removeEventListener&&h.removeEventListener("ended",c),h.onended===c&&(h.onended=null);const g=a.indexOf(h);g>=0&&a.splice(g,1)}function d(){a.slice().forEach(u)}function f(){i.getTracks().forEach(h=>{a.push(h),h.onended=c,h.addEventListener&&h.addEventListener("ended",c)})}return f(),{stop:d,refresh:()=>{d(),f()}}}}},function(l,E,e){var t=e(63),r=e(99),n=e(34);l.exports=function i(o,s){var a={};return s=n(s,3),r(o,function(c,u,d){t(a,u,s(c,u,d))}),a}},function(l,E,e){"use strict";l.exports=function(r,n){const i=setTimeout(()=>{r((o,s)=>{if(!o)for(let a=0;a<s.length;a+=1){const c=s[a];-1!==c.id.indexOf("_send")&&"ssrc"===c.type&&("audio"===c.kind||"audio"===c.mediaType)&&0===parseInt(c.bytesSent,10)&&n()}})},3e3);return function(){clearTimeout(i)}}},function(l,E,e){"use strict";l.exports=function(n,i,o){void 0===o&&(o=!1);let s=null,a=0,c=null,u=o;const d=p=>"inbound-rtp"===p.type&&"audio"===(p.kind||p.mediaType),f=p=>p.id===c&&"track"===p.type&&"audio"===(p.kind||p.mediaType),m=setInterval(()=>{n((p,y)=>{if(p)return;c=(y.find(d)||{}).trackId;const T=y.find(f);if(T){const b=T.audioLevel,O=T.totalSamplesReceived;if(void 0===b)return;((p,y)=>p===s&&y===a)(b,O)?(clearInterval(m),i("audioLevelStuck")):((p,y)=>!u&&0===p&&0===s&&y>a)(b,O)&&(clearInterval(m),i("audioLevelStuckAt0")),s=b,a=O}})},500);return o||setTimeout(()=>{u=!0},3e3),{stop:()=>{clearInterval(m)}}}},function(l,E,e){"use strict";(function(t){const n=new(e(27));l.exports=function(o){void 0===o&&(o={});const s=o.analytics||n,a=o.errors||e(4),c=o.ExceptionCodes||e(8),u=o.otError||e(11)(),d=o.sessionObjects||e(20),f=o.uuid||e(19);return function(g){void 0===g&&(g=()=>{});const v=f();function m(p){p?g(u(a.REPORT_ISSUE_FAILED,new Error("Error calling OT.reportIssue(). Check the client's network connection."),c.REPORT_ISSUE_ERROR)):g(null,v)}0===d.sessions.length()?s.logEvent({action:"ReportIssue",variation:"Event",payload:{reportIssueId:v}},null,m):t.all(d.sessions.map(p=>p.reportIssue({id:v}))).then(()=>m(),p=>m(p))}}}).call(this,e(0))},function(l,E,e){"use strict";l.exports=t=>{let r=t.window,n=!1;try{const i=Object.defineProperty({},"passive",{get(){n=!0}});r.addEventListener("testPassive",null,i),r.removeEventListener("testPassive",null,i)}catch(i){}return n}},function(l,E,e){"use strict";const t=/^[0-9]+(\.[0-9]+)*$/;
1l.exports=function(n,i){if(!t.test(n)||!t.test(i))throw new Error("could not recognize version");const o=String(n).split(".").map(Number),s=String(i).split(".").map(Number);if(o.length!==s.length)throw new Error("versions must be same length");const a=o.length;for(let c=0;c<a;c+=1)if(o[c]!==s[c])return o[c]>s[c];if(n!==i)throw new Error("versions should be equal");return!1}},function(l,E,e){"use strict";Object.defineProperty(E,"__esModule",{value:!0});var t=function(){function c(u,d){for(var f=0;f<d.length;f++){var h=d[f];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(u,h.key,h)}}return function(u,d,f){return d&&c(u.prototype,d),f&&c(u,f),u}}(),n=function i(c){return c&&c.__esModule?c:{default:c}}(e(298)),s=function(){},a=function(){function c(){(function o(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")})(this,c),this.internalIsCanceled=!1,this.listeners=[]}return t(c,[{key:"isCanceled",value:function(){return this.internalIsCanceled}},{key:"cancel",value:function(){this.internalIsCanceled||(this.internalIsCanceled=!0,this.listeners.forEach(function(d){return d()}),this.listeners=null)}},{key:"throwIfCanceled",value:function(){if(this.internalIsCanceled)throw new n.default("Operation has been canceled.")}},{key:"onCancel",value:function(d){var f=this;return this.internalIsCanceled?s:(this.listeners.push(d),function(){if(f.listeners){var h=f.listeners.indexOf(d);-1!==h&&f.listeners.splice(h,1)}})}},{key:"fork",value:function(){if(this.internalIsCanceled)return c.CANCELED;var d=new c;return this.onCancel(function(){return d.cancel()}),d}}]),c}();E.default=a,a.CANCELED=new a,a.CANCELED.internalIsCanceled=!0},function(l,E,e){"use strict";(function(t){const r=e(62),n=e(299).default,i=e(153);e(107)(),l.exports=function s(a,c){const u=r(a),d=new t(f=>{const h=()=>{(a.videoWidth()>2||a.videoHeight()>2)&&f(!0)};u.on("videoDimensionsChanged",h),h()});return n(i(d,c,()=>!1),()=>u.removeAll())}}).call(this,e(0))},function(l,E,e){"use strict";(function(t){const r=e(62),n=e(299).default,i=e(153);e(107)(),l.exports=function s(a,c){void 0===c&&(c=5e3);const u=r(a),d=new t(f=>{u.on("timeupdate",f),u.on("loadedmetadata",f)});return n(i(d,c,()=>!1),()=>u.removeAll())}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(1)("WidgetView:fixMini");l.exports=function(a){const c=a.clientWidth,u=a.clientHeight;a.classList.remove("OT_micro"),a.classList.remove("OT_mini"),(c<64||u<64)&&(a.classList.add("OT_micro"),t.debug("OT_micro class added",{clientWidth:c,clientHeight:u,microWidth:64,microHeight:64})),(c<128||u<128)&&(a.classList.add("OT_mini"),t.debug("OT_mini class added",{clientWidth:c,clientHeight:u,miniWidth:128,miniHeight:128}))}},function(l,E,e){"use strict";const t=e(19);l.exports=function(n,i){let o,s;if(n&&n.nodeName?(o=n,(!o.getAttribute("id")||0===o.getAttribute("id").length)&&o.setAttribute("id",`OT_${t()}`),s=o.getAttribute("id")):n&&(o=document.getElementById(n),o&&(s=n)),s||(s=`OT_${t().replace(/-/g,"_")}`),!o)return o=document.createElement("div"),o.id=s,o.setAttribute("id",s),o.style.backgroundColor="#000000",document.body.appendChild(o),o;const a=document.createElement("div");switch(a.id=`OT_${t()}`,i){case"append":return o.appendChild(a),a;case"before":return o.parentNode.insertBefore(a,o),a;case"after":return o.parentNode.insertBefore(a,o.nextSibling),a;default:for(;o.firstChild;)o.removeChild(o.firstChild);return o}}},function(l,E,e){"use strict";l.exports=function(r,n){return void 0===n&&(n="px"),String(parseFloat(r,10))===String(r).trim()?`${String(r).trim()}${n}`:r}},function(l,E,e){"use strict";(function(t){const r=e(74);l.exports=function(i,o){let s=void 0===o?{}:o,a=s.frequency,c=void 0===a?60:a,u=s.timeout,d=void 0===u?2e3:u;return new t((f,h)=>{let g;const v=new r(()=>{(function m(){try{return i()}catch(p){return!1}})()&&(clearTimeout(g),v.stop(),f())},c);g=setTimeout(()=>{v.stop(),h(new Error("TIMEOUT"))},d),v.start()})}}).call(this,e(0))},function(l,E,e){"use strict";const t=e(11)(),r=e(4),n=e(8);l.exports=i=>"404"===String(i.code)?t(r.STREAM_NOT_FOUND,new Error("stream not found"),n.UNABLE_TO_SUBSCRIBE):"409"===String(i.code)&&"streamLimitExceeded"===i.message?t(r.STREAM_LIMIT_EXCEEDED,new Error("The limit for concurrent streams in the session has been reached"),n.STREAM_LIMIT_EXCEEDED):t(r.UNABLE_TO_SUBSCRIBE,new Error(`subscriberCreate failed with unexpected code ${i.code}: ${i.message}`),n.UNEXPECTED_SERVER_RESPONSE)},function(l,E,e){"use strict";const t=e(26),r=e(48),n=e(103),i=e(22)();l.exports=o=>{let s=o.subscriber,a=o.audioLevelSampler,c=0,u=0;const d=new n(()=>{const f=s.listenerCount(t.AUDIO_LEVEL_UPDATED);r()-u>1e4&&0===f?d.stop():(c=a.sample(),f>0&&s.dispatchEvent(new i.AudioLevelUpdatedEvent(c)))});return Object.defineProperty(s,"loudness",{get:()=>(d.start(),u=r(),c),set(){throw new TypeError("Cannot set readonly property loudness")},configurable:!0}),s.listenerCount(t.AUDIO_LEVEL_UPDATED)&&d.start(),s.on("audioLevelUpdated:added",()=>{d.start()}),s.once(t.SUBSCRIBER_DESTROYED,()=>{d.stop()}),{destroy(){a.destroy(),d.stop()}}}},function(l,E,e){"use strict";const t=e(253),r=e(145),n=e(655),i=e(301),o=e(302),s=e(158)(),a=e(656),c=e(1)("Subscriber");l.exports=function(u,d){if(void 0===d&&(d={}),u){if(n({hasGetSynchronizationSupport:d.hasGetSynchronizationSupport}))return new t(u.getSynchronizationSources);if(i())return new t(u.getStats);if(o()){let h;try{h=d.audioContext||s()}catch(g){c.warn("Failed to get AudioContext()",g)}if(a(h))return new r(h)}}}},function(l,E,e){"use strict";const t=e(2),r=()=>window.RTCRtpReceiver&&"getSynchronizationSources"in window.RTCRtpReceiver.prototype;l.exports=function(n){return void 0===n&&(n={}),(n.hasGetSynchronizationSupport||r)()&&!t.isFirefox}},function(l,E,e){"use strict";l.exports=t=>(void 0!==typeof window?window:global).AudioContext&&t instanceof(void 0!==typeof window?window:global).AudioContext||(void 0!==typeof window?window:global).webkitAudioContext&&t instanceof(void 0!==typeof window?window:global).webkitAudioContext},function(l,E,e){"use strict";const t=e(35),r=e(5);l.exports=function(i){let o=!1,s=!1;const a=function(u){const d=["auto","on"].indexOf(this.getDisplayMode())>-1;r.removeClass(u,"OT_video-disabled OT_video-disabled-warning OT_active"),d&&(o?r.addClass(u,"OT_video-disabled"):s&&r.addClass(u,"OT_video-disabled-warning"),r.addClass(u,"OT_active"))}.bind(this);this.disableVideo=function(u){o=u,!0===u&&(s=!1),a(this.domElement)},this.setWarning=function(u){s=u,a(this.domElement)},t(this,{mode:i.mode||"auto",nodeName:"div",htmlAttributes:{className:"OT_video-disabled-indicator"}});const c=this.setDisplayMode.bind(this);this.setDisplayMode=function(u){c(u),a(this.domElement)}}},function(l,E,e){"use strict";const t=e(35),r=e(5);l.exports=function(i){let o=!1;const s=c=>{const u=["auto","on"].indexOf(this.getDisplayMode())>-1;r.removeClass(c,["OT_audio-blocked","OT_active"].join(" ")),u&&(o&&r.addClass(c,"OT_audio-blocked"),r.addClass(c,"OT_active"))};this.setAudioBlocked=c=>{o=c,s(this.domElement)},t(this,{mode:i.mode||"auto",nodeName:"div",htmlAttributes:{className:"OT_audio-blocked-indicator"}});const a=this.setDisplayMode.bind(this);this.setDisplayMode=c=>{a(c),s(this.domElement)}}},function(l,E,e){"use strict";const t=e(35),r=e(5);l.exports=function(i){let o=!1;const s=c=>{const u=["auto","on"].indexOf(this.getDisplayMode())>-1;r.removeClass(c,["OT_active"].join(" ")),u&&o&&r.addClass(c,"OT_active")};this.setVideoUnsupported=c=>{o=c,s(this.domElement)},t(this,{mode:i.mode||"auto",nodeName:"div",htmlAttributes:{className:"OT_video-unsupported"},htmlContent:'<div class="OT_video-unsupported-bar"></div><div class="OT_video-unsupported-img"></div><span class="OT_video-unsupported-text">Video format not supported</span>'});const a=this.setDisplayMode.bind(this);this.setDisplayMode=c=>{a(c),s(this.domElement)}}},function(l,E,e){"use strict";const t=e(47),r=e(7),n=e(61),i=e(75),o=e(157);l.exports=function(c,u){void 0===u&&(u=5e3);let d,f=!1;const h={},v=()=>{f||c((m,p)=>
1{if(!f){if(!m){const y=function(p){return void 0===p&&(p=[]),n(p,y=>i.isVideoInboundRtpStat(y))}(p);y?r(h,t(y,["timestamp","framesDecoded"])):h.timestamp||r(h,{timestamp:Date.now(),framesDecoded:0})}d=setTimeout(v,u)}})};return v(),{getFrameRateFromStat:m=>o({currentStatFrames:m.framesDecoded,currentTimestamp:m.timestamp,prevStatFrames:h.framesDecoded,prevTimestamp:h.timestamp}),destroy(){f=!0,d&&(clearTimeout(d),d=null)}}}},function(l,E,e){"use strict";l.exports=t=>{let n=t.onWarning,i=t.onTimeout,o=t.warningMs,s=t.timeoutMs;const a=[],c=()=>{a.forEach(u=>clearTimeout(u))};t.connectivityState.observe({onEnterConnecting(){a.push(setTimeout(n,o),setTimeout(i,s))},onEnterConnected:c,onEnterDisconnected:c})}},function(l,E,e){"use strict";const t=e(305);l.exports=r=>new t({init:"disconnected",transitions:[{name:"beginConnect",from:"disconnected",to:"connecting"},{name:"connect",from:"connecting",to:"connected"},{name:"fail",from:["connecting","connected"],to:"disconnected"},{name:"cancel",from:["connecting","connected"],to:"disconnected"},{name:"disconnect",from:["connecting","connected"],to:"disconnected"}],methods:{onInvalidTransition:r.onInvalidTransition}})},function(l,E,e){"use strict";const t=e(74);l.exports=r=>{let n=r.connectivityState;const o=new t(r.logAttempt,.2,6);n.observe({onEnterConnecting(){o.start()},onEnterDisconnected(){o.stop()},onEnterConnected(){o.stop()}})}},function(l,E,e){var t=e(665),r=e(259),n=t(function(i,o,s){return i+(s?" ":"")+r(o)});l.exports=n},function(l,E,e){var t=e(666),r=e(667),n=e(670),o=RegExp("['\u2019]","g");l.exports=function s(a){return function(c){return t(n(r(c).replace(o,"")),a,"")}}},function(l,E){l.exports=function e(t,r,n,i){var o=-1,s=null==t?0:t.length;for(i&&s&&(n=t[++o]);++o<s;)n=r(n,t[o],o,t);return n}},function(l,E,e){var t=e(668),r=e(58),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
17f]/g,u=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");l.exports=function d(f){return(f=r(f))&&f.replace(n,t).replace(u,"")}},function(l,E,e){var n=e(669)({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"});l.exports=n},function(l,E){l.exports=function e(t){return function(r){return null==t?void 0:t[r]}}},function(l,E,e){var t=e(671),r=e(672),n=e(58),i=e(673);l.exports=function o(s,a,c){return s=n(s),void 0===(a=c?void 0:a)?r(s)?i(s):t(s):s.match(a)||[]}},function(l,E){var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;l.exports=function t(r){return r.match(e)||[]}},function(l,E){var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;l.exports=function t(r){return e.test(r)}},function(l,E){var e="\\ud800-\\udfff",o="\\u2700-\\u27bf",s="a-z\\xdf-\\xf6\\xf8-\\xff",f="A-Z\\xc0-\\xd6\\xd8-\\xde",g="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",m="["+g+"]",y="\\d+",S="["+o+"]",T="["+s+"]",b="[^"+e+g+y+o+s+f+"]",I="(?:\\ud83c[\\udde6-\\uddff]){2}",A="[\\ud800-\\udbff][\\udc00-\\udfff]",P="["+f+"]",D="(?:"+T+"|"+b+")",L="(?:"+P+"|"+b+")",N="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",U="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",B="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",V="[\\ufe0e\\ufe0f]?",F=V+B+"(?:\\u200d(?:"+["[^"+e+"]",I,A].join("|")+")"+V+B+")*",z="(?:"+[S,I,A].join("|")+")"+F,w=RegExp([P+"?"+T+"+"+N+"(?="+[m,P,"$"].join("|")+")",L+"+"+U+"(?="+[m,P+D,"$"].join("|")+")",P+"?"+D+"+"+N,P+"+"+U,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",y,z].join("|"),"g");l.exports=function k(W){return W.match(w)||[]}},function(l,E,e){"use strict";l.exports=(t,r)=>{const n=t.getSenders().find(o=>"video"===o.track.kind),i=n.getParameters();
1i.encodings.forEach(o=>{o.active=r}),n.setParameters(i)}},function(l,E,e){"use strict";const t=e(47);l.exports=r=>t(r,["audioDeviceId","audioFallbackEnabled","audioSource","channels","classNames","constraints","disableAudioProcessing","echoCancellation","noiseSuppression","autoGainControl","enableRenegotiation","enableStereo","facingMode","fitMode","frameRate","height","insertDefaultUI","insertMode","audioBitrate","maxResolution","minVideoBitrate","mirror","name","publishAudio","publishVideo","resolution","showControls","style","videoContentHint","videoDeviceId","videoDimensions","videoSource","width"])},function(l,E,e){"use strict";const t=e(26),r=e(48),n=e(103),i=e(22)();l.exports=o=>{let s=o.publisher,a=o.widgetView,c=0,u=0;const d=new n(()=>{const f=s.listenerCount(t.AUDIO_LEVEL_UPDATED);if(r()-u>1e4&&0===f)return void d.stop();const g=a&&a.video();if(g){const v=g.getAudioInputLevel();c=v,f>0&&s.dispatchEvent(new i.AudioLevelUpdatedEvent(v))}});Object.defineProperty(s,"loudness",{get:()=>(d.start(),u=r(),c),set(){throw new TypeError("Cannot set readonly property loudness")}}),s.listenerCount(t.AUDIO_LEVEL_UPDATED)&&d.start(),s.on("audioLevelUpdated:added",()=>{d.start()}),s.once(t.PUBLISHER_DESTROYED,()=>{d.stop()})}},function(l,E,e){"use strict";var t=e(3),r=t(e(12)),n=t(e(13));l.exports=function(o){let s=!1;return function(){var a=(0,n.default)(r.default.mark(function u(){var d,f,h,g=arguments;return r.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!s){m.next=2;break}throw new Error("The previous call to this function has not yet completed.");case 2:for(s=!0,m.prev=3,d=g.length,f=new Array(d),h=0;h<d;h++)f[h]=g[h];return m.next=7,o.call(this,...f);case 7:return m.abrupt("return",m.sent);case 8:return m.prev=8,s=!1,m.finish(8);case 11:case"end":return m.stop()}},u,this,[[3,,8,11]])}));return function c(){return a.apply(this,arguments)}}()}},function(l,E,e){"use strict";const t=e(11)(),r=e(4);l.exports=function(i){const o=document.createElement("canvas");if(!o.captureStream)throw t(r.NOT_SUPPORTED,new Error("Your browser does not support HTMLCanvasElement.captureStream()"));o.width=i.width,o.height=i.height,o.getContext("2d").fillRect(0,0,1,1);const a=o.captureStream().getVideoTracks()[0];return a.isCreatedCanvas=!0,a.enabled=!1,a}},function(l,E,e){"use strict";l.exports=(o,s)=>{if(!o)return null;const c=o.getVideoTracks()[0];return c?((o,s)=>(o=>o.getSettings&&o.getSettings().deviceId)(o)||(o=>{let s;return o.getConstraints&&o.getConstraints().deviceId&&(s=o.getConstraints().deviceId.exact),s})(o)||((o,s)=>{let a;if(s&&s.length){const c=s.find(u=>u.label===o.label);c&&(a=c.deviceId)}return a})(o,s))(c,s):null}},function(l,E,e){"use strict";const t=e(4),r=e(8),n=e(11)();l.exports=i=>[403,404,409].includes(parseInt(i.code,10))?n(t.STREAM_CREATE_FAILED,new Error(`Failed to create stream in server model: ${i.message}`),r.UNABLE_TO_PUBLISH):n(t.UNEXPECTED_SERVER_RESPONSE,new Error(`Unexpected server response: ${i.message}`),r.UNEXPECTED_SERVER_RESPONSE)},function(l,E,e){"use strict";l.exports=r=>null===r||!1===r},function(l,E,e){"use strict";l.exports=t=>{var r;t&&(null==(r=t.videoSource)?void 0:r.canvas)&&(!t||!("videoContentHint"in t))&&(t.videoContentHint="detail")}},function(l,E,e){var t=e(684),r=e(99),n=e(34);l.exports=function i(o,s){return t(o,n(s,3),r)}},function(l,E){l.exports=function e(t,r,n){var i;return n(t,function(o,s,a){if(r(o,s,a))return i=s,!1}),i}},function(l,E,e){"use strict";(function(t){const r=e(50),n=e(73);l.exports=i=>{let u,d,o=i.RTCPeerConnection,a=i.stream,c=i.codecFlags;if(i.env.isLegacyEdge)return!0;const f=()=>{try{u.close()}catch(h){}try{d.close()}catch(h){}u=null,d=null};try{const h={iceServers:[]};n()&&(h.sdpSemantics="plan-b"),u=new o(h),d=new o(h),u.addStream(a)}catch(h){return f(),t.resolve(!1)}return u.createOffer().then(h=>{const g={type:h.type,sdp:h.sdp};return Object.keys(c).forEach(v=>{c[v]||(g.sdp=r.removeVideoCodec(g.sdp,v))}),d.setRemoteDescription(g)}).then(()=>!0).catch(()=>!1).then(h=>(f(),h))}}).call(this,e(0))},function(l,E,e){"use strict";const r=e(4).INVALID_PARAMETER;l.exports=n=>{let i=n.otError;return o=>{if(!o)return;
1const s=(a,c)=>{if(!a)throw i(r,new Error(`iceConfig invalid: ${c}`))};"includeServers"in o&&s(-1!==["all","custom"].indexOf(o.includeServers),".includeServers must be all or custom"),"transportPolicy"in o&&s(-1!==["all","relay"].indexOf(o.transportPolicy),".transportPolicy must be all or relay"),s(Array.isArray(o.customServers),".customServers must be an array"),o.customServers.forEach(a=>{s(a.urls||!("url"in a),"ice servers need .urls, not .url"),s("string"==typeof a.urls||Array.isArray(a.urls),"ice server .urls must be a string or an array"),s(!a.username||"string"==typeof a.username,"ice server .username must be a string if present"),s(!a.credential||"string"==typeof a.credential,"ice server .credential must be a string if present")})}}},function(l,E,e){"use strict";const t=e(8);l.exports=function(n){switch(n){case t.AUTHENTICATION_ERROR:case t.INVALID_SESSION_ID:case t.TERMS_OF_SERVICE_FAILURE:case t.UNEXPECTED_SERVER_RESPONSE:return n;case t.ANVIL_EMPTY_RESPONSE_BODY:case t.ANVIL_CONNECT_FAILED:return t.CONNECT_FAILED;default:return t.UNEXPECTED_SERVER_RESPONSE}}},function(l,E,e){"use strict";const t=e(8),r=e(4);l.exports={NOT_CONNECTED:{code:r.NOT_CONNECTED,message:"Cannot use forceMute functionality. You are not connected to the session.",exceptionCode:t.NOT_CONNECTED},PERMISSION_DENIED:{code:r.PERMISSION_DENIED,message:"This token does not allow forceMute usage. The role must be at least `moderator` to enable this functionality",exceptionCode:t.UNABLE_TO_FORCE_MUTE},INVALID_PARAMETER:{code:r.INVALID_PARAMETER,message:"Invalid Parameter. Check that you have passed valid parameter values into the method call.",exceptionCode:t.INVALID_PARAMETER},NOT_FOUND:{code:r.NOT_FOUND,message:"The stream does not exist."},UNEXPECTED_SERVER_RESPONSE:{code:r.UNEXPECTED_SERVER_RESPONSE,message:"An unexpected error occurred.",exceptionCode:t.UNEXPECTED_SERVER_RESPONSE}}},function(l,E,e){"use strict";(function(t){var r=e(3);E.__esModule=!0,E.default=function d(f){void 0===f&&(f={});const h=f.convertRumorError||e(310),g=f.Dispatcher||e(314),v=f.ExceptionCodes||e(8),m=f.hasIceRestartsCapability||e(311),p=f.hasRenegotiationCapability||e(706),y=f.logging||e(1)("RaptorSocket"),S=f.Message||e(315),T=f.OTHelpers||e(5),b=f.RumorSocket||(0,u.default)(),O=f.Signal||e(316),C=f.SignalError||e(711),R=function I(A,P,x,D,L,N,U){var B=this;let V,H,j,M,F,z,w,k;void 0===U&&(U=[]);const Z=L||new g,ie=T.statable(this,["disconnected","connecting","connected","error","disconnecting"],"disconnected"),_=function(K){(!K.action||!K.variation)&&y.debug("Expected action and variation"),N.logEvent((0,o.default)({sessionId:H,partnerId:V,p2p:z,messagingServer:w,connectionId:A},K))},se=function(){for(var K=arguments.length,re=new Array(K),de=0;de<K;de++)re[de]=arguments[de];const Oe=re[0];ie(Oe?"error":"connected"),F(...re)},pe=Q=>{let K="clientDisconnected";!this.is("disconnecting")&&k&&(K="networkDisconnected"),Q&&4001===Q.code&&(K="networkTimedout"),ie("disconnected"),Z.onClose(K)},ue=Q=>{k=!0,y.error(Q)},me=()=>{Z.onReconnecting()},ve=()=>{_({action:"Reconnect",variation:"Success",retries:this._rumor.reconnectRetriesCount(),messageQueueSize:this._rumor.messageQueueSize(),socketId:this.socketId}),Z.onReconnected()},Re=()=>{_({action:"Reconnect",variation:"Attempt",retries:this._rumor.reconnectRetriesCount(),messageQueueSize:this._rumor.messageQueueSize(),socketId:this.socketId})},Me=Q=>{"connectionLimitExceeded"===Q.message&&(Q.code=v.CONNECTION_LIMIT_EXCEEDED),Q.reason="ConnectToSession";const K=h(Q);_({action:"Reconnect",variation:"Failure",failureReason:Q.reason,failureCode:K.code,failureMessage:K.message,messageQueueSize:this._rumor.messageQueueSize(),socketId:this.socketId})};Object.defineProperty(this,"socketId",{get(){return this._rumor.socketID}}),this.connect=function(K,re,de,Oe){if(!this.is("disconnected","error"))return void y.warn("Cannot connect the Raptor Socket as it is currently connected. You should disconnect first.");ie("connecting"),V=re.partnerId,H=re.sessionId,z=re.p2pEnabled,w=re.messagingServer,j=K,F=Oe,M={apiKey:V,sessionId:H};const xe=`/v2/partner/${V}/session/${H}`;this._rumor=new I.RumorSocket({messagingURL:x,notifyDisconnectAddress:D,connectionId:A,enableReconnection:re.reconnection}),this._rumor.on("close",pe),this._rumor.on("error",ue),this._rumor.on("reconnecting",me),this._rumor.on("reconnectAttempt",Re),this._rumor.on("reconnectFailure",Me),this._rumor.on("reconnected",ve),this._rumor.on("message",Z.dispatch.bind(Z));const ke=X=>{se({reason:"WebSocketConnection",code:X.code,message:X.message})};this._rumor.once("error",ke),this._rumor.once("open",()=>{this._rumor.removeListener("error",ke),y.debug(`connected. Subscribing to ${xe} on ${x}`),this._rumor.subscribe([xe]);const X=U;(I.hasIceRestartsCapability()||I.hasRenegotiationCapability())&&re.renegotiation&&X.push("renegotiation");const le=S.connections.create({apiKey:V,sessionId:H,connectionId:this._rumor.id,connectionEventsSuppressed:de.connectionEventsSuppressed,capabilities:X}),be=new t(De=>{const he=Ze=>{Ze.id===this._rumor.id&&(De(Ze),L.off("connection#created",he))};L.on("connection#created",he)});this.publish(le,{"X-TB-TOKEN-AUTH":j},!0,(De,he)=>{if(De)return"connectionLimitExceeded"===De.message&&(De.code=v.CONNECTION_LIMIT_EXCEEDED),void se({reason:"ConnectToSession",code:De.code,message:De.message,socketId:this.socketId});const Ze=he&&he.data?JSON.parse(he.data):null;Ze&&(!Ze.connection||0===Ze.connection.length)&&(Ze.connection=[],Array.isArray(Ze.stream)&&Ze.stream.forEach(tt=>Ze.connection.push(tt.connection)));const ze=(tt,He)=>{tt?se({reason:"GetSessionState",code:tt.code,message:tt.message,socketId:this.socketId}):se(void 0,He)};be.then(tt=>{Ze.connection.some(Ne=>Ne.id===tt.id)||Ze.connection.unshift(tt);const He=(0,a.default)();Z.registerCallback(He,ze),Z.emit("session#read",Ze,He)})})})},this.disconnect=function(){this.is("disconnected")||(ie("disconnecting"),this._rumor.disconnect())},this.publish=function(Q,K,re,de){const Oe=(0,s.default)(de=de||function(){}),xe=(0,a.default)();if(y.debug(`Publish (ID:${xe}) ${Q}`),this._rumor.readyState!==b.OPEN||this._rumor.reconnecting&&!re){const ke=new Error("Not connected.");return ke.code=500,Oe(ke),void y.error("cannot publish until the socket is connected.")}return Z.registerCallback(xe,Oe),this._rumor.publish([D],Q,(0,o.default)({},K,{"Content-Type":"application/x-raptor+v2","TRANSACTION-ID":xe,"X-TB-FROM-ADDRESS":this._rumor.id}
1),re,function(ke){ke&&Oe(...arguments)}),xe},this.send=function(Q,K,re,de){void 0===re&&(re=!0),void 0===de&&(de=()=>{}),B.publish((0,c.default)(Q),K,re,de)},this.streamCreate=function(Q,K,re,de,Oe,xe,ke,X){const le=S.streams.create({apiKey:V,sessionId:H,streamId:K,name:Q,audioFallbackEnabled:re,channels:de,minBitrate:Oe,maxBitrate:xe,sourceStreamId:ke});this.publish(le,{},!0,(be,De)=>{X(be,K,De)})},this.streamDestroy=function(Q,K){this.publish(S.streams.destroy(V,H,Q,K),{},!0)},this.streamChannelUpdate=function(Q,K,re){this.publish(S.streamChannels.update(V,H,Q,K,re),{},!0)},this.subscriberCreate=function(Q,K,re,de,Oe){this.publish(S.subscribers.create({apiKey:V,sessionId:H,streamId:Q,subscriberId:K,connectionId:this._rumor.id,channelsToSubscribeTo:re,sourceStreamId:de}),{},!0,Oe)},this.subscriberDestroy=function(Q,K){this.publish(S.subscribers.destroy(V,H,Q,K),{},!0)},this.subscriberUpdate=function(Q,K,re){this.publish(S.subscribers.update(V,H,Q,K,re),{},!0)},this.subscriberChannelUpdate=function(Q,K,re,de){this.publish(S.subscriberChannels.update(V,H,Q,K,re,de),{},!0)},this.forceDisconnect=function(Q,K){this.publish(S.connections.destroy({apiKey:V,sessionId:H,connectionId:Q}),{},!0,K)},this.forceUnpublish=function(Q,K){this.publish(S.streams.destroy(V,H,Q),{},!0,K)},this.forceMuteStream=function(Q,K){this.publish(S.forceMute.update((0,n.default)({},M,{streamId:Q,active:!0})),{},!0,K)},this.forceMuteAll=function(Q,K,re){this.publish(S.forceMute.update((0,n.default)({},M,{excludedStreamIds:Q,active:K})),{},!0,re)},this.signal=function(Q,K,re){const de=new O(H,this._rumor.id,Q||{});de.valid?this.publish(de.toRaptorMessage(),{},de.retryAfterReconnect,Oe=>{let xe,ke,X;const te=[400,403,404,413,500];if(Oe){const le=parseInt(Oe.code,10);te.includes(le)?(ke=le,X=Oe.message):(ke=v.UNEXPECTED_SERVER_RESPONSE,X="Unexpected server response. Try this operation again later."),xe=new C(ke,X)}else re("signal","send",{type:de.data?typeof de.data:null});K&&(0,i.default)(K)&&K(xe,de.toHash())}):K&&(0,i.default)(K)&&K(new C(de.error.code,de.error.reason),de.toHash())},this.id=function(){return this._rumor&&this._rumor.id}};return R.hasIceRestartsCapability=m,R.hasRenegotiationCapability=p,R.RumorSocket=b,R};var n=r(e(25)),i=r(e(15)),o=r(e(7)),s=r(e(49)),a=r(e(19)),c=r(e(312)),u=r(e(690))}).call(this,e(0))},function(l,E,e){"use strict";var t=e(3);E.__esModule=!0,E.default=function c(u){let f=(void 0===u?{}:u).WebSocket,h=void 0===f?a.default:f;const g=(0,n.default)(),v=(0,o.default)({EventEmitter:r.default,WebSocket:h,logging:i.default,allocateId:g});return(0,s.default)({EventEmitter:r.default,ReconnectableSocket:v,logging:i.default,allocateId:g})};var r=t(e(41)),n=t(e(691)),i=t(e(1)),o=t(e(692)),s=t(e(697)),a=t(e(702))},function(l,E,e){"use strict";E.__esModule=!0,E.default=function t(){let r=0;return()=>(r+=1,r)}},function(l,E,e){"use strict";var t=e(3);E.__esModule=!0,E.default=void 0;var r=t(e(12)),n=t(e(13)),i=t(e(156)),o=t(e(45)),s=t(e(59)),a=t(e(18)),c=t(e(313)),u=e(76),d=t(e(693)),f=t(e(62)),h=t(e(694)),g=t(e(696));const v=S=>function(){S(...arguments)},m=S=>1e3===S||S>=3e3&&S<=4999,p=u.codes.CLOSE_TIMEOUT;E.default=S=>{var T,b;let C=S.WebSocket,R=S.logging,I=S.allocateId,A=S.BUFFER_DRAIN_INTERVAL,P=void 0===A?100:A,x=S.BUFFER_DRAIN_MAX_RETRIES,D=void 0===x?10:x;return b=T=function(L){function N(B){var V;const H="string"==typeof B?{url:B}:B,j=H.url,M=H.connectTimeout,F=void 0===M?15e3:M,z=H.pingThreshold,w=void 0===z?3e3:z,k=H.pingWarningDelay,W=void 0===k?100:k,Z=H.disconnectThreshold,ie=void 0===Z?5900:Z,_=H.reconnectMaxDuration,se=void 0===_?6e4:_;
1if(!j)throw new Error("Must provide url");V=L.call(this)||this,(0,a.default)((0,i.default)(V),"_url",void 0),(0,a.default)((0,i.default)(V),"_id",I()),(0,a.default)((0,i.default)(V),"_logger",R(`ReconnectableSocket:${V._id}`)),(0,a.default)((0,i.default)(V),"_webSocket",void 0),(0,a.default)((0,i.default)(V),"_connectTimer",void 0),(0,a.default)((0,i.default)(V),"_pingTimer",void 0),(0,a.default)((0,i.default)(V),"_pingWarningTimer",void 0),(0,a.default)((0,i.default)(V),"_disconnectTimer",void 0),(0,a.default)((0,i.default)(V),"_queuedMessages",[]),(0,a.default)((0,i.default)(V),"_draining",!1),V.readyStateMachine=(0,h.default)({reconnectMaxDuration:se,CLOSED:N.CLOSED,CLOSING:N.CLOSING}),V._url=j,(0,c.default)({logger:V._logger,obj:(0,i.default)(V),eventNames:["error","open","message","needsPing","reconnecting","reconnectAttempt","reconnectFailure","reconnected","close"]}),V.readyStateMachine.observe("onEnterOpen",ue=>{let me=ue.from;V._resetPingTimers(),V._resetDisconnectTimer(),V._connectTimer.clear(),"reconnecting"===me?(V._queuedMessages.forEach(ve=>V.send(ve,!0)),V._queuedMessages=[],V.emit("reconnected")):V.emit("open")}),V.readyStateMachine.observe("onEnterClosed",(ue,me)=>{V.emit("close",me)}),V.readyStateMachine.observe("onEnterClosing",v(function(){var ue=(0,n.default)(r.default.mark(function me(ve,Re){var Me,Q,K;return r.default.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return Me=ve.from,Q=Re.code,K=Re.reason,V._clearTimers(),de.next=5,V._clearSocket({drain:"open"===Me,code:Q,reason:K});case 5:"reconnecting"===Me&&V.emit("reconnectFailure",{code:Q,reason:K}),setTimeout(()=>{V.readyStateMachine.closed({code:Q,reason:K})});case 7:case"end":return de.stop()}},me)}));return function(me,ve){return ue.apply(this,arguments)}}())),V.readyStateMachine.observe("onEnterReconnecting",()=>{V.emit("reconnecting")}),V.readyStateMachine.observe("onDisconnect",v(function(){var ue=(0,n.default)(r.default.mark(function me(ve,Re){var Me,K,re;return r.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(Me=ve.from,K=Re.code,re=Re.reason,"reconnecting"!==ve.to){Oe.next=10;break}if(!V._draining){Oe.next=5;break}return Oe.abrupt("return");case 5:return V._clearTimers(),V.emit("reconnectAttempt"),Oe.next=9,V._clearSocket({drain:"open"===Me,code:K,reason:re});case 9:V._createSocket();case 10:case"end":return Oe.stop()}},me)}));return function(me,ve){return ue.apply(this,arguments)}}()));const pe=(ue,me)=>new d.default({name:ue,duration:me,logger:V._logger});return V._connectTimer=pe("connect",F),V._pingTimer=pe("ping",w),V._pingWarningTimer=pe("pingWarning",W),V._disconnectTimer=pe("disconnect",ie),V._createSocket(),V}(0,s.default)(N,L),(0,o.default)(N,[{key:"url",get:function(){return"function"==typeof this._url?this._url():this._url}},{key:"reconnecting",get:function(){return"reconnecting"===this.readyStateMachine.state}},{key:"binaryType",get:function(){return this._webSocket.binaryType}},{key:"bufferedAmount",get:function(){return this._webSocket.bufferedAmount}},{key:"protocol",get:function(){return this._webSocket.protocol}},{key:"extensions",get:function(){return this._webSocket.extensions}},{key:"readyState",get:function(){return{reconnecting:N.OPEN,open:N.OPEN,closing:N.CLOSING,closed:N.CLOSED,connecting:N.CONNECTING}[this.readyStateMachine.state]}}]);var U=N.prototype;return U._createSocket=function(){const V=new C(this.url);V.binaryType="arraybuffer";const H=(0,f.default)(V);H.on("open",()=>{this.readyStateMachine.open()}),H.on("close",j=>{this.readyStateMachine.disconnect({code:j.code,reason:j.reason})}),H.on("error",j=>{this.emit("error",j)}),H.on("message",j=>{this.readyState!==N.CLOSING&&this._resetDisconnectTimer(),this.emit("message",j)}),this._webSocket=V,this._webSocketEvents=H,this._connectTimer.reset(()=>{const j={code:p,reason:"Timeout while opening connection"},M=new Error(j.reason);M.code=p,this.emit("error",M),this.readyStateMachine.disconnect(j)})},U._clearSocket=function(){var B=(0,n.default)(r.default.mark(function H(j){var M,F,z,w,k;return r.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(z=void 0!==(F=(M=void 0===j?{}:j).drain)&&F,w=M.code,k=M.reason,this._draining=!0,this._webSocketEvents&&this._webSocketEvents.removeAll(),this._webSocket.readyState===N.CLOSED){Z.next=8;break}if(!z){Z.next=7;break}return Z.next=7,(0,g.default)(this._webSocket,{BUFFER_DRAIN_INTERVAL:P,BUFFER_DRAIN_MAX_RETRIES:D});case 7:try{!m(w)||void 0===w&&void 0===k?this._webSocket.close():this._webSocket.close(w,k)}catch(ie){R.error("Could not close websocket",ie)}case 8:this._draining=!1;case 9:case"end":return Z.stop()}},H,this)}));return function V(H){return B.apply(this,arguments)}}(),U.send=function(V,H){void 0===H&&(H=!0),this.readyState===N.OPEN&&this._resetPingTimers();const j=()=>{try{return this._webSocket.send(V),"sent"}
1catch(M){if(this._webSocket.readyState===C.OPEN)return this._logger.debug("webSocket.send threw exception even though it was open:",M),"dropped";throw M}};if("reconnecting"===this.readyStateMachine.state){if(this._webSocket.readyState===C.OPEN)try{j()}catch(M){}return H?(this._queuedMessages.push(V),"queued"):(this._logger.debug("Dropping message during reconnection since retryAfterReconnect is false:",V),"dropped")}return j()},U.close=function(V,H){if(this.readyState===N.CLOSING)throw new Error("Can not call close on a closing ReconnectableSocket");if(this.readyState===N.CLOSED)throw new Error("Can not call close on an already closed ReconnectableSocket");this.readyStateMachine.close({code:V,reason:H})},U._resetPingTimers=function(){this._pingWarningTimer.clear(),this._pingTimer.reset(()=>{this._pingWarningTimer.reset(()=>{this._logger.warn("Did not send message after needsPing event. Other side may disconnect.")}),this.emit("needsPing")})},U._resetDisconnectTimer=function(){this._disconnectTimer.reset(()=>this.readyStateMachine.disconnect({code:p,reason:"No activity"}))},U._clearTimers=function(){[this._disconnectTimer,this._connectTimer,this._pingTimer,this._pingWarningTimer].forEach(V=>V.clear())},N}(S.EventEmitter),(0,a.default)(T,"CONNECTING",C.CONNECTING),(0,a.default)(T,"OPEN",C.OPEN),(0,a.default)(T,"CLOSING",C.CLOSING),(0,a.default)(T,"CLOSED",C.CLOSED),b}},function(l,E,e){"use strict";var t=e(3);E.__esModule=!0,E.default=void 0;var r=t(e(18));E.default=function(){function i(s){let a=s.name,c=s.logger,u=s.duration;(0,r.default)(this,"name",void 0),(0,r.default)(this,"logger",void 0),(0,r.default)(this,"duration",void 0),(0,r.default)(this,"currId",void 0),this.name=a,this.logger=c,this.duration=u}var o=i.prototype;return o.reset=function(a){this.clear();const c=setTimeout(()=>{void 0!==this.currId&&(this.logger.spam(`${this.name} timer with id ${this.currId} expired, entering callback`),this.currId=void 0,a())},this.duration);this.currId=c,this.logger.spam(`Started ${this.name} timer with id ${this.currId}, expires in ${this.duration}ms`)},o.clear=function(){void 0!==this.currId&&(clearTimeout(this.currId),this.logger.spam(`Cleared ${this.name} timer with id ${this.currId}`),this.currId=void 0)},o.isRunning=function(){return void 0!==this.currId},i}()},function(l,E,e){"use strict";var t=e(3);E.__esModule=!0,E.default=void 0;var r=t(e(305)),n=t(e(695)),i=e(76);const s=(0,t(e(1)).default)("ReconnectableSocketStateMachine"),a=i.codes.CLOSE_UNSUPPORTED,c=i.codes.CLOSE_UNEXPECTED_CONDITION;E.default=d=>{let v,f=d.reconnectMaxDuration,h=d.CLOSED,g=d.CLOSING;return new r.default({init:"connecting",methods:{onInvalidTransition(p,y,S){s.error("Invalid state transition",{transition:p,from:y,to:S})}},transitions:[{name:"open",from:["connecting","reconnecting"],to:"open"},{name:"close",from:["connecting","reconnecting","open"],to:"closing"},{name:"closed",from:"closing",to:"closed"},{name:"disconnect",from:["reconnecting","open","connecting"],to:function m(p){let y=p.code;return("open"===this.state||!v)&&(v=(0,n.default)(f)),f>0&&!v()&&-1===[a,c].indexOf(y)&&-1===[h,g].indexOf(this.readyState)?"reconnecting":"closing"}}]})}},function(l,E,e){"use strict";l.exports=t=>{let r=!1;return setTimeout(()=>{r=!0},t),()=>r}},function(l,E,e){"use strict";var t=e(3);E.__esModule=!0,E.default=void 0;var r=t(e(12)),n=t(e(13)),i=t(e(106)),o=function(){var s=(0,n.default)(r.default.mark(function a(c,u){var d,f,h,g,v,m;return r.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:h=void 0===(f=(d=void 0===u?{}:u).BUFFER_DRAIN_INTERVAL)?100:f,v=void 0===(g=d.BUFFER_DRAIN_MAX_RETRIES)?10:g,m=0;case 2:if(!(m<v)){y.next=10;break}if(0!==c.bufferedAmount){y.next=5;break}return y.abrupt("break",10);case 5:return y.next=7,(0,i.default)(h);case 7:m+=1,y.next=2;break;case 10:case"end":return y.stop()}},a)}));return function(a,c){return s.apply(this,arguments)}}();E.default=o},function(l,E,e){"use strict";var t=e(108),r=e(3);E.__esModule=!0,E.default=void 0;var n=r(e(156)),i=r(e(45)),o=r(e(59)),s=r(e(18)),a=r(e(19)),c=r(e(313)),u=r(e(698)),d=t(e(171)),f=r(e(701)),h=e(76);E.default=v=>{var m,p;let S=v.ReconnectableSocket,T=v.logging,b=v.allocateId;return p=m=function(O){function C(I){var A;
1let P=I.messagingURL,x=I.notifyDisconnectAddress,D=I.connectionId,L=I.enableReconnection,N=I.pingThreshold,U=void 0===N?2e3:N,B=I.disconnectThreshold,V=void 0===B?(L?3:25)*U-100:B,H=I.reconnectMaxDuration,j=void 0===H?L?6e4:0:H;A=O.call(this)||this,(0,s.default)((0,n.default)(A),"url",void 0),(0,s.default)((0,n.default)(A),"id",void 0),(0,s.default)((0,n.default)(A),"_opened",!1),(0,s.default)((0,n.default)(A),"_socket",void 0),(0,s.default)((0,n.default)(A),"_reconnectAttempts",0),(0,s.default)((0,n.default)(A),"_socketID",(0,a.default)()),(0,s.default)((0,n.default)(A),"_receivedTransactionIDs",[]),(0,s.default)((0,n.default)(A),"_notifyDisconnectAddress",void 0),(0,s.default)((0,n.default)(A),"_enableReconnection",void 0),(0,s.default)((0,n.default)(A),"_pendingMessages",[]),(0,s.default)((0,n.default)(A),"_logger",T(`RumorSocket:${b()}`)),(0,c.default)({logger:A._logger,obj:(0,n.default)(A),eventNames:["open","message","error","reconnecting","reconnectAttempt","reconnectFailure","reconnected","close"]}),A.url=P,A.id=D,A._notifyDisconnectAddress=x,A._enableReconnection=L,A.on("error",F=>{A._logger.error(F.message)});try{A._socket=new S({url:()=>A._enableReconnection?[A.url,A.url.indexOf("?")>=0?"&":"?",`socketId=${A._socketID}`,A._socket&&A._socket.reconnecting?"&reconnect=true":"",`&attempt=${(0,a.default)()}`].join(""):A.url,pingThreshold:U,disconnectThreshold:V,reconnectMaxDuration:j})}catch(F){A._logger.error(F),A.emit("error",new f.default(h.codes.CLOSE_CONNECT_EXCEPTION))}const M=()=>{A._opened=!0,A._socket.send(u.default.Connect(A.id,x).serialize()),A.emit("open",A.id)};return A._socket.once("open",M),A._socket.on("message",F=>A._receiveMessage(F)),A._socket.once("close",F=>{A._logger.debug(`ReconnectableSocket closed (code: ${F.code})`),A._clearPendingMessages(),-1===[h.codes.CLOSE_NORMAL,h.codes.CLOSE_GOING_AWAY,h.codes.CLOSE_TIMEOUT].indexOf(F.code)&&A.emit("error",new f.default(F.code,F.reason||F.message)),A.emit("close",F)}),A._socket.on("error",F=>A.emit("error",new f.default(F.code))),A._socket.on("needsPing",()=>{A._socket.send(u.default.Ping().serialize())}),A._socket.on("reconnecting",()=>{!A._opened||(A._clearPendingMessagesWhichShouldntRetry(),A.emit("reconnecting"),A._reconnectAttempts=0)}),A._socket.on("reconnectAttempt",()=>{!A._opened||(A._reconnectAttempts+=1,A._socket.send(u.default.Disconnect("1").serialize(),!1),A.emit("reconnectAttempt"))}),A._socket.on("reconnected",()=>{A._opened?(A._pendingMessages.forEach(F=>{A._socket.send(F.rumorMessage.serialize())}),A.emit("reconnected")):M()}),A._socket.on("reconnectFailure",()=>{!A._opened||(A._logger.debug(`Reconnecting failed as connectivity was not restored within ${j}ms`),A.emit("reconnectFailure",new f.default))}),A}(0,o.default)(C,O),(0,i.default)(C,[{key:"readyState",get:function(){return this._socket?this._socket.readyState:S.CONNECTING}},{key:"reconnecting",get:function(){return this._opened&&this._socket&&this._socket.reconnecting}}]);var R=C.prototype;return R._clearPendingMessagesWhichShouldntRetry=function(){const A=this._pendingMessages.filter(P=>!P.retryAfterReconnect);this._pendingMessages=this._pendingMessages.filter(P=>P.retryAfterReconnect),A.forEach(P=>{const x=new Error("Not connected.");x.code=500,P.completion(x)})},R._clearPendingMessages=function(){this._pendingMessages.forEach(A=>{const P=new Error("Not connected.");P.code=500,A.completion(P)}),this._pendingMessages=[]},R._sendAck=function(A){this._socket.send(u.default.Status([A.fromAddress],{"TRANSACTION-ID":A.headers["TRANSACTION-ID"],"X-TB-FROM-ADDRESS":this.id}).serialize())},R._receiveMessage=function(A){const P=u.default.deserialize(A.data);if(P.type!==d.PONG){if(this._logger.debug("Received:",P),P.transactionId&&(this._pendingMessages=this._pendingMessages.filter(x=>(x.rumorMessage.transactionId===P.transactionId&&(this._logger.debug("Marking",P.transactionId," as received"),x.completion(void 0,P)),x.rumorMessage.transactionId!==P.transactionId))),P.transactionId&&P.type!==d.STATUS){if(this._sendAck(P),this._receivedTransactionIDs.indexOf(P.transactionId)>=0)return;this._receivedTransactionIDs.push(P.transactionId)}
1this.emit("message",P)}},R.publish=function(A,P,x,D,L){void 0===L&&(L=()=>{});const N=u.default.Publish(A,P,x);if("dropped"===this._socket.send(N.serialize(),!1)&&!D){const B=new Error("Not connected.");return B.code=500,void L(B)}this._pendingMessages.push({rumorMessage:N,retryAfterReconnect:D,completion:L})},R.subscribe=function(A){this._socket.send(u.default.Subscribe(A).serialize())},R.unsubscribe=function(A){this._socket.send(u.default.Unsubscribe(A).serialize())},R.disconnect=function(){if(this.readyState===C.OPEN&&this._socket.send(u.default.Disconnect().serialize()),this._socket.readyState!==S.CLOSED&&this._socket.readyState!==S.CLOSING){const A=h.codes.CLOSE_NORMAL;this._socket.close(A,h.messages[A])}},R.status=function(A,P){this._socket.send(u.default.Status(A,{"TRANSACTION-ID":P,"X-TB-FROM-ADDRESS":this.id}).serialize())},R.reconnectRetriesCount=function(){return this._reconnectAttempts},R.messageQueueSize=function(){return this._pendingMessages.length},(0,i.default)(C,[{key:"socketID",get:function(){return this._socketID}}]),C}(v.EventEmitter),(0,s.default)(m,"CONNECTING",S.CONNECTING),(0,s.default)(m,"OPEN",S.OPEN),(0,s.default)(m,"CLOSING",S.CLOSING),(0,s.default)(m,"CLOSED",S.CLOSED),p}},function(l,E,e){"use strict";var t=e(108),r=e(3);E.__esModule=!0,E.default=void 0;var n=r(e(18)),i=r(e(19)),o=e(699),s=t(e(171));E.default=function(){function u(f,h,g,v){(0,n.default)(this,"type",void 0),(0,n.default)(this,"toAddress",void 0),(0,n.default)(this,"headers",void 0),(0,n.default)(this,"data",void 0),this.type=f,this.toAddress=h,this.headers=g,this.data=v,this.fromAddress=this.headers["X-TB-FROM-ADDRESS"],this.transactionId=this.headers["TRANSACTION-ID"],this.status=this.headers.STATUS,this.isError=this.status&&"2"!==this.status[0]}return u.prototype.serialize=function(){let h,g,v,m,p=8,y=7;const S=[],T=[],b=[];for(y++,v=0;v<this.toAddress.length;v++)S.push(new o.TextEncoder("utf-8").encode(this.toAddress[v])),y+=2,y+=S[v].length;y++,v=0;for(const R in this.headers)!this.headers.hasOwnProperty(R)||(T.push(new o.TextEncoder("utf-8").encode(R)),b.push(new o.TextEncoder("utf-8").encode(this.headers[R])),y+=4,y+=T[v].length,y+=b[v].length,v++);g=new o.TextEncoder("utf-8").encode(this.data),y+=g.length;const O=new ArrayBuffer(y),C=new Uint8Array(O,0,y);for(y-=4,C[0]=(4278190080&y)>>>24,C[1]=(16711680&y)>>>16,C[2]=(65280&y)>>>8,C[3]=(255&y)>>>0,C[4]=0,C[5]=0,C[6]=this.type,C[7]=this.toAddress.length,v=0;v<S.length;v++)for(h=S[v],C[p++]=h.length>>8&255,C[p++]=h.length>>0&255,m=0;m<h.length;m++)C[p++]=h[m];for(C[p++]=T.length,v=0;v<T.length;v++){for(h=T[v],C[p++]=h.length>>8&255,C[p++]=h.length>>0&255,m=0;m<h.length;m++)C[p++]=h[m];for(h=b[v],C[p++]=h.length>>8&255,C[p++]=h.length>>0&255,m=0;m<h.length;m++)C[p++]=h[m]}for(v=0;v<g.length;v++)C[p++]=g[v];return O},u.deserialize=function(h){(void 0!==typeof window?window:global).Buffer&&(void 0!==typeof window?window:global).Buffer.isBuffer(h)&&(h=(u=>{const d=new ArrayBuffer(u.length),f=new Uint8Array(d);for(let h=0;h<u.length;++h)f[h]=u[h];return d})(h));let g,v,m,p,y,S,T,b,O=8;const C=new Uint8Array(h);g=C[6];const R=[];for(b=0;b<C[7];b++)T=C[O++]<<8,T+=C[O++],v=new Uint8Array(h,O,T),R[b]=new o.TextDecoder("utf-8").decode(v),O+=T;for(m=C[O++],p={},b=0;b<m;b++)T=C[O++]<<8,T+=C[O++],v=new Uint8Array(h,O,T),y=new o.TextDecoder("utf-8").decode(v),O+=T,T=C[O++]<<8,T+=C[O++],v=new Uint8Array(h,O,T),S=new o.TextDecoder("utf-8").decode(v),p[y]=S,O+=T;const I=new Uint8Array(h,O);return new u(g,R,p,new o.TextDecoder("utf-8").decode(I))},u.Connect=function(h,g){const v={uniqueId:h,"TRANSACTION-ID":(0,i.default)(),notifyDisconnectAddress:g};return new u(s.CONNECT,[],v,"")},u.Disconnect=function(h){return new u(s.DISCONNECT,[],{reconnect:h},"")},u.Subscribe=function(h){return new u(s.SUBSCRIBE,h,{},"")},u.Unsubscribe=function(h){return new u(s.UNSUBSCRIBE,h,{},"")},u.Publish=function(h,g,v){return new u(s.MESSAGE,h,v||{},g||"")},u.Status=function(h,g){return new u(s.STATUS,h,g||{},"")},u.Ping=function(){return new u(s.PING,[],{},"")},u}()},function(l,E,e){"use strict";var t=e(108);E.__esModule=!0,E.TextDecoder=E.TextEncoder=void 0;var r=t(e(700));const n=(void 0!==typeof window?window:global).TextEncoder||r.TextEncoder;E.TextEncoder=n;const i=(void 0!==typeof window?window:global).TextDecoder||r.TextDecoder;E.TextDecoder=i},function(l,E,e){"use strict";function t(p,y,S){return y<=p&&p<=S}function r(p){if(void 0===p)return{};if(p===Object(p))return p;throw TypeError("Could not convert argument to dictionary")}function s(p){this.tokens=[].slice.call(p)}e.r(E),e.d(E,"TextEncoder",function(){return g}),e.d(E,"TextDecoder",function(){return h}
vendor: 1,805 bytes, line 1
1),s.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(p){if(Array.isArray(p))for(var y=p;y.length;)this.tokens.unshift(y.pop());else this.tokens.unshift(p)},push:function(p){if(Array.isArray(p))for(var y=p;y.length;)this.tokens.push(y.shift());else this.tokens.push(p)}};var a=-1;function c(p,y){if(p)throw TypeError("Decoder error");return y||65533}var f="utf-8";function h(p,y){if(!(this instanceof h))return new h(p,y);if((p=void 0!==p?String(p).toLowerCase():f)!==f)throw new Error("Encoding not supported. Only utf-8 is supported");y=r(y),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(y.fatal),this._ignoreBOM=Boolean(y.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function g(p,y){if(!(this instanceof g))return new g(p,y);if((p=void 0!==p?String(p).toLowerCase():f)!==f)throw new Error("Encoding not supported. Only utf-8 is supported");y=r(y),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(y.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function v(p){var y=p.fatal,S=0,T=0,b=0,O=128,C=191;this.handler=function(R,I){if(-1===I&&0!==b)return b=0,c(y);if(-1===I)return a;if(0===b){if(t(I,0,127))return I;if(t(I,194,223))b=1,S=I-192;else if(t(I,224,239))224===I&&(O=160),237===I&&(C=159),b=2,S=I-224;else{if(!t(I,240,244))return c(y);240===I&&(O=144),244===I&&(C=143),b=3,S=I-240}return S<<=6*b,null}if(!t(I,O,C))return S=b=T=0,O=128,C=191,R.prepend(I),c(y);if(O=128,C=191,S+=I-128<<6*(b-(T+=1)),T!==b)return null;var A=S;return S=b=T=0,A}}function m(p){this.handler=function(S,T){if(-1===T)return a;
1if(t(T,0,127))return T;var b,O;t(T,128,2047)?(b=1,O=192):t(T,2048,65535)?(b=2,O=224):t(T,65536,1114111)&&(b=3,O=240);for(var C=[(T>>6*b)+O];b>0;)C.push(128|63&T>>6*(b-1)),b-=1;return C}}h.prototype={decode:function(y,S){var T;T="object"==typeof y&&y instanceof ArrayBuffer?new Uint8Array(y):"object"==typeof y&&"buffer"in y&&y.buffer instanceof ArrayBuffer?new Uint8Array(y.buffer,y.byteOffset,y.byteLength):new Uint8Array(0),S=r(S),this._streaming||(this._decoder=new v({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(S.stream);for(var C,b=new s(T),O=[];!b.endOfStream()&&(C=this._decoder.handler(b,b.read()))!==a;)null!==C&&(Array.isArray(C)?O.push.apply(O,C):O.push(C));if(!this._streaming){do{if((C=this._decoder.handler(b,b.read()))===a)break;null!==C&&(Array.isArray(C)?O.push.apply(O,C):O.push(C))}while(!b.endOfStream());this._decoder=null}return O.length&&-1!==["utf-8"].indexOf(this.encoding)&&!this._ignoreBOM&&!this._BOMseen&&(65279===O[0]?(this._BOMseen=!0,O.shift()):this._BOMseen=!0),function i(p){for(var y="",S=0;S<p.length;++S){var T=p[S];T<=65535?y+=String.fromCharCode(T):(T-=65536,y+=String.fromCharCode(55296+(T>>10),56320+(1023&T)))}return y}(O)}},g.prototype={encode:function(y,S){y=y?String(y):"",S=r(S),this._streaming||(this._encoder=new m(this._options)),this._streaming=Boolean(S.stream);for(var O,T=[],b=new s(function n(p){for(var y=String(p),S=y.length,T=0,b=[];T<S;){var O=y.charCodeAt(T);if(O<55296||O>57343)b.push(O);else if(56320<=O&&O<=57343)b.push(65533);else if(55296<=O&&O<=56319)if(T===S-1)b.push(65533);else{var C=p.charCodeAt(T+1);56320<=C&&C<=57343?(b.push(65536+((1023&O)<<10)+(1023&C)),T+=1):b.push(65533)}T+=1}return b}(y));!b.endOfStream()&&(O=this._encoder.handler(b,b.read()))!==a;)Array.isArray(O)?T.push.apply(T,O):T.push(O);if(!this._streaming){for(;(O=this._encoder.handler(b,b.read()))!==a;)Array.isArray(O)?T.push.apply(T,O):T.push(O);this._encoder=null}return new Uint8Array(T)}}},function(l,E,e){"use strict";var t=e(108),r=e(3);E.__esModule=!0,E.default=void 0;var n=r(e(18)),i=t(e(76));E.default=function(a,c){void 0===a&&(a=i.codes.CLOSE_FALLBACK_CODE),void 0===c&&(c=i.messages[a]||"No message available from code."),(0,n.default)(this,"code",void 0),(0,n.default)(this,"message",void 0),this.code=a,this.message=c}},function(l,E,e){"use strict";var t=e(3);E.__esModule=!0,E.default=void 0;var r=t(e(703)),n=(void 0!==typeof window?window:global).WebSocket?(void 0!==typeof window?window:global).WebSocket:r.default;E.default=n},function(l,E,e){"use strict";l.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(l,E,e){"use strict";const t=e(705);l.exports=function(n){const i=t(n.data);return i.transactionId=n.transactionId,i.fromAddress=n.headers["X-TB-FROM-ADDRESS"],i}},function(l,E,e){"use strict";l.exports=function(r){if(0===r.length)return{};const n=JSON.parse(r),i=n.uri.substr(1).split("/");i.shift(),""===i[i.length-1]&&i.pop(),n.params={};for(let o=0,s=i.length;o<s-1;o+=2)n.params[i[o]]=i[o+1];return n.resource=i.length%2==0?"channel"===i[i.length-2]&&i.length>6?`${i[i.length-4]}_${i[i.length-2]}`:i[i.length-2]:"channel"===i[i.length-1]&&i.length>5?`${i[i.length-3]}_${i[i.length-1]}`:i[i.length-1],n.signature=`${n.resource}#${n.method}`,n}},function(l,E,e){"use strict";const r=e(2).name,n=e(60).once;l.exports=()=>n()&&["Chrome","Firefox","Safari"].indexOf(r)>-1},function(l,E,e){"use strict";const t=e(2),r=e(60).once;l.exports=()=>r()&&("Chrome"===t.name||"Firefox"===t.name||"Node"===t.name||"Safari"===t.name||"Edge"===t.name)},function(l,E,e){"use strict";const t=e(60).once;l.exports=()=>t()},function(l,E,e){"use strict";l.exports="DTLS_SRTP"},function(l,E,e){"use strict";l.exports=function(r){let n=r.supportsWebRTC;return{supportsWebRTC:"true"===n||!0===n}}},function(l,E,e){"use strict";
1l.exports=function(r,n){this.code=r,this.message=n,this.reason=n}},function(l,E,e){"use strict";l.exports=function(n){const i=[];this.enqueue=function(){i.push(Array.prototype.slice.call(arguments))},this.triggerAll=function(){let s;for(;s=i.shift();)n.trigger(...s)}}},function(l,E,e){"use strict";var r=e(3)(e(25));const n=e(206),i=e(239),o=e(56),s=e(7),a=e(141),c=e(8),u=e(714),d=e(715),f=e(289).default,h={EMPTY_RESPONSE:"Response body was empty, probably due to connectivity loss",BADLY_FORMED:"Unknown error: JSON response was badly formed",NO_ERROR:"No error message",UNEXPECTED_SERVER_RESPONSE:m=>`Unexpected server response (${m}). Try this operation again later.`},g=[0,600,1200];l.exports=function v(m){let p=void 0===m?{}:m,y=p.axios,S=void 0===y?n:y,T=p.retryDelays,b=void 0===T?g:T;return f(function O(R){let A=R.sessionId,P=R.token,x=R.clientVersion,D=R.connectionId;const L=i.parse(R.anvilUrl,!0),N=i.format({protocol:L.protocol,auth:L.auth,host:L.host,pathname:i.resolve((L.pathname||"").replace(/\/?$/,"/"),`session/${A}`),query:(0,r.default)({},L.query,{extended:!0})});return S.get(N,{validateStatus:U=>U>=200&&U<300,headers:{"X-OPENTOK-AUTH":P,"X-TB-VERSION":1,"X-TB-CLIENT-VERSION":x,"X-TB-CONNECTIONID":D,Accept:"application/json"}}).catch(U=>{if(U.response){const B=new Error(h.UNEXPECTED_SERVER_RESPONSE(`${U.response.statusCode}${U.response.status?` ${U.response.status}`:""}`));throw B.code=c.ANVIL_INVALID_HTTP_STATUS,B.name=u(B.code),B}if(U.request){const B=new Error(h.CONNECT_FAILED);throw B.code=c.ANVIL_CONNECT_FAILED,B.name=u(B.code),B}{const B=c.ANVIL_UNKNOWN_HTTP_ERROR,V=u(U.code);throw s(U,{code:B,name:V}),U}}).then(U=>{let B=U.data;if("string"==typeof B){if(B.length>0)try{JSON.parse(B)}catch(M){throw M.message=h.UNEXPECTED_SERVER_RESPONSE(M.toString()),M.code=c.ANVIL_XDOMAIN_OR_PARSING_ERROR,M.name=u(M.code),M}const j=new Error(0===B.length?h.EMPTY_RESPONSE:h.BADLY_FORMED);throw j.code=0===B.length?c.ANVIL_EMPTY_RESPONSE_BODY:c.ANVIL_BADLY_FORMED_RESPONSE,j.name=u(j.code),j}if(null===B||0===B.length){const j=new Error(h.EMPTY_RESPONSE);throw j.code=c.ANVIL_EMPTY_RESPONSE_BODY,j.name=u(j.code),j}const H=B.filter(j=>null!=j.error)[0];if(H){const j=d(o(H,"error.code","500"));"Invalid token format"===o(H,"error.errorMessage.message")&&(H.error.errorMessage.message+=` Token: ${P}`);const M=new Error(o(H,"error.errorMessage.message",void 0===j?`Unknown error: ${H.error.code}`:h.NO_ERROR));throw M.code=j||c.ANVIL_UNEXPECTED_ERROR_CODE,M.name=u(M.code),M}return new a(B[0])})},(R,I)=>R.code&&R.code>=3e3&&R.code<=3007&&b[I])}},function(l,E,e){"use strict";const t=e(8),r=e(4),n={[t.ANVIL_BADLY_FORMED_RESPONSE]:r.BADLY_FORMED_RESPONSE,[t.ANVIL_INVALID_HTTP_STATUS]:r.INVALID_HTTP_STATUS,[t.ANVIL_XDOMAIN_OR_PARSING_ERROR]:r.XDOMAIN_OR_PARSING_ERROR,[t.ANVIL_UNKNOWN_HTTP_ERROR]:r.UNKNOWN_HTTP_ERROR,[t.ANVIL_UNEXPECTED_ERROR_CODE]:r.UNEXPECTED_ERROR_CODE,[t.ANVIL_EMPTY_RESPONSE_BODY]:r.EMPTY_RESPONSE_BODY,[t.ANVIL_CONNECT_FAILED]:r.CONNECT_FAILED,[t.AUTHENTICATION_ERROR]:r.AUTHENTICATION_ERROR,[t.INVALID_SESSION_ID]:r.INVALID_SESSION_ID,[t.TERMS_OF_SERVICE_FAILURE]:r.TERMS_OF_SERVICE_FAILURE,[t.UNEXPECTED_SERVER_RESPONSE]:r.UNEXPECTED_SERVER_RESPONSE};l.exports=function i(o){return n[o]}},function(l,E,e){"use strict";const t=e(8),r={400:t.INVALID_SESSION_ID,403:t.AUTHENTICATION_ERROR,404:t.INVALID_SESSION_ID,409:t.TERMS_OF_SERVICE_FAILURE,500:t.UNEXPECTED_SERVER_RESPONSE};l.exports=function n(i){return r[i]}},function(l,E,e){"use strict";l.exports=function(r){void 0===r&&(r={});const n=r.Session||e(309)(),i=r.sessionObjects||e(20);return function(s,a,c){null==a&&(a=s,s=null),Array.isArray(a)&&1===a.length&&(a=a[0]);let u=i.sessions.get(a);return u||(u=new n(s,a,c),i.sessions.add(u)),u}}},function(l,E,e){"use strict";var t=e(3),r=t(e(12)),n=t(e(13));const i=e(718),o=e(273),s=e(2),a=e(4),c=e(8),u=e(11)(),d=e(50),f=e(73),h=e(142)(void 0!==typeof window?window:global);function g(m){return o(i(m,["AV1X","AV1","VP9","rtx","red","ulpfec","H265","X-H264UC","x-ulpfecuc"]))}const v=function(){var m=(0,n.default)(r.default.mark(function p(){var y,S,T,b,O,C;return r.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if("undefined"!=typeof window){A.next=2;break}return A.abrupt("return",{videoEncoders:[],videoDecoders:[]});case 2:if(y=h.RTCPeerConnection,!window.RTCRtpSender||!("getCapabilities"in window.RTCRtpSender)){A.next=7;break}return S=g(S=window.RTCRtpSender.getCapabilities("video").codecs.map(P=>P.mimeType||P.name).map(P=>P.replace("video/",""))),A.abrupt("return",{videoEncoders:S,videoDecoders:S});case 7:if("Chrome"!==s.name||"captureStream"in window.HTMLCanvasElement.prototype){A.next=9;break}return A.abrupt("return",{videoEncoders:["VP8"],videoDecoders:["VP8"]});case 9:if(!s.isLegacyEdge){A.next=11;break}return A.abrupt("return",{videoEncoders:["H264","VP8"],videoDecoders:["H264","VP8"]});case 11:return(T=window.document.createElement("canvas")).getContext("2d"),b=T.captureStream(),A.prev=14,C={iceServers:[]},f()&&(C.sdpSemantics="plan-b"),(O=new y(C)).addTrack?O.addTrack(b.getVideoTracks()[0],b):O.addStream&&O.addStream(b),A.next=21,O.createOffer();case 21:return S=g(S=d.getCodecs(A.sent.sdp,"video")||[]),A.abrupt("return",{videoEncoders:S,videoDecoders:S});case 27:throw A.prev=27,A.t0=A.catch(14),u(a.UNABLE_TO_ACCESS_MEDIA_ENGINE,new Error("OT.getSupp
1ortedCodecs was not able to get the list of supported codecs"),c.UNABLE_TO_ACCESS_MEDIA_ENGINE);case 30:return A.prev=30,O.close(),A.finish(30);case 33:case"end":return A.stop()}},p,null,[[14,27,30,33]])}));return function(){return m.apply(this,arguments)}}();l.exports=v},function(l,E,e){var t=e(719),r=e(237),n=e(87),i=e(129),o=n(function(s,a){return i(s)?t(s,r(a,1,i,!0)):[]});l.exports=o},function(l,E,e){var t=e(92),r=e(93),n=e(128),i=e(33),o=e(67),s=e(94);l.exports=function c(u,d,f,h){var g=-1,v=r,m=!0,p=u.length,y=[],S=d.length;if(!p)return y;f&&(d=i(d,o(f))),h?(v=n,m=!1):d.length>=200&&(v=s,m=!1,d=new t(d));e:for(;++g<p;){var T=u[g],b=null==f?T:f(T);if(T=h||0!==T?T:0,m&&b==b){for(var O=S;O--;)if(d[O]===b)continue e;y.push(T)}else v(d,b,h)||y.push(T)}return y}},function(l,E,e){"use strict";const r=e(23)().getInputMediaDevices;l.exports=function(i){r().then(o=>i(void 0,o),i)}},function(l,E,e){"use strict";var t=e(3),r=t(e(12)),n=t(e(13));l.exports=function(i){void 0===i&&(i={});const o=i.deviceHelpers||e(23)(),s=o.hasAudioOutputApiSupport,a=o.hasDevice,c=i.getAudioOutputDevices||e(320),u=i.updateSubscribersSinkId||e(322),d=e(11)(),f=e(4);return function(){var g=(0,n.default)(r.default.mark(function v(m){return r.default.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(s()){T.next=2;break}throw d(f.UNSUPPORTED_BROWSER,new Error("setAudioOutputDevice is not supported in your browser."));case 2:return T.next=4,c();case 4:if(a(T.sent,m)){T.next=8;break}throw d(f.INVALID_AUDIO_OUTPUT_SOURCE,new Error("The requested device is not valid."));case 8:return T.prev=8,T.next=11,u(m);case 11:T.next=16;break;case 13:throw T.prev=13,T.t0=T.catch(8),d(f.REQUESTED_DEVICE_PERMISSION_DENIED,new Error("No permission to use the requested device."));case 16:case"end":return T.stop()}},v,null,[[8,13]])}));return function(m){return g.apply(this,arguments)}}()}},function(l,E,e){"use strict";var t=e(3),r=t(e(12)),n=t(e(13));const i=e(723)(),o=e(23)(),s=o.hasAudioOutputApiSupport,a=o.getNativeMediaDevices;l.exports=()=>{if(s()){const c=a();let u=!1;c.addEventListener("devicechange",(0,n.default)(r.default.mark(function d(){return r.default.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(!u){h.next=2;break}return h.abrupt("return");case 2:return u=!0,h.next=5,i();case 5:u=!1;case 6:case"end":return h.stop()}},d)})))}}},function(l,E,e){"use strict";var t=e(3),r=t(e(12)),n=t(e(13));l.exports=function(i){void 0===i&&(i={});const o=i.deviceHelpers||e(23)(),s=o.getAudioOutputMediaDevices,a=o.getDefaultAudioOutputDeviceId,c=o.hasDevice,u=i.currentAudioOutputDevice||e(105),d=u.getCurrentAudioOutputDeviceId,f=u.setCurrentAudioOutputDeviceId,h=i.updateSubscribersSinkId||e(322),g=i.logging||e(1)("currentAudioOutputDevice");return function(){var m=(0,n.default)(r.default.mark(function p(){var y,T;return r.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,s();case 2:if(0!==(y=O.sent).length){O.next=6;break}return f(""),O.abrupt("return");case 6:if(!c(y,d())){O.next=9;break}return O.abrupt("return");case 9:return T=a(y),f(T),O.prev=11,O.next=14,h(T);case 14:O.next=19;break;case 16:O.prev=16,O.t0=O.catch(11),g.debug("Failed to set the default audio output device.",O.t0);case 19:case"end":return O.stop()}},p,null,[[11,16]])}));return function(){return m.apply(this,arguments)}}()}},function(l,E,e){"use strict";const t=e(27);l.exports=function(r){void 0===r&&(r={});const n=r.env||e(2),i=r.analytics||new t;i.logEvent({action:"UserAgentParsing",variation:"Attempt",payload:{userAgent:n.userAgent}}),i.logEvent({action:"UserAgentParsing",variation:n.error?"Failure":"Success",payload:{userAgent:n.userAgent}})}}])},module.exports=e()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.