-
Notifications
You must be signed in to change notification settings - Fork 4
/
rtc-detect.js
3 lines (3 loc) · 79.1 KB
/
rtc-detect.js
1
2
3
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RTCDetect=t()}(this,(function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
r=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(T){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,a),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(T){return{type:"throw",arg:T}}}e.wrap=s;var p={};function d(){}function l(){}function v(){}var h={};u(h,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(k([])));g&&g!==t&&n.call(g,i)&&(h=g);var y=v.prototype=d.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(o,i,a,c){var u=f(e[o],e,i);if("throw"!==u.type){var s=u.arg,p=s.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(p).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=f(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function k(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return l.prototype=v,u(y,"constructor",v),u(v,"constructor",l),l.displayName=u(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),u(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(y),u(y,c,"Generator"),u(y,i,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=k,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(s){return void r(s)}c.done?t(u):Promise.resolve(u).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function c(e){o(a,n,i,c,u,"next",e)}function u(e){o(a,n,i,c,u,"throw",e)}c(void 0)}))}}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},p=function(e){return e&&e.Math==Math&&e},d=p("object"==typeof globalThis&&globalThis)||p("object"==typeof window&&window)||p("object"==typeof self&&self)||p("object"==typeof f&&f)||function(){return this}()||Function("return this")(),l={},v=function(e){try{return!!e()}catch(t){return!0}},h=!v((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),m=!v((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),g=m,y=Function.prototype.call,b=g?y.bind(y):function(){return y.apply(y,arguments)},w={},x={}.propertyIsEnumerable,S=Object.getOwnPropertyDescriptor,E=S&&!x.call({1:2},1);w.f=E?function(e){var t=S(this,e);return!!t&&t.enumerable}:x;var O,k,C=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},T=m,I=Function.prototype,P=I.bind,j=I.call,R=T&&P.bind(j,j),A=T?function(e){return e&&R(e)}:function(e){return e&&function(){return j.apply(e,arguments)}},L=A,M=L({}.toString),D=L("".slice),F=function(e){return D(M(e),8,-1)},_=v,N=F,B=Object,V=A("".split),z=_((function(){return!B("z").propertyIsEnumerable(0)}))?function(e){return"String"==N(e)?V(e,""):B(e)}:B,G=TypeError,W=function(e){if(null==e)throw G("Can't call method on "+e);return e},H=z,U=W,Q=function(e){return H(U(e))},$=function(e){return"function"==typeof e},Y=$,K=function(e){return"object"==typeof e?null!==e:Y(e)},X=d,q=$,J=function(e){return q(e)?e:void 0},Z=function(e,t){return arguments.length<2?J(X[e]):X[e]&&X[e][t]},ee=A({}.isPrototypeOf),te=Z("navigator","userAgent")||"",re=d,ne=te,oe=re.process,ie=re.Deno,ae=oe&&oe.versions||ie&&ie.version,ce=ae&&ae.v8;ce&&(k=(O=ce.split("."))[0]>0&&O[0]<4?1:+(O[0]+O[1])),!k&&ne&&(!(O=ne.match(/Edge\/(\d+)/))||O[1]>=74)&&(O=ne.match(/Chrome\/(\d+)/))&&(k=+O[1]);var ue=k,se=ue,fe=v,pe=!!Object.getOwnPropertySymbols&&!fe((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&se&&se<41})),de=pe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,le=Z,ve=$,he=ee,me=Object,ge=de?function(e){return"symbol"==typeof e}:function(e){var t=le("Symbol");return ve(t)&&he(t.prototype,me(e))},ye=String,be=function(e){try{return ye(e)}catch(t){return"Object"}},we=$,xe=be,Se=TypeError,Ee=function(e){if(we(e))return e;throw Se(xe(e)+" is not a function")},Oe=Ee,ke=function(e,t){var r=e[t];return null==r?void 0:Oe(r)},Ce=b,Te=$,Ie=K,Pe=TypeError,je={exports:{}},Re=d,Ae=Object.defineProperty,Le=function(e,t){try{Ae(Re,e,{value:t,configurable:!0,writable:!0})}catch(r){Re[e]=t}return t},Me=Le,De="__core-js_shared__",Fe=d[De]||Me(De,{}),_e=Fe;(je.exports=function(e,t){return _e[e]||(_e[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ne=W,Be=Object,Ve=function(e){return Be(Ne(e))},ze=Ve,Ge=A({}.hasOwnProperty),We=Object.hasOwn||function(e,t){return Ge(ze(e),t)},He=A,Ue=0,Qe=Math.random(),$e=He(1..toString),Ye=function(e){return"Symbol("+(void 0===e?"":e)+")_"+$e(++Ue+Qe,36)},Ke=d,Xe=je.exports,qe=We,Je=Ye,Ze=pe,et=de,tt=Xe("wks"),rt=Ke.Symbol,nt=rt&&rt.for,ot=et?rt:rt&&rt.withoutSetter||Je,it=function(e){if(!qe(tt,e)||!Ze&&"string"!=typeof tt[e]){var t="Symbol."+e;Ze&&qe(rt,e)?tt[e]=rt[e]:tt[e]=et&&nt?nt(t):ot(t)}return tt[e]},at=b,ct=K,ut=ge,st=ke,ft=function(e,t){var r,n;if("string"===t&&Te(r=e.toString)&&!Ie(n=Ce(r,e)))return n;if(Te(r=e.valueOf)&&!Ie(n=Ce(r,e)))return n;if("string"!==t&&Te(r=e.toString)&&!Ie(n=Ce(r,e)))return n;throw Pe("Can't convert object to primitive value")},pt=TypeError,dt=it("toPrimitive"),lt=function(e,t){if(!ct(e)||ut(e))return e;var r,n=st(e,dt);if(n){if(void 0===t&&(t="default"),r=at(n,e,t),!ct(r)||ut(r))return r;throw pt("Can't convert object to primitive value")}return void 0===t&&(t="number"),ft(e,t)},vt=ge,ht=function(e){var t=lt(e,"string");return vt(t)?t:t+""},mt=K,gt=d.document,yt=mt(gt)&&mt(gt.createElement),bt=function(e){return yt?gt.createElement(e):{}},wt=bt,xt=!h&&!v((function(){return 7!=Object.defineProperty(wt("div"),"a",{get:function(){return 7}}).a})),St=h,Et=b,Ot=w,kt=C,Ct=Q,Tt=ht,It=We,Pt=xt,jt=Object.getOwnPropertyDescriptor;l.f=St?jt:function(e,t){if(e=Ct(e),t=Tt(t),Pt)try{return jt(e,t)}catch(r){}if(It(e,t))return kt(!Et(Ot.f,e,t),e[t])};var Rt={},At=h&&v((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Lt=K,Mt=String,Dt=TypeError,Ft=function(e){if(Lt(e))return e;throw Dt(Mt(e)+" is not an object")},_t=h,Nt=xt,Bt=At,Vt=Ft,zt=ht,Gt=TypeError,Wt=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Ut="enumerable",Qt="configurable",$t="writable";Rt.f=_t?Bt?function(e,t,r){if(Vt(e),t=zt(t),Vt(r),"function"==typeof e&&"prototype"===t&&"value"in r&&$t in r&&!r.writable){var n=Ht(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:Qt in r?r.configurable:n.configurable,enumerable:Ut in r?r.enumerable:n.enumerable,writable:!1})}return Wt(e,t,r)}:Wt:function(e,t,r){if(Vt(e),t=zt(t),Vt(r),Nt)try{return Wt(e,t,r)}catch(n){}if("get"in r||"set"in r)throw Gt("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Yt=Rt,Kt=C,Xt=h?function(e,t,r){return Yt.f(e,t,Kt(1,r))}:function(e,t,r){return e[t]=r,e},qt={exports:{}},Jt=h,Zt=We,er=Function.prototype,tr=Jt&&Object.getOwnPropertyDescriptor,rr=Zt(er,"name"),nr={EXISTS:rr,PROPER:rr&&"something"===function(){}.name,CONFIGURABLE:rr&&(!Jt||Jt&&tr(er,"name").configurable)},or=$,ir=Fe,ar=A(Function.toString);or(ir.inspectSource)||(ir.inspectSource=function(e){return ar(e)});var cr,ur,sr,fr=ir.inspectSource,pr=$,dr=fr,lr=d.WeakMap,vr=pr(lr)&&/native code/.test(dr(lr)),hr=je.exports,mr=Ye,gr=hr("keys"),yr=function(e){return gr[e]||(gr[e]=mr(e))},br={},wr=vr,xr=d,Sr=A,Er=K,Or=Xt,kr=We,Cr=Fe,Tr=yr,Ir=br,Pr="Object already initialized",jr=xr.TypeError,Rr=xr.WeakMap;if(wr||Cr.state){var Ar=Cr.state||(Cr.state=new Rr),Lr=Sr(Ar.get),Mr=Sr(Ar.has),Dr=Sr(Ar.set);cr=function(e,t){if(Mr(Ar,e))throw new jr(Pr);return t.facade=e,Dr(Ar,e,t),t},ur=function(e){return Lr(Ar,e)||{}},sr=function(e){return Mr(Ar,e)}}else{var Fr=Tr("state");Ir[Fr]=!0,cr=function(e,t){if(kr(e,Fr))throw new jr(Pr);return t.facade=e,Or(e,Fr,t),t},ur=function(e){return kr(e,Fr)?e[Fr]:{}},sr=function(e){return kr(e,Fr)}}var _r={set:cr,get:ur,has:sr,enforce:function(e){return sr(e)?ur(e):cr(e,{})},getterFor:function(e){return function(t){var r;if(!Er(t)||(r=ur(t)).type!==e)throw jr("Incompatible receiver, "+e+" required");return r}}},Nr=v,Br=$,Vr=We,zr=h,Gr=nr.CONFIGURABLE,Wr=fr,Hr=_r.enforce,Ur=_r.get,Qr=Object.defineProperty,$r=zr&&!Nr((function(){return 8!==Qr((function(){}),"length",{value:8}).length})),Yr=String(String).split("String"),Kr=qt.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Vr(e,"name")||Gr&&e.name!==t)&&(zr?Qr(e,"name",{value:t,configurable:!0}):e.name=t),$r&&r&&Vr(r,"arity")&&e.length!==r.arity&&Qr(e,"length",{value:r.arity});try{r&&Vr(r,"constructor")&&r.constructor?zr&&Qr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(o){}var n=Hr(e);return Vr(n,"source")||(n.source=Yr.join("string"==typeof t?t:"")),e};Function.prototype.toString=Kr((function(){return Br(this)&&Ur(this).source||Wr(this)}),"toString");var Xr=$,qr=Rt,Jr=qt.exports,Zr=Le,en=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(Xr(r)&&Jr(r,i,n),n.global)o?e[t]=r:Zr(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(a){}o?e[t]=r:qr.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},tn={},rn=Math.ceil,nn=Math.floor,on=Math.trunc||function(e){var t=+e;return(t>0?nn:rn)(t)},an=function(e){var t=+e;return t!=t||0===t?0:on(t)},cn=an,un=Math.max,sn=Math.min,fn=function(e,t){var r=cn(e);return r<0?un(r+t,0):sn(r,t)},pn=an,dn=Math.min,ln=function(e){return e>0?dn(pn(e),9007199254740991):0},vn=ln,hn=function(e){return vn(e.length)},mn=Q,gn=fn,yn=hn,bn=function(e){return function(t,r,n){var o,i=mn(t),a=yn(i),c=gn(n,a);if(e&&r!=r){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===r)return e||c||0;return!e&&-1}},wn={includes:bn(!0),indexOf:bn(!1)},xn=We,Sn=Q,En=wn.indexOf,On=br,kn=A([].push),Cn=function(e,t){var r,n=Sn(e),o=0,i=[];for(r in n)!xn(On,r)&&xn(n,r)&&kn(i,r);for(;t.length>o;)xn(n,r=t[o++])&&(~En(i,r)||kn(i,r));return i},Tn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],In=Cn,Pn=Tn.concat("length","prototype");tn.f=Object.getOwnPropertyNames||function(e){return In(e,Pn)};var jn={};jn.f=Object.getOwnPropertySymbols;var Rn=Z,An=tn,Ln=jn,Mn=Ft,Dn=A([].concat),Fn=Rn("Reflect","ownKeys")||function(e){var t=An.f(Mn(e)),r=Ln.f;return r?Dn(t,r(e)):t},_n=We,Nn=Fn,Bn=l,Vn=Rt,zn=v,Gn=$,Wn=/#|\.prototype\./,Hn=function(e,t){var r=Qn[Un(e)];return r==Yn||r!=$n&&(Gn(t)?zn(t):!!t)},Un=Hn.normalize=function(e){return String(e).replace(Wn,".").toLowerCase()},Qn=Hn.data={},$n=Hn.NATIVE="N",Yn=Hn.POLYFILL="P",Kn=Hn,Xn=d,qn=l.f,Jn=Xt,Zn=en,eo=Le,to=function(e,t,r){for(var n=Nn(t),o=Vn.f,i=Bn.f,a=0;a<n.length;a++){var c=n[a];_n(e,c)||r&&_n(r,c)||o(e,c,i(t,c))}},ro=Kn,no=function(e,t){var r,n,o,i,a,c=e.target,u=e.global,s=e.stat;if(r=u?Xn:s?Xn[c]||eo(c,{}):(Xn[c]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=qn(r,n))&&a.value:r[n],!ro(u?n:c+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;to(i,o)}(e.sham||o&&o.sham)&&Jn(i,"sham",!0),Zn(r,n,i,e)}},oo=F,io=Array.isArray||function(e){return"Array"==oo(e)},ao=TypeError,co=ht,uo=Rt,so=C,fo=function(e,t,r){var n=co(t);n in e?uo.f(e,n,so(0,r)):e[n]=r},po={};po[it("toStringTag")]="z";var lo="[object z]"===String(po),vo=lo,ho=$,mo=F,go=it("toStringTag"),yo=Object,bo="Arguments"==mo(function(){return arguments}()),wo=vo?mo:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=yo(e),go))?r:bo?mo(t):"Object"==(n=mo(t))&&ho(t.callee)?"Arguments":n},xo=A,So=v,Eo=$,Oo=wo,ko=fr,Co=function(){},To=[],Io=Z("Reflect","construct"),Po=/^\s*(?:class|function)\b/,jo=xo(Po.exec),Ro=!Po.exec(Co),Ao=function(e){if(!Eo(e))return!1;try{return Io(Co,To,e),!0}catch(t){return!1}},Lo=function(e){if(!Eo(e))return!1;switch(Oo(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ro||!!jo(Po,ko(e))}catch(t){return!0}};Lo.sham=!0;var Mo=!Io||So((function(){var e;return Ao(Ao.call)||!Ao(Object)||!Ao((function(){e=!0}))||e}))?Lo:Ao,Do=io,Fo=Mo,_o=K,No=it("species"),Bo=Array,Vo=function(e){var t;return Do(e)&&(t=e.constructor,(Fo(t)&&(t===Bo||Do(t.prototype))||_o(t)&&null===(t=t[No]))&&(t=void 0)),void 0===t?Bo:t},zo=function(e,t){return new(Vo(e))(0===t?0:t)},Go=v,Wo=ue,Ho=it("species"),Uo=function(e){return Wo>=51||!Go((function(){var t=[];return(t.constructor={})[Ho]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Qo=no,$o=v,Yo=io,Ko=K,Xo=Ve,qo=hn,Jo=function(e){if(e>9007199254740991)throw ao("Maximum allowed index exceeded");return e},Zo=fo,ei=zo,ti=Uo,ri=ue,ni=it("isConcatSpreadable"),oi=ri>=51||!$o((function(){var e=[];return e[ni]=!1,e.concat()[0]!==e})),ii=ti("concat"),ai=function(e){if(!Ko(e))return!1;var t=e[ni];return void 0!==t?!!t:Yo(e)};Qo({target:"Array",proto:!0,arity:1,forced:!oi||!ii},{concat:function(e){var t,r,n,o,i,a=Xo(this),c=ei(a,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if(ai(i=-1===t?a:arguments[t]))for(o=qo(i),Jo(u+o),r=0;r<o;r++,u++)r in i&&Zo(c,u,i[r]);else Jo(u+1),Zo(c,u++,i);return c.length=u,c}});var ci={},ui=Cn,si=Tn,fi=Object.keys||function(e){return ui(e,si)},pi=h,di=At,li=Rt,vi=Ft,hi=Q,mi=fi;ci.f=pi&&!di?Object.defineProperties:function(e,t){vi(e);for(var r,n=hi(t),o=mi(t),i=o.length,a=0;i>a;)li.f(e,r=o[a++],n[r]);return e};var gi,yi=Z("document","documentElement"),bi=Ft,wi=ci,xi=Tn,Si=br,Ei=yi,Oi=bt,ki=yr("IE_PROTO"),Ci=function(){},Ti=function(e){return"<script>"+e+"</"+"script>"},Ii=function(e){e.write(Ti("")),e.close();var t=e.parentWindow.Object;return e=null,t},Pi=function(){try{gi=new ActiveXObject("htmlfile")}catch(n){}var e,t;Pi="undefined"!=typeof document?document.domain&&gi?Ii(gi):((t=Oi("iframe")).style.display="none",Ei.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Ti("document.F=Object")),e.close(),e.F):Ii(gi);for(var r=xi.length;r--;)delete Pi.prototype[xi[r]];return Pi()};Si[ki]=!0;var ji=Object.create||function(e,t){var r;return null!==e?(Ci.prototype=bi(e),r=new Ci,Ci.prototype=null,r[ki]=e):r=Pi(),void 0===t?r:wi.f(r,t)},Ri=it,Ai=ji,Li=Rt.f,Mi=Ri("unscopables"),Di=Array.prototype;null==Di[Mi]&&Li(Di,Mi,{configurable:!0,value:Ai(null)});var Fi,_i,Ni,Bi=function(e){Di[Mi][e]=!0},Vi={},zi=!v((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Gi=We,Wi=$,Hi=Ve,Ui=zi,Qi=yr("IE_PROTO"),$i=Object,Yi=$i.prototype,Ki=Ui?$i.getPrototypeOf:function(e){var t=Hi(e);if(Gi(t,Qi))return t[Qi];var r=t.constructor;return Wi(r)&&t instanceof r?r.prototype:t instanceof $i?Yi:null},Xi=v,qi=$,Ji=Ki,Zi=en,ea=it("iterator"),ta=!1;[].keys&&("next"in(Ni=[].keys())?(_i=Ji(Ji(Ni)))!==Object.prototype&&(Fi=_i):ta=!0);var ra=null==Fi||Xi((function(){var e={};return Fi[ea].call(e)!==e}));ra&&(Fi={}),qi(Fi[ea])||Zi(Fi,ea,(function(){return this}));var na={IteratorPrototype:Fi,BUGGY_SAFARI_ITERATORS:ta},oa=Rt.f,ia=We,aa=it("toStringTag"),ca=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ia(e,aa)&&oa(e,aa,{configurable:!0,value:t})},ua=na.IteratorPrototype,sa=ji,fa=C,pa=ca,da=Vi,la=function(){return this},va=$,ha=String,ma=TypeError,ga=A,ya=Ft,ba=function(e){if("object"==typeof e||va(e))return e;throw ma("Can't set "+ha(e)+" as a prototype")},wa=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=ga(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(n){}return function(r,n){return ya(r),ba(n),t?e(r,n):r.__proto__=n,r}}():void 0),xa=no,Sa=b,Ea=$,Oa=function(e,t,r,n){var o=t+" Iterator";return e.prototype=sa(ua,{next:fa(+!n,r)}),pa(e,o,!1),da[o]=la,e},ka=Ki,Ca=wa,Ta=ca,Ia=Xt,Pa=en,ja=Vi,Ra=nr.PROPER,Aa=nr.CONFIGURABLE,La=na.IteratorPrototype,Ma=na.BUGGY_SAFARI_ITERATORS,Da=it("iterator"),Fa="keys",_a="values",Na="entries",Ba=function(){return this},Va=function(e,t,r,n,o,i,a){Oa(r,t,n);var c,u,s,f=function(e){if(e===o&&h)return h;if(!Ma&&e in l)return l[e];switch(e){case Fa:case _a:case Na:return function(){return new r(this,e)}}return function(){return new r(this)}},p=t+" Iterator",d=!1,l=e.prototype,v=l[Da]||l["@@iterator"]||o&&l[o],h=!Ma&&v||f(o),m="Array"==t&&l.entries||v;if(m&&(c=ka(m.call(new e)))!==Object.prototype&&c.next&&(ka(c)!==La&&(Ca?Ca(c,La):Ea(c[Da])||Pa(c,Da,Ba)),Ta(c,p,!0)),Ra&&o==_a&&v&&v.name!==_a&&(Aa?Ia(l,"name",_a):(d=!0,h=function(){return Sa(v,this)})),o)if(u={values:f(_a),keys:i?h:f(Fa),entries:f(Na)},a)for(s in u)(Ma||d||!(s in l))&&Pa(l,s,u[s]);else xa({target:t,proto:!0,forced:Ma||d},u);return l[Da]!==h&&Pa(l,Da,h,{name:o}),ja[t]=h,u},za=Q,Ga=Bi,Wa=Vi,Ha=_r,Ua=Rt.f,Qa=Va,$a=h,Ya="Array Iterator",Ka=Ha.set,Xa=Ha.getterFor(Ya),qa=Qa(Array,"Array",(function(e,t){Ka(this,{type:Ya,target:za(e),index:0,kind:t})}),(function(){var e=Xa(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),Ja=Wa.Arguments=Wa.Array;if(Ga("keys"),Ga("values"),Ga("entries"),$a&&"values"!==Ja.name)try{Ua(Ja,"name",{value:"values"})}catch(rg){}var Za={exports:{}},ec={},tc=fn,rc=hn,nc=fo,oc=Array,ic=Math.max,ac=F,cc=Q,uc=tn.f,sc=function(e,t,r){for(var n=rc(e),o=tc(t,n),i=tc(void 0===r?n:r,n),a=oc(ic(i-o,0)),c=0;o<i;o++,c++)nc(a,c,e[o]);return a.length=c,a},fc="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ec.f=function(e){return fc&&"Window"==ac(e)?function(e){try{return uc(e)}catch(rg){return sc(fc)}}(e):uc(cc(e))};var pc=v((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),dc=v,lc=K,vc=F,hc=pc,mc=Object.isExtensible,gc=dc((function(){mc(1)}))||hc?function(e){return!!lc(e)&&((!hc||"ArrayBuffer"!=vc(e))&&(!mc||mc(e)))}:mc,yc=!v((function(){return Object.isExtensible(Object.preventExtensions({}))})),bc=no,wc=A,xc=br,Sc=K,Ec=We,Oc=Rt.f,kc=tn,Cc=ec,Tc=gc,Ic=yc,Pc=!1,jc=Ye("meta"),Rc=0,Ac=function(e){Oc(e,jc,{value:{objectID:"O"+Rc++,weakData:{}}})},Lc=Za.exports={enable:function(){Lc.enable=function(){},Pc=!0;var e=kc.f,t=wc([].splice),r={};r[jc]=1,e(r).length&&(kc.f=function(r){for(var n=e(r),o=0,i=n.length;o<i;o++)if(n[o]===jc){t(n,o,1);break}return n},bc({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Cc.f}))},fastKey:function(e,t){if(!Sc(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Ec(e,jc)){if(!Tc(e))return"F";if(!t)return"E";Ac(e)}return e[jc].objectID},getWeakData:function(e,t){if(!Ec(e,jc)){if(!Tc(e))return!0;if(!t)return!1;Ac(e)}return e[jc].weakData},onFreeze:function(e){return Ic&&Pc&&Tc(e)&&!Ec(e,jc)&&Ac(e),e}};xc[jc]=!0;var Mc=Ee,Dc=m,Fc=A(A.bind),_c=function(e,t){return Mc(e),void 0===t?e:Dc?Fc(e,t):function(){return e.apply(t,arguments)}},Nc=Vi,Bc=it("iterator"),Vc=Array.prototype,zc=wo,Gc=ke,Wc=Vi,Hc=it("iterator"),Uc=function(e){if(null!=e)return Gc(e,Hc)||Gc(e,"@@iterator")||Wc[zc(e)]},Qc=b,$c=Ee,Yc=Ft,Kc=be,Xc=Uc,qc=TypeError,Jc=b,Zc=Ft,eu=ke,tu=_c,ru=b,nu=Ft,ou=be,iu=function(e){return void 0!==e&&(Nc.Array===e||Vc[Bc]===e)},au=hn,cu=ee,uu=function(e,t){var r=arguments.length<2?Xc(e):t;if($c(r))return Yc(Qc(r,e));throw qc(Kc(e)+" is not iterable")},su=Uc,fu=function(e,t,r){var n,o;Zc(e);try{if(!(n=eu(e,"return"))){if("throw"===t)throw r;return r}n=Jc(n,e)}catch(rg){o=!0,n=rg}if("throw"===t)throw r;if(o)throw n;return Zc(n),r},pu=TypeError,du=function(e,t){this.stopped=e,this.result=t},lu=du.prototype,vu=function(e,t,r){var n,o,i,a,c,u,s,f=r&&r.that,p=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),h=tu(t,f),m=function(e){return n&&fu(n,"normal",e),new du(!0,e)},g=function(e){return p?(nu(e),v?h(e[0],e[1],m):h(e[0],e[1])):v?h(e,m):h(e)};if(d)n=e.iterator;else if(l)n=e;else{if(!(o=su(e)))throw pu(ou(e)+" is not iterable");if(iu(o)){for(i=0,a=au(e);a>i;i++)if((c=g(e[i]))&&cu(lu,c))return c;return new du(!1)}n=uu(e,o)}for(u=d?e.next:n.next;!(s=ru(u,n)).done;){try{c=g(s.value)}catch(rg){fu(n,"throw",rg)}if("object"==typeof c&&c&&cu(lu,c))return c}return new du(!1)},hu=ee,mu=TypeError,gu=function(e,t){if(hu(t,e))return e;throw mu("Incorrect invocation")},yu=it("iterator"),bu=!1;try{var wu=0,xu={next:function(){return{done:!!wu++}},return:function(){bu=!0}};xu[yu]=function(){return this},Array.from(xu,(function(){throw 2}))}catch(rg){}var Su=function(e,t){if(!t&&!bu)return!1;var r=!1;try{var n={};n[yu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(rg){}return r},Eu=$,Ou=K,ku=wa,Cu=no,Tu=d,Iu=A,Pu=Kn,ju=en,Ru=Za.exports,Au=vu,Lu=gu,Mu=$,Du=K,Fu=v,_u=Su,Nu=ca,Bu=function(e,t,r){var n,o;return ku&&Eu(n=t.constructor)&&n!==r&&Ou(o=n.prototype)&&o!==r.prototype&&ku(e,o),e},Vu=en,zu=Z,Gu=Rt,Wu=h,Hu=it("species"),Uu=function(e){var t=zu(e),r=Gu.f;Wu&&t&&!t[Hu]&&r(t,Hu,{configurable:!0,get:function(){return this}})},Qu=Rt.f,$u=ji,Yu=function(e,t,r){for(var n in t)Vu(e,n,t[n],r);return e},Ku=_c,Xu=gu,qu=vu,Ju=Va,Zu=Uu,es=h,ts=Za.exports.fastKey,rs=_r.set,ns=_r.getterFor,os={getConstructor:function(e,t,r,n){var o=e((function(e,o){Xu(e,i),rs(e,{type:t,index:$u(null),first:void 0,last:void 0,size:0}),es||(e.size=0),null!=o&&qu(o,e[n],{that:e,AS_ENTRIES:r})})),i=o.prototype,a=ns(t),c=function(e,t,r){var n,o,i=a(e),c=u(e,t);return c?c.value=r:(i.last=c={index:o=ts(t,!0),key:t,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=c),n&&(n.next=c),es?i.size++:e.size++,"F"!==o&&(i.index[o]=c)),e},u=function(e,t){var r,n=a(e),o=ts(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return Yu(i,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,es?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=u(t,e);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),es?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=Ku(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),Yu(i,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return c(this,0===e?0:e,t)}}:{add:function(e){return c(this,e=0===e?0:e,e)}}),es&&Qu(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(e,t,r){var n=t+" Iterator",o=ns(t),i=ns(n);Ju(e,t,(function(e,t){rs(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),Zu(t)}};(function(e,t,r){var n=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=n?"set":"add",a=Tu[e],c=a&&a.prototype,u=a,s={},f=function(e){var t=Iu(c[e]);ju(c,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!Du(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!Du(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!Du(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(Pu(e,!Mu(a)||!(o||c.forEach&&!Fu((function(){(new a).entries().next()})))))u=r.getConstructor(t,e,n,i),Ru.enable();else if(Pu(e,!0)){var p=new u,d=p[i](o?{}:-0,1)!=p,l=Fu((function(){p.has(1)})),v=_u((function(e){new a(e)})),h=!o&&Fu((function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)}));v||((u=t((function(e,t){Lu(e,c);var r=Bu(new a,e,u);return null!=t&&Au(t,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=c,c.constructor=u),(l||h)&&(f("delete"),f("has"),n&&f("get")),(h||d)&&f(i),o&&c.clear&&delete c.clear}s[e]=u,Cu({global:!0,constructor:!0,forced:u!=a},s),Nu(u,e),o||r.setStrong(u,e,n)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),os);var is=wo,as=lo?{}.toString:function(){return"[object "+is(this)+"]"};lo||en(Object.prototype,"toString",as,{unsafe:!0});var cs=wo,us=String,ss=function(e){if("Symbol"===cs(e))throw TypeError("Cannot convert a Symbol value to a string");return us(e)},fs=A,ps=an,ds=ss,ls=W,vs=fs("".charAt),hs=fs("".charCodeAt),ms=fs("".slice),gs=function(e){return function(t,r){var n,o,i=ds(ls(t)),a=ps(r),c=i.length;return a<0||a>=c?e?"":void 0:(n=hs(i,a))<55296||n>56319||a+1===c||(o=hs(i,a+1))<56320||o>57343?e?vs(i,a):n:e?ms(i,a,a+2):o-56320+(n-55296<<10)+65536}},ys={codeAt:gs(!1),charAt:gs(!0)},bs=ys.charAt,ws=ss,xs=_r,Ss=Va,Es="String Iterator",Os=xs.set,ks=xs.getterFor(Es);Ss(String,"String",(function(e){Os(this,{type:Es,string:ws(e),index:0})}),(function(){var e,t=ks(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=bs(r,n),t.index+=e.length,{value:e,done:!1})}));var Cs={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Ts=bt("span").classList,Is=Ts&&Ts.constructor&&Ts.constructor.prototype,Ps=Is===Object.prototype?void 0:Is,js=d,Rs=Cs,As=Ps,Ls=qa,Ms=Xt,Ds=it,Fs=Ds("iterator"),_s=Ds("toStringTag"),Ns=Ls.values,Bs=function(e,t){if(e){if(e[Fs]!==Ns)try{Ms(e,Fs,Ns)}catch(rg){e[Fs]=Ns}if(e[_s]||Ms(e,_s,t),Rs[t])for(var r in Ls)if(e[r]!==Ls[r])try{Ms(e,r,Ls[r])}catch(rg){e[r]=Ls[r]}}};for(var Vs in Rs)Bs(js[Vs]&&js[Vs].prototype,Vs);Bs(As,"DOMTokenList");var zs,Gs,Ws=Ft,Hs=v,Us=d.RegExp,Qs=Hs((function(){var e=Us("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),$s=Qs||Hs((function(){return!Us("a","y").sticky})),Ys={BROKEN_CARET:Qs||Hs((function(){var e=Us("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:$s,UNSUPPORTED_Y:Qs},Ks=v,Xs=d.RegExp,qs=Ks((function(){var e=Xs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Js=v,Zs=d.RegExp,ef=Js((function(){var e=Zs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),tf=b,rf=A,nf=ss,of=function(){var e=Ws(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},af=Ys,cf=je.exports,uf=ji,sf=_r.get,ff=qs,pf=ef,df=cf("native-string-replace",String.prototype.replace),lf=RegExp.prototype.exec,vf=lf,hf=rf("".charAt),mf=rf("".indexOf),gf=rf("".replace),yf=rf("".slice),bf=(Gs=/b*/g,tf(lf,zs=/a/,"a"),tf(lf,Gs,"a"),0!==zs.lastIndex||0!==Gs.lastIndex),wf=af.BROKEN_CARET,xf=void 0!==/()??/.exec("")[1];(bf||xf||wf||ff||pf)&&(vf=function(e){var t,r,n,o,i,a,c,u=this,s=sf(u),f=nf(e),p=s.raw;if(p)return p.lastIndex=u.lastIndex,t=tf(vf,p,f),u.lastIndex=p.lastIndex,t;var d=s.groups,l=wf&&u.sticky,v=tf(of,u),h=u.source,m=0,g=f;if(l&&(v=gf(v,"y",""),-1===mf(v,"g")&&(v+="g"),g=yf(f,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==hf(f,u.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,m++),r=new RegExp("^(?:"+h+")",v)),xf&&(r=new RegExp("^"+h+"$(?!\\s)",v)),bf&&(n=u.lastIndex),o=tf(lf,l?r:u,g),l?o?(o.input=yf(o.input,m),o[0]=yf(o[0],m),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:bf&&o&&(u.lastIndex=u.global?o.index+o[0].length:n),xf&&o&&o.length>1&&tf(df,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=a=uf(null),i=0;i<d.length;i++)a[(c=d[i])[0]]=o[c[1]];return o});var Sf=vf;no({target:"RegExp",proto:!0,forced:/./.exec!==Sf},{exec:Sf});var Ef=W,Of=ss,kf=A("".replace),Cf="[\t\n\v\f\r \u2028\u2029\ufeff]",Tf=RegExp("^"+Cf+Cf+"*"),If=RegExp(Cf+Cf+"*$"),Pf=function(e){return function(t){var r=Of(Ef(t));return 1&e&&(r=kf(r,Tf,"")),2&e&&(r=kf(r,If,"")),r}},jf={start:Pf(1),end:Pf(2),trim:Pf(3)},Rf=d,Af=v,Lf=ss,Mf=jf.trim,Df=A("".charAt),Ff=Rf.parseFloat,_f=Rf.Symbol,Nf=_f&&_f.iterator,Bf=1/Ff("\t\n\v\f\r \u2028\u2029\ufeff-0")!=-Infinity||Nf&&!Af((function(){Ff(Object(Nf))}))?function(e){var t=Mf(Lf(e)),r=Ff(t);return 0===r&&"-"==Df(t,0)?-0:r}:Ff;no({global:!0,forced:parseFloat!=Bf},{parseFloat:Bf});var Vf=A,zf=en,Gf=Sf,Wf=v,Hf=it,Uf=Xt,Qf=Hf("species"),$f=RegExp.prototype,Yf=ys.charAt,Kf=b,Xf=Ft,qf=$,Jf=F,Zf=Sf,ep=TypeError,tp=b,rp=function(e,t,r,n){var o=Hf(e),i=!Wf((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!Wf((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Qf]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var c=Vf(/./[o]),u=t(o,""[e],(function(e,t,r,n,o){var a=Vf(e),u=t.exec;return u===Gf||u===$f.exec?i&&!o?{done:!0,value:c(t,r,n)}:{done:!0,value:a(r,t,n)}:{done:!1}}));zf(String.prototype,e,u[0]),zf($f,o,u[1])}n&&Uf($f[o],"sham",!0)},np=Ft,op=ln,ip=ss,ap=W,cp=ke,up=function(e,t,r){return t+(r?Yf(e,t).length:1)},sp=function(e,t){var r=e.exec;if(qf(r)){var n=Kf(r,e,t);return null!==n&&Xf(n),n}if("RegExp"===Jf(e))return Kf(Zf,e,t);throw ep("RegExp#exec called on incompatible receiver")};rp("match",(function(e,t,r){return[function(t){var r=ap(this),n=null==t?void 0:cp(t,e);return n?tp(n,t,r):new RegExp(t)[e](ip(r))},function(e){var n=np(this),o=ip(e),i=r(t,n,o);if(i.done)return i.value;if(!n.global)return sp(n,o);var a=n.unicode;n.lastIndex=0;for(var c,u=[],s=0;null!==(c=sp(n,o));){var f=ip(c[0]);u[s]=f,""===f&&(n.lastIndex=up(o,op(n.lastIndex),a)),s++}return 0===s?null:u}]}));var fp=window.navigator&&window.navigator.userAgent||"",pp=/AppleWebKit\/([\d.]+)/i.exec(fp);pp&&parseFloat(pp.pop());var dp=/iPad/i.test(fp),lp=/iPhone/i.test(fp)&&!dp,vp=/iPod/i.test(fp),hp=lp||dp||vp;hp&&function(){var e=fp.match(/OS (\d+)_/i);e&&e[1]&&e[1]}();var mp=/Android/i.test(fp);mp&&function(){var e=fp.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),r=e[2]&&parseFloat(e[2]);t&&r&&parseFloat("".concat(e[1],".").concat(e[2]))}();mp&&/webkit/i.test(fp);var gp=/Firefox/i.test(fp),yp=gp&&function(){var e=fp.match(/Firefox\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),bp=/Edge\//i.test(fp),wp=bp&&function(){var e=fp.match(/Edge\/(\d+)/i);if(e&&e[1])return e[1]}(),xp=/Edg\//i.test(fp),Sp=xp&&function(){var e=fp.match(/Edg\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),Ep=/SogouMobileBrowser\//i.test(fp),Op=Ep&&function(){var e=fp.match(/SogouMobileBrowser\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),kp=/MetaSr\s/i.test(fp),Cp=kp&&function(){var e=fp.match(/MetaSr(\s\d+(\.\d+)+)/);return e&&e[1]?parseFloat(e[1]):null}(),Tp=/TBS\/\d+/i.test(fp),Ip=Tp&&function(){var e=fp.match(/TBS\/(\d+)/i);if(e&&e[1])return e[1]}(),Pp=/XWEB\/\d+/i.test(fp),jp=Pp&&function(){var e=fp.match(/XWEB\/(\d+)/i);if(e&&e[1])return e[1]}();/MSIE\s8\.0/.test(fp),/MSIE\/\d+/i.test(fp)&&function(){var e=/MSIE\s(\d+)\.\d/.exec(fp),t=e&&parseFloat(e[1]);!t&&/Trident\/7.0/i.test(fp)&&/rv:11.0/.test(fp)&&(t=11)}(),/windowswechat/i.test(fp);var Rp=/(micromessenger|webbrowser)/i.test(fp),Ap=Rp&&function(){var e=fp.match(/MicroMessenger\/(\d+)/i);if(e&&e[1])return e[1]}(),Lp=!Tp&&/MQQBrowser\/\d+/i.test(fp)&&/COVC\/\d+/i.test(fp),Mp=!Tp&&/MQQBrowser\/\d+/i.test(fp)&&!/COVC\/\d+/i.test(fp),Dp=(Mp||Lp)&&function(){var e=fp.match(/ MQQBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),Fp=!Tp&&/ QQBrowser\/\d+/i.test(fp),_p=Fp&&function(){var e=fp.match(/ QQBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),Np=!Tp&&/QQBrowserLite\/\d+/i.test(fp),Bp=Np&&function(){var e=fp.match(/QQBrowserLite\/([\d.]+)/);return e&&e[1]?e[1]:null}(),Vp=!Tp&&/MQBHD\/\d+/i.test(fp),zp=Vp&&function(){var e=fp.match(/MQBHD\/([\d.]+)/);return e&&e[1]?e[1]:null}(),Gp=/Windows/i.test(fp),Wp=!hp&&/MAC OS X/i.test(fp),Hp=!mp&&/Linux/i.test(fp);/MicroMessenger/i.test(fp);var Up=/UCBrowser/i.test(fp);/Electron/i.test(fp);var Qp=/MiuiBrowser/i.test(fp),$p=Qp&&function(){var e=fp.match(/MiuiBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),Yp=/HuaweiBrowser/i.test(fp),Kp=Yp&&function(){var e=fp.match(/HuaweiBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),Xp=/SamsungBrowser/i.test(fp),qp=Xp&&function(){var e=fp.match(/SamsungBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),Jp=/HeyTapBrowser/i.test(fp),Zp=Jp&&function(){var e=fp.match(/HeyTapBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),ed=/VivoBrowser/i.test(fp),td=ed&&function(){var e=fp.match(/VivoBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),rd=/Chrome/i.test(fp),nd=!bp&&!kp&&!Ep&&!Tp&&!Pp&&!xp&&!Fp&&!Qp&&!Yp&&!Xp&&!Jp&&!ed&&/Chrome/i.test(fp);nd&&function(){var e=fp.match(/Chrome\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var od=nd&&function(){var e=fp.match(/Chrome\/([\d.]+)/);return e&&e[1]?e[1]:null}(),id=!rd&&!Mp&&!Lp&&!Np&&!Vp&&/Safari/i.test(fp),ad=id&&function(){var e=fp.match(/Version\/([\d.]+)/);return e&&e[1]?e[1]:null}(),cd="file:"===location.protocol||"localhost"===location.hostname||/^\d+\.\d+\.\d+\.\d+$/.test(location.hostname),ud=new Map([[mp,"Android"],[hp,"iOS"],[Gp,"Windows"],[Wp,"MacOS"],[Hp,"Linux"]]),sd=new Map([[gp,["Firefox",yp]],[xp,["Edg",Sp]],[nd,["Chrome",od]],[id,["Safari",ad]],[Tp,["TBS",Ip]],[Pp,["XWEB",jp]],[Rp&&lp,["WeChat",Ap]],[Fp,["QQ(Win)",_p]],[Mp,["QQ(Mobile)",Dp]],[Lp,["QQ(Mobile X5)",Dp]],[Np,["QQ(Mac)",Bp]],[Vp,["QQ(iPad)",zp]],[Qp,["MI",$p]],[Yp,["HW",Kp]],[Xp,["Samsung",qp]],[Jp,["OPPO",Zp]],[ed,["VIVO",td]],[bp,["EDGE",wp]],[Ep,["SogouMobile",Op]],[kp,["Sogou",Cp]]]),fd=function(){var e="unknown",t="unknown";if(sd.get(!0)){var r=u(sd.get(!0),2);e=r[0],t=r[1]}return{name:e,version:t}},pd=navigator.userAgent,dd=function(){var e=void 0;screen.width&&(e={width:screen.width?screen.width*window.devicePixelRatio:"",height:screen.height?screen.height*window.devicePixelRatio:""});return e},ld=_c,vd=z,hd=Ve,md=hn,gd=zo,yd=A([].push),bd=function(e){var t=1==e,r=2==e,n=3==e,o=4==e,i=6==e,a=7==e,c=5==e||i;return function(u,s,f,p){for(var d,l,v=hd(u),h=vd(v),m=ld(s,f),g=md(h),y=0,b=p||gd,w=t?b(u,g):r||a?b(u,0):void 0;g>y;y++)if((c||y in h)&&(l=m(d=h[y],y,v),e))if(t)w[y]=l;else if(l)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:yd(w,d)}else switch(e){case 4:return!1;case 7:yd(w,d)}return i?-1:n||o?o:w}},wd={forEach:bd(0),map:bd(1),filter:bd(2),some:bd(3),every:bd(4),find:bd(5),findIndex:bd(6),filterReject:bd(7)},xd=wd.filter;no({target:"Array",proto:!0,forced:!Uo("filter")},{filter:function(e){return xd(this,e,arguments.length>1?arguments[1]:void 0)}});var Sd=v,Ed=function(e,t){var r=[][e];return!!r&&Sd((function(){r.call(null,t||function(){return 1},1)}))},Od=wd.forEach,kd=Ed("forEach")?[].forEach:function(e){return Od(this,e,arguments.length>1?arguments[1]:void 0)};no({target:"Array",proto:!0,forced:[].forEach!=kd},{forEach:kd});var Cd=function(){for(var e={isSupported:!1},t=["AudioContext","webkitAudioContext","mozAudioContext","msAudioContext"],r=0;r<t.length;r++)if(t[r]in window){e.isSupported=!0;break}return e.isSupported},Td=function(){var e=!1;return gp&&void 0!==window.mozRTCPeerConnection?"getSenders"in window.mozRTCPeerConnection.prototype&&(e=!0):nd&&void 0!==window.webkitRTCPeerConnection&&"getSenders"in window.webkitRTCPeerConnection.prototype&&(e=!0),e},Id=d,Pd=Cs,jd=Ps,Rd=kd,Ad=Xt,Ld=function(e){if(e&&e.forEach!==Rd)try{Ad(e,"forEach",Rd)}catch(rg){e.forEach=Rd}};for(var Md in Pd)Pd[Md]&&Ld(Id[Md]&&Id[Md].prototype);Ld(jd);var Dd=no,Fd=wn.indexOf,_d=Ed,Nd=A([].indexOf),Bd=!!Nd&&1/Nd([1],1,-0)<0,Vd=_d("indexOf");Dd({target:"Array",proto:!0,forced:Bd||!Vd},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Bd?Nd(this,e,t)||0:Fd(this,e,t)}});var zd=wd.map;no({target:"Array",proto:!0,forced:!Uo("map")},{map:function(e){return zd(this,e,arguments.length>1?arguments[1]:void 0)}});var Gd=Ve,Wd=Ki,Hd=zi;no({target:"Object",stat:!0,forced:v((function(){Wd(1)})),sham:!Hd},{getPrototypeOf:function(e){return Wd(Gd(e))}}),no({target:"Array",stat:!0},{isArray:io});var Ud=Object.prototype.hasOwnProperty;function Qd(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e)return 0===e.length;if("function"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(function(e){if(!e||"object"!==n(e)||"[object Object]"!=Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=Object.prototype.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Function.prototype.toString.call(r)===Function.prototype.toString.call(Object)}(e))switch(Object.prototype.toString.call(e)){case"[object File]":case"[object Map]":case"[object Set]":return 0===e.size;case"[object Object]":for(var t in e)if(Ud.call(e,t))return!1;return!0}return!1}var $d=function(e){return void 0===e},Yd=function(){var e=i(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!rl()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Kd(t);case 4:if(!(n=e.sent).audio){e.next=11;break}return e.next=8,cl();case 8:if(0!==e.sent.length){e.next=11;break}throw new Error({message:"no microphone detected, but you are trying to get audio stream, please check your microphone and the configuration on TRTC.createStream."});case 11:if(!n.video){e.next=17;break}return e.next=14,al();case 14:if(0!==e.sent.length){e.next=17;break}throw new Error({message:"no camera detected, but you are trying to get video stream, please check your camera and the configuration on TRTC.createStream."});case 17:return e.next=19,navigator.mediaDevices.getUserMedia(n);case 19:return e.abrupt("return",e.sent);case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function Kd(e){return Xd.apply(this,arguments)}function Xd(){return(Xd=i(r().mark((function e(n){var o,i,a,c;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o={echoCancellation:n.echoCancellation,autoGainControl:n.autoGainControl,noiseSuppression:n.noiseSuppression},n.audio){e.next=5;break}o=!1,e.next=15;break;case 5:if(Qd(n.microphoneId)){e.next=9;break}o=t({deviceId:{exact:n.microphoneId},sampleRate:n.sampleRate,channelCount:n.channelCount},o),e.next=15;break;case 9:return o=t({sampleRate:n.sampleRate,channelCount:n.channelCount},o),e.next=12,cl();case 12:i=e.sent,(a=i.filter((function(e){var t=e.deviceId;return t.length>0&&"default"!==t}))).length>0&&(o.deviceId={exact:a[0].deviceId});case 15:return c={},c=!$d(n.facingMode)&&n.video?{facingMode:n.facingMode,width:n.width,height:n.height,frameRate:n.frameRate}:!Qd(n.cameraId)&&n.video?{deviceId:{exact:n.cameraId},width:n.width,height:n.height,frameRate:n.frameRate}:!!n.video&&(!!$d(n.width)||{width:n.width,height:n.height,frameRate:n.frameRate}),e.abrupt("return",{audio:o,video:c});case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qd,Jd,Zd,el,tl=function(){var e=i(r().mark((function e(t){var n,o,i,a,c,u,s,f,p,d,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=[7680,4320],e.prev=1,e.next=4,Yd({cameraId:t,video:!0,audio:!1,width:o[0],height:o[1]});case 4:if(n=e.sent,!(i=n.getTracks()[0])||!i.getCapabilities){e.next=14;break}if(s=i.getCapabilities(),f=null==s||null===(a=s.width)||void 0===a?void 0:a.max,p=null==s||null===(c=s.height)||void 0===c?void 0:c.max,d=null==s||null===(u=s.frameRate)||void 0===u?void 0:u.max,!(f&&p&&d)){e.next=14;break}return i.stop(),e.abrupt("return",{maxWidth:f,maxHeight:p,maxFrameRate:d});case 14:return l=i.getSettings(),i.stop(),e.abrupt("return",{maxWidth:l.width,maxHeight:l.height});case 19:e.prev=19,e.t0=e.catch(1),console.error(e.t0);case 22:case"end":return e.stop()}}),e,null,[[1,19]])})));return function(t){return e.apply(this,arguments)}}(),rl=function(){return!!$d(navigator.mediaDevices)&&(console.error("navigator.mediaDevices is not supported on your browser"),!0)},nl=function(){return"http:"===location.protocol&&!cd&&(console.error("you should use https"),!0)},ol=function(){if(!navigator.mediaDevices)return!1;var e=["getUserMedia","enumerateDevices"];return e.filter((function(e){return e in navigator.mediaDevices})).length===e.length},il=function(){var e=i(r().mark((function e(){var t,n,o,i,a,c,u,s,f;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!nl()&&!rl()){e.next=2;break}return e.abrupt("return",[]);case 2:return t=!1,n=!1,o=[],i=[],a=[],c={},e.next=13,navigator.mediaDevices.enumerateDevices();case 13:if(e.sent.forEach((function(e){var r={};for(var u in e)try{"function"!=typeof e[u]&&(r[u]=e[u])}catch(s){}c[r.deviceId+r.label+r.kind]||("audio"===r.kind&&(r.kind="audioinput"),"video"===r.kind&&(r.kind="videoinput"),r.deviceId||(r.deviceId=r.id),r.label?("videoinput"!==r.kind||t||(t=!0),"audioinput"!==r.kind||n||(n=!0)):"videoinput"===r.kind?r.label="Camera ".concat(a.length+1):"audioinput"===r.kind?r.label="Microphone ".concat(o.length+1):"audiooutput"===r.kind?r.label="Speaker ".concat(i.length+1):r.label="Please invoke getUserMedia once.","audioinput"===r.kind&&-1===o.indexOf(r)&&o.push(r),"audiooutput"===r.kind&&-1===i.indexOf(r)&&i.push(r),"videoinput"===r.kind&&-1===a.indexOf(r)&&a.push(r),c[r.deviceId+r.label+r.kind]=r)})),!t&&a.length>1&&(t=!0),!n&&o.length>1&&(n=!0),!t){e.next=28;break}u=0;case 19:if(!(u<a.length)){e.next=28;break}return s=a[u],e.next=23,tl(s.deviceId);case 23:f=e.sent,s.resolution=f;case 25:u++,e.next=19;break;case 28:return e.abrupt("return",{hasCameraPermission:t,hasMicrophonePermission:n,cameras:a,speakers:i,microphones:o});case 29:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),al=function(){var e=i(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!nl()&&!rl()){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,navigator.mediaDevices.enumerateDevices();case 4:return t=e.sent,e.abrupt("return",t.filter((function(e){return"videoinput"===e.kind})).map((function(e,t){var r=e.label;e.label||(r="camera_".concat(t));var n={label:r,deviceId:e.deviceId,kind:e.kind};return e.groupId&&(n.groupId=e.groupId),n})));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),cl=function(){var e=i(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!nl()&&!rl()){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,navigator.mediaDevices.enumerateDevices();case 4:return t=e.sent,e.abrupt("return",t.filter((function(e){return"audioinput"===e.kind})).map((function(e,t){var r=e.label;e.label||(r="microphone_".concat(t));var n={label:r,deviceId:e.deviceId,kind:e.kind};return e.groupId&&(n.groupId=e.groupId),n})));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ul="process"==F(d.process),sl=Mo,fl=be,pl=TypeError,dl=Ft,ll=function(e){if(sl(e))return e;throw pl(fl(e)+" is not a constructor")},vl=it("species"),hl=m,ml=Function.prototype,gl=ml.apply,yl=ml.call,bl="object"==typeof Reflect&&Reflect.apply||(hl?yl.bind(gl):function(){return yl.apply(gl,arguments)}),wl=A([].slice),xl=TypeError,Sl=function(e,t){if(e<t)throw xl("Not enough arguments");return e},El=/(?:ipad|iphone|ipod).*applewebkit/i.test(te),Ol=d,kl=bl,Cl=_c,Tl=$,Il=We,Pl=v,jl=yi,Rl=wl,Al=bt,Ll=Sl,Ml=El,Dl=ul,Fl=Ol.setImmediate,_l=Ol.clearImmediate,Nl=Ol.process,Bl=Ol.Dispatch,Vl=Ol.Function,zl=Ol.MessageChannel,Gl=Ol.String,Wl=0,Hl={},Ul="onreadystatechange";try{qd=Ol.location}catch(rg){}var Ql=function(e){if(Il(Hl,e)){var t=Hl[e];delete Hl[e],t()}},$l=function(e){return function(){Ql(e)}},Yl=function(e){Ql(e.data)},Kl=function(e){Ol.postMessage(Gl(e),qd.protocol+"//"+qd.host)};Fl&&_l||(Fl=function(e){Ll(arguments.length,1);var t=Tl(e)?e:Vl(e),r=Rl(arguments,1);return Hl[++Wl]=function(){kl(t,void 0,r)},Jd(Wl),Wl},_l=function(e){delete Hl[e]},Dl?Jd=function(e){Nl.nextTick($l(e))}:Bl&&Bl.now?Jd=function(e){Bl.now($l(e))}:zl&&!Ml?(el=(Zd=new zl).port2,Zd.port1.onmessage=Yl,Jd=Cl(el.postMessage,el)):Ol.addEventListener&&Tl(Ol.postMessage)&&!Ol.importScripts&&qd&&"file:"!==qd.protocol&&!Pl(Kl)?(Jd=Kl,Ol.addEventListener("message",Yl,!1)):Jd=Ul in Al("script")?function(e){jl.appendChild(Al("script")).onreadystatechange=function(){jl.removeChild(this),Ql(e)}}:function(e){setTimeout($l(e),0)});var Xl,ql,Jl,Zl,ev,tv,rv,nv,ov={set:Fl,clear:_l},iv=d,av=/ipad|iphone|ipod/i.test(te)&&void 0!==iv.Pebble,cv=/web0s(?!.*chrome)/i.test(te),uv=d,sv=_c,fv=l.f,pv=ov.set,dv=El,lv=av,vv=cv,hv=ul,mv=uv.MutationObserver||uv.WebKitMutationObserver,gv=uv.document,yv=uv.process,bv=uv.Promise,wv=fv(uv,"queueMicrotask"),xv=wv&&wv.value;xv||(Xl=function(){var e,t;for(hv&&(e=yv.domain)&&e.exit();ql;){t=ql.fn,ql=ql.next;try{t()}catch(rg){throw ql?Zl():Jl=void 0,rg}}Jl=void 0,e&&e.enter()},dv||hv||vv||!mv||!gv?!lv&&bv&&bv.resolve?((rv=bv.resolve(void 0)).constructor=bv,nv=sv(rv.then,rv),Zl=function(){nv(Xl)}):hv?Zl=function(){yv.nextTick(Xl)}:(pv=sv(pv,uv),Zl=function(){pv(Xl)}):(ev=!0,tv=gv.createTextNode(""),new mv(Xl).observe(tv,{characterData:!0}),Zl=function(){tv.data=ev=!ev}));var Sv=xv||function(e){var t={fn:e,next:void 0};Jl&&(Jl.next=t),ql||(ql=t,Zl()),Jl=t},Ev=d,Ov=function(e){try{return{error:!1,value:e()}}catch(rg){return{error:!0,value:rg}}},kv=function(){this.head=null,this.tail=null};kv.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var Cv=kv,Tv=d.Promise,Iv="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Pv=!Iv&&!ul&&"object"==typeof window&&"object"==typeof document,jv=d,Rv=Tv,Av=$,Lv=Kn,Mv=fr,Dv=it,Fv=Pv,_v=Iv,Nv=ue;Rv&&Rv.prototype;var Bv=Dv("species"),Vv=!1,zv=Av(jv.PromiseRejectionEvent),Gv=Lv("Promise",(function(){var e=Mv(Rv),t=e!==String(Rv);if(!t&&66===Nv)return!0;if(!Nv||Nv<51||!/native code/.test(e)){var r=new Rv((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Bv]=n,!(Vv=r.then((function(){}))instanceof n))return!0}return!t&&(Fv||_v)&&!zv})),Wv={CONSTRUCTOR:Gv,REJECTION_EVENT:zv,SUBCLASSING:Vv},Hv={},Uv=Ee,Qv=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=Uv(t),this.reject=Uv(r)};Hv.f=function(e){return new Qv(e)};var $v,Yv,Kv,Xv=no,qv=ul,Jv=d,Zv=b,eh=en,th=wa,rh=ca,nh=Uu,oh=Ee,ih=$,ah=K,ch=gu,uh=function(e,t){var r,n=dl(e).constructor;return void 0===n||null==(r=dl(n)[vl])?t:ll(r)},sh=ov.set,fh=Sv,ph=function(e,t){var r=Ev.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},dh=Ov,lh=Cv,vh=_r,hh=Tv,mh=Hv,gh="Promise",yh=Wv.CONSTRUCTOR,bh=Wv.REJECTION_EVENT,wh=Wv.SUBCLASSING,xh=vh.getterFor(gh),Sh=vh.set,Eh=hh&&hh.prototype,Oh=hh,kh=Eh,Ch=Jv.TypeError,Th=Jv.document,Ih=Jv.process,Ph=mh.f,jh=Ph,Rh=!!(Th&&Th.createEvent&&Jv.dispatchEvent),Ah="unhandledrejection",Lh=function(e){var t;return!(!ah(e)||!ih(t=e.then))&&t},Mh=function(e,t){var r,n,o,i=t.value,a=1==t.state,c=a?e.ok:e.fail,u=e.resolve,s=e.reject,f=e.domain;try{c?(a||(2===t.rejection&&Bh(t),t.rejection=1),!0===c?r=i:(f&&f.enter(),r=c(i),f&&(f.exit(),o=!0)),r===e.promise?s(Ch("Promise-chain cycle")):(n=Lh(r))?Zv(n,r,u,s):u(r)):s(i)}catch(rg){f&&!o&&f.exit(),s(rg)}},Dh=function(e,t){e.notified||(e.notified=!0,fh((function(){for(var r,n=e.reactions;r=n.get();)Mh(r,e);e.notified=!1,t&&!e.rejection&&_h(e)})))},Fh=function(e,t,r){var n,o;Rh?((n=Th.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Jv.dispatchEvent(n)):n={promise:t,reason:r},!bh&&(o=Jv["on"+e])?o(n):e===Ah&&ph("Unhandled promise rejection",r)},_h=function(e){Zv(sh,Jv,(function(){var t,r=e.facade,n=e.value;if(Nh(e)&&(t=dh((function(){qv?Ih.emit("unhandledRejection",n,r):Fh(Ah,r,n)})),e.rejection=qv||Nh(e)?2:1,t.error))throw t.value}))},Nh=function(e){return 1!==e.rejection&&!e.parent},Bh=function(e){Zv(sh,Jv,(function(){var t=e.facade;qv?Ih.emit("rejectionHandled",t):Fh("rejectionhandled",t,e.value)}))},Vh=function(e,t,r){return function(n){e(t,n,r)}},zh=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Dh(e,!0))},Gh=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Ch("Promise can't be resolved itself");var n=Lh(t);n?fh((function(){var r={done:!1};try{Zv(n,t,Vh(Gh,r,e),Vh(zh,r,e))}catch(rg){zh(r,rg,e)}})):(e.value=t,e.state=1,Dh(e,!1))}catch(rg){zh({done:!1},rg,e)}}};if(yh&&(kh=(Oh=function(e){ch(this,kh),oh(e),Zv($v,this);var t=xh(this);try{e(Vh(Gh,t),Vh(zh,t))}catch(rg){zh(t,rg)}}).prototype,($v=function(e){Sh(this,{type:gh,done:!1,notified:!1,parent:!1,reactions:new lh,rejection:!1,state:0,value:void 0})}).prototype=eh(kh,"then",(function(e,t){var r=xh(this),n=Ph(uh(this,Oh));return r.parent=!0,n.ok=!ih(e)||e,n.fail=ih(t)&&t,n.domain=qv?Ih.domain:void 0,0==r.state?r.reactions.add(n):fh((function(){Mh(n,r)})),n.promise})),Yv=function(){var e=new $v,t=xh(e);this.promise=e,this.resolve=Vh(Gh,t),this.reject=Vh(zh,t)},mh.f=Ph=function(e){return e===Oh||undefined===e?new Yv(e):jh(e)},ih(hh)&&Eh!==Object.prototype)){Kv=Eh.then,wh||eh(Eh,"then",(function(e,t){var r=this;return new Oh((function(e,t){Zv(Kv,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Eh.constructor}catch(rg){}th&&th(Eh,kh)}Xv({global:!0,constructor:!0,wrap:!0,forced:yh},{Promise:Oh}),rh(Oh,gh,!1),nh(gh);var Wh=Tv,Hh=Wv.CONSTRUCTOR||!Su((function(e){Wh.all(e).then(void 0,(function(){}))})),Uh=b,Qh=Ee,$h=Hv,Yh=Ov,Kh=vu;no({target:"Promise",stat:!0,forced:Hh},{all:function(e){var t=this,r=$h.f(t),n=r.resolve,o=r.reject,i=Yh((function(){var r=Qh(t.resolve),i=[],a=0,c=1;Kh(e,(function(e){var u=a++,s=!1;c++,Uh(r,t,e).then((function(e){s||(s=!0,i[u]=e,--c||n(i))}),o)})),--c||n(i)}));return i.error&&o(i.value),r.promise}});var Xh=no,qh=Wv.CONSTRUCTOR,Jh=Tv,Zh=Z,em=$,tm=en,rm=Jh&&Jh.prototype;if(Xh({target:"Promise",proto:!0,forced:qh,real:!0},{catch:function(e){return this.then(void 0,e)}}),em(Jh)){var nm=Zh("Promise").prototype.catch;rm.catch!==nm&&tm(rm,"catch",nm,{unsafe:!0})}var om=b,im=Ee,am=Hv,cm=Ov,um=vu;no({target:"Promise",stat:!0,forced:Hh},{race:function(e){var t=this,r=am.f(t),n=r.reject,o=cm((function(){var o=im(t.resolve);um(e,(function(e){om(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var sm=b,fm=Hv;no({target:"Promise",stat:!0,forced:Wv.CONSTRUCTOR},{reject:function(e){var t=fm.f(this);return sm(t.reject,void 0,e),t.promise}});var pm=Ft,dm=K,lm=Hv,vm=no,hm=Wv.CONSTRUCTOR,mm=function(e,t){if(pm(e),dm(t)&&t.constructor===e)return t;var r=lm.f(e);return(0,r.resolve)(t),r.promise};Z("Promise"),vm({target:"Promise",stat:!0,forced:hm},{resolve:function(e){return mm(this,e)}});var gm=d,ym=bl,bm=$,wm=wl,xm=Sl,Sm=/MSIE .\./.test(te),Em=gm.Function,Om=function(e){return Sm?function(t,r){var n=xm(arguments.length,1)>2,o=bm(t)?t:Em(t),i=n?wm(arguments,2):void 0;return e(n?function(){ym(o,this,i)}:o,r)}:e},km={setTimeout:Om(gm.setTimeout),setInterval:Om(gm.setInterval)},Cm=km.setInterval;no({global:!0,bind:!0,forced:d.setInterval!==Cm},{setInterval:Cm});var Tm=km.setTimeout;no({global:!0,bind:!0,forced:d.setTimeout!==Tm},{setTimeout:Tm});var Im=no,Pm=wd.findIndex,jm=Bi,Rm="findIndex",Am=!0;Rm in[]&&Array(1).findIndex((function(){Am=!1})),Im({target:"Array",proto:!0,forced:Am},{findIndex:function(e){return Pm(this,e,arguments.length>1?arguments[1]:void 0)}}),jm(Rm);var Lm={},Mm={},Dm={exports:{}},Fm=Dm.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(Fm).forEach((function(e){Fm[e].forEach((function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))})),function(e){var t=function(e){return String(Number(e))===e?Number(e):e},r=function(e,r,n){var o=e.name&&e.names;e.push&&!r[e.push]?r[e.push]=[]:o&&!r[e.name]&&(r[e.name]={});var i=e.push?{}:o?r[e.name]:r;!function(e,r,n,o){if(o&&!n)r[o]=t(e[1]);else for(var i=0;i<n.length;i+=1)null!=e[i+1]&&(r[n[i]]=t(e[i+1]))}(n.match(e.reg),i,e.names,e.name),e.push&&r[e.push].push(i)},n=Dm.exports,o=RegExp.prototype.test.bind(/^([a-z])=(.*)/);e.parse=function(e){var t={},i=[],a=t;return e.split(/(\r\n|\r|\n)/).filter(o).forEach((function(e){var t=e[0],o=e.slice(2);"m"===t&&(i.push({rtp:[],fmtp:[]}),a=i[i.length-1]);for(var c=0;c<(n[t]||[]).length;c+=1){var u=n[t][c];if(u.reg.test(o))return r(u,a,o)}})),t.media=i,t};var i=function(e,r){var n=r.split(/=(.+)/,2);return 2===n.length?e[n[0]]=t(n[1]):1===n.length&&r.length>1&&(e[n[0]]=void 0),e};e.parseParams=function(e){return e.split(/;\s?/).reduce(i,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){return e.toString().split(" ").map(Number)},e.parseRemoteCandidates=function(e){for(var r=[],n=e.split(" ").map(t),o=0;o<n.length;o+=3)r.push({component:n[o],ip:n[o+1],port:n[o+2]});return r},e.parseImageAttributes=function(e){return e.split(" ").map((function(e){return e.substring(1,e.length-1).split(",").reduce(i,{})}))},e.parseSimulcastStreamList=function(e){return e.split(";").map((function(e){return e.split(",").map((function(e){var r,n=!1;return"~"!==e[0]?r=t(e):(r=t(e.substring(1,e.length)),n=!0),{scid:r,paused:n}}))}))}}(Mm);var _m=Dm.exports,Nm=/%[sdv%]/g,Bm=function(e){var t=1,r=arguments,n=r.length;return e.replace(Nm,(function(e){if(t>=n)return e;var o=r[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(o);case"%d":return Number(o);case"%v":return""}}))},Vm=function(e,t,r){var n=[e+"="+(t.format instanceof Function?t.format(t.push?r:r[t.name]):t.format)];if(t.names)for(var o=0;o<t.names.length;o+=1){var i=t.names[o];t.name?n.push(r[t.name][i]):n.push(r[t.names[o]])}else n.push(r[t.name]);return Bm.apply(null,n)},zm=["v","o","s","i","u","e","p","c","b","t","r","z","a"],Gm=["i","c","b","a"],Wm=Mm,Hm=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach((function(e){null==e.payloads&&(e.payloads="")}));var r=t.outerOrder||zm,n=t.innerOrder||Gm,o=[];return r.forEach((function(t){_m[t].forEach((function(r){r.name in e&&null!=e[r.name]?o.push(Vm(t,r,e)):r.push in e&&null!=e[r.push]&&e[r.push].forEach((function(e){o.push(Vm(t,r,e))}))}))})),e.media.forEach((function(e){o.push(Vm("m",_m.m[0],e)),n.forEach((function(t){_m[t].forEach((function(r){r.name in e&&null!=e[r.name]?o.push(Vm(t,r,e)):r.push in e&&null!=e[r.push]&&e[r.push].forEach((function(e){o.push(Vm(t,r,e))}))}))}))})),o.join("\r\n")+"\r\n"};Lm.write=Hm,Lm.parse=Wm.parse,Lm.parseParams=Wm.parseParams,Lm.parseFmtpConfig=Wm.parseFmtpConfig,Lm.parsePayloads=Wm.parsePayloads,Lm.parseRemoteCandidates=Wm.parseRemoteCandidates,Lm.parseImageAttributes=Wm.parseImageAttributes,Lm.parseSimulcastStreamList=Wm.parseSimulcastStreamList;var Um=function(){var e=i(r().mark((function e(){var t,n,o,i,a,c;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="",n=!1,o=!1,e.prev=3,i=new RTCPeerConnection,(a=document.createElement("canvas")).getContext("2d"),c=a.captureStream(0),i.addTrack(c.getVideoTracks()[0],c),e.next=11,i.createOffer();case 11:return-1!==(t=e.sent).sdp.toLowerCase().indexOf("h264")&&(n=!0),-1!==t.sdp.toLowerCase().indexOf("vp8")&&(o=!0),i.close(),e.abrupt("return",{isH264EncodeSupported:n,isVp8EncodeSupported:o});case 18:return e.prev=18,e.t0=e.catch(3),e.abrupt("return",{isH264EncodeSupported:!1,isVp8EncodeSupported:!1});case 21:case"end":return e.stop()}}),e,null,[[3,18]])})));return function(){return e.apply(this,arguments)}}(),Qm=function(){var e=i(r().mark((function e(){var t,n,o,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="",n=!1,o=!1,e.prev=3,i=new RTCPeerConnection,e.next=7,i.createOffer({offerToReceiveAudio:1,offerToReceiveVideo:1});case 7:return-1!==(t=e.sent).sdp.toLowerCase().indexOf("h264")&&(n=!0),-1!==t.sdp.toLowerCase().indexOf("vp8")&&(o=!0),i.close(),e.abrupt("return",{isH264DecodeSupported:n,isVp8DecodeSupported:o});case 14:return e.prev=14,e.t0=e.catch(3),e.abrupt("return",{isH264DecodeSupported:!1,isVp8DecodeSupported:!1});case 17:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(){return e.apply(this,arguments)}}(),$m=function(){var e=i(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=i(r().mark((function e(t){var n,o,a,c,u,s,f,p,d,l,v,h,m,g;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={encode:!1,decode:!1},o=null,e.prev=2,a=document.createElement("canvas"),c=a.getContext("2d"),a.width=640,a.height=480,u=setInterval((function(){c.fillText("test",Math.floor(640*Math.random()),Math.floor(480*Math.random()))}),33),s=-1,f=-1,o=function(){clearInterval(s),clearInterval(u),clearTimeout(f),d.close(),l.close(),p.getTracks().forEach((function(e){return e.stop()}))},f=setTimeout((function(){o(),t(n)}),3e3),p=a.captureStream(),d=new RTCPeerConnection({}),l=new RTCPeerConnection({offerToReceiveAudio:!0,offerToReceiveVideo:!0}),d.addEventListener("icecandidate",(function(e){return l.addIceCandidate(e.candidate)})),l.addEventListener("icecandidate",(function(e){return d.addIceCandidate(e.candidate)})),d.addTrack(p.getVideoTracks()[0],p),e.next=20,d.createOffer();case 20:return v=e.sent,e.next=23,d.setLocalDescription(v);case 23:return e.next=25,l.setRemoteDescription(v);case 25:return e.next=27,l.createAnswer();case 27:return h=e.sent,m=Lm.parse(h.sdp),g=m.media[0].rtp.findIndex((function(e){return"H264"===e.codec})),m.media[0].rtp=[m.media[0].rtp[g]],m.media[0].fmtp=m.media[0].fmtp.filter((function(e){return e.payload===m.media[0].rtp[0].payload})),m.media[0].rtcpFb=m.media[0].rtcpFb.filter((function(e){return e.payload===m.media[0].rtp[0].payload})),h.sdp=Lm.write(m),e.next=36,l.setLocalDescription(h);case 36:return e.next=38,d.setRemoteDescription(h);case 38:s=setInterval(i(r().mark((function e(){var i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.encode&&n.decode&&(o(),t(n)),e.next=3,d.getStats();case 3:return i=e.sent,e.next=6,l.getStats();case 6:a=e.sent,n.encode||i.forEach((function(e){"outbound-rtp"===e.type&&"video"===e.mediaType&&e.framesEncoded>0&&(n.encode=!0)})),n.decode||a.forEach((function(e){"inbound-rtp"===e.type&&"video"===e.mediaType&&e.framesDecoded>0&&(n.decode=!0)}));case 9:case"end":return e.stop()}}),e)}))),500),e.next=45;break;case 41:e.prev=41,e.t0=e.catch(2),o(),t(n);case 45:case"end":return e.stop()}}),e,null,[[2,41]])})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ym=no,Km=wd.find,Xm=Bi,qm="find",Jm=!0;function Zm(){return eg.apply(this,arguments)}function eg(){return eg=i(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=i(r().mark((function e(t,n){var o,a,c,u,s,f,p,d,l,v,h,m,g,y;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=function(){clearInterval(g),clearInterval(u),clearTimeout(y),f.close(),p.close(),s.getTracks().forEach((function(e){return e.stop()}))},a=document.createElement("canvas"),c=a.getContext("2d"),a.width=640,a.height=480,u=setInterval((function(){c.fillText("test",0,0)}),33),s=a.captureStream(15),f=new RTCPeerConnection({}),p=new RTCPeerConnection({}),f.addEventListener("icecandidate",(function(e){p.addIceCandidate(e.candidate)})),p.addEventListener("icecandidate",(function(e){f.addIceCandidate(e.candidate)})),d=RTCRtpSender.getCapabilities("video"),l=d.codecs,v=l.find((function(e){return"video/H264"===e.mimeType})),f.addTransceiver(s.getVideoTracks()[0],{direction:"sendonly",streams:[s],sendEncodings:[{maxBitrate:5e5}]}),p.addTransceiver("video",{direction:"recvonly"}),f.getTransceivers()[0].setCodecPreferences([v]),e.next=19,f.createOffer();case 19:return h=e.sent,e.next=22,f.setLocalDescription(h);case 22:return e.next=24,p.setRemoteDescription(h);case 24:return e.next=26,p.createAnswer();case 26:return m=e.sent,e.next=29,p.setLocalDescription(m);case 29:return e.next=31,f.setRemoteDescription(m);case 31:g=-1,y=-1,y=setTimeout((function(){o(),t(!1)}),3e4),g=setInterval(i(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.getStats();case 2:e.sent.forEach((function(e){"outbound-rtp"===e.type&&"video"===e.mediaType&&(void 0===e.encoderImplementation&&(o(),n(new Error("your browser does not support to detect HW acceleration enabled."))),"ExternalEncoder"===e.encoderImplementation&&(o(),t(!0)))}));case 4:case"end":return e.stop()}}),e)}))),500),e.next=40;break;case 37:e.prev=37,e.t0=e.catch(0),n(e.t0);case 40:case"end":return e.stop()}}),e,null,[[0,37]])})));return function(t,r){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),eg.apply(this,arguments)}qm in[]&&Array(1).find((function(){Jm=!1})),Ym({target:"Array",proto:!0,forced:Jm},{find:function(e){return Km(this,e,arguments.length>1?arguments[1]:void 0)}}),Xm(qm);var tg=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.system=null,this.APISupported=null,this.devices=null,this.codecsSupported=null,this.report=null}var t,n,o,c,u,s,f,p;return t=e,n=[{key:"isTRTCSupported",value:(p=i(r().mark((function e(){var t,n,o,i,a,c,u,s,f;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getReportAsync();case 2:if(t=this.APISupported,n=t.isWebRTCSupported,o=t.isUserMediaSupported,i=t.isWebSocketSupported,n){e.next=5;break}return e.abrupt("return",{result:!1,reason:"Your browser does not support WebRTC."});case 5:if(i){e.next=7;break}return e.abrupt("return",{result:!1,reason:"Your browser does not support WebSocket."});case 7:if(o){e.next=9;break}return e.abrupt("return",{result:!1,reason:"Your browser does not support getUserMedia."});case 9:if(a=this.codecsSupported,c=a.isH264EncodeSupported,u=a.isVp8EncodeSupported,s=a.isH264DecodeSupported,f=a.isVp8DecodeSupported,c||u){e.next=12;break}return e.abrupt("return",{result:!1,reason:"isH264EncodeSupported: ".concat(c," isVp8EncodeSupported: ").concat(u," ")});case 12:if(s||f){e.next=14;break}return e.abrupt("return",{result:!1,reason:"isH264DecodeSupported: ".concat(s," isVp8DecodeSupported: ").concat(f," ")});case 14:if(!(Up||bp||xp&&Sp<80||gp&&yp<56)){e.next=16;break}return e.abrupt("return",{result:!1,reason:"your browser does not qualify, it is recommended to use Chrome and firefox."});case 16:return e.abrupt("return",{result:!0});case 17:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"getReportAsync",value:(f=i(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.getSystem(),this.getAPISupported(),e.next=4,this.getCodecAsync();case 4:return e.next=6,this.getDevicesAsync();case 6:return this.report={system:this.system,APISupported:this.APISupported,codecsSupported:this.codecsSupported,devices:this.devices},e.abrupt("return",this.report);case 8:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"getCodecAsync",value:(s=i(r().mark((function e(){var t,n,o,i,a,c,u,s,f;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Um();case 2:return t=e.sent,n=t.isH264EncodeSupported,o=t.isVp8EncodeSupported,e.next=7,Qm();case 7:if(i=e.sent,a=i.isH264DecodeSupported,c=i.isVp8DecodeSupported,!n||!a||!Jp&&!ed){e.next=18;break}return e.next=13,$m();case 13:u=e.sent,s=u.encode,f=u.decode,n=s,a=f;case 18:return this.codecsSupported={isH264EncodeSupported:n,isVp8EncodeSupported:o,isH264DecodeSupported:a,isVp8DecodeSupported:c},e.abrupt("return",this.codecsSupported);case 20:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getDevicesAsync",value:(u=i(r().mark((function e(){var t,n,o,i,a,c;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,il();case 2:return t=e.sent,n=t.hasCameraPermission,o=t.hasMicrophonePermission,i=t.cameras,a=t.microphones,c=t.speakers,this.devices={cameras:i,microphones:a,speakers:c,hasCameraPermission:n,hasMicrophonePermission:o},e.abrupt("return",this.devices);case 10:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"getSystem",value:function(){var e,t;return this.system={UA:pd,OS:(t="unknown",ud.get(!0)&&(t=ud.get(!0)),t),browser:fd(),displayResolution:dd(),hardwareConcurrency:null===(e=window.navigator)||void 0===e?void 0:e.hardwareConcurrency},this.system}},{key:"getAPISupported",value:function(){var e,t,r;return this.APISupported={isUserMediaSupported:ol(),isWebRTCSupported:["RTCPeerConnection","webkitRTCPeerConnection","RTCIceGatherer"].filter((function(e){return e in window})).length>0,isWebSocketSupported:"WebSocket"in window&&2===window.WebSocket.CLOSING,isWebAudioSupported:Cd(),isScreenCaptureAPISupported:!(null===(r=navigator.mediaDevices)||void 0===r||!r.getDisplayMedia),isCanvasCapturingSupported:(t=!1,["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){"undefined"!=typeof document&&"function"==typeof document.createElement&&!t&&e in document.createElement("canvas")&&(t=!0)})),t),isVideoCapturingSupported:(e=!1,["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(t){"undefined"!=typeof document&&"function"==typeof document.createElement&&!e&&t in document.createElement("video")&&(e=!0)})),e),isRTPSenderReplaceTracksSupported:Td(),isApplyConstraintsSupported:"undefined"!=typeof MediaStreamTrack&&"applyConstraints"in MediaStreamTrack.prototype},this.APISupported}},{key:"isHardWareAccelerationEnabled",value:(c=i(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Zm();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return c.apply(this,arguments)})}],n&&a(t.prototype,n),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();return tg}));