function liveWebinar(e,t,n,r){var i={_license_key:e,_role_token:r,_registration_token:"",_widget_containerID:"embedWidget",_nickname:t,_widget_width:"100%",_widget_height:"100vh",_email:n};!function(){var e;(e=window).Widget=function(t){"function"==typeof t&&e.Widget.__cbs.push(t),e.Widget.initialized&&(e.Widget.__cbs.forEach((function(e){e()})),e.Widget.__cbs=[])},e.Widget.__cbs=[];var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://embed.archiebot.com/em?t="+i._license_key+"&"+Object.keys(i).reduce((function(e,t){return e.push(t+"="+encodeURIComponent(i[t])),e}),[]).join("&");var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)}()}function wowzaScript(e,t){var n=document.createElement("link");function r(){var n,r=document.createElement("div");r.innerHTML="
",n=r.firstChild,document.getElementById("wowza_player").appendChild(n),params={poster:t,preload:"none",autoplay:!1,playlist:[{mediaid:"test3",title:"test3",file:e,sources:[],live:!0,countdown:!1,countdown_timestamp:"",live_done:!1}],freecaster:{player_root:"https://player.cloud.wowza.com/hosted/bn91nxpr/",get_video_path:"wowza.json",noactions:!0,template_livedate:"%a %e %b %Y @ %H:%M",template_countdown:"%days day(s) %hours:%minutes:%seconds",live_done_message:"Thanks for watching!",live_done_image:null,watermark_path:"",watermark_href:"#",watermark_position:"top-left"}};var i=document.getElementById("wowza_player").getAttribute("techOrder");i&&(params.techOrder=i.split(" "));var o=document.createElement("script");o.type="text/javascript",o.src="//player.cloud.wowza.com/js-lib/fc-vjs-wrapper.js",document.getElementsByTagName("head")[0].appendChild(o);var a=document.createElement("style");a.innerHTML='\n.vjs-error .vjs-error-display:before {\n content: "" !important;\n}\n\n.vjs-error-display.vjs-modal-dialog {\n background: none !important;\n}\n\n.fc-poster #fcplayer_freecaster_countdown {\n height: 95px !important;\n width: 280px !important;\n font-size: 18px !important;\n top: 70px !important;\n\n font-weight: bold;\n line-height: 25px;\n padding-left: 40px;\n padding-top: 10px;\n border-radius: 0px 20px 20px 0px;\n background: rgba(0,0,0,0.5);\n color: #FFFFFF;\n z-index: 1000;\n}\n\n.fc-poster #fcplayer_freecaster_countdown #fcplayer_freecaster_countdown_livedate::before {\n content: "Stream will start on:";\n font-size: 15px;\n font-weight: bold;\n display: block;\n color: #FFFFFF;\n clear: both;\n}\n\n.fc-overlays {\n pointer-events: none;\n}\n',document.getElementsByTagName("head")[0].appendChild(a)}n.rel="stylesheet",n.href="//player.cloud.wowza.com/wowza_embed.css",n.onload=function(){var e=document.createElement("link");e.rel="stylesheet",e.href="//player.cloud.wowza.com/js-lib/video-js-5/video-js.min.css",e.onload=r,document.getElementsByTagName("head")[0].appendChild(e)},document.getElementsByTagName("head")[0].appendChild(n)}!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,(function(e,t){"use strict";var n=[],r=Object.getPrototypeOf,i=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,c={},l=c.toString,u=c.hasOwnProperty,d=u.toString,p=d.call(Object),f={},h=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},m=function(e){return null!=e&&e===e.window},g=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var r,i,o=(n=n||g).createElement("script");if(o.text=e,t)for(r in v)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[l.call(e)]||"object":typeof e}var x="3.5.1",w=function(e,t){return new w.fn.init(e,t)};function C(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!h(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+F+")"+F+"*"),U=new RegExp(F+"|>"),$=new RegExp(V),G=new RegExp("^"+N+"$"),Y={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+V),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+F+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){p()},ae=xe((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(D=A.call(w.childNodes),w.childNodes)}catch(t){O={apply:D.length?function(e,t){R.apply(e,A.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,u,d,h,v,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i&&(p(t),t=t||f,m)){if(11!==w&&(d=Z.exec(e)))if(o=d[1]){if(9===w){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(d[2])return O.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!P[e+" "]&&(!g||!g.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===w&&(U.test(e)||q.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(re,ie):t.setAttribute("id",u=x)),s=(h=a(e)).length;s--;)h[s]=(u?"#"+u:":scope")+" "+be(h[s]);v=h.join(",")}try{return O.apply(r,y.querySelectorAll(v)),r}catch(t){P(e,!0)}finally{u===x&&t.removeAttribute("id")}}}return c(e.replace(W,"$1"),t,r,i)}function ce(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[x]=!0,e}function ue(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=(e.ownerDocument||e).documentElement;return!X.test(e.namespaceURI||t&&t.nodeName||"HTML")},p=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=f&&9===a.nodeType&&a.documentElement&&(h=(f=a).documentElement,m=!o(f),w!=f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ue((function(e){return h.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(f.getElementsByClassName),n.getById=ue((function(e){return h.appendChild(e).id=x,!f.getElementsByName||!f.getElementsByName(x).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=Q.test(f.querySelectorAll))&&(ue((function(e){var t;h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+F+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+x+"-]").length||g.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+F+"*name"+F+"*="+F+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+F+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Q.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",V)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),b=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},E=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==f||e.ownerDocument==w&&b(w,e)?-1:t==f||t.ownerDocument==w&&b(w,t)?1:u?L(u,e)-L(u,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==f?-1:t==f?1:i?-1:o?1:u?L(u,e)-L(u,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?pe(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0}),f},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&m&&!P[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){P(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&_(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function M(e,t,n){return h(t)?w.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?w.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?w.grep(e,(function(e){return-1)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:I.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(w.merge(this,w.parseHTML(r[1],(t=t instanceof w?t[0]:t)&&t.nodeType?t.ownerDocument||t:g,!0)),E.test(r[1])&&w.isPlainObject(t))for(r in t)h(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=g.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):h(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,D=w(g);var R=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter((function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ue=g.createDocumentFragment().appendChild(g.createElement("div")),(de=g.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),ue.appendChild(de),f.checkClone=ue.cloneNode(!0).cloneNode(!0).lastChild.checked,ue.innerHTML="",f.noCloneChecked=!!ue.cloneNode(!0).lastChild.defaultValue,ue.innerHTML="",f.option=!!ue.lastChild;var me={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&P(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var ye=/<|&#?\w+;/;function be(e,t,n,r,i){for(var o,a,s,c,l,u,d=t.createDocumentFragment(),p=[],f=0,h=e.length;f\s*$/g;function Ie(e,t){return P(e,"table")&&P(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function Re(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ae(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(X.hasData(e)&&(s=X.get(e).events))for(i in X.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Ut,$t=[],Gt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=$t.pop()||w.expando+"_"+St.guid++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Gt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=h(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Gt,"$1"+i):!1!==t.jsonp&&(t.url+=(_t.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always((function(){void 0===o?w(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,$t.push(i)),a&&h(o)&&o(a[0]),a=o=void 0})),"script"})),f.createHTMLDocument=((Ut=g.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),w.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((r=(t=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,t.head.appendChild(r)):t=g),o=!n&&[],(i=E.exec(e))?[t.createElement(i[1])]:(i=be([e],t,o),o&&o.length&&w(o).remove(),w.merge([],i.childNodes)));var r,i,o},w.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(w.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},w.expr.pseudos.animated=function(e){return w.grep(w.timers,(function(t){return e===t.elem})).length},w.offset={setOffset:function(e,t,n){var r,i,o,a,s,c,l=w.css(e,"position"),u=w(e),d={};"static"===l&&(e.style.position="relative"),s=u.offset(),o=w.css(e,"top"),c=w.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+c).indexOf("auto")?(a=(r=u.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(c)||0),h(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),u.css(d))}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){w.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?{top:(t=r.getBoundingClientRect()).top+(n=r.ownerDocument.defaultView).pageYOffset,left:t.left+n.pageXOffset}:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===w.css(e,"position");)e=e.offsetParent;return e||re}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return W(this,(function(e,r,i){var o;if(m(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),w.each(["top","left"],(function(e,t){w.cssHooks[t]=We(f.pixelPosition,(function(e,n){if(n)return n=ze(e,t),Fe.test(n)?w(e).position()[t]+"px":n}))})),w.each({Height:"height",Width:"width"},(function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return W(this,(function(t,n,i){var o;return m(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){w.fn[t]=function(e){return this.on(t,e)}})),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){w.fn[t]=function(e,n){return 0n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,r=void 0===t?.5:t,i=2*r-1,o=this.alpha()-n.alpha(),a=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-a;return this.rgb(a*this.red()+s*n.red(),a*this.green()+s*n.green(),a*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new o,r=this.values,i=n.values;for(var a in r)r.hasOwnProperty(a)&&("[object Array]"===(t={}.toString.call(e=r[a]))?i[a]=e.slice(0):"[object Number]"===t?i[a]=e:console.error("unexpected color value:",e));return n}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(e){for(var t=this.values,n={},r=0;r.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]}function u(e){var t=l(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]}function d(e){var t,n,r,i,o,a=e[0]/360,s=e[1]/100,c=e[2]/100;if(0==s)return[o=255*c,o,o];t=2*c-(n=c<.5?c*(1+s):c+s-c*s),i=[0,0,0];for(var l=0;l<3;l++)(r=a+1/3*-(l-1))<0&&r++,r>1&&r--,i[l]=255*(o=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t);return i}function p(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*o),c=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,c,a];case 1:return[s,r,a];case 2:return[a,r,c];case 3:return[a,s,r];case 4:return[c,a,r];case 5:return[r,a,s]}}function f(e){var t,n,i,o,a=e[0]/360,s=e[1]/100,c=e[2]/100,l=s+c;switch(l>1&&(s/=l,c/=l),i=6*a-(t=Math.floor(6*a)),0!=(1&t)&&(i=1-i),o=s+i*((n=1-c)-s),t){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function h(e){var t=e[1]/100,n=e[2]/100,r=e[3]/100;return[255*(1-Math.min(1,e[0]/100*(1-r)+r)),255*(1-Math.min(1,t*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r))]}function m(e){var t,n,r,i=e[0]/100,o=e[1]/100,a=e[2]/100;return n=-.9689*i+1.8758*o+.0415*a,r=.0557*i+-.204*o+1.057*a,t=(t=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:t*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]}function v(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]}function y(e){var t,n,r,i,o=e[0],a=e[1],s=e[2];return o<=8?i=(n=100*o/903.3)/100*7.787+16/116:(n=100*Math.pow((o+16)/116,3),i=Math.pow(n/100,1/3)),[t=t/95.047<=.008856?t=95.047*(a/500+i-16/116)/7.787:95.047*Math.pow(a/500+i,3),n,r=r/108.883<=.008859?r=108.883*(i-s/200-16/116)/7.787:108.883*Math.pow(i-s/200,3)]}function x(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]}function w(e){return m(y(e))}function C(e){var t,n=e[1];return t=e[2]/360*2*Math.PI,[e[0],n*Math.cos(t),n*Math.sin(t)]}function S(e){return _[e]}t.exports={rgb2hsl:i,rgb2hsv:o,rgb2hwb:a,rgb2cmyk:s,rgb2keyword:c,rgb2xyz:l,rgb2lab:u,rgb2lch:function(e){return x(u(e))},hsl2rgb:d,hsl2hsv:function(e){var t=e[1]/100,n=e[2]/100;return 0===n?[0,0,0]:[e[0],2*(t*=(n*=2)<=1?n:2-n)/(n+t)*100,(n+t)/2*100]},hsl2hwb:function(e){return a(d(e))},hsl2cmyk:function(e){return s(d(e))},hsl2keyword:function(e){return c(d(e))},hsv2rgb:p,hsv2hsl:function(e){var t,n,r=e[1]/100,i=e[2]/100;return t=r*i,[e[0],100*(t=(t/=(n=(2-r)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(e){return a(p(e))},hsv2cmyk:function(e){return s(p(e))},hsv2keyword:function(e){return c(p(e))},hwb2rgb:f,hwb2hsl:function(e){return i(f(e))},hwb2hsv:function(e){return o(f(e))},hwb2cmyk:function(e){return s(f(e))},hwb2keyword:function(e){return c(f(e))},cmyk2rgb:h,cmyk2hsl:function(e){return i(h(e))},cmyk2hsv:function(e){return o(h(e))},cmyk2hwb:function(e){return a(h(e))},cmyk2keyword:function(e){return c(h(e))},keyword2rgb:S,keyword2hsl:function(e){return i(S(e))},keyword2hsv:function(e){return o(S(e))},keyword2hwb:function(e){return a(S(e))},keyword2cmyk:function(e){return s(S(e))},keyword2lab:function(e){return u(S(e))},keyword2xyz:function(e){return l(S(e))},xyz2rgb:m,xyz2lab:v,xyz2lch:function(e){return x(v(e))},lab2xyz:y,lab2rgb:w,lab2lch:x,lch2lab:C,lch2xyz:function(e){return y(C(e))},lch2rgb:function(e){return w(C(e))}};var _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},k={};for(var T in _)k[JSON.stringify(_[T])]=T},{}],5:[function(e,t,n){var r=e(4),i=function(){return new l};for(var o in r){i[o+"Raw"]=function(e){return function(t){return"number"==typeof t&&(t=Array.prototype.slice.call(arguments)),r[e](t)}}(o);var a=/(\w+)2(\w+)/.exec(o),s=a[1],c=a[2];(i[s]=i[s]||{})[c]=i[o]=function(e){return function(t){"number"==typeof t&&(t=Array.prototype.slice.call(arguments));var n=r[e](t);if("string"==typeof n||void 0===n)return n;for(var i=0;i0&&(e[0].yLabel?n=e[0].yLabel:t.labels.length>0&&e[0].index');var n=e.data,r=n.datasets,i=n.labels;if(r.length)for(var o=0;o'),i[o]&&t.push(i[o]),t.push("");return t.push(""),t.join("")},legend:{labels:{generateLabels:function(e){var n=e.data;return n.labels.length&&n.datasets.length?n.labels.map((function(r,i){var o=e.getDatasetMeta(0),a=n.datasets[0],s=o.data[i],c=s&&s.custom||{},l=t.getValueAtIndexOrDefault,u=e.options.elements.arc;return{text:r,fillStyle:c.backgroundColor?c.backgroundColor:l(a.backgroundColor,i,u.backgroundColor),strokeStyle:c.borderColor?c.borderColor:l(a.borderColor,i,u.borderColor),lineWidth:c.borderWidth?c.borderWidth:l(a.borderWidth,i,u.borderWidth),hidden:isNaN(a.data[i])||o.data[i].hidden,index:i}})):[]}},onClick:function(e,t){var n,r,i,o=t.index,a=this.chart;for(n=0,r=(a.data.datasets||[]).length;n=Math.PI?-1:h<-Math.PI?1:0))+f,g={x:Math.cos(h),y:Math.sin(h)},v={x:Math.cos(m),y:Math.sin(m)},y=h<=0&&0<=m||h<=2*Math.PI&&2*Math.PI<=m,b=h<=.5*Math.PI&&.5*Math.PI<=m||h<=2.5*Math.PI&&2.5*Math.PI<=m,x=h<=-Math.PI&&-Math.PI<=m||h<=Math.PI&&Math.PI<=m,w=h<=.5*-Math.PI&&.5*-Math.PI<=m||h<=1.5*Math.PI&&1.5*Math.PI<=m,C=p/100,S={x:x?-1:Math.min(g.x*(g.x<0?1:C),v.x*(v.x<0?1:C)),y:w?-1:Math.min(g.y*(g.y<0?1:C),v.y*(v.y<0?1:C))},_={x:y?1:Math.max(g.x*(g.x>0?1:C),v.x*(v.x>0?1:C)),y:b?1:Math.max(g.y*(g.y>0?1:C),v.y*(v.y>0?1:C))},k={width:.5*(_.x-S.x),height:.5*(_.y-S.y)};l=Math.min(s/k.width,c/k.height),u={x:-.5*(_.x+S.x),y:-.5*(_.y+S.y)}}r.borderWidth=n.getMaxBorderWidth(d.data),r.outerRadius=Math.max((l-r.borderWidth)/2,0),r.innerRadius=Math.max(p?r.outerRadius/100*p:0,0),r.radiusLength=(r.outerRadius-r.innerRadius)/r.getVisibleDatasetCount(),r.offsetX=u.x*r.outerRadius,r.offsetY=u.y*r.outerRadius,d.total=n.calculateTotal(),n.outerRadius=r.outerRadius-r.radiusLength*n.getRingIndex(n.index),n.innerRadius=Math.max(n.outerRadius-r.radiusLength,0),t.each(d.data,(function(t,r){n.updateElement(t,r,e)}))},updateElement:function(e,n,r){var i=this,o=i.chart,a=o.chartArea,s=o.options,c=s.animation,l=(a.left+a.right)/2,u=(a.top+a.bottom)/2,d=s.rotation,p=s.rotation,f=i.getDataset(),h=r&&c.animateRotate||e.hidden?0:i.calculateCircumference(f.data[n])*(s.circumference/(2*Math.PI));t.extend(e,{_datasetIndex:i.index,_index:n,_model:{x:l+o.offsetX,y:u+o.offsetY,startAngle:d,endAngle:p,circumference:h,outerRadius:r&&c.animateScale?0:i.outerRadius,innerRadius:r&&c.animateScale?0:i.innerRadius,label:(0,t.getValueAtIndexOrDefault)(f.label,n,o.data.labels[n])}});var m=e._model;this.removeHoverStyle(e),r&&c.animateRotate||(m.startAngle=0===n?s.rotation:i.getMeta().data[n-1]._model.endAngle,m.endAngle=m.startAngle+m.circumference),e.pivot()},removeHoverStyle:function(t){e.DatasetController.prototype.removeHoverStyle.call(this,t,this.chart.options.elements.arc)},calculateTotal:function(){var e,n=this.getDataset(),r=this.getMeta(),i=0;return t.each(r.data,(function(t,r){e=n.data[r],isNaN(e)||t.hidden||(i+=Math.abs(e))})),i},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?2*Math.PI*(e/t):0},getMaxBorderWidth:function(e){for(var t,n,r=0,i=this.index,o=e.length,a=0;a(r=(t=e[a]._model?e[a]._model.borderWidth:0)>r?t:r)?n:r;return r}})}},{}],18:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers;function n(e,n){return t.getValueOrDefault(e.showLine,n.showLines)}e.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},e.controllers.line=e.DatasetController.extend({datasetElementType:e.elements.Line,dataElementType:e.elements.Point,update:function(e){var r,i,o,a=this,s=a.getMeta(),c=s.dataset,l=s.data||[],u=a.chart.options,d=u.elements.line,p=a.getScaleForId(s.yAxisID),f=a.getDataset(),h=n(f,u);for(h&&(o=c.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),c._scale=p,c._datasetIndex=a.index,c._children=l,c._model={spanGaps:f.spanGaps?f.spanGaps:u.spanGaps,tension:o.tension?o.tension:t.getValueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:t.getValueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:t.getValueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode),scaleTop:p.top,scaleBottom:p.bottom,scaleZero:p.getBasePixel()},c.pivot()),r=0,i=l.length;r');var n=e.data,r=n.datasets,i=n.labels;if(r.length)for(var o=0;o'),i[o]&&t.push(i[o]),t.push("");return t.push(""),t.join("")},legend:{labels:{generateLabels:function(e){var n=e.data;return n.labels.length&&n.datasets.length?n.labels.map((function(r,i){var o=e.getDatasetMeta(0),a=n.datasets[0],s=o.data[i].custom||{},c=t.getValueAtIndexOrDefault,l=e.options.elements.arc;return{text:r,fillStyle:s.backgroundColor?s.backgroundColor:c(a.backgroundColor,i,l.backgroundColor),strokeStyle:s.borderColor?s.borderColor:c(a.borderColor,i,l.borderColor),lineWidth:s.borderWidth?s.borderWidth:c(a.borderWidth,i,l.borderWidth),hidden:isNaN(a.data[i])||o.data[i].hidden,index:i}})):[]}},onClick:function(e,t){var n,r,i,o=t.index,a=this.chart;for(n=0,r=(a.data.datasets||[]).length;n0&&!isNaN(e)?2*Math.PI/t:0}})}},{}],20:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers;e.defaults.radar={aspectRatio:1,scale:{type:"radialLinear"},elements:{line:{tension:0}}},e.controllers.radar=e.DatasetController.extend({datasetElementType:e.elements.Line,dataElementType:e.elements.Point,linkScales:t.noop,update:function(e){var n=this,r=n.getMeta(),i=r.data,o=r.dataset.custom||{},a=n.getDataset(),s=n.chart.options.elements.line,c=n.chart.scale;void 0!==a.tension&&void 0===a.lineTension&&(a.lineTension=a.tension),t.extend(r.dataset,{_datasetIndex:n.index,_children:i,_loop:!0,_model:{tension:o.tension?o.tension:t.getValueOrDefault(a.lineTension,s.tension),backgroundColor:o.backgroundColor?o.backgroundColor:a.backgroundColor||s.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:a.borderWidth||s.borderWidth,borderColor:o.borderColor?o.borderColor:a.borderColor||s.borderColor,fill:o.fill?o.fill:void 0!==a.fill?a.fill:s.fill,borderCapStyle:o.borderCapStyle?o.borderCapStyle:a.borderCapStyle||s.borderCapStyle,borderDash:o.borderDash?o.borderDash:a.borderDash||s.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:a.borderDashOffset||s.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:a.borderJoinStyle||s.borderJoinStyle,scaleTop:c.top,scaleBottom:c.bottom,scaleZero:c.getBasePosition()}}),r.dataset.pivot(),t.each(i,(function(t,r){n.updateElement(t,r,e)}),n),n.updateBezierControlPoints()},updateElement:function(e,n,r){var i=this,o=e.custom||{},a=i.getDataset(),s=i.chart.scale,c=i.chart.options.elements.point,l=s.getPointPositionForValue(n,a.data[n]);t.extend(e,{_datasetIndex:i.index,_index:n,_scale:s,_model:{x:r?s.xCenter:l.x,y:r?s.yCenter:l.y,tension:o.tension?o.tension:t.getValueOrDefault(a.lineTension,i.chart.options.elements.line.tension),radius:o.radius?o.radius:t.getValueAtIndexOrDefault(a.pointRadius,n,c.radius),backgroundColor:o.backgroundColor?o.backgroundColor:t.getValueAtIndexOrDefault(a.pointBackgroundColor,n,c.backgroundColor),borderColor:o.borderColor?o.borderColor:t.getValueAtIndexOrDefault(a.pointBorderColor,n,c.borderColor),borderWidth:o.borderWidth?o.borderWidth:t.getValueAtIndexOrDefault(a.pointBorderWidth,n,c.borderWidth),pointStyle:o.pointStyle?o.pointStyle:t.getValueAtIndexOrDefault(a.pointStyle,n,c.pointStyle),hitRadius:o.hitRadius?o.hitRadius:t.getValueAtIndexOrDefault(a.hitRadius,n,c.hitRadius)}}),e._model.skip=o.skip?o.skip:isNaN(e._model.x)||isNaN(e._model.y)},updateBezierControlPoints:function(){var e=this.chart.chartArea,n=this.getMeta();t.each(n.data,(function(r,i){var o=r._model,a=t.splineCurve(t.previousItem(n.data,i,!0)._model,o,t.nextItem(n.data,i,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(a.previous.x,e.right),e.left),o.controlPointPreviousY=Math.max(Math.min(a.previous.y,e.bottom),e.top),o.controlPointNextX=Math.max(Math.min(a.next.x,e.right),e.left),o.controlPointNextY=Math.max(Math.min(a.next.y,e.bottom),e.top),r.pivot()}))},draw:function(e){var n=this.getMeta(),r=e||1;t.each(n.data,(function(e){e.transition(r)})),n.dataset.transition(r).draw(),t.each(n.data,(function(e){e.draw()}))},setHoverStyle:function(e){var n=this.chart.data.datasets[e._datasetIndex],r=e.custom||{},i=e._index,o=e._model;o.radius=r.hoverRadius?r.hoverRadius:t.getValueAtIndexOrDefault(n.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),o.backgroundColor=r.hoverBackgroundColor?r.hoverBackgroundColor:t.getValueAtIndexOrDefault(n.pointHoverBackgroundColor,i,t.getHoverColor(o.backgroundColor)),o.borderColor=r.hoverBorderColor?r.hoverBorderColor:t.getValueAtIndexOrDefault(n.pointHoverBorderColor,i,t.getHoverColor(o.borderColor)),o.borderWidth=r.hoverBorderWidth?r.hoverBorderWidth:t.getValueAtIndexOrDefault(n.pointHoverBorderWidth,i,o.borderWidth)},removeHoverStyle:function(e){var n=this.chart.data.datasets[e._datasetIndex],r=e.custom||{},i=e._index,o=e._model,a=this.chart.options.elements.point;o.radius=r.radius?r.radius:t.getValueAtIndexOrDefault(n.radius,i,a.radius),o.backgroundColor=r.backgroundColor?r.backgroundColor:t.getValueAtIndexOrDefault(n.pointBackgroundColor,i,a.backgroundColor),o.borderColor=r.borderColor?r.borderColor:t.getValueAtIndexOrDefault(n.pointBorderColor,i,a.borderColor),o.borderWidth=r.borderWidth?r.borderWidth:t.getValueAtIndexOrDefault(n.pointBorderWidth,i,a.borderWidth)}})}},{}],21:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers;e.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:t.noop,onComplete:t.noop},e.Animation=e.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),e.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(e,t,n,r){var i=this;r||(e.animating=!0);for(var o=0;o1&&(n=Math.floor(e.dropFrames),e.dropFrames=e.dropFrames%1);for(var r=0;re.animations[r].animationObject.numSteps&&(e.animations[r].animationObject.currentStep=e.animations[r].animationObject.numSteps),e.animations[r].animationObject.render(e.animations[r].chartInstance,e.animations[r].animationObject),e.animations[r].animationObject.onAnimationProgress&&e.animations[r].animationObject.onAnimationProgress.call&&e.animations[r].animationObject.onAnimationProgress.call(e.animations[r].chartInstance,e.animations[r]),e.animations[r].animationObject.currentStep===e.animations[r].animationObject.numSteps?(e.animations[r].animationObject.onAnimationComplete&&e.animations[r].animationObject.onAnimationComplete.call&&e.animations[r].animationObject.onAnimationComplete.call(e.animations[r].chartInstance,e.animations[r]),e.animations[r].chartInstance.animating=!1,e.animations.splice(r,1)):++r;var i=Date.now();e.dropFrames+=(i-t)/e.frameDuration,e.animations.length>0&&e.requestAnimationFrame()}}}},{}],22:[function(e,t,n){"use strict";t.exports=function(e){var t=e.canvasHelpers={};t.drawPoint=function(t,n,r,i,o){var a,s,c,l,u,d;if("object"!=typeof n||"[object HTMLImageElement]"!==(a=n.toString())&&"[object HTMLCanvasElement]"!==a){if(!(isNaN(r)||r<=0)){switch(n){default:t.beginPath(),t.arc(i,o,r,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),u=(s=3*r/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-s/2,o+u/3),t.lineTo(i+s/2,o+u/3),t.lineTo(i,o-2*u/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*r,t.beginPath(),t.fillRect(i-d,o-d,2*d,2*d),t.strokeRect(i-d,o-d,2*d,2*d);break;case"rectRounded":var p=r/Math.SQRT2,f=Math.SQRT2*r;e.helpers.drawRoundedRectangle(t,i-p,o-p,f,f,r/2),t.fill();break;case"rectRot":d=1/Math.SQRT2*r,t.beginPath(),t.moveTo(i-d,o),t.lineTo(i,o+d),t.lineTo(i+d,o),t.lineTo(i,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,o+r),t.lineTo(i,o-r),t.moveTo(i-r,o),t.lineTo(i+r,o),t.closePath();break;case"crossRot":t.beginPath(),c=Math.cos(Math.PI/4)*r,l=Math.sin(Math.PI/4)*r,t.moveTo(i-c,o-l),t.lineTo(i+c,o+l),t.moveTo(i-c,o+l),t.lineTo(i+c,o-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,o+r),t.lineTo(i,o-r),t.moveTo(i-r,o),t.lineTo(i+r,o),c=Math.cos(Math.PI/4)*r,l=Math.sin(Math.PI/4)*r,t.moveTo(i-c,o-l),t.lineTo(i+c,o+l),t.moveTo(i-c,o+l),t.lineTo(i+c,o-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-r,o),t.lineTo(i+r,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,o),t.lineTo(i+r,o),t.closePath()}t.stroke()}}else t.drawImage(n,i-n.width/2,o-n.height/2)},t.clipArea=function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},t.unclipArea=function(e){e.restore()}}},{}],23:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers,n=e.plugins,r=e.platform;e.types={},e.instances={},e.controllers={},e.Controller=function(n,i,o){var a=this;i=function(n){var r=(n=n||{}).data=n.data||{};return r.datasets=r.datasets||[],r.labels=r.labels||[],n.options=t.configMerge(e.defaults.global,e.defaults[n.type],n.options||{}),n}(i);var s=r.acquireContext(n,i),c=s&&s.canvas,l=c&&c.height,u=c&&c.width;return o.ctx=s,o.canvas=c,o.config=i,o.width=u,o.height=l,o.aspectRatio=l?u/l:null,a.id=t.uid(),a.chart=o,a.config=i,a.options=i.options,a._bufferedRender=!1,e.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data}}),s&&c?(a.initialize(),a.update(),a):(console.error("Failed to create chart: can't acquire context from the given item"),a)},t.extend(e.Controller.prototype,{initialize:function(){var e=this;return n.notify(e,"beforeInit"),t.retinaScale(e.chart),e.bindEvents(),e.options.responsive&&e.resize(!0),e.ensureScalesHaveIDs(),e.buildScales(),e.initToolTip(),n.notify(e,"afterInit"),e},clear:function(){return t.clear(this.chart),this},stop:function(){return e.animationService.cancelAnimation(this),this},resize:function(e){var r=this,i=r.chart,o=i.canvas,a=r.options.maintainAspectRatio&&i.aspectRatio||null,s=Math.floor(t.getMaximumWidth(o)),c=Math.floor(a?s/a:t.getMaximumHeight(o));if((i.width!==s||i.height!==c)&&(o.width=i.width=s,o.height=i.height=c,o.style.width=s+"px",o.style.height=c+"px",t.retinaScale(i),!e)){var l={width:s,height:c};n.notify(r,"resize",[l]),r.options.onResize&&r.options.onResize(r,l),r.stop(),r.update(r.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var e=this.options,n=e.scales||{},r=e.scale;t.each(n.xAxes,(function(e,t){e.id=e.id||"x-axis-"+t})),t.each(n.yAxes,(function(e,t){e.id=e.id||"y-axis-"+t})),r&&(r.id=r.id||"scale")},buildScales:function(){var n=this,r=n.options,i=n.scales={},o=[];r.scales&&(o=o.concat((r.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category"}})),(r.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear"}})))),r.scale&&o.push({options:r.scale,dtype:"radialLinear",isDefault:!0}),t.each(o,(function(r){var o=r.options,a=t.getValueOrDefault(o.type,r.dtype),s=e.scaleService.getScaleConstructor(a);if(s){var c=new s({id:o.id,options:o,ctx:n.chart.ctx,chart:n});i[c.id]=c,r.isDefault&&(n.scale=c)}})),e.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var n=this,r=[],i=[];if(t.each(n.data.datasets,(function(t,o){var a=n.getDatasetMeta(o);a.type||(a.type=t.type||n.config.type),r.push(a.type),a.controller?a.controller.updateIndex(o):(a.controller=new e.controllers[a.type](n,o),i.push(a.controller))}),n),r.length>1)for(var o=1;o0||(n.forEach((function(t){delete e[t]})),delete e._chartjs)}}e.DatasetController=function(e,t){this.initialize(e,t)},t.extend(e.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(e,t){this.chart=e,this.index=t,this.linkScales(),this.addElements()},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.getDataset();null===e.xAxisID&&(e.xAxisID=t.xAxisID||this.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=t.yAxisID||this.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},reset:function(){this.update(!0)},destroy:function(){this._data&&r(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),r=this.getDataset().data||[],i=n.data;for(e=0,t=r.length;en&&this.insertElements(n,r-n)},insertElements:function(e,t){for(var n=0;n=0;o--)t.call(r,e[o],o);else for(o=0;o=i[r].length||!i[r][o].type?i[r].push(n.configMerge(s,t)):i[r][o]=t.type&&t.type!==i[r][o].type?n.configMerge(i[r][o],s,t):n.configMerge(i[r][o],t)})):(i[r]=[],n.each(t,(function(t){var o=n.getValueOrDefault(t.type,"xAxes"===r?"category":"linear");i[r].push(n.configMerge(e.scaleService.getScaleDefaults(o),t))}))):i[r]=i.hasOwnProperty(r)&&"object"==typeof i[r]&&null!==i[r]&&"object"==typeof t?n.configMerge(i[r],t):t})),i},n.getValueAtIndexOrDefault=function(e,t,r){return null==e?r:n.isArray(e)?t=0;r--){var i=e[r];if(t(i))return i}},n.inherits=function(e){var t=this,r=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},i=function(){this.constructor=r};return i.prototype=t.prototype,r.prototype=new i,r.extend=n.inherits,e&&n.extend(r.prototype,e),r.__super__=t.prototype,r},n.noop=function(){},n.uid=(t=0,function(){return t++}),n.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},n.almostEquals=function(e,t,n){return Math.abs(e-t)e},n.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},n.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},n.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},n.log10=Math.log10?function(e){return Math.log10(e)}:function(e){return Math.log(e)/Math.LN10},n.toRadians=function(e){return e*(Math.PI/180)},n.toDegrees=function(e){return e*(180/Math.PI)},n.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),o=Math.atan2(r,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:i}},n.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},n.aliasPixel=function(e){return e%2==0?0:.5},n.splineCurve=function(e,t,n,r){var i=e.skip?t:e,o=t,a=n.skip?t:n,s=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),c=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),l=s/(s+c),u=c/(s+c),d=r*(l=isNaN(l)?0:l),p=r*(u=isNaN(u)?0:u);return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+p*(a.x-i.x),y:o.y+p*(a.y-i.y)}}},n.EPSILON=Number.EPSILON||1e-14,n.splineCurveMonotone=function(e){var t,r,i,o,a,s,c,l,u,d=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),p=d.length;for(t=0;t0?d[t-1]:null,(o=t0?d[t-1]:null)&&!r.model.skip&&(i.model.controlPointPreviousX=i.model.x-(u=(i.model.x-r.model.x)/3),i.model.controlPointPreviousY=i.model.y-u*i.mK),o&&!o.model.skip&&(i.model.controlPointNextX=i.model.x+(u=(o.model.x-i.model.x)/3),i.model.controlPointNextY=i.model.y+u*i.mK))},n.nextItem=function(e,t,n){return n?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},n.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},n.niceNum=function(e,t){var r=Math.floor(n.log10(e)),i=e/Math.pow(10,r);return(t?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,r)};var i=n.easingEffects={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-1*e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return 1*((e=e/1-1)*e*e+1)},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-1*((e=e/1-1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return 1*(e/=1)*e*e*e*e},easeOutQuint:function(e){return 1*((e=e/1-1)*e*e*e*e+1)},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return-1*Math.cos(e/1*(Math.PI/2))+1},easeOutSine:function(e){return 1*Math.sin(e/1*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e/1)-1)},easeInExpo:function(e){return 0===e?1:1*Math.pow(2,10*(e/1-1))},easeOutExpo:function(e){return 1===e?1:1*(1-Math.pow(2,-10*e/1))},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-1*(Math.sqrt(1-(e/=1)*e)-1)},easeOutCirc:function(e){return 1*Math.sqrt(1-(e=e/1-1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1==(e/=1)?1:(n||(n=.3),r0?(r=c[0].clientX,i=c[0].clientY):(r=o.clientX,i=o.clientY);var l=parseFloat(n.getStyle(a,"padding-left")),u=parseFloat(n.getStyle(a,"padding-top")),d=parseFloat(n.getStyle(a,"padding-right")),p=parseFloat(n.getStyle(a,"padding-bottom")),f=s.bottom-s.top-u-p;return{x:r=Math.round((r-s.left-l)/(s.right-s.left-l-d)*a.width/t.currentDevicePixelRatio),y:i=Math.round((i-s.top-u)/f*a.height/t.currentDevicePixelRatio)}},n.addEvent=function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},n.removeEvent=function(e,t,r){e.removeEventListener?e.removeEventListener(t,r,!1):e.detachEvent?e.detachEvent("on"+t,r):e["on"+t]=n.noop},n.getConstraintWidth=function(e){return s(e,"max-width","clientWidth")},n.getConstraintHeight=function(e){return s(e,"max-height","clientHeight")},n.getMaximumWidth=function(e){var t=e.parentNode,r=parseInt(n.getStyle(t,"padding-left"),10),i=parseInt(n.getStyle(t,"padding-right"),10),o=t.clientWidth-r-i,a=n.getConstraintWidth(e);return isNaN(a)?o:Math.min(o,a)},n.getMaximumHeight=function(e){var t=e.parentNode,r=parseInt(n.getStyle(t,"padding-top"),10),i=parseInt(n.getStyle(t,"padding-bottom"),10),o=t.clientHeight-r-i,a=n.getConstraintHeight(e);return isNaN(a)?o:Math.min(o,a)},n.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},n.retinaScale=function(e){var t=e.currentDevicePixelRatio=window.devicePixelRatio||1;if(1!==t){var n=e.canvas,r=e.height,i=e.width;n.height=r*t,n.width=i*t,e.ctx.scale(t,t),n.style.height=r+"px",n.style.width=i+"px"}},n.clear=function(e){e.ctx.clearRect(0,0,e.width,e.height)},n.fontString=function(e,t,n){return t+" "+e+"px "+n},n.longestText=function(e,t,r,i){var o=(i=i||{}).data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(o=i.data={},a=i.garbageCollect=[],i.font=t),e.font=t;var s=0;n.each(r,(function(t){null!=t&&!0!==n.isArray(t)?s=n.measureText(e,o,a,s,t):n.isArray(t)&&n.each(t,(function(t){null==t||n.isArray(t)||(s=n.measureText(e,o,a,s,t))}))}));var c=a.length/2;if(c>r.length){for(var l=0;lr&&(r=o),r},n.numberOfLabelLines=function(e){var t=1;return n.each(e,(function(e){n.isArray(e)&&e.length>t&&(t=e.length)})),t},n.drawRoundedRectangle=function(e,t,n,r,i,o){e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()},n.color=function(t){return r?t instanceof CanvasGradient?r(e.defaults.global.defaultColor):r(t):(console.error("Color.js not found!"),t)},n.isArray=Array.isArray?function(e){return Array.isArray(e)}:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n.arrayEquals=function(e,t){var r,i,o,a;if(!e||!t||e.length!==t.length)return!1;for(r=0,i=e.length;r0&&(s=e.getDatasetMeta(s[0]._datasetIndex).data),s},"x-axis":function(e,t){return a(e,t,!0)},point:function(e,t){return i(e,n(t,e.chart))},nearest:function(e,t,r){var i=o(e,n(t,e.chart),r.intersect);return i.length>1&&i.sort((function(e,t){var n=e.getArea()-t.getArea();return 0===n&&(n=e._datasetIndex-t._datasetIndex),n})),i.slice(0,1)},x:function(e,t,i){var o=n(t,e.chart),a=[],s=!1;return r(e,(function(e){e.inXRange(o.x)&&a.push(e),e.inRange(o.x,o.y)&&(s=!0)})),i.intersect&&!s&&(a=[]),a},y:function(e,t,i){var o=n(t,e.chart),a=[],s=!1;return r(e,(function(e){e.inYRange(o.y)&&a.push(e),e.inRange(o.x,o.y)&&(s=!0)})),i.intersect&&!s&&(a=[]),a}}}}},{}],28:[function(e,t,n){"use strict";t.exports=function(){var e=function(t,n){return this.controller=new e.Controller(t,n,this),this.controller};return e.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(e){var t=[];t.push('
    ');for(var n=0;n'),e.data.datasets[n].label&&t.push(e.data.datasets[n].label),t.push("");return t.push("
"),t.join("")}}},e.Chart=e,e}},{}],29:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers;e.layoutService={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),e.boxes.push(t)},removeBox:function(e,t){e.boxes&&e.boxes.splice(e.boxes.indexOf(t),1)},update:function(e,n,r){if(e){var i=e.options.layout,o=i?i.padding:null,a=0,s=0,c=0,l=0;isNaN(o)?(a=o.left||0,s=o.right||0,c=o.top||0,l=o.bottom||0):(a=o,s=o,c=o,l=o);var u=t.where(e.boxes,(function(e){return"left"===e.options.position})),d=t.where(e.boxes,(function(e){return"right"===e.options.position})),p=t.where(e.boxes,(function(e){return"top"===e.options.position})),f=t.where(e.boxes,(function(e){return"bottom"===e.options.position})),h=t.where(e.boxes,(function(e){return"chartArea"===e.options.position}));p.sort((function(e,t){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)})),f.sort((function(e,t){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}));var m=n-a-s,g=r-c-l,v=g/2,y=(n-m/2)/(u.length+d.length),b=(r-v)/(p.length+f.length),x=m,w=g,C=[];t.each(u.concat(d,p,f),(function(e){var t,n=e.isHorizontal();n?(t=e.update(e.options.fullWidth?m:x,b),w-=t.height):(t=e.update(y,v),x-=t.width),C.push({horizontal:n,minSize:t,box:e})}));var S=0,_=0,k=0,T=0;t.each(p.concat(f),(function(e){if(e.getPadding){var t=e.getPadding();S=Math.max(S,t.left),_=Math.max(_,t.right)}})),t.each(u.concat(d),(function(e){if(e.getPadding){var t=e.getPadding();k=Math.max(k,t.top),T=Math.max(T,t.bottom)}}));var P=a,E=s,M=c,D=l;t.each(u.concat(d),F),t.each(u,(function(e){P+=e.width})),t.each(d,(function(e){E+=e.width})),t.each(p.concat(f),F),t.each(p,(function(e){M+=e.height})),t.each(f,(function(e){D+=e.height})),t.each(u.concat(d),(function(e){var n=t.findNextWhere(C,(function(t){return t.box===e}));n&&e.update(n.minSize.width,w,{left:0,right:0,top:M,bottom:D})})),P=a,E=s,M=c,D=l,t.each(u,(function(e){P+=e.width})),t.each(d,(function(e){E+=e.width})),t.each(p,(function(e){M+=e.height})),t.each(f,(function(e){D+=e.height}));var I=Math.max(S-P,0);P+=I,E+=Math.max(_-E,0);var R=Math.max(k-M,0);M+=R,D+=Math.max(T-D,0);var O=r-M-D,A=n-P-E;A===x&&O===w||(t.each(u,(function(e){e.height=O})),t.each(d,(function(e){e.height=O})),t.each(p,(function(e){e.options.fullWidth||(e.width=A)})),t.each(f,(function(e){e.options.fullWidth||(e.width=A)})),w=O,x=A);var L=a+I,j=c+R;t.each(u.concat(p),N),L+=x,j+=w,t.each(d,N),t.each(f,N),e.chartArea={left:P,top:M,right:P+x,bottom:M+w},t.each(h,(function(t){t.left=e.chartArea.left,t.top=e.chartArea.top,t.right=e.chartArea.right,t.bottom=e.chartArea.bottom,t.update(x,w)}))}function F(e){var n=t.findNextWhere(C,(function(t){return t.box===e}));if(n)if(e.isHorizontal()){var r={left:Math.max(P,S),right:Math.max(E,_),top:0,bottom:0};e.update(e.options.fullWidth?m:x,g/2,r)}else e.update(n.minSize.width,w)}function N(e){e.isHorizontal()?(e.left=e.options.fullWidth?a:P,e.right=e.options.fullWidth?n-s:P+x,e.top=j,e.bottom=j+e.height,j=e.bottom):(e.left=L,e.right=L+e.width,e.top=M,e.bottom=M+w,L=e.right)}}}}},{}],30:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers,n=t.noop;function r(e,t){return e.usePointStyle?t*Math.SQRT2:e.boxWidth}function i(t,n){var r=new e.Legend({ctx:t.chart.ctx,options:n,chart:t});t.legend=r,e.layoutService.addBox(t,r)}e.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,i=r.getDatasetMeta(n);i.hidden=null===i.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var n=e.data;return t.isArray(n.datasets)?n.datasets.map((function(n,r){return{text:n.label,fillStyle:t.isArray(n.backgroundColor)?n.backgroundColor[0]:n.backgroundColor,hidden:!e.isDatasetVisible(r),lineCap:n.borderCapStyle,lineDash:n.borderDash,lineDashOffset:n.borderDashOffset,lineJoin:n.borderJoinStyle,lineWidth:n.borderWidth,strokeStyle:n.borderColor,pointStyle:n.pointStyle,datasetIndex:r}}),this):[]}}},e.Legend=e.Element.extend({initialize:function(e){t.extend(this,e),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:n,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:n,beforeSetDimensions:n,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:n,beforeBuildLabels:n,buildLabels:function(){var e=this,t=e.options.labels,n=t.generateLabels.call(e,e.chart);t.filter&&(n=n.filter((function(n){return t.filter(n,e.chart.data)}))),e.options.reverse&&n.reverse(),e.legendItems=n},afterBuildLabels:n,beforeFit:n,fit:function(){var n=this,i=n.options,o=i.labels,a=i.display,s=n.ctx,c=e.defaults.global,l=t.getValueOrDefault,u=l(o.fontSize,c.defaultFontSize),d=l(o.fontStyle,c.defaultFontStyle),p=l(o.fontFamily,c.defaultFontFamily),f=t.fontString(u,d,p),h=n.legendHitBoxes=[],m=n.minSize,g=n.isHorizontal();if(g?(m.width=n.maxWidth,m.height=a?10:0):(m.width=a?10:0,m.height=n.maxHeight),a)if(s.font=f,g){var v=n.lineWidths=[0],y=n.legendItems.length?u+o.padding:0;s.textAlign="left",s.textBaseline="top",t.each(n.legendItems,(function(e,t){var i=r(o,u)+u/2+s.measureText(e.text).width;v[v.length-1]+i+o.padding>=n.width&&(y+=u+o.padding,v[v.length]=n.left),h[t]={left:0,top:0,width:i,height:u},v[v.length-1]+=i+o.padding})),m.height+=y}else{var b=o.padding,x=n.columnWidths=[],w=o.padding,C=0,S=0,_=u+b;t.each(n.legendItems,(function(e,t){var n=r(o,u)+u/2+s.measureText(e.text).width;S+_>m.height&&(w+=C+o.padding,x.push(C),C=0,S=0),C=Math.max(C,n),S+=_,h[t]={left:0,top:0,width:n,height:u}})),w+=C,x.push(C),m.width+=w}n.width=m.width,n.height=m.height},afterFit:n,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var n=this,i=n.options,o=i.labels,a=e.defaults.global,s=a.elements.line,c=n.width,l=n.lineWidths;if(i.display){var u,d=n.ctx,p=t.getValueOrDefault,f=p(o.fontColor,a.defaultFontColor),h=p(o.fontSize,a.defaultFontSize),m=p(o.fontStyle,a.defaultFontStyle),g=p(o.fontFamily,a.defaultFontFamily),v=t.fontString(h,m,g);d.textAlign="left",d.textBaseline="top",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=v;var y=r(o,h),b=n.legendHitBoxes,x=n.isHorizontal();u=x?{x:n.left+(c-l[0])/2,y:n.top+o.padding,line:0}:{x:n.left+o.padding,y:n.top+o.padding,line:0};var w=h+o.padding;t.each(n.legendItems,(function(t,r){var f=d.measureText(t.text).width,m=y+h/2+f,g=u.x,v=u.y;x?g+m>=c&&(v=u.y+=w,u.line++,g=u.x=n.left+(c-l[u.line])/2):v+w>n.bottom&&(g=u.x=g+n.columnWidths[u.line]+o.padding,v=u.y=n.top+o.padding,u.line++),function(t,n,r){if(!(isNaN(y)||y<=0)){d.save(),d.fillStyle=p(r.fillStyle,a.defaultColor),d.lineCap=p(r.lineCap,s.borderCapStyle),d.lineDashOffset=p(r.lineDashOffset,s.borderDashOffset),d.lineJoin=p(r.lineJoin,s.borderJoinStyle),d.lineWidth=p(r.lineWidth,s.borderWidth),d.strokeStyle=p(r.strokeStyle,a.defaultColor);var o=0===p(r.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(p(r.lineDash,s.borderDash)),i.labels&&i.labels.usePointStyle){var c=h*Math.SQRT2/2,l=c/Math.SQRT2;e.canvasHelpers.drawPoint(d,r.pointStyle,c,t+l,n+l)}else o||d.strokeRect(t,n,y,h),d.fillRect(t,n,y,h);d.restore()}}(g,v,t),b[r].left=g,b[r].top=v,function(e,t,n,r){d.fillText(n.text,y+h/2+e,t),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(y+h/2+e,t+h/2),d.lineTo(y+h/2+e+r,t+h/2),d.stroke())}(g,v,t,f),x?u.x+=m+o.padding:u.y+=w}))}},handleEvent:function(e){var t=this,n=t.options,r="mouseup"===e.type?"click":e.type,i=!1;if("mousemove"===r){if(!n.onHover)return}else{if("click"!==r)return;if(!n.onClick)return}var o=e.x,a=e.y;if(o>=t.left&&o<=t.right&&a>=t.top&&a<=t.bottom)for(var s=t.legendHitBoxes,c=0;c=l.left&&o<=l.left+l.width&&a>=l.top&&a<=l.top+l.height){if("click"===r){n.onClick.call(t,e.native,t.legendItems[c]),i=!0;break}if("mousemove"===r){n.onHover.call(t,e.native,t.legendItems[c]),i=!0;break}}}return i}}),e.plugins.register({beforeInit:function(e){var t=e.options.legend;t&&i(e,t)},beforeUpdate:function(n){var r=n.options.legend;r?(r=t.configMerge(e.defaults.global.legend,r),n.legend?n.legend.options=r:i(n,r)):(e.layoutService.removeBox(n,n.legend),delete n.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}})}},{}],31:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers;e.defaults.global.plugins={},e.plugins={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach((function(e){-1===t.indexOf(e)&&t.push(e)})),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach((function(e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var r,i,o,a,s,c=this.descriptors(e),l=c.length;for(r=0;ru&&ae.maxHeight){a--;break}a++,l=s*c}e.labelRotation=a},afterCalculateTickRotation:function(){t.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){t.callCallback(this.options.beforeFit,[this])},fit:function(){var e=this,i=e.minSize={width:0,height:0},o=e.options,a=o.ticks,s=o.scaleLabel,c=o.gridLines,l=o.display,u=e.isHorizontal(),d=r(a),p=1.5*r(s).size,f=o.gridLines.tickMarkLength;if(i.width=u?e.isFullWidth()?e.maxWidth-e.margins.left-e.margins.right:e.maxWidth:l&&c.drawTicks?f:0,i.height=u?l&&c.drawTicks?f:0:e.maxHeight,s.display&&l&&(u?i.height+=p:i.width+=p),a.display&&l){var h=t.longestText(e.ctx,d.font,e.ticks,e.longestTextCache),m=t.numberOfLabelLines(e.ticks),g=.5*d.size;if(u){e.longestLabelWidth=h;var v=t.toRadians(e.labelRotation),y=Math.cos(v),b=Math.sin(v);i.height=Math.min(e.maxHeight,i.height+(b*h+d.size*m+g*m)),e.ctx.font=d.font;var x=n(e.ctx,e.ticks[0],d.font),w=n(e.ctx,e.ticks[e.ticks.length-1],d.font);0!==e.labelRotation?(e.paddingLeft="bottom"===o.position?y*x+3:y*g+3,e.paddingRight="bottom"===o.position?y*g+3:y*w+3):(e.paddingLeft=x/2+3,e.paddingRight=w/2+3)}else a.mirror?h=0:h+=e.options.ticks.padding,i.width+=h,e.paddingTop=d.size/2,e.paddingBottom=d.size/2}e.handleMargins(),e.width=i.width,e.height=i.height},handleMargins:function(){var e=this;e.margins&&(e.paddingLeft=Math.max(e.paddingLeft-e.margins.left,0),e.paddingTop=Math.max(e.paddingTop-e.margins.top,0),e.paddingRight=Math.max(e.paddingRight-e.margins.right,0),e.paddingBottom=Math.max(e.paddingBottom-e.margins.bottom,0))},afterFit:function(){t.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){return null==e?NaN:"number"!=typeof e||isFinite(e)?"object"==typeof e?e instanceof Date||e.isValid?e:this.getRightValue(this.isHorizontal()?e.x:e.y):e:NaN},getLabelForIndex:t.noop,getPixelForValue:t.noop,getValueForPixel:t.noop,getPixelForTick:function(e,t){var n=this;if(n.isHorizontal()){var r=(n.width-(n.paddingLeft+n.paddingRight))/Math.max(n.ticks.length-(n.options.gridLines.offsetGridLines?0:1),1),i=r*e+n.paddingLeft;return t&&(i+=r/2),n.left+Math.round(i)+(n.isFullWidth()?n.margins.left:0)}return n.top+e*((n.height-(n.paddingTop+n.paddingBottom))/(n.ticks.length-1))},getPixelForDecimal:function(e){var t=this;return t.isHorizontal()?t.left+Math.round((t.width-(t.paddingLeft+t.paddingRight))*e+t.paddingLeft)+(t.isFullWidth()?t.margins.left:0):t.top+e*t.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},draw:function(n){var i=this,o=i.options;if(o.display){var a,s,c=i.ctx,l=e.defaults.global,u=o.ticks,d=o.gridLines,p=o.scaleLabel,f=0!==i.labelRotation,h=u.autoSkip,m=i.isHorizontal();u.maxTicksLimit&&(s=u.maxTicksLimit);var g=t.getValueOrDefault(u.fontColor,l.defaultFontColor),v=r(u),y=d.drawTicks?d.tickMarkLength:0,b=t.getValueOrDefault(d.borderDash,l.borderDash),x=t.getValueOrDefault(d.borderDashOffset,l.borderDashOffset),w=t.getValueOrDefault(p.fontColor,l.defaultFontColor),C=r(p),S=t.toRadians(i.labelRotation),_=Math.cos(S),k=i.longestLabelWidth*_;c.fillStyle=g;var T=[];if(m){if(a=!1,f&&(k/=2),(k+u.autoSkipPadding)*i.ticks.length>i.width-(i.paddingLeft+i.paddingRight)&&(a=1+Math.floor((k+u.autoSkipPadding)*i.ticks.length/(i.width-(i.paddingLeft+i.paddingRight)))),s&&i.ticks.length>s)for(;!a||i.ticks.length/(a||1)>s;)a||(a=1),a+=1;h||(a=!1)}var P="right"===o.position?i.left:i.right-y,E="right"===o.position?i.left+y:i.right,M="bottom"===o.position?i.top:i.bottom-y,D="bottom"===o.position?i.top+y:i.bottom;if(t.each(i.ticks,(function(e,r){if(null!=e&&(!(a>1&&r%a>0||r%a==0&&r+a>=i.ticks.length)||i.ticks.length===r+1)&&null!=e){var s,c,l,p,h,g,v,w,C,_,k,I;r===(void 0!==i.zeroLineIndex?i.zeroLineIndex:0)?(s=d.zeroLineWidth,c=d.zeroLineColor):(s=t.getValueAtIndexOrDefault(d.lineWidth,r),c=t.getValueAtIndexOrDefault(d.color,r));var R="middle",O="middle";if(m){"bottom"===o.position?(O=f?"middle":"top",R=f?"right":"center",I=i.top+y):(O=f?"middle":"bottom",R=f?"left":"center",I=i.bottom-y);var A=i.getPixelForTick(r)+t.aliasPixel(s);k=i.getPixelForTick(r,d.offsetGridLines)+u.labelOffset,l=h=v=C=A,p=M,g=D,w=n.top,_=n.bottom}else{var L,j="left"===o.position,F=u.padding;u.mirror?(R=j?"left":"right",L=F):(R=j?"right":"left",L=y+F),k=j?i.right-L:i.left+L;var N=i.getPixelForTick(r);N+=t.aliasPixel(s),I=i.getPixelForTick(r,d.offsetGridLines),l=P,h=E,v=n.left,C=n.right,p=g=w=_=N}T.push({tx1:l,ty1:p,tx2:h,ty2:g,x1:v,y1:w,x2:C,y2:_,labelX:k,labelY:I,glWidth:s,glColor:c,glBorderDash:b,glBorderDashOffset:x,rotation:-1*S,label:e,textBaseline:O,textAlign:R})}})),t.each(T,(function(e){if(d.display&&(c.save(),c.lineWidth=e.glWidth,c.strokeStyle=e.glColor,c.setLineDash&&(c.setLineDash(e.glBorderDash),c.lineDashOffset=e.glBorderDashOffset),c.beginPath(),d.drawTicks&&(c.moveTo(e.tx1,e.ty1),c.lineTo(e.tx2,e.ty2)),d.drawOnChartArea&&(c.moveTo(e.x1,e.y1),c.lineTo(e.x2,e.y2)),c.stroke(),c.restore()),u.display){c.save(),c.translate(e.labelX,e.labelY),c.rotate(e.rotation),c.font=v.font,c.textBaseline=e.textBaseline,c.textAlign=e.textAlign;var n=e.label;if(t.isArray(n))for(var r=0,i=0;r0)r=e.stepSize;else{var o=t.niceNum(n.max-n.min,!1);r=t.niceNum(o/(e.maxTicks-1),!0)}var a=Math.floor(n.min/r)*r,s=Math.ceil(n.max/r)*r;e.min&&e.max&&e.stepSize&&t.almostWhole((e.max-e.min)/e.stepSize,r/1e3)&&(a=e.min,s=e.max);var c=(s-a)/r;c=t.almostEquals(c,Math.round(c),r/1e3)?Math.round(c):Math.ceil(c),i.push(void 0!==e.min?e.min:a);for(var l=1;l3?r[2]-r[1]:r[1]-r[0];Math.abs(i)>1&&e!==Math.floor(e)&&(i=e-Math.floor(e));var o=t.log10(Math.abs(i)),a="";if(0!==e){var s=-1*Math.floor(o);s=Math.max(Math.min(s,20),0),a=e.toFixed(s)}else a="0";return a},logarithmic:function(e,n,r){var i=e/Math.pow(10,Math.floor(t.log10(e)));return 0===e?"0":1===i||2===i||5===i||0===n||n===r.length-1?e.toExponential():""}}}}},{}],35:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers;e.defaults.global.title={display:!1,position:"top",fullWidth:!0,fontStyle:"bold",padding:10,text:""};var n=t.noop;function r(t,n){var r=new e.Title({ctx:t.chart.ctx,options:n,chart:t});t.titleBlock=r,e.layoutService.addBox(t,r)}e.Title=e.Element.extend({initialize:function(e){t.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:n,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:n,beforeSetDimensions:n,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:n,beforeBuildLabels:n,buildLabels:n,afterBuildLabels:n,beforeFit:n,fit:function(){var n=this,r=n.options,i=r.display,o=(0,t.getValueOrDefault)(r.fontSize,e.defaults.global.defaultFontSize),a=n.minSize;n.isHorizontal()?(a.width=n.maxWidth,a.height=i?o+2*r.padding:0):(a.width=i?o+2*r.padding:0,a.height=n.maxHeight),n.width=a.width,n.height=a.height},afterFit:n,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var n=this,r=n.ctx,i=t.getValueOrDefault,o=n.options,a=e.defaults.global;if(o.display){var s,c,l,u=i(o.fontSize,a.defaultFontSize),d=i(o.fontStyle,a.defaultFontStyle),p=i(o.fontFamily,a.defaultFontFamily),f=t.fontString(u,d,p),h=0,m=n.top,g=n.left,v=n.bottom,y=n.right;r.fillStyle=i(o.fontColor,a.defaultFontColor),r.font=f,n.isHorizontal()?(s=g+(y-g)/2,c=m+(v-m)/2,l=y-g):(s="left"===o.position?g+u/2:y-u/2,c=m+(v-m)/2,l=v-m,h=Math.PI*("left"===o.position?-.5:.5)),r.save(),r.translate(s,c),r.rotate(h),r.textAlign="center",r.textBaseline="middle",r.fillText(o.text,0,0,l),r.restore()}}}),e.plugins.register({beforeInit:function(e){var t=e.options.title;t&&r(e,t)},beforeUpdate:function(n){var i=n.options.title;i?(i=t.configMerge(e.defaults.global.title,i),n.titleBlock?n.titleBlock.options=i:r(n,i)):(e.layoutService.removeBox(n,n.titleBlock),delete n.titleBlock)}})}},{}],36:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers;function n(e,n){var r=t.color(e);return r.alpha(n*r.alpha()).rgbaString()}function r(e,n){return n&&(t.isArray(n)?Array.prototype.push.apply(e,n):e.push(n)),e}function i(n){var r=e.defaults.global,i=t.getValueOrDefault;return{xPadding:n.xPadding,yPadding:n.yPadding,xAlign:n.xAlign,yAlign:n.yAlign,bodyFontColor:n.bodyFontColor,_bodyFontFamily:i(n.bodyFontFamily,r.defaultFontFamily),_bodyFontStyle:i(n.bodyFontStyle,r.defaultFontStyle),_bodyAlign:n.bodyAlign,bodyFontSize:i(n.bodyFontSize,r.defaultFontSize),bodySpacing:n.bodySpacing,titleFontColor:n.titleFontColor,_titleFontFamily:i(n.titleFontFamily,r.defaultFontFamily),_titleFontStyle:i(n.titleFontStyle,r.defaultFontStyle),titleFontSize:i(n.titleFontSize,r.defaultFontSize),_titleAlign:n.titleAlign,titleSpacing:n.titleSpacing,titleMarginBottom:n.titleMarginBottom,footerFontColor:n.footerFontColor,_footerFontFamily:i(n.footerFontFamily,r.defaultFontFamily),_footerFontStyle:i(n.footerFontStyle,r.defaultFontStyle),footerFontSize:i(n.footerFontSize,r.defaultFontSize),_footerAlign:n.footerAlign,footerSpacing:n.footerSpacing,footerMarginTop:n.footerMarginTop,caretSize:n.caretSize,cornerRadius:n.cornerRadius,backgroundColor:n.backgroundColor,opacity:0,legendColorBackground:n.multiKeyBackground,displayColors:n.displayColors}}e.defaults.global.tooltips={enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,callbacks:{beforeTitle:t.noop,title:function(e,t){var n="",r=t.labels,i=r?r.length:0;if(e.length>0){var o=e[0];o.xLabel?n=o.xLabel:i>0&&o.indexc.height-t.height&&(d="bottom");var p=(l.left+l.right)/2,f=(l.top+l.bottom)/2;"center"===d?(n=function(e){return e<=p},r=function(e){return e>p}):(n=function(e){return e<=t.width/2},r=function(e){return e>=c.width-t.width/2}),i=function(e){return e+t.width>c.width},o=function(e){return e-t.width<0},a=function(e){return e<=f?"top":"bottom"},n(s.x)?(u="left",i(s.x)&&(u="center",d=a(s.y))):r(s.x)&&(u="right",o(s.x)&&(u="center",d=a(s.y)));var h=e._options;return{xAlign:h.xAlign?h.xAlign:u,yAlign:h.yAlign?h.yAlign:d}}(this,x))}else h.opacity=0;return h.xAlign=y.xAlign,h.yAlign=y.yAlign,h.x=b.x,h.y=b.y,h.width=x.width,h.height=x.height,h.caretX=w.x,h.caretY=w.y,d._model=h,n&&p.custom&&p.custom.call(d,h),d},drawCaret:function(e,t,r){var i,o,a,s,c,l,u=this._view,d=this._chart.ctx,p=u.caretSize,f=u.cornerRadius,h=u.xAlign,m=u.yAlign,g=e.x,v=e.y,y=t.width,b=t.height;"center"===m?("left"===h?(o=(i=g)-p,a=i):(o=(i=g+y)+p,a=i),s=(c=v+b/2)-p,l=c+p):("left"===h?a=(o=(i=g+f)+p)+p:"right"===h?a=(o=(i=g+y-f)-p)-p:(i=(o=g+y/2)-p,a=o+p),"top"===m?(c=(s=v)-p,l=s):(c=(s=v+b)+p,l=s)),d.fillStyle=n(u.backgroundColor,r),d.beginPath(),d.moveTo(i,s),d.lineTo(o,c),d.lineTo(a,l),d.closePath(),d.fill()},drawTitle:function(e,r,i,o){var a=r.title;if(a.length){i.textAlign=r._titleAlign,i.textBaseline="top";var s,c,l=r.titleFontSize,u=r.titleSpacing;for(i.fillStyle=n(r.titleFontColor,o),i.font=t.fontString(l,r._titleFontStyle,r._titleFontFamily),s=0,c=a.length;sc;)o-=2*Math.PI;for(;o=s&&o<=c&&a>=r.innerRadius&&a<=r.outerRadius}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e=this._chart.ctx,t=this._view,n=t.startAngle,r=t.endAngle;e.beginPath(),e.arc(t.x,t.y,t.outerRadius,n,r),e.arc(t.x,t.y,t.innerRadius,r,n,!0),e.closePath(),e.strokeStyle=t.borderColor,e.lineWidth=t.borderWidth,e.fillStyle=t.backgroundColor,e.fill(),e.lineJoin="bevel",t.borderWidth&&e.stroke()}})}},{}],38:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers,n=e.defaults.global;e.defaults.global.elements.line={tension:.4,backgroundColor:n.defaultColor,borderWidth:3,borderColor:n.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},e.elements.Line=e.Element.extend({draw:function(){var e=this._view,r=e.spanGaps,i=e.scaleZero,o=this._loop;o||("top"===e.fill?i=e.scaleTop:"bottom"===e.fill&&(i=e.scaleBottom));var a=this._chart.ctx;function s(e,t){var n=t._view;!0===t._view.steppedLine?(a.lineTo(n.x,e._view.y),a.lineTo(n.x,n.y)):0===t._view.tension?a.lineTo(n.x,n.y):a.bezierCurveTo(e._view.controlPointNextX,e._view.controlPointNextY,n.controlPointPreviousX,n.controlPointPreviousY,n.x,n.y)}a.save();var c,l,u,d,p=this._children.slice(),f=-1;if(o&&p.length&&p.push(p[0]),p.length&&e.fill){for(a.beginPath(),c=0;c(e=c.base)?1:-1,o=1,a=c.borderSkipped||"left"):(e=c.x-c.width/2,t=c.x+c.width/2,i=1,o=(r=c.base)>(n=c.y)?1:-1,a=c.borderSkipped||"bottom"),l){var u=Math.min(Math.abs(e-t),Math.abs(n-r)),d=(l=l>u?u:l)/2,p=e+("left"!==a?d*i:0),f=t+("right"!==a?-d*i:0),h=n+("top"!==a?d*o:0),m=r+("bottom"!==a?-d*o:0);p!==f&&(n=h,r=m),h!==m&&(e=p,t=f)}s.beginPath(),s.fillStyle=c.backgroundColor,s.strokeStyle=c.borderColor,s.lineWidth=l;var g=[[e,r],[e,n],[t,n],[t,r]],v=["bottom","left","top","right"].indexOf(a,0);function y(e){return g[(v+e)%4]}-1===v&&(v=0);var b=y(0);s.moveTo(b[0],b[1]);for(var x=1;x<4;x++)b=y(x),s.lineTo(b[0],b[1]);s.fill(),l&&s.stroke()},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){var n=!1;if(this._view){var i=r(this);n=e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}return n},inLabelRange:function(e,t){if(!this._view)return!1;var i=r(this);return n(this)?e>=i.left&&e<=i.right:t>=i.top&&t<=i.bottom},inXRange:function(e){var t=r(this);return e>=t.left&&e<=t.right},inYRange:function(e){var t=r(this);return e>=t.top&&e<=t.bottom},getCenterPoint:function(){var e,t,r=this._view;return n(this)?(e=r.x,t=(r.y+r.base)/2):(e=(r.x+r.base)/2,t=r.y),{x:e,y:t}},getArea:function(){var e=this._view;return e.width*Math.abs(e.y-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}})}},{}],41:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers,n={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function r(e,n){var r=t.getStyle(e,n),i=r&&r.match(/(\d+)px/);return i?Number(i[1]):void 0}function i(e,t,n,r,i){return{type:e,chart:t,native:i||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}return{acquireContext:function(e,t){if("string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e instanceof HTMLCanvasElement){var n=e.getContext&&e.getContext("2d");if(n instanceof CanvasRenderingContext2D)return function(e,t){var n=e.style,i=e.getAttribute("height"),o=e.getAttribute("width");if(e._chartjs={initial:{height:i,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===o||""===o){var a=r(e,"width");void 0!==a&&(e.width=a)}if(null===i||""===i)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var s=r(e,"height");void 0!==a&&(e.height=s)}}(e,t),n}return null},releaseContext:function(e){var n=e.canvas;if(n._chartjs){var r=n._chartjs.initial;["height","width"].forEach((function(e){var t=r[e];null==t?n.removeAttribute(e):n.setAttribute(e,t)})),t.each(r.style||{},(function(e,t){n.style[t]=e})),n.width=n.width,delete n._chartjs}},addEventListener:function(e,r,o){var a=e.chart.canvas;if("resize"!==r){var s=o._chartjs||(o._chartjs={}),c=(s.proxies||(s.proxies={}))[e.id+"_"+r]=function(r){o(function(e,r){var o=n[e.type]||e.type,a=t.getRelativePosition(e,r);return i(o,r,a.x,a.y,e)}(r,e.chart))};t.addEvent(a,r,c)}else!function(e,n,r){var o,a,s=e._chartjs={ticking:!1};s.resizer=(o=function(){s.ticking||(s.ticking=!0,t.requestAnimFrame.call(window,(function(){if(s.resizer)return s.ticking=!1,n(i("resize",r))})))},(a=document.createElement("iframe")).className="chartjs-hidden-iframe",a.style.cssText="display:block;overflow:hidden;border:0;margin:0;top:0;left:0;bottom:0;right:0;height:100%;width:100%;position:absolute;pointer-events:none;z-index:-1;",a.tabIndex=-1,t.addEvent(a,"load",(function(){t.addEvent(a.contentWindow||a,"resize",o),o()})),a),e.insertBefore(s.resizer,e.firstChild)}(a.parentNode,o,e.chart)},removeEventListener:function(e,n,r){var i=e.chart.canvas;if("resize"!==n){var o=((r._chartjs||{}).proxies||{})[e.id+"_"+n];o&&t.removeEvent(i,n,o)}else!function(e){if(e&&e._chartjs){var t=e._chartjs.resizer;t&&(t.parentNode.removeChild(t),e._chartjs.resizer=null),delete e._chartjs}}(i.parentNode)}}}},{}],42:[function(e,t,n){"use strict";var r=e(41);t.exports=function(e){e.platform={acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},e.helpers.extend(e.platform,r(e))}},{41:41}],43:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers,n=e.Scale.extend({getLabels:function(){var e=this.chart.data;return(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels},determineDataLimits:function(){var e,n=this,r=n.getLabels();n.minIndex=0,n.maxIndex=r.length-1,void 0!==n.options.ticks.min&&(e=t.indexOf(r,n.options.ticks.min),n.minIndex=-1!==e?e:n.minIndex),void 0!==n.options.ticks.max&&(e=t.indexOf(r,n.options.ticks.max),n.maxIndex=-1!==e?e:n.maxIndex),n.min=r[n.minIndex],n.max=r[n.maxIndex]},buildTicks:function(){var e=this,t=e.getLabels();e.ticks=0===e.minIndex&&e.maxIndex===t.length-1?t:t.slice(e.minIndex,e.maxIndex+1)},getLabelForIndex:function(e,t){var n=this,r=n.chart.data,i=n.isHorizontal();return r.yLabels&&!i?n.getRightValue(r.datasets[t].data[e]):n.ticks[e-n.minIndex]},getPixelForValue:function(e,t,n,r){var i=this,o=Math.max(i.maxIndex+1-i.minIndex-(i.options.gridLines.offsetGridLines?0:1),1);if(void 0!==e&&isNaN(t)){var a=i.getLabels().indexOf(e);t=-1!==a?a:t}if(i.isHorizontal()){var s=i.width/o,c=s*(t-i.minIndex);return(i.options.gridLines.offsetGridLines&&r||i.maxIndex===i.minIndex&&r)&&(c+=s/2),i.left+Math.round(c)}var l=i.height/o,u=l*(t-i.minIndex);return i.options.gridLines.offsetGridLines&&r&&(u+=l/2),i.top+Math.round(u)},getPixelForTick:function(e,t){return this.getPixelForValue(this.ticks[e],e+this.minIndex,null,t)},getValueForPixel:function(e){var t=this,n=Math.max(t.ticks.length-(t.options.gridLines.offsetGridLines?0:1),1),r=t.isHorizontal(),i=(r?t.width:t.height)/n;return e-=r?t.left:t.top,t.options.gridLines.offsetGridLines&&(e-=i/2),e<=0?0:Math.round(e/i)},getBasePixel:function(){return this.bottom}});e.scaleService.registerScaleType("category",n,{position:"bottom"})}},{}],44:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers,n={position:"left",ticks:{callback:e.Ticks.formatters.linear}},r=e.LinearScaleBase.extend({determineDataLimits:function(){var e=this,n=e.options,r=e.chart,i=r.data.datasets,o=e.isHorizontal();function a(t){return o?t.xAxisID===e.id:t.yAxisID===e.id}e.min=null,e.max=null;var s=n.stacked;if(void 0===s&&t.each(i,(function(e,t){if(!s){var n=r.getDatasetMeta(t);r.isDatasetVisible(t)&&a(n)&&void 0!==n.stack&&(s=!0)}})),n.stacked||s){var c={};t.each(i,(function(i,o){var s=r.getDatasetMeta(o),l=[s.type,void 0===n.stacked&&void 0===s.stack?o:"",s.stack].join(".");void 0===c[l]&&(c[l]={positiveValues:[],negativeValues:[]});var u=c[l].positiveValues,d=c[l].negativeValues;r.isDatasetVisible(o)&&a(s)&&t.each(i.data,(function(t,r){var i=+e.getRightValue(t);isNaN(i)||s.data[r].hidden||(u[r]=u[r]||0,d[r]=d[r]||0,n.relativePoints?u[r]=100:i<0?d[r]+=i:u[r]+=i)}))})),t.each(c,(function(n){var r=n.positiveValues.concat(n.negativeValues),i=t.min(r),o=t.max(r);e.min=null===e.min?i:Math.min(e.min,i),e.max=null===e.max?o:Math.max(e.max,o)}))}else t.each(i,(function(n,i){var o=r.getDatasetMeta(i);r.isDatasetVisible(i)&&a(o)&&t.each(n.data,(function(t,n){var r=+e.getRightValue(t);isNaN(r)||o.data[n].hidden||((null===e.min||re.max)&&(e.max=r))}))}));this.handleTickRangeOptions()},getTickLimit:function(){var n,r=this.options.ticks;if(this.isHorizontal())n=Math.min(r.maxTicksLimit?r.maxTicksLimit:11,Math.ceil(this.width/50));else{var i=t.getValueOrDefault(r.fontSize,e.defaults.global.defaultFontSize);n=Math.min(r.maxTicksLimit?r.maxTicksLimit:11,Math.ceil(this.height/(2*i)))}return n},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){var t,n=this,r=n.start,i=+n.getRightValue(e),o=n.end-r;return n.isHorizontal()?(t=n.left+n.width/o*(i-r),Math.round(t)):(t=n.bottom-n.height/o*(i-r),Math.round(t))},getValueForPixel:function(e){var t=this,n=t.isHorizontal();return t.start+(n?e-t.left:t.bottom-e)/(n?t.width:t.height)*(t.end-t.start)},getPixelForTick:function(e){return this.getPixelForValue(this.ticksAsNumbers[e])}});e.scaleService.registerScaleType("linear",r,n)}},{}],45:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers,n=t.noop;e.LinearScaleBase=e.Scale.extend({handleTickRangeOptions:function(){var e=this,n=e.options.ticks;if(n.beginAtZero){var r=t.sign(e.min),i=t.sign(e.max);r<0&&i<0?e.max=0:r>0&&i>0&&(e.min=0)}void 0!==n.min?e.min=n.min:void 0!==n.suggestedMin&&(e.min=Math.min(e.min,n.suggestedMin)),void 0!==n.max?e.max=n.max:void 0!==n.suggestedMax&&(e.max=Math.max(e.max,n.suggestedMax)),e.min===e.max&&(e.max++,n.beginAtZero||e.min--)},getTickLimit:n,handleDirectionalChanges:n,buildTicks:function(){var n=this,r=n.options.ticks,i=n.getTickLimit(),o={maxTicks:i=Math.max(2,i),min:r.min,max:r.max,stepSize:t.getValueOrDefault(r.fixedStepSize,r.stepSize)},a=n.ticks=e.Ticks.generators.linear(o,n);n.handleDirectionalChanges(),n.max=t.max(a),n.min=t.min(a),r.reverse?(a.reverse(),n.start=n.max,n.end=n.min):(n.start=n.min,n.end=n.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),e.Scale.prototype.convertTicksToLabels.call(t)}})}},{}],46:[function(e,t,n){"use strict";t.exports=function(e){var t=e.helpers,n={position:"left",ticks:{callback:e.Ticks.formatters.logarithmic}},r=e.Scale.extend({determineDataLimits:function(){var e=this,n=e.options,r=n.ticks,i=e.chart,o=i.data.datasets,a=t.getValueOrDefault,s=e.isHorizontal();function c(t){return s?t.xAxisID===e.id:t.yAxisID===e.id}e.min=null,e.max=null,e.minNotZero=null;var l=n.stacked;if(void 0===l&&t.each(o,(function(e,t){if(!l){var n=i.getDatasetMeta(t);i.isDatasetVisible(t)&&c(n)&&void 0!==n.stack&&(l=!0)}})),n.stacked||l){var u={};t.each(o,(function(r,o){var a=i.getDatasetMeta(o),s=[a.type,void 0===n.stacked&&void 0===a.stack?o:"",a.stack].join(".");i.isDatasetVisible(o)&&c(a)&&(void 0===u[s]&&(u[s]=[]),t.each(r.data,(function(t,r){var i=u[s],o=+e.getRightValue(t);isNaN(o)||a.data[r].hidden||(i[r]=i[r]||0,n.relativePoints?i[r]=100:i[r]+=o)})))})),t.each(u,(function(n){var r=t.min(n),i=t.max(n);e.min=null===e.min?r:Math.min(e.min,r),e.max=null===e.max?i:Math.max(e.max,i)}))}else t.each(o,(function(n,r){var o=i.getDatasetMeta(r);i.isDatasetVisible(r)&&c(o)&&t.each(n.data,(function(t,n){var r=+e.getRightValue(t);isNaN(r)||o.data[n].hidden||((null===e.min||re.max)&&(e.max=r),0!==r&&(null===e.minNotZero||ri?{start:t-n-5,end:t}:{start:t,end:t+n+5}}function s(e){return 0===e||180===e?"center":e<180?"left":"right"}function c(e,n,r,i){if(t.isArray(n))for(var o=r.y,a=1.5*i,s=0;s270||e<90)&&(n.y-=t.h)}function u(e){return t.isNumber(e)?e:0}var d=e.LinearScaleBase.extend({setDimensions:function(){var e=this,r=e.options,i=r.ticks;e.width=e.maxWidth,e.height=e.maxHeight,e.xCenter=Math.round(e.width/2),e.yCenter=Math.round(e.height/2);var o=t.min([e.height,e.width]),a=t.getValueOrDefault(i.fontSize,n.defaultFontSize);e.drawingArea=r.display?o/2-(a/2+i.backdropPaddingY):o/2},determineDataLimits:function(){var e=this,n=e.chart,r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;t.each(n.data.datasets,(function(o,a){if(n.isDatasetVisible(a)){var s=n.getDatasetMeta(a);t.each(o.data,(function(t,n){var o=+e.getRightValue(t);isNaN(o)||s.data[n].hidden||(r=Math.min(o,r),i=Math.max(o,i))}))}})),e.min=r===Number.POSITIVE_INFINITY?0:r,e.max=i===Number.NEGATIVE_INFINITY?0:i,e.handleTickRangeOptions()},getTickLimit:function(){var e=this.options.ticks,r=t.getValueOrDefault(e.fontSize,n.defaultFontSize);return Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*r)))},convertTicksToLabels:function(){var t=this;e.LinearScaleBase.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(t.options.pointLabels.callback,t)},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e;this.options.lineArc?(e=Math.min(this.height/2,this.width/2),this.drawingArea=Math.round(e),this.setCenterPoint(0,0,0,0)):function(e){var n,r,s,c=o(e),l=Math.min(e.height/2,e.width/2),u={l:e.width,r:0,t:e.height,b:0},d={};e.ctx.font=c.font,e._pointLabelSizes=[];var p,f,h,m=i(e);for(n=0;nu.r&&(u.r=y.end,d.r=g),b.startu.b&&(u.b=b.end,d.b=g)}e.setReductions(l,u,d)}(this)},setReductions:function(e,t,n){var r=t.l/Math.sin(n.l),i=Math.max(t.r-this.width,0)/Math.sin(n.r),o=-t.t/Math.cos(n.t),a=-Math.max(t.b-this.height,0)/Math.cos(n.b);r=u(r),i=u(i),o=u(o),a=u(a),this.drawingArea=Math.min(Math.round(e-(r+i)/2),Math.round(e-(o+a)/2)),this.setCenterPoint(r,i,o,a)},setCenterPoint:function(e,t,n,r){var i=this,o=n+i.drawingArea,a=i.height-r-i.drawingArea;i.xCenter=Math.round((e+i.drawingArea+(i.width-t-i.drawingArea))/2+i.left),i.yCenter=Math.round((o+a)/2+i.top)},getIndexAngle:function(e){return e*(2*Math.PI/i(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(null===e)return 0;var n=t.drawingArea/(t.max-t.min);return t.options.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.round(Math.cos(n)*t)+this.xCenter,y:Math.round(Math.sin(n)*t)+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(){var e=this.min,t=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0)},draw:function(){var e=this,r=e.options,a=r.gridLines,u=r.ticks,d=t.getValueOrDefault;if(r.display){var p=e.ctx,f=d(u.fontSize,n.defaultFontSize),h=d(u.fontStyle,n.defaultFontStyle),m=d(u.fontFamily,n.defaultFontFamily),g=t.fontString(f,h,m);t.each(e.ticks,(function(o,s){if(s>0||r.reverse){var c=e.getDistanceFromCenterForValue(e.ticksAsNumbers[s]),l=e.yCenter-c;if(a.display&&0!==s&&function(e,n,r,o){var a=e.ctx;if(a.strokeStyle=t.getValueAtIndexOrDefault(n.color,o-1),a.lineWidth=t.getValueAtIndexOrDefault(n.lineWidth,o-1),e.options.lineArc)a.beginPath(),a.arc(e.xCenter,e.yCenter,r,0,2*Math.PI),a.closePath(),a.stroke();else{var s=i(e);if(0===s)return;a.beginPath();var c=e.getPointPosition(0,r);a.moveTo(c.x,c.y);for(var l=1;l=0;m--){if(d.display){var g=e.getPointPosition(m,f);r.beginPath(),r.moveTo(e.xCenter,e.yCenter),r.lineTo(g.x,g.y),r.stroke(),r.closePath()}var v=e.getPointPosition(m,f+5),y=a(p.fontColor,n.defaultFontColor);r.font=h.font,r.fillStyle=y;var b=e.getIndexAngle(m),x=t.toDegrees(b);r.textAlign=s(x),l(x,e._pointLabelSizes[m],v),c(r,e.pointLabels[m]||"",v,h.size)}}(e)}}});e.scaleService.registerScaleType("radialLinear",d,r)}},{}],48:[function(e,t,n){"use strict";var r=e(1);r="function"==typeof r?r:window.moment,t.exports=function(e){var t=e.helpers,n={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},i=e.Scale.extend({initialize:function(){if(!r)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");e.Scale.prototype.initialize.call(this)},getLabelMoment:function(e,t){return null===e||null===t?null:void 0!==this.labelMoments[e]?this.labelMoments[e][t]:null},getLabelDiff:function(e,t){return null===e||null===t?null:(void 0===this.labelDiffs&&this.buildLabelDiffs(),void 0!==this.labelDiffs[e]?this.labelDiffs[e][t]:null)},getMomentStartOf:function(e){return"week"===this.options.time.unit&&!1!==this.options.time.isoWeekday?e.clone().startOf("isoWeek").isoWeekday(this.options.time.isoWeekday):e.clone().startOf(this.tickUnit)},determineDataLimits:function(){var e=this;e.labelMoments=[];var n=[];e.chart.data.labels&&e.chart.data.labels.length>0?(t.each(e.chart.data.labels,(function(t){var r=e.parseTime(t);r.isValid()&&(e.options.time.round&&r.startOf(e.options.time.round),n.push(r))}),e),e.firstTick=r.min.call(e,n),e.lastTick=r.max.call(e,n)):(e.firstTick=null,e.lastTick=null),t.each(e.chart.data.datasets,(function(i,o){var a=[],s=e.chart.isDatasetVisible(o);"object"==typeof i.data[0]&&null!==i.data[0]?t.each(i.data,(function(t){var n=e.parseTime(e.getRightValue(t));n.isValid()&&(e.options.time.round&&n.startOf(e.options.time.round),a.push(n),s&&(e.firstTick=null!==e.firstTick?r.min(e.firstTick,n):n,e.lastTick=null!==e.lastTick?r.max(e.lastTick,n):n))}),e):a=n,e.labelMoments.push(a)}),e),e.options.time.min&&(e.firstTick=e.parseTime(e.options.time.min)),e.options.time.max&&(e.lastTick=e.parseTime(e.options.time.max)),e.firstTick=(e.firstTick||r()).clone(),e.lastTick=(e.lastTick||r()).clone()},buildLabelDiffs:function(){var e=this;e.labelDiffs=[];var n=[];e.chart.data.labels&&e.chart.data.labels.length>0&&t.each(e.chart.data.labels,(function(t){var r=e.parseTime(t);r.isValid()&&(e.options.time.round&&r.startOf(e.options.time.round),n.push(r.diff(e.firstTick,e.tickUnit,!0)))}),e),t.each(e.chart.data.datasets,(function(r){var i=[];"object"==typeof r.data[0]&&null!==r.data[0]?t.each(r.data,(function(t){var n=e.parseTime(e.getRightValue(t));n.isValid()&&(e.options.time.round&&n.startOf(e.options.time.round),i.push(n.diff(e.firstTick,e.tickUnit,!0)))}),e):i=n,e.labelDiffs.push(i)}),e)},buildTicks:function(){var r=this;r.ctx.save();var i,o=t.getValueOrDefault(r.options.ticks.fontSize,e.defaults.global.defaultFontSize),a=t.getValueOrDefault(r.options.ticks.fontStyle,e.defaults.global.defaultFontStyle),s=t.getValueOrDefault(r.options.ticks.fontFamily,e.defaults.global.defaultFontFamily),c=t.fontString(o,a,s);if(r.ctx.font=c,r.ticks=[],r.unitScale=1,r.scaleSizeInUnits=0,r.options.time.unit)r.tickUnit=r.options.time.unit||"day",r.displayFormat=r.options.time.displayFormats[r.tickUnit],r.scaleSizeInUnits=r.lastTick.diff(r.firstTick,r.tickUnit,!0),r.unitScale=t.getValueOrDefault(r.options.time.unitStepSize,1);else{var l=r.isHorizontal()?r.width:r.height,u=r.tickFormatFunction(r.firstTick,0,[]),d=r.ctx.measureText(u).width,p=l/(d=d*Math.cos(t.toRadians(r.options.ticks.maxRotation))+o*Math.sin(t.toRadians(r.options.ticks.maxRotation)));r.tickUnit=r.options.time.minUnit,r.scaleSizeInUnits=r.lastTick.diff(r.firstTick,r.tickUnit,!0),r.displayFormat=r.options.time.displayFormats[r.tickUnit];for(var f=0,h=n.units[f];f=Math.ceil(r.scaleSizeInUnits/p)){r.unitScale=t.getValueOrDefault(r.options.time.unitStepSize,h.steps[m]);break}break}if(!1===h.maxStep||Math.ceil(r.scaleSizeInUnits/p)=0&&(r.lastTick=y),r.scaleSizeInUnits=r.lastTick.diff(r.firstTick,r.tickUnit,!0)}r.options.time.displayFormat&&(r.displayFormat=r.options.time.displayFormat),r.ticks.push(r.firstTick.clone());for(var x=r.unitScale;x<=r.scaleSizeInUnits;x+=r.unitScale){var w=i.clone().add(x,r.tickUnit);if(r.options.time.max&&w.diff(r.lastTick,r.tickUnit,!0)>=0)break;r.ticks.push(w)}0===r.ticks[r.ticks.length-1].diff(r.lastTick,r.tickUnit)&&0!==r.scaleSizeInUnits||(r.options.time.max?(r.ticks.push(r.lastTick.clone()),r.scaleSizeInUnits=r.lastTick.diff(r.ticks[0],r.tickUnit,!0)):(r.ticks.push(r.lastTick.clone()),r.scaleSizeInUnits=r.lastTick.diff(r.firstTick,r.tickUnit,!0))),r.ctx.restore(),r.labelDiffs=void 0},getLabelForIndex:function(e,t){var n=this,r=n.chart.data.labels&&e1&&(o=window.devicePixelRatio,r.style.width=r.style.height=[t.size,"px"].join(""),r.width=r.height=t.size*o,i.scale(o,o)),i.translate(t.size/2,t.size/2),i.rotate((t.rotate/180-.5)*Math.PI);var a=(t.size-t.lineWidth)/2;t.scaleColor&&t.scaleLength&&(a-=t.scaleLength+2),Date.now=Date.now||function(){return+new Date};var s=function(e,t,n){var r=(n=Math.min(Math.max(-1,n||0),1))<=0;i.beginPath(),i.arc(0,0,a,0,2*Math.PI*n,r),i.strokeStyle=e,i.lineWidth=t,i.stroke()},c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},l=function(){t.scaleColor&&function(){var e,n;i.lineWidth=1,i.fillStyle=t.scaleColor,i.save();for(var r=24;r>0;--r)r%6==0?(n=t.scaleLength,e=0):e=t.scaleLength-(n=.6*t.scaleLength),i.fillRect(-t.size/2+e,0,n,1),i.rotate(Math.PI/12);i.restore()}(),t.trackColor&&s(t.trackColor,t.trackWidth||t.lineWidth,1)};this.getCanvas=function(){return r},this.getCtx=function(){return i},this.clear=function(){i.clearRect(t.size/-2,t.size/-2,t.size,t.size)},this.draw=(function(e){var r;t.scaleColor||t.trackColor?i.getImageData&&i.putImageData?n?i.putImageData(n,0,0):(l(),n=i.getImageData(0,0,t.size*o,t.size*o)):(this.clear(),l()):this.clear(),i.lineCap=t.lineCap,r="function"==typeof t.barColor?t.barColor(e):t.barColor,s(r,t.lineWidth,e/100)}).bind(this),this.animate=(function(e,n){var r=Date.now();t.onStart(e,n);var i=(function(){var o=Math.min(Date.now()-r,t.animate.duration),a=t.easing(this,o,e,n-e,t.animate.duration);this.draw(a),t.onStep(e,n,a),o>=t.animate.duration?t.onStop(e,n):c(i)}).bind(this);c(i)}).bind(this)};return function(t,n){var r={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n},onStart:function(e,t){},onStep:function(e,t,n){},onStop:function(e,t){}};if(void 0!==e)r.renderer=e;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");r.renderer=SVGRenderer}var i={},o=0,a=(function(){for(var e in this.el=t,this.options=i,r)r.hasOwnProperty(e)&&(i[e]=n&&void 0!==n[e]?n[e]:r[e],"function"==typeof i[e]&&(i[e]=i[e].bind(this)));i.easing="string"==typeof i.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[i.easing])?jQuery.easing[i.easing]:r.easing,"number"==typeof i.animate&&(i.animate={duration:i.animate,enabled:!0}),"boolean"!=typeof i.animate||i.animate||(i.animate={duration:1e3,enabled:i.animate}),this.renderer=new i.renderer(t,i),this.renderer.draw(o),t.dataset&&t.dataset.percent?this.update(parseFloat(t.dataset.percent)):t.getAttribute&&t.getAttribute("data-percent")&&this.update(parseFloat(t.getAttribute("data-percent")))}).bind(this);this.update=(function(e){return e=parseFloat(e),i.animate.enabled?this.renderer.animate(o,e):this.renderer.draw(e),o=e,this}).bind(this),this.disableAnimation=function(){return i.animate.enabled=!1,this},this.enableAnimation=function(){return i.animate.enabled=!0,this},a()}})),function(){"use strict";var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},t="undefined"!=typeof module&&module.exports,n="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,r=function(){for(var t,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,i=n.length,o={};r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,i,r),t.apply(this,arguments)}}function c(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&re(r,n)}function l(e,t){return function(){return e.apply(t,arguments)}}function u(e,t){return typeof e==ae?e.apply(t&&t[0]||r,t):e}function d(e,t){return e===r?t:e}function p(e,t,n){a(g(t),(function(t){e.addEventListener(t,n,!1)}))}function f(e,t,n){a(g(t),(function(t){e.removeEventListener(t,n,!1)}))}function h(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function m(e,t){return e.indexOf(t)>-1}function g(e){return e.trim().split(/\s+/g)}function v(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;rn[t]})):r.sort()),r}function x(e,t){for(var n,i,o=t[0].toUpperCase()+t.slice(1),a=0;a1&&!n.firstMultiple?n.firstMultiple=k(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,c=t.center=T(r);t.timeStamp=le(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=D(s,c),t.distance=M(s,c),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==be&&o.eventType!==we||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=E(t.deltaX,t.deltaY);var l=P(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=ce(l.x)>ce(l.y)?l.x:l.y,t.scale=a?function(e,t){return M(t[0],t[1],Re)/M(e[0],e[1],Re)}(a.pointers,r):1,t.rotation=a?function(e,t){return D(t[1],t[0],Re)+D(e[1],e[0],Re)}(a.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,_(n,t);var u=e.element;h(t.srcEvent.target,u)&&(u=t.srcEvent.target),t.target=u}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function _(e,t){var n,i,o,a,s=e.lastInterval||t,c=t.timeStamp-s.timeStamp;if(t.eventType!=Ce&&(c>ye||s.velocity===r)){var l=t.deltaX-s.deltaX,u=t.deltaY-s.deltaY,d=P(c,l,u);i=d.x,o=d.y,n=ce(d.x)>ce(d.y)?d.x:d.y,a=E(l,u),e.lastInterval=t}else n=s.velocity,i=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=o,t.direction=a}function k(e){for(var t=[],n=0;ni;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:se(n/t),y:se(r/t)}}function P(e,t,n){return{x:t/e||0,y:n/e||0}}function E(e,t){return e===t?Se:ce(e)>=ce(t)?0>e?_e:ke:0>t?Te:Pe}function M(e,t,n){n||(n=Ie);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function D(e,t,n){return n||(n=Ie),180*Math.atan2(t[n[1]]-e[n[1]],t[n[0]]-e[n[0]])/Math.PI}function I(){this.evEl=Ae,this.evWin=Le,this.pressed=!1,C.apply(this,arguments)}function R(){this.evEl=Ne,this.evWin=Be,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function O(){this.evTarget=ze,this.evWin=We,this.started=!1,C.apply(this,arguments)}function A(e,t){var n=y(e.touches),r=y(e.changedTouches);return t&(we|Ce)&&(n=b(n.concat(r),"identifier",!0)),[n,r]}function L(){this.evTarget=qe,this.targetIds={},C.apply(this,arguments)}function j(e,t){var n=y(e.touches),r=this.targetIds;if(t&(be|xe)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=y(e.changedTouches),s=[],c=this.target;if(o=n.filter((function(e){return h(e.target,c)})),t===be)for(i=0;i-1&&r.splice(e,1)}),Ue)}}function V(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r=o&&$e>=a)return!0}return!1}function z(e,t){this.manager=e,this.set(t)}function W(e){this.options=re({},this.defaults,e||{}),this.id=pe++,this.manager=null,this.options.enable=d(this.options.enable,!0),this.state=tt,this.simultaneous={},this.requireFail=[]}function H(e){return e&at?"cancel":e&it?"end":e&rt?"move":e&nt?"start":""}function q(e){return e==Pe?"down":e==Te?"up":e==_e?"left":e==ke?"right":""}function U(e,t){var n=t.manager;return n?n.get(e):e}function $(){W.apply(this,arguments)}function G(){$.apply(this,arguments),this.pX=null,this.pY=null}function Y(){$.apply(this,arguments)}function X(){W.apply(this,arguments),this._timer=null,this._input=null}function J(){$.apply(this,arguments)}function K(){$.apply(this,arguments)}function Q(){W.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Z(e,t){return(t=t||{}).recognizers=d(t.recognizers,Z.defaults.preset),new ee(e,t)}function ee(e,t){this.options=re({},Z.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=function(e){return new(e.options.inputClass||(he?R:me?L:fe?F:I))(e,S)}(this),this.touchAction=new z(this,this.options.touchAction),te(this,!0),a(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function te(e,t){var n,r=e.element;r.style&&(a(e.options.cssProps,(function(i,o){n=x(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}function ne(e,n){var r=t.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=n,n.target.dispatchEvent(r)}var re,ie=["","webkit","Moz","MS","ms","o"],oe=t.createElement("div"),ae="function",se=Math.round,ce=Math.abs,le=Date.now;re="function"!=typeof Object.assign?function(e){if(e===r||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;ns&&(t.push(e),s=t.length-1):i&(we|Ce)&&(n=!0),0>s||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var Ve={touchstart:be,touchmove:xe,touchend:we,touchcancel:Ce},ze="touchstart",We="touchstart touchmove touchend touchcancel";c(O,C,{handler:function(e){var t=Ve[e.type];if(t===be&&(this.started=!0),this.started){var n=A.call(this,e,t);t&(we|Ce)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:ge,srcEvent:e})}}});var He={touchstart:be,touchmove:xe,touchend:we,touchcancel:Ce},qe="touchstart touchmove touchend touchcancel";c(L,C,{handler:function(e){var t=He[e.type],n=j.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:ge,srcEvent:e})}});var Ue=2500,$e=25;c(F,C,{handler:function(e,t,n){var r=n.pointerType==ve;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(n.pointerType==ge)N.call(this,t,n);else if(r&&V.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Ge=x(oe.style,"touchAction"),Ye=Ge!==r,Xe="compute",Je="manipulation",Ke="none",Qe="pan-x",Ze="pan-y",et=function(){if(!Ye)return!1;var t={},n=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(r){t[r]=!n||e.CSS.supports("touch-action",r)})),t}();z.prototype={set:function(e){e==Xe&&(e=this.compute()),Ye&&this.manager.element.style&&et[e]&&(this.manager.element.style[Ge]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return a(this.manager.recognizers,(function(t){u(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(m(e,Ke))return Ke;var t=m(e,Qe),n=m(e,Ze);return t&&n?Ke:t||n?t?Qe:Ze:m(e,Je)?Je:"auto"}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(!this.manager.session.prevented){var r=this.actions,i=m(r,Ke)&&!et[Ke],o=m(r,Ze)&&!et[Ze],a=m(r,Qe)&&!et[Qe];if(i&&1===e.pointers.length&&e.distance<2&&e.deltaTime<250)return;return a&&o?void 0:i||o&&n&Ee||a&&n&Me?this.preventSrc(t):void 0}t.preventDefault()},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var tt=1,nt=2,rt=4,it=8,ot=it,at=16;W.prototype={defaults:{},set:function(e){return re(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(o(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=U(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return o(e,"dropRecognizeWith",this)||(e=U(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(o(e,"requireFailure",this))return this;var t=this.requireFail;return-1===v(t,e=U(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(o(e,"dropRequireFailure",this))return this;e=U(e,this);var t=v(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){n.manager.emit(t,e)}var n=this,r=this.state;it>r&&t(n.options.event+H(r)),t(n.options.event),e.additionalEvent&&t(e.additionalEvent),r>=it&&t(n.options.event+H(r))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=32)},canEmit:function(){for(var e=0;eo?_e:ke,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?Se:0>a?Te:Pe,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return $.prototype.attrTest.call(this,e)&&(this.state&nt||!(this.state&nt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=q(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),c(Y,$,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ke]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&nt)},emit:function(e){1!==e.scale&&(e.additionalEvent=this.options.event+(e.scale<1?"in":"out")),this._super.emit.call(this,e)}}),c(X,W,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distancet.time;if(this._input=e,!r||!n||e.eventType&(we|Ce)&&!o)this.reset();else if(e.eventType&be)this.reset(),this._timer=i((function(){this.state=ot,this.tryEmit()}),t.time,this);else if(e.eventType&we)return ot;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===ot&&(e&&e.eventType&we?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=le(),this.manager.emit(this.options.event,this._input)))}}),c(J,$,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ke]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&nt)}}),c(K,$,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ee|Me,pointers:1},getTouchAction:function(){return G.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(Ee|Me)?t=e.overallVelocity:n&Ee?t=e.overallVelocityX:n&Me&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&ce(t)>this.options.velocity&&e.eventType&we},emit:function(e){var t=q(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),c(Q,W,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Je]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distancee.length)&&(t=e.length);for(var n=0,r=new Array(t);nt.options.thresholdY&&(m=0),null!==t.options.thresholdX&&h>t.options.thresholdX&&(g=0),t.css(t.$item,{transform:"translate3d(".concat(g,"px,").concat(m,"px,0)")});break;case"initImg":case"isVisible":case"clipContainer":case"coverImage":return!0}return n.apply(t,i)}}))}}}]),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,(function(t){return e[t]}).bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([,,function(e,t){e.exports=function(e){"complete"===document.readyState||"interactive"===document.readyState?e.call():document.attachEvent?document.attachEvent("onreadystatechange",(function(){"interactive"===document.readyState&&e.call()})):document.addEventListener&&document.addEventListener("DOMContentLoaded",e)}},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(4))},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},,function(e,t,n){e.exports=n(7)},function(e,t,n){"use strict";n.r(t);var r=n(8),i=n(3),o=n.n(i),a=n(2),s=n.n(a),c=n(9);o.a.VideoWorker=o.a.VideoWorker||r.default,Object(c.default)(),s()((function(){void 0!==o.a.jarallax&&o.a.jarallax(document.querySelectorAll("[data-jarallax-video]"))}))},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var r=n(3),i=n.n(r);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(){this.done=[],this.fail=[]}a.prototype={execute:function(e,t){var n=e.length;for(t=Array.prototype.slice.call(t);n;)e[--n].apply(null,t)},resolve:function(){for(var e=arguments.length,t=new Array(e),n=0;n=t.options.endTime&&(t.options.loop?t.play(t.options.startTime):t.pause())}),150):clearInterval(a)},onError:function(e){t.fire("error",e)}};var s=!t.$video;if(s){var c=document.createElement("div");c.setAttribute("id",t.playerID),n.appendChild(c),document.body.appendChild(n)}t.player=t.player||new i.a.YT.Player(t.playerID,t.playerOptions),s&&(t.$video=document.getElementById(t.playerID),t.videoWidth=parseInt(t.$video.getAttribute("width"),10)||1280,t.videoHeight=parseInt(t.$video.getAttribute("height"),10)||720)}if("vimeo"===t.type){if(t.playerOptions={id:t.videoID,autopause:0,transparent:0,autoplay:t.options.autoplay?1:0,loop:t.options.loop?1:0,muted:t.options.mute?1:0},t.options.volume&&(t.playerOptions.volume=t.options.volume),t.options.showContols||(t.playerOptions.badge=0,t.playerOptions.byline=0,t.playerOptions.portrait=0,t.playerOptions.title=0,t.playerOptions.background=1),!t.$video){var l="";Object.keys(t.playerOptions).forEach((function(e){""!==l&&(l+="&"),l+="".concat(e,"=").concat(encodeURIComponent(t.playerOptions[e]))})),t.$video=document.createElement("iframe"),t.$video.setAttribute("id",t.playerID),t.$video.setAttribute("src","https://player.vimeo.com/video/".concat(t.videoID,"?").concat(l)),t.$video.setAttribute("frameborder","0"),t.$video.setAttribute("mozallowfullscreen",""),t.$video.setAttribute("allowfullscreen",""),n.appendChild(t.$video),document.body.appendChild(n)}var u;t.player=t.player||new i.a.Vimeo.Player(t.$video,t.playerOptions),t.options.startTime&&t.options.autoplay&&t.player.setCurrentTime(t.options.startTime),t.player.getVideoWidth().then((function(e){t.videoWidth=e||1280})),t.player.getVideoHeight().then((function(e){t.videoHeight=e||720})),t.player.on("timeupdate",(function(e){u||(t.fire("started",e),u=1),t.fire("timeupdate",e),t.options.endTime&&t.options.endTime&&e.seconds>=t.options.endTime&&(t.options.loop?t.play(t.options.startTime):t.pause())})),t.player.on("play",(function(e){t.fire("play",e),t.options.startTime&&0===e.seconds&&t.play(t.options.startTime)})),t.player.on("pause",(function(e){t.fire("pause",e)})),t.player.on("ended",(function(e){t.fire("ended",e)})),t.player.on("loaded",(function(e){t.fire("ready",e)})),t.player.on("volumechange",(function(e){t.fire("volumechange",e)})),t.player.on("error",(function(e){t.fire("error",e)}))}"local"===t.type&&(t.$video||(t.$video=document.createElement("video"),t.options.showContols&&(t.$video.controls=!0),t.options.mute?t.$video.muted=!0:t.$video.volume&&(t.$video.volume=t.options.volume/100),t.options.loop&&(t.$video.loop=!0),t.$video.setAttribute("playsinline",""),t.$video.setAttribute("webkit-playsinline",""),t.$video.setAttribute("id",t.playerID),n.appendChild(t.$video),document.body.appendChild(n),Object.keys(t.videoID).forEach((function(e){var n,r,i,o;n=t.$video,r=t.videoID[e],i="video/".concat(e),(o=document.createElement("source")).src=r,o.type=i,n.appendChild(o)}))),t.player=t.player||t.$video,t.player.addEventListener("playing",(function(e){r||t.fire("started",e),r=1})),t.player.addEventListener("timeupdate",(function(e){t.fire("timeupdate",e),t.options.endTime&&t.options.endTime&&this.currentTime>=t.options.endTime&&(t.options.loop?t.play(t.options.startTime):t.pause())})),t.player.addEventListener("play",(function(e){t.fire("play",e)})),t.player.addEventListener("pause",(function(e){t.fire("pause",e)})),t.player.addEventListener("ended",(function(e){t.fire("ended",e)})),t.player.addEventListener("loadedmetadata",(function(){t.videoWidth=this.videoWidth||1280,t.videoHeight=this.videoHeight||720,t.fire("ready"),t.options.autoplay&&t.play(t.options.startTime)})),t.player.addEventListener("volumechange",(function(e){t.getVolume((function(e){t.options.volume=e})),t.fire("volumechange",e)})),t.player.addEventListener("error",(function(e){t.fire("error",e)}))),e(t.$video)}))}},{key:"init",value:function(){this.playerID="VideoWorker-".concat(this.ID)}},{key:"loadAPI",value:function(){if(!c||!l){var e="";if("youtube"!==this.type||c||(c=1,e="https://www.youtube.com/iframe_api"),"vimeo"===this.type&&!l){if(l=1,void 0!==i.a.Vimeo)return;e="https://player.vimeo.com/api/player.js"}if(e){var t=document.createElement("script"),n=document.getElementsByTagName("head")[0];t.src=e,n.appendChild(t),t=n=null}}}},{key:"onAPIready",value:function(e){if("youtube"===this.type&&(void 0!==i.a.YT&&0!==i.a.YT.loaded||u?"object"===o(i.a.YT)&&1===i.a.YT.loaded?e():p.done((function(){e()})):(u=1,window.onYouTubeIframeAPIReady=function(){window.onYouTubeIframeAPIReady=null,p.resolve("done"),e()})),"vimeo"===this.type)if(void 0!==i.a.Vimeo||d)void 0!==i.a.Vimeo?e():f.done((function(){e()}));else{d=1;var t=setInterval((function(){void 0!==i.a.Vimeo&&(clearInterval(t),f.resolve("done"),e())}),20)}"local"===this.type&&e()}}])&&function(e,t){for(var n=0;no&&(r=(o=t.container.width)*e.image.height/e.image.width,a=0,s+=(t.image.height-r)/2),"IFRAME"===n&&(r+=400,s-=200),e.css(e.$video,{width:"".concat(o,"px"),marginLeft:"".concat(a,"px"),height:"".concat(r,"px"),marginTop:"".concat(s,"px")})}return t};var a=t.prototype.initImg;t.prototype.initImg=function(){var e=this,t=a.apply(e);return e.options.videoSrc||(e.options.videoSrc=e.$item.getAttribute("data-jarallax-video")||null),e.options.videoSrc?(e.defaultInitImgResult=t,!0):t};var s=t.prototype.canInitParallax;t.prototype.canInitParallax=function(){var e=this,t=s.apply(e);if(!e.options.videoSrc)return t;var n=new r.default(e.options.videoSrc,{autoplay:!0,loop:e.options.videoLoop,showContols:!1,startTime:e.options.videoStartTime||0,endTime:e.options.videoEndTime||0,mute:e.options.videoVolume?0:1,volume:e.options.videoVolume||0});function i(){e.image.$default_item&&(e.image.$item=e.image.$default_item,e.image.$item.style.display="block",e.coverImage(),e.clipContainer(),e.onScroll())}if(n.isValid())if(this.options.disableParallax()&&(t=!0,e.image.position="absolute",e.options.type="scroll",e.options.speed=1),t){if(n.on("ready",(function(){if(e.options.videoPlayOnlyVisible){var t=e.onScroll;e.onScroll=function(){t.apply(e),e.videoError||!e.options.videoLoop&&(e.options.videoLoop||e.videoEnded)||(e.isVisible()?n.play():n.pause())}}else n.play()})),n.on("started",(function(){e.image.$default_item=e.image.$item,e.image.$item=e.$video,e.image.width=e.video.videoWidth||1280,e.image.height=e.video.videoHeight||720,e.coverImage(),e.clipContainer(),e.onScroll(),e.image.$default_item&&(e.image.$default_item.style.display="none")})),n.on("ended",(function(){e.videoEnded=!0,i()})),n.on("error",(function(){e.videoError=!0,i()})),e.video=n,!e.defaultInitImgResult&&(e.image.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7","local"!==n.type))return n.getImageURL((function(t){e.image.bgImage='url("'.concat(t,'")'),e.init()})),!1}else e.defaultInitImgResult||n.getImageURL((function(t){var n=e.$item.getAttribute("style");n&&e.$item.setAttribute("data-jarallax-original-styles",n),e.css(e.$item,{"background-image":'url("'.concat(t,'")'),"background-position":"center","background-size":"cover"})}));return t};var c=t.prototype.destroy;t.prototype.destroy=function(){var e=this;e.image.$default_item&&(e.image.$item=e.image.$default_item,delete e.image.$default_item),c.apply(e)}}}}]),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JitsiMeetExternalAPI=t():e.JitsiMeetExternalAPI=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,(function(t){return e[t]}).bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/libs/",n(n.s=6)}([function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return f}));var r=n(5);const i=n.n(r).a.getLogger(e);function o(e){return e.sendRequest({type:"devices",name:"getAvailableDevices"}).catch(e=>(i.error(e),{}))}function a(e){return e.sendRequest({type:"devices",name:"getCurrentDevices"}).catch(e=>(i.error(e),{}))}function s(e,t){return e.sendRequest({deviceType:t,type:"devices",name:"isDeviceChangeAvailable"})}function c(e){return e.sendRequest({type:"devices",name:"isDeviceListAvailable"})}function l(e){return e.sendRequest({type:"devices",name:"isMultipleAudioInputSupported"})}function u(e,t,n){return p(e,{id:n,kind:"audioinput",label:t})}function d(e,t,n){return p(e,{id:n,kind:"audiooutput",label:t})}function p(e,t){return e.sendRequest({type:"devices",name:"setDevice",device:t})}function f(e,t,n){return p(e,{id:n,kind:"videoinput",label:t})}}).call(this,"modules/API/external/functions.js")},function(e,t){var n={trace:0,debug:1,info:2,log:3,warn:4,error:5},r=[s.consoleTransport=console];s.addGlobalTransport=function(e){-1===r.indexOf(e)&&r.push(e)},s.removeGlobalTransport=function(e){var t=r.indexOf(e);-1!==t&&r.splice(t,1)};var i={};function o(){var e={methodName:"",fileLocation:"",line:null,column:null},t=new Error,n=t.stack?t.stack.split("\n"):[];if(!n||n.length<1)return e;var r=null;return n[3]&&(r=n[3].match(/\s*at\s*(.+?)\s*\((\S*)\s*:(\d*)\s*:(\d*)\)/)),!r||r.length<=4?(e.methodName=0===n[2].indexOf("log@")?n[3].substr(0,n[3].indexOf("@")):n[2].substr(0,n[2].indexOf("@")),e):(e.methodName=r[1],e.fileLocation=r[2],e.line=r[3],e.column=r[4],e)}function a(){var e=arguments[0],t=arguments[1],a=Array.prototype.slice.call(arguments,2);if(!(n[t]1&&p.push("<"+s.methodName+">: ");var f=p.concat(a);d.bind(u).apply(u,f)}}}function s(e,t,r,i){this.id=t,this.options=i||{},this.transports=r,this.transports||(this.transports=[]),this.level=n[e];for(var o=Object.keys(n),s=0;s0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,console&&console.warn&&console.warn(s)}return e}function p(){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 f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var l=c.length,u=g(c,l);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t){e.exports=function(e){var t,n=e.scope,r=e.window,i=e.windowForEventListening||window,o={},a=[],s={},c=!1,l=function(e){var t;try{t=JSON.parse(e.data)}catch(e){return}if(t.postis&&t.scope===n){var r=o[t.method];if(r)for(var i=0;i=this.maxEntryLength&&this._flush(!0,!0)},i.prototype.start=function(){this._reschedulePublishInterval()},i.prototype._reschedulePublishInterval=function(){this.storeLogsIntervalID&&(window.clearTimeout(this.storeLogsIntervalID),this.storeLogsIntervalID=null),this.storeLogsIntervalID=window.setTimeout(this._flush.bind(this,!1,!0),this.storeInterval)},i.prototype.flush=function(){this._flush(!1,!0)},i.prototype._flush=function(e,t){this.totalLen>0&&(this.logStorage.isReady()||e)&&(this.logStorage.isReady()?(this.outputCache.length&&(this.outputCache.forEach((function(e){this.logStorage.storeLogs(e)}).bind(this)),this.outputCache=[]),this.logStorage.storeLogs(this.queue)):this.outputCache.push(this.queue),this.queue=[],this.totalLen=0),t&&this._reschedulePublishInterval()},i.prototype.stop=function(){this._flush(!1,!1)},e.exports=i},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return k}));var r=n(2),i=n.n(r);function o(e){const t=new RegExp("^([a-z][a-z0-9\\.\\+-]*:)+","gi"),n=t.exec(e);if(n){let r=n[n.length-1].toLowerCase();"http:"!==r&&"https:"!==r&&(r="https:"),(e=e.substring(t.lastIndex)).startsWith("//")&&(e=r+e)}return e}function a(e={}){const t=[];for(const n in e)try{t.push(`${n}=${encodeURIComponent(JSON.stringify(e[n]))}`)}catch(e){console.warn(`Error encoding ${n}: ${e}`)}return t}function s(e){const t={toString:c};let n,r,i;if(e=e.replace(/\s/g,""),n=new RegExp("^([a-z][a-z0-9\\.\\+-]*:)","gi"),r=n.exec(e),r&&(t.protocol=r[1].toLowerCase(),e=e.substring(n.lastIndex)),n=new RegExp("^(//[^/?#]+)","gi"),r=n.exec(e),r){let i=r[1].substring(2);e=e.substring(n.lastIndex);const o=i.indexOf("@");-1!==o&&(i=i.substring(o+1)),t.host=i;const a=i.lastIndexOf(":");-1!==a&&(t.port=i.substring(a+1),i=i.substring(0,a)),t.hostname=i}if(n=new RegExp("^([^?#]*)","gi"),r=n.exec(e),r&&(i=r[1],e=e.substring(n.lastIndex)),i?i.startsWith("/")||(i="/"+i):i="/",t.pathname=i,e.startsWith("?")){let n=e.indexOf("#",1);-1===n&&(n=e.length),t.search=e.substring(0,n),e=e.substring(n)}else t.search="";return t.hash=e.startsWith("#")?e:"",t}function c(e){const{hash:t,host:n,pathname:r,protocol:i,search:o}=e||this;let a="";return i&&(a+=i),n&&(a+="//"+n),a+=r||"/",o&&(a+=o),t&&(a+=t),a}var l=n(3),u=n.n(l);function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p={window:window.opener||window.parent};class f{constructor({postisOptions:e}={}){this.postis=u()(function(e){for(var t=1;t{},this.postis.listen("message",e=>this._receiveCallback(e))}dispose(){this.postis.destroy()}send(e){this.postis.send({method:"message",params:e})}setReceiveCallback(e){this._receiveCallback=e}}class h{constructor({backend:e}={}){this._listeners=new Map,this._requestID=0,this._responseHandlers=new Map,this._unprocessedMessages=new Set,this.addListener=this.on,e&&this.setBackend(e)}_disposeBackend(){this._backend&&(this._backend.dispose(),this._backend=null)}_onMessageReceived(e){if("response"===e.type){const t=this._responseHandlers.get(e.id);t&&(t(e),this._responseHandlers.delete(e.id))}else"request"===e.type?this.emit("request",e.data,(t,n)=>{this._backend.send({type:"response",error:n,id:e.id,result:t})}):this.emit("event",e.data)}dispose(){this._responseHandlers.clear(),this._unprocessedMessages.clear(),this.removeAllListeners(),this._disposeBackend()}emit(e,...t){const n=this._listeners.get(e);let r=!1;return n&&n.size&&n.forEach(e=>{r=e(...t)||r}),r||this._unprocessedMessages.add(t),r}on(e,t){let n=this._listeners.get(e);return n||(n=new Set,this._listeners.set(e,n)),n.add(t),this._unprocessedMessages.forEach(e=>{t(...e)&&this._unprocessedMessages.delete(e)}),this}removeAllListeners(e){return e?this._listeners.delete(e):this._listeners.clear(),this}removeListener(e,t){const n=this._listeners.get(e);return n&&n.delete(t),this}sendEvent(e={}){this._backend&&this._backend.send({type:"event",data:e})}sendRequest(e){if(!this._backend)return Promise.reject(new Error("No transport backend defined!"));this._requestID++;const t=this._requestID;return new Promise((n,r)=>{this._responseHandlers.set(t,({error:e,result:t})=>{void 0!==t?n(t):r(void 0!==e?e:new Error("Unexpected response format!"))}),this._backend.send({type:"request",data:e,id:t})})}setBackend(e){this._disposeBackend(),this._backend=e,this._backend.setReceiveCallback(this._onMessageReceived.bind(this))}}!function(e,t=!1,n="hash"){const r="search"===n?e.search:e.hash,i={},o=r&&r.substr(1).split("&")||[];if("hash"===n&&1===o.length){const e=o[0];if(e.startsWith("/")&&1===e.split("&").length)return i}o.forEach(e=>{const n=e.split("="),r=n[0];if(!r)return;let o;try{if(o=n[1],!t){const e=decodeURIComponent(o).replace(/\\&/,"&");o="undefined"===e?void 0:JSON.parse(e)}}catch(e){return void function(e,t=""){console.error(t,e),window.onerror&&window.onerror(t,null,null,null,e)}(e,"Failed to parse URL parameter value: "+String(o))}i[r]=o})}(window.location),(window.JitsiMeetJS||(window.JitsiMeetJS={}),window.JitsiMeetJS.app||(window.JitsiMeetJS.app={}),window.JitsiMeetJS.app).setExternalTransportBackend=e=>(void 0).setBackend(e);var m=n(4),g=n(0);function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=["css/all.css","libs/alwaysontop.min.js"],b={avatarUrl:"avatar-url",displayName:"display-name",e2eeKey:"e2ee-key",email:"email",hangup:"video-hangup",muteEveryone:"mute-everyone",password:"password",sendEndpointTextMessage:"send-endpoint-text-message",sendTones:"send-tones",setVideoQuality:"set-video-quality",startRecording:"start-recording",stopRecording:"stop-recording",subject:"subject",submitFeedback:"submit-feedback",toggleAudio:"toggle-audio",toggleChat:"toggle-chat",toggleFilmStrip:"toggle-film-strip",toggleShareScreen:"toggle-share-screen",toggleTileView:"toggle-tile-view",toggleVideo:"toggle-video"},x={"avatar-changed":"avatarChanged","audio-availability-changed":"audioAvailabilityChanged","audio-mute-status-changed":"audioMuteStatusChanged","camera-error":"cameraError","device-list-changed":"deviceListChanged","display-name-change":"displayNameChange","email-change":"emailChange","endpoint-text-message-received":"endpointTextMessageReceived","feedback-submitted":"feedbackSubmitted","feedback-prompt-displayed":"feedbackPromptDisplayed","filmstrip-display-changed":"filmstripDisplayChanged","incoming-message":"incomingMessage","mic-error":"micError","outgoing-message":"outgoingMessage","participant-joined":"participantJoined","participant-kicked-out":"participantKickedOut","participant-left":"participantLeft","participant-role-changed":"participantRoleChanged","password-required":"passwordRequired","proxy-connection-event":"proxyConnectionEvent","video-ready-to-close":"readyToClose","video-conference-joined":"videoConferenceJoined","video-conference-left":"videoConferenceLeft","video-availability-changed":"videoAvailabilityChanged","video-mute-status-changed":"videoMuteStatusChanged","screen-sharing-status-changed":"screenSharingStatusChanged","dominant-speaker-changed":"dominantSpeakerChanged","subject-change":"subjectChange","suspend-detected":"suspendDetected","tile-view-changed":"tileViewChanged"};let w=0;function C(e,t){e._numberOfParticipants+=t}function S(e,t={}){return function(e){let t;t=e.serverURL&&e.room?new URL(e.room,e.serverURL).toString():e.room?e.room:e.url||"";const n=s(o(t));if(!n.protocol){let t=e.protocol||e.scheme;t&&(t.endsWith(":")||(t+=":"),n.protocol=t)}let{pathname:r}=n;if(!n.host){const t=e.domain||e.host||e.hostname;if(t){const{host:e,hostname:i,pathname:a,port:c}=s(o("org.jitsi.meet://"+t));e&&(n.host=e,n.hostname=i,n.port=c),"/"===r&&"/"!==a&&(r=a)}}const i=e.roomName||e.room;!i||!n.pathname.endsWith("/")&&n.pathname.endsWith("/"+i)||(r.endsWith("/")||(r+="/"),r+=i),n.pathname=r;const{jwt:c}=e;if(c){let{search:e}=n;-1===e.indexOf("?jwt=")&&-1===e.indexOf("&jwt=")&&(e.startsWith("?")||(e="?"+e),1===e.length||(e+="&"),e+="jwt="+c,n.search=e)}let{hash:l}=n;for(const o of["config","interfaceConfig","devices","userInfo"]){const t=a(e[o+"Overwrite"]||e[o]||e[o+"Override"]);if(t.length){let e=`${o}.${t.join(`&${o}.`)}`;l.length?e="&"+e:l="#",l+=e}}return n.hash=l,n.toString()||void 0}(function(e){for(var t=1;t0&&this.invite(d),this._tmpE2EEKey=g,this._isLargeVideoVisible=!0,this._numberOfParticipants=0,this._participants={},this._myUserID=void 0,this._onStageParticipant=void 0,this._setupListeners(),w++}_createIFrame(e,t,n){const r="jitsiConferenceFrame"+w;this._frame=document.createElement("iframe"),this._frame.allow="camera; microphone; display-capture",this._frame.src=this._url,this._frame.name=r,this._frame.id=r,this._setSize(e,t),this._frame.setAttribute("allowFullScreen","true"),this._frame.style.border=0,n&&(this._frame.onload=n),this._frame=this._parentNode.appendChild(this._frame)}_getAlwaysOnTopResources(){const e=this._frame.contentWindow;let t="";const n=e.document.querySelector("base");if(n&&n.href)t=n.href;else{const{protocol:n,host:r}=e.location;t=`${n}//${r}`}return y.map(e=>new URL(e,t).href)}_getOnStageParticipant(){return this._onStageParticipant}_getLargeVideo(){const e=this.getIFrame();if(this._isLargeVideoVisible&&e&&e.contentWindow&&e.contentWindow.document)return e.contentWindow.document.getElementById("largeVideo")}_getParticipantVideo(e){const t=this.getIFrame();if(t&&t.contentWindow&&t.contentWindow.document)return void 0===e||e===this._myUserID?t.contentWindow.document.getElementById("localVideo_container"):t.contentWindow.document.querySelector(`#participant_${e} video`)}_setSize(e,t){const n=_(e),r=_(t);void 0!==n&&(this._frame.style.height=n),void 0!==r&&(this._frame.style.width=r)}_setupListeners(){this._transport.on("event",e=>{let{name:t}=e,n=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["name"]);const r=n.id;switch(t){case"video-conference-joined":void 0!==this._tmpE2EEKey&&(this.executeCommand(b.e2eeKey,this._tmpE2EEKey),this._tmpE2EEKey=void 0),this._myUserID=r,this._participants[r]={avatarURL:n.avatarURL};case"participant-joined":this._participants[r]=this._participants[r]||{},this._participants[r].displayName=n.displayName,this._participants[r].formattedDisplayName=n.formattedDisplayName,C(this,1);break;case"participant-left":C(this,-1),delete this._participants[r];break;case"display-name-change":{const e=this._participants[r];e&&(e.displayName=n.displayname,e.formattedDisplayName=n.formattedDisplayName);break}case"email-change":{const e=this._participants[r];e&&(e.email=n.email);break}case"avatar-changed":{const e=this._participants[r];e&&(e.avatarURL=n.avatarURL);break}case"on-stage-participant-changed":this._onStageParticipant=r,this.emit("largeVideoChanged");break;case"large-video-visibility-changed":this._isLargeVideoVisible=n.isVisible,this.emit("largeVideoChanged");break;case"video-conference-left":C(this,-1),delete this._participants[this._myUserID]}const i=x[t];return!!i&&(this.emit(i,n),!0)})}addEventListener(e,t){this.on(e,t)}addEventListeners(e){for(const t in e)this.addEventListener(t,e[t])}dispose(){this.emit("_willDispose"),this._transport.dispose(),this.removeAllListeners(),this._frame&&this._frame.parentNode&&this._frame.parentNode.removeChild(this._frame)}executeCommand(e,...t){e in b?this._transport.sendEvent({data:t,name:b[e]}):console.error("Not supported command name.")}executeCommands(e){for(const t in e)this.executeCommand(t,e[t])}getAvailableDevices(){return Object(g.a)(this._transport)}getCurrentDevices(){return Object(g.b)(this._transport)}isAudioAvailable(){return this._transport.sendRequest({name:"is-audio-available"})}isDeviceChangeAvailable(e){return Object(g.c)(this._transport,e)}isDeviceListAvailable(){return Object(g.d)(this._transport)}isMultipleAudioInputSupported(){return Object(g.e)(this._transport)}invite(e){return Array.isArray(e)&&0!==e.length?this._transport.sendRequest({name:"invite",invitees:e}):Promise.reject(new TypeError("Invalid Argument"))}isAudioMuted(){return this._transport.sendRequest({name:"is-audio-muted"})}getAvatarURL(e){const{avatarURL:t}=this._participants[e]||{};return t}getDisplayName(e){const{displayName:t}=this._participants[e]||{};return t}getEmail(e){const{email:t}=this._participants[e]||{};return t}_getFormattedDisplayName(e){const{formattedDisplayName:t}=this._participants[e]||{};return t}getIFrame(){return this._frame}getNumberOfParticipants(){return this._numberOfParticipants}isVideoAvailable(){return this._transport.sendRequest({name:"is-video-available"})}isVideoMuted(){return this._transport.sendRequest({name:"is-video-muted"})}removeEventListener(e){this.removeAllListeners(e)}removeEventListeners(e){e.forEach(e=>this.removeEventListener(e))}sendProxyConnectionEvent(e){this._transport.sendEvent({data:[e],name:"proxy-connection-event"})}setAudioInputDevice(e,t){return Object(g.f)(this._transport,e,t)}setAudioOutputDevice(e,t){return Object(g.g)(this._transport,e,t)}setVideoInputDevice(e,t){return Object(g.h)(this._transport,e,t)}_getElectronPopupsConfig(){return Promise.resolve(m)}}}])})),parcelRequire=function(e,t,n,r){var i,o="function"==typeof parcelRequire&&parcelRequire,a="function"==typeof require&&require;function s(n,r){if(!t[n]){if(!e[n]){var i="function"==typeof parcelRequire&&parcelRequire;if(!r&&i)return i(n,!0);if(o)return o(n,!0);if(a&&"string"==typeof n)return a(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}u.resolve=function(t){return e[n][1][t]||t},u.cache={};var l=t[n]=new s.Module(n);e[n][0].call(l.exports,u,l,l.exports,this)}return t[n].exports;function u(e){return s(u.resolve(e))}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=t,s.parent=o,s.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]};for(var c=0;c0){var e=new Uint8Array(this._pieces);r.useArrayBufferView||(e=e.buffer),this._parts.push(e),this._pieces=[]}},o.prototype.getBuffer=function(){if(this.flush(),r.useBlobBuilder){for(var e=new i,t=0,n=this._parts.length;t>31?1:-1)*(8388607&e|8388608)*Math.pow(2,(e>>23&255)-127-23)},o.prototype.unpack_double=function(){var e=this.unpack_uint32(),t=this.unpack_uint32(),n=(e>>20&2047)-1023;return(0==e>>31?1:-1)*((1048575&e|1048576)*Math.pow(2,n-20)+t*Math.pow(2,n-52))},o.prototype.read=function(e){var t=this.index;if(t+e<=this.length)return this.dataView.subarray(t,t+e);throw new Error("BinaryPackFailure: read index out of range")},a.prototype.getBuffer=function(){return this.bufferBuilder.getBuffer()},a.prototype.pack=function(e){var t=typeof e;if("string"===t)this.pack_string(e);else if("number"===t)Math.floor(e)===e?this.pack_integer(e):this.pack_double(e);else if("boolean"===t)!0===e?this.bufferBuilder.append(195):!1===e&&this.bufferBuilder.append(194);else if("undefined"===t)this.bufferBuilder.append(192);else{if("object"!==t)throw new Error('Type "'+t+'" not yet supported');if(null===e)this.bufferBuilder.append(192);else{var n=e.constructor;if(n==Array)this.pack_array(e);else if(n==Blob||n==File||e instanceof Blob||e instanceof File)this.pack_bin(e);else if(n==ArrayBuffer)this.pack_bin(i.useArrayBufferView?new Uint8Array(e):e);else if("BYTES_PER_ELEMENT"in e)this.pack_bin(i.useArrayBufferView?new Uint8Array(e.buffer):e.buffer);else if(n==Object||n.toString().startsWith("class"))this.pack_object(e);else if(n==Date)this.pack_string(e.toString());else{if("function"!=typeof e.toBinaryPack)throw new Error('Type "'+n.toString()+'" not yet supported');this.bufferBuilder.append(e.toBinaryPack())}}}this.bufferBuilder.flush()},a.prototype.pack_bin=function(e){var t=e.length||e.byteLength||e.size;if(t<=15)this.pack_uint8(160+t);else if(t<=65535)this.bufferBuilder.append(218),this.pack_uint16(t);else{if(!(t<=4294967295))throw new Error("Invalid length");this.bufferBuilder.append(219),this.pack_uint32(t)}this.bufferBuilder.append(e)},a.prototype.pack_string=function(e){var t=function(e){return e.length>600?new Blob([e]).size:e.replace(/[^\u0000-\u007F]/g,s).length}(e);if(t<=15)this.pack_uint8(176+t);else if(t<=65535)this.bufferBuilder.append(216),this.pack_uint16(t);else{if(!(t<=4294967295))throw new Error("Invalid length");this.bufferBuilder.append(217),this.pack_uint32(t)}this.bufferBuilder.append(e)},a.prototype.pack_array=function(e){var t=e.length;if(t<=15)this.pack_uint8(144+t);else if(t<=65535)this.bufferBuilder.append(220),this.pack_uint16(t);else{if(!(t<=4294967295))throw new Error("Invalid length");this.bufferBuilder.append(221),this.pack_uint32(t)}for(var n=0;n=-32&&e<=127)this.bufferBuilder.append(255&e);else if(e>=0&&e<=255)this.bufferBuilder.append(204),this.pack_uint8(e);else if(e>=-128&&e<=127)this.bufferBuilder.append(208),this.pack_int8(e);else if(e>=0&&e<=65535)this.bufferBuilder.append(205),this.pack_uint16(e);else if(e>=-32768&&e<=32767)this.bufferBuilder.append(209),this.pack_int16(e);else if(e>=0&&e<=4294967295)this.bufferBuilder.append(206),this.pack_uint32(e);else if(e>=-2147483648&&e<=2147483647)this.bufferBuilder.append(210),this.pack_int32(e);else if(e>=-0x8000000000000000&&e<=0x8000000000000000)this.bufferBuilder.append(211),this.pack_int64(e);else{if(!(e>=0&&e<=0x10000000000000000))throw new Error("Invalid integer");this.bufferBuilder.append(207),this.pack_uint64(e)}},a.prototype.pack_double=function(e){var t=0;e<0&&(t=1,e=-e);var n=Math.floor(Math.log(e)/Math.LN2),r=e/Math.pow(2,n)-1,i=Math.floor(r*Math.pow(2,52)),o=Math.pow(2,32),a=t<<31|n+1023<<20|i/o&1048575,s=i%o;this.bufferBuilder.append(203),this.pack_int32(a),this.pack_int32(s)},a.prototype.pack_object=function(e){var t=Object.keys(e).length;if(t<=15)this.pack_uint8(128+t);else if(t<=65535)this.bufferBuilder.append(222),this.pack_uint16(t);else{if(!(t<=4294967295))throw new Error("Invalid length");this.bufferBuilder.append(223),this.pack_uint32(t)}for(var n in e)e.hasOwnProperty(n)&&(this.pack(n),this.pack(e[n]))},a.prototype.pack_uint8=function(e){this.bufferBuilder.append(e)},a.prototype.pack_uint16=function(e){this.bufferBuilder.append(e>>8),this.bufferBuilder.append(255&e)},a.prototype.pack_uint32=function(e){var t=4294967295&e;this.bufferBuilder.append((4278190080&t)>>>24),this.bufferBuilder.append((16711680&t)>>>16),this.bufferBuilder.append((65280&t)>>>8),this.bufferBuilder.append(255&t)},a.prototype.pack_uint64=function(e){var t=e/Math.pow(2,32),n=e%Math.pow(2,32);this.bufferBuilder.append((4278190080&t)>>>24),this.bufferBuilder.append((16711680&t)>>>16),this.bufferBuilder.append((65280&t)>>>8),this.bufferBuilder.append(255&t),this.bufferBuilder.append((4278190080&n)>>>24),this.bufferBuilder.append((16711680&n)>>>16),this.bufferBuilder.append((65280&n)>>>8),this.bufferBuilder.append(255&n)},a.prototype.pack_int8=function(e){this.bufferBuilder.append(255&e)},a.prototype.pack_int16=function(e){this.bufferBuilder.append((65280&e)>>8),this.bufferBuilder.append(255&e)},a.prototype.pack_int32=function(e){this.bufferBuilder.append(e>>>24&255),this.bufferBuilder.append((16711680&e)>>>16),this.bufferBuilder.append((65280&e)>>>8),this.bufferBuilder.append(255&e)},a.prototype.pack_int64=function(e){var t=Math.floor(e/Math.pow(2,32)),n=e%Math.pow(2,32);this.bufferBuilder.append((4278190080&t)>>>24),this.bufferBuilder.append((16711680&t)>>>16),this.bufferBuilder.append((65280&t)>>>8),this.bufferBuilder.append(255&t),this.bufferBuilder.append((4278190080&n)>>>24),this.bufferBuilder.append((16711680&n)>>>16),this.bufferBuilder.append((65280&n)>>>8),this.bufferBuilder.append(255&n)}},{"./bufferbuilder":"EgBh"}],iSxC:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.extractVersion=a,n.wrapPeerConnectionEvent=function(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);var o=function(e){var t=n(e);t&&r(t)};return this._eventMap=this._eventMap||{},this._eventMap[r]=o,i.apply(this,[e,o])};var o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[n])return o.apply(this,arguments);var r=this._eventMap[n];return delete this._eventMap[n],o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}},n.disableLog=function(e){return"boolean"!=typeof e?new Error("Argument type: "+r(e)+". Please use a boolean."):(i=e,e?"adapter.js logging disabled":"adapter.js logging enabled")},n.disableWarnings=function(e){return"boolean"!=typeof e?new Error("Argument type: "+r(e)+". Please use a boolean."):(o=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))},n.log=function(){if("object"===("undefined"==typeof window?"undefined":r(window))){if(i)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}},n.deprecated=function(e,t){o&&console.warn(e+" is deprecated, please use "+t+" instead.")},n.detectBrowser=function(e){var{navigator:t}=e,n={browser:null,version:null};if(void 0===e||!e.navigator)return n.browser="Not a browser.",n;if(t.mozGetUserMedia)n.browser="firefox",n.version=a(t.userAgent,/Firefox\/(\d+)\./,1);else if(t.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)n.browser="chrome",n.version=a(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(t.mediaDevices&&t.userAgent.match(/Edge\/(\d+).(\d+)$/))n.browser="edge",n.version=a(t.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!e.RTCPeerConnection||!t.userAgent.match(/AppleWebKit\/(\d+)\./))return n.browser="Not a supported browser.",n;n.browser="safari",n.version=a(t.userAgent,/AppleWebKit\/(\d+)\./,1),n.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return n},n.compactObject=function e(t){return s(t)?Object.keys(t).reduce((function(n,r){var i=s(t[r]),o=i?e(t[r]):t[r],a=i&&!Object.keys(o).length;return void 0===o||a?n:Object.assign(n,function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r,o))}),{}):t},n.walkStats=c,n.filterStats=function(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;var o=[];return e.forEach((function(e){"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)})),o.forEach((function(t){e.forEach((function(n){n.type===r&&n.trackId===t.id&&c(e,n,i)}))})),i};var i=!0,o=!0;function a(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function s(e){return"[object Object]"===Object.prototype.toString.call(e)}function c(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((function(r){r.endsWith("Id")?c(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach((function(t){c(e,e.get(t),n)}))})))}},{}],s6SN:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetUserMedia=function(e){var t=e&&e.navigator;if(t.mediaDevices){var n=r.detectBrowser(e),a=function(e){if("object"!==i(e)||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach((function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"===i(e[n])?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];var a={};"number"==typeof r.ideal?(a[o("min",n)]=r.ideal,t.optional.push(a),(a={})[o("max",n)]=r.ideal,t.optional.push(a)):(a[o("",n)]=r.ideal,t.optional.push(a))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=r.exact):["min","max"].forEach((function(e){void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=r[e])}))}})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},s=function(e,r){if(n.version>=61)return r(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"===i(e.audio)){var s=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};s((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),s(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=a(e.audio)}if(e&&"object"===i(e.video)){var c=e.video.facingMode;c=c&&("object"===i(c)?c:{ideal:c});var l,u=n.version<66;if(c&&("user"===c.exact||"environment"===c.exact||"user"===c.ideal||"environment"===c.ideal)&&(!t.mediaDevices.getSupportedConstraints||!t.mediaDevices.getSupportedConstraints().facingMode||u)&&(delete e.video.facingMode,"environment"===c.exact||"environment"===c.ideal?l=["back","rear"]:"user"!==c.exact&&"user"!==c.ideal||(l=["front"]),l))return t.mediaDevices.enumerateDevices().then((function(t){var n=(t=t.filter((function(e){return"videoinput"===e.kind}))).find((function(e){return l.some((function(t){return e.label.toLowerCase().includes(t)}))}));return!n&&t.length&&l.includes("back")&&(n=t[t.length-1]),n&&(e.video.deviceId=c.exact?{exact:n.deviceId}:{ideal:n.deviceId}),e.video=a(e.video),o("chrome: "+JSON.stringify(e)),r(e)}));e.video=a(e.video)}return o("chrome: "+JSON.stringify(e)),r(e)},c=function(e){return n.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};if(t.getUserMedia=(function(e,n,r){s(e,(function(e){t.webkitGetUserMedia(e,n,(function(e){r&&r(c(e))}))}))}).bind(t),t.mediaDevices.getUserMedia){var l=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return s(e,(function(e){return l(e).then((function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach((function(e){e.stop()})),new DOMException("","NotFoundError");return t}),(function(e){return Promise.reject(c(e))}))}))}}}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=function(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return e}();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(e("../utils.js"));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r.log},{"../utils.js":"iSxC"}],VHa8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then((function(t){var r=n.video&&n.video.width,i=n.video&&n.video.height;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:n.video&&n.video.frameRate||3}},r&&(n.video.mandatory.maxWidth=r),i&&(n.video.mandatory.maxHeight=i),e.navigator.mediaDevices.getUserMedia(n)}))}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}},{}],uI5X:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimMediaStream=function(e){e.MediaStream=e.MediaStream||e.webkitMediaStream},n.shimOnTrack=function(e){if("object"===s(e)&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var n=this;return this._ontrackpoly||(this._ontrackpoly=function(t){t.stream.addEventListener("addtrack",(function(r){var i;i=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===r.track.id})):{track:r.track};var o=new Event("track");o.track=r.track,o.receiver=i,o.transceiver={receiver:i},o.streams=[t.stream],n.dispatchEvent(o)})),t.stream.getTracks().forEach((function(r){var i;i=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===r.id})):{track:r};var o=new Event("track");o.track=r,o.receiver=i,o.transceiver={receiver:i},o.streams=[t.stream],n.dispatchEvent(o)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else r.wrapPeerConnectionEvent(e,"track",(function(e){return e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e}))},n.shimGetSendersWithDtmf=function(e){if("object"===s(e)&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&(this._dtmf="audio"===t.kind?e.createDTMFSender(t):null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){var i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};var r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);var t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}var i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._senders=this._senders||[],i.apply(this,[e]),e.getTracks().forEach((function(e){n._senders.push(t(n,e))}))};var o=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._senders=this._senders||[],o.apply(this,[e]),e.getTracks().forEach((function(e){var n=t._senders.find((function(t){return t.track===e}));n&&t._senders.splice(t._senders.indexOf(n),1)}))}}else if("object"===s(e)&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var a=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=a.apply(this,[]);return t.forEach((function(t){return t._pc=e})),t},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&(this._dtmf="audio"===this.track.kind?this._pc.createDTMFSender(this.track):null),this._dtmf}})}},n.shimGetStats=function(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=this,[n,r,i]=arguments;if(arguments.length>0&&"function"==typeof n)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof n))return t.apply(this,[]);var o=function(e){var t={};return e.result().forEach((function(e){var n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach((function(t){n[t]=e.stat(t)})),t[n.id]=n})),t},a=function(e){return new Map(Object.keys(e).map((function(t){return[t,e[t]]})))};if(arguments.length>=2){var s=function(e){r(a(o(e)))};return t.apply(this,[s,n])}return new Promise((function(n,r){t.apply(e,[function(e){n(a(o(e)))},r])})).then(r,i)}}},n.shimSenderReceiverGetStats=function(e){if("object"===s(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver){if(!("getStats"in e.RTCRtpSender.prototype)){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return r.filterStats(t,e.track,!0)}))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){var i=e.RTCPeerConnection.prototype.getReceivers;i&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,t=i.apply(this,[]);return t.forEach((function(t){return t._pc=e})),t}),r.wrapPeerConnectionEvent(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return r.filterStats(t,e.track,!1)}))}}if("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype){var o=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){var t,n,r,i=arguments[0];return this.getSenders().forEach((function(e){e.track===i&&(t?r=!0:t=e)})),this.getReceivers().forEach((function(e){return e.track===i&&(n?r=!0:n=e),e.track===i})),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return o.apply(this,arguments)}}}},n.shimAddTrackRemoveTrackWithNative=c,n.shimAddTrackRemoveTrack=function(e){if(e.RTCPeerConnection){var t=r.detectBrowser(e);if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return c(e);var n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this,t=n.apply(this);return this._reverseStreams=this._reverseStreams||{},t.map((function(t){return e._reverseStreams[t.id]}))};var i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var n=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((function(e){if(n.getSenders().find((function(t){return t.track===e})))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){var r=new e.MediaStream(t.getTracks());this._streams[t.id]=r,this._reverseStreams[r.id]=t,t=r}i.apply(this,[t])};var o=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){var r=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var i=[].slice.call(arguments,1);if(1!==i.length||!i[0].getTracks().find((function(e){return e===t})))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");var o=this.getSenders().find((function(e){return e.track===t}));if(o)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var a=this._streams[n.id];if(a)a.addTrack(t),Promise.resolve().then((function(){r.dispatchEvent(new Event("negotiationneeded"))}));else{var s=new e.MediaStream([t]);this._streams[n.id]=s,this._reverseStreams[s.id]=n,this.addStream(s)}return this.getSenders().find((function(e){return e.track===t}))},["createOffer","createAnswer"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],r=a({},t,(function(){var e=this,t=arguments,r=arguments.length&&"function"==typeof arguments[0];return r?n.apply(this,[function(n){var r=u(e,n);t[0].apply(null,[r])},function(e){t[1]&&t[1].apply(null,e)},arguments[2]]):n.apply(this,arguments).then((function(t){return u(e,t)}))}));e.RTCPeerConnection.prototype[t]=r[t]}));var s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=d(this,arguments[0]),s.apply(this,arguments)):s.apply(this,arguments)};var l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=l.get.apply(this);return""===e.type?e:u(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){var t,n=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(e._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{},Object.keys(this._streams).forEach((function(r){n._streams[r].getTracks().find((function(t){return e.track===t}))&&(t=n._streams[r])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function u(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((function(t){var r=e._reverseStreams[t];n=n.replace(new RegExp(e._streams[r.id].id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:n})}function d(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((function(t){var r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)})),new RTCSessionDescription({type:t.type,sdp:n})}},n.shimPeerConnection=function(e){var t=r.detectBrowser(e);if(!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection){t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],r=a({},t,(function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}));e.RTCPeerConnection.prototype[t]=r[t]}));var n=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?t.version<78&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}},n.fixNegotiationNeeded=function(e){r.wrapPeerConnectionEvent(e,"negotiationneeded",(function(e){if("stable"===e.target.signalingState)return e}))},Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return i.shimGetUserMedia}}),Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return o.shimGetDisplayMedia}});var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=function(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return e}();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(e("../utils.js")),i=e("./getusermedia"),o=e("./getdisplaymedia");function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((function(t){return e._shimmedLocalStreams[t][0]}))};var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};var n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((function(e){if(t.getSenders().find((function(t){return t.track===e})))throw new DOMException("Track already exists.","InvalidAccessError")}));var r=this.getSenders();n.apply(this,arguments);var i=this.getSenders().filter((function(e){return-1===r.indexOf(e)}));this._shimmedLocalStreams[e.id]=[e].concat(i)};var r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};var i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((function(n){var r=t._shimmedLocalStreams[n].indexOf(e);-1!==r&&t._shimmedLocalStreams[n].splice(r,1),1===t._shimmedLocalStreams[n].length&&delete t._shimmedLocalStreams[n]})),i.apply(this,arguments)}}},{"../utils.js":"iSxC","./getusermedia":"s6SN","./getdisplaymedia":"VHa8"}],NZ1C:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.filterIceServers=function(e,t){var n=!1;return(e=JSON.parse(JSON.stringify(e))).filter((function(e){if(e&&(e.urls||e.url)){var t=e.urls||e.url;e.url&&!e.urls&&r.deprecated("RTCIceServer.url","RTCIceServer.urls");var i="string"==typeof t;return i&&(t=[t]),t=t.filter((function(e){if(0===e.indexOf("stun:"))return!1;var t=e.startsWith("turn")&&!e.startsWith("turn:[")&&e.includes("transport=udp");return t&&!n?(n=!0,!0):t&&!n})),delete e.url,e.urls=i?t[0]:t,!!t.length}}))};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=function(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return e}();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(e("../utils"))},{"../utils":"iSxC"}],YHvh:[function(e,t,n){"use strict";var r={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};r.localCName=r.generateIdentifier(),r.splitLines=function(e){return e.trim().split("\n").map((function(e){return e.trim()}))},r.splitSections=function(e){return e.split("\nm=").map((function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"}))},r.getDescription=function(e){var t=r.splitSections(e);return t&&t[0]},r.getMediaSections=function(e){var t=r.splitSections(e);return t.shift(),t},r.matchPrefix=function(e,t){return r.splitLines(e).filter((function(e){return 0===e.indexOf(t)}))},r.parseCandidate=function(e){for(var t,n={foundation:(t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:parseInt(t[1],10),protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]},r=8;r0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},r.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},r.parseFmtp=function(e){for(var t,n={},r=e.substr(e.indexOf(" ")+1).split(";"),i=0;i-1?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},r.parseSsrcGroup=function(e){var t=e.substr(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((function(e){return parseInt(e,10)}))}},r.getMid=function(e){var t=r.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)},r.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},r.getDtlsParameters=function(e,t){return{role:"auto",fingerprints:r.matchPrefix(e+t,"a=fingerprint:").map(r.parseFingerprint)}},r.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach((function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"})),n},r.getIceParameters=function(e,t){var n=r.splitLines(e);return{usernameFragment:(n=n.concat(r.splitLines(t))).filter((function(e){return 0===e.indexOf("a=ice-ufrag:")}))[0].substr(12),password:n.filter((function(e){return 0===e.indexOf("a=ice-pwd:")}))[0].substr(10)}},r.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},r.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(e)[0].split(" "),i=3;i0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=t.codecs.map((function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType})).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach((function(e){n+=r.writeRtpMap(e),n+=r.writeFmtp(e),n+=r.writeRtcpFb(e)}));var i=0;return t.codecs.forEach((function(e){e.maxptime>i&&(i=e.maxptime)})),i>0&&(n+="a=maxptime:"+i+"\r\n"),n+="a=rtcp-mux\r\n",t.headerExtensions&&t.headerExtensions.forEach((function(e){n+=r.writeExtmap(e)})),n},r.parseRtpEncodingParameters=function(e){var t,n=[],i=r.parseRtpParameters(e),o=-1!==i.fecMechanisms.indexOf("RED"),a=-1!==i.fecMechanisms.indexOf("ULPFEC"),s=r.matchPrefix(e,"a=ssrc:").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute})),c=s.length>0&&s[0].ssrc,l=r.matchPrefix(e,"a=ssrc-group:FID").map((function(e){return e.substr(17).split(" ").map((function(e){return parseInt(e,10)}))}));l.length>0&&l[0].length>1&&l[0][0]===c&&(t=l[0][1]),i.codecs.forEach((function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var r={ssrc:c,codecPayloadType:parseInt(e.parameters.apt,10)};c&&t&&(r.rtx={ssrc:t}),n.push(r),o&&((r=JSON.parse(JSON.stringify(r))).fec={ssrc:c,mechanism:a?"red+ulpfec":"red"},n.push(r))}})),0===n.length&&c&&n.push({ssrc:c});var u=r.matchPrefix(e,"b=");return u.length&&(u=0===u[0].indexOf("b=TIAS:")?parseInt(u[0].substr(7),10):0===u[0].indexOf("b=AS:")?1e3*parseInt(u[0].substr(5),10)*.95-16e3:void 0,n.forEach((function(e){e.maxBitrate=u}))),n},r.parseRtcpParameters=function(e){var t={},n=r.matchPrefix(e,"a=ssrc:").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute}))[0];n&&(t.cname=n.value,t.ssrc=n.ssrc);var i=r.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=i.length>0,t.compound=0===i.length;var o=r.matchPrefix(e,"a=rtcp-mux");return t.mux=o.length>0,t},r.parseMsid=function(e){var t,n=r.matchPrefix(e,"a=msid:");if(1===n.length)return{stream:(t=n[0].substr(7).split(" "))[0],track:t[1]};var i=r.matchPrefix(e,"a=ssrc:").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return"msid"===e.attribute}));return i.length>0?{stream:(t=i[0].value.split(" "))[0],track:t[1]}:void 0},r.parseSctpDescription=function(e){var t,n=r.parseMLine(e),i=r.matchPrefix(e,"a=max-message-size:");i.length>0&&(t=parseInt(i[0].substr(19),10)),isNaN(t)&&(t=65536);var o=r.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substr(12),10),protocol:n.fmt,maxMessageSize:t};if(r.matchPrefix(e,"a=sctpmap:").length>0){var a=r.matchPrefix(e,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(a[0],10),protocol:a[1],maxMessageSize:t}}},r.writeSctpDescription=function(e,t){var n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},r.generateSessionId=function(){return Math.random().toString().substr(2,21)},r.writeSessionBoilerplate=function(e,t,n){var i=void 0!==t?t:2;return"v=0\r\no="+(n||"thisisadapterortc")+" "+(e||r.generateSessionId())+" "+i+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.writeMediaSection=function(e,t,n,i){var o=r.writeRtpDescription(e.kind,t);if(o+=r.writeIceParameters(e.iceGatherer.getLocalParameters()),o+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),o+="a=mid:"+e.mid+"\r\n",o+=e.direction?"a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?"a=sendrecv\r\n":e.rtpSender?"a=sendonly\r\n":e.rtpReceiver?"a=recvonly\r\n":"a=inactive\r\n",e.rtpSender){var a="msid:"+i.id+" "+e.rtpSender.track.id+"\r\n";o+="a="+a,o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+a,e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+a,o+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),o},r.getDirection=function(e,t){for(var n=r.splitLines(e),i=0;i=14393&&-1===e.indexOf("?transport=udp"):(n=!0,!0)})),delete e.url,e.urls=i?r[0]:r,!!r.length}}))}(n.iceServers||[],t),this._iceGatherers=[],n.iceCandidatePoolSize)for(var a=n.iceCandidatePoolSize;a>0;a--)this._iceGatherers.push(new e.RTCIceGatherer({iceServers:n.iceServers,gatherPolicy:n.iceTransportPolicy}));else n.iceCandidatePoolSize=0;this._config=n,this.transceivers=[],this._sdpSessionId=r.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(u.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(u.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),u.prototype.onicecandidate=null,u.prototype.onaddstream=null,u.prototype.ontrack=null,u.prototype.onremovestream=null,u.prototype.onsignalingstatechange=null,u.prototype.oniceconnectionstatechange=null,u.prototype.onconnectionstatechange=null,u.prototype.onicegatheringstatechange=null,u.prototype.onnegotiationneeded=null,u.prototype.ondatachannel=null,u.prototype._dispatchEvent=function(e,t){this._isClosed||(this.dispatchEvent(t),"function"==typeof this["on"+e]&&this["on"+e](t))},u.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",e)},u.prototype.getConfiguration=function(){return this._config},u.prototype.getLocalStreams=function(){return this.localStreams},u.prototype.getRemoteStreams=function(){return this.remoteStreams},u.prototype._createTransceiver=function(e,t){var n={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:e,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&this.transceivers.length>0)n.iceTransport=this.transceivers[0].iceTransport,n.dtlsTransport=this.transceivers[0].dtlsTransport;else{var r=this._createIceAndDtlsTransports();n.iceTransport=r.iceTransport,n.dtlsTransport=r.dtlsTransport}return t||this.transceivers.push(n),n},u.prototype.addTrack=function(t,n){if(this._isClosed)throw c("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var r;if(this.transceivers.find((function(e){return e.track===t})))throw c("InvalidAccessError","Track already exists.");for(var i=0;i=15025)e.getTracks().forEach((function(t){n.addTrack(t,e)}));else{var r=e.clone();e.getTracks().forEach((function(e,t){var n=r.getTracks()[t];e.addEventListener("enabled",(function(e){n.enabled=e.enabled}))})),r.getTracks().forEach((function(e){n.addTrack(e,r)}))}},u.prototype.removeTrack=function(t){if(this._isClosed)throw c("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(t instanceof e.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var n=this.transceivers.find((function(e){return e.rtpSender===t}));if(!n)throw c("InvalidAccessError","Sender was not created by this connection.");var r=n.stream;n.rtpSender.stop(),n.rtpSender=null,n.track=null,n.stream=null,-1===this.transceivers.map((function(e){return e.stream})).indexOf(r)&&this.localStreams.indexOf(r)>-1&&this.localStreams.splice(this.localStreams.indexOf(r),1),this._maybeFireNegotiationNeeded()},u.prototype.removeStream=function(e){var t=this;e.getTracks().forEach((function(e){var n=t.getSenders().find((function(t){return t.track===e}));n&&t.removeTrack(n)}))},u.prototype.getSenders=function(){return this.transceivers.filter((function(e){return!!e.rtpSender})).map((function(e){return e.rtpSender}))},u.prototype.getReceivers=function(){return this.transceivers.filter((function(e){return!!e.rtpReceiver})).map((function(e){return e.rtpReceiver}))},u.prototype._createIceGatherer=function(t,n){var r=this;if(n&&t>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var i=new e.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(i,"state",{value:"new",writable:!0}),this.transceivers[t].bufferedCandidateEvents=[],this.transceivers[t].bufferCandidates=function(e){var n=!e.candidate||0===Object.keys(e.candidate).length;i.state=n?"completed":"gathering",null!==r.transceivers[t].bufferedCandidateEvents&&r.transceivers[t].bufferedCandidateEvents.push(e)},i.addEventListener("localcandidate",this.transceivers[t].bufferCandidates),i},u.prototype._gather=function(t,n){var i=this,o=this.transceivers[n].iceGatherer;if(!o.onlocalcandidate){var a=this.transceivers[n].bufferedCandidateEvents;this.transceivers[n].bufferedCandidateEvents=null,o.removeEventListener("localcandidate",this.transceivers[n].bufferCandidates),o.onlocalcandidate=function(e){if(!(i.usingBundle&&n>0)){var a=new Event("icecandidate");a.candidate={sdpMid:t,sdpMLineIndex:n};var s=e.candidate,c=!s||0===Object.keys(s).length;if(c)"new"!==o.state&&"gathering"!==o.state||(o.state="completed");else{"new"===o.state&&(o.state="gathering"),s.component=1,s.ufrag=o.getLocalParameters().usernameFragment;var l=r.writeCandidate(s);a.candidate=Object.assign(a.candidate,r.parseCandidate(l)),a.candidate.candidate=l,a.candidate.toJSON=function(){return{candidate:a.candidate.candidate,sdpMid:a.candidate.sdpMid,sdpMLineIndex:a.candidate.sdpMLineIndex,usernameFragment:a.candidate.usernameFragment}}}var u=r.getMediaSections(i._localDescription.sdp);u[a.candidate.sdpMLineIndex]+=c?"a=end-of-candidates\r\n":"a="+a.candidate.candidate+"\r\n",i._localDescription.sdp=r.getDescription(i._localDescription.sdp)+u.join("");var d=i.transceivers.every((function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state}));"gathering"!==i.iceGatheringState&&(i.iceGatheringState="gathering",i._emitGatheringStateChange()),c||i._dispatchEvent("icecandidate",a),d&&(i._dispatchEvent("icecandidate",new Event("icecandidate")),i.iceGatheringState="complete",i._emitGatheringStateChange())}},e.setTimeout((function(){a.forEach((function(e){o.onlocalcandidate(e)}))}),0)}},u.prototype._createIceAndDtlsTransports=function(){var t=this,n=new e.RTCIceTransport(null);n.onicestatechange=function(){t._updateIceConnectionState(),t._updateConnectionState()};var r=new e.RTCDtlsTransport(n);return r.ondtlsstatechange=function(){t._updateConnectionState()},r.onerror=function(){Object.defineProperty(r,"state",{value:"failed",writable:!0}),t._updateConnectionState()},{iceTransport:n,dtlsTransport:r}},u.prototype._disposeIceAndDtlsTransports=function(e){var t=this.transceivers[e].iceGatherer;t&&(delete t.onlocalcandidate,delete this.transceivers[e].iceGatherer);var n=this.transceivers[e].iceTransport;n&&(delete n.onicestatechange,delete this.transceivers[e].iceTransport);var r=this.transceivers[e].dtlsTransport;r&&(delete r.ondtlsstatechange,delete r.onerror,delete this.transceivers[e].dtlsTransport)},u.prototype._transceive=function(e,n,i){var a=o(e.localCapabilities,e.remoteCapabilities);n&&e.rtpSender&&(a.encodings=e.sendEncodingParameters,a.rtcp={cname:r.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(a.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(a)),i&&e.rtpReceiver&&a.codecs.length>0&&("video"===e.kind&&e.recvEncodingParameters&&t<15019&&e.recvEncodingParameters.forEach((function(e){delete e.rtx})),a.encodings=e.recvEncodingParameters.length?e.recvEncodingParameters:[{}],a.rtcp={compound:e.rtcpParameters.compound},e.rtcpParameters.cname&&(a.rtcp.cname=e.rtcpParameters.cname),e.sendEncodingParameters.length&&(a.rtcp.ssrc=e.sendEncodingParameters[0].ssrc),e.rtpReceiver.receive(a))},u.prototype.setLocalDescription=function(e){var t,n,i=this;if(-1===["offer","answer"].indexOf(e.type))return Promise.reject(c("TypeError",'Unsupported type "'+e.type+'"'));if(!a("setLocalDescription",e.type,i.signalingState)||i._isClosed)return Promise.reject(c("InvalidStateError","Can not set local "+e.type+" in state "+i.signalingState));if("offer"===e.type)t=r.splitSections(e.sdp),n=t.shift(),t.forEach((function(e,t){var n=r.parseRtpParameters(e);i.transceivers[t].localCapabilities=n})),i.transceivers.forEach((function(e,t){i._gather(e.mid,t)}));else if("answer"===e.type){t=r.splitSections(i._remoteDescription.sdp),n=t.shift();var s=r.matchPrefix(n,"a=ice-lite").length>0;t.forEach((function(e,t){var a=i.transceivers[t],c=a.iceGatherer,l=a.iceTransport,u=a.dtlsTransport,d=a.localCapabilities,p=a.remoteCapabilities;if(!(r.isRejected(e)&&0===r.matchPrefix(e,"a=bundle-only").length||a.rejected)){var f=r.getIceParameters(e,n),h=r.getDtlsParameters(e,n);s&&(h.role="server"),i.usingBundle&&0!==t||(i._gather(a.mid,t),"new"===l.state&&l.start(c,f,s?"controlling":"controlled"),"new"===u.state&&u.start(h));var m=o(d,p);i._transceive(a,m.codecs.length>0,!1)}}))}return i._localDescription={type:e.type,sdp:e.sdp},i._updateSignalingState("offer"===e.type?"have-local-offer":"stable"),Promise.resolve()},u.prototype.setRemoteDescription=function(i){var u=this;if(-1===["offer","answer"].indexOf(i.type))return Promise.reject(c("TypeError",'Unsupported type "'+i.type+'"'));if(!a("setRemoteDescription",i.type,u.signalingState)||u._isClosed)return Promise.reject(c("InvalidStateError","Can not set remote "+i.type+" in state "+u.signalingState));var d={};u.remoteStreams.forEach((function(e){d[e.id]=e}));var p=[],f=r.splitSections(i.sdp),h=f.shift(),m=r.matchPrefix(h,"a=ice-lite").length>0,g=r.matchPrefix(h,"a=group:BUNDLE ").length>0;u.usingBundle=g;var v=r.matchPrefix(h,"a=ice-options:")[0];return u.canTrickleIceCandidates=!!v&&v.substr(14).split(" ").indexOf("trickle")>=0,f.forEach((function(a,c){var l=r.splitLines(a),f=r.getKind(a),v=r.isRejected(a)&&0===r.matchPrefix(a,"a=bundle-only").length,y=l[0].substr(2).split(" ")[2],b=r.getDirection(a,h),x=r.parseMsid(a),w=r.getMid(a)||r.generateIdentifier();if(v||"application"===f&&("DTLS/SCTP"===y||"UDP/DTLS/SCTP"===y))u.transceivers[c]={mid:w,kind:f,protocol:y,rejected:!0};else{var C,S,_,k,T,P,E,M,D;!v&&u.transceivers[c]&&u.transceivers[c].rejected&&(u.transceivers[c]=u._createTransceiver(f,!0));var I,R,O=r.parseRtpParameters(a);v||(I=r.getIceParameters(a,h),(R=r.getDtlsParameters(a,h)).role="client"),E=r.parseRtpEncodingParameters(a);var A=r.parseRtcpParameters(a),L=r.matchPrefix(a,"a=end-of-candidates",h).length>0,j=r.matchPrefix(a,"a=candidate:").map((function(e){return r.parseCandidate(e)})).filter((function(e){return 1===e.component}));if(("offer"===i.type||"answer"===i.type)&&!v&&g&&c>0&&u.transceivers[c]&&(u._disposeIceAndDtlsTransports(c),u.transceivers[c].iceGatherer=u.transceivers[0].iceGatherer,u.transceivers[c].iceTransport=u.transceivers[0].iceTransport,u.transceivers[c].dtlsTransport=u.transceivers[0].dtlsTransport,u.transceivers[c].rtpSender&&u.transceivers[c].rtpSender.setTransport(u.transceivers[0].dtlsTransport),u.transceivers[c].rtpReceiver&&u.transceivers[c].rtpReceiver.setTransport(u.transceivers[0].dtlsTransport)),"offer"!==i.type||v)"answer"!==i.type||v||(S=(C=u.transceivers[c]).iceGatherer,_=C.iceTransport,k=C.dtlsTransport,T=C.rtpReceiver,P=C.sendEncodingParameters,M=C.localCapabilities,u.transceivers[c].recvEncodingParameters=E,u.transceivers[c].remoteCapabilities=O,u.transceivers[c].rtcpParameters=A,j.length&&"new"===_.state&&(!m&&!L||g&&0!==c?j.forEach((function(e){s(C.iceTransport,e)})):_.setRemoteCandidates(j)),g&&0!==c||("new"===_.state&&_.start(S,I,"controlling"),"new"===k.state&&k.start(R)),!o(C.localCapabilities,C.remoteCapabilities).codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length&&C.sendEncodingParameters[0].rtx&&delete C.sendEncodingParameters[0].rtx,u._transceive(C,"sendrecv"===b||"recvonly"===b,"sendrecv"===b||"sendonly"===b),!T||"sendrecv"!==b&&"sendonly"!==b?delete C.rtpReceiver:(D=T.track,x?(d[x.stream]||(d[x.stream]=new e.MediaStream),n(D,d[x.stream]),p.push([D,T,d[x.stream]])):(d.default||(d.default=new e.MediaStream),n(D,d.default),p.push([D,T,d.default]))));else{(C=u.transceivers[c]||u._createTransceiver(f)).mid=w,C.iceGatherer||(C.iceGatherer=u._createIceGatherer(c,g)),j.length&&"new"===C.iceTransport.state&&(!L||g&&0!==c?j.forEach((function(e){s(C.iceTransport,e)})):C.iceTransport.setRemoteCandidates(j)),M=e.RTCRtpReceiver.getCapabilities(f),t<15019&&(M.codecs=M.codecs.filter((function(e){return"rtx"!==e.name}))),P=C.sendEncodingParameters||[{ssrc:1001*(2*c+2)}];var F,N=!1;"sendrecv"===b||"sendonly"===b?(N=!C.rtpReceiver,T=C.rtpReceiver||new e.RTCRtpReceiver(C.dtlsTransport,f),N&&(D=T.track,x&&"-"===x.stream||(x?(d[x.stream]||(d[x.stream]=new e.MediaStream,Object.defineProperty(d[x.stream],"id",{get:function(){return x.stream}})),Object.defineProperty(D,"id",{get:function(){return x.track}}),F=d[x.stream]):(d.default||(d.default=new e.MediaStream),F=d.default)),F&&(n(D,F),C.associatedRemoteMediaStreams.push(F)),p.push([D,T,F]))):C.rtpReceiver&&C.rtpReceiver.track&&(C.associatedRemoteMediaStreams.forEach((function(t){var n=t.getTracks().find((function(e){return e.id===C.rtpReceiver.track.id}));n&&function(t,n){n.removeTrack(t),n.dispatchEvent(new e.MediaStreamTrackEvent("removetrack",{track:t}))}(n,t)})),C.associatedRemoteMediaStreams=[]),C.localCapabilities=M,C.remoteCapabilities=O,C.rtpReceiver=T,C.rtcpParameters=A,C.sendEncodingParameters=P,C.recvEncodingParameters=E,u._transceive(u.transceivers[c],!1,N)}}})),void 0===u._dtlsRole&&(u._dtlsRole="offer"===i.type?"active":"passive"),u._remoteDescription={type:i.type,sdp:i.sdp},u._updateSignalingState("offer"===i.type?"have-remote-offer":"stable"),Object.keys(d).forEach((function(t){var n=d[t];if(n.getTracks().length){if(-1===u.remoteStreams.indexOf(n)){u.remoteStreams.push(n);var r=new Event("addstream");r.stream=n,e.setTimeout((function(){u._dispatchEvent("addstream",r)}))}p.forEach((function(e){n.id===e[2].id&&l(u,e[0],e[1],[n])}))}})),p.forEach((function(e){e[2]||l(u,e[0],e[1],[])})),e.setTimeout((function(){u&&u.transceivers&&u.transceivers.forEach((function(e){e.iceTransport&&"new"===e.iceTransport.state&&e.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),e.iceTransport.addRemoteCandidate({}))}))}),4e3),Promise.resolve()},u.prototype.close=function(){this.transceivers.forEach((function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()})),this._isClosed=!0,this._updateSignalingState("closed")},u.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",t)},u.prototype._maybeFireNegotiationNeeded=function(){var t=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,e.setTimeout((function(){if(t.needNegotiation){t.needNegotiation=!1;var e=new Event("negotiationneeded");t._dispatchEvent("negotiationneeded",e)}}),0))},u.prototype._updateIceConnectionState=function(){var e,t={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach((function(e){e.iceTransport&&!e.rejected&&t[e.iceTransport.state]++})),e="new",t.failed>0?e="failed":t.checking>0?e="checking":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0?e="connected":t.completed>0&&(e="completed"),e!==this.iceConnectionState){this.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",n)}},u.prototype._updateConnectionState=function(){var e,t={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach((function(e){e.iceTransport&&e.dtlsTransport&&!e.rejected&&(t[e.iceTransport.state]++,t[e.dtlsTransport.state]++)})),t.connected+=t.completed,e="new",t.failed>0?e="failed":t.connecting>0?e="connecting":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0&&(e="connected"),e!==this.connectionState){this.connectionState=e;var n=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",n)}},u.prototype.createOffer=function(){var n=this;if(n._isClosed)return Promise.reject(c("InvalidStateError","Can not call createOffer after close"));var o=n.transceivers.filter((function(e){return"audio"===e.kind})).length,a=n.transceivers.filter((function(e){return"video"===e.kind})).length,s=arguments[0];if(s){if(s.mandatory||s.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==s.offerToReceiveAudio&&(o=!0===s.offerToReceiveAudio?1:!1===s.offerToReceiveAudio?0:s.offerToReceiveAudio),void 0!==s.offerToReceiveVideo&&(a=!0===s.offerToReceiveVideo?1:!1===s.offerToReceiveVideo?0:s.offerToReceiveVideo)}for(n.transceivers.forEach((function(e){"audio"===e.kind?--o<0&&(e.wantReceive=!1):"video"===e.kind&&--a<0&&(e.wantReceive=!1)}));o>0||a>0;)o>0&&(n._createTransceiver("audio"),o--),a>0&&(n._createTransceiver("video"),a--);var l=r.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.transceivers.forEach((function(i,o){var a=i.track,s=i.kind,c=i.mid||r.generateIdentifier();i.mid=c,i.iceGatherer||(i.iceGatherer=n._createIceGatherer(o,n.usingBundle));var l=e.RTCRtpSender.getCapabilities(s);t<15019&&(l.codecs=l.codecs.filter((function(e){return"rtx"!==e.name}))),l.codecs.forEach((function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1"),i.remoteCapabilities&&i.remoteCapabilities.codecs&&i.remoteCapabilities.codecs.forEach((function(t){e.name.toLowerCase()===t.name.toLowerCase()&&e.clockRate===t.clockRate&&(e.preferredPayloadType=t.payloadType)}))})),l.headerExtensions.forEach((function(e){(i.remoteCapabilities&&i.remoteCapabilities.headerExtensions||[]).forEach((function(t){e.uri===t.uri&&(e.id=t.id)}))}));var u=i.sendEncodingParameters||[{ssrc:1001*(2*o+1)}];a&&t>=15019&&"video"===s&&!u[0].rtx&&(u[0].rtx={ssrc:u[0].ssrc+1}),i.wantReceive&&(i.rtpReceiver=new e.RTCRtpReceiver(i.dtlsTransport,s)),i.localCapabilities=l,i.sendEncodingParameters=u})),"max-compat"!==n._config.bundlePolicy&&(l+="a=group:BUNDLE "+n.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n"),l+="a=ice-options:trickle\r\n",n.transceivers.forEach((function(e,t){l+=i(e,e.localCapabilities,"offer",e.stream,n._dtlsRole),l+="a=rtcp-rsize\r\n",!e.iceGatherer||"new"===n.iceGatheringState||0!==t&&n.usingBundle||(e.iceGatherer.getLocalCandidates().forEach((function(e){e.component=1,l+="a="+r.writeCandidate(e)+"\r\n"})),"completed"===e.iceGatherer.state&&(l+="a=end-of-candidates\r\n"))}));var u=new e.RTCSessionDescription({type:"offer",sdp:l});return Promise.resolve(u)},u.prototype.createAnswer=function(){var n=this;if(n._isClosed)return Promise.reject(c("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==n.signalingState&&"have-local-pranswer"!==n.signalingState)return Promise.reject(c("InvalidStateError","Can not call createAnswer in signalingState "+n.signalingState));var a=r.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.usingBundle&&(a+="a=group:BUNDLE "+n.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n"),a+="a=ice-options:trickle\r\n";var s=r.getMediaSections(n._remoteDescription.sdp).length;n.transceivers.forEach((function(e,r){if(!(r+1>s)){if(e.rejected)return"application"===e.kind?a+="DTLS/SCTP"===e.protocol?"m=application 0 DTLS/SCTP 5000\r\n":"m=application 0 "+e.protocol+" webrtc-datachannel\r\n":"audio"===e.kind?a+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===e.kind&&(a+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(a+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+e.mid+"\r\n");var c;e.stream&&("audio"===e.kind?c=e.stream.getAudioTracks()[0]:"video"===e.kind&&(c=e.stream.getVideoTracks()[0]),c&&t>=15019&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1}));var l=o(e.localCapabilities,e.remoteCapabilities);!l.codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,a+=i(e,l,"answer",e.stream,n._dtlsRole),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(a+="a=rtcp-rsize\r\n")}}));var l=new e.RTCSessionDescription({type:"answer",sdp:a});return Promise.resolve(l)},u.prototype.addIceCandidate=function(e){var t,n=this;return e&&void 0===e.sdpMLineIndex&&!e.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise((function(i,o){if(!n._remoteDescription)return o(c("InvalidStateError","Can not add ICE candidate without a remote description"));if(e&&""!==e.candidate){var a=e.sdpMLineIndex;if(e.sdpMid)for(var l=0;l0?r.parseCandidate(e.candidate):{};if("tcp"===d.protocol&&(0===d.port||9===d.port))return i();if(d.component&&1!==d.component)return i();if((0===a||a>0&&u.iceTransport!==n.transceivers[0].iceTransport)&&!s(u.iceTransport,d))return o(c("OperationError","Can not add ICE candidate"));var p=e.candidate.trim();0===p.indexOf("a=")&&(p=p.substr(2)),(t=r.getMediaSections(n._remoteDescription.sdp))[a]+="a="+(d.type?p:"end-of-candidates")+"\r\n",n._remoteDescription.sdp=r.getDescription(n._remoteDescription.sdp)+t.join("")}else for(var f=0;f55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var a=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},s=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(e){return"object"===i(e)&&"object"===i(e.audio)&&(e=JSON.parse(JSON.stringify(e)),a(e.audio,"autoGainControl","mozAutoGainControl"),a(e.audio,"noiseSuppression","mozNoiseSuppression")),s(e)},o&&o.prototype.getSettings){var c=o.prototype.getSettings;o.prototype.getSettings=function(){var e=c.apply(this,arguments);return a(e,"mozAutoGainControl","autoGainControl"),a(e,"mozNoiseSuppression","noiseSuppression"),e}}if(o&&o.prototype.applyConstraints){var l=o.prototype.applyConstraints;o.prototype.applyConstraints=function(e){return"audio"===this.kind&&"object"===i(e)&&(e=JSON.parse(JSON.stringify(e)),a(e,"autoGainControl","mozAutoGainControl"),a(e,"noiseSuppression","mozNoiseSuppression")),l.apply(this,[e])}}}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=function(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return e}();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(e("../utils"));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}},{"../utils":"iSxC"}],UuGU:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){var r=new DOMException("getDisplayMedia without video constraints is undefined");return r.name="NotFoundError",r.code=8,Promise.reject(r)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}},{}],Fzdr:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimOnTrack=function(e){"object"===a(e)&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},n.shimPeerConnection=function(e){var t=r.detectBrowser(e);if("object"===a(e)&&(e.RTCPeerConnection||e.mozRTCPeerConnection)){if(!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){var n,r,i,o=e.RTCPeerConnection.prototype[t],a=(i=function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),o.apply(this,arguments)},(r=t)in(n={})?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n);e.RTCPeerConnection.prototype[t]=a[t]})),t.version<68){var n=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var i={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},o=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var[e,n,r]=arguments;return o.apply(this,[e||null]).then((function(e){if(t.version<53&&!n)try{e.forEach((function(e){e.type=i[e.type]||e.type}))}catch(r){if("TypeError"!==r.name)throw r;e.forEach((function(t,n){e.set(n,Object.assign({},t,{type:i[t.type]||t.type}))}))}return e})).then(n,r)}}},n.shimSenderGetStats=function(e){if("object"===a(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpSender.prototype))){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}},n.shimReceiverGetStats=function(e){if("object"===a(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpReceiver.prototype))){var t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n}),r.wrapPeerConnectionEvent(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}},n.shimRemoveStream=function(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;r.deprecated("removeStream","removeTrack"),this.getSenders().forEach((function(n){n.track&&e.getTracks().includes(n.track)&&t.removeTrack(n)}))})},n.shimRTCDataChannel=function(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)},n.shimAddTransceiver=function(e){if("object"===a(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var e=arguments[1],n=e&&"sendEncodings"in e;n&&e.sendEncodings.forEach((function(e){if("rid"in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));var r=t.apply(this,arguments);if(n){var{sender:i}=r,o=i.getParameters();"encodings"in o||(o.encodings=e.sendEncodings,this.setParametersPromises.push(i.setParameters(o).catch((function(){}))))}return r})}},n.shimCreateOffer=function(e){if("object"===a(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){var e=arguments,n=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return t.apply(n,e)})).finally((function(){n.setParametersPromises=[]})):t.apply(this,arguments)}}},n.shimCreateAnswer=function(e){if("object"===a(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){var e=arguments,n=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return t.apply(n,e)})).finally((function(){n.setParametersPromises=[]})):t.apply(this,arguments)}}},Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return i.shimGetUserMedia}}),Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return o.shimGetDisplayMedia}});var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=function(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return e}();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(e("../utils")),i=e("./getusermedia"),o=e("./getdisplaymedia");function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}},{"../utils":"iSxC","./getusermedia":"GzSv","./getdisplaymedia":"UuGU"}],t1lL:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimLocalStreamsAPI=function(e){if("object"===i(e)&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((function(r){return t.call(n,r,e)})),e.getVideoTracks().forEach((function(r){return t.call(n,r,e)}))},e.RTCPeerConnection.prototype.addTrack=function(e){var n=arguments[1];return n&&(this._localStreams?this._localStreams.includes(n)||this._localStreams.push(n):this._localStreams=[n]),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._localStreams||(this._localStreams=[]);var n=this._localStreams.indexOf(e);if(-1!==n){this._localStreams.splice(n,1);var r=e.getTracks();this.getSenders().forEach((function(e){r.includes(e.track)&&t.removeTrack(e)}))}})}},n.shimRemoteStreamsAPI=function(e){if("object"===i(e)&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(e){var t=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach((function(e){if(t._remoteStreams||(t._remoteStreams=[]),!t._remoteStreams.includes(e)){t._remoteStreams.push(e);var n=new Event("addstream");n.stream=e,t.dispatchEvent(n)}}))})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((function(t){if(e._remoteStreams||(e._remoteStreams=[]),!(e._remoteStreams.indexOf(t)>=0)){e._remoteStreams.push(t);var n=new Event("addstream");n.stream=t,e.dispatchEvent(n)}}))}),t.apply(e,arguments)}}},n.shimCallbacksAPI=function(e){if("object"===i(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,a=t.setRemoteDescription,s=t.addIceCandidate;t.createOffer=function(e,t){var r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){var n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};var c=function(e,t,n){var r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=c,t.setRemoteDescription=c=function(e,t,n){var r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=c=function(e,t,n){var r=s.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r}}},n.shimGetUserMedia=function(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,r=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(e){return r(o(e))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}).bind(t))},n.shimConstraints=o,n.shimRTCIceServerUrls=function(e){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){for(var i=[],o=0;o0?r=parseInt(o[0].substr(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r},c=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){var{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){var i,o=r(arguments[0]),l=a(o),u=s(arguments[0],o);i=0===l&&0===u?Number.POSITIVE_INFINITY:0===l||0===u?Math.max(l,u):Math.min(l,u);var d={};Object.defineProperty(d,"maxMessageSize",{get:function(){return i}}),this._sctp=d}return c.apply(this,arguments)}}},n.shimSendThrowTypeError=function(e){if(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype){var t=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){var e=t.apply(this,arguments);return n(e,this),e},o.wrapPeerConnectionEvent(e,"datachannel",(function(e){return n(e.channel,e.target),e}))}function n(e,t){var n=e.send;e.send=function(){var r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}},n.shimConnectionState=function(e){if(e.RTCPeerConnection&&!("connectionState"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((function(e){var n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(e){var t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;var n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}}))}},n.removeAllowExtmapMixed=function(e){if(e.RTCPeerConnection){var t=o.detectBrowser(e);if(!("chrome"===t.browser&&t.version>=71)){var n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(e){return e&&e.sdp&&-1!==e.sdp.indexOf("\na=extmap-allow-mixed")&&(e.sdp=e.sdp.split("\n").filter((function(e){return"a=extmap-allow-mixed"!==e.trim()})).join("\n")),n.apply(this,arguments)}}}};var r,i=(r=e("sdp"))&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=function(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return e}();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(e("./utils"))},{sdp:"YHvh","./utils":"iSxC"}],KtlG:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.adapterFactory=function(){var{window:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0},n=r.log,l=r.detectBrowser(e),u={browserDetails:l,commonShim:c,extractVersion:r.extractVersion,disableLog:r.disableLog,disableWarnings:r.disableWarnings};switch(l.browser){case"chrome":if(!i||!i.shimPeerConnection||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),u;n("adapter.js shimming chrome."),u.browserShim=i,i.shimGetUserMedia(e),i.shimMediaStream(e),i.shimPeerConnection(e),i.shimOnTrack(e),i.shimAddTrackRemoveTrack(e),i.shimGetSendersWithDtmf(e),i.shimGetStats(e),i.shimSenderReceiverGetStats(e),i.fixNegotiationNeeded(e),c.shimRTCIceCandidate(e),c.shimConnectionState(e),c.shimMaxMessageSize(e),c.shimSendThrowTypeError(e),c.removeAllowExtmapMixed(e);break;case"firefox":if(!a||!a.shimPeerConnection||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),u;n("adapter.js shimming firefox."),u.browserShim=a,a.shimGetUserMedia(e),a.shimPeerConnection(e),a.shimOnTrack(e),a.shimRemoveStream(e),a.shimSenderGetStats(e),a.shimReceiverGetStats(e),a.shimRTCDataChannel(e),a.shimAddTransceiver(e),a.shimCreateOffer(e),a.shimCreateAnswer(e),c.shimRTCIceCandidate(e),c.shimConnectionState(e),c.shimMaxMessageSize(e),c.shimSendThrowTypeError(e);break;case"edge":if(!o||!o.shimPeerConnection||!t.shimEdge)return n("MS edge shim is not included in this adapter release."),u;n("adapter.js shimming edge."),u.browserShim=o,o.shimGetUserMedia(e),o.shimGetDisplayMedia(e),o.shimPeerConnection(e),o.shimReplaceTrack(e),c.shimMaxMessageSize(e),c.shimSendThrowTypeError(e);break;case"safari":if(!s||!t.shimSafari)return n("Safari shim is not included in this adapter release."),u;n("adapter.js shimming safari."),u.browserShim=s,s.shimRTCIceServerUrls(e),s.shimCreateOfferLegacy(e),s.shimCallbacksAPI(e),s.shimLocalStreamsAPI(e),s.shimRemoteStreamsAPI(e),s.shimTrackEventTransceiver(e),s.shimGetUserMedia(e),c.shimRTCIceCandidate(e),c.shimMaxMessageSize(e),c.shimSendThrowTypeError(e),c.removeAllowExtmapMixed(e);break;default:n("Unsupported browser!")}return u};var r=u(e("./utils")),i=u(e("./chrome/chrome_shim")),o=u(e("./edge/edge_shim")),a=u(e("./firefox/firefox_shim")),s=u(e("./safari/safari_shim")),c=u(e("./common_shim"));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}},{"./utils":"iSxC","./chrome/chrome_shim":"uI5X","./edge/edge_shim":"XRic","./firefox/firefox_shim":"Fzdr","./safari/safari_shim":"t1lL","./common_shim":"GOQK"}],tI1X:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=(0,e("./adapter_factory.js").adapterFactory)({window:window});n.default=r},{"./adapter_factory.js":"KtlG"}],sXtV:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var i=r(e("webrtc-adapter"));n.webRTCAdapter=i.default},{"webrtc-adapter":"tI1X"}],I31f:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./adapter");n.Supports=new(function(){function e(){this.isIOS=["iPad","iPhone","iPod"].includes(navigator.platform),this.supportedBrowsers=["firefox","chrome","safari"],this.minFirefoxVersion=59,this.minChromeVersion=72,this.minSafariVersion=605}return e.prototype.isWebRTCSupported=function(){return"undefined"!=typeof RTCPeerConnection},e.prototype.isBrowserSupported=function(){var e=this.getBrowser(),t=this.getVersion();return!!this.supportedBrowsers.includes(e)&&("chrome"===e?t>=this.minChromeVersion:"firefox"===e?t>=this.minFirefoxVersion:"safari"===e&&!this.isIOS&&t>=this.minSafariVersion)},e.prototype.getBrowser=function(){return r.webRTCAdapter.browserDetails.browser},e.prototype.getVersion=function(){return r.webRTCAdapter.browserDetails.version||0},e.prototype.isUnifiedPlanSupported=function(){var e,t=this.getBrowser(),n=r.webRTCAdapter.browserDetails.version||0;if("chrome"===t&&n<72)return!1;if("firefox"===t&&n>=59)return!0;if(!window.RTCRtpTransceiver||!("currentDirection"in RTCRtpTransceiver.prototype))return!1;var i=!1;try{(e=new RTCPeerConnection).addTransceiver("audio"),i=!0}catch(o){}finally{e&&e.close()}return i},e.prototype.toString=function(){return"Supports: \n browser:"+this.getBrowser()+" \n version:"+this.getVersion()+" \n isIOS:"+this.isIOS+" \n isWebRTCSupported:"+this.isWebRTCSupported()+" \n isBrowserSupported:"+this.isBrowserSupported()+" \n isUnifiedPlanSupported:"+this.isUnifiedPlanSupported()},e}())},{"./adapter":"sXtV"}],BHXf:[function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(n,"__esModule",{value:!0});var i=r(e("peerjs-js-binarypack")),o=e("./supports"),a={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"turn:0.peerjs.com:3478",username:"peerjs",credential:"peerjsp"}],sdpSemantics:"unified-plan"};n.util=new(function(){function e(){this.CLOUD_HOST="0.peerjs.com",this.CLOUD_PORT=443,this.chunkedBrowsers={Chrome:1,chrome:1},this.chunkedMTU=16300,this.defaultConfig=a,this.browser=o.Supports.getBrowser(),this.browserVersion=o.Supports.getVersion(),this.supports=function(){var e,t={browser:o.Supports.isBrowserSupported(),webRTC:o.Supports.isWebRTCSupported(),audioVideo:!1,data:!1,binaryBlob:!1,reliable:!1};if(!t.webRTC)return t;try{e=new RTCPeerConnection(a),t.audioVideo=!0;var n=void 0;try{n=e.createDataChannel("_PEERJSTEST",{ordered:!0}),t.data=!0,t.reliable=!!n.ordered;try{n.binaryType="blob",t.binaryBlob=!o.Supports.isIOS}catch(r){}}catch(r){}finally{n&&n.close()}}catch(r){}finally{e&&e.close()}return t}(),this.pack=i.pack,this.unpack=i.unpack,this._dataCount=1}return e.prototype.noop=function(){},e.prototype.validateId=function(e){return!e||/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.test(e)},e.prototype.chunk=function(e){for(var t=[],r=e.size,i=Math.ceil(r/n.util.chunkedMTU),o=0,a=0;a0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t=r.All&&this._print.apply(this,o([r.All],e))},e.prototype.warn=function(){for(var e=[],t=0;t=r.Warnings&&this._print.apply(this,o([r.Warnings],e))},e.prototype.error=function(){for(var e=[],t=0;t=r.Errors&&this._print.apply(this,o([r.Errors],e))},e.prototype.setLogFunction=function(e){this._print=e},e.prototype._print=function(e){for(var t=[],n=1;n=r.All?console.log.apply(console,o(i)):e>=r.Warnings?console.warn.apply(console,o(["WARNING"],i)):e>=r.Errors&&console.error.apply(console,o(["ERROR"],i))},e}();n.default=new a},{}],ZRYf:[function(e,t,n){"use strict";var r,i,o,a,s,c,l;Object.defineProperty(n,"__esModule",{value:!0}),(l=n.ConnectionEventType||(n.ConnectionEventType={})).Open="open",l.Stream="stream",l.Data="data",l.Close="close",l.Error="error",l.IceStateChanged="iceStateChanged",(c=n.ConnectionType||(n.ConnectionType={})).Data="data",c.Media="media",(s=n.PeerEventType||(n.PeerEventType={})).Open="open",s.Close="close",s.Connection="connection",s.Call="call",s.Disconnected="disconnected",s.Error="error",(a=n.PeerErrorType||(n.PeerErrorType={})).BrowserIncompatible="browser-incompatible",a.Disconnected="disconnected",a.InvalidID="invalid-id",a.InvalidKey="invalid-key",a.Network="network",a.PeerUnavailable="peer-unavailable",a.SslUnavailable="ssl-unavailable",a.ServerError="server-error",a.SocketError="socket-error",a.SocketClosed="socket-closed",a.UnavailableID="unavailable-id",a.WebRTC="webrtc",(o=n.SerializationType||(n.SerializationType={})).Binary="binary",o.BinaryUTF8="binary-utf8",o.JSON="json",(i=n.SocketEventType||(n.SocketEventType={})).Message="message",i.Disconnected="disconnected",i.Error="error",i.Close="close",(r=n.ServerMessageType||(n.ServerMessageType={})).Heartbeat="HEARTBEAT",r.Candidate="CANDIDATE",r.Offer="OFFER",r.Answer="ANSWER",r.Open="OPEN",r.Error="ERROR",r.IdTaken="ID-TAKEN",r.InvalidKey="INVALID-KEY",r.Leave="LEAVE",r.Expire="EXPIRE"},{}],wJlv:[function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var l=e("eventemitter3"),u=c(e("./logger")),d=e("./enums"),p=function(e){function t(t,n,r,i,o,a){void 0===a&&(a=5e3);var s=e.call(this)||this;return s.pingInterval=a,s._disconnected=!0,s._messagesQueue=[],s._baseUrl=(t?"wss://":"ws://")+n+":"+r+i+"peerjs?key="+o,s}return i(t,e),t.prototype.start=function(e,t){var n=this;this._id=e,!this._socket&&this._disconnected&&(this._socket=new WebSocket(this._baseUrl+"&id="+e+"&token="+t),this._disconnected=!1,this._socket.onmessage=function(e){var t;try{t=JSON.parse(e.data),u.default.log("Server message received:",t)}catch(r){return void u.default.log("Invalid server message",e.data)}n.emit(d.SocketEventType.Message,t)},this._socket.onclose=function(e){n._disconnected||(u.default.log("Socket closed.",e),n._cleanup(),n._disconnected=!0,n.emit(d.SocketEventType.Disconnected))},this._socket.onopen=function(){n._disconnected||(n._sendQueuedMessages(),u.default.log("Socket open"),n._scheduleHeartbeat())})},t.prototype._scheduleHeartbeat=function(){var e=this;this._wsPingTimer=setTimeout((function(){e._sendHeartbeat()}),this.pingInterval)},t.prototype._sendHeartbeat=function(){if(this._wsOpen()){var e=JSON.stringify({type:d.ServerMessageType.Heartbeat});this._socket.send(e),this._scheduleHeartbeat()}else u.default.log("Cannot send heartbeat, because socket closed")},t.prototype._wsOpen=function(){return!!this._socket&&1===this._socket.readyState},t.prototype._sendQueuedMessages=function(){var e,t,n=a(this._messagesQueue);this._messagesQueue=[];try{for(var r=s(n),i=r.next();!i.done;i=r.next())this.send(i.value)}catch(o){e={error:o}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},t.prototype.send=function(e){if(!this._disconnected)if(this._id)if(e.type){if(this._wsOpen()){var t=JSON.stringify(e);this._socket.send(t)}}else this.emit(d.SocketEventType.Error,"Invalid message");else this._messagesQueue.push(e)},t.prototype.close=function(){this._disconnected||(this._cleanup(),this._disconnected=!0)},t.prototype._cleanup=function(){this._socket&&(this._socket.onopen=this._socket.onmessage=this._socket.onclose=null,this._socket.close(),this._socket=void 0),clearTimeout(this._wsPingTimer)},t}(l.EventEmitter);n.Socket=p},{eventemitter3:"JJlS","./logger":"WOs9","./enums":"ZRYf"}],HCdX:[function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var c=e("./util"),l=s(e("./logger")),u=e("./negotiator"),d=e("./enums"),p=function(e){function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._localStream=o.options._stream,o.connectionId=o.options.connectionId||t.ID_PREFIX+c.util.randomToken(),o._negotiator=new u.Negotiator(o),o._localStream&&o._negotiator.startConnection({_stream:o._localStream,originator:!0}),o}return i(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return d.ConnectionType.Media},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localStream",{get:function(){return this._localStream},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"remoteStream",{get:function(){return this._remoteStream},enumerable:!0,configurable:!0}),t.prototype.addStream=function(t){l.default.log("Receiving stream",t),this._remoteStream=t,e.prototype.emit.call(this,d.ConnectionEventType.Stream,t)},t.prototype.handleMessage=function(e){var t=e.type,n=e.payload;switch(e.type){case d.ServerMessageType.Answer:this._negotiator.handleSDP(t,n.sdp),this._open=!0;break;case d.ServerMessageType.Candidate:this._negotiator.handleCandidate(n.candidate);break;default:l.default.warn("Unrecognized message type:"+t+" from peer:"+this.peer)}},t.prototype.answer=function(e,t){var n,r;if(void 0===t&&(t={}),this._localStream)l.default.warn("Local stream already exists on this MediaConnection. Are you answering a call twice?");else{this._localStream=e,t&&t.sdpTransform&&(this.options.sdpTransform=t.sdpTransform),this._negotiator.startConnection(o(o({},this.options._payload),{_stream:e}));var i=this.provider._getMessages(this.connectionId);try{for(var s=a(i),c=s.next();!c.done;c=s.next())this.handleMessage(c.value)}catch(u){n={error:u}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}this._open=!0}},t.prototype.close=function(){this._negotiator&&(this._negotiator.cleanup(),this._negotiator=null),this._localStream=null,this._remoteStream=null,this.provider&&(this.provider._removeConnection(this),this.provider=null),this.options&&this.options._stream&&(this.options._stream=null),this.open&&(this._open=!1,e.prototype.emit.call(this,d.ConnectionEventType.Close))},t.ID_PREFIX="mc_",t}(e("./baseconnection").BaseConnection);n.MediaConnection=p},{"./util":"BHXf","./logger":"WOs9","./negotiator":"HCdX","./enums":"ZRYf","./baseconnection":"tQFK"}],GGp6:[function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var a=e("eventemitter3"),s=o(e("./logger")),c=function(e){function t(){var t=e.call(this)||this;return t.fileReader=new FileReader,t._queue=[],t._processing=!1,t.fileReader.onload=function(e){t._processing=!1,e.target&&t.emit("done",e.target.result),t.doNextTask()},t.fileReader.onerror=function(e){s.default.error("EncodingQueue error:",e),t._processing=!1,t.destroy(),t.emit("error",e)},t}return i(t,e),Object.defineProperty(t.prototype,"queue",{get:function(){return this._queue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.queue.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"processing",{get:function(){return this._processing},enumerable:!0,configurable:!0}),t.prototype.enque=function(e){this.queue.push(e),this.processing||this.doNextTask()},t.prototype.destroy=function(){this.fileReader.abort(),this._queue=[]},t.prototype.doNextTask=function(){0!==this.size&&(this.processing||(this._processing=!0,this.fileReader.readAsArrayBuffer(this.queue.shift())))},t}(a.EventEmitter);n.EncodingQueue=c},{eventemitter3:"JJlS","./logger":"WOs9"}],GBTQ:[function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var s=e("./util"),c=a(e("./logger")),l=e("./negotiator"),u=e("./enums"),d=e("./baseconnection"),p=e("./encodingQueue"),f=function(e){function t(n,r,i){var o=e.call(this,n,r,i)||this;return o.stringify=JSON.stringify,o.parse=JSON.parse,o._buffer=[],o._bufferSize=0,o._buffering=!1,o._chunkedData={},o._encodingQueue=new p.EncodingQueue,o.connectionId=o.options.connectionId||t.ID_PREFIX+s.util.randomToken(),o.label=o.options.label||o.connectionId,o.serialization=o.options.serialization||u.SerializationType.Binary,o.reliable=!!o.options.reliable,o._encodingQueue.on("done",(function(e){o._bufferedSend(e)})),o._encodingQueue.on("error",(function(){c.default.error("DC#"+o.connectionId+": Error occured in encoding from blob to arraybuffer, close DC"),o.close()})),o._negotiator=new l.Negotiator(o),o._negotiator.startConnection(o.options._payload||{originator:!0}),o}return i(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return u.ConnectionType.Data},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataChannel",{get:function(){return this._dc},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bufferSize",{get:function(){return this._bufferSize},enumerable:!0,configurable:!0}),t.prototype.initialize=function(e){this._dc=e,this._configureDataChannel()},t.prototype._configureDataChannel=function(){var e=this;s.util.supports.binaryBlob&&!s.util.supports.reliable||(this.dataChannel.binaryType="arraybuffer"),this.dataChannel.onopen=function(){c.default.log("DC#"+e.connectionId+" dc connection success"),e._open=!0,e.emit(u.ConnectionEventType.Open)},this.dataChannel.onmessage=function(t){c.default.log("DC#"+e.connectionId+" dc onmessage:",t.data),e._handleDataMessage(t)},this.dataChannel.onclose=function(){c.default.log("DC#"+e.connectionId+" dc closed for:",e.peer),e.close()}},t.prototype._handleDataMessage=function(t){var n=this,r=t.data,i=r.constructor,o=r;if(this.serialization===u.SerializationType.Binary||this.serialization===u.SerializationType.BinaryUTF8){if(i===Blob)return void s.util.blobToArrayBuffer(r,(function(e){var t=s.util.unpack(e);n.emit(u.ConnectionEventType.Data,t)}));if(i===ArrayBuffer)o=s.util.unpack(r);else if(i===String){var a=s.util.binaryStringToArrayBuffer(r);o=s.util.unpack(a)}}else this.serialization===u.SerializationType.JSON&&(o=this.parse(r));o.__peerData?this._handleChunk(o):e.prototype.emit.call(this,u.ConnectionEventType.Data,o)},t.prototype._handleChunk=function(e){var t=e.__peerData,n=this._chunkedData[t]||{data:[],count:0,total:e.total};if(n.data[e.n]=e.data,n.count++,this._chunkedData[t]=n,n.total===n.count){delete this._chunkedData[t];var r=new Blob(n.data);this._handleDataMessage({data:r})}},t.prototype.close=function(){this._buffer=[],this._bufferSize=0,this._chunkedData={},this._negotiator&&(this._negotiator.cleanup(),this._negotiator=null),this.provider&&(this.provider._removeConnection(this),this.provider=null),this.dataChannel&&(this.dataChannel.onopen=null,this.dataChannel.onmessage=null,this.dataChannel.onclose=null,this._dc=null),this._encodingQueue&&(this._encodingQueue.destroy(),this._encodingQueue.removeAllListeners(),this._encodingQueue=null),this.open&&(this._open=!1,e.prototype.emit.call(this,u.ConnectionEventType.Close))},t.prototype.send=function(t,n){if(this.open)if(this.serialization===u.SerializationType.JSON)this._bufferedSend(this.stringify(t));else if(this.serialization===u.SerializationType.Binary||this.serialization===u.SerializationType.BinaryUTF8){var r=s.util.pack(t);if(!n&&r.size>s.util.chunkedMTU)return void this._sendChunks(r);s.util.supports.binaryBlob?this._bufferedSend(r):this._encodingQueue.enque(r)}else this._bufferedSend(t);else e.prototype.emit.call(this,u.ConnectionEventType.Error,new Error("Connection is not open. You should listen for the `open` event before sending messages."))},t.prototype._bufferedSend=function(e){!this._buffering&&this._trySend(e)||(this._buffer.push(e),this._bufferSize=this._buffer.length)},t.prototype._trySend=function(e){var n=this;if(!this.open)return!1;if(this.dataChannel.bufferedAmount>t.MAX_BUFFERED_AMOUNT)return this._buffering=!0,setTimeout((function(){n._buffering=!1,n._tryBuffer()}),50),!1;try{this.dataChannel.send(e)}catch(r){return c.default.error("DC#:"+this.connectionId+" Error when sending:",r),this._buffering=!0,this.close(),!1}return!0},t.prototype._tryBuffer=function(){this.open&&0!==this._buffer.length&&this._trySend(this._buffer[0])&&(this._buffer.shift(),this._bufferSize=this._buffer.length,this._tryBuffer())},t.prototype._sendChunks=function(e){var t,n,r=s.util.chunk(e);c.default.log("DC#"+this.connectionId+" Try to send "+r.length+" chunks...");try{for(var i=o(r),a=i.next();!a.done;a=i.next())this.send(a.value,!0)}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},t.prototype.handleMessage=function(e){var t=e.payload;switch(e.type){case u.ServerMessageType.Answer:this._negotiator.handleSDP(e.type,t.sdp);break;case u.ServerMessageType.Candidate:this._negotiator.handleCandidate(t.candidate);break;default:c.default.warn("Unrecognized message type:",e.type,"from peer:",this.peer)}},t.ID_PREFIX="dc_",t.MAX_BUFFERED_AMOUNT=8388608,t}(d.BaseConnection);n.DataConnection=f},{"./util":"BHXf","./logger":"WOs9","./negotiator":"HCdX","./enums":"ZRYf","./baseconnection":"tQFK","./encodingQueue":"GGp6"}],in7L:[function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var l=e("eventemitter3"),u=e("./util"),d=c(e("./logger")),p=e("./socket"),f=e("./mediaconnection"),h=e("./dataconnection"),m=e("./enums"),g=e("./api"),v=function(e){function t(n,r){var i,a=e.call(this)||this;return a._id=null,a._lastServerId=null,a._destroyed=!1,a._disconnected=!1,a._open=!1,a._connections=new Map,a._lostMessages=new Map,n&&n.constructor==Object?r=n:n&&(i=n.toString()),r=o({debug:0,host:u.util.CLOUD_HOST,port:u.util.CLOUD_PORT,path:"/",key:t.DEFAULT_KEY,token:u.util.randomToken(),config:u.util.defaultConfig},r),a._options=r,"/"===a._options.host&&(a._options.host=window.location.hostname),a._options.path&&("/"!==a._options.path[0]&&(a._options.path="/"+a._options.path),"/"!==a._options.path[a._options.path.length-1]&&(a._options.path+="/")),void 0===a._options.secure&&a._options.host!==u.util.CLOUD_HOST?a._options.secure=u.util.isSecure():a._options.host==u.util.CLOUD_HOST&&(a._options.secure=!0),a._options.logFunction&&d.default.setLogFunction(a._options.logFunction),d.default.logLevel=a._options.debug||0,a._api=new g.API(r),a._socket=a._createServerConnection(),u.util.supports.audioVideo||u.util.supports.data?i&&!u.util.validateId(i)?(a._delayedAbort(m.PeerErrorType.InvalidID,'ID "'+i+'" is invalid'),a):(i?a._initialize(i):a._api.retrieveId().then((function(e){return a._initialize(e)})).catch((function(e){return a._abort(m.PeerErrorType.ServerError,e)})),a):(a._delayedAbort(m.PeerErrorType.BrowserIncompatible,"The current browser does not support WebRTC"),a)}return i(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"open",{get:function(){return this._open},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"socket",{get:function(){return this._socket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"connections",{get:function(){var e,t,n=Object.create(null);try{for(var r=a(this._connections),i=r.next();!i.done;i=r.next()){var o=s(i.value,2);n[o[0]]=o[1]}}catch(c){e={error:c}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disconnected",{get:function(){return this._disconnected},enumerable:!0,configurable:!0}),t.prototype._createServerConnection=function(){var e=this,t=new p.Socket(this._options.secure,this._options.host,this._options.port,this._options.path,this._options.key,this._options.pingInterval);return t.on(m.SocketEventType.Message,(function(t){e._handleMessage(t)})),t.on(m.SocketEventType.Error,(function(t){e._abort(m.PeerErrorType.SocketError,t)})),t.on(m.SocketEventType.Disconnected,(function(){e.disconnected||(e.emitError(m.PeerErrorType.Network,"Lost connection to server."),e.disconnect())})),t.on(m.SocketEventType.Close,(function(){e.disconnected||e._abort(m.PeerErrorType.SocketClosed,"Underlying socket is already closed.")})),t},t.prototype._initialize=function(e){this._id=e,this.socket.start(e,this._options.token)},t.prototype._handleMessage=function(e){var t,n,r=e.type,i=e.payload,o=e.src;switch(r){case m.ServerMessageType.Open:this._lastServerId=this.id,this._open=!0,this.emit(m.PeerEventType.Open,this.id);break;case m.ServerMessageType.Error:this._abort(m.PeerErrorType.ServerError,i.msg);break;case m.ServerMessageType.IdTaken:this._abort(m.PeerErrorType.UnavailableID,'ID "'+this.id+'" is taken');break;case m.ServerMessageType.InvalidKey:this._abort(m.PeerErrorType.InvalidKey,'API KEY "'+this._options.key+'" is invalid');break;case m.ServerMessageType.Leave:d.default.log("Received leave message from "+o),this._cleanupPeer(o),this._connections.delete(o);break;case m.ServerMessageType.Expire:this.emitError(m.PeerErrorType.PeerUnavailable,"Could not connect to peer "+o);break;case m.ServerMessageType.Offer:if((p=this.getConnection(o,u=i.connectionId))&&(p.close(),d.default.warn("Offer received for existing Connection ID:"+u)),i.type===m.ConnectionType.Media)p=new f.MediaConnection(o,this,{connectionId:u,_payload:i,metadata:i.metadata}),this._addConnection(o,p),this.emit(m.PeerEventType.Call,p);else{if(i.type!==m.ConnectionType.Data)return void d.default.warn("Received malformed connection type:"+i.type);p=new h.DataConnection(o,this,{connectionId:u,_payload:i,metadata:i.metadata,label:i.label,serialization:i.serialization,reliable:i.reliable}),this._addConnection(o,p),this.emit(m.PeerEventType.Connection,p)}var s=this._getMessages(u);try{for(var c=a(s),l=c.next();!l.done;l=c.next())p.handleMessage(l.value)}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}break;default:if(!i)return void d.default.warn("You received a malformed message from "+o+" of type "+r);var u,p;(p=this.getConnection(o,u=i.connectionId))&&p.peerConnection?p.handleMessage(e):u?this._storeMessage(u,e):d.default.warn("You received an unrecognized message:",e)}},t.prototype._storeMessage=function(e,t){this._lostMessages.has(e)||this._lostMessages.set(e,[]),this._lostMessages.get(e).push(t)},t.prototype._getMessages=function(e){var t=this._lostMessages.get(e);return t?(this._lostMessages.delete(e),t):[]},t.prototype.connect=function(e,t){if(void 0===t&&(t={}),this.disconnected)return d.default.warn("You cannot connect to a new Peer because you called .disconnect() on this Peer and ended your connection with the server. You can create a new Peer to reconnect, or call reconnect on this peer if you believe its ID to still be available."),void this.emitError(m.PeerErrorType.Disconnected,"Cannot connect to new Peer after disconnecting from server.");var n=new h.DataConnection(e,this,t);return this._addConnection(e,n),n},t.prototype.call=function(e,t,n){if(void 0===n&&(n={}),this.disconnected)return d.default.warn("You cannot connect to a new Peer because you called .disconnect() on this Peer and ended your connection with the server. You can create a new Peer to reconnect."),void this.emitError(m.PeerErrorType.Disconnected,"Cannot connect to new Peer after disconnecting from server.");if(t){n._stream=t;var r=new f.MediaConnection(e,this,n);return this._addConnection(e,r),r}d.default.error("To call a peer, you must provide a stream from your browser's `getUserMedia`.")},t.prototype._addConnection=function(e,t){d.default.log("add connection "+t.type+":"+t.connectionId+" to peerId:"+e),this._connections.has(e)||this._connections.set(e,[]),this._connections.get(e).push(t)},t.prototype._removeConnection=function(e){var t=this._connections.get(e.peer);if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}this._lostMessages.delete(e.connectionId)},t.prototype.getConnection=function(e,t){var n,r,i=this._connections.get(e);if(!i)return null;try{for(var o=a(i),s=o.next();!s.done;s=o.next()){var c=s.value;if(c.connectionId===t)return c}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null},t.prototype._delayedAbort=function(e,t){var n=this;setTimeout((function(){n._abort(e,t)}),0)},t.prototype._abort=function(e,t){d.default.error("Aborting!"),this.emitError(e,t),this._lastServerId?this.disconnect():this.destroy()},t.prototype.emitError=function(e,t){var n;d.default.error("Error:",t),(n="string"==typeof t?new Error(t):t).type=e,this.emit(m.PeerEventType.Error,n)},t.prototype.destroy=function(){this.destroyed||(d.default.log("Destroy peer with ID:"+this.id),this.disconnect(),this._cleanup(),this._destroyed=!0,this.emit(m.PeerEventType.Close))},t.prototype._cleanup=function(){var e,t;try{for(var n=a(this._connections.keys()),r=n.next();!r.done;r=n.next()){var i=r.value;this._cleanupPeer(i),this._connections.delete(i)}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.socket.removeAllListeners()},t.prototype._cleanupPeer=function(e){var t,n,r=this._connections.get(e);if(r)try{for(var i=a(r),o=i.next();!o.done;o=i.next())o.value.close()}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},t.prototype.disconnect=function(){if(!this.disconnected){var e=this.id;d.default.log("Disconnect peer with ID:"+e),this._disconnected=!0,this._open=!1,this.socket.close(),this._lastServerId=e,this._id=null,this.emit(m.PeerEventType.Disconnected,e)}},t.prototype.reconnect=function(){if(this.disconnected&&!this.destroyed)d.default.log("Attempting reconnection to server with ID "+this._lastServerId),this._disconnected=!1,this._initialize(this._lastServerId);else{if(this.destroyed)throw new Error("This peer cannot reconnect to the server. It has already been destroyed.");if(this.disconnected||this.open)throw new Error("Peer "+this.id+" cannot reconnect because it is not disconnected from the server!");d.default.error("In a hurry? We're still trying to make the initial connection!")}},t.prototype.listAllPeers=function(e){var t=this;void 0===e&&(e=function(e){}),this._api.listAllPeers().then((function(t){return e(t)})).catch((function(e){return t._abort(m.PeerErrorType.ServerError,e)}))},t.DEFAULT_KEY="peerjs",t}(l.EventEmitter);n.Peer=v},{eventemitter3:"JJlS","./util":"BHXf","./logger":"WOs9","./socket":"wJlv","./mediaconnection":"dbHP","./dataconnection":"GBTQ","./enums":"ZRYf","./api":"in7L"}],iTK6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./util"),i=e("./peer");n.peerjs={Peer:i.Peer,util:r.util},n.default=i.Peer,window.peerjs=n.peerjs,window.Peer=i.Peer},{"./util":"BHXf","./peer":"Hxpd"}]},{},["iTK6"]);