!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.LiveClass=t():e.LiveClass=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(40)},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){n(this,e),this.sdkInfo=t||"",this.id=this.initId()}return i(e,[{key:"initId",value:function(){if(!this.sdkInfo)return console.log("this.sdkInfo无效-->",this.sdkInfo),"";var e=Object.prototype.toString.call(this.sdkInfo);return"[object String]"===e?this.sdkInfo:"[object Object]"===e?this.sdkInfo.mid||"":""}},{key:"log",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.LOG,n)}},{key:"warn",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.WARN,n)}},{key:"error",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.ERROR,n)}},{key:"data",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.DATA,n)}},{key:"_log",value:function(t,n){n=JSON.stringify(n);var i=this.id+" -> "+n;if(t>=e.logLevel)switch(t){case e.LOG:console.log(i);break;case e.WARN:console.warn(i);break;case e.ERROR:console.error(i);break;case e.DATA:console.log(i)}}}]),e}();r.LOG=0,r.WARN=1,r.ERROR=2,r.NO=1/0,r.logLevel=r.LOG,r.DATA=5;var a={getLoger:function(e){return new r(e)},setLogLevel:function(e){r.logLevel=e},LOG:r.LOG,WARN:r.WARN,ERROR:r.ERROR,NO:r.NO,DATA:r.DATA};t.default=a;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"Loger","D:/work/PCLive/src/Loger.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/PCLive/src/Loger.js"))})()},function(e,t,n){var i,r;!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,a){"use strict";function o(e,t){t=t||ie;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function s(e){var t=!!e&&"length"in e&&e.length,n=ge.type(e);return"function"!==n&&!ge.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function l(e,t,n){if(ge.isFunction(t))return ge.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return ge.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(we.test(t))return ge.filter(t,e,n);t=ge.filter(t,e)}return ge.grep(e,function(e){return le.call(t,e)>-1!==n&&1===e.nodeType})}function u(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return ge.each(e.match(ke)||[],function(e,n){t[n]=!0}),t}function c(e){return e}function f(e){throw e}function h(e,t,n){var i;try{e&&ge.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&ge.isFunction(i=e.then)?i.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function p(){ie.removeEventListener("DOMContentLoaded",p),n.removeEventListener("load",p),ge.ready()}function _(){this.expando=ge.expando+_.uid++}function g(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Fe,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Be.test(n)?JSON.parse(n):n)}catch(e){}He.set(e,t,n)}else n=void 0;return n}function m(e,t,n,i){var r,a=1,o=20,s=i?function(){return i.cur()}:function(){return ge.css(e,t,"")},l=s(),u=n&&n[3]||(ge.cssNumber[t]?"":"px"),d=(ge.cssNumber[t]||"px"!==u&&+l)&&Ge.exec(ge.css(e,t));if(d&&d[3]!==u){u=u||d[3],n=n||[],d=+l||1;do a=a||".5",d/=a,ge.style(e,t,d+u);while(a!==(a=s()/l)&&1!==a&&--o)}return n&&(d=+d||+l||0,r=n[1]?d+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=d,i.end=r)),r}function v(e){var t,n=e.ownerDocument,i=e.nodeName,r=Ye[i];return r?r:(t=n.body.appendChild(n.createElement(i)),r=ge.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Ye[i]=r,r)}function y(e,t){for(var n,i,r=[],a=0,o=e.length;a<o;a++)i=e[a],i.style&&(n=i.style.display,t?("none"===n&&(r[a]=Ue.get(i,"display")||null,r[a]||(i.style.display="")),""===i.style.display&&qe(i)&&(r[a]=v(i))):"none"!==n&&(r[a]="none",Ue.set(i,"display",n)));for(a=0;a<o;a++)null!=r[a]&&(e[a].style.display=r[a]);return e}function E(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ge.nodeName(e,t)?ge.merge([e],n):n}function S(e,t){for(var n=0,i=e.length;n<i;n++)Ue.set(e[n],"globalEval",!t||Ue.get(t[n],"globalEval"))}function T(e,t,n,i,r){for(var a,o,s,l,u,d,c=t.createDocumentFragment(),f=[],h=0,p=e.length;h<p;h++)if(a=e[h],a||0===a)if("object"===ge.type(a))ge.merge(f,a.nodeType?[a]:a);else if(Xe.test(a)){for(o=o||c.appendChild(t.createElement("div")),s=(Qe.exec(a)||["",""])[1].toLowerCase(),l=ze[s]||ze._default,o.innerHTML=l[1]+ge.htmlPrefilter(a)+l[2],d=l[0];d--;)o=o.lastChild;ge.merge(f,o.childNodes),o=c.firstChild,o.textContent=""}else f.push(t.createTextNode(a));for(c.textContent="",h=0;a=f[h++];)if(i&&ge.inArray(a,i)>-1)r&&r.push(a);else if(u=ge.contains(a.ownerDocument,a),o=E(c.appendChild(a),"script"),u&&S(o),n)for(d=0;a=o[d++];)Ke.test(a.type||"")&&n.push(a);return c}function C(){return!0}function R(){return!1}function b(){try{return ie.activeElement}catch(e){}}function w(e,t,n,i,r,a){var o,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)w(e,s,n,i,t[s],a);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=R;else if(!r)return e;return 1===a&&(o=r,r=function(e){return ge().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=ge.guid++)),e.each(function(){ge.event.add(this,t,r,i,n)})}function A(e,t){return ge.nodeName(e,"table")&&ge.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function I(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function P(e){var t=at.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function O(e,t){var n,i,r,a,o,s,l,u;if(1===t.nodeType){if(Ue.hasData(e)&&(a=Ue.access(e),o=Ue.set(t,a),u=a.events)){delete o.handle,o.events={};for(r in u)for(n=0,i=u[r].length;n<i;n++)ge.event.add(t,r,u[r][n])}He.hasData(e)&&(s=He.access(e),l=ge.extend({},s),He.set(t,l))}}function D(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Je.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function k(e,t,n,i){t=oe.apply([],t);var r,a,s,l,u,d,c=0,f=e.length,h=f-1,p=t[0],_=ge.isFunction(p);if(_||f>1&&"string"==typeof p&&!pe.checkClone&&rt.test(p))return e.each(function(r){var a=e.eq(r);_&&(t[0]=p.call(this,r,a.html())),k(a,t,n,i)});if(f&&(r=T(t,e[0].ownerDocument,!1,e,i),a=r.firstChild,1===r.childNodes.length&&(r=a),a||i)){for(s=ge.map(E(r,"script"),I),l=s.length;c<f;c++)u=r,c!==h&&(u=ge.clone(u,!0,!0),l&&ge.merge(s,E(u,"script"))),n.call(e[c],u,c);if(l)for(d=s[s.length-1].ownerDocument,ge.map(s,P),c=0;c<l;c++)u=s[c],Ke.test(u.type||"")&&!Ue.access(u,"globalEval")&&ge.contains(d,u)&&(u.src?ge._evalUrl&&ge._evalUrl(u.src):o(u.textContent.replace(ot,""),d))}return e}function L(e,t,n){for(var i,r=t?ge.filter(t,e):e,a=0;null!=(i=r[a]);a++)n||1!==i.nodeType||ge.cleanData(E(i)),i.parentNode&&(n&&ge.contains(i.ownerDocument,i)&&S(E(i,"script")),i.parentNode.removeChild(i));return e}function N(e,t,n){var i,r,a,o,s=e.style;return n=n||ut(e),n&&(o=n.getPropertyValue(t)||n[t],""!==o||ge.contains(e.ownerDocument,e)||(o=ge.style(e,t)),!pe.pixelMarginRight()&&lt.test(o)&&st.test(t)&&(i=s.width,r=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=i,s.minWidth=r,s.maxWidth=a)),void 0!==o?o+"":o}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function x(e){if(e in pt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ht.length;n--;)if(e=ht[n]+t,e in pt)return e}function U(e,t,n){var i=Ge.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function H(e,t,n,i,r){for(var a=n===(i?"border":"content")?4:"width"===t?1:0,o=0;a<4;a+=2)"margin"===n&&(o+=ge.css(e,n+Ve[a],!0,r)),i?("content"===n&&(o-=ge.css(e,"padding"+Ve[a],!0,r)),"margin"!==n&&(o-=ge.css(e,"border"+Ve[a]+"Width",!0,r))):(o+=ge.css(e,"padding"+Ve[a],!0,r),"padding"!==n&&(o+=ge.css(e,"border"+Ve[a]+"Width",!0,r)));return o}function B(e,t,n){var i,r=!0,a=ut(e),o="border-box"===ge.css(e,"boxSizing",!1,a);if(e.getClientRects().length&&(i=e.getBoundingClientRect()[t]),i<=0||null==i){if(i=N(e,t,a),(i<0||null==i)&&(i=e.style[t]),lt.test(i))return i;r=o&&(pe.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+H(e,t,n||(o?"border":"content"),r,a)+"px"}function F(e,t,n,i,r){return new F.prototype.init(e,t,n,i,r)}function j(){gt&&(n.requestAnimationFrame(j),ge.fx.tick())}function G(){return n.setTimeout(function(){_t=void 0}),_t=ge.now()}function V(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=Ve[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function q(e,t,n){for(var i,r=(J.tweeners[t]||[]).concat(J.tweeners["*"]),a=0,o=r.length;a<o;a++)if(i=r[a].call(n,t,e))return i}function W(e,t,n){var i,r,a,o,s,l,u,d,c="width"in t||"height"in t,f=this,h={},p=e.style,_=e.nodeType&&qe(e),g=Ue.get(e,"fxshow");n.queue||(o=ge._queueHooks(e,"fx"),null==o.unqueued&&(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,f.always(function(){f.always(function(){o.unqueued--,ge.queue(e,"fx").length||o.empty.fire()})}));for(i in t)if(r=t[i],mt.test(r)){if(delete t[i],a=a||"toggle"===r,r===(_?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;_=!0}h[i]=g&&g[i]||ge.style(e,i)}if(l=!ge.isEmptyObject(t),l||!ge.isEmptyObject(h)){c&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],u=g&&g.display,null==u&&(u=Ue.get(e,"display")),d=ge.css(e,"display"),"none"===d&&(u?d=u:(y([e],!0),u=e.style.display||u,d=ge.css(e,"display"),y([e]))),("inline"===d||"inline-block"===d&&null!=u)&&"none"===ge.css(e,"float")&&(l||(f.done(function(){p.display=u}),null==u&&(d=p.display,u="none"===d?"":d)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1;for(i in h)l||(g?"hidden"in g&&(_=g.hidden):g=Ue.access(e,"fxshow",{display:u}),a&&(g.hidden=!_),_&&y([e],!0),f.done(function(){_||y([e]),Ue.remove(e,"fxshow");for(i in h)ge.style(e,i,h[i])})),l=q(_?g[i]:0,i,f),i in g||(g[i]=l.start,_&&(l.end=l.start,l.start=0))}}function Y(e,t){var n,i,r,a,o;for(n in e)if(i=ge.camelCase(n),r=t[i],a=e[n],ge.isArray(a)&&(r=a[1],a=e[n]=a[0]),n!==i&&(e[i]=a,delete e[n]),o=ge.cssHooks[i],o&&"expand"in o){a=o.expand(a),delete e[i];for(n in a)n in e||(e[n]=a[n],t[n]=r)}else t[i]=r}function J(e,t,n){var i,r,a=0,o=J.prefilters.length,s=ge.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=_t||G(),n=Math.max(0,u.startTime+u.duration-t),i=n/u.duration||0,a=1-i,o=0,l=u.tweens.length;o<l;o++)u.tweens[o].run(a);return s.notifyWith(e,[u,a,n]),a<1&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:ge.extend({},t),opts:ge.extend(!0,{specialEasing:{},easing:ge.easing._default},n),originalProperties:t,originalOptions:n,startTime:_t||G(),duration:n.duration,tweens:[],createTween:function(t,n){var i=ge.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),d=u.props;for(Y(d,u.opts.specialEasing);a<o;a++)if(i=J.prefilters[a].call(u,e,d,u.opts))return ge.isFunction(i.stop)&&(ge._queueHooks(u.elem,u.opts.queue).stop=ge.proxy(i.stop,i)),i;return ge.map(d,q,u),ge.isFunction(u.opts.start)&&u.opts.start.call(e,u),ge.fx.timer(ge.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function Q(e){return e.getAttribute&&e.getAttribute("class")||""}function K(e,t,n,i){var r;if(ge.isArray(t))ge.each(t,function(t,r){n||Ot.test(e)?i(e,r):K(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==ge.type(t))i(e,t);else for(r in t)K(e+"["+r+"]",t[r],n,i)}function z(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,a=t.toLowerCase().match(ke)||[];if(ge.isFunction(n))for(;i=a[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function X(e,t,n,i){function r(s){var l;return a[s]=!0,ge.each(e[s]||[],function(e,s){var u=s(t,n,i);return"string"!=typeof u||o||a[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),r(u),!1)}),l}var a={},o=e===Gt;return r(t.dataTypes[0])||!a["*"]&&r("*")}function Z(e,t){var n,i,r=ge.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&ge.extend(!0,e,i),e}function $(e,t,n){for(var i,r,a,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)a=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){a=r;break}o||(o=r)}a=a||o}if(a)return a!==l[0]&&l.unshift(a),n[a]}function ee(e,t,n,i){var r,a,o,s,l,u={},d=e.dataTypes.slice();if(d[1])for(o in e.converters)u[o.toLowerCase()]=e.converters[o];for(a=d.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=a,a=d.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){if(o=u[l+" "+a]||u["* "+a],!o)for(r in u)if(s=r.split(" "),s[1]===a&&(o=u[l+" "+s[0]]||u["* "+s[0]])){o===!0?o=u[r]:u[r]!==!0&&(a=s[0],d.unshift(s[1]));break}if(o!==!0)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+a}}}return{state:"success",data:t}}function te(e){return ge.isWindow(e)?e:9===e.nodeType&&e.defaultView}var ne=[],ie=n.document,re=Object.getPrototypeOf,ae=ne.slice,oe=ne.concat,se=ne.push,le=ne.indexOf,ue={},de=ue.toString,ce=ue.hasOwnProperty,fe=ce.toString,he=fe.call(Object),pe={},_e="3.1.0",ge=function(e,t){return new ge.fn.init(e,t)},me=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ve=/^-ms-/,ye=/-([a-z])/g,Ee=function(e,t){return t.toUpperCase()};ge.fn=ge.prototype={jquery:_e,constructor:ge,length:0,toArray:function(){return ae.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:ae.call(this)},pushStack:function(e){var t=ge.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ge.each(this,e)},map:function(e){return this.pushStack(ge.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:se,sort:ne.sort,splice:ne.splice},ge.extend=ge.fn.extend=function(){var e,t,n,i,r,a,o=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof o&&(u=o,o=arguments[s]||{},s++),"object"==typeof o||ge.isFunction(o)||(o={}),s===l&&(o=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=o[t],i=e[t],o!==i&&(u&&i&&(ge.isPlainObject(i)||(r=ge.isArray(i)))?(r?(r=!1,a=n&&ge.isArray(n)?n:[]):a=n&&ge.isPlainObject(n)?n:{},o[t]=ge.extend(u,a,i)):void 0!==i&&(o[t]=i));return o},ge.extend({expando:"jQuery"+(_e+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===ge.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=ge.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==de.call(e))&&(!(t=re(e))||(n=ce.call(t,"constructor")&&t.constructor,"function"==typeof n&&fe.call(n)===he))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[de.call(e)]||"object":typeof e},globalEval:function(e){o(e)},camelCase:function(e){return e.replace(ve,"ms-").replace(ye,Ee)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,i=0;if(s(e))for(n=e.length;i<n&&t.call(e[i],i,e[i])!==!1;i++);else for(i in e)if(t.call(e[i],i,e[i])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(me,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(s(Object(e))?ge.merge(n,"string"==typeof e?[e]:e):se.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:le.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],a=0,o=e.length,s=!n;a<o;a++)i=!t(e[a],a),i!==s&&r.push(e[a]);return r},map:function(e,t,n){var i,r,a=0,o=[];if(s(e))for(i=e.length;a<i;a++)r=t(e[a],a,n),null!=r&&o.push(r);else for(a in e)r=t(e[a],a,n),null!=r&&o.push(r);return oe.apply([],o)},guid:1,proxy:function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),ge.isFunction(e))return i=ae.call(arguments,2),r=function(){return e.apply(t||this,i.concat(ae.call(arguments)))},r.guid=e.guid=e.guid||ge.guid++,r},now:Date.now,support:pe}),"function"==typeof Symbol&&(ge.fn[Symbol.iterator]=ne[Symbol.iterator]),ge.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ue["[object "+t+"]"]=t.toLowerCase()});var Se=function(e){function t(e,t,n,i){var r,a,o,s,l,u,d,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!i&&((t?t.ownerDocument||t:j)!==L&&k(t),t=t||L,M)){if(11!==p&&(l=me.exec(e)))if(r=l[1]){if(9===p){if(!(o=t.getElementById(r)))return n;if(o.id===r)return n.push(o),n}else if(f&&(o=f.getElementById(r))&&B(t,o)&&o.id===r)return n.push(o),n}else{if(l[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&T.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(r)),n}if(T.qsa&&!Y[e+" "]&&(!x||!x.test(e))){if(1!==p)f=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(Se,Te):t.setAttribute("id",s=F),u=w(e),a=u.length;a--;)u[a]="#"+s+" "+h(u[a]);d=u.join(","),f=ve.test(e)&&c(t.parentNode)||t}if(d)try{return Z.apply(n,f.querySelectorAll(d)),n}catch(e){}finally{s===F&&t.removeAttribute("id")}}}return I(e.replace(se,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[F]=!0,e}function r(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),i=n.length;i--;)C.attrHandle[n[i]]=t}function o(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return function(t){return"label"in t&&t.disabled===e||"form"in t&&t.disabled===e||"form"in t&&t.disabled===!1&&(t.isDisabled===e||t.isDisabled!==!e&&("label"in t||!Re(t))!==e)}}function d(e){return i(function(t){return t=+t,i(function(n,i){for(var r,a=e([],n.length,t),o=a.length;o--;)n[r=a[o]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function h(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function p(e,t,n){var i=t.dir,r=t.next,a=r||i,o=n&&"parentNode"===a,s=V++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,l){var u,d,c,f=[G,s];if(l){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||o)if(c=t[F]||(t[F]={}),d=c[t.uniqueID]||(c[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[i]||t;else{if((u=d[a])&&u[0]===G&&u[1]===s)return f[2]=u[2];if(d[a]=f,f[2]=e(t,n,l))return!0}}}function _(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var r=0,a=n.length;r<a;r++)t(e,n[r],i);return i}function m(e,t,n,i,r){for(var a,o=[],s=0,l=e.length,u=null!=t;s<l;s++)(a=e[s])&&(n&&!n(a,i,r)||(o.push(a),u&&t.push(s)));return o}function v(e,t,n,r,a,o){return r&&!r[F]&&(r=v(r)),a&&!a[F]&&(a=v(a,o)),i(function(i,o,s,l){var u,d,c,f=[],h=[],p=o.length,_=i||g(t||"*",s.nodeType?[s]:s,[]),v=!e||!i&&t?_:m(_,f,e,s,l),y=n?a||(i?e:p||r)?[]:o:v;if(n&&n(v,y,s,l),r)for(u=m(y,h),r(u,[],s,l),d=u.length;d--;)(c=u[d])&&(y[h[d]]=!(v[h[d]]=c));if(i){if(a||e){if(a){for(u=[],d=y.length;d--;)(c=y[d])&&u.push(v[d]=c);a(null,y=[],u,l)}for(d=y.length;d--;)(c=y[d])&&(u=a?ee(i,c):f[d])>-1&&(i[u]=!(o[u]=c))}}else y=m(y===o?y.splice(p,y.length):y),a?a(null,o,y,l):Z.apply(o,y)})}function y(e){for(var t,n,i,r=e.length,a=C.relative[e[0].type],o=a||C.relative[" "],s=a?1:0,l=p(function(e){return e===t},o,!0),u=p(function(e){return ee(t,e)>-1},o,!0),d=[function(e,n,i){var r=!a&&(i||n!==P)||((t=n).nodeType?l(e,n,i):u(e,n,i));return t=null,r}];s<r;s++)if(n=C.relative[e[s].type])d=[p(_(d),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[F]){for(i=++s;i<r&&!C.relative[e[i].type];i++);return v(s>1&&_(d),s>1&&h(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<i&&y(e.slice(s,i)),i<r&&y(e=e.slice(i)),i<r&&h(e))}d.push(n)}return _(d)}function E(e,n){var r=n.length>0,a=e.length>0,o=function(i,o,s,l,u){var d,c,f,h=0,p="0",_=i&&[],g=[],v=P,y=i||a&&C.find.TAG("*",u),E=G+=null==v?1:Math.random()||.1,S=y.length;for(u&&(P=o===L||o||u);p!==S&&null!=(d=y[p]);p++){if(a&&d){for(c=0,o||d.ownerDocument===L||(k(d),s=!M);f=e[c++];)if(f(d,o||L,s)){l.push(d);break}u&&(G=E)}r&&((d=!f&&d)&&h--,i&&_.push(d))}if(h+=p,r&&p!==h){for(c=0;f=n[c++];)f(_,g,o,s);if(i){if(h>0)for(;p--;)_[p]||g[p]||(g[p]=z.call(l));g=m(g)}Z.apply(l,g),u&&!i&&g.length>0&&h+n.length>1&&t.uniqueSort(l)}return u&&(G=E,P=v),_};return r?i(o):o}var S,T,C,R,b,w,A,I,P,O,D,k,L,N,M,x,U,H,B,F="sizzle"+1*new Date,j=e.document,G=0,V=0,q=n(),W=n(),Y=n(),J=function(e,t){return e===t&&(D=!0),0},Q={}.hasOwnProperty,K=[],z=K.pop,X=K.push,Z=K.push,$=K.slice,ee=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",re="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",oe=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),de=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),ce=new RegExp(ae),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,_e=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,ye=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),Ee=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Se=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){k()},Re=p(function(e){return e.disabled===!0},{dir:"parentNode",next:"legend"});try{Z.apply(K=$.call(j.childNodes),j.childNodes),K[j.childNodes.length].nodeType}catch(e){Z={apply:K.length?function(e,t){X.apply(e,$.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}T=t.support={},b=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},k=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:j;return i!==L&&9===i.nodeType&&i.documentElement?(L=i,N=L.documentElement,M=!b(L),j!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),T.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=r(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=ge.test(L.getElementsByClassName),T.getById=r(function(e){return N.appendChild(e).id=F,!L.getElementsByName||!L.getElementsByName(F).length}),T.getById?(C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&M){var n=t.getElementById(e);return n?[n]:[]}},C.filter.ID=function(e){var t=e.replace(ye,Ee);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(ye,Ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[r++];)1===n.nodeType&&i.push(n);return i}return a},C.find.CLASS=T.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&M)return t.getElementsByClassName(e)},U=[],x=[],(T.qsa=ge.test(L.querySelectorAll))&&(r(function(e){N.appendChild(e).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&x.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||x.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+F+"-]").length||x.push("~="),e.querySelectorAll(":checked").length||x.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||x.push(".#.+[+~]")}),r(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&x.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&x.push(":enabled",":disabled"),N.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&x.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),x.push(",.*:")})),(T.matchesSelector=ge.test(H=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&r(function(e){T.disconnectedMatch=H.call(e,"*"),H.call(e,"[s!='']:x"),U.push("!=",ae)}),x=x.length&&new RegExp(x.join("|")),U=U.length&&new RegExp(U.join("|")),t=ge.test(N.compareDocumentPosition),B=t||ge.test(N.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},J=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===j&&B(j,e)?-1:t===L||t.ownerDocument===j&&B(j,t)?1:O?ee(O,e)-ee(O,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,i=0,r=e.parentNode,a=t.parentNode,s=[e],l=[t];if(!r||!a)return e===L?-1:t===L?1:r?-1:a?1:O?ee(O,e)-ee(O,t):0;if(r===a)return o(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?o(s[i],l[i]):s[i]===j?-1:l[i]===j?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&k(e),n=n.replace(de,"='$1']"),T.matchesSelector&&M&&!Y[n+" "]&&(!U||!U.test(n))&&(!x||!x.test(n)))try{var i=H.call(e,n);if(i||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&k(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&k(e);var n=C.attrHandle[t.toLowerCase()],i=n&&Q.call(C.attrHandle,t.toLowerCase())?n(e,t,!M):void 0;return void 0!==i?i:T.attributes||!M?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(Se,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(D=!T.detectDuplicates,O=!T.sortStable&&e.slice(0),e.sort(J),D){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return O=null,e},R=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=R(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=R(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,Ee),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,Ee),"~="===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]||t.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]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=w(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(ye,Ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var a=t.attr(r,e);return null==a?"!="===n:!n||(a+="","="===n?a===i:"!="===n?a!==i:"^="===n?i&&0===a.indexOf(i):"*="===n?i&&a.indexOf(i)>-1:"$="===n?i&&a.slice(-i.length)===i:"~="===n?(" "+a.replace(oe," ")+" ").indexOf(i)>-1:"|="===n&&(a===i||a.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){
return!!e.parentNode}:function(t,n,l){var u,d,c,f,h,p,_=a!==o?"nextSibling":"previousSibling",g=t.parentNode,m=s&&t.nodeName.toLowerCase(),v=!l&&!s,y=!1;if(g){if(a){for(;_;){for(f=t;f=f[_];)if(s?f.nodeName.toLowerCase()===m:1===f.nodeType)return!1;p=_="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?g.firstChild:g.lastChild],o&&v){for(f=g,c=f[F]||(f[F]={}),d=c[f.uniqueID]||(c[f.uniqueID]={}),u=d[e]||[],h=u[0]===G&&u[1],y=h&&u[2],f=h&&g.childNodes[h];f=++h&&f&&f[_]||(y=h=0)||p.pop();)if(1===f.nodeType&&++y&&f===t){d[e]=[G,h,y];break}}else if(v&&(f=t,c=f[F]||(f[F]={}),d=c[f.uniqueID]||(c[f.uniqueID]={}),u=d[e]||[],h=u[0]===G&&u[1],y=h),y===!1)for(;(f=++h&&f&&f[_]||(y=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==m:1!==f.nodeType)||!++y||(v&&(c=f[F]||(f[F]={}),d=c[f.uniqueID]||(c[f.uniqueID]={}),d[e]=[G,y]),f!==t)););return y-=r,y===i||y%i===0&&y/i>=0}}},PSEUDO:function(e,n){var r,a=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[F]?a(n):a.length>1?(r=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=a(e,n),o=r.length;o--;)i=ee(e,r[o]),e[i]=!(t[i]=r[o])}):function(e){return a(e,0,r)}):a}},pseudos:{not:i(function(e){var t=[],n=[],r=A(e.replace(se,"$1"));return r[F]?i(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ye,Ee),function(t){return(t.textContent||t.innerText||R(t)).indexOf(e)>-1}}),lang:i(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,Ee).toLowerCase(),function(t){var n;do if(n=M?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===N},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:u(!1),disabled:u(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return _e.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:d(function(){return[0]}),last:d(function(e,t){return[t-1]}),eq:d(function(e,t,n){return[n<0?n+t:n]}),even:d(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:d(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:d(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:d(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},C.pseudos.nth=C.pseudos.eq;for(S in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[S]=s(S);for(S in{submit:!0,reset:!0})C.pseudos[S]=l(S);return f.prototype=C.filters=C.pseudos,C.setFilters=new f,w=t.tokenize=function(e,n){var i,r,a,o,s,l,u,d=W[e+" "];if(d)return n?0:d.slice(0);for(s=e,l=[],u=C.preFilter;s;){i&&!(r=le.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(a=[])),i=!1,(r=ue.exec(s))&&(i=r.shift(),a.push({value:i,type:r[0].replace(se," ")}),s=s.slice(i.length));for(o in C.filter)!(r=he[o].exec(s))||u[o]&&!(r=u[o](r))||(i=r.shift(),a.push({value:i,type:o,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):W(e,l).slice(0)},A=t.compile=function(e,t){var n,i=[],r=[],a=Y[e+" "];if(!a){for(t||(t=w(e)),n=t.length;n--;)a=y(t[n]),a[F]?i.push(a):r.push(a);a=Y(e,E(r,i)),a.selector=e}return a},I=t.select=function(e,t,n,i){var r,a,o,s,l,u="function"==typeof e&&e,d=!i&&w(e=u.selector||e);if(n=n||[],1===d.length){if(a=d[0]=d[0].slice(0),a.length>2&&"ID"===(o=a[0]).type&&T.getById&&9===t.nodeType&&M&&C.relative[a[1].type]){if(t=(C.find.ID(o.matches[0].replace(ye,Ee),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(r=he.needsContext.test(e)?0:a.length;r--&&(o=a[r],!C.relative[s=o.type]);)if((l=C.find[s])&&(i=l(o.matches[0].replace(ye,Ee),ve.test(a[0].type)&&c(t.parentNode)||t))){if(a.splice(r,1),e=i.length&&h(a),!e)return Z.apply(n,i),n;break}}return(u||A(e,d))(i,t,!M,n,!t||ve.test(e)&&c(t.parentNode)||t),n},T.sortStable=F.split("").sort(J).join("")===F,T.detectDuplicates=!!D,k(),T.sortDetached=r(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||a(te,function(e,t,n){var i;if(!n)return e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(n);ge.find=Se,ge.expr=Se.selectors,ge.expr[":"]=ge.expr.pseudos,ge.uniqueSort=ge.unique=Se.uniqueSort,ge.text=Se.getText,ge.isXMLDoc=Se.isXML,ge.contains=Se.contains,ge.escapeSelector=Se.escape;var Te=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&ge(e).is(n))break;i.push(e)}return i},Ce=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Re=ge.expr.match.needsContext,be=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,we=/^.[^:#\[\.,]*$/;ge.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?ge.find.matchesSelector(i,e)?[i]:[]:ge.find.matches(e,ge.grep(t,function(e){return 1===e.nodeType}))},ge.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(ge(e).filter(function(){for(t=0;t<i;t++)if(ge.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)ge.find(e,r[t],n);return i>1?ge.uniqueSort(n):n},filter:function(e){return this.pushStack(l(this,e||[],!1))},not:function(e){return this.pushStack(l(this,e||[],!0))},is:function(e){return!!l(this,"string"==typeof e&&Re.test(e)?ge(e):e||[],!1).length}});var Ae,Ie=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Pe=ge.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||Ae,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ie.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof ge?t[0]:t,ge.merge(this,ge.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ie,!0)),be.test(i[1])&&ge.isPlainObject(t))for(i in t)ge.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=ie.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ge.isFunction(e)?void 0!==n.ready?n.ready(e):e(ge):ge.makeArray(e,this)};Pe.prototype=ge.fn,Ae=ge(ie);var Oe=/^(?:parents|prev(?:Until|All))/,De={children:!0,contents:!0,next:!0,prev:!0};ge.fn.extend({has:function(e){var t=ge(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ge.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,a=[],o="string"!=typeof e&&ge(e);if(!Re.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&ge.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?ge.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?le.call(ge(e),this[0]):le.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ge.uniqueSort(ge.merge(this.get(),ge(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ge.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Te(e,"parentNode")},parentsUntil:function(e,t,n){return Te(e,"parentNode",n)},next:function(e){return u(e,"nextSibling")},prev:function(e){return u(e,"previousSibling")},nextAll:function(e){return Te(e,"nextSibling")},prevAll:function(e){return Te(e,"previousSibling")},nextUntil:function(e,t,n){return Te(e,"nextSibling",n)},prevUntil:function(e,t,n){return Te(e,"previousSibling",n)},siblings:function(e){return Ce((e.parentNode||{}).firstChild,e)},children:function(e){return Ce(e.firstChild)},contents:function(e){return e.contentDocument||ge.merge([],e.childNodes)}},function(e,t){ge.fn[e]=function(n,i){var r=ge.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=ge.filter(i,r)),this.length>1&&(De[e]||ge.uniqueSort(r),Oe.test(e)&&r.reverse()),this.pushStack(r)}});var ke=/\S+/g;ge.Callbacks=function(e){e="string"==typeof e?d(e):ge.extend({},e);var t,n,i,r,a=[],o=[],s=-1,l=function(){for(r=e.once,i=t=!0;o.length;s=-1)for(n=o.shift();++s<a.length;)a[s].apply(n[0],n[1])===!1&&e.stopOnFalse&&(s=a.length,n=!1);e.memory||(n=!1),t=!1,r&&(a=n?[]:"")},u={add:function(){return a&&(n&&!t&&(s=a.length-1,o.push(n)),function t(n){ge.each(n,function(n,i){ge.isFunction(i)?e.unique&&u.has(i)||a.push(i):i&&i.length&&"string"!==ge.type(i)&&t(i)})}(arguments),n&&!t&&l()),this},remove:function(){return ge.each(arguments,function(e,t){for(var n;(n=ge.inArray(t,a,n))>-1;)a.splice(n,1),n<=s&&s--}),this},has:function(e){return e?ge.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return r=o=[],a=n="",this},disabled:function(){return!a},lock:function(){return r=o=[],n||t||(a=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},ge.extend({Deferred:function(e){var t=[["notify","progress",ge.Callbacks("memory"),ge.Callbacks("memory"),2],["resolve","done",ge.Callbacks("once memory"),ge.Callbacks("once memory"),0,"resolved"],["reject","fail",ge.Callbacks("once memory"),ge.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return ge.Deferred(function(n){ge.each(t,function(t,i){var r=ge.isFunction(e[i[4]])&&e[i[4]];a[i[1]](function(){var e=r&&r.apply(this,arguments);e&&ge.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,i,r){function a(e,t,i,r){return function(){var s=this,l=arguments,u=function(){var n,u;if(!(e<o)){if(n=i.apply(s,l),n===t.promise())throw new TypeError("Thenable self-resolution");u=n&&("object"==typeof n||"function"==typeof n)&&n.then,ge.isFunction(u)?r?u.call(n,a(o,t,c,r),a(o,t,f,r)):(o++,u.call(n,a(o,t,c,r),a(o,t,f,r),a(o,t,c,t.notifyWith))):(i!==c&&(s=void 0,l=[n]),(r||t.resolveWith)(s,l))}},d=r?u:function(){try{u()}catch(n){ge.Deferred.exceptionHook&&ge.Deferred.exceptionHook(n,d.stackTrace),e+1>=o&&(i!==f&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?d():(ge.Deferred.getStackHook&&(d.stackTrace=ge.Deferred.getStackHook()),n.setTimeout(d))}}var o=0;return ge.Deferred(function(n){t[0][3].add(a(0,n,ge.isFunction(r)?r:c,n.notifyWith)),t[1][3].add(a(0,n,ge.isFunction(e)?e:c)),t[2][3].add(a(0,n,ge.isFunction(i)?i:f))}).promise()},promise:function(e){return null!=e?ge.extend(e,r):r}},a={};return ge.each(t,function(e,n){var o=n[2],s=n[5];r[n[1]]=o.add,s&&o.add(function(){i=s},t[3-e][2].disable,t[0][2].lock),o.add(n[3].fire),a[n[0]]=function(){return a[n[0]+"With"](this===a?void 0:this,arguments),this},a[n[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,i=Array(n),r=ae.call(arguments),a=ge.Deferred(),o=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?ae.call(arguments):n,--t||a.resolveWith(i,r)}};if(t<=1&&(h(e,a.done(o(n)).resolve,a.reject),"pending"===a.state()||ge.isFunction(r[n]&&r[n].then)))return a.then();for(;n--;)h(r[n],o(n),a.reject);return a.promise()}});var Le=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ge.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Le.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ge.readyException=function(e){n.setTimeout(function(){throw e})};var Ne=ge.Deferred();ge.fn.ready=function(e){return Ne.then(e).catch(function(e){ge.readyException(e)}),this},ge.extend({isReady:!1,readyWait:1,holdReady:function(e){e?ge.readyWait++:ge.ready(!0)},ready:function(e){(e===!0?--ge.readyWait:ge.isReady)||(ge.isReady=!0,e!==!0&&--ge.readyWait>0||Ne.resolveWith(ie,[ge]))}}),ge.ready.then=Ne.then,"complete"===ie.readyState||"loading"!==ie.readyState&&!ie.documentElement.doScroll?n.setTimeout(ge.ready):(ie.addEventListener("DOMContentLoaded",p),n.addEventListener("load",p));var Me=function(e,t,n,i,r,a,o){var s=0,l=e.length,u=null==n;if("object"===ge.type(n)){r=!0;for(s in n)Me(e,t,s,n[s],!0,a,o)}else if(void 0!==i&&(r=!0,ge.isFunction(i)||(o=!0),u&&(o?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(ge(e),n)})),t))for(;s<l;s++)t(e[s],n,o?i:i.call(e[s],s,t(e[s],n)));return r?e:u?t.call(e):l?t(e[0],n):a},xe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};_.uid=1,_.prototype={cache:function(e){var t=e[this.expando];return t||(t={},xe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[ge.camelCase(t)]=n;else for(i in t)r[ge.camelCase(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][ge.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){ge.isArray(t)?t=t.map(ge.camelCase):(t=ge.camelCase(t),t=t in i?[t]:t.match(ke)||[]),n=t.length;for(;n--;)delete i[t[n]]}(void 0===t||ge.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ge.isEmptyObject(t)}};var Ue=new _,He=new _,Be=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Fe=/[A-Z]/g;ge.extend({hasData:function(e){return He.hasData(e)||Ue.hasData(e)},data:function(e,t,n){return He.access(e,t,n)},removeData:function(e,t){He.remove(e,t)},_data:function(e,t,n){return Ue.access(e,t,n)},_removeData:function(e,t){Ue.remove(e,t)}}),ge.fn.extend({data:function(e,t){var n,i,r,a=this[0],o=a&&a.attributes;if(void 0===e){if(this.length&&(r=He.get(a),1===a.nodeType&&!Ue.get(a,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&(i=o[n].name,0===i.indexOf("data-")&&(i=ge.camelCase(i.slice(5)),g(a,i,r[i])));Ue.set(a,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){He.set(this,e)}):Me(this,function(t){var n;if(a&&void 0===t){if(n=He.get(a,e),void 0!==n)return n;if(n=g(a,e),void 0!==n)return n}else this.each(function(){He.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){He.remove(this,e)})}}),ge.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=Ue.get(e,t),n&&(!i||ge.isArray(n)?i=Ue.access(e,t,ge.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=ge.queue(e,t),i=n.length,r=n.shift(),a=ge._queueHooks(e,t),o=function(){ge.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete a.stop,r.call(e,o,a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ue.get(e,n)||Ue.access(e,n,{empty:ge.Callbacks("once memory").add(function(){Ue.remove(e,[t+"queue",n])})})}}),ge.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?ge.queue(this[0],e):void 0===t?this:this.each(function(){var n=ge.queue(this,e,t);ge._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&ge.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ge.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=ge.Deferred(),a=this,o=this.length,s=function(){--i||r.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)n=Ue.get(a[o],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var je=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ge=new RegExp("^(?:([+-])=|)("+je+")([a-z%]*)$","i"),Ve=["Top","Right","Bottom","Left"],qe=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&ge.contains(e.ownerDocument,e)&&"none"===ge.css(e,"display")},We=function(e,t,n,i){var r,a,o={};for(a in t)o[a]=e.style[a],e.style[a]=t[a];r=n.apply(e,i||[]);for(a in t)e.style[a]=o[a];return r},Ye={};ge.fn.extend({show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){qe(this)?ge(this).show():ge(this).hide()})}});var Je=/^(?:checkbox|radio)$/i,Qe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Ke=/^$|\/(?:java|ecma)script/i,ze={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ze.optgroup=ze.option,ze.tbody=ze.tfoot=ze.colgroup=ze.caption=ze.thead,ze.th=ze.td;var Xe=/<|&#?\w+;/;!function(){var e=ie.createDocumentFragment(),t=e.appendChild(ie.createElement("div")),n=ie.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),pe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",pe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Ze=ie.documentElement,$e=/^key/,et=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,tt=/^([^.]*)(?:\.(.+)|)/;ge.event={global:{},add:function(e,t,n,i,r){var a,o,s,l,u,d,c,f,h,p,_,g=Ue.get(e);if(g)for(n.handler&&(a=n,n=a.handler,r=a.selector),r&&ge.find.matchesSelector(Ze,r),n.guid||(n.guid=ge.guid++),(l=g.events)||(l=g.events={}),(o=g.handle)||(o=g.handle=function(t){return"undefined"!=typeof ge&&ge.event.triggered!==t.type?ge.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ke)||[""],u=t.length;u--;)s=tt.exec(t[u])||[],h=_=s[1],p=(s[2]||"").split(".").sort(),h&&(c=ge.event.special[h]||{},h=(r?c.delegateType:c.bindType)||h,c=ge.event.special[h]||{},d=ge.extend({type:h,origType:_,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&ge.expr.match.needsContext.test(r),namespace:p.join(".")},a),(f=l[h])||(f=l[h]=[],f.delegateCount=0,c.setup&&c.setup.call(e,i,p,o)!==!1||e.addEventListener&&e.addEventListener(h,o)),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,d):f.push(d),ge.event.global[h]=!0)},remove:function(e,t,n,i,r){var a,o,s,l,u,d,c,f,h,p,_,g=Ue.hasData(e)&&Ue.get(e);if(g&&(l=g.events)){for(t=(t||"").match(ke)||[""],u=t.length;u--;)if(s=tt.exec(t[u])||[],h=_=s[1],p=(s[2]||"").split(".").sort(),h){for(c=ge.event.special[h]||{},h=(i?c.delegateType:c.bindType)||h,f=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=f.length;a--;)d=f[a],!r&&_!==d.origType||n&&n.guid!==d.guid||s&&!s.test(d.namespace)||i&&i!==d.selector&&("**"!==i||!d.selector)||(f.splice(a,1),d.selector&&f.delegateCount--,c.remove&&c.remove.call(e,d));o&&!f.length&&(c.teardown&&c.teardown.call(e,p,g.handle)!==!1||ge.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)ge.event.remove(e,h+t[u],n,i,!0);ge.isEmptyObject(l)&&Ue.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,a,o,s=ge.event.fix(e),l=new Array(arguments.length),u=(Ue.get(this,"events")||{})[s.type]||[],d=ge.event.special[s.type]||{};for(l[0]=s,t=1;t<arguments.length;t++)l[t]=arguments[t];if(s.delegateTarget=this,!d.preDispatch||d.preDispatch.call(this,s)!==!1){for(o=ge.event.handlers.call(this,s,u),t=0;(r=o[t++])&&!s.isPropagationStopped();)for(s.currentTarget=r.elem,n=0;(a=r.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(a.namespace)||(s.handleObj=a,s.data=a.data,i=((ge.event.special[a.origType]||{}).handle||a.handler).apply(r.elem,l),void 0!==i&&(s.result=i)===!1&&(s.preventDefault(),s.stopPropagation()));return d.postDispatch&&d.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,i,r,a,o=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(i=[],n=0;n<s;n++)a=t[n],r=a.selector+" ",void 0===i[r]&&(i[r]=a.needsContext?ge(r,this).index(l)>-1:ge.find(r,this,null,[l]).length),i[r]&&i.push(a);i.length&&o.push({elem:l,handlers:i})}return s<t.length&&o.push({elem:this,handlers:t.slice(s)}),o},addProp:function(e,t){Object.defineProperty(ge.Event.prototype,e,{enumerable:!0,configurable:!0,get:ge.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[ge.expando]?e:new ge.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===b()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&ge.nodeName(this,"input"))return this.click(),!1},_default:function(e){return ge.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ge.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ge.Event=function(e,t){return this instanceof ge.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?C:R,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ge.extend(this,t),this.timeStamp=e&&e.timeStamp||ge.now(),void(this[ge.expando]=!0)):new ge.Event(e,t)},ge.Event.prototype={constructor:ge.Event,isDefaultPrevented:R,isPropagationStopped:R,isImmediatePropagationStopped:R,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=C,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=C,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=C,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ge.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&$e.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&et.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},ge.event.addProp),ge.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ge.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,a=e.handleObj;return r&&(r===i||ge.contains(i,r))||(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),ge.fn.extend({on:function(e,t,n,i){return w(this,e,t,n,i)},one:function(e,t,n,i){return w(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,ge(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=R),this.each(function(){ge.event.remove(this,e,n,t)})}});var nt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,it=/<script|<style|<link/i,rt=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^true\/(.*)/,ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;ge.extend({htmlPrefilter:function(e){return e.replace(nt,"<$1></$2>")},clone:function(e,t,n){var i,r,a,o,s=e.cloneNode(!0),l=ge.contains(e.ownerDocument,e);if(!(pe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ge.isXMLDoc(e)))for(o=E(s),a=E(e),i=0,r=a.length;i<r;i++)D(a[i],o[i]);if(t)if(n)for(a=a||E(e),o=o||E(s),i=0,r=a.length;i<r;i++)O(a[i],o[i]);else O(e,s);return o=E(s,"script"),o.length>0&&S(o,!l&&E(e,"script")),s},cleanData:function(e){for(var t,n,i,r=ge.event.special,a=0;void 0!==(n=e[a]);a++)if(xe(n)){if(t=n[Ue.expando]){if(t.events)for(i in t.events)r[i]?ge.event.remove(n,i):ge.removeEvent(n,i,t.handle);n[Ue.expando]=void 0}n[He.expando]&&(n[He.expando]=void 0)}}}),ge.fn.extend({detach:function(e){return L(this,e,!0)},remove:function(e){return L(this,e)},text:function(e){return Me(this,function(e){return void 0===e?ge.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return k(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.appendChild(e)}})},prepend:function(){return k(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return k(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return k(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ge.cleanData(E(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ge.clone(this,e,t)})},html:function(e){return Me(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ze[(Qe.exec(e)||["",""])[1].toLowerCase()]){e=ge.htmlPrefilter(e);try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(ge.cleanData(E(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return k(this,arguments,function(t){var n=this.parentNode;ge.inArray(this,e)<0&&(ge.cleanData(E(this)),n&&n.replaceChild(t,this))},e)}}),ge.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ge.fn[e]=function(e){for(var n,i=[],r=ge(e),a=r.length-1,o=0;o<=a;o++)n=o===a?this:this.clone(!0),ge(r[o])[t](n),se.apply(i,n.get());return this.pushStack(i)}});var st=/^margin/,lt=new RegExp("^("+je+")(?!px)[a-z%]+$","i"),ut=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Ze.appendChild(o);var e=n.getComputedStyle(s);t="1%"!==e.top,a="2px"===e.marginLeft,i="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,Ze.removeChild(o),s=null}}var t,i,r,a,o=ie.createElement("div"),s=ie.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",pe.clearCloneStyle="content-box"===s.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(s),ge.extend(pe,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),i},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),a}}))}();var dt=/^(none|table(?!-c[ea]).+)/,ct={position:"absolute",visibility:"hidden",display:"block"},ft={letterSpacing:"0",fontWeight:"400"},ht=["Webkit","Moz","ms"],pt=ie.createElement("div").style;ge.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=N(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,a,o,s=ge.camelCase(t),l=e.style;return t=ge.cssProps[s]||(ge.cssProps[s]=x(s)||s),o=ge.cssHooks[t]||ge.cssHooks[s],void 0===n?o&&"get"in o&&void 0!==(r=o.get(e,!1,i))?r:l[t]:(a=typeof n,"string"===a&&(r=Ge.exec(n))&&r[1]&&(n=m(e,t,r),a="number"),null!=n&&n===n&&("number"===a&&(n+=r&&r[3]||(ge.cssNumber[s]?"":"px")),pe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,i))||(l[t]=n)),void 0)}},css:function(e,t,n,i){var r,a,o,s=ge.camelCase(t);return t=ge.cssProps[s]||(ge.cssProps[s]=x(s)||s),o=ge.cssHooks[t]||ge.cssHooks[s],o&&"get"in o&&(r=o.get(e,!0,n)),void 0===r&&(r=N(e,t,i)),"normal"===r&&t in ft&&(r=ft[t]),""===n||n?(a=parseFloat(r),n===!0||isFinite(a)?a||0:r):r}}),ge.each(["height","width"],function(e,t){ge.cssHooks[t]={get:function(e,n,i){if(n)return!dt.test(ge.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?B(e,t,i):We(e,ct,function(){return B(e,t,i)})},set:function(e,n,i){var r,a=i&&ut(e),o=i&&H(e,t,i,"border-box"===ge.css(e,"boxSizing",!1,a),a);return o&&(r=Ge.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=ge.css(e,t)),U(e,n,o)}}}),ge.cssHooks.marginLeft=M(pe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(N(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ge.each({margin:"",padding:"",border:"Width"},function(e,t){ge.cssHooks[e+t]={expand:function(n){for(var i=0,r={},a="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+Ve[i]+t]=a[i]||a[i-2]||a[0];return r}},st.test(e)||(ge.cssHooks[e+t].set=U)}),ge.fn.extend({css:function(e,t){return Me(this,function(e,t,n){var i,r,a={},o=0;if(ge.isArray(t)){for(i=ut(e),r=t.length;o<r;o++)a[t[o]]=ge.css(e,t[o],!1,i);return a}return void 0!==n?ge.style(e,t,n):ge.css(e,t)},e,t,arguments.length>1)}}),ge.Tween=F,F.prototype={constructor:F,init:function(e,t,n,i,r,a){this.elem=e,this.prop=n,this.easing=r||ge.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=a||(ge.cssNumber[n]?"":"px")},cur:function(){var e=F.propHooks[this.prop];return e&&e.get?e.get(this):F.propHooks._default.get(this)},run:function(e){var t,n=F.propHooks[this.prop];return this.options.duration?this.pos=t=ge.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ge.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ge.fx.step[e.prop]?ge.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ge.cssProps[e.prop]]&&!ge.cssHooks[e.prop]?e.elem[e.prop]=e.now:ge.style(e.elem,e.prop,e.now+e.unit);
}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ge.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ge.fx=F.prototype.init,ge.fx.step={};var _t,gt,mt=/^(?:toggle|show|hide)$/,vt=/queueHooks$/;ge.Animation=ge.extend(J,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return m(n.elem,e,Ge.exec(t),n),n}]},tweener:function(e,t){ge.isFunction(e)?(t=e,e=["*"]):e=e.match(ke);for(var n,i=0,r=e.length;i<r;i++)n=e[i],J.tweeners[n]=J.tweeners[n]||[],J.tweeners[n].unshift(t)},prefilters:[W],prefilter:function(e,t){t?J.prefilters.unshift(e):J.prefilters.push(e)}}),ge.speed=function(e,t,n){var i=e&&"object"==typeof e?ge.extend({},e):{complete:n||!n&&t||ge.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ge.isFunction(t)&&t};return ge.fx.off||ie.hidden?i.duration=0:i.duration="number"==typeof i.duration?i.duration:i.duration in ge.fx.speeds?ge.fx.speeds[i.duration]:ge.fx.speeds._default,null!=i.queue&&i.queue!==!0||(i.queue="fx"),i.old=i.complete,i.complete=function(){ge.isFunction(i.old)&&i.old.call(this),i.queue&&ge.dequeue(this,i.queue)},i},ge.fn.extend({fadeTo:function(e,t,n,i){return this.filter(qe).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=ge.isEmptyObject(e),a=ge.speed(t,n,i),o=function(){var t=J(this,ge.extend({},e),a);(r||Ue.get(this,"finish"))&&t.stop(!0)};return o.finish=o,r||a.queue===!1?this.each(o):this.queue(a.queue,o)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",a=ge.timers,o=Ue.get(this);if(r)o[r]&&o[r].stop&&i(o[r]);else for(r in o)o[r]&&o[r].stop&&vt.test(r)&&i(o[r]);for(r=a.length;r--;)a[r].elem!==this||null!=e&&a[r].queue!==e||(a[r].anim.stop(n),t=!1,a.splice(r,1));!t&&n||ge.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Ue.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],a=ge.timers,o=i?i.length:0;for(n.finish=!0,ge.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<o;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),ge.each(["toggle","show","hide"],function(e,t){var n=ge.fn[t];ge.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,i,r)}}),ge.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ge.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),ge.timers=[],ge.fx.tick=function(){var e,t=0,n=ge.timers;for(_t=ge.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||ge.fx.stop(),_t=void 0},ge.fx.timer=function(e){ge.timers.push(e),e()?ge.fx.start():ge.timers.pop()},ge.fx.interval=13,ge.fx.start=function(){gt||(gt=n.requestAnimationFrame?n.requestAnimationFrame(j):n.setInterval(ge.fx.tick,ge.fx.interval))},ge.fx.stop=function(){n.cancelAnimationFrame?n.cancelAnimationFrame(gt):n.clearInterval(gt),gt=null},ge.fx.speeds={slow:600,fast:200,_default:400},ge.fn.delay=function(e,t){return e=ge.fx?ge.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,i){var r=n.setTimeout(t,e);i.stop=function(){n.clearTimeout(r)}})},function(){var e=ie.createElement("input"),t=ie.createElement("select"),n=t.appendChild(ie.createElement("option"));e.type="checkbox",pe.checkOn=""!==e.value,pe.optSelected=n.selected,e=ie.createElement("input"),e.value="t",e.type="radio",pe.radioValue="t"===e.value}();var yt,Et=ge.expr.attrHandle;ge.fn.extend({attr:function(e,t){return Me(this,ge.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ge.removeAttr(this,e)})}}),ge.extend({attr:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return"undefined"==typeof e.getAttribute?ge.prop(e,t,n):(1===a&&ge.isXMLDoc(e)||(r=ge.attrHooks[t.toLowerCase()]||(ge.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void ge.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=ge.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!pe.radioValue&&"radio"===t&&ge.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(ke);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return t===!1?ge.removeAttr(e,n):e.setAttribute(n,n),n}},ge.each(ge.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Et[t]||ge.find.attr;Et[t]=function(e,t,i){var r,a,o=t.toLowerCase();return i||(a=Et[o],Et[o]=r,r=null!=n(e,t,i)?o:null,Et[o]=a),r}});var St=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;ge.fn.extend({prop:function(e,t){return Me(this,ge.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ge.propFix[e]||e]})}}),ge.extend({prop:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&ge.isXMLDoc(e)||(t=ge.propFix[t]||t,r=ge.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=ge.find.attr(e,"tabindex");return t?parseInt(t,10):St.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),pe.optSelected||(ge.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ge.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ge.propFix[this.toLowerCase()]=this});var Ct=/[\t\r\n\f]/g;ge.fn.extend({addClass:function(e){var t,n,i,r,a,o,s,l=0;if(ge.isFunction(e))return this.each(function(t){ge(this).addClass(e.call(this,t,Q(this)))});if("string"==typeof e&&e)for(t=e.match(ke)||[];n=this[l++];)if(r=Q(n),i=1===n.nodeType&&(" "+r+" ").replace(Ct," ")){for(o=0;a=t[o++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");s=ge.trim(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,a,o,s,l=0;if(ge.isFunction(e))return this.each(function(t){ge(this).removeClass(e.call(this,t,Q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(ke)||[];n=this[l++];)if(r=Q(n),i=1===n.nodeType&&(" "+r+" ").replace(Ct," ")){for(o=0;a=t[o++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");s=ge.trim(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ge.isFunction(e)?this.each(function(n){ge(this).toggleClass(e.call(this,n,Q(this),t),t)}):this.each(function(){var t,i,r,a;if("string"===n)for(i=0,r=ge(this),a=e.match(ke)||[];t=a[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||(t=Q(this),t&&Ue.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Ue.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+Q(n)+" ").replace(Ct," ").indexOf(t)>-1)return!0;return!1}});var Rt=/\r/g,bt=/[\x20\t\r\n\f]+/g;ge.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=ge.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,ge(this).val()):e,null==r?r="":"number"==typeof r?r+="":ge.isArray(r)&&(r=ge.map(r,function(e){return null==e?"":e+""})),t=ge.valHooks[this.type]||ge.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=ge.valHooks[r.type]||ge.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(Rt,""):null==n?"":n)}}}),ge.extend({valHooks:{option:{get:function(e){var t=ge.find.attr(e,"value");return null!=t?t:ge.trim(ge.text(e)).replace(bt," ")}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,a="select-one"===e.type,o=a?null:[],s=a?r+1:i.length,l=r<0?s:a?r:0;l<s;l++)if(n=i[l],(n.selected||l===r)&&!n.disabled&&(!n.parentNode.disabled||!ge.nodeName(n.parentNode,"optgroup"))){if(t=ge(n).val(),a)return t;o.push(t)}return o},set:function(e,t){for(var n,i,r=e.options,a=ge.makeArray(t),o=r.length;o--;)i=r[o],(i.selected=ge.inArray(ge.valHooks.option.get(i),a)>-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),ge.each(["radio","checkbox"],function(){ge.valHooks[this]={set:function(e,t){if(ge.isArray(t))return e.checked=ge.inArray(ge(e).val(),t)>-1}},pe.checkOn||(ge.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var wt=/^(?:focusinfocus|focusoutblur)$/;ge.extend(ge.event,{trigger:function(e,t,i,r){var a,o,s,l,u,d,c,f=[i||ie],h=ce.call(e,"type")?e.type:e,p=ce.call(e,"namespace")?e.namespace.split("."):[];if(o=s=i=i||ie,3!==i.nodeType&&8!==i.nodeType&&!wt.test(h+ge.event.triggered)&&(h.indexOf(".")>-1&&(p=h.split("."),h=p.shift(),p.sort()),u=h.indexOf(":")<0&&"on"+h,e=e[ge.expando]?e:new ge.Event(h,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:ge.makeArray(t,[e]),c=ge.event.special[h]||{},r||!c.trigger||c.trigger.apply(i,t)!==!1)){if(!r&&!c.noBubble&&!ge.isWindow(i)){for(l=c.delegateType||h,wt.test(l+h)||(o=o.parentNode);o;o=o.parentNode)f.push(o),s=o;s===(i.ownerDocument||ie)&&f.push(s.defaultView||s.parentWindow||n)}for(a=0;(o=f[a++])&&!e.isPropagationStopped();)e.type=a>1?l:c.bindType||h,d=(Ue.get(o,"events")||{})[e.type]&&Ue.get(o,"handle"),d&&d.apply(o,t),d=u&&o[u],d&&d.apply&&xe(o)&&(e.result=d.apply(o,t),e.result===!1&&e.preventDefault());return e.type=h,r||e.isDefaultPrevented()||c._default&&c._default.apply(f.pop(),t)!==!1||!xe(i)||u&&ge.isFunction(i[h])&&!ge.isWindow(i)&&(s=i[u],s&&(i[u]=null),ge.event.triggered=h,i[h](),ge.event.triggered=void 0,s&&(i[u]=s)),e.result}},simulate:function(e,t,n){var i=ge.extend(new ge.Event,n,{type:e,isSimulated:!0});ge.event.trigger(i,null,t)}}),ge.fn.extend({trigger:function(e,t){return this.each(function(){ge.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ge.event.trigger(e,t,n,!0)}}),ge.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){ge.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ge.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),pe.focusin="onfocusin"in n,pe.focusin||ge.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ge.event.simulate(t,e.target,ge.event.fix(e))};ge.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=Ue.access(i,t);r||i.addEventListener(e,n,!0),Ue.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Ue.access(i,t)-1;r?Ue.access(i,t,r):(i.removeEventListener(e,n,!0),Ue.remove(i,t))}}});var At=n.location,It=ge.now(),Pt=/\?/;ge.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||ge.error("Invalid XML: "+e),t};var Ot=/\[\]$/,Dt=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,Lt=/^(?:input|select|textarea|keygen)/i;ge.param=function(e,t){var n,i=[],r=function(e,t){var n=ge.isFunction(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(ge.isArray(e)||e.jquery&&!ge.isPlainObject(e))ge.each(e,function(){r(this.name,this.value)});else for(n in e)K(n,e[n],t,r);return i.join("&")},ge.fn.extend({serialize:function(){return ge.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ge.prop(this,"elements");return e?ge.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ge(this).is(":disabled")&&Lt.test(this.nodeName)&&!kt.test(e)&&(this.checked||!Je.test(e))}).map(function(e,t){var n=ge(this).val();return null==n?null:ge.isArray(n)?ge.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var Nt=/%20/g,Mt=/#.*$/,xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Bt=/^(?:GET|HEAD)$/,Ft=/^\/\//,jt={},Gt={},Vt="*/".concat("*"),qt=ie.createElement("a");qt.href=At.href,ge.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:Ht.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Vt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ge.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Z(Z(e,ge.ajaxSettings),t):Z(ge.ajaxSettings,e)},ajaxPrefilter:z(jt),ajaxTransport:z(Gt),ajax:function(e,t){function i(e,t,i,s){var u,f,h,E,S,T=t;d||(d=!0,l&&n.clearTimeout(l),r=void 0,o=s||"",C.readyState=e>0?4:0,u=e>=200&&e<300||304===e,i&&(E=$(p,C,i)),E=ee(p,E,C,u),u?(p.ifModified&&(S=C.getResponseHeader("Last-Modified"),S&&(ge.lastModified[a]=S),S=C.getResponseHeader("etag"),S&&(ge.etag[a]=S)),204===e||"HEAD"===p.type?T="nocontent":304===e?T="notmodified":(T=E.state,f=E.data,h=E.error,u=!h)):(h=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",u?m.resolveWith(_,[f,T,C]):m.rejectWith(_,[C,T,h]),C.statusCode(y),y=void 0,c&&g.trigger(u?"ajaxSuccess":"ajaxError",[C,p,u?f:h]),v.fireWith(_,[C,T]),c&&(g.trigger("ajaxComplete",[C,p]),--ge.active||ge.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,a,o,s,l,u,d,c,f,h,p=ge.ajaxSetup({},t),_=p.context||p,g=p.context&&(_.nodeType||_.jquery)?ge(_):ge.event,m=ge.Deferred(),v=ge.Callbacks("once memory"),y=p.statusCode||{},E={},S={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(d){if(!s)for(s={};t=Ut.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return d?o:null},setRequestHeader:function(e,t){return null==d&&(e=S[e.toLowerCase()]=S[e.toLowerCase()]||e,E[e]=t),this},overrideMimeType:function(e){return null==d&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(d)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||T;return r&&r.abort(t),i(0,t),this}};if(m.promise(C),p.url=((e||p.url||At.href)+"").replace(Ft,At.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(ke)||[""],null==p.crossDomain){u=ie.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=qt.protocol+"//"+qt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ge.param(p.data,p.traditional)),X(jt,p,t,C),d)return C;c=ge.event&&p.global,c&&0===ge.active++&&ge.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Bt.test(p.type),a=p.url.replace(Mt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Nt,"+")):(h=p.url.slice(a.length),p.data&&(a+=(Pt.test(a)?"&":"?")+p.data,delete p.data),p.cache===!1&&(a=a.replace(xt,""),h=(Pt.test(a)?"&":"?")+"_="+It++ +h),p.url=a+h),p.ifModified&&(ge.lastModified[a]&&C.setRequestHeader("If-Modified-Since",ge.lastModified[a]),ge.etag[a]&&C.setRequestHeader("If-None-Match",ge.etag[a])),(p.data&&p.hasContent&&p.contentType!==!1||t.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Vt+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)C.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(p.beforeSend.call(_,C,p)===!1||d))return C.abort();if(T="abort",v.add(p.complete),C.done(p.success),C.fail(p.error),r=X(Gt,p,t,C)){if(C.readyState=1,c&&g.trigger("ajaxSend",[C,p]),d)return C;p.async&&p.timeout>0&&(l=n.setTimeout(function(){C.abort("timeout")},p.timeout));try{d=!1,r.send(E,i)}catch(e){if(d)throw e;i(-1,e)}}else i(-1,"No Transport");return C},getJSON:function(e,t,n){return ge.get(e,t,n,"json")},getScript:function(e,t){return ge.get(e,void 0,t,"script")}}),ge.each(["get","post"],function(e,t){ge[t]=function(e,n,i,r){return ge.isFunction(n)&&(r=r||i,i=n,n=void 0),ge.ajax(ge.extend({url:e,type:t,dataType:r,data:n,success:i},ge.isPlainObject(e)&&e))}}),ge._evalUrl=function(e){return ge.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},ge.fn.extend({wrapAll:function(e){var t;return this[0]&&(ge.isFunction(e)&&(e=e.call(this[0])),t=ge(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ge.isFunction(e)?this.each(function(t){ge(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ge(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ge.isFunction(e);return this.each(function(n){ge(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ge(this).replaceWith(this.childNodes)}),this}}),ge.expr.pseudos.hidden=function(e){return!ge.expr.pseudos.visible(e)},ge.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ge.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},Yt=ge.ajaxSettings.xhr();pe.cors=!!Yt&&"withCredentials"in Yt,pe.ajax=Yt=!!Yt,ge.ajaxTransport(function(e){var t,i;if(pe.cors||Yt&&!e.crossDomain)return{send:function(r,a){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)s.setRequestHeader(o,r[o]);t=function(e){return function(){t&&(t=i=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a(Wt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),i=s.onerror=t("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&i()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),ge.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ge.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ge.globalEval(e),e}}}),ge.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ge.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=ge("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),ie.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Jt=[],Qt=/(=)\?(?=&|$)|\?\?/;ge.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Jt.pop()||ge.expando+"_"+It++;return this[e]=!0,e}}),ge.ajaxPrefilter("json jsonp",function(e,t,i){var r,a,o,s=e.jsonp!==!1&&(Qt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=ge.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Qt,"$1"+r):e.jsonp!==!1&&(e.url+=(Pt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ge.error(r+" was not called"),o[0]},e.dataTypes[0]="json",a=n[r],n[r]=function(){o=arguments},i.always(function(){void 0===a?ge(n).removeProp(r):n[r]=a,e[r]&&(e.jsonpCallback=t.jsonpCallback,Jt.push(r)),o&&ge.isFunction(a)&&a(o[0]),o=a=void 0}),"script"}),pe.createHTMLDocument=function(){var e=ie.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),ge.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,r,a;return t||(pe.createHTMLDocument?(t=ie.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=ie.location.href,t.head.appendChild(i)):t=ie),r=be.exec(e),a=!n&&[],r?[t.createElement(r[1])]:(r=T([e],t,a),a&&a.length&&ge(a).remove(),ge.merge([],r.childNodes))},ge.fn.load=function(e,t,n){var i,r,a,o=this,s=e.indexOf(" ");return s>-1&&(i=ge.trim(e.slice(s)),e=e.slice(0,s)),ge.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),o.length>0&&ge.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){a=arguments,o.html(i?ge("<div>").append(ge.parseHTML(e)).find(i):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},ge.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ge.fn[t]=function(e){return this.on(t,e)}}),ge.expr.pseudos.animated=function(e){return ge.grep(ge.timers,function(t){return e===t.elem}).length},ge.offset={setOffset:function(e,t,n){var i,r,a,o,s,l,u,d=ge.css(e,"position"),c=ge(e),f={};"static"===d&&(e.style.position="relative"),s=c.offset(),a=ge.css(e,"top"),l=ge.css(e,"left"),u=("absolute"===d||"fixed"===d)&&(a+l).indexOf("auto")>-1,u?(i=c.position(),o=i.top,r=i.left):(o=parseFloat(a)||0,r=parseFloat(l)||0),ge.isFunction(t)&&(t=t.call(e,n,ge.extend({},s))),null!=t.top&&(f.top=t.top-s.top+o),null!=t.left&&(f.left=t.left-s.left+r),"using"in t?t.using.call(e,f):c.css(f)}},ge.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ge.offset.setOffset(this,e,t)});var t,n,i,r,a=this[0];if(a)return a.getClientRects().length?(i=a.getBoundingClientRect(),i.width||i.height?(r=a.ownerDocument,n=te(r),t=r.documentElement,{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===ge.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ge.nodeName(e[0],"html")||(i=e.offset()),i={top:i.top+ge.css(e[0],"borderTopWidth",!0),left:i.left+ge.css(e[0],"borderLeftWidth",!0)}),{top:t.top-i.top-ge.css(n,"marginTop",!0),left:t.left-i.left-ge.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===ge.css(e,"position");)e=e.offsetParent;return e||Ze})}}),ge.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;ge.fn[e]=function(i){return Me(this,function(e,i,r){var a=te(e);return void 0===r?a?a[t]:e[i]:void(a?a.scrollTo(n?a.pageXOffset:r,n?r:a.pageYOffset):e[i]=r)},e,i,arguments.length)}}),ge.each(["top","left"],function(e,t){ge.cssHooks[t]=M(pe.pixelPosition,function(e,n){if(n)return n=N(e,t),lt.test(n)?ge(e).position()[t]+"px":n})}),ge.each({Height:"height",Width:"width"},function(e,t){ge.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){ge.fn[i]=function(r,a){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||a===!0?"margin":"border");return Me(this,function(t,n,r){var a;return ge.isWindow(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===r?ge.css(t,n,s):ge.style(t,n,r,s)},t,o?r:void 0,o)}})}),ge.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,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),ge.parseJSON=JSON.parse,i=[],r=function(){return ge}.apply(t,i),!(void 0!==r&&(e.exports=r));var Kt=n.jQuery,zt=n.$;return ge.noConflict=function(e){return n.$===ge&&(n.$=zt),e&&n.jQuery===ge&&(n.jQuery=Kt),ge},a||(n.jQuery=n.$=ge),ge})},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e)}return i(e,null,[{key:"getInitClassData",value:function(){var e={};return e.classId=this.classId,e.portal=this.portal,e.userRole=this.userRole,e.userName=this.userName,e.userId=this.userId,e}},{key:"getJoinClassData",value:function(){var e={};return e.password=this.password,e.userName=this.userName,e.autoLogin=this.autoLogin,e}},{key:"creatTimestamp",value:function(){var e=(new Date).getTime();return e}},{key:"creatTimestampStr",value:function(){var e=new Date,t=""+e.getFullYear()+"-";return t+=e.getMonth()+1+"-",t+=e.getDate()+"-",t+=e.getHours()+"-",t+=e.getMinutes()+"-",t+=e.getSeconds()}},{key:"timestampToDateTime",value:function(e){var t=parseInt(e),n=0,i=0;t>60&&(n=parseInt(t/60),t=parseInt(t%60),n>60&&(i=parseInt(n/60),n=parseInt(n%60)));var r=""+parseInt(t);return r<10&&(r="0"+parseInt(t)),n>0&&(r=n<10?"0"+parseInt(n)+":"+r:""+parseInt(n)+":"+r),i>0&&(r=i<10?"0"+parseInt(i)+":"+r:""+parseInt(i)+":"+r),r}},{key:"timestampToDateTimeSign",value:function(e){var t=new Date(1e3*e),n=t.getHours(),i=t.getMinutes(),r=t.getSeconds(),a="";return a=(n<10?"0":"")+n,a+=(i<10?":0":":")+i,a+=(r<10?":0":":")+r}},{key:"timestampToDateTimeFull",value:function(e){var t=parseInt(e),n=0,i=0;t>60&&(n=parseInt(t/60),t=parseInt(t%60),n>60&&(i=parseInt(n/60),n=parseInt(n%60)));var r=""+parseInt(t);return r<10&&(r="0"+parseInt(t)),r=n>0?n<10?"0"+parseInt(n)+":"+r:""+parseInt(n)+":"+r:"0"+parseInt(n)+":"+r,r=i>0?i<10?"0"+parseInt(i)+":"+r:""+parseInt(i)+":"+r:"0"+parseInt(i)+":"+r}},{key:"getFitInFull",value:function(e,t,n,i){if(0==e||0==t||0==n||0==i)return void console.warn("getFull->传入的参数值必须大于0",e,t,n,i);var r=n/e,a=i/t,o=n/i;if(r<=1&&a<=1)return{w:parseInt(n),h:parseInt(i)};var s=n,l=i;return r>a?(s=e,l=s/o):(l=t,s=l*o),{w:parseInt(s),h:parseInt(l)}}},{key:"getFitInWidth",value:function(e,t,n,i){if(0==e||0==t||0==n||0==i)return void console.warn("getW->传入的参数值必须大于0",e,t,n,i);var r=n/i,a=e,o=a/r;return{w:parseInt(a),h:parseInt(o)}}},{key:"getFitInHeight",value:function(e,t,n,i){if(0==e||0==t||0==n||0==i)return void console.warn("getH->传入的参数值必须大于0",e,t,n,i);var r=n/i,a=t,o=a*r;return{w:parseInt(o),h:parseInt(a)}}},{key:"getBrowserInfo",value:function(){var e={},t=navigator.userAgent.toLowerCase(),n=/(trident|msie|firefox|chrome|opera|version).*?([\d.]+)/,i=t.match(n);return i||(i=["version/1.0.0","version","1.0.0"]),e.explorer=i[1].replace(/version/,"'safari"),"trident"==e.explorer?(e.explorer="IE11",e.explorerVersion="11.0"):"msie"==e.explorer?(e.explorer="IE",e.explorerVersion=i[2]):e.explorerVersion=i[2],e}}]),e}();r.siteId="",r.classType=1,r.className="",r.classId=0,r.classStatus=0,r.classTimestamp=0,r.recordPlaybackMaxTime=0,r.isRecordPlayBack=!1,r.portal="",r.classStartTime="",r.classStopTime="",r.classBeginTime="",r.classEndTime="",r.userName="",r.userId="0",r.password="",r.nodeId=0,r.userRole="normal",r.autoLogin="",r.rosterList={},r.rosterListUpdata={},r.curRosterHostInfo,r.curUserInfoTeaOrStu,r.curRosterInvisibleNodeId=0,r.USER_HOST="host",r.USER_NOTMAL="normal",r.USER_INVISIBLE="invisible",r.docServer="",r.maxAudioChannels=0,r.maxVideoChannels=0,r.maxMediaChannels=0,r.currentPageNum=1,r.currentDocId=0,r.fps=15,r.gop=3,r.videoQuality=2,r.curVideoQuality=2,r.ssTunnelAppURL="",r.locationProtocol="http://",r.SCENE_DOC=0,r.SCENE_SCREEN_SHARE=1,r.SCENE_MEDIA_SHARE=2,r.SCENE_MUSIC_SHARE=3,r.currentSceneApeName=r.SCENE_DOC,r.isKeypress=!0,r.serverTimeDistance=0,r.localConfig={},r.isDraw,r.isLaser,r.curSeek=1,r.curVideoSeek=1,r.isEnableDraw=!1;var a=r;t.default=a;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"ClassDataProxy","D:/work/PCLive/src/proxy/ClassDataProxy.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/PCLive/src/proxy/ClassDataProxy.js"))})()},function(e,t,n){var i,r,a;(function(e){"use strict";var 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};!function(o,s){"object"==n(t)&&"object"==n(e)?e.exports=s():(r=[],i=s,a="function"==typeof i?i.apply(t,r):i,!(void 0!==a&&(e.exports=a)))}(void 0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(5)},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e),this.MAPS={}}return i(e,[{key:"on",value:function(e,t){if(e&&t){var n=this.MAPS[e];if(!n)return this.MAPS[e]=[t];n.push(t)}}},{key:"off",value:function(e,t){if(e){var n=this.MAPS[e];if(n){if(t)return n.splice(n.indexOf(t),1);n.length=0}}}},{key:"_emit",value:function(e,t){if(e){var n=this.MAPS["*"];n&&n.length&&n.forEach(function(n){n(e,t)});var i=this.MAPS[e];i&&i.length&&i.forEach(function(e){e(t)})}}}]),e}(),a=r;t.default=a,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"Emiter","D:/work/xdySDK/src/Emiter.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/xdySDK/src/Emiter.js"))}()},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){n(this,e),this.sdkInfo=t||"",this.id=this.initId()}return i(e,[{key:"initId",value:function(){if(!this.sdkInfo)return console.log("this.sdkInfo无效-->",this.sdkInfo),"";var e=Object.prototype.toString.call(this.sdkInfo);return"[object String]"===e?this.sdkInfo:"[object Object]"===e?this.sdkInfo.mid||"":""}},{key:"log",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.LOG,n)}},{key:"warn",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.WARN,n)}},{key:"error",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];
this._log(e.ERROR,n)}},{key:"data",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.DATA,n)}},{key:"_log",value:function(t,n){n=JSON.stringify(n);var i=this.id+" -> "+n;if(t>=e.logLevel)switch(t){case e.LOG:console.log(i);break;case e.WARN:console.warn(i);break;case e.ERROR:console.error(i);break;case e.DATA:console.log(i)}}}]),e}();r.LOG=0,r.WARN=1,r.ERROR=2,r.NO=1/0,r.logLevel=r.LOG,r.DATA=5;var a={getLoger:function(e){return new r(e)},setLogLevel:function(e){r.logLevel=e},LOG:r.LOG,WARN:r.WARN,ERROR:r.ERROR,NO:r.NO,DATA:r.DATA};t.default=a,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"Loger","D:/work/xdySDK/src/Loger.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/xdySDK/src/Loger.js"))}()},function(e,t,i){var r,a,o;(function(e){var i="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":n(e)};!function(n,s){"object"==i(t)&&"object"==i(e)?e.exports=s():(a=[],r=s,o="function"==typeof r?r.apply(t,a):r,!(void 0!==o&&(e.exports=o)))}(void 0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(i(e[t])){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),i=e[t[0]];return function(e,t,r){i.apply(this,[e,t,r].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){e.exports=n(38)},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(21),s=i(o),l=function(){function e(t){r(this,e),this.sdkInfo=t||"",this.id=this.initId()}return a(e,[{key:"initId",value:function(){if(!this.sdkInfo)return console.log("this.sdkInfo无效-->",this.sdkInfo),"";var e=Object.prototype.toString.call(this.sdkInfo);return"[object String]"===e?this.sdkInfo:"[object Object]"===e?this.sdkInfo.mid||"":""}},{key:"log",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.LOG,n)}},{key:"warn",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.WARN,n)}},{key:"error",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.ERROR,n)}},{key:"data",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.DATA,n)}},{key:"_log",value:function(t,n){n=JSON.stringify(n);var i=this.id+" -> "+n;switch(t){case e.LOG:e.LogManager.addLog(e.LOG,i),e.IS_DEBUG&&console.log(i);break;case e.WARN:e.LogManager.addLog(e.WARN,i),e.IS_DEBUG&&console.warn(i);break;case e.ERROR:e.LogManager.addLog(e.ERROR,i),e.IS_DEBUG&&console.error(i);break;case e.DATA:e.IS_DEBUG&&console.log(i)}}}]),e}();l.IS_DEBUG=!0,l.LOG=3,l.WARN=2,l.ERROR=1,l.NO=1/0,l.logLevel=0,l.DATA=5,l.LogManager=s.default;var u={getLoger:function(e){return new l(e)},setLogLevel:function(e){l.logLevel=e},setLogDebug:function(e){l.IS_DEBUG=e},LOG:l.LOG,WARN:l.WARN,ERROR:l.ERROR,NO:l.NO,DATA:l.DATA,IS_DEBUG:l.IS_DEBUG,LogManager:s.default};t.default=u,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(l,"Loger","D:/work/McuClient/src/Loger.js"),__REACT_HOT_LOADER__.register(u,"default","D:/work/McuClient/src/Loger.js"))}()},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(1),s=i(o),l=n(3),u=i(l),d=n(5),c=i(d),f=s.default.getLoger("GlobalConfig"),h=function(){function e(){r(this,e),this._currentStatus=null}return a(e,null,[{key:"getCurrentStatus",value:function(){return null==this._currentStatus&&(this._currentStatus=this.statusCode_0),this._currentStatus}},{key:"setCurrentStatus",value:function(e){this._currentStatus=e}},{key:"getClassDetail",value:function(){return this.classDetail}},{key:"setClassDetail",value:function(e){this.classDetail=e}},{key:"getClassInfo",value:function(){var e={};return e.siteId=this.siteId,e.classId=this.classId,e.className=this.className,e.h5Module=this.h5Module,e.nodeId=this.nodeId,e.topNodeID=this.topNodeID,e.userRole=this.userRole,e.role=this.role,e.isHost=this.isHost,e.userId=this.userId,e.userName=this.userName,e.password=this.password,e.userType=this.userType,e.passwordRequired=this.passwordRequired,e.md5=this.md5,e.msType=this.msType,e.portal=this.portal,e.mcuDelay=this.mcuDelay,e.MCUServerIP=this.MCUServerIP,e.MCUServerPort=this.MCUServerPort,e.maxVideoChannels=this.maxVideoChannels,e.maxAudioChannels=this.maxAudioChannels,e.maxMediaChannels=this.maxMediaChannels,e.fps=this.fps,e.gop=this.gop,e.videoQuality=this.videoQuality,e.ssTunnelAppURL=this.ssTunnelAppURL,e.currentSceneTableId=this.currentSceneTableId,e.serverAndLoacTimeDistanc=this.serverAndLoacTimeDistanc,e}},{key:"setClassStatusInfo",value:function(e){if(f.log("setClassStatusInfo"),null==e)return void f.warn("classStatusInfo error,_data:",e);var t=e;this.siteId||(this.siteId=t.siteId),this.classId||(this.classId=t.classId),this.className||(this.className=t.className),this.classType||(this.classType=t.classType),this.classBeginTime||(this.classBeginTime=t.classBeginTime),this.classEndTime||(this.classEndTime=t.classEndTime),this.classStatus=t.classStatus||this.classStatus,this.classStartTime=t.classStartTime||this.classStartTime,this.classStopTime=t.classStopTime||this.classStopTime,this.classTimestamp=t.classTimestamp||this.classTimestamp,this.recordStatus=t.recordStatus||this.recordStatus,this.recordTimestamp=t.recordTimestamp||this.recordTimestamp,this.recordFileName=t.recordFileName||this.recordFileName,this.recordDownloadUrl=t.recordDownloadUrl||this.recordDownloadUrl,this.currentSceneTableId=t.currentSceneTableId||0,this.isEnableDraw=t.isEnableDraw||!1,this.silence=t.silence||!1,this.silenceUsers=t.silenceUsers||{},"string"==typeof this.silenceUsers&&this.silenceUsers.constructor==String&&(this.silenceUsers={})}},{key:"setDocListPrepare",value:function(e){null!=e&&(this.docListPrepare=e)}},{key:"getDocListPrepare",value:function(){return this.docListPrepare}},{key:"setMediaShareList",value:function(e){null!=e&&(this.sharedMediaList=e)}},{key:"getMediaShareList",value:function(){return this.sharedMediaList}},{key:"setMusicShareList",value:function(e){null!=e&&(this.sharedMusicList=e)}},{key:"getMusicShareList",value:function(){return this.sharedMusicList}},{key:"setRecordList",value:function(e){null!=e&&(this.recordList=e)}},{key:"getRecordList",value:function(){return this.recordList}},{key:"setDocList",value:function(e){null!=e&&(this.docList=e)}},{key:"getDocList",value:function(){return this.docList}},{key:"setMsList",value:function(e){null!=e&&(this.msList=e)}},{key:"getMsList",value:function(){return this.msList}},{key:"setRtmpPullList",value:function(e){null!=e&&(this.rtmpPullList=e)}},{key:"getRtmpPullList",value:function(){return this.rtmpPullList}},{key:"setHlsPullList",value:function(e){null!=e&&(this.hlsPullList=e)}},{key:"getHlsPullList",value:function(){return this.hlsPullList}},{key:"setRsList",value:function(e){null!=e&&(this.rsList=e)}},{key:"getRsList",value:function(){return this.rsList}},{key:"setMcuList",value:function(e){null!=e&&(this.mcuList=e)}},{key:"getMcuList",value:function(){return this.mcuList}},{key:"setMusicList",value:function(e){null!=e&&(this.musicList=e)}},{key:"getMusicList",value:function(){return this.musicList}},{key:"setMusicListPrepare",value:function(e){null!=e&&(this.musicListPrepare=e)}},{key:"getMusicListPrepare",value:function(){return this.musicListPrepare}},{key:"setVideoCDNAddr",value:function(e){null!=e&&(this.videoCDNAddr=e||"",this.videoCDNAddr&&(this.videoCDNAddrList=this.videoCDNAddr.split(";")),f.log("videoCDNAddrList->",this.videoCDNAddrList))}},{key:"replacePort",value:function(e,t,n){if(f.warn("替换端口->",e,t,n),!e||!t)return e;try{var i=e.lastIndexOf(t);if(e.length-t.length==i){var r=e.replace(t,n);return r}return e}catch(t){return e}}},{key:"classStatusInfo",get:function(){var e={};return e.siteId=this.siteId,e.classId=this.classId,e.className=this.className,e.classType=this.classType,e.classStatus=this.classStatus,e.classStartTime=this.classStartTime,e.classStopTime=this.classStopTime,e.classTimestamp=this.classTimestamp,e.recordPlaybackMaxTime=this.recordPlaybackMaxTime,e.classBeginTime=this.classBeginTime,e.classEndTime=this.classEndTime,e.isEnableDraw=this.isEnableDraw,e.recordStatus=this.recordStatus,e.silence=this.silence,e.silenceUsers=this.silenceUsers,e.selfSilence=this.selfSilence,e.recordTimestamp=this.recordTimestamp,e.recordFileName=this.recordFileName,e.recordDownloadUrl=this.recordDownloadUrl,e.serverTimestamp=this.serverTimestamp,e.activeDocId=this.activeDocId,e.activeDocCurPage=this.activeDocCurPage,e.currentSceneTableId=this.currentSceneTableId,e.serverAndLoacTimeDistanc=this.serverAndLoacTimeDistanc,e}},{key:"isHost",get:function(){return this.userRole==u.default.host}},{key:"isAssistant",get:function(){return this.userRole==u.default.assistant}},{key:"isPresenter",get:function(){return this.userRole==u.default.presenter}},{key:"isNormal",get:function(){return this.userRole==u.default.normal}},{key:"isInvisible",get:function(){return this.userRole==u.default.invisible}},{key:"serverTimestamp",get:function(){return c.default.creatTimestamp()}}]),e}();h.statusCode_0={code:0,message:"SDK 未初始化"},h.statusCode_1={code:1,message:"未加入课堂"},h.statusCode_2={code:2,message:"已经加入课堂"},h.statusCode_3={code:3,message:"已经离开课堂"},h.statusCode_4={code:4,message:"未知状态"},h.screenWidth=1024,h.screenHeight=768,h.md5="",h.msType=1,h.messageDelay=!1,h.mcuDelay=0,h.docDelay=1600,h.portal="",h.country="",h.city="",h.province="",h.isp="",h.sharedMediaList=[],h.sharedMusicList=[],h.docListPrepare=[],h.recordList=[],h.docList=[],h.musicList=[],h.musicListPrepare=[],h.videoCDNAddr="",h.videoCDNAddrList=[],h.mcuList=[],h.msList=[],h.rtmpPullList=[],h.hlsPullList=[],h.rsList=[],h.mcuListFromSass=[],h.msListFromSass=[],h.rtmpPullListFromSass=[],h.hlsPullListFromSass=[],h.rsListFromSass=[],h.mcuListFromServer=[],h.msListFromServer=[],h.rtmpPullListFromServer=[],h.hlsPullListFromServer=[],h.rsPullListFromServer=[],h.mcuListFinal=[],h.msListFinal=[],h.rtmpPullListFinal=[],h.hlsPullListFinal=[],h.rsPullListFinal=[],h.MCUServerIP="",h.MCUServerPort="",h.MS_PUBLISH_IP="",h.MS_PUBLISH_PORT="",h.MS_PLAY_RTMP_IP="",h.MS_PLAY_RTMP_PORT="",h.MS_PLAY_HLS_IP="",h.MS_PLAY_HLS_PORT="",h.RS_RECORD_PLAY_IP="",h.RS_RECORD_PLAY_PORT="",h.DOCServerIP="",h.DOCServerPort="",h.RecordServerIP="",h.RecordServerPort="",h.maxVideoChannels=0,h.maxAudioChannels=0,h.maxMediaChannels=0,h.hasCamera=!1,h.hasMicrophone=!1,h.returnCitySN=null,h.deviceType=0,h.userIp="",h.userId=0,h.userName="",h.handUpTime=0,h.level=0,h.openCamera=0,h.openMicrophones=0,h.fps=15,h.gop=3,h.videoQuality=1,h.curVideoQuality=1,h.cameras=[],h.microphones=[],h.curCamera="",h.curMicrophone="",h.micGain=70,h.micNoise=70,h.autoGain=!1,h.speakerVolume=80,h.micCode=0,h.optionJsonData="",h.audioRecords=[],h.videoRecords=[],h.status=0,h.mobileDirection=0,h.nodeId=0,h.passwordRequired=!1,h.password="",h.userType=8,h.userRole=u.default.normal,h.role=u.default.NR_NORMAL,h.h5Module=1,h.topNodeID=101,h.siteId="",h.className="",h.classId=0,h.classType=u.default.CLASS_TYPE_1,h.classStatus=u.default.CLASS_STATUS_WAIT,h.classStartTime="",h.classStopTime="",h.classBeginTime="",h.classEndTime="",h.classTimestamp=0,h.classJoinSuccess=!1,h.recordPlaybackMaxTime=0,h.recordStatus=!1,h.isEnableDraw=!1,h.silence=!1,h.silenceUsers={},h.selfSilence={},h.recordTimestamp=0,h.recordFileName="",h.recordDownloadUrl="",h.recordReplaytickValues={},h.isAutoStartClass=0,h.updateClassInfoDelay=30,h.msDynamicChooseIpDelay=180,h.activeDocId=0,h.activeDocCurPage=1,h.activeMediaId=0,h.activeMediaSeek=1,h.currentSceneTableId=0,h.classAllParam={},h.classDetail={},h.isRecordPlayBack=!1,h.allowRecordMaxTime=86400,h.siteId_letv="shchuanbao",h.ssTunnelAppURL="",h.serverTime=0,h.serverAndLoacTimeDistanc=0,h.logUrl="",h.rosterNumber=0,h.isMobile=!1,h.language="",h.platform="pc",h.explorer="未知",h.explorerVersion="未知",h.os="未知",h.locationProtocol="http://",h.websocketProtocol="ws://",h.isHttps=!1;var p=h;t.default=p,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(f,"loger","D:/work/McuClient/src/GlobalConfig.js"),__REACT_HOT_LOADER__.register(h,"GlobalConfig","D:/work/McuClient/src/GlobalConfig.js"),__REACT_HOT_LOADER__.register(p,"default","D:/work/McuClient/src/GlobalConfig.js"))}()},function(e,t){function n(e){for(var t in n)if(n[t]===e)return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.CLASS_STATUS_WAIT=0,n.CLASS_STATUS_STARTED=1,n.CLASS_STATUS_PAUSE=2,n.CLASS_STATUS_CLOSE=3,n.CLASS_STATUS_UPTATE=4,n.CLASS_WAIT_START="class.wait.start",n.CLASS_STARTING="class.started",n.CLASS_PAUSING="class.pause",n.CLASS_PAUSING="class.closed",n.CLASS_PAUSING="class.update",n.CLASS_ACTION_CLOSE_ALL=1,n.CLASS_ACTION_HANDUP_STATUS_CHANGE=2,n.USER_ACTION_SILENCE_STATUS_CHANGE=3,n.CLASS_ACTION_KICK_OUT_ROSTER=4,n.CLASS_TYPE_1=1,n.CLASS_TYPE_2=2,n.CLASS_TYPE_3=3,n.NR_NORMAL=1,n.NR_ADMIN=2,n.NR_HOST=4,n.NR_PRESENTER=8,n.NR_ASSISTANT=16,n.NR_INVISIBLE=32,n.host="host",n.presenter="presenter",n.assistant="assistant",n.normal="normal",n.record="record",n.invisible="invisible",n.userTypes={},n.userTypes[n.NR_NORMAL]=n.normal,n.userTypes[n.NR_ADMIN]=n.record,n.userTypes[n.NR_HOST]=n.host,n.userTypes[n.NR_PRESENTER]=n.presenter,n.userTypes[n.NR_ASSISTANT]=n.assistant,n.userTypes[n.NR_INVISIBLE]=n.invisible,n.userTypesToId={},n.userTypesToId[n.normal]=n.NR_NORMAL,n.userTypesToId[n.record]=n.NR_ADMIN,n.userTypesToId[n.host]=n.NR_HOST,n.userTypesToId[n.presenter]=n.NR_PRESENTER,n.userTypesToId[n.assistant]=n.NR_ASSISTANT,n.userTypesToId[n.invisible]=n.NR_INVISIBLE,n.MS_TYPE_DEFAULT=0,n.MS_TYPE_FMS=1,n.USER_HAND_UP=32,n.USER_MIC_OPEN=64,n.USER_CAMERA_OPEN=128,n.MEDIA_ACTION_DEFAULT=0,n.MEDIA_ACTION_OPEN_CAMERA=1,n.MEDIA_ACTION_CLOSE_CAMERA=2,n.MEDIA_ACTION_OPEN_MIC=21,n.MEDIA_ACTION_CLOSE_MIC=22,n.MEDIA_ACTION_SETING=31,n.CHANNEL_STATUS_RELEASED=0,n.CHANNEL_STATUS_OPENING=1,n.MEDIA_TYPE_DEFAULT=0,n.MEDIA_TYPE_VIDEO=1,n.MEDIA_TYPE_AUDIO=2,n.MEDIA_TYPE_SHARE=3,n.RETURN_SUCCESS=0,n.RETURN_FAILED=1,n.INVALIDATE_CHANNEL_ID=-1,n.INVALIDATE_NODE_ID=-1,n.DOC_ACTION_NORMAL=0,n.DOC_ACTION_SWITCH_DOC=1,n.DOC_ACTION_SWITCH_PAGE=2,n.DOC_ACTION_COMMAND=3,n.DOC_ACTION_SWITCH_ANIMATION=4,n.CONFERENCE_SESSION_ID=11,n.CHAT_SESSION_ID=12,n.GIFT_SESSION_ID=13,n.AUDIO_SESSION_ID=14,n.VIDEO_SESSION_ID=15,n.WEBSHARING_SESSION_ID=16,n.DOCSHARING_SESSION_ID=17,n.WHITEBOARD_SESSION_ID=18,n.MEDIA_SESSION_ID=19,n.SCREENSHARING_SESSION_ID=20,n.POLL_SESSION_ID=21,n.QUESTION_SESSION_ID=22,n.CURSOR_SESSION_ID=23,n.MUSIC_SESSION_ID=24,n.BROADCAST_CHANNEL_ID=0,n.CONFERENCE_CHANNEL_ID=n.CONFERENCE_SESSION_ID,n.CHAT_CHANNEL_ID=n.CHAT_SESSION_ID,n.GIFT_CHANNEL_ID=n.GIFT_SESSION_ID,n.WEBSHARING_CHANNEL_ID=n.WEBSHARING_SESSION_ID,n.DOCSHARING_CHANNEL_ID=n.DOCSHARING_SESSION_ID,n.WHITEBOARD_CHANNEL_ID=n.WHITEBOARD_SESSION_ID,n.CURSOR_CHANNEL_ID=n.CURSOR_SESSION_ID,n.MEDIA_CHANNEL_ID=n.MEDIA_SESSION_ID,n.MUSIC_CHANNEL_ID=n.MUSIC_SESSION_ID,n.SCREENSHARING_CHANNEL_ID=n.SCREENSHARING_SESSION_ID,n.QUESTION_CHANNEL_ID=n.QUESTION_SESSION_ID,n.CONFERENCE_SESSION_NAME="conference app",n.CHAT_SESSION_NAME="chat app",n.GIFT_SESSION_NAME="gift app",n.AUDIO_SESSION_NAME="audio app",n.VIDEO_SESSION_NAME="video app",n.WEBSHARING_SESSION_NAME="web sharing app",n.DOCSHARING_SESSION_NAME="doc sharing app",n.WHITEBOARD_SESSION_NAME="whiteboard app",n.CURSOR_SESSION_NAME="cursor app",n.MEDIA_SESSION_NAME="media sharing app",n.MUSIC_SESSION_NAME="music sharing app",n.SCREENSHARING_SESSION_NAME="screen sharing app",n.QUESTION_SESSION_NAME="question app",n.CONFERENCE_SESSION_TAG="con-tag",n.CHAT_SESSION_TAG="cha-tag",n.GIFT_SESSION_TAG="gif-tag",n.AUDIO_SESSION_TAG="aud-tag",n.VIDEO_SESSION_TAG="vid-tag",n.WEBSHARING_SESSION_TAG="web-tag",n.DOCSHARING_SESSION_TAG="doc-tag",n.WHITEBOARD_SESSION_TAG="wbd-tag",n.CURSOR_SESSION_TAG="cursor-tag",n.MEDIA_SESSION_TAG="med-tag",n.MUSIC_SESSION_TAG="mis-tag",n.SCREENSHARING_SESSION_TAG="scr-tag",n.QUESTION_SESSION_TAG="qst-tag",n.CONFERENCE_OBJ_ROSTER_ID=(n.CONFERENCE_SESSION_ID<<16)+1,n.CONFERENCE_OBJ_ROSTER_NAME="node list",n.CONFERENCE_OBJ_ROSTER_TAG="node list tag",n.CONFERENCE_OBJ_QUEUE_ID=(n.CONFERENCE_SESSION_ID<<16)+2,n.CONFERENCE_OBJ_QUEUE_NAME="mic list",n.CONFERENCE_OBJ_QUEUE_TAG="mic list tag",n.CONFERENCE_OBJ_TABLE_ID=(n.CONFERENCE_SESSION_ID<<16)+3,n.CONFERENCE_OBJ_TABLE_NAME="tabbar list",n.CONFERENCE_OBJ_TABLE_TAG="tabbar list tag",n.CONFERENCE_OBJ_COUNTER_ID=(n.CONFERENCE_SESSION_ID<<16)+4,n.CONFERENCE_OBJ_COUNTER_NAME="id list",n.CONFERENCE_OBJ_COUNTER_TAG="id list tag",n.CONFERENCE_OBJ_QUESTION_ID=(n.QUESTION_SESSION_ID<<16)+1,n.CONFERENCE_OBJ_QUESTION_NAME="question list",n.CONFERENCE_OBJ_QUESTION_TAG="question list tag",n.WEBSHARING_OBJ_TABLE_ID=(n.WEBSHARING_SESSION_ID<<16)+1,n.WEBSHARING_OBJ_TABLE_NAME="web list",n.WEBSHARING_OBJ_TABLE_TAG="web list tag",n.DOCSHARING_OBJ_TABLE_ID=(n.DOCSHARING_SESSION_ID<<16)+1,n.DOCSHARING_OBJ_TABLE_NAME="doc list",n.DOCSHARING_OBJ_TABLE_TAG="doc list tag",n.DOCSHARING_OBJ_TABLE_ID_H5=(n.DOCSHARING_SESSION_ID<<16)+2,n.DOCSHARING_OBJ_TABLE_NAME_H5="doc list h5",n.DOCSHARING_OBJ_TABLE_TAG_H5="doc list tag h5",n.WHITEBOARD_OBJ_TABLE_ID=(n.WHITEBOARD_SESSION_ID<<16)+1,n.WHITEBOARD_OBJ_TABLE_NAME="wbd list",n.WHITEBOARD_OBJ_TABLE_TAG="wbd list tag",n.CURSOR_OBJ_TABLE_ID=(n.CURSOR_SESSION_ID<<16)+1,n.CURSOR_OBJ_TABLE_NAME="cursor list",n.CURSOR_OBJ_TABLE_TAG="cursor list tag",n.MEDIA_OBJ_TABLE_ID=(n.MEDIA_SESSION_ID<<16)+1,n.MEDIA_OBJ_TABLE_NAME="med list",n.MEDIA_OBJ_TABLE_TAG="med list tag",n.MUSIC_OBJ_TABLE_ID=(n.MUSIC_SESSION_ID<<16)+1,n.MUSIC_OBJ_TABLE_NAME="mis list",n.MUSIC_OBJ_TABLE_TAG="mis list tag",n.CHAT_OBJ_TABLE_ID=(n.CHAT_SESSION_ID<<16)+1,n.CHAT_OBJ_TABLE_NAME="chat list",n.CHAT_OBJ_TABLE_TAG="chat list tag",n.AUDIO_OBJ_TABLE_ID=(n.AUDIO_SESSION_ID<<16)+1,n.AUDIO_OBJ_TABLE_NAME="audio channel list",n.AUDIO_OBJ_TABLE_TAG="audio channel list tag",n.VIDEO_OBJ_TABLE_ID=(n.VIDEO_SESSION_ID<<16)+1,n.VIDEO_OBJ_TABLE_NAME="video channel list",n.VIDEO_OBJ_TABLE_TAG="video channel list tag",n.SCREENSHARING_OBJ_TABLE_ID=(n.SCREENSHARING_SESSION_ID<<16)+1,n.SCREEN_OBJ_TABLE_NAME="scr list",n.SCREEN_OBJ_TABLE_TAG="scr list tag",n.POLL_OBJ_TABLE_ID=(n.POLL_SESSION_ID<<16)+1,n.VOTE_OBJ_TABLE_ID=(n.POLL_SESSION_ID<<16)+2,n.RECORD_OBJ_TABLE_ID=(n.POLL_SESSION_ID<<16)+3,n.SHAMLIVE_OBJ_TABLE_ID=(n.POLL_SESSION_ID<<16)+4,n.POLL_OBJ_TABLE_NAME="poll list",n.POLL_OBJ_TABLE_TAG="poll list tag",n.REG_TABLE_INSERT_TAIL=16777215,n.REG_TABLE_DELETE_ALL=16777215,n.CJS_RELEASED=0,n.CJS_JOINNING=1,n.CJS_JOINNED=2,n.WBA_CLOSE=1,n.WBA_CHANGE=2,n.WBA_OPEN=3,n.WBA_DOC_ANNOTATION=4,n.WBA_LASER_PEN=5,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"ApeConsts","D:/work/McuClient/src/apes/ApeConsts.js")}()},function(e,t){function n(){}Object.defineProperty(t,"__esModule",{value:!0}),n.CLASS_INIT_SUCCESS="class_init_success",n.CURSOR_UPDATE="cursor_update",n.CLASS_JOIN_MCU_SUCCESS="class_join_mcu_success",n.CLASS_GET_INFO_SUCCESS="class_get_info_success",n.CLASS_JOIN_SUCCESS="class_join_success",n.CLASS_UPDATE_ROSTER_NUM="class_update_roster_num",n.CLASS_INSERT_ROSTER="class_insert_roster",n.CLASS_UPDATE_ROSTER="class_update_roster",n.CLASS_DELETE_ROSTER="class_delete_roster",n.CLASS_NONENTITY_ROSTER="class_nonenetity_roster",n.CLASS_RUN_EXIT="class_run_exit",n.CLASS_EXIT="class_exit",n.CLASS_UPTATE_STATUS="class_update_status",n.CLASS_STATUS_INFO_CHANGE="class_status_info_change",n.CLASS_SILENCE_CHANGE="class_silence_change",n.CLASS_UPDATE_TIMER="class_update_timer",n.CLASS_RECORD_STOP="class_record_stop",n.CLASS_RECORD_START="class_record_start",n.CLASS_RECORD_SUCCESS="class_record_success",n.RECEIVE_THIRD_MESSGAE="receive_third_message",n.CHAT_RECEIVE="chat_receive_message",n.STOP_ALL_MEDIA_PUBLISH="stop_all_media_publish",n.MEDIA_STOP_PUBLISH="media_stop_publish",n.USER_DEVICE_STATUS_CHAANGE="user_device_status_change",n.VIDEO_PLAY="video_play",n.VIDEO_STOP="video_stop",n.VIDEO_UPDATE="video_update",n.VIDEO_BROADCAST="video_broadcast",n.VIDEO_GET_PUBLISH_PATH="video_get_publish_path",n.VIDEO_PUBLISH_RESULT="video_publish_result",n.AUDIO_PLAY="audio_play",n.AUDIO_STOP="audio_stop",n.AUDIO_UPDATE="audio_update",n.AUDIO_BROADCAST="audio_broadcast",n.AUDIO_GET_PUBLISH_PATH="audio_get_publish_path",n.AUDIO_PUBLISH_RESULT="audio_publish_result",n.SCREEN_SHARE_PLAY="screen_share_play",n.SCREEN_SHARE_STOP="screen_share_stop",n.SCREEN_SHARE_UPDATE="screen_share_update",n.SCREEN_SHARE_BROADCAST="screen_share_broadcast",n.SCREEN_SHARE_GET_PUBLISH_PATH="screen_share_get_publish_path",n.SCREEN_SHARE_PUBLISH_RESULT="screen_share_publish_result",n.PUBLISH_SCREEN_SHARE_SUCCESS="publish_screen_share_success",n.PUBLISH_SCREEN_SHARE_FAILE="publish_screen_share_faile",n.PUBLISH_SCREEN_SHARE_CLOSE="publish_screen_share_close",n.PUBLISH_SCREEN_SHARE_DISCONNECT="publish_screen_share_disconnect",n.PUBLISH_SCREEN_SHARE_CONNECTED="publish_screen_share_connected",n.PUBLISH_SCREEN_MOVIE_INFO_CHANGE="publish_screen_movie_info_change",n.PUBLISH_SCREEN_VIDEO_INFO_CHANGE="publish_screen_video_info_change",n.DOC_DELETE="document_delete",n.DOC_UPDATE="document_update",n.DOC_BROADCAST="doc_broadcast",n.MEDIA_SHARED_DELETE="media_shared_delete",n.MEDIA_SHARED_UPDATE="media_shared_update",n.MUSIC_SHARED_DELETE="music_shared_delete",n.MUSIC_SHARED_UPDATE="music_shared_update",n.START_ANSWER_QUESTION="start_answer_question",n.UPDATE_ANSWER_QUESTION="update_answer_question",n.STOP_ANSWER_QUESTION="stop_answer_question",n.UPDATE_QUESTION_TIME="update_question_time",n.WHITEBOARD_ANNOTATION_UPDATE="whiteboard_annotation_update",n.SWITCH_MCU_IP="switch_mcu_ip",n.SWITCH_MS_IP="switch_ms_ip",n.SWITCH_RTMP_PULL_IP="switch_rtmp_pull_ip",n.SWITCH_HLS_IP="switch_hls_ip",n.RECORD_PLAYBACK_UPDATE="record_playback_update",n.MCU_ERROR="mcu_error",n.ERROR_EVENT="error_event",n.ERR_CLASS_INIT_PARAM=100,n.ERR_CLASS_INIT_NETWORK=101,n.ERR_CLASS_INIT_PROTOCOL=102,n.ERR_CLASS_INIT_FAILED=103,n.ERR_CLASS_INIT_FAILED_1=104,n.ERR_CLASS_INIT_FAILED_2=105,n.ERR_CLASS_INIT_FAILED_3=106,n.ERR_CLASS_INIT_FAILED_4=107,n.ERR_CLASS_JOIN_NETWORK=200,n.ERR_CLASS_JOIN_PROTOCOL=201,n.ERR_CLASS_JOIN_FAILED=202,n.ERR_CLASS_JOIN_PARAM=203,n.ERR_CLASS_JOIN_FULL=204,n.ERR_CLASS_MD5_WRONG=205,n.ERR_CLASS_PASSWORD_WRONG=206,n.ERR_CLASS_JOIN_CONFILICT=207,n.ERR_CLASS_KICK_OUT=208,n.ERR_CLASS_REMOTE_LANDING=209,n.ERR_GET_CLASS_DETAIL=300,n.ERR_GET_CLASS_PARAML=301,n.ERR_APE_SEND_FAILED_NO_JOIN=500,n.ERR_APE_INTERFACE_PARAM_WRONG=501,n.ERR_DOC_DELETE_FAILED=600,n.ERR_DOC_DELETE_FAILED_PARAM=601,n.ERR_MEDIASHARE_DELETE_FAILED=620,n.ERR_MEDIASHARE_DELETE_FAILED_PARAM=621,n.ERR_SDK_FAILED=700,n.ERR_INTERFACE_NONE=701,n.ERR_INTERFACE_PARAMS_ERROR=702,n.ERR_MUSICSHARE_DELETE_FAILED=720,n.ERR_MUSICSHARE_DELETE_FAILED_PARAM=721,n.ERR_INIT_RECORD_PLAY_BACK_FAILED=910,n.ERR_GET_RECORD_PLAY_BACK_DATA_FAILED=911,n.ERR_NETWORK=1e4,n.ERR_UNKNOWN=10001,n.ERR_SOCKET_DISCONNECT=2e4,n.ERR_SOCKET_RECONNECT_FAILED=20001,n.ErrorReson={},n.ErrorReson[n.ERR_CLASS_INIT_PARAM]="初始化参数错误",n.ErrorReson[n.ERR_CLASS_INIT_NETWORK]="初始化网络错误",n.ErrorReson[n.ERR_CLASS_INIT_PROTOCOL]="初始化协议错误",n.ErrorReson[n.ERR_CLASS_INIT_FAILED]="初始化验证失败",n.ErrorReson[n.ERR_CLASS_INIT_FAILED_1]="初始化验证失败,课堂号必填",n.ErrorReson[n.ERR_CLASS_INIT_FAILED_2]="初始化验证失败,无效的课堂号",n.ErrorReson[n.ERR_CLASS_INIT_FAILED_3]="初始化验证失败,没有对应的站点",n.ErrorReson[n.ERR_CLASS_INIT_FAILED_4]="初始化验证失败,站点已过期",n.ErrorReson[n.ERR_CLASS_JOIN_NETWORK]="加入课堂网络错误",n.ErrorReson[n.ERR_CLASS_JOIN_PROTOCOL]="加入课堂化协议错误",n.ErrorReson[n.ERR_CLASS_JOIN_FAILED]="加入课堂化异常错误",n.ErrorReson[n.ERR_CLASS_JOIN_PARAM]="加入课堂参数错误",n.ErrorReson[n.ERR_CLASS_JOIN_FULL]="人数已满",n.ErrorReson[n.ERR_CLASS_MD5_WRONG]="MD5验证失败",n.ErrorReson[n.ERR_CLASS_PASSWORD_WRONG]="密码错误",n.ErrorReson[n.ERR_CLASS_JOIN_CONFILICT]="已经在其它地方登陆",n.ErrorReson[n.ERR_CLASS_KICK_OUT]="有相同身份的人员加入课堂,自己被踢出课堂",n.ErrorReson[n.ERR_CLASS_REMOTE_LANDING]="有相同的userId异地登陆",n.ErrorReson[n.ERR_GET_CLASS_DETAIL]="获取课堂基本信息失败",n.ErrorReson[n.ERR_GET_CLASS_PARAML]="获取课堂详细信息失败",n.ErrorReson[n.ERR_APE_SEND_FAILED_NO_JOIN]="APE在sdk为初始化或未加入课堂之前调用发送数据接口",n.ErrorReson[n.ERR_APE_INTERFACE_PARAM_WRONG]="APE在接口调用时参数错误",n.ErrorReson[n.ERR_DOC_DELETE_FAILED]="删除文档失败",n.ErrorReson[n.ERR_DOC_DELETE_FAILED_PARAM]="删除文档失败,参数错误",n.ErrorReson[n.ERR_MEDIASHARE_DELETE_FAILED]="删除媒体共享文件失败",n.ErrorReson[n.ERR_MEDIASHARE_DELETE_FAILED_PARAM]="删除媒体共享文件,参数错误",n.ErrorReson[n.ERR_SDK_FAILED]="sdk还没初始化",n.ErrorReson[n.ERR_INTERFACE_NONE]="调用的接口不存在",n.ErrorReson[n.ERR_INTERFACE_PARAMS_ERROR]="调用的接口,传递的参数不正确",n.ErrorReson[n.ERR_INIT_RECORD_PLAY_BACK_FAILED]="初始化录制回放失败",n.ErrorReson[n.ERR_GET_RECORD_PLAY_BACK_DATA_FAILED]="获取录制回放数据失败",n.ErrorReson[n.ERR_NETWORK]="网络错误",n.ErrorReson[n.ERR_UNKNOWN]="未知错误",n.ErrorReson[n.ERR_SOCKET_DISCONNECT]="MCU断开连接,已经离开课堂",n.ErrorReson[n.ERR_SOCKET_RECONNECT_FAILED]="MCU自动重连失败,已经达到最大重连次数";var i=n;t.default=i,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"MessageTypes","D:/work/McuClient/src/MessageTypes.js"),__REACT_HOT_LOADER__.register(i,"default","D:/work/McuClient/src/MessageTypes.js"))}()},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(14),s=i(o),l=n(10),u=i(l),d=function(){function e(){r(this,e)}return a(e,null,[{key:"isEmptyObject",value:function(e){for(var t in e)return!1;return!0}},{key:"arrayToJsonString",value:function(e){try{return JSON.stringify(e)}catch(e){console.warn("数组转JSON失败->ERROR:"+e.message)}return""}},{key:"arrayFromJsonString",value:function(e){try{return JSON.parse(e)}catch(e){console.warn("JSON转数组失败->ERROR:"+e.message)}return[]}},{key:"creatSoleNumberFromTimestamp",value:function(){var e=(new Date).getTime(),t=e%1e9;return t}},{key:"creatTimestamp",value:function(){var e=parseInt((new Date).getTime()/1e3);return e}},{key:"creatTimestampStr",value:function(){var e=new Date,t=""+e.getFullYear()+"-";return t+=e.getMonth()+1+"-",t+=e.getDate()+"-",t+=e.getHours()+"-",t+=e.getMinutes()+"-",t+=e.getSeconds()}},{key:"creatTimestampYMD",value:function(){var e=new Date,t=""+e.getFullYear(),n=""+(e.getMonth()+1),i=""+e.getDate();return n.length<2&&(n="0"+n),i.length<2&&(i="0"+i),t+n+i}},{key:"objectToBase64",value:function(e){try{var t=JSON.stringify(e),n=u.default.setBytesFromString(t),i=s.default.fromByteArray(n);return i}catch(e){return console.log("objectToBase64 err:"+e.message),""}return""}},{key:"objectFromBase64",value:function(e){try{var t=s.default.toByteArray(e),n=u.default.getStringFromBytes(t),i=JSON.parse(n);return i}catch(e){return console.log("objectFromBase64 err:"+e.message),null}return null}},{key:"compressPoint",value:function(e){if(!e)return[];if(e.length<5)return e;var t=e,n=[];n.push(t[0]);for(var i=t[0].w,r=0,a=t.length-1,o=1;o<a;o++){var s=t[o];s&&s.w!=i?(i=s.w,r>0&&n.push(t[o-1]),n.push(s),r=0):r++}if(t[a]&&n.push(t[a]),n.length<=2)return n;var l=[];l.push(n[0]);var u=n[0].h;r=0,a=n.length-1;for(var d=1;d<a;d++){var c=n[d];c&&c.h!=u?(u=c.h,r>0&&l.push(n[d-1]),l.push(c),r=0):r++}return n[a]&&l.push(n[a]),l}},{key:"optimizePoint",value:function(e){if(!e)return"";var t="";try{t=JSON.stringify(e)}catch(e){return""}var n=/},{"w":/g,i=/,"h":/g;return t=t.replace(n,"#"),t=t.replace(i,"&")}},{key:"unPackOptimizePoint",value:function(e){if(!e)return"";var t=e,n=/#/g,i=/&/g;t=t.replace(n,'},{"w":'),t=t.replace(i,',"h":');var r=[];try{r=JSON.parse(t)}catch(e){}return r}}]),e}(),c=d;t.default=c,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(d,"EngineUtils","D:/work/McuClient/src/EngineUtils.js"),__REACT_HOT_LOADER__.register(c,"default","D:/work/McuClient/src/EngineUtils.js"))}()},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n,i,r,a,o,s,l,u,d){var c=new _.RCSendDataPdu;return c.set("type",e),c.set("subType",t),c.set("initiator",n),c.set("confId",i),c.set("sessionId",r),c.set("channelId",a),c.set("upward",o),c.set("reliability",s),c.set("priority",l),c.set("peer",u),c.set("seg",d),c}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o=n(60),s=i(o),l=n(53),u=i(l),d=n(18),c=i(d),f=n(12),h=i(f),p=s.default.newBuilder({convertFieldsToCamelCase:!0});s.default.loadProto(u.default,p);var _=p.build();_.decode_pdu=function(e){return _.RCSendDataPdu.decode(e)},_.create_join_class_request_pdu=function(e,t,n,i,a,o,s,l,u){return r(c.default.RCPDU_CONNECT_PROVIDER_REQUEST,e,t,n,i,a,!0,o,s,l,u)},_.create_uniform_pdu=function(e,t,n,i,a,o,s,l,u){return r(c.default.RCPDU_UNIFORM_SEND_DATA_REQUEST,e,t,n,i,a,!0,o,s,l,u)},_.create_normal_pdu=function(e,t,n,i,a,o,s,l,u,d){return r(c.default.RCPDU_SEND_DATA_REQUEST,e,t,n,i,a,o,s,l,u,d)},_.id2type=function(e){for(var t in c.default)if(c.default[t]===e)return t},_=a({},_,c.default,h.default);var g=_;t.default=g,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(p,"builder","D:/work/McuClient/src/pdus/index.js"),__REACT_HOT_LOADER__.register(_,"pdu","D:/work/McuClient/src/pdus/index.js"),__REACT_HOT_LOADER__.register(r,"create_pdu","D:/work/McuClient/src/pdus/index.js"),__REACT_HOT_LOADER__.register(g,"default","D:/work/McuClient/src/pdus/index.js"))}()},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e),this.MAPS={}}return i(e,[{key:"on",value:function(e,t){if(e&&t){var n=this.MAPS[e];if(!n)return this.MAPS[e]=[t];n.push(t)}}},{key:"off",value:function(e,t){if(e){var n=this.MAPS[e];if(n){if(t)return n.splice(n.indexOf(t),1);n.length=0}}}},{key:"_emit",value:function(e,t,n){if(e){var i=this.MAPS["*"];i&&i.length&&i.forEach(function(i){i(e,t,n)});var r=this.MAPS[e];r&&r.length&&r.forEach(function(e){e(t,n)})}}}]),e}(),a=r;t.default=a,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"Emiter","D:/work/McuClient/src/Emiter.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/McuClient/src/Emiter.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{
default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(6),d=r(u),c=n(7),f=r(c),h=n(26),p=r(h),_=n(1),g=r(_),m=n(4),v=r(m),y=n(3),E=r(y),S=n(11),T=r(S),C=n(12),R=r(C),b=n(2),w=r(b),A=n(22),I=r(A),P=g.default.getLoger("Ape"),O=function(e){function t(e,n,i){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._session_id=e,r._channel_id=e,r._session_name=n,r._session_tag=i,r._session_channels={},r._adapter_pdu=new d.default.RCAdapterPdu,r._classInfo=null,r._rCArrayBufferUtil=T.default,r._apeDelayed=!0,r._apeDelayedMsgs=[],r._apeDelayedTimer=0,r.on(d.default.RCPDU_SESSION_JOIN_RESPONSE,r._joinSessionHandler.bind(r)),r.on(d.default.RCPDU_CHANNEL_JOIN_RESPONSE,r._joinChannelHandler.bind(r)),r.on(d.default.RCPDU_REG_ADAPTER,r._pduMessageHandler.bind(r)),r.mcu=p.default,r.mcu.on(v.default.CLASS_JOIN_MCU_SUCCESS,r._mcuConferenceJoinSuccessHandler.bind(r)),r.mcu.registerApe(r),r.recordPlayBackParse=I.default,r.recordPlayBackParse.on(I.default.CLASS_JOIN_RECORD_PLAYBACK_SUCCESS,r._joinRecordPlaybackSuccessHandler.bind(r)),r.recordPlayBackParse.registerApe(r),r}return s(t,e),l(t,[{key:"regResponsePduHandler",value:function(){}},{key:"stopApe",value:function(){}},{key:"_pduMessageHandler",value:function(e,t){var n=t||0;this._pduRegAdapterHandler(e,n)}},{key:"_pduRegAdapterHandler",value:function(e,t){for(var n=d.default.RCAdapterPdu.decode(e),i=n.item,r=i.length,a=0;a<r;++a){var o=i[a],s=o.type,l=o.itemData;if(d.default.RCPDU_REG_UPDATE_OBJ===s){var u=d.default.RCRegistryUpdateObjPdu.decode(l),c=u.subType,f=u.objId,h=u.userData;switch(c){case d.default.RCPDU_REG_ROSTER_INSERT_PDU:console.log(h);for(var p=d.default.RCRegistryRosterInsertItemPdu.decode(h),_=p.items,g=_.length,m=0;m<g;++m){var v=_[m],y=v.item_id,E=d.default.RCNodeInfoRecordPdu.decode(v.item_data);this.rosterInsertHandler(y,E)}break;case d.default.RCPDU_REG_ROSTER_DELETE_PDU:var S=d.default.RCRegistryRosterDeleteItemPdu.decode(h);this.rosterDelHandler(S.nodeId);break;case d.default.RCPDU_REG_ROSTER_UPDATE_PDU:for(var T=d.default.RCRegistryRosterUpdateItemPdu.decode(h),C=T.items,R=C.length,b=0;b<R;++b){var w=C[b],A=w.nodeId,I=d.default.RCNodeInfoRecordPdu.decode(w.nodeData);this.rosterUpdateHandler(A,I)}break;case d.default.RCPDU_REG_TABLE_INSERT_PDU:for(var O=d.default.RCRegistryTableInsertItemPdu.decode(h),D=O.items,k=D.length,L=0;L<k;++L){var N=D[L];this.tableInsertHandler(N.owner,N.itemIdx,N.itemData)}this.tableInsertApeHandler(D,t);break;case d.default.RCPDU_REG_TABLE_DELETE_PDU:var M=d.default.RCRegistryTableDeleteItemPdu.decode(h);this.tableDeleteHandler(f,M);break;case d.default.RCPDU_REG_TABLE_UPDATE_PDU:for(var x=d.default.RCRegistryTableUpdateItemPdu.decode(h),U=x.items,H=U.length,B=0;B<H;++B){var F=U[B];this.tableUpdateHandler(F.owner,F.itemIdx,F.itemData,t)}this.tableUpdateApeHandler(U,t);break;case d.default.RCPDU_REG_QUEUE_UPDATE_PDU:case d.default.RCPDU_REG_QUEUE_DELETE_PDU:case d.default.RCPDU_REG_QUEUE_INSERT_PDU:P.warn("REG QUEUE ARE IGNORED")}}else if(d.default.RCPDU_REG_RESPONSE_OBJ==s){var j=d.default.RCRegistryResponseObjPdu.decode(l);this.regResponsePduHandler(j)}}}},{key:"rosterInsertHandler",value:function(e,t){}},{key:"rosterUpdateHandler",value:function(e,t){}},{key:"rosterDelHandler",value:function(e){}},{key:"tableInsertHandler",value:function(e,t){}},{key:"tableUpdateHandler",value:function(e,t,n,i){}},{key:"tableUpdateApeHandler",value:function(e,t){}},{key:"tableInsertApeHandler",value:function(e,t){}},{key:"tableDeleteHandler",value:function(e,t){}},{key:"onJoinChannelHandlerSuccess",value:function(){}},{key:"onJoinSessionHandlerSuccess",value:function(){}},{key:"updaterRecordApeStatus",value:function(e){P.warn(this._session_name+"updaterRecordApeStatus->应有子类具体覆盖处理.")}},{key:"_joinSessionHandler",value:function(e){this.onJoinSessionHandlerSuccess()}},{key:"_joinChannelHandler",value:function(e){var t=d.default.RCChannelJoinResponsePdu.decode(e);t.result===d.default.RET_SUCCESS?(this._session_channels[t.requestedChannelId]=E.default.CJS_JOINNED,this.onJoinChannelHandlerSuccess()):P.warn(this._session_name," -> 加入Channel失败.",t)}},{key:"_mcuConferenceJoinSuccessHandler",value:function(e){this._classInfo=w.default.getClassInfo();var t=new d.default.RCSessionJoinRequestPdu;t.id=this._session_id,t.name=this._session_name,t.tag=this._session_tag,t.sessionData=this._adapter_pdu.toArrayBuffer(),this.sendUniform(t,!0);var n=new d.default.RCChannelJoinRequestPdu;n.initiator=this.mcu.classInfo.nodeId,n.channelId=this._session_id,this.send(n)}},{key:"_joinRecordPlaybackSuccessHandler",value:function(e){P.log("录制回放->Ape已经创建完毕->","SessionId",this._session_id,"SessionName",this._session_name,"SessionTag",this._session_tag)}},{key:"registerKey",value:function(e,t,n,i){var r=new d.default.RCAdapterItemPdu;r.type=d.default.RCPDU_REG_REGISTER_KEY;var a=new d.default.RCRegistryRegisterKeyPdu;a.id=e,a.name=t,a.tag=n,i.length&&(a.userData=i),r.itemData=a.toArrayBuffer(),this._adapter_pdu.item.push(r)}},{key:"registerObj",value:function(e,t,n,i,r,a){var o=new d.default.RCAdapterItemPdu;o.type=d.default.RCPDU_REG_REGISTER_OBJ;var s=new d.default.RCRegistryRegisterObjPdu;s.type=e,s.objId=t,s.name=n,s.tag=i,r&&(s.owner=r),a.length&&(s.userData=a),o.itemData=s.toArrayBuffer(),this._adapter_pdu.item.push(o)}},{key:"send",value:function(e){if(0==w.default.getCurrentStatus().code||1==w.default.getCurrentStatus().code)return void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_SEND_FAILED_NO_JOIN);if(!this._classInfo)return void P.warn("Ape发送数据NORMAL PDU->失败->ape课堂数据无效->",this._classInfo);var t=d.default.create_normal_pdu(e.type,this._classInfo.nodeId,this._classInfo.classId,this._session_id,this._channel_id,!0,!0,R.default.DP_TOP,this._classInfo.topNodeID,R.default.SEG_ONCE);t.data=e.toArrayBuffer(),this.mcu.send(t)}},{key:"sendUniform",value:function(e,t){if(!this._classInfo)return void P.warn("Ape发送数据UNIFORM PDU->失败->ape课堂数据无效->",this._classInfo);var n=d.default.create_uniform_pdu(e.type,this._classInfo.nodeId,this._classInfo.classId,this._session_id,t?E.default.BROADCAST_CHANNEL_ID:this._channel_id,!0,R.default.DP_TOP,t?this._classInfo.topNodeID:e.peer||0,R.default.SEG_ONCE);n.data=e.toArrayBuffer(),this.mcu?this.mcu.send(n):P.warn("MCU为空->无法发送消息",n)}},{key:"sendChatUniform",value:function(e,t){if(0==w.default.getCurrentStatus().code||1==w.default.getCurrentStatus().code)return void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_SEND_FAILED_NO_JOIN);var n=d.default.create_uniform_pdu(e.type,this._classInfo.nodeId,this._classInfo.classId,this._session_id,t?E.default.BROADCAST_CHANNEL_ID:this._channel_id,!0,R.default.DP_TOP,0,R.default.SEG_ONCE);n.data=e.toArrayBuffer(),this.mcu.send(n)}}]),t}(f.default),D=O;t.default=D,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(P,"loger","D:/work/McuClient/src/apes/Ape.js"),__REACT_HOT_LOADER__.register(O,"Ape","D:/work/McuClient/src/apes/Ape.js"),__REACT_HOT_LOADER__.register(D,"default","D:/work/McuClient/src/apes/Ape.js"))}()},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){(function(e){e.require&&(n(34),n(61));var t={isNotUTF8:function(e,n,i){try{t.getStringFromBytes(e,n,i,!0)}catch(e){return!0}return!1},getCharLength:function(e){return 240==(240&e)?4:224==(224&e)?3:192==(192&e)?2:e==(127&e)?1:0},getCharCode:function(e,n,i){var r=0,a="";if(n=n||0,i=i||t.getCharLength(e[n]),0==i)throw new Error(e[n].toString(2)+" is not a significative byte (offset:"+n+").");if(1===i)return e[n];if(a="00000000".slice(0,i)+1+"00000000".slice(i+1),e[n]&parseInt(a,2))throw Error("Index "+n+": A "+i+" bytes encoded char cannot encode the "+(i+1)+"th rank bit to 1.");for(a="0000".slice(0,i+1)+"11111111".slice(i+1),r+=(e[n]&parseInt(a,2))<<6*--i;i;){if(128!==(128&e[n+1])||64===(64&e[n+1]))throw Error("Index "+(n+1)+': Next bytes of encoded char must begin with a "10" bit sequence.');r+=(63&e[++n])<<6*--i}return r},getStringFromBytes:function(e,n,i,r){var a,o=[];for(n|=0,i="number"==typeof i?i:e.byteLength||e.length;n<i;n++){if(a=t.getCharLength(e[n]),n+a>i){if(r)throw Error("Index "+n+": Found a "+a+" bytes encoded char declaration but only "+(i-n)+" bytes are available.")}else o.push(String.fromCodePoint(t.getCharCode(e,n,a,r)));n+=a-1}return o.join("")},getBytesForCharCode:function(e){if(e<128)return 1;if(e<2048)return 2;if(e<65536)return 3;if(e<2097152)return 4;throw new Error("CharCode "+e+" cannot be encoded with UTF8.")},setBytesFromCharCode:function(e,n,i,r){if(e|=0,n=n||[],i|=0,r=r||t.getBytesForCharCode(e),1==r)n[i]=e;else for(n[i++]=(parseInt("1111".slice(0,r),2)<<8-r)+(e>>>6*--r);r>0;)n[i++]=e>>>6*--r&63|128;return n},setBytesFromString:function(e,n,i,r,a){e=e||"",n=n||[],i|=0,r="number"==typeof r?r:n.byteLength||1/0;for(var o=0,s=e.length;o<s;o++){var l=t.getBytesForCharCode(e[o].codePointAt(0));if(a&&i+l>r)throw new Error('Not enought bytes to encode the char "'+e[o]+'" at the offset "'+i+'".');t.setBytesFromCharCode(e[o].codePointAt(0),n,i,l,a),i+=l}return n}};e.exports=t}).call(t,n(9)(e))},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e)}return i(e,null,[{key:"ab2str",value:function(e){return String.fromCharCode.apply(null,new Uint16Array(e))}},{key:"str2ab",value:function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),i=0,r=e.length;i<r;i++)n[i]=e.charCodeAt(i);return t}},{key:"strToUint8Array",value:function(e){var t=void 0,n=void 0,i=void 0,r=void 0;t="",i=e.length;var a=[];for(n=0;n<i;n++)r=e.charCodeAt(n),r>=1&&r<=127?a.push(r):r>2047?(a.push(224|r>>12&15),a.push(128|r>>6&63),a.push(128|r>>0&63)):(a.push(192|r>>6&31),a.push(128|r>>0&63));return new Uint8Array(a)}},{key:"uint8ArrayToStr",value:function(e,t){var n=void 0,i=void 0,r=void 0,a=void 0,o=void 0,s=void 0;for(n="",r=e.buffer.byteLength,i=e.offset+t;i<e.limit;)switch(a=e.view[i++],a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=String.fromCharCode(e.view[i-1]);break;case 12:case 13:o=e.view[i++],n+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e.view[i++],s=e.view[i++],n+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}return n}}]),e}(),a=r;t.default=a,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"ArrayBufferUtil","D:/work/McuClient/src/libs/ArrayBufferUtil.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/McuClient/src/libs/ArrayBufferUtil.js"))}()},function(e,t){function n(){}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.NT_TERMINAL=0,n.NT_MULTIPORT_TERMINAL=1,n.NT_MCU=2,n.DP_TOP=0,n.DP_HIGH=1,n.DP_MEDIUM=2,n.DP_LOW=3,n.SEG_BEGIN=0,n.SEG_END=1,n.SEG_ONCE=2,n.RET_SUCCESS=0,n.RET_USER_REJECTED=1,n.RET_INVALID_CONFERENCE=2,n.RET_INVALID_PASSWORD=3,n.RET_INVALID_CONVENER_PASSWORD=4,n.RET_CHALLENGE_RESPONSE_REQUIRED=5,n.RET_INVALID_CHALLENGE_RESPONSE=6,n.RET_NO_CONNECTION=7,n.RET_FULL_CAPACITY=8,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"PduConsts","D:/work/McuClient/src/pdus/PduConsts.js")}()},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function r(e){var t,i,r,a,o,s,l=e.length;o=n(e),s=new d(3*l/4-o),r=o>0?l-4:l;var c=0;for(t=0,i=0;t<r;t+=4,i+=3)a=u[e.charCodeAt(t)]<<18|u[e.charCodeAt(t+1)]<<12|u[e.charCodeAt(t+2)]<<6|u[e.charCodeAt(t+3)],s[c++]=a>>16&255,s[c++]=a>>8&255,s[c++]=255&a;return 2===o?(a=u[e.charCodeAt(t)]<<2|u[e.charCodeAt(t+1)]>>4,s[c++]=255&a):1===o&&(a=u[e.charCodeAt(t)]<<10|u[e.charCodeAt(t+1)]<<4|u[e.charCodeAt(t+2)]>>2,s[c++]=a>>8&255,s[c++]=255&a),s}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function o(e,t,n){for(var i,r=[],o=t;o<n;o+=3)i=(e[o]<<16)+(e[o+1]<<8)+e[o+2],r.push(a(i));return r.join("")}function s(e){for(var t,n=e.length,i=n%3,r="",a=[],s=16383,u=0,d=n-i;u<d;u+=s)a.push(o(e,u,u+s>d?d:u+s));return 1===i?(t=e[n-1],r+=l[t>>2],r+=l[t<<4&63],r+="=="):2===i&&(t=(e[n-2]<<8)+e[n-1],r+=l[t>>10],r+=l[t>>4&63],r+=l[t<<2&63],r+="="),a.push(r),a.join("")}t.byteLength=i,t.toByteArray=r,t.fromByteArray=s;for(var l=[],u=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,h=c.length;f<h;++f)l[f]=c[f],u[c.charCodeAt(f)]=f;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(7),d=r(u),c=n(1),f=r(c),h=n(4),p=r(h),_=n(2),g=r(_),m=n(20),v=r(m),y=n(3),E=r(y),S=n(32),T=(r(S),n(31)),C=(r(T),f.default.getLoger("Sass")),R={},b=function(e){function t(){return a(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return s(t,e),l(t,[{key:"getJoinParams",value:function(e){var n=this,i=g.default.locationProtocol+e.portal+"/3m/api/meeting/joinParams.do?meetingNumber="+e.classId+"&userID="+e.userId;C.log("1.初始化init获取课堂校验信息."),C.log(i),fetch(i,{timeout:5e3}).then(function(e){if(e.ok)return e.json();throw C.error("初始化init获取课堂校验信息-网络异常.状态码:"+e.status),n._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_INIT_NETWORK),""}).then(function(e){0===e.code?(C.log("初始化init获取课堂校验信息-完成"),n._emit(t.CLASS_INIT_SUCCESS,e)):1===e.code?n._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_INIT_FAILED_1):2===e.code?n._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_INIT_FAILED_2):3===e.code?n._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_INIT_FAILED_3):4===e.code?n._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_INIT_FAILED_4):n._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_INIT_FAILED,e)}).catch(function(e){C.error("初始化init获取课堂校验信息-异常.状态码:"+e),n._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_INIT_PROTOCOL,e)})}},{key:"passwordAndMd5Checking",value:function(e){return C.log("=====================STEP2======================="),C.log("2.开始Sass校验"),C.log(e),R=e,"true"==R.passwordRequired||1==R.passwordRequired||g.default.isHost?void this.sendPWDChecking():void this.sendMD5Checking()}},{key:"sendPWDChecking",value:function(){var e=this,t=0;R.userRole==E.default.host&&(t=1);var n=g.default.locationProtocol+R.portal+"/3m/api/meeting/signIn.do?siteId="+R.siteId+"&classId="+R.classId+"&isTeacher="+t+"&password="+R.password;C.log("=====================STEP3======================="),C.log("3.课堂密码校验",n),fetch(n,{timeout:5e3}).then(function(t){if(200===t.status)return t.text();throw C.error("课堂密码校验-网络异常.状态码:"+t.status),e._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_JOIN_NETWORK),""}).then(function(t){var n=JSON.parse(t);return"false"===n.flag||n.flag===!1?(C.error("课堂密码校验-失败."),void e._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_PASSWORD_WRONG)):"true"===n.flag||n.flag===!0?(C.log("课堂密码校验-成功."),void e.sendMD5Checking()):(C.error("课堂密码校验-协议异常.",n),void e._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_JOIN_PROTOCOL))}).catch(function(t){C.error("课堂密码校验-异常.状态码:"+t),e._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_JOIN_FAILED)})}},{key:"sendMD5Checking",value:function(){var e=this,n=g.default.locationProtocol+R.portal+"/3m/meeting/md5CheckMeeting.do?siteId="+R.siteId+"&meetingNumber="+R.classId+"&userId="+R.userId+"&userName="+R.userName+"&userType="+R.userType+"&nopassword="+R.passwordRequired+"&md5="+R.md5;C.log("=====================STEP4======================="),C.log("4.MD5校验",n),fetch(n,{timeout:5e3}).then(function(t){if(200===t.status)return t.json();throw C.error("MD5校验-网络异常.状态码:"+t.status),e._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_JOIN_NETWORK),""}).then(function(n){"true"==n.flag||1==n.flag?(C.log("MD5校验完成"),C.log(n),e._emit(t.SUCCESS,n)):(C.log("MD5校验-失败."),e._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_MD5_WRONG))}).catch(function(t){C.error("MD5校验-异常.状态码:"+t),e._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_JOIN_FAILED)})}},{key:"getClassDetail",value:function(){var e=this,n=g.default.locationProtocol+g.default.portal+"/3m/meeting/getClassH5.do?classNumber="+g.default.classId;C.log("获取Class详情.",n),fetch(n,{timeout:5e3}).then(function(t){if(t.ok)return t.json();throw C.error("获取Class详情-网络异常.状态码:"+t.status),e._emit(p.default.MCU_ERROR,p.default.ERR_GET_CLASS_DETAIL),""}).then(function(n){0===n.errorCode?(C.log("获取Class详情完成"),e._emit(t.CLASS_GET_CLASS_DETAIL,n)):(C.warn("获取Class详情失败."),e._emit(p.default.MCU_ERROR,p.default.ERR_GET_CLASS_DETAIL))}).catch(function(t){C.error("获取Class详情异常.状态码:"+t),e._emit(p.default.MCU_ERROR,p.default.ERR_GET_CLASS_DETAIL)})}},{key:"getClassParam",value:function(){var e=this,n=(new Date).getTime(),i=(0,v.default)(g.default.classId+""+n),r=g.default.locationProtocol+g.default.portal+"/3m/api/meeting/detail.do?meetingNumber="+g.default.classId+"&timestamp="+n+"&authId="+i;C.log("=====================STEP5======================="),C.log("5.获取课堂课堂的完整信息 "),C.log(r),fetch(r,{timeout:5e3}).then(function(t){if(t.ok)return t.json();throw C.error("获取课堂课堂的完整信息-网络异常.状态码:"+t.status),e._emit(p.default.MCU_ERROR,p.default.ERR_GET_CLASS_PARAML),""}).then(function(n){0===n.code?(C.log("获取课堂课堂的完整信息完成"),e._emit(t.CLASS_GET_CLASS_PARAM,n)):(C.warn("获取课堂课堂的完整信息 失败."),e._emit(p.default.MCU_ERROR,p.default.ERR_GET_CLASS_PARAML))}).catch(function(t){C.error("获取课堂课堂的完整信息异常.状态码:"+t),e._emit(p.default.MCU_ERROR,p.default.ERR_GET_CLASS_PARAML)})}},{key:"sassDeleteDocument",value:function(e){var n=this;if(g.default.isRecordPlayBack)return void C.log("录制回放中,能删除文档");var i=(new Date).getTime(),r=(0,v.default)(e.docId+""+e.classId+i),a=g.default.locationProtocol+g.default.portal+"/3m/api/document/deleteRelation.do?docId="+e.docId+"&classId="+g.default.classId+"&timestamp="+i+"&authId="+r;C.log("删除文档",a),fetch(a,{timeout:5e3}).then(function(e){if(e.ok)return e.json();throw C.error("删除文档-网络异常.状态码:"+e.status),n._emit(p.default.MCU_ERROR,p.default.ERR_DOC_DELETE_FAILED),""}).then(function(i){0===i.code?(C.log("删除文档-完成"),n._emit(t.DELETE_DOCUMENT_SUCCESS,e)):(C.warn("删除文档-失败."),n._emit(p.default.MCU_ERROR,p.default.ERR_DOC_DELETE_FAILED))}).catch(function(e){C.error("删除文档-异常.状态码:"+e),n._emit(p.default.MCU_ERROR,p.default.ERR_DOC_DELETE_FAILED)})}},{key:"sassDeletMusicShare",value:function(e){var n=this;if(g.default.isRecordPlayBack)return void C.log("录制回放中,能删除文件");console.warn("删除Music共享实现...");var i=(new Date).getTime(),r=(0,v.default)(e.fileId+""+e.classId+i),a=g.default.locationProtocol+g.default.portal+"/3m/api/media/deleteRelation.do?mediaId="+e.fileId+"&classId="+g.default.classId+"&timestamp="+i+"&authId="+r;C.log("删除媒体共享文件",a),fetch(a,{timeout:5e3}).then(function(e){if(e.ok)return e.json();throw C.error("删除媒体共享文件-网络异常.状态码:"+e.status),n._emit(p.default.MCU_ERROR,p.default.ERR_MUSICSHARE_DELETE_FAILED),""}).then(function(i){0===i.code?(C.log("删除媒体共享文件 完成"),n._emit(t.DELETE_MUSICSHARE_SUCCESS,e)):(C.warn("删除媒体共享文件 失败."),n._emit(p.default.MCU_ERROR,p.default.ERR_MUSICSHARE_DELETE_FAILED))}).catch(function(e){C.error("删除媒体共享文件-异常.状态码:"+e),n._emit(p.default.MCU_ERROR,p.default.ERR_MUSICSHARE_DELETE_FAILED)})}},{key:"sassDeletMediaShare",value:function(e){var n=this;if(g.default.isRecordPlayBack)return void C.log("录制回放中,能删除文件");var i=(new Date).getTime(),r=(0,v.default)(e.fileId+""+e.classId+i),a=g.default.locationProtocol+g.default.portal+"/3m/api/sharedMedia/deleteRelation.do?fileId="+e.fileId+"&classId="+g.default.classId+"&timestamp="+i+"&authId="+r;C.log("删除媒体共享文件",a),fetch(a,{timeout:5e3}).then(function(e){if(e.ok)return e.json();throw C.error("删除媒体共享文件-网络异常.状态码:"+e.status),n._emit(p.default.MCU_ERROR,p.default.ERR_MEDIASHARE_DELETE_FAILED),""}).then(function(i){0===i.code?(C.log("删除媒体共享文件 完成"),n._emit(t.DELETE_MEDIASHARE_SUCCESS,e)):(C.warn("删除媒体共享文件 失败."),n._emit(p.default.MCU_ERROR,p.default.ERR_MEDIASHARE_DELETE_FAILED))}).catch(function(e){C.error("删除媒体共享文件-异常.状态码:"+e),n._emit(p.default.MCU_ERROR,p.default.ERR_MEDIASHARE_DELETE_FAILED)})}},{key:"saveClassStatusInfo",value:function(e){var n=this;if(g.default.isRecordPlayBack)return void C.log("录制回放中,不需要保存课堂信息");var i=(new Date).getTime(),r=(0,v.default)(g.default.classId+""+i),a=JSON.stringify(e.classStatusInfo),o=g.default.locationProtocol+g.default.portal+"/3m/api/meeting/saveInfo.do";C.log("saveClassStatusInfo",o),fetch(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"classId="+g.default.classId+"&info="+a+"&timestamp="+i+"&authId="+r,timeout:5e3}).then(function(e){if(e.ok)return e.json();throw C.error("saveClassStatusInfo-网络异常.状态码:"+e.status),""}).then(function(i){0===i.code?(C.log("saveClassStatusInfo 完成"),n._emit(t.CLASS_SAVE_STATUS_INFO_SUCCESS,e)):1===i.code?C.log("saveClassStatusInfo 失败 课堂号为空"):2===i.code?C.log("saveClassStatusInfo 失败 无效的课堂号"):3===i.code?C.log("saveClassStatusInfo 失败 验证信息错误"):C.warn("saveClassStatusInfo 失败.",i)}).catch(function(e){C.error("saveClassStatusInfo.状态码:"+e)})}},{key:"saveClassRecordContrlInfo",value:function(e){var n=this;if(g.default.isRecordPlayBack)return void C.log("录制回放中,不需要保存");C.log("保存开始录制信息");var i="3mang123A",r=g.default.siteId,a=g.default.classId,o=g.default.userId,s=g.default.userName,l=g.default.className,u=g.default.classBeginTime,d=g.default.classEndTime,c="",f=g.default.recordFileName,h=g.default.recordFileName,p="",_=(g.default.classStatus,g.default.classTimestamp),m=(new Date).getTime(),y=(0,v.default)(i+r+a+m),E=g.default.locationProtocol+g.default.portal+"/3m/recordingMeeting/insertRecordingMeeting.do";C.log("saveClassRecordContrlInfo",E),fetch(encodeURI(E),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"siteID="+r+"&meetingID="+a+"&userID="+o+"&userName="+s+"&meetingName="+l+"&startTime="+u+"&endTime="+d+"&playUrl="+c+"&streamName="+f+"&downloadUrl="+p+"&configFile="+h+"&timestamp="+m+"&recordTimestamp="+_+"&authId="+y,timeout:5e3}).then(function(e){if(e.ok)return e.json();throw C.error("保存开始录制信息-网络异常.状态码:"+e.status),""}).then(function(i){0===i.errorCode?(C.log("保存开始录制信息 完成"),n._emit(t.CLASS_SAVE_RECORD_INFO_SUCCESS,e)):C.warn("保存开始录制信息 失败.",i)}).catch(function(e){C.error("保存开始录制信息异常.状态码:"+e)})}},{key:"creatQuestion",value:function(e){var n=this;if(g.default.isRecordPlayBack)return void C.log("录制回放中->创建答题数据->不做操作");if(!e)return C.warn("创建答题数据->参数错误->param:",e),void this._emit(t.SASS_CREAT_QUESTION_FAILED);var i=g.default.classId,r=(new Date).getTime(),a=(0,v.default)(i+""+r),o=parseInt(e.type),s=e.content||"",l=parseInt(e.timeLimit),u=e.correct.toString(),d=JSON.stringify(e.options),c=g.default.locationProtocol+g.default.portal+"/3m/api/question/add.do";C.log("创建答题数据",c),fetch(encodeURI(c),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"classId="+i+"&timestamp="+r+"&authId="+a+"&content="+s+"&options="+d+"&type="+o+"&correct="+u+"&timeLimit="+l,timeout:5e3}).then(function(e){if(e.ok)return e.json();throw C.error("创建答题数据-网络异常.状态码:"+e.status),n._emit(t.SASS_CREAT_QUESTION_FAILED),""}).then(function(i){if(0==i.code){var r={};r.questionId=i.id,r.type=o,r.content=e.content||[],r.timeLimit=l,r.correct=e.correct||[],r.options=e.options||[],C.log("创建答题数据->完成->",r),n._emit(t.SASS_CREAT_QUESTION_SUCCESS,r)}else C.warn("创建答题数据->失败.",i),n._emit(t.SASS_CREAT_QUESTION_FAILED)}).catch(function(e){C.error("创建答题数据->状态码:"+e),n._emit(t.SASS_CREAT_QUESTION_FAILED)})}},{key:"sendAnswer",value:function(e){var n=this;if(g.default.isRecordPlayBack)return void C.log("录制回放中->保存答题数据->不做操作");if(!e)return C.warn("保存答题数据->参数错误->param:",e),void this._emit(t.SASS_SEND_ANSWER_FAILED);var i=g.default.classId,r=(new Date).getTime(),a=(0,v.default)(i+""+r),o=(parseInt(e.type),parseInt(e.questionId)),s=e.answer.toString(),l=e.userId,u=e.userName,d=g.default.locationProtocol+g.default.portal+"/3m/api/question/answer.do";C.log("保存答题数据",d),fetch(encodeURI(d),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"classId="+i+"&timestamp="+r+"&authId="+a+"&questionId="+o+"&answer="+s+"&userId="+l+"&userName="+u,timeout:5e3}).then(function(e){if(e.ok)return e.json();throw C.error("保存答题数据-网络异常.状态码:"+e.status),n._emit(t.SASS_SEND_ANSWER_FAILED),""}).then(function(i){if(0==i.code){var r=e;C.log("保存答题数据->完成"),n._emit(t.SASS_SEND_ANSWER_SUCCESS,r)}else C.warn("保存答题数据->失败.",i),n._emit(t.SASS_SEND_ANSWER_FAILED)}).catch(function(e){C.error("保存答题数据->状态码:"+e),n._emit(t.SASS_SEND_ANSWER_FAILED)})}},{key:"getQuestion",value:function(e){var n=this;if(g.default.isRecordPlayBack)return void C.log("录制回放中->查询题目数据->不做操作");if(!e)return C.warn("查询题目数据->参数错误->param:",e),void this._emit(t.SASS_GET_QUESTION_FAILED);var i=parseInt(e.questionId),r=g.default.locationProtocol+g.default.portal+"/3m/api/question/get.do";C.log("查询题目数据",r),fetch(encodeURI(r),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"questionId="+i,timeout:5e3}).then(function(e){if(e.ok)return e.json();throw C.error("查询题目数据-网络异常.状态码:"+e.status),n._emit(t.SASS_GET_QUESTION_FAILED),""}).then(function(e){if(0==e.code){C.log("查询题目数据->完成");var r={};r.questionId=e.id||i,r.type=e.type,r.timeLimit=e.timeLimit,r.options=e.options,r.content=e.content,n._emit(t.SASS_GET_QUESTION_SUCCESS,r)}else C.warn("查询题目数据->失败.",e),n._emit(t.SASS_GET_QUESTION_FAILED)}).catch(function(e){C.error("查询题目数据->状态码:"+e),n._emit(t.SASS_GET_QUESTION_FAILED)})}},{key:"getQuestionResult",value:function(e){var n=this;if(g.default.isRecordPlayBack)return void C.log("录制回放中->查询答题结果数据->不做操作");if(!e)return C.warn("查询答题结果数据->参数错误->param:",e),void this._emit(t.SASS_GET_QUESTION_RESULT_FAILED);var i=parseInt(e.questionId),r=g.default.locationProtocol+g.default.portal+"/3m/api/question/results.do";C.log("查询答题结果数据",r),fetch(encodeURI(r),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"questionId="+i,timeout:5e3}).then(function(e){if(e.ok)return e.json();throw C.error("查询答题结果数据-网络异常.状态码:"+e.status),n._emit(t.SASS_GET_QUESTION_RESULT_FAILED),""}).then(function(r){if(0==r.code){C.log("查询答题结果数据->完成");var a=e||{};a.questionId=i,a.list=r.list,n._emit(t.SASS_GET_QUESTION_RESULT_SUCCESS,a)}else C.warn("查询答题结果数据->失败.",r),n._emit(t.SASS_GET_QUESTION_RESULT_FAILED)}).catch(function(e){C.error("查询答题结果数据->状态码:"+e),n._emit(t.SASS_GET_QUESTION_RESULT_FAILED)})}}]),t}(d.default);b.prototype.SUCCESS=b.SUCCESS="Sass_success",b.prototype.CLASS_INIT_SUCCESS=b.CLASS_INIT_SUCCESS="sass_class_init_success",b.prototype.CLASS_GET_CLASS_PARAM=b.CLASS_GET_CLASS_PARAM="sass_class_getClassParam.message",b.prototype.CLASS_GET_CLASS_DETAIL=b.CLASS_GET_CLASS_DETAIL="sass_class_getClassDetail_message",b.prototype.DELETE_DOCUMENT_SUCCESS=b.DELETE_DOCUMENT_SUCCESS="sass_class_deleteDocumentSuccess_message",b.prototype.DELETE_MEDIASHARE_SUCCESS=b.DELETE_MEDIASHARE_SUCCESS="sass_class_deleteMediaShareSuccess_message",b.prototype.DELETE_MUSICSHARE_SUCCESS=b.DELETE_MUSICSHARE_SUCCESS="sass_class_deleteMusicShareSuccess_message",b.prototype.CLASS_SAVE_STATUS_INFO_SUCCESS=b.CLASS_SAVE_STATUS_INFO_SUCCESS="sass_class_saveClassStatusInfoSuccess_message",b.prototype.CLASS_SAVE_RECORD_INFO_SUCCESS=b.CLASS_SAVE_RECORD_INFO_SUCCESS="sass_class_saveClassRecordInfoSuccess_message",b.prototype.SASS_CREAT_QUESTION_SUCCESS=b.SASS_CREAT_QUESTION_SUCCESS="sass_creat_question_success",b.prototype.SASS_CREAT_QUESTION_FAILED=b.SASS_CREAT_QUESTION_FAILED="sass_creat_question_failed",b.prototype.SASS_GET_QUESTION_SUCCESS=b.SASS_GET_QUESTION_SUCCESS="sass_get_question_success",b.prototype.SASS_GET_QUESTION_FAILED=b.SASS_GET_QUESTION_FAILED="sass_get_question_failed",b.prototype.SASS_GET_QUESTION_RESULT_SUCCESS=b.SASS_GET_QUESTION_RESULT_SUCCESS="sass_get_question_result_success",b.prototype.SASS_GET_QUESTION_RESULT_FAILED=b.SASS_GET_QUESTION_RESULT_FAILED="sass_get_question_result_failed",b.prototype.SASS_SEND_ANSWER_SUCCESS=b.SASS_SEND_ANSWER_SUCCESS="sass_send_answer_success",b.prototype.SASS_SEND_ANSWER_FAILED=b.SASS_SEND_ANSWER_FAILED="sass_send_answer_failed";var w=new b;t.default=w,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(C,"loger","D:/work/McuClient/src/Sass.js"),__REACT_HOT_LOADER__.register(R,"confInfo","D:/work/McuClient/src/Sass.js"),__REACT_HOT_LOADER__.register(b,"Sass","D:/work/McuClient/src/Sass.js"),__REACT_HOT_LOADER__.register(w,"default","D:/work/McuClient/src/Sass.js"))}()},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e),this.timer=0,this.delay=1e3,this.counter=0,this.callBackDelay=1,this.callBackFun=null,this.isStart=!1}return i(e,[{key:"addTimerCallBack",value:function(e,t){this.callBackFun=e,this.callBackDelay=t}},{key:"startTimer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.isStart||(this.isStart=!0,e&&parseInt(e)>0?this.counter=e:this.counter=0,console.log("startTimer",this.counter),this.timerClear(),this.timerStart())}},{key:"stopTimer",value:function(){this.isStart&&(console.log("stopTimer",this.counter),this.isStart=!1,this.timerClear())}},{key:"updateCounter",value:function(){this.counter++,null!=this.callBackFun&&this.counter%this.callBackDelay==0&&this.callBackFun()}},{key:"timerStart",value:function(){this.timer=setInterval(this.updateCounter.bind(this),this.delay)}},{key:"timerClear",value:function(){clearInterval(this.timer)}}]),e}(),a=r;t.default=a,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"TimerCounter","D:/work/McuClient/src/TimerCounter.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/McuClient/src/TimerCounter.js"));
}()},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(3),s=i(o),l=n(1),u=i(l),d=n(4),c=(i(d),n(2)),f=i(c),h=n(5),p=i(h),_=u.default.getLoger("MediaModule"),g=function(){function e(){r(this,e),this.needPublishMediaChannel={},this.mediaChannels={},this.maxMediaChannel=0,this.mediaType=s.default.MEDIA_TYPE_DEFAULT,this.MEDIA_OBJ_TABLE_ID=0,this.SCREENSHARING_OBJ_TABLE_ID=s.default.SCREENSHARING_OBJ_TABLE_ID}return a(e,[{key:"getMediaPlayPath",value:function(e){if(_.log("获取播放地址->"),null==e||null==e.streamId)return _.warn("获取播放地址->参数错误",e),{code:s.default.RETURN_FAILED,data:""};var t="",n="",i="";return"m3u8"==e.type?(f.default.MS_PLAY_HLS_IP||_.error("HLS拉流地址地址无效"),i=f.default.siteId==f.default.siteId_letv?"desc.m3u8":"playlist.m3u8",n=""==f.default.MS_PLAY_HLS_PORT||null==f.default.MS_PLAY_HLS_PORT?"":":"+f.default.MS_PLAY_HLS_PORT,t=f.default.locationProtocol+f.default.MS_PLAY_HLS_IP+n+"/live/"+e.streamId+".m3u8"):(f.default.MS_PLAY_RTMP_IP||_.error("RTMP拉流地址地址无效"),n=""==f.default.MS_PLAY_RTMP_PORT||null==f.default.MS_PLAY_RTMP_PORT?"":":"+f.default.MS_PLAY_RTMP_PORT,t="rtmp://"+f.default.MS_PLAY_RTMP_IP+n+"/live/"+e.streamId),t=t.replace("::",":"),{code:s.default.RETURN_SUCCESS,data:"",playUrl:t}}},{key:"getMediaRecordPlaybackPath",value:function(e){if(_.log("获取录制回放时点播的地址->m3u8"),null==e||null==e.streamId)return _.warn("获取录制回放时点播的地址->参数错误",e),{code:s.default.RETURN_FAILED,data:""};var t=""==f.default.RS_RECORD_PLAY_PORT||null==f.default.RS_RECORD_PLAY_PORT?"":":"+f.default.RS_RECORD_PLAY_PORT,n=f.default.locationProtocol+f.default.RS_RECORD_PLAY_IP+t+"/live/"+e.streamId+"/total.m3u8";return n=n.replace("::",":"),{code:s.default.RETURN_SUCCESS,data:"",playUrl:n}}},{key:"getMediaPublishPath",value:function(e){_.log("获取推流地址->");var t=this.getFreeMediaChannel();if(0==t)return{code:s.default.RETURN_FAILED,data:"不能再打开更多的设备",mediaChannels:this.mediaChannels};var n="live";f.default.MS_PUBLISH_IP||_.error("MS推流地址地址无效");var i=""==f.default.MS_PUBLISH_PORT||null==f.default.MS_PUBLISH_PORT?"":":"+f.default.MS_PUBLISH_PORT,r=p.default.creatTimestamp(),a=f.default.siteId+"_"+f.default.classId+"_"+f.default.userId+"_"+t+"_"+r,o="rtmp://"+f.default.MS_PUBLISH_IP+i+"/"+n+"/"+a;return o=o.replace("::",":"),this.needPublishMediaChannel[o]={channelId:t,publishUrl:o,streamId:a,timestamp:r,nodeId:f.default.nodeId},{code:s.default.RETURN_SUCCESS,data:"",mediaId:t,userId:f.default.userId,userName:f.default.userName,userRole:f.default.userRole,publishUrl:o}}},{key:"getMediaPublishPathForInVisible",value:function(t){var n=Object.keys(e.allMediaChannelsList).length,i=0;for(var r in e.allMediaChannelsList){var a=e.allMediaChannelsList[r];if(a&&a.status==s.default.CHANNEL_STATUS_RELEASED&&a.userRole==s.default.invisible){i=a.channelId;break}}i=i||this.MEDIA_OBJ_TABLE_ID-20-n,_.log("监课获取推流地址->"+i+" mediaLen:"+n);var o="live",l=""==f.default.MS_PUBLISH_PORT||null==f.default.MS_PUBLISH_PORT?"":":"+f.default.MS_PUBLISH_PORT,u=p.default.creatTimestamp(),d=f.default.siteId+"_"+f.default.classId+"_"+f.default.userId+"_"+i+"_"+u,c="rtmp://"+f.default.MS_PUBLISH_IP+l+"/"+o+"/"+d;return c=c.replace("::",":"),this.needPublishMediaChannel[c]={channelId:i,publishUrl:c,streamId:d,timestamp:u,nodeId:f.default.nodeId},{code:s.default.RETURN_SUCCESS,data:"",userId:f.default.userId,userName:f.default.userName,userRole:f.default.userRole,mediaId:i,publishUrl:c}}},{key:"getMediaPublishPathForScreenShare",value:function(e,t){var n=e||this.SCREENSHARING_OBJ_TABLE_ID;_.log("桌面共享获取推流地址->"+n);var i="live",r=""==f.default.MS_PUBLISH_PORT||null==f.default.MS_PUBLISH_PORT?"":":"+f.default.MS_PUBLISH_PORT,a=p.default.creatTimestamp(),o=f.default.siteId+"_"+f.default.classId+"_"+f.default.userId+"_"+n+"_"+a,l="rtmp://"+f.default.MS_PUBLISH_IP+r+"/"+i+"/"+o;return l=l.replace("::",":"),{code:s.default.RETURN_SUCCESS,data:"",mediaId:n,userId:f.default.userId,userName:f.default.userName,userRole:f.default.userRole,publishUrl:l,streamId:o}}},{key:"getFreeMediaChannel",value:function(){var e=0;for(var t in this.mediaChannels){var n=this.mediaChannels[t];if(n&&n.status==s.default.CHANNEL_STATUS_RELEASED)return _.log("已获取空闲的通道->channelId:"+n.channelId),n.channelId;e++}return _.log("获取空闲的通道","mediaChannels",this.mediaChannels,"counter:",e),e<this.maxMediaChannel?this.MEDIA_OBJ_TABLE_ID+e:0}},{key:"getNeedPublishMediaChannel",value:function(e){return this.needPublishMediaChannel[e]}},{key:"getOpeningMediaChannelForNodeId",value:function(e){_.log("getOpeningMediaChannel","nodeId",e,"mediaChannels:",this.mediaChannels);var t={};if(t.channelId=0,null==e||0==e)return t;for(var n in this.mediaChannels){var i=this.mediaChannels[n];if(i&&i.status==s.default.CHANNEL_STATUS_OPENING&&i.fromNodeId==e)return i}return t}},{key:"checkChannelIsOpening",value:function(e){if(null==e)return _.warn("checkChannelIsOpening error,channel=",e),!0;var t=this.mediaChannels[e];return null!=t&&t.status!=s.default.CHANNEL_STATUS_RELEASED}},{key:"getAllMediaChannelInfo",value:function(){var e=[];for(var t in this.mediaChannels){var n=this.mediaChannels[t];n&&e.push({mediaId:n.channelId,status:n.status,fromNodeId:n.fromNodeId})}if(e.length<this.maxMediaChannel)for(var i=e.length;i<this.maxMediaChannel;i++){var r=this.MEDIA_OBJ_TABLE_ID+i;e.push({mediaId:r,status:s.default.CHANNEL_STATUS_RELEASED,fromNodeId:0})}return e}},{key:"getDefaultChannelInfo",value:function(){var e={};return e.owner=0,e.status=s.default.CHANNEL_STATUS_RELEASED,e.fromNodeId=f.default.nodeId,e.channelId=0,e.streamId="",e.classId=f.default.classId,e.siteId=f.default.siteId,e.toNodeId=0,e.userId=f.default.userId,e.mediaType=this.mediaType||s.default.MEDIA_TYPE_DEFAULT,e}}]),e}();g.allMediaChannelsList={};var m=g;t.default=m,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(_,"loger","D:/work/McuClient/src/apes/MediaModule.js"),__REACT_HOT_LOADER__.register(g,"MediaModule","D:/work/McuClient/src/apes/MediaModule.js"),__REACT_HOT_LOADER__.register(m,"default","D:/work/McuClient/src/apes/MediaModule.js"))}()},function(e,t){function n(e){}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.RCPDU_CONNECT_PROVIDER_REQUEST=0,n.RCPDU_CONNECT_PROVIDER_RESPONSE=1,n.RCPDU_UNIFORM_SEND_DATA_REQUEST=125,n.RCPDU_SEND_DATA_REQUEST=120,n.RCPDU_CONFERENCE_JOIN_REQUEST=2,n.RCPDU_CONFERENCE_JOIN_RESPONSE=3,n.RCPDU_CONFERENCE_INVITE_REQUEST=10,n.RCPDU_CONFERENCE_INVITE_RESPONSE=11,n.RCPDU_CONFERENCE_LOCK_REQUEST=20,n.RCPDU_CONFERENCE_LOCK_RESPONSE=21,n.RCPDU_CONFERENCE_LOCK_INDICATION=22,n.RCPDU_CONFERENCE_UNLOCK_REQUEST=30,n.RCPDU_CONFERENCE_UNLOCK_RESPONSE=31,n.RCPDU_CONFERENCE_UNLOCK_INDICATION=32,n.RCPDU_CONFERENCE_LEAVE_REQUEST=39,n.RCPDU_CONFERENCE_TERMINATE_REQUEST=40,n.RCPDU_CONFERENCE_TERMINATE_RESPONSE=41,n.RCPDU_CONFERENCE_TERMINATE_INDICATION=42,n.RCPDU_CONFERENCE_EJECT_USER_REQUEST=50,n.RCPDU_CONFERENCE_EJECT_USER_RESPONSE=51,n.RCPDU_CONFERENCE_EJECT_USER_INDICATION=52,n.RCPDU_ROSTER_UPDATE_INDICATION=60,n.RCPDU_REGISTRY_UPDATE_REQUEST=70,n.RCPDU_REGISTRY_UPDATE_RESPONSE=71,n.RCPDU_REGISTRY_UPDATE_INDICATION=72,n.RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE=80,n.RCPDU_SESSION_JOIN_REQUEST=90,n.RCPDU_SESSION_JOIN_RESPONSE=91,n.RCPDU_CHANNEL_GRAB_REQUEST=100,n.RCPDU_CHANNEL_GRAB_RESPONSE=101,n.RCPDU_CHANNEL_GRAB_INDICATION=102,n.RCPDU_CHANNEL_JOIN_REQUEST=103,n.RCPDU_CHANNEL_JOIN_RESPONSE=104,n.RCPDU_CHANNEL_LEAVE_REQUEST=105,n.RCPDU_CHANNEL_RELEASE_REQUEST=106,n.RCPDU_CHANNEL_RELEASE_INDICATION=107,n.RCPDU_SEND_DATA_INDICATION=121,n.RCPDU_UNIFORM_SEND_DATA_INDICATION=126,n.RCPDU_TOKEN_GRAB_REQUEST=130,n.RCPDU_TOKEN_GRAB_CONFIRM=131,n.RCPDU_TOKEN_INHIBIT_REQUEST=132,n.RCPDU_TOKEN_INHIBIT_CONFIRM=133,n.RCPDU_TOKEN_GIVE_REQUEST=134,n.RCPDU_TOKEN_GIVE_INDICATION=135,n.RCPDU_TOKEN_GIVE_RESPONSE=136,n.RCPDU_TOKEN_GIVE_CONFIRM=137,n.RCPDU_TOKEN_PLEASE_REQUEST=138,n.RCPDU_TOKEN_PLEASE_INDICATION=139,n.RCPDU_TOKEN_RELEASE_REQUEST=140,n.RCPDU_TOKEN_RELEASE_CONFIRM=141,n.RCPDU_TOKEN_TEST_REQUEST=142,n.RCPDU_TOKEN_TEST_CONFIRM=143,n.RCPDU_REG_REGISTER_KEY=200,n.RCPDU_REG_UNREGISTER_KEY=201,n.RCPDU_REG_REGISTER_ROSTER=202,n.RCPDU_REG_REGISTER_TOKEN=203,n.RCPDU_REG_REGISTER_PARAMETER=204,n.RCPDU_REG_REGISTER_COUNTER=205,n.RCPDU_REG_REGISTER_TABLE=206,n.RCPDU_REG_REGISTER_CACHE=207,n.RCPDU_REG_REGISTER_OBJ=208,n.RCPDU_REG_UNREGISTER_OBJ=209,n.RCPDU_REG_UPDATE_OBJ=210,n.RCPDU_REG_ADAPTER=211,n.RCPDU_REG_CLEANUP_NODE=212,n.RCPDU_REG_REGISTER_QUEUE=213,n.RCPDU_REG_TABLE_INSERT_PDU=230,n.RCPDU_REG_TABLE_DELETE_PDU=231,n.RCPDU_REG_TABLE_UPDATE_PDU=232,n.RCPDU_REG_ROSTER_INSERT_PDU=240,n.RCPDU_REG_ROSTER_DELETE_PDU=241,n.RCPDU_REG_ROSTER_UPDATE_PDU=242,n.RCPDU_REG_PARAMETER_UPDATE_PDU=250,n.RCPDU_REG_QUEUE_INSERT_PDU=255,n.RCPDU_REG_QUEUE_DELETE_PDU=256,n.RCPDU_REG_QUEUE_UPDATE_PDU=257,n.RCPDU_CONFERENCE_SEND_DATA_REQUEST=259,n.RCPDU_VIDEO_SEND_DATA_REQUEST=260,n.RCPDU_AUDIO_SEND_DATA_REQUEST=261,n.RCPDU_GIFT_SEND_DATA_REQUEST=262,n.RCPDU_CHAT_SEND_DATA_REQUEST=263,n.RCPDU_VOTING_POLL_RECORD=265,n.RCPDU_CONFERENCE_RECORD_REQUEST=270,n.RCPDU_REG_REQUEST_OBJ=290,n.RCPDU_REG_RESPONSE_OBJ=291,n.RCPDU_REG_COUNTER_REQUEST_PDU=292,n.RCPDU_REG_COUNTER_RESPONSE_PDU=293,n.RCPDU_INDEX_ADAPTER=300,n.RCPDU_INDEX_SERVER_USERS=301,n.RCPDU_INDEX_CONFERENCE_USER_JOINED=302,n.RCPDU_INDEX_CONFERENCE_USER_EXITED=303,n.RCPDU_INDEX_CONFERENCE_USERS=304,n.RCPDU_SEND_CONFERENCE_DATA_REQUEST=500,n.RCPDU_SEND_VIDEO_DATA_REQUEST=501,n.RCPDU_SEND_AUDIO_DATA_REQUEST=502,n.RCPDU_SEND_GIFT_DATA_REQUEST=503,n.RCPDU_SEND_CHAT_DATA_REQUEST=504,n.RCPDU_THIRD_BROADCAST_DATA_REQUEST=505,n.RCPDU_SEND_DOC_BROADCAST_DATA_REQUEST=506,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"RCPduPackage","D:/work/McuClient/src/pdus/PduType.js")}()},function(e,t,n){var r,a,o;(function(e){!function(s,l){n(13).amd?(a=[],r=l,o="function"==typeof r?r.apply(t,a):r,!(void 0!==o&&(e.exports=o))):"object"==("undefined"==typeof e?"undefined":i(e))&&e&&e.exports?e.exports=l():(s.dcodeIO=s.dcodeIO||{}).Long=l()}(this,function(){function e(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function t(e){return(e&&e.__isLong__)===!0}function n(e,t){var n,i,a;return t?(e>>>=0,(a=0<=e&&e<256)&&(i=l[e])?i:(n=r(e,(0|e)<0?-1:0,!0),a&&(l[e]=n),n)):(e|=0,(a=-128<=e&&e<128)&&(i=s[e])?i:(n=r(e,e<0?-1:0,!1),a&&(s[e]=n),n))}function i(e,t){if(isNaN(e)||!isFinite(e))return t?g:_;if(t){if(e<0)return g;if(e>=f)return S}else{if(e<=-h)return T;if(e+1>=h)return E}return e<0?i(-e,t).neg():r(e%c|0,e/c|0,t)}function r(t,n,i){return new e(t,n,i)}function a(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return _;if("number"==typeof t?(n=t,t=!1):t=!!t,n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return a(e.substring(1),t,n).neg();for(var o=i(u(n,8)),s=_,l=0;l<e.length;l+=8){var d=Math.min(8,e.length-l),c=parseInt(e.substring(l,l+d),n);if(d<8){var f=i(u(n,d));s=s.mul(f).add(i(c))}else s=s.mul(o),s=s.add(i(c))}return s.unsigned=t,s}function o(t){return t instanceof e?t:"number"==typeof t?i(t):"string"==typeof t?a(t):r(t.low,t.high,t.unsigned)}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=t;var s={},l={};e.fromInt=n,e.fromNumber=i,e.fromBits=r;var u=Math.pow;e.fromString=a,e.fromValue=o;var d=1<<24,c=4294967296,f=0x10000000000000000,h=f/2,p=n(d),_=n(0);e.ZERO=_;var g=n(0,!0);e.UZERO=g;var m=n(1);e.ONE=m;var v=n(1,!0);e.UONE=v;var y=n(-1);e.NEG_ONE=y;var E=r(-1,2147483647,!1);e.MAX_VALUE=E;var S=r(-1,-1,!0);e.MAX_UNSIGNED_VALUE=S;var T=r(0,-2147483648,!1);e.MIN_VALUE=T;var C=e.prototype;return C.toInt=function(){return this.unsigned?this.low>>>0:this.low},C.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},C.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(T)){var t=i(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var a=i(u(e,6),this.unsigned),o=this,s="";;){var l=o.div(a),d=o.sub(l.mul(a)).toInt()>>>0,c=d.toString(e);if(o=l,o.isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},C.getHighBits=function(){return this.high},C.getHighBitsUnsigned=function(){return this.high>>>0},C.getLowBits=function(){return this.low},C.getLowBitsUnsigned=function(){return this.low>>>0},C.getNumBitsAbs=function(){if(this.isNegative())return this.eq(T)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},C.isZero=function(){return 0===this.high&&0===this.low},C.isNegative=function(){return!this.unsigned&&this.high<0},C.isPositive=function(){return this.unsigned||this.high>=0},C.isOdd=function(){return 1===(1&this.low)},C.isEven=function(){return 0===(1&this.low)},C.equals=function(e){return t(e)||(e=o(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&this.high===e.high&&this.low===e.low},C.eq=C.equals,C.notEquals=function(e){return!this.eq(e)},C.neq=C.notEquals,C.lessThan=function(e){return this.comp(e)<0},C.lt=C.lessThan,C.lessThanOrEqual=function(e){return this.comp(e)<=0},C.lte=C.lessThanOrEqual,C.greaterThan=function(e){return this.comp(e)>0},C.gt=C.greaterThan,C.greaterThanOrEqual=function(e){return this.comp(e)>=0},C.gte=C.greaterThanOrEqual,C.compare=function(e){if(t(e)||(e=o(e)),this.eq(e))return 0;var n=this.isNegative(),i=e.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},C.comp=C.compare,C.negate=function(){return!this.unsigned&&this.eq(T)?T:this.not().add(m)},C.neg=C.negate,C.add=function(e){t(e)||(e=o(e));var n=this.high>>>16,i=65535&this.high,a=this.low>>>16,s=65535&this.low,l=e.high>>>16,u=65535&e.high,d=e.low>>>16,c=65535&e.low,f=0,h=0,p=0,_=0;return _+=s+c,p+=_>>>16,_&=65535,p+=a+d,h+=p>>>16,p&=65535,h+=i+u,f+=h>>>16,h&=65535,f+=n+l,f&=65535,r(p<<16|_,f<<16|h,this.unsigned)},C.subtract=function(e){return t(e)||(e=o(e)),this.add(e.neg())},C.sub=C.subtract,C.multiply=function(e){if(this.isZero())return _;if(t(e)||(e=o(e)),e.isZero())return _;if(this.eq(T))return e.isOdd()?T:_;if(e.eq(T))return this.isOdd()?T:_;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(p)&&e.lt(p))return i(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,a=65535&this.high,s=this.low>>>16,l=65535&this.low,u=e.high>>>16,d=65535&e.high,c=e.low>>>16,f=65535&e.low,h=0,g=0,m=0,v=0;return v+=l*f,m+=v>>>16,v&=65535,m+=s*f,g+=m>>>16,m&=65535,m+=l*c,g+=m>>>16,m&=65535,g+=a*f,h+=g>>>16,g&=65535,g+=s*c,h+=g>>>16,g&=65535,g+=l*d,h+=g>>>16,g&=65535,h+=n*f+a*c+s*d+l*u,h&=65535,r(m<<16|v,h<<16|g,this.unsigned)},C.mul=C.multiply,C.divide=function(e){if(t(e)||(e=o(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?g:_;var n,r,a;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return g;if(e.gt(this.shru(1)))return v;a=g}else{if(this.eq(T)){if(e.eq(m)||e.eq(y))return T;if(e.eq(T))return m;var s=this.shr(1);return n=s.div(e).shl(1),n.eq(_)?e.isNegative()?m:y:(r=this.sub(e.mul(n)),a=n.add(r.div(e)))}if(e.eq(T))return this.unsigned?g:_;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();a=_}for(r=this;r.gte(e);){n=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var l=Math.ceil(Math.log(n)/Math.LN2),d=l<=48?1:u(2,l-48),c=i(n),f=c.mul(e);f.isNegative()||f.gt(r);)n-=d,c=i(n,this.unsigned),f=c.mul(e);c.isZero()&&(c=m),a=a.add(c),r=r.sub(f)}return a},C.div=C.divide,C.modulo=function(e){return t(e)||(e=o(e)),this.sub(this.div(e).mul(e))},C.mod=C.modulo,C.not=function(){return r(~this.low,~this.high,this.unsigned)},C.and=function(e){return t(e)||(e=o(e)),r(this.low&e.low,this.high&e.high,this.unsigned)},C.or=function(e){return t(e)||(e=o(e)),r(this.low|e.low,this.high|e.high,this.unsigned)},C.xor=function(e){return t(e)||(e=o(e)),r(this.low^e.low,this.high^e.high,this.unsigned)},C.shiftLeft=function(e){return t(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?r(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):r(0,this.low<<e-32,this.unsigned)},C.shl=C.shiftLeft,C.shiftRight=function(e){return t(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?r(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):r(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},C.shr=C.shiftRight,C.shiftRightUnsigned=function(e){if(t(e)&&(e=e.toInt()),e&=63,0===e)return this;var n=this.high;if(e<32){var i=this.low;return r(i>>>e|n<<32-e,n>>>e,this.unsigned)}return 32===e?r(n,0,this.unsigned):r(n>>>e-32,0,this.unsigned)},C.shru=C.shiftRightUnsigned,C.toSigned=function(){return this.unsigned?r(this.low,this.high,!1):this},C.toUnsigned=function(){return this.unsigned?this:r(this.low,this.high,!0)},C.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},C.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255]},C.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t]},e})}).call(t,n(9)(e))},function(e,t,n){!function(){var t=n(55),i=n(30).utf8,r=n(57),a=n(30).bin,o=function e(n,o){n.constructor==String?n=o&&"binary"===o.encoding?a.stringToBytes(n):i.stringToBytes(n):r(n)?n=Array.prototype.slice.call(n,0):Array.isArray(n)||(n=n.toString());for(var s=t.bytesToWords(n),l=8*n.length,u=1732584193,d=-271733879,c=-1732584194,f=271733878,h=0;h<s.length;h++)s[h]=16711935&(s[h]<<8|s[h]>>>24)|4278255360&(s[h]<<24|s[h]>>>8);s[l>>>5]|=128<<l%32,s[(l+64>>>9<<4)+14]=l;for(var p=e._ff,_=e._gg,g=e._hh,m=e._ii,h=0;h<s.length;h+=16){var v=u,y=d,E=c,S=f;u=p(u,d,c,f,s[h+0],7,-680876936),f=p(f,u,d,c,s[h+1],12,-389564586),c=p(c,f,u,d,s[h+2],17,606105819),d=p(d,c,f,u,s[h+3],22,-1044525330),u=p(u,d,c,f,s[h+4],7,-176418897),f=p(f,u,d,c,s[h+5],12,1200080426),c=p(c,f,u,d,s[h+6],17,-1473231341),d=p(d,c,f,u,s[h+7],22,-45705983),u=p(u,d,c,f,s[h+8],7,1770035416),f=p(f,u,d,c,s[h+9],12,-1958414417),c=p(c,f,u,d,s[h+10],17,-42063),d=p(d,c,f,u,s[h+11],22,-1990404162),u=p(u,d,c,f,s[h+12],7,1804603682),f=p(f,u,d,c,s[h+13],12,-40341101),c=p(c,f,u,d,s[h+14],17,-1502002290),d=p(d,c,f,u,s[h+15],22,1236535329),u=_(u,d,c,f,s[h+1],5,-165796510),f=_(f,u,d,c,s[h+6],9,-1069501632),c=_(c,f,u,d,s[h+11],14,643717713),d=_(d,c,f,u,s[h+0],20,-373897302),u=_(u,d,c,f,s[h+5],5,-701558691),f=_(f,u,d,c,s[h+10],9,38016083),c=_(c,f,u,d,s[h+15],14,-660478335),d=_(d,c,f,u,s[h+4],20,-405537848),u=_(u,d,c,f,s[h+9],5,568446438),f=_(f,u,d,c,s[h+14],9,-1019803690),c=_(c,f,u,d,s[h+3],14,-187363961),d=_(d,c,f,u,s[h+8],20,1163531501),u=_(u,d,c,f,s[h+13],5,-1444681467),f=_(f,u,d,c,s[h+2],9,-51403784),c=_(c,f,u,d,s[h+7],14,1735328473),d=_(d,c,f,u,s[h+12],20,-1926607734),u=g(u,d,c,f,s[h+5],4,-378558),f=g(f,u,d,c,s[h+8],11,-2022574463),c=g(c,f,u,d,s[h+11],16,1839030562),d=g(d,c,f,u,s[h+14],23,-35309556),u=g(u,d,c,f,s[h+1],4,-1530992060),f=g(f,u,d,c,s[h+4],11,1272893353),c=g(c,f,u,d,s[h+7],16,-155497632),d=g(d,c,f,u,s[h+10],23,-1094730640),u=g(u,d,c,f,s[h+13],4,681279174),f=g(f,u,d,c,s[h+0],11,-358537222),c=g(c,f,u,d,s[h+3],16,-722521979),d=g(d,c,f,u,s[h+6],23,76029189),u=g(u,d,c,f,s[h+9],4,-640364487),f=g(f,u,d,c,s[h+12],11,-421815835),c=g(c,f,u,d,s[h+15],16,530742520),d=g(d,c,f,u,s[h+2],23,-995338651),u=m(u,d,c,f,s[h+0],6,-198630844),f=m(f,u,d,c,s[h+7],10,1126891415),c=m(c,f,u,d,s[h+14],15,-1416354905),d=m(d,c,f,u,s[h+5],21,-57434055),u=m(u,d,c,f,s[h+12],6,1700485571),f=m(f,u,d,c,s[h+3],10,-1894986606),c=m(c,f,u,d,s[h+10],15,-1051523),d=m(d,c,f,u,s[h+1],21,-2054922799),u=m(u,d,c,f,s[h+8],6,1873313359),f=m(f,u,d,c,s[h+15],10,-30611744),c=m(c,f,u,d,s[h+6],15,-1560198380),d=m(d,c,f,u,s[h+13],21,1309151649),u=m(u,d,c,f,s[h+4],6,-145523070),f=m(f,u,d,c,s[h+11],10,-1120210379),c=m(c,f,u,d,s[h+2],15,718787259),d=m(d,c,f,u,s[h+9],21,-343485551),u=u+v>>>0,d=d+y>>>0,c=c+E>>>0,f=f+S>>>0}return t.endian([u,d,c,f])};o._ff=function(e,t,n,i,r,a,o){var s=e+(t&n|~t&i)+(r>>>0)+o;return(s<<a|s>>>32-a)+t},o._gg=function(e,t,n,i,r,a,o){var s=e+(t&i|n&~i)+(r>>>0)+o;return(s<<a|s>>>32-a)+t},o._hh=function(e,t,n,i,r,a,o){var s=e+(t^n^i)+(r>>>0)+o;return(s<<a|s>>>32-a)+t},o._ii=function(e,t,n,i,r,a,o){var s=e+(n^(t|~i))+(r>>>0)+o;return(s<<a|s>>>32-a)+t},o._blocksize=16,o._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var i=t.wordsToBytes(o(e,n));return n&&n.asBytes?i:n&&n.asString?a.bytesToString(i):t.bytesToHex(i)}}()},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e)}return i(e,null,[{key:"addLog",value:function(e,t){var n=this;t&&(1!=this.IS_OPEN_SEND_LOG&&"true"!=this.IS_OPEN_SEND_LOG||!function(){var i="";switch(e){case n.ERROR:i=n.getCurrentDateTime()+" ERROR "+t;break;case n.WARN:i=n.getCurrentDateTime()+" WARN "+t;break;case n.LOG:i=n.getCurrentDateTime()+" INFO "+t;break;default:i=n.getCurrentDateTime()+" INFO "+t}n.allLogList.push(i);var r=n;clearTimeout(n.logDelayTimer),n.logDelayTimer=setTimeout(function(){r.checkAndSendLog()},1600)}())}},{key:"checkAndSendLog",value:function(){this.sendLogToServer(-1)}},{key:"sendLogToServer",value:function(e){var t=this;if(!this.logUrl)return void console.warn("日志服务器地址无效->无法上传日志");var n=e,i="",r=[],a=0;a=this.allLogList.length;for(var o=0;o<a;o++){var s=this.allLogList.shift();s&&(r.push(s),i+=s+"\n ")}if(!(r.length<1)&&i){i=i.replace(/&/g,"#");var l="["+this.userRole+"]_"+this.platform+"__"+this.userId;fetch(encodeURI(this.logUrl),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"classId="+this.classId+"&userId="+l+"&nodeId="+this.nodeId+"&type="+n+"&data="+i,timeout:3e3}).then(function(e){if(e.ok)return e.json();throw console.error("保存日志信息-网络异常.状态码:"+e.status),""}).then(function(e){0==e?(console.log("保存日志信息 完成"),r=[]):(console.warn("保存日志信息 失败.",e),t.allLogList=r.concat(t.allLogList),r=[])}).catch(function(e){console.error("保存日志信息.状态码:"+e),t.allLogList=r.concat(t.allLogList),r=[]})}}},{key:"getCurrentDateTime",value:function(){var e=(new Date).getTime()-1e3*this.serverAndLoacTimeDistanc,t=new Date(e),n=t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds();return n}}]),e}();r.allLogList=[],r.logList=[],r.warnList=[],r.errorList=[],r.serverAndLoacTimeDistanc=0,r.classId=0,r.userId="",r.nodeId=0,r.userName="",r.userRole="normal",r.logUrl="",r.platform="unknow",r.ERROR=1,r.WARN=2,r.LOG=3,r.DATA=5,r.logDelayTimer=0,r.IS_OPEN_SEND_LOG=!0;var a=r;t.default=a,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"LogManager","D:/work/McuClient/src/LogManager.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/McuClient/src/LogManager.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(52),d=r(u),c=n(7),f=r(c),h=n(4),p=r(h),_=n(1),g=r(_),m=n(6),v=r(m),y=n(18),E=r(y),S=n(12),T=r(S),C=n(3),R=r(C),b=n(11),w=(r(b),n(14)),A=(r(w),n(2)),I=r(A),P=n(5),O=(r(P),n(16)),D=r(O),k=void 0,L=g.default.getLoger("RecordPlayBackParse"),N=0,M=1,x=2,U=3,H=4,B=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return k=new d.default(d.default.DEFAULT_CAPACITY,d.default.LITTLE_ENDIAN),k.clear(),e._recordPlaybackTimestamp=0,e._recordPlaybackMaxTime=0,e._isReady=!1,e._apes={},e.mediaChannleList={},e._conferApeMssages={},e._chatApeMssages={},e._videoApeMssages={},e._audioApeMssages={},e._docApeMssages={},e._whiteApeMssages={},e._mediaShareApeMssages={},e._musicShareApeMssages={},e._timerCounter=new D.default,e._timerCounter.addTimerCallBack(e._timerCounterUptate.bind(e),1),e}return s(t,e),l(t,[{key:"registerApe",value:function(e){this._apes[e._session_id]=e}},{key:"initReplay",value:function(){this._stopTimerCounter(),this._recordPlaybackTimestamp=0,this._recordPlaybackMaxTime=0,this._isReady=!1,this._conferApeMssages={},this._chatApeMssages={},this._videoApeMssages={},this._audioApeMssages={},this.mediaChannleList={},this._docApeMssages={},this._whiteApeMssages={}}},{key:"_everSocketMsgReceivedHandler",value:function(e,t){var n=v.default.decode_pdu(e),i=n.get("type"),r=n.get("data");switch(i==E.default.RCPDU_UNIFORM_SEND_DATA_REQUEST&&(n.type=E.default.RCPDU_SEND_DATA_REQUEST,i=E.default.RCPDU_SEND_DATA_REQUEST),L.log("_everSocketMsgReceivedHandler->pduType",i,"seekTime->",t),i){case E.default.RCPDU_CONNECT_PROVIDER_RESPONSE:var a=v.default.RCConferenceJoinResponsePdu.decode(r),o=a.result;switch(L.warn("RCPDU_CONNECT_PROVIDER_RESPONSE  ->pduResultCode:"+o),o){case T.default.RET_SUCCESS:this._emit(p.default.CLASS_JOIN_MCU_SUCCESS,this.classInfo);break;case T.default.RET_FULL_CAPACITY:this._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_JOIN_FULL);break;default:L.warn("JoinConfPdu-未知类型-等待处理.",o)}break;case E.default.RCPDU_SEND_DATA_REQUEST:var s=this._apes[n.sessionId],l=(0,R.default)(n.sessionId);s?(v.default.id2type(n.subType),s._emit(n.subType,n.data,t)):L.warn(l+"尚未注册");break;default:L.warn("PDU-未知类型-等待处理.",i)}}},{key:"_parseSaveSocketMsgReceivedHandler",value:function(e,t){var n=v.default.decode_pdu(e),i=n.get("type"),r=n.get("data");switch(i==E.default.RCPDU_UNIFORM_SEND_DATA_REQUEST&&(n.type=E.default.RCPDU_SEND_DATA_REQUEST,i=E.default.RCPDU_SEND_DATA_REQUEST),i){case E.default.RCPDU_CONNECT_PROVIDER_RESPONSE:var a=v.default.RCConferenceJoinResponsePdu.decode(r),o=a.result;switch(o){case T.default.RET_SUCCESS:this._emit(p.default.CLASS_JOIN_MCU_SUCCESS,this.classInfo);break;case T.default.RET_FULL_CAPACITY:this._emit(p.default.MCU_ERROR,p.default.ERR_CLASS_JOIN_FULL);break;default:L.warn("JoinConfPdu-未知类型-等待处理.",o)}break;case E.default.RCPDU_SEND_DATA_REQUEST:switch(this._apes[n.sessionId],(0,R.default)(n.sessionId),n.sessionId){case R.default.CONFERENCE_SESSION_ID:this.saveParseData(e,t,this._conferApeMssages);break;case R.default.CHAT_SESSION_ID:this.saveParseData(e,t,this._chatApeMssages);break;case R.default.DOCSHARING_SESSION_ID:this.saveParseData(e,t,this._docApeMssages);break;case R.default.MEDIA_SESSION_ID:this.saveParseData(e,t,this._mediaShareApeMssages);break;case R.default.MUSIC_SESSION_ID:this.saveParseData(e,t,this._musicShareApeMssages);break;case R.default.WHITEBOARD_SESSION_ID:this.saveParseData(e,t,this._whiteApeMssages);break;case R.default.VIDEO_SESSION_ID:this.saveParseData(e,t,this._videoApeMssages),this.unPackpduRegAdapterHandler(n.data,t,e,R.default.VIDEO_SESSION_ID);break;case R.default.AUDIO_SESSION_ID:this.saveParseData(e,t,this._audioApeMssages),this.unPackpduRegAdapterHandler(n.data,t,e,R.default.AUDIO_SESSION_ID)}break;default:L.warn("PDU-未知类型-等待处理.",i)}}},{key:"saveParseData",value:function(e,t,n){var i=n[t];i||(n[t]=[],i=n[t]),i.push({timestamp:t,byteData:e})}},{key:"_startTimerCounter",value:function(){this._timerCounter&&this._timerCounter.startTimer()}},{key:"_stopTimerCounter",value:function(){this._timerCounter&&this._timerCounter.stopTimer()}},{key:"_timerCounterUptate",value:function(){return this._recordPlaybackTimestamp=this._recordPlaybackTimestamp+1,this._emit(p.default.CLASS_UPDATE_TIMER,{classTimestamp:this._recordPlaybackTimestamp}),this._recordPlaybackTimestamp>=this._recordPlaybackMaxTime?(L.log("录制回放结束...当前时间->",this._recordPlaybackTimestamp," 总时间->",this._recordPlaybackMaxTime),void this.stopRecordPlayback()):(this._searchMessageFromTime(this._recordPlaybackTimestamp,this._conferApeMssages,"conferApe"),this._searchMessageFromTime(this._recordPlaybackTimestamp,this._chatApeMssages,"chatApe"),this._searchMessageFromTime(this._recordPlaybackTimestamp,this._docApeMssages,"docApe"),this._searchMessageFromTime(this._recordPlaybackTimestamp,this._mediaShareApeMssages,"mediaShareApe"),this._searchMessageFromTime(this._recordPlaybackTimestamp,this._musicShareApeMssages,"musicShareApe"),this._searchMessageFromTime(this._recordPlaybackTimestamp,this._whiteApeMssages,"whiteApe"),this._searchMessageFromTime(this._recordPlaybackTimestamp,this._videoApeMssages,"videoAp"),void this._searchMessageFromTime(this._recordPlaybackTimestamp,this._audioApeMssages,"audioApe"))}},{key:"readyRecordPlay",value:function(){var e=this;this.initReplay(),L.log("读取回放数据");var t=I.default.RecordServerIP;I.default.RecordServerPort&&(t=t+":"+I.default.RecordServerPort);var n=I.default.locationProtocol+t+"/"+I.default.recordFileName;L.log(n),fetch(n,{timeout:24e4}).then(function(t){if(t.ok)return t.arrayBuffer();throw L.error("读取回放数据-网络异常.状态码:"+t.status),e._emit(p.default.MCU_ERROR,p.default.ERR_GET_RECORD_PLAY_BACK_DATA_FAILED),""}).then(function(t){t?(L.log("读取回放数据-完成"),e._loadRecordDataSuccess(t)):(L.warn("读取回放数据-失败."),e._emit(p.default.MCU_ERROR,p.default.ERR_GET_RECORD_PLAY_BACK_DATA_FAILED))}).catch(function(t){L.error("读取回放数据.状态码:"+t),e._emit(p.default.MCU_ERROR,p.default.ERR_GET_RECORD_PLAY_BACK_DATA_FAILED)})}},{key:"_loadRecordDataSuccess",value:function(e){L.log("获取录制回放数据的长度",e.byteLength),k&&(k.clear(),k.append(e),this.parseArrayBuf())}},{key:"parseArrayBuf",value:function(){var e=k.offset;k.byteOffset=0;for(var n=0;n<e;){var i=k.readUInt32(n);n+=4;var r=k.readUInt32(n);n+=4;var a=k.buffer.slice(n,n+r);n+=r,this._parseSaveSocketMsgReceivedHandler(a,i),this._recordPlaybackMaxTime=i}this._recordPlaybackTimestamp=0,this._isReady=!0,this._stopTimerCounter(),this._recordPlaybackMaxTime<I.default.recordTimestamp&&(this._recordPlaybackMaxTime=I.default.recordTimestamp),I.default.recordPlaybackMaxTime=this._recordPlaybackMaxTime,console.log("音视频通话模块数据",this.mediaChannleList),console.log("媒体共享模块数据",this._mediaShareApeMssages),console.log("伴音模块数据",this._musicShareApeMssages),L.log("录制回放数据解析完成,录制回放的总时间长为->",this._recordPlaybackMaxTime),this._emit(t.CLASS_JOIN_RECORD_PLAYBACK_SUCCESS,{recordPlaybackMaxTime:this._recordPlaybackMaxTime})}},{key:"_searchMessageFromTime",value:function(e,t,n){var i=t[e];if(i){L.log(n,"回放数据->",i.length);for(var r=0;r<i.length;r++)this._everSocketMsgReceivedHandler(i[r].byteData,0)}}},{key:"startRecordPlayback",value:function(e){return this._isReady?(L.log("classStatusInfo",I.default.classStatusInfo),
this._startTimerCounter(),void this._emit(p.default.RECORD_PLAYBACK_UPDATE,{status:M})):{code:R.default.RETURN_FAILED,data:"录制回放还未准备完成"}}},{key:"stopRecordPlayback",value:function(e){this._stopTimerCounter(),this._recordPlaybackTimestamp=0,I.default.activeDocId=0,I.default.activeDocCurPage=1,this._emit(t.RECORD_PLAYBACK_CLEAR_DATA),this._emit(p.default.RECORD_PLAYBACK_UPDATE,{status:H})}},{key:"pauseRecordPlayback",value:function(e){this._stopTimerCounter(),this._emit(p.default.RECORD_PLAYBACK_UPDATE,{status:x})}},{key:"seekRecordPlayback",value:function(e){return this._isReady?e&&e.time?(this._stopTimerCounter(),this._recordPlaybackTimestamp=e.time||0,I.default.activeDocId=0,I.default.activeDocCurPage=1,this._emit(t.RECORD_PLAYBACK_CLEAR_DATA),void this._searchSeekKeyfram()):{code:R.default.RETURN_FAILED,data:"参数不正确"}:{code:R.default.RETURN_FAILED,data:"录制回放还未准备完成"}}},{key:"_searchSeekKeyfram",value:function(){this._searchApeMessageKeyfram(this._conferApeMssages,R.default.CONFERENCE_SESSION_ID),this._searchApeMessageKeyfram(this._docApeMssages,R.default.DOCSHARING_SESSION_ID),this.searchMediaApeMessageKeyfram(this.mediaChannleList),this.searchMediaShareApeMessageKeyfram(this._mediaShareApeMssages),this.searchMusicShareApeMessageKeyfram(this._musicShareApeMssages),this._searchChatHistoryMessageKeyfram(this._chatApeMssages,R.default.CHAT_SESSION_ID),this._searchWhiteboradHistoryMessageKeyfram(this._whiteApeMssages,R.default.WHITEBOARD_SESSION_ID),this._startTimerCounter()}},{key:"_searchApeMessageKeyfram",value:function(e,t){if(e){for(var n=void 0,i=0,r=this._recordPlaybackTimestamp;r>0;r--)if(n=e[r]){i=this._recordPlaybackTimestamp-r,L.log("SEEK->APE",(0,R.default)(t),this._recordPlaybackTimestamp,"查找到相连的timestamp->",r,"需要seek->",i,"秒");for(var a=0;a<n.length;a++)this._everSocketMsgReceivedHandler(n[a].byteData,i);return void(t!=R.default.AUDIO_SESSION_ID&&t!=R.default.VIDEO_SESSION_ID||this._emit(p.default.RECORD_PLAYBACK_UPDATE,{status:U,keyFrameSeekTime:i}))}L.log("SEEK->APE",(0,R.default)(t),this._recordPlaybackTimestamp,"没有查找到相连的数据")}}},{key:"searchMediaApeMessageKeyfram",value:function(e){if(e&&(console.log("SEEK->查找音视频模块数据",e),e))for(var t in e)for(var n=e[t],i=void 0,r=0,a=this._recordPlaybackTimestamp;a>0;a--)if(i=n[a]){r=this._recordPlaybackTimestamp-a,L.log("SEEK->查找音视频模块数据->",i,"keyFrameSeekTime->",r),this._everSocketMsgReceivedHandler(i.byteData,r);break}}},{key:"searchMediaShareApeMessageKeyfram",value:function(e){if(e){for(var t=void 0,n=0,i=this._recordPlaybackTimestamp;i>0;i--)if(t=e[i]){n=this._recordPlaybackTimestamp-i,L.log("SEEK->APE","媒体共享",this._recordPlaybackTimestamp,"查找到相连的timestamp->",i,"需要seek->",n,"秒");for(var r=0;r<t.length;r++)this._everSocketMsgReceivedHandler(t[r].byteData,n);return}L.log("SEEK->APE->媒体共享",this._recordPlaybackTimestamp,"没有查找到相连的数据")}}},{key:"searchMusicShareApeMessageKeyfram",value:function(e){if(e){for(var t=void 0,n=0,i=this._recordPlaybackTimestamp;i>0;i--)if(t=e[i]){n=this._recordPlaybackTimestamp-i,L.log("SEEK->APE","伴音共享",this._recordPlaybackTimestamp,"查找到相连的timestamp->",i,"需要seek->",n,"秒");for(var r=0;r<t.length;r++)this._everSocketMsgReceivedHandler(t[r].byteData,n);return}L.log("SEEK->APE->伴音共享",this._recordPlaybackTimestamp,"没有查找到相连的数据")}}},{key:"_searchChatHistoryMessageKeyfram",value:function(e){if(e){for(var t=0,n=void 0,i=[],r=this._recordPlaybackTimestamp;r>0;r--)if(n=e[r])for(var a=0;a<n.length;a++)if(i.push(n[a].byteData),t++,t>40){L.warn("SEEK->最多处理历史消息30条");break}var o=i.length;if(o>0)for(var s=o-1;s>=0;s--)this._everSocketMsgReceivedHandler(i[s],0)}}},{key:"_searchWhiteboradHistoryMessageKeyfram",value:function(e){if(e)for(var t=0,n=void 0,i=this._recordPlaybackTimestamp;i>0;i--)if(n=e[i])for(var r=0;r<n.length;r++)if(this._everSocketMsgReceivedHandler(n[r].byteData,0),t++,t>40)return void L.warn("SEEK->最多处理历史消息40条")}},{key:"unPackpduRegAdapterHandler",value:function(e,t,n,i){var r=void 0,a=void 0,o=void 0;try{r=v.default.RCAdapterPdu.decode(e),a=r.item,o=a.length}catch(e){return void console.warn("RCAdapterPdu->unpack-error->type类型不对")}for(var s=0;s<o;++s){var l=a[s],u=l.type,d=l.itemData;if(v.default.RCPDU_REG_UPDATE_OBJ===u){var c=v.default.RCRegistryUpdateObjPdu.decode(d),f=c.subType,h=(c.objId,c.userData);switch(f){case v.default.RCPDU_REG_ROSTER_INSERT_PDU:for(var p=v.default.RCRegistryRosterInsertItemPdu.decode(h),_=p.items,g=_.length,m=0;m<g;++m){var y=_[m];y.item_id,v.default.RCNodeInfoRecordPdu.decode(y.item_data)}break;case v.default.RCPDU_REG_ROSTER_DELETE_PDU:v.default.RCRegistryRosterDeleteItemPdu.decode(h);break;case v.default.RCPDU_REG_ROSTER_UPDATE_PDU:for(var E=v.default.RCRegistryRosterUpdateItemPdu.decode(h),S=E.items,T=S.length,C=0;C<T;++C){var b=S[C];b.nodeId,v.default.RCNodeInfoRecordPdu.decode(b.nodeData)}break;case v.default.RCPDU_REG_TABLE_INSERT_PDU:for(var w=v.default.RCRegistryTableInsertItemPdu.decode(h),A=w.items,I=A.length,P=0;P<I;++P)A[P];break;case v.default.RCPDU_REG_TABLE_DELETE_PDU:v.default.RCRegistryTableDeleteItemPdu.decode(h);break;case v.default.RCPDU_REG_TABLE_UPDATE_PDU:for(var O=v.default.RCRegistryTableUpdateItemPdu.decode(h),D=O.items,k=D.length,N=0;N<k;++N){var M=D[N];if(i==R.default.VIDEO_SESSION_ID)try{var x=v.default.RCVideoChannelInfoPdu.decode(M.itemData);this.mediaChannleList[x.channelId]||(this.mediaChannleList[x.channelId]={}),this.mediaChannleList[x.channelId][t]={parseData:x,byteData:n,timestamp:t}}catch(e){L.log("RCVideoChannelInfoPdu->unPackPdu->error->"+M.itemIdx+"  err:"+e.message)}else if(i==R.default.AUDIO_SESSION_ID)try{var U=v.default.RCAudioChannelInfoPdu.decode(M.itemData);L.log("RCAudioChannelInfoPdu->timestamp",t,U),this.mediaChannleList[U.channelId]||(this.mediaChannleList[U.channelId]={}),this.mediaChannleList[U.channelId][t]={parseData:U,byteData:n,timestamp:t}}catch(e){L.log("RCAudioChannelInfoPdu->unPackPdu->error->"+M.itemIdx+"  err:"+e.message)}}break;case v.default.RCPDU_REG_QUEUE_UPDATE_PDU:case v.default.RCPDU_REG_QUEUE_DELETE_PDU:case v.default.RCPDU_REG_QUEUE_INSERT_PDU:L.warn("REG QUEUE ARE IGNORED")}}else if(v.default.RCPDU_REG_RESPONSE_OBJ==u){var H=v.default.RCRegistryResponseObjPdu.decode(d);console.log("regResponsePdu",H)}}}}]),t}(f.default);B.prototype.CLASS_JOIN_RECORD_PLAYBACK_SUCCESS=B.CLASS_JOIN_RECORD_PLAYBACK_SUCCESS="class_join_recordPlayback_success",B.prototype.RECORD_PLAYBACK_CLEAR_DATA=B.RECORD_PLAYBACK_CLEAR_DATA="record_playback_clear_data";var F=new B;t.default=F,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(k,"parseBuffer","D:/work/McuClient/src/RecordPlayBackParse.js"),__REACT_HOT_LOADER__.register(L,"loger","D:/work/McuClient/src/RecordPlayBackParse.js"),__REACT_HOT_LOADER__.register(N,"Default","D:/work/McuClient/src/RecordPlayBackParse.js"),__REACT_HOT_LOADER__.register(M,"PLAY","D:/work/McuClient/src/RecordPlayBackParse.js"),__REACT_HOT_LOADER__.register(x,"PAUSE","D:/work/McuClient/src/RecordPlayBackParse.js"),__REACT_HOT_LOADER__.register(U,"SEEK","D:/work/McuClient/src/RecordPlayBackParse.js"),__REACT_HOT_LOADER__.register(H,"STOP","D:/work/McuClient/src/RecordPlayBackParse.js"),__REACT_HOT_LOADER__.register(B,"RecordPlayBackParse","D:/work/McuClient/src/RecordPlayBackParse.js"),__REACT_HOT_LOADER__.register(F,"default","D:/work/McuClient/src/RecordPlayBackParse.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(8),d=r(u),c=n(3),f=r(c),h=n(24),p=r(h),_=n(4),g=r(_),m=n(6),v=r(m),y=n(10),E=(r(y),n(1)),S=r(E),T=n(2),C=r(T),R=n(5),b=r(R),w=n(16),A=r(w),I=n(15),P=(r(I),S.default.getLoger("ConferApe")),O=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f.default.CONFERENCE_SESSION_ID,f.default.CONFERENCE_SESSION_NAME,f.default.CONFERENCE_SESSION_TAG));return e.rosters={},e.rosterLen=0,e.timerCounter=new A.default,e.thirdMessage=new p.default,e.thirdMessage.on(p.default.RECIVE_MESSAGE,e.onThirdReciveParentMessage.bind(e)),e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(v.default.RCPDU_REG_REGISTER_ROSTER,f.default.CONFERENCE_OBJ_ROSTER_ID,f.default.CONFERENCE_OBJ_ROSTER_NAME,f.default.CONFERENCE_OBJ_ROSTER_TAG,0,new ArrayBuffer),e.registerObj(v.default.RCPDU_REG_REGISTER_QUEUE,f.default.CONFERENCE_OBJ_QUEUE_ID,f.default.CONFERENCE_OBJ_QUEUE_NAME,f.default.CONFERENCE_OBJ_QUEUE_TAG,0,new ArrayBuffer),e.registerObj(v.default.RCPDU_REG_REGISTER_TABLE,f.default.CONFERENCE_OBJ_TABLE_ID,f.default.CONFERENCE_OBJ_TABLE_NAME,f.default.CONFERENCE_OBJ_TABLE_TAG,0,new ArrayBuffer),e.registerObj(v.default.RCPDU_REG_REGISTER_COUNTER,f.default.CONFERENCE_OBJ_COUNTER_ID,f.default.CONFERENCE_OBJ_COUNTER_NAME,f.default.CONFERENCE_OBJ_COUNTER_TAG,0,new ArrayBuffer),e.on(v.default.RCPDU_SESSION_JOIN_RESPONSE,e._joinSessionHandler.bind(e)),e.on(v.default.RCPDU_SEND_CONFERENCE_DATA_REQUEST,e.conferMsgComingHandler.bind(e)),e.on(v.default.RCPDU_CONFERENCE_RECORD_REQUEST,e.onSendConferRecordRequestHandler.bind(e)),e.on(v.default.RCPDU_THIRD_BROADCAST_DATA_REQUEST,e.onThirdBroadcastDataHandler.bind(e)),e}return s(t,e),l(t,[{key:"_joinSessionHandler",value:function(e){var t=this.getNodeInfo(),n=new v.default.RCNodeInfoUserDataPdu;n.qq="",n.skype="",t.userData=n.toArrayBuffer(),t.deviceType=C.default.deviceType;var i=new v.default.RCRegistryRosterItemPdu;i.nodeId=t.nodeId,i.nodeData=t.toArrayBuffer();var r=new v.default.RCRegistryRosterUpdateItemPdu;r.type=v.default.RCPDU_REG_ROSTER_UPDATE_PDU,r.items.push(i);var a=new v.default.RCRegistryUpdateObjPdu;a.objId=f.default.CONFERENCE_OBJ_ROSTER_ID,a.subType=r.type,a.userData=r.toArrayBuffer();var o=new v.default.RCAdapterItemPdu;o.type=v.default.RCPDU_REG_UPDATE_OBJ,o.itemData=a.toArrayBuffer();var s=new v.default.RCAdapterPdu;s.type=v.default.RCPDU_REG_ADAPTER,s.item.push(o),this.sendUniform(s,!0)}},{key:"getNodeInfo",value:function(){var e=new v.default.RCNodeInfoRecordPdu;e.nodeId=C.default.nodeId,e.selfSilence=JSON.stringify(C.default.selfSilence)||"",e.name=C.default.userName,e.role=f.default.userTypesToId[C.default.userRole]||1,e.level=C.default.level,e.userData=C.default.userData,e.userId=C.default.userId,e.handUpTime=C.default.handUpTime,e.microphones=C.default.microphones,e.cameras=C.default.cameras,e.openCamera=C.default.openCamera,e.openMicrophones=C.default.openMicrophones,e.videoQuality=C.default.videoQuality,e.userIp=C.default.userIp,e.curVideoQuality=C.default.curVideoQuality,e.micGain=C.default.micGain,e.micNoise=C.default.micNoise,e.autoGain=C.default.autoGain,e.speakerVolume=C.default.speakerVolume,e.micCode=C.default.micCode,e.curCamera=C.default.curCamera,e.curMicrophone=C.default.curMicrophone,e.country=C.default.country,e.city=C.default.city,e.province=C.default.province,e.isp=C.default.isp;for(var t=C.default.msListFinal,n=0;n<t.length;n++){var i=t[n];if(i){var r=new v.default.MsListItemPdu;r.ip=i.ip||"",r.port=i.port||"",r.country=i.country||"",r.province=i.province||"",r.city=i.city||"",r.name=i.name||"",e.msList.push(r)}}return e.msIpPort=C.default.MS_PUBLISH_IP+":"+C.default.MS_PUBLISH_PORT,e.deviceType=C.default.deviceType,e.language=C.default.language,e.explorer=C.default.explorer,e.explorerVersion=C.default.explorerVersion,e.os=C.default.os,e.sdkVersion=C.default.sdkVersion||"未知版本",e}},{key:"updateUserInfo",value:function(){var e=this.getNodeInfo(),t=new v.default.RCNodeInfoUserDataPdu;t.qq="",t.skype="",e.userData=t.toArrayBuffer(),e.deviceType=C.default.deviceType;var n=new v.default.RCRegistryRosterItemPdu;n.nodeId=e.nodeId,n.nodeData=e.toArrayBuffer();var i=new v.default.RCRegistryRosterUpdateItemPdu;i.type=v.default.RCPDU_REG_ROSTER_UPDATE_PDU,i.items.push(n);var r=new v.default.RCRegistryUpdateObjPdu;r.objId=f.default.CONFERENCE_OBJ_ROSTER_ID,r.subType=i.type,r.userData=i.toArrayBuffer();var a=new v.default.RCAdapterItemPdu;a.type=v.default.RCPDU_REG_UPDATE_OBJ,a.itemData=r.toArrayBuffer();var o=new v.default.RCAdapterPdu;o.type=v.default.RCPDU_REG_ADAPTER,o.item.push(a),this.sendUniform(o,!0)}},{key:"sendConferMsg",value:function(e){if(null==this._classInfo||b.default.isEmptyObject(this._classInfo)){if(P.log("不能发送课堂消息.McuClient还未初始化数据!"),0==C.default.getCurrentStatus().code||1==C.default.getCurrentStatus().code)return void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_SEND_FAILED_NO_JOIN)}else{P.log("发送课堂控制消息.",e);var t=new v.default.RCConferenceSendDataRequestPdu;t.type=v.default.RCPDU_SEND_CONFERENCE_DATA_REQUEST,t.initiator=this._classInfo.nodeId,t.peer=parseInt(e.to),t.userData=this._rCArrayBufferUtil.strToUint8Array("h5"+e.message),t.isPublic=!0,t.actionType=e.actionType,t.isPublic||0==t.peer?this.sendChatUniform(t):this.send(t)}}},{key:"sendConferRecordMsg",value:function(e){if(!this.mcu.connected)return P.warn(C.default.getCurrentStatus()),{code:f.default.RETURN_FAILED,data:"已经断开连接"};if(null==e)return void P.warn("控制录制状的消息发送失败,参数错误",e);C.default.recordStatus=e.recordStatus||!1;var t=new v.default.RCConferenceRecordRequestPdu;t.type=v.default.RCPDU_CONFERENCE_RECORD_REQUEST,t.peer=0,t.isPublic=!0,t.initiator=this._classInfo.nodeId,t.record=C.default.recordStatus,t.classTime=C.default.recordTimestamp,t.filename=C.default.recordFileName||C.default.classId+"_"+b.default.creatTimestampYMD()+".rec",this.sendChatUniform(t),P.warn("发送录制消息-》",e)}},{key:"startRecord",value:function(){return C.default.recordTimestamp>=C.default.allowRecordMaxTime?void P.warn("不能再录制,录制时间已经达到最大限制",C.default.recordTimestamp):(P.warn("开启录制","isHost",C.default.isHost,"recordStatus",C.default.recordStatus),void(C.default.isHost&&(C.default.classStopTime=b.default.creatTimestampStr(),this.sendConferRecordMsg({recordStatus:!0}),this._emit(g.default.CLASS_STATUS_INFO_CHANGE),this._emit(g.default.CLASS_RECORD_START))))}},{key:"stopRecord",value:function(e){P.warn("停止录制","isHost",C.default.isHost,"recordStatus",C.default.recordStatus),e&&1==e?C.default.recordStatus&&(C.default.classStopTime=b.default.creatTimestampStr(),this.sendConferRecordMsg({recordStatus:!1}),this._emit(g.default.CLASS_STATUS_INFO_CHANGE)):C.default.isHost&&C.default.recordStatus&&(C.default.classStopTime=b.default.creatTimestampStr(),this.sendConferRecordMsg({recordStatus:!1}),this._emit(g.default.CLASS_STATUS_INFO_CHANGE))}},{key:"leaveClass",value:function(){var e=this.mcu.mcuClassInfo.self,t=new v.default.RCNodeInfoUserDataPdu;t.qq="",t.skype="",e.userData=t.toArrayBuffer(),e.deviceType=C.default.deviceType;var n=new v.default.RCRegistryRosterItemPdu;n.nodeId=e.nodeId,n.nodeData=e.toArrayBuffer();var i=new v.default.RCRegistryRosterDeleteItemPdu;i.type=v.default.RCPDU_REG_ROSTER_DELETE_PDU,i.nodeId=C.default.nodeId;var r=new v.default.RCRegistryUpdateObjPdu;r.objId=f.default.CONFERENCE_OBJ_ROSTER_ID,r.subType=i.type,r.userData=i.toArrayBuffer();var a=new v.default.RCAdapterItemPdu;a.type=v.default.RCPDU_REG_UPDATE_OBJ,a.itemData=r.toArrayBuffer();var o=new v.default.RCAdapterPdu;o.type=v.default.RCPDU_REG_ADAPTER,o.item.push(a),this.sendUniform(o,!0)}},{key:"restorClass",value:function(){C.default.classTimestamp=0,C.default.classStatus=f.default.CLASS_STATUS_WAIT,C.default.classStopTime=b.default.creatTimestampStr(),this.stopRecord(),this._emit(g.default.CLASS_STATUS_INFO_CHANGE),this.sendUpdaterClassStatusInfo({actionType:0,isStopAllPublishMedia:!0}),P.log("restorClass")}},{key:"silenceClass",value:function(e){C.default.isNormal?P.warn("学生没有开启禁言的权限"):(e&&1==e.silence?C.default.silence=!0:C.default.silence=!1,this.sendUpdaterClassStatusInfo(e))}},{key:"changeDrawStatus",value:function(e){C.default.isNormal?P.warn("学生没有开启绘制的权限"):(e&&1==e.isEnableDraw?C.default.isEnableDraw=!0:C.default.isEnableDraw=!1,this.sendUpdaterClassStatusInfo(e))}},{key:"startClass",value:function(e){if(C.default.isHost){var t=b.default.creatTimestampStr();C.default.classStopTime=t;var n=b.default.creatTimestampYMD();C.default.recordFileName=C.default.recordFileName||C.default.siteId+"/"+n+"/"+C.default.classId+"_"+n+".rec",C.default.classStatus==f.default.CLASS_STATUS_WAIT&&(C.default.classStartTime=t),C.default.classStatus=f.default.CLASS_STATUS_STARTED,this.startRecord(),this._emit(g.default.CLASS_STATUS_INFO_CHANGE),this.sendUpdaterClassStatusInfo({actionType:1,isStopAllPublishMedia:!0}),this.startTimerCounter()}else P.warn("没有开始课堂的权限")}},{key:"pauseClass",value:function(e){return C.default.classStatus==f.default.CLASS_STATUS_WAIT?void P.warn("还没有开始,不能点暂停"):(C.default.classStatus=f.default.CLASS_STATUS_PAUSE,C.default.classStopTime=b.default.creatTimestampStr(),this.stopRecord(),this._emit(g.default.CLASS_STATUS_INFO_CHANGE,e),this.sendUpdaterClassStatusInfo({actionType:2,isStopAllPublishMedia:!0}),void this.stopTimerCounter())}},{key:"closeClass",value:function(e){return C.default.classStatus==f.default.CLASS_STATUS_WAIT?void P.warn("还没有开始,不能点关闭"):(this.stopTimerCounter(),this.restorClass(),void this.sendConferMsg({to:0,message:"所有人退出课堂",actionType:f.default.CLASS_ACTION_CLOSE_ALL}))}},{key:"updateDeviceInfo",value:function(e){P.log("更新用户的设备信息->",e),this.updateUserInfo()}},{key:"controlSilenceStatus",value:function(e){return e&&e.nodeId?(e.silence?C.default.silenceUsers[e.userId||e.nodeId]=e:delete C.default.silenceUsers[e.userId||e.nodeId],void this.sendUpdaterClassStatusInfo({silenceUsers:C.default.silenceUsers})):void P.log("控制禁言状态->失败->参数错误",e)}},{key:"changeSilenceStatus",value:function(e){P.log("切换禁言状态->",e),C.default.selfSilence=e.silence||{},this.updateUserInfo()}},{key:"kickOutRosterFormNodeId",value:function(e){return C.default.isNormal?void P.warn("普通身份没有踢人的权限"):void(e&&e.nodeId?this.sendConferMsg({to:parseInt(e.nodeId),message:""+e.nodeId+"踢出课堂",actionType:f.default.CLASS_ACTION_KICK_OUT_ROSTER}):(P.warn("踢人失败-参数无效"),console.log(e)))}},{key:"controlHandUpStatus",value:function(e){if(!e||!e.nodeId)return void P.log("控制举手状态->失败->参数错误",e);var t={};t.nodeId=e.nodeId,t.isHandUp=!1,e&&1==e.isHandUp&&(t.isHandUp=!0),this.sendConferMsg({to:e.nodeId,message:JSON.stringify(t),actionType:f.default.CLASS_ACTION_HANDUP_STATUS_CHANGE})}},{key:"changeHandUpStatus",value:function(e){P.log("切换举手状态->",e),e&&1==e.isHandUp?C.default.handUpTime=b.default.creatTimestamp():C.default.handUpTime=0,this.updateUserInfo()}},{key:"sceneTableChange",value:function(e){C.default.isRecordPlayBack||(P.log("切换文档-媒体-屏幕模块切换->",e),C.default.isHost&&e&&(C.default.currentSceneTableId=parseInt(e.currentSceneTableId)||0,this._emit(g.default.CLASS_STATUS_INFO_CHANGE),this.sendUpdaterClassStatusInfo({actionType:1,isStopAllPublishMedia:!1})))}},{key:"sendUpdaterClassStatusInfo",value:function(e){if(P.log("发送更新课堂信息->"),null==e||b.default.isEmptyObject(e))return P.log("发送更新课堂信息->参数错误"),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=f.default.CONFERENCE_OBJ_TABLE_ID,n=this.packPdu(e,t);if(P.log(n),null==n)return P.log("发送更新课堂信息->参数错误"),void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG);var i=new v.default.RCRegistryTableItemPdu;i.itemIdx=t,i.owner=0,i.registerObjId=f.default.CONFERENCE_OBJ_TABLE_ID,i.itemData=n.toArrayBuffer();var r=new v.default.RCRegistryTableUpdateItemPdu;r.type=v.default.RCPDU_REG_TABLE_UPDATE_PDU,r.items.push(i);var a=new v.default.RCRegistryUpdateObjPdu;a.objId=f.default.CONFERENCE_OBJ_TABLE_ID,a.subType=r.type,a.userData=r.toArrayBuffer();var o=new v.default.RCAdapterItemPdu;o.type=v.default.RCPDU_REG_UPDATE_OBJ,o.itemData=a.toArrayBuffer();var s=new v.default.RCAdapterPdu;s.type=v.default.RCPDU_REG_ADAPTER,s.item.push(o),this.sendUniform(s,!0)}},{key:"onJoinChannelHandlerSuccess",value:function(){P.log("ConferApe.onJoinChannelHandlerSuccess",C.default.classStatus),this.timerCounter.addTimerCallBack(this.timerCounterUptate.bind(this),1),C.default.classStatus==f.default.CLASS_STATUS_STARTED?(this.startTimerCounter(),this.startRecord()):C.default.classStatus==f.default.CLASS_STATUS_WAIT&&C.default.isHost&&C.default.isAutoStartClass&&!C.default.isRecordPlayBack&&(P.log("自动开始上课->classStatus:",C.default.classStatus," isHost:",C.default.isHost," isAutoStartClass:",C.default.isAutoStartClass," isRecordPlayBack:",C.default.isRecordPlayBack),this.startClass())}},{key:"startTimerCounter",value:function(){this.stopTimerCounter(),this.timerCounter&&this.timerCounter.startTimer()}},{key:"stopTimerCounter",value:function(){this.timerCounter&&this.timerCounter.stopTimer()}},{key:"timerCounterUptate",value:function(){return this.mcu.connected||(P.warn("MCU 连接已经断开"),this.stopTimerCounter()),C.default.classStatus!=f.default.CLASS_STATUS_STARTED?void P.warn("当前课堂已经暂停或者未开始,不计时","classStatus-->",C.default.classStatus):(C.default.classTimestamp=C.default.classTimestamp+1,C.default.isHost&&(C.default.recordTimestamp=C.default.recordTimestamp+1),this._emit(g.default.CLASS_UPDATE_TIMER,{classTimestamp:C.default.classTimestamp}),C.default.classTimestamp%C.default.updateClassInfoDelay==0&&C.default.isHost&&(this._emit(g.default.CLASS_STATUS_INFO_CHANGE),this.sendUpdaterClassStatusInfo({actionType:1,isStopAllPublishMedia:!1})),void(C.default.isRecordPlayBack||C.default.classTimestamp%C.default.msDynamicChooseIpDelay!=0||(this._emit(g.default.SWITCH_MS_IP),this._emit(g.default.SWITCH_RTMP_PULL_IP),this._emit(g.default.SWITCH_HLS_IP))))}},{key:"tableUpdateHandler",value:function(e,t,n){try{var i=this.unPackPdu(e,t,n);if(i&&i.classStatusInfo){try{i.classStatusInfo.silenceUsers=JSON.parse(i.classStatusInfo.silenceUsers)}catch(e){}C.default.setClassStatusInfo(i.classStatusInfo),i.classStatusInfo.isStopAllPublishMedia&&this._emit(g.default.STOP_ALL_MEDIA_PUBLISH)}var r=C.default.classStatusInfo;if(this._emit(g.default.CLASS_UPTATE_STATUS,r),!this.mcu.connected)return void this.stopTimerCounter();C.default.classStatus==f.default.CLASS_STATUS_STARTED?this.startTimerCounter():this.stopTimerCounter()}catch(e){P.warn("ConferApe table update got exception->err",e.message)}}},{key:"conferMsgComingHandler",value:function(e){var t=v.default.RCConferenceSendDataRequestPdu.decode(e),n={};switch(n.fromNodeID=t.initiator,n.toNodeID=t.peer,n.message=this._rCArrayBufferUtil.uint8ArrayToStr(t.userData,2),n.actionType=t.actionType,P.log("课堂控制消息",n),n.actionType){case f.default.CLASS_ACTION_CLOSE_ALL:P.log(n.message),this._emit(g.default.CLASS_RUN_EXIT,{type:1});break;case f.default.CLASS_ACTION_KICK_OUT_ROSTER:n.toNodeID==C.default.nodeId&&this._emit(g.default.CLASS_RUN_EXIT,{type:2});break;case f.default.CLASS_ACTION_HANDUP_STATUS_CHANGE:var i=null;try{i=JSON.parse(n.message),i&&i.nodeId==C.default.nodeId&&this.changeHandUpStatus(i)}catch(e){P.warn("chatMsg->JSON数据解析失败")}break;case f.default.USER_ACTION_SILENCE_STATUS_CHANGE:var r=null;try{r=JSON.parse(n.message),r&&r.nodeId==C.default.nodeId&&this.changeSilenceStatus(r)}catch(e){P.warn("chatMsg->JSON数据解析失败")}}}},{key:"onThirdReciveParentMessage",value:function(e){P.log("收到页面的消息->广播给其他模块->",e);var t=e;try{t=JSON.parse(e)}catch(e){}this.sendThirdBroadcastData({to:0,message:t})}},{key:"sendThirdBroadcastData",value:function(e){if(P.log("发送第三方广播消息->",e),null==this._classInfo||b.default.isEmptyObject(this._classInfo)){if(P.log("发送第三方广播消息->失败->SDK还未初始化数据!"),0==C.default.getCurrentStatus().code||1==C.default.getCurrentStatus().code)return void this._emit(g.default.MCU_ERROR,g.default.ERR_APE_SEND_FAILED_NO_JOIN)}else{var t=new v.default.RCThirdSendBroadcastDataRequestPdu;t.type=v.default.RCPDU_THIRD_BROADCAST_DATA_REQUEST,t.initiator=this._classInfo.nodeId,t.peer=parseInt(e.to)||0,t.isPublic=!0;var n=e.message||"";try{n=JSON.stringify(n)}catch(e){}t.message=this._rCArrayBufferUtil.strToUint8Array("h5"+n),t.isPublic||0==t.peer?this.sendChatUniform(t):this.send(t)}}},{key:"onThirdBroadcastDataHandler",value:function(e){var t=v.default.RCThirdSendBroadcastDataRequestPdu.decode(e),n={};n.fromNodeID=t.initiator,n.toNodeID=t.peer,n.message=this._rCArrayBufferUtil.uint8ArrayToStr(t.message,2),P.log("收到第三方消息通道消息->",n),this._emit(g.default.RECEIVE_THIRD_MESSGAE,n),this.thirdMessage&&this.thirdMessage.sendMessageToParent(n.message)}},{key:"onSendConferRecordRequestHandler",value:function(e){try{var t=v.default.RCConferenceRecordRequestPdu.decode(e);P.log("录制回放控制操作成功->",t),(t&&1==t.record||"true"==t.record)&&this._emit(g.default.CLASS_RECORD_SUCCESS)}catch(e){P.warn("录制回放控制操作错误->",e.message)}}},{key:"rosterInsertHandler",value:function(e,t){C.default.nodeId==e||this.rosterUpdateHandler(e,t)}},{key:"rosterUpdateHandler",value:function(e,t){if(t.userRole=f.default.userTypes[t.role],e==C.default.nodeId)return this.rosterLen=Object.keys(this.rosters).length,C.default.rosterNumber=this.rosterLen,this.rosterLen<1&&!C.default.isHost&&C.default.classStatus==f.default.CLASS_STATUS_STARTED&&(P.warn("当前课堂没有老师->暂停课堂"),this.pauseClass({isForce:!0}),this.stopRecord(!0)),void this.unPackRosterInfo(e,t);if(parseInt(e)>C.default.nodeId){var n={userId:t.userId,userName:t.name,nodeId:t.nodeId,userRole:t.userRole,deviceType:t.deviceType};if(t.role==f.default.NR_HOST&&C.default.isHost)return void this.kickOutRoster(n);t.userId==C.default.userId&&"0"!=C.default.userId&&(P.log("异地登陆->userId->",C.default.userId),this._emit(g.default.MCU_ERROR,{type:g.default.ERR_CLASS_REMOTE_LANDING,data:n}),this._emit(g.default.CLASS_RUN_EXIT,{type:1}))}this.unPackRosterInfo(e,t)}},{key:"unPackRosterInfo",value:function(e,t){var n=this.rosters[e];this.rosters[e]=t;var i=null;try{i=v.default.RCNodeInfoUserDataPdu.decode(t.userData)}catch(e){P.log("RCNodeInfoUserDataPdu decode err",e.message)}var r=t;return r.userData=i,t.role==f.default.NR_INVISIBLE&&C.default.userRole!=f.default.invisible?void P.log("NR_INVISIBLE"):void(n?(this.rosterLen=Object.keys(this.rosters).length,C.default.rosterNumber=this.rosterLen,r.rosterLen=this.rosterLen,P.log("人员更新信息->",r),this._emit(g.default.CLASS_UPDATE_ROSTER,{nodeId:e,nodeData:r})):(this.rosterLen=Object.keys(this.rosters).length,C.default.rosterNumber=this.rosterLen,r.rosterLen=this.rosterLen,this._emit(g.default.CLASS_INSERT_ROSTER,{nodeId:e,nodeData:r}),this.emitRosterChange()))}},{key:"kickOutRoster",value:function(e){this._emit(g.default.MCU_ERROR,{type:g.default.ERR_CLASS_KICK_OUT,data:e}),this._emit(g.default.CLASS_RUN_EXIT,{type:1})}},{key:"updaterRosterStatus",value:function(e){e&&e.status==f.default.CHANNEL_STATUS_OPENING&&null==this.rosters[e.fromNodeId]&&(P.log("媒体模块被占用->占有人已经不存在课堂中->释放->",e),this._emit(g.default.CLASS_NONENTITY_ROSTER,{nodeId:e.fromNodeId}))}},{key:"updaterUserDeviecStatusChange",value:function(e){P.log("音视频设备状态更新->",e),this.updateUserInfo()}},{key:"rosterDelHandler",value:function(e){if(C.default.nodeId==e)P.log("自己离开课堂"),this._emit(g.default.CLASS_RUN_EXIT,{type:0});else{var t=this.rosters[e];t&&P.log(e,"->离开课堂->身份->",t.userRole),delete this.rosters[e],this.rosterLen=Object.keys(this.rosters).length,C.default.rosterNumber=this.rosterLen,this.emitRosterChange(),this._emit(g.default.CLASS_DELETE_ROSTER,{nodeId:e,rosterLen:this.rosterLen});for(var n in this.rosters){var i=parseInt(n);return void(i==C.default.nodeId?(P.log(i,"有权限检查离开的人员是否占用channel"),this._emit(g.default.CLASS_NONENTITY_ROSTER,{nodeId:e,rosterLen:this.rosterLen}),t&&t.role==f.default.NR_HOST&&(this.pauseClass(),this.stopRecord(!0))):P.warn(C.default.nodeId,"没有权限检查离开的人员是否占用channel"))}}}},{key:"emitRosterChange",value:function(){this._emit(g.default.CLASS_UPDATE_ROSTER_NUM,Object.keys(this.rosters).length)}},{key:"packPdu",value:function(e,t){if(null==e||null==t)return this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new v.default.RCClassStatusInfoPdu;n.nodeId=C.default.nodeId,n.userId=C.default.userId,n.userName=C.default.userName,n.siteId=C.default.siteId,n.classId=C.default.classId,n.className=C.default.className,n.classType=C.default.classType,n.classStatus=C.default.classStatus,n.classStartTime=C.default.classStartTime,n.classStopTime=C.default.classStopTime,n.classTimestamp=C.default.classTimestamp,n.classBeginTime=C.default.classBeginTime,n.classEndTime=C.default.classEndTime,n.recordStatus=C.default.recordStatus,n.recordTimestamp=C.default.recordTimestamp,n.recordFileName=C.default.recordFileName,n.recordDownloadUrl=C.default.recordDownloadUrl,n.serverTimestamp=C.default.serverTimestamp,n.activeDocId=C.default.activeDocId,n.activeDocCurPage=C.default.activeDocCurPage,n.isStopAllPublishMedia=e.isStopAllPublishMedia||!1,n.currentSceneTableId=C.default.currentSceneTableId,n.silence=C.default.silence,n.silenceUsers=JSON.stringify(C.default.silenceUsers),n.isEnableDraw=C.default.isEnableDraw;var i=new v.default.RCClassSendDataModelPdu;return i.itemIdx=t,i.from=C.default.nodeId,i.owner=C.default.nodeId,i.classStatusInfo=n,i}},{key:"unPackPdu",value:function(e,t,n){if(null==e||null==t||null==n)return this._emit(g.default.MCU_ERROR,g.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var i=v.default.RCClassSendDataModelPdu.decode(n);return i}catch(e){P.log("课堂收到数据 unPackPdu Pdu解析错误,itemIdx="+t+"  err:"+e.message)}return null}}]),t}(d.default),D=O;t.default=D,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(P,"loger","D:/work/McuClient/src/apes/ConferApe.js"),__REACT_HOT_LOADER__.register(O,"ConferApe","D:/work/McuClient/src/apes/ConferApe.js"),__REACT_HOT_LOADER__.register(D,"default","D:/work/McuClient/src/apes/ConferApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(7),d=r(u),c=n(1),f=r(c),h=n(45),p=r(h),_=f.default.getLoger("ThirdMessage"),g=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));try{e.messenger=new p.default(t.IFRAME_MESSAGE_ID,t.PARENT_MESAGE_ID),e.messenger.addTarget(window.parent,t.PARENT),e.messenger.listen(e._reciveParentMessage.bind(e)),_.log("ThirdMessage")}catch(e){console.warn("第三方消息通道创建失败")}return e}return s(t,e),l(t,[{key:"sendMessageToParent",value:function(e){if(!e)return void _.warn("发送的消息内容无效->",e);if(this.messenger){var t="";try{t=JSON.stringify(e)}catch(n){t=e}_.log("发送消息给父级页面->",e),this.messenger.send(t)}}},{key:"_reciveParentMessage",value:function(e){return _.log("收到父级页面的的消息->",e),e?void this._emit(t.RECIVE_MESSAGE,e):void _.warn("收到父级页面的的消息->内容无效->",e)}}]),t}(d.default);g.prototype.RECIVE_MESSAGE=g.RECIVE_MESSAGE="recive_message",g.prototype.IFRAME_MESSAGE_ID=g.IFRAME_MESSAGE_ID="xuedianyunIframe",
g.prototype.PARENT_MESAGE_ID=g.PARENT_MESAGE_ID="ParentMessengerChannel",g.prototype.PARENT=g.PARENT="parent";var m=g;t.default=m,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(_,"loger","D:/work/McuClient/src/apes/ThirdMessage.js"),__REACT_HOT_LOADER__.register(g,"ThirdMessage","D:/work/McuClient/src/apes/ThirdMessage.js"),__REACT_HOT_LOADER__.register(m,"default","D:/work/McuClient/src/apes/ThirdMessage.js"))}()},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(1),s=i(o),l=n(3),u=(i(l),n(5)),d=(i(u),s.default.getLoger("ServerConfig")),c=function(){function e(){r(this,e)}return a(e,null,[{key:"serverList",set:function(e){this.serverListData=e||{}},get:function(){return this.serverListData}}]),e}();c.sassServerJson={MS:{},MCU:{}},c.localServerJson={MS:{},MCU:{}},c.serverListData={MS:{},MCU:{}};var f=c;t.default=f,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(d,"loger","D:/work/McuClient/src/config/ServerConfig.js"),__REACT_HOT_LOADER__.register(c,"ServerConfig","D:/work/McuClient/src/config/ServerConfig.js"),__REACT_HOT_LOADER__.register(f,"default","D:/work/McuClient/src/config/ServerConfig.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l="function"==typeof Symbol&&"symbol"==i(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":i(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":i(e)},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=n(7),c=r(d),f=n(4),h=r(f),p=n(1),_=r(p),g=n(51),m=r(g),v=n(6),y=r(v),E=n(18),S=r(E),T=n(12),C=r(T),R=n(3),b=r(R),w=n(23),A=(r(w),n(11)),I=r(A),P=n(14),O=r(P),D=n(2),k=r(D),L=n(5),N=r(L),M=_.default.getLoger("MCU"),x=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._apes={},e._everSocket=m.default,e._everSocket.on(m.default.OPEN,e._everSocketOpenHandler.bind(e)),e._everSocket.on(m.default.MESSAGE,e._everSocketMsgReceivedHandler.bind(e)),e._everSocket.on(m.default.CLOSED,e._everSocketCloseHandler.bind(e)),e._everSocket.on(m.default.ERROR,e._everSocketErrorHandler.bind(e)),e}return s(t,e),u(t,[{key:"registerApe",value:function(e){this._apes[e._session_id]=e}},{key:"_everSocketOpenHandler",value:function(){this._sendJoinClassRequest()}},{key:"_everSocketCloseHandler",value:function(){return k.default.getCurrentStatus().code==k.default.statusCode_3.code?void M.warn("已经断开连接->"):(k.default.setCurrentStatus(k.default.statusCode_3),void this._emit(h.default.MCU_ERROR,h.default.ERR_SOCKET_DISCONNECT))}},{key:"_everSocketErrorHandler",value:function(e){e==m.default.ERR_SOCKET_RECONNECT_FAILED&&this._emit(h.default.SWITCH_MCU_IP)}},{key:"_sendJoinClassRequest",value:function(){M.log("MCU-发送加入课堂请求."),M.log(this.classInfo);var e=new y.default.RCConferenceDescriptorPdu;e.id=this.classInfo.classId,e.name=this.classInfo.className||"",e.mode=0,e.capacity=1;var t=new y.default.RCConferenceJoinRequestPdu;t.type=2,t.initiator=this.classInfo.nodeId,t.nodeType=C.default.NT_TERMINAL,t.classDescription=e;var n=y.default.create_join_class_request_pdu(t.type,this.classInfo.nodeId,this.classInfo.classId,0,b.default.BROADCAST_CHANNEL_ID,!0,C.default.DP_TOP,this.classInfo.topNodeID,C.default.SEG_ONCE);n.set("site",this.classInfo.siteId),n.set("userId",this.classInfo.userId),n.set("userName",O.default.fromByteArray(I.default.strToUint8Array(this.classInfo.userName))),n.set("userRole",this.classInfo.userRole),n.set("deviceType",""+k.default.deviceType),n.set("data",t.toArrayBuffer()),this._everSocket.send(n.toArrayBuffer())}},{key:"_everSocketMsgReceivedHandler",value:function(e){var t=this,n=y.default.decode_pdu(e),i=n.get("type"),r=n.get("data"),a=function(){switch(i){case S.default.RCPDU_CONNECT_PROVIDER_RESPONSE:var e=y.default.RCConferenceJoinResponsePdu.decode(r),a=e.result;switch(M.warn("RCPDU_CONNECT_PROVIDER_RESPONSE  ->pduResultCode:"+a),a){case C.default.RET_SUCCESS:t._updateMCUConfInfoDescription(e.classDescription),t._emit(h.default.CLASS_JOIN_MCU_SUCCESS,t.classInfo);break;case C.default.RET_FULL_CAPACITY:t._emit(h.default.MCU_ERROR,h.default.ERR_CLASS_JOIN_FULL);break;default:M.arn("JoinConfPdu-未知类型-等待处理.",a)}break;case S.default.RCPDU_SEND_DATA_REQUEST:var o=t._apes[n.sessionId],s=(0,b.default)(n.sessionId);if(o){if(y.default.id2type(n.subType),k.default.messageDelay&&k.default.messageDelay.indexOf(s)!==-1&&k.default.mcuDelay>0)return M.warn("延迟处理消息->",k.default.mcuDelay),setTimeout(function(){o._emit(n.subType,n.data)},1e3*k.default.mcuDelay),{v:void 0};o._emit(n.subType,n.data)}else M.warn(s+"尚未注册");break;default:M.warn("PDU-未知类型-等待处理.",i)}}();if("object"===("undefined"==typeof a?"undefined":l(a)))return a.v}},{key:"_updateMCUConfInfoDescription",value:function(e){M.log("_updateMCUConfInfoDescription."),M.log(e)}},{key:"send",value:function(e){this.connected?this._everSocket.send(e.toArrayBuffer()):(M.warn("发送数据到服务端-------------------->失败->未连接到服务端"),this._emit(h.default.MCU_ERROR,h.default.ERR_SOCKET_DISCONNECT))}},{key:"leaveMCU",value:function(){for(var e in this._apes)this._apes[e].stopApe();M.log("leaveMCU"),k.default.setCurrentStatus(k.default.statusCode_3),k.default.classJoinSuccess=!1,this._everSocket.end()}},{key:"joinMCU",value:function(e){M.log("开始建立EverSocket通道."),k.default.classJoinSuccess=!1,M.log(e),e.classId=parseInt(e.classId),this.classInfo=e,this.classInfo.nodeId=N.default.creatSoleNumberFromTimestamp(),k.default.nodeId=this.classInfo.nodeId;var t=new y.default.RCNodeInfoRecordPdu;t.name=this.classInfo.userName,t.nodeId=this.classInfo.nodeId,t.userId=this.classInfo.userId,t.role=b.default.userTypesToId[this.classInfo.userRole]||1,t.level=0,t.handUpTime=0,t.openCamera=0,t.openMicrophones=0,t.microphones=k.default.microphones,t.cameras=k.default.cameras,t.videoQuality=k.default.videoQuality,t.userIp=k.default.userIp,t.deviceType=k.default.deviceType,t.language=k.default.language,t.explorer=k.default.explorer,t.explorerVersion=k.default.explorerVersion,t.os=k.default.os;var n={};n._conference_id=this.classInfo.classId,n._top_node_id=this.classInfo.topNodeID,this.mcuClassInfo={},this.mcuClassInfo.self=t,this.mcuClassInfo.info=n,this.classInfo.mcuClassInfo=this.mcuClassInfo,this._everSocket.begin(this.classInfo.MCUServerIP,this.classInfo.MCUServerPort)}},{key:"switchMCUIp",value:function(e){e&&e.MCUServerIP&&(this.classInfo.MCUServerIP=e.MCUServerIP,this.classInfo.MCUServerPort=e.MCUServerPort,this._everSocket&&this._everSocket.switchSocketIp(this.classInfo.MCUServerIP,this.classInfo.MCUServerPort))}},{key:"connected",get:function(){return!(!this._everSocket||!this._everSocket.connected)}}]),t}(c.default),U=new x;t.default=U,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(M,"loger","D:/work/McuClient/src/mcu.js"),__REACT_HOT_LOADER__.register(x,"MCU","D:/work/McuClient/src/mcu.js"),__REACT_HOT_LOADER__.register(U,"default","D:/work/McuClient/src/mcu.js"))}()},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function r(e){if(d===setTimeout)return setTimeout(e,0);if((d===n||!d)&&setTimeout)return d=setTimeout,setTimeout(e,0);try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}function a(e){if(c===clearTimeout)return clearTimeout(e);if((c===i||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{return c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}function o(){_&&h&&(_=!1,h.length?p=h.concat(p):g=-1,p.length&&s())}function s(){if(!_){var e=r(o);_=!0;for(var t=p.length;t;){for(h=p,p=[];++g<t;)h&&h[g].run();g=-1,t=p.length}h=null,_=!1,a(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var d,c,f=e.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:n}catch(e){d=n}try{c="function"==typeof clearTimeout?clearTimeout:i}catch(e){c=i}}();var h,p=[],_=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new l(e,t)),1!==p.length||_||r(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){var r,a,o;(function(e){!function(s,l){n(13).amd?(a=[n(19)],r=l,o="function"==typeof r?r.apply(t,a):r,!(void 0!==o&&(e.exports=o))):"object"==("undefined"==typeof e?"undefined":i(e))&&e&&e.exports?e.exports=function(){var e;try{e=n(19)}catch(e){}return l(e)}():(s.dcodeIO=s.dcodeIO||{}).ByteBuffer=l(s.dcodeIO.Long)}(this,function(e){function t(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function n(){var e=[],t=[];return function(){return 0===arguments.length?t.join("")+u.apply(String,e):(e.length+arguments.length>1024&&(t.push(u.apply(String,e)),e.length=0),void Array.prototype.push.apply(e,arguments))}}function r(e,t,n,i,r){var a,o,s=8*r-i-1,l=(1<<s)-1,u=l>>1,d=-7,c=n?r-1:0,f=n?-1:1,h=e[t+c];for(c+=f,a=h&(1<<-d)-1,h>>=-d,d+=s;d>0;a=256*a+e[t+c],c+=f,d-=8);for(o=a&(1<<-d)-1,a>>=-d,d+=i;d>0;o=256*o+e[t+c],c+=f,d-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:(h?-1:1)*(1/0);o+=Math.pow(2,i),a-=u}return(h?-1:1)*o*Math.pow(2,a-i)}function a(e,t,n,i,r,a){var o,s,l,u=8*a-r-1,d=(1<<u)-1,c=d>>1,f=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:a-1,p=i?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=d):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+c>=1?f/l:f*Math.pow(2,1-c),t*l>=2&&(o++,l/=2),o+c>=d?(s=0,o=d):o+c>=1?(s=(t*l-1)*Math.pow(2,r),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,r),o=0));r>=8;e[n+h]=255&s,h+=p,s/=256,r-=8);for(o=o<<r|s,u+=r;u>0;e[n+h]=255&o,h+=p,o/=256,u-=8);e[n+h-p]|=128*_}var o=function e(t,n,i){if("undefined"==typeof t&&(t=e.DEFAULT_CAPACITY),"undefined"==typeof n&&(n=e.DEFAULT_ENDIAN),"undefined"==typeof i&&(i=e.DEFAULT_NOASSERT),!i){if(t|=0,t<0)throw RangeError("Illegal capacity");n=!!n,i=!!i}this.buffer=0===t?l:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=n,this.noAssert=i};o.VERSION="5.0.1",o.LITTLE_ENDIAN=!0,o.BIG_ENDIAN=!1,o.DEFAULT_CAPACITY=16,o.DEFAULT_ENDIAN=o.BIG_ENDIAN,o.DEFAULT_NOASSERT=!1,o.Long=e||null;var s=o.prototype;s.__isByteBuffer__,Object.defineProperty(s,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var l=new ArrayBuffer(0),u=String.fromCharCode;o.accessor=function(){return Uint8Array},o.allocate=function(e,t,n){return new o(e,t,n)},o.concat=function(e,t,n,i){"boolean"!=typeof t&&"string"==typeof t||(i=n,n=t,t=void 0);for(var r,a=0,s=0,l=e.length;s<l;++s)o.isByteBuffer(e[s])||(e[s]=o.wrap(e[s],t)),r=e[s].limit-e[s].offset,r>0&&(a+=r);if(0===a)return new o(0,n,i);var u,d=new o(a,n,i);for(s=0;s<l;)u=e[s++],r=u.limit-u.offset,r<=0||(d.view.set(u.view.subarray(u.offset,u.limit),d.offset),d.offset+=r);return d.limit=d.offset,d.offset=0,d},o.isByteBuffer=function(e){return(e&&e.__isByteBuffer__)===!0},o.type=function(){return ArrayBuffer},o.wrap=function(e,t,n,r){if("string"!=typeof t&&(r=n,n=t,t=void 0),"string"==typeof e)switch("undefined"==typeof t&&(t="utf8"),t){case"base64":return o.fromBase64(e,n);case"hex":return o.fromHex(e,n);case"binary":return o.fromBinary(e,n);case"utf8":return o.fromUTF8(e,n);case"debug":return o.fromDebug(e,n);default:throw Error("Unsupported encoding: "+t)}if(null===e||"object"!=("undefined"==typeof e?"undefined":i(e)))throw TypeError("Illegal buffer");var a;if(o.isByteBuffer(e))return a=s.clone.call(e),a.markedOffset=-1,a;if(e instanceof Uint8Array)a=new o(0,n,r),e.length>0&&(a.buffer=e.buffer,a.offset=e.byteOffset,a.limit=e.byteOffset+e.byteLength,a.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)a=new o(0,n,r),e.byteLength>0&&(a.buffer=e,a.offset=0,a.limit=e.byteLength,a.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");a=new o(e.length,n,r),a.limit=e.length;for(var l=0;l<e.length;++l)a.view[l]=e[l]}return a},s.writeBitSet=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i,r=t,a=e.length,o=a>>3,s=0;for(t+=this.writeVarint32(a,t);o--;)i=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(i,t++);if(s<a){var l=0;for(i=0;s<a;)i|=(1&!!e[s++])<<l++;this.writeByte(i,t++)}return n?(this.offset=t,this):t-r},s.readBitSet=function(e){var t="undefined"==typeof e;t&&(e=this.offset);var n,i=this.readVarint32(e),r=i.value,a=r>>3,o=0,s=[];for(e+=i.length;a--;)n=this.readByte(e++),s[o++]=!!(1&n),s[o++]=!!(2&n),s[o++]=!!(4&n),s[o++]=!!(8&n),s[o++]=!!(16&n),s[o++]=!!(32&n),s[o++]=!!(64&n),s[o++]=!!(128&n);if(o<r){var l=0;for(n=this.readByte(e++);o<r;)s[o++]=!!(n>>l++&1)}return t&&(this.offset=e),s},s.readBytes=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var i=this.slice(t,t+e);return n&&(this.offset+=e),i},s.writeBytes=s.append,s.writeInt8=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=1,this.view[t]=e,n&&(this.offset+=1),this},s.writeByte=s.writeInt8,s.readInt8=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=this.view[e];return 128===(128&n)&&(n=-(255-n+1)),t&&(this.offset+=1),n},s.readByte=s.readInt8,s.writeUint8=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=1,this.view[t]=e,n&&(this.offset+=1),this},s.writeUInt8=s.writeUint8,s.readUint8=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=this.view[e];return t&&(this.offset+=1),n},s.readUInt8=s.readUint8,s.writeInt16=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},s.writeShort=s.writeInt16,s.readInt16=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),32768===(32768&n)&&(n=-(65535-n+1)),t&&(this.offset+=2),n},s.readShort=s.readInt16,s.writeUint16=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},s.writeUInt16=s.writeUint16,s.readUint16=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),t&&(this.offset+=2),n},s.readUInt16=s.readUint16,s.writeInt32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},s.writeInt=s.writeInt32,s.readInt32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),n|=0,t&&(this.offset+=4),n},s.readInt=s.readInt32,s.writeUint32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},s.writeUInt32=s.writeUint32,s.readUint32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),t&&(this.offset+=4),n},s.readUInt32=s.readUint32,e&&(s.writeInt64=function(t,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t)),n+=8;var r=this.buffer.byteLength;n>r&&this.resize((r*=2)>n?r:n),n-=8;var a=t.low,o=t.high;return this.littleEndian?(this.view[n+3]=a>>>24&255,this.view[n+2]=a>>>16&255,this.view[n+1]=a>>>8&255,this.view[n]=255&a,n+=4,this.view[n+3]=o>>>24&255,this.view[n+2]=o>>>16&255,this.view[n+1]=o>>>8&255,this.view[n]=255&o):(this.view[n]=o>>>24&255,this.view[n+1]=o>>>16&255,this.view[n+2]=o>>>8&255,this.view[n+3]=255&o,n+=4,this.view[n]=a>>>24&255,this.view[n+1]=a>>>16&255,this.view[n+2]=a>>>8&255,this.view[n+3]=255&a),i&&(this.offset+=8),this},s.writeLong=s.writeInt64,s.readInt64=function(t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var i=0,r=0;this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0,t+=4,r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0,t+=4,i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0);var a=new e(i,r,!1);return n&&(this.offset+=8),a},s.readLong=s.readInt64,s.writeUint64=function(t,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t)),n+=8;var r=this.buffer.byteLength;n>r&&this.resize((r*=2)>n?r:n),n-=8;var a=t.low,o=t.high;return this.littleEndian?(this.view[n+3]=a>>>24&255,this.view[n+2]=a>>>16&255,this.view[n+1]=a>>>8&255,this.view[n]=255&a,n+=4,this.view[n+3]=o>>>24&255,this.view[n+2]=o>>>16&255,this.view[n+1]=o>>>8&255,this.view[n]=255&o):(this.view[n]=o>>>24&255,this.view[n+1]=o>>>16&255,this.view[n+2]=o>>>8&255,this.view[n+3]=255&o,n+=4,this.view[n]=a>>>24&255,this.view[n+1]=a>>>16&255,this.view[n+2]=a>>>8&255,this.view[n+3]=255&a),i&&(this.offset+=8),this},s.writeUInt64=s.writeUint64,s.readUint64=function(t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var i=0,r=0;this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0,t+=4,r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0,t+=4,i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0);var a=new e(i,r,!0);return n&&(this.offset+=8),a},s.readUInt64=s.readUint64),s.writeFloat32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=4,a(this.view,e,t,this.littleEndian,23,4),n&&(this.offset+=4),this},s.writeFloat=s.writeFloat32,s.readFloat32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=r(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),n},s.readFloat=s.readFloat32,s.writeFloat64=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=8,a(this.view,e,t,this.littleEndian,52,8),n&&(this.offset+=8),this},s.writeDouble=s.writeFloat64,s.readFloat64=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=r(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),n},s.readDouble=s.readFloat64,o.MAX_VARINT32_BYTES=5,o.calculateVarint32=function(e){return e>>>=0,e<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},o.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},o.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},s.writeVarint32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i,r=o.calculateVarint32(e);t+=r;var a=this.buffer.byteLength;for(t>a&&this.resize((a*=2)>t?a:t),t-=r,e>>>=0;e>=128;)i=127&e|128,this.view[t++]=i,e>>>=7;return this.view[t++]=e,n?(this.offset=t,this):r},s.writeVarint32ZigZag=function(e,t){return this.writeVarint32(o.zigZagEncode32(e),t)},s.readVarint32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n,i=0,r=0;do{if(!this.noAssert&&e>this.limit){var a=Error("Truncated");throw a.truncated=!0,a}n=this.view[e++],i<5&&(r|=(127&n)<<7*i),++i}while(0!==(128&n));return r|=0,t?(this.offset=e,r):{value:r,length:i}},s.readVarint32ZigZag=function(e){var t=this.readVarint32(e);return"object"==("undefined"==typeof t?"undefined":i(t))?t.value=o.zigZagDecode32(t.value):t=o.zigZagDecode32(t),t},e&&(o.MAX_VARINT64_BYTES=10,o.calculateVarint64=function(t){"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t));var n=t.toInt()>>>0,i=t.shiftRightUnsigned(28).toInt()>>>0,r=t.shiftRightUnsigned(56).toInt()>>>0;return 0==r?0==i?n<16384?n<128?1:2:n<1<<21?3:4:i<16384?i<128?5:6:i<1<<21?7:8:r<128?9:10},o.zigZagEncode64=function(t){return"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):t.unsigned!==!1&&(t=t.toSigned()),t.shiftLeft(1).xor(t.shiftRight(63)).toUnsigned()},o.zigZagDecode64=function(t){return"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):t.unsigned!==!1&&(t=t.toSigned()),t.shiftRightUnsigned(1).xor(t.and(e.ONE).toSigned().negate()).toSigned()},s.writeVarint64=function(t,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):t.unsigned!==!1&&(t=t.toSigned());var r=o.calculateVarint64(t),a=t.toInt()>>>0,s=t.shiftRightUnsigned(28).toInt()>>>0,l=t.shiftRightUnsigned(56).toInt()>>>0;n+=r;var u=this.buffer.byteLength;switch(n>u&&this.resize((u*=2)>n?u:n),n-=r,r){case 10:this.view[n+9]=l>>>7&1;case 9:this.view[n+8]=9!==r?128|l:127&l;case 8:this.view[n+7]=8!==r?s>>>21|128:s>>>21&127;case 7:this.view[n+6]=7!==r?s>>>14|128:s>>>14&127;case 6:this.view[n+5]=6!==r?s>>>7|128:s>>>7&127;case 5:this.view[n+4]=5!==r?128|s:127&s;case 4:this.view[n+3]=4!==r?a>>>21|128:a>>>21&127;case 3:this.view[n+2]=3!==r?a>>>14|128:a>>>14&127;case 2:this.view[n+1]=2!==r?a>>>7|128:a>>>7&127;case 1:this.view[n]=1!==r?128|a:127&a}return i?(this.offset+=r,this):r},s.writeVarint64ZigZag=function(e,t){return this.writeVarint64(o.zigZagEncode64(e),t)},s.readVarint64=function(t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=t,r=0,a=0,o=0,s=0;if(s=this.view[t++],r=127&s,128&s&&(s=this.view[t++],r|=(127&s)<<7,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],r|=(127&s)<<14,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],r|=(127&s)<<21,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],
a=127&s,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],a|=(127&s)<<7,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],a|=(127&s)<<14,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],a|=(127&s)<<21,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],o=127&s,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],o|=(127&s)<<7,128&s||this.noAssert&&"undefined"==typeof s))))))))))throw Error("Buffer overrun");var l=e.fromBits(r|a<<28,a>>>4|o<<24,!1);return n?(this.offset=t,l):{value:l,length:t-i}},s.readVarint64ZigZag=function(t){var n=this.readVarint64(t);return n&&n.value instanceof e?n.value=o.zigZagDecode64(n.value):n=o.zigZagDecode64(n),n}),s.writeCString=function(e,n){var i="undefined"==typeof n;i&&(n=this.offset);var r,a=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(r=0;r<a;++r)if(0===e.charCodeAt(r))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}a=c.calculateUTF16asUTF8(t(e))[1],n+=a+1;var o=this.buffer.byteLength;return n>o&&this.resize((o*=2)>n?o:n),n-=a+1,c.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),this.view[n++]=0,i?(this.offset=n,this):a},s.readCString=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,r=e,a=-1;return c.decodeUTF8toUTF16(function(){if(0===a)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return a=this.view[e++],0===a?null:a}.bind(this),i=n(),!0),t?(this.offset=e,i()):{string:i(),length:e-r}},s.writeIString=function(e,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var r,a=n;r=c.calculateUTF16asUTF8(t(e),this.noAssert)[1],n+=4+r;var o=this.buffer.byteLength;if(n>o&&this.resize((o*=2)>n?o:n),n-=4+r,this.littleEndian?(this.view[n+3]=r>>>24&255,this.view[n+2]=r>>>16&255,this.view[n+1]=r>>>8&255,this.view[n]=255&r):(this.view[n]=r>>>24&255,this.view[n+1]=r>>>16&255,this.view[n+2]=r>>>8&255,this.view[n+3]=255&r),n+=4,c.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),n!==a+4+r)throw RangeError("Illegal range: Truncated data, "+n+" == "+(n+4+r));return i?(this.offset=n,this):n-a},s.readIString=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=e,i=this.readUint32(e),r=this.readUTF8String(i,o.METRICS_BYTES,e+=4);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-n}},o.METRICS_CHARS="c",o.METRICS_BYTES="b",s.writeUTF8String=function(e,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var r,a=n;r=c.calculateUTF16asUTF8(t(e))[1],n+=r;var o=this.buffer.byteLength;return n>o&&this.resize((o*=2)>n?o:n),n-=r,c.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),i?(this.offset=n,this):n-a},s.writeString=s.writeUTF8String,o.calculateUTF8Chars=function(e){return c.calculateUTF16asUTF8(t(e))[0]},o.calculateUTF8Bytes=function(e){return c.calculateUTF16asUTF8(t(e))[1]},o.calculateString=o.calculateUTF8Bytes,s.readUTF8String=function(e,t,i){"number"==typeof t&&(i=t,t=void 0);var r="undefined"==typeof i;if(r&&(i=this.offset),"undefined"==typeof t&&(t=o.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var a,s=0,l=i;if(t===o.METRICS_CHARS){if(a=n(),c.decodeUTF8(function(){return s<e&&i<this.limit?this.view[i++]:null}.bind(this),function(e){++s,c.UTF8toUTF16(e,a)}),s!==e)throw RangeError("Illegal range: Truncated data, "+s+" == "+e);return r?(this.offset=i,a()):{string:a(),length:i-l}}if(t===o.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+"+e+") <= "+this.buffer.byteLength)}var u=i+e;if(c.decodeUTF8toUTF16(function(){return i<u?this.view[i++]:null}.bind(this),a=n(),this.noAssert),i!==u)throw RangeError("Illegal range: Truncated data, "+i+" == "+u);return r?(this.offset=i,a()):{string:a(),length:i-l}}throw TypeError("Unsupported metrics: "+t)},s.readString=s.readUTF8String,s.writeVString=function(e,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var r,a,s=n;r=c.calculateUTF16asUTF8(t(e),this.noAssert)[1],a=o.calculateVarint32(r),n+=a+r;var l=this.buffer.byteLength;if(n>l&&this.resize((l*=2)>n?l:n),n-=a+r,n+=this.writeVarint32(r,n),c.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),n!==s+r+a)throw RangeError("Illegal range: Truncated data, "+n+" == "+(n+r+a));return i?(this.offset=n,this):n-s},s.readVString=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=this.readVarint32(e),r=this.readUTF8String(i.value,o.METRICS_BYTES,e+=i.length);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-n}},s.append=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof o||(e=o.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;n+=r;var a=this.buffer.byteLength;return n>a&&this.resize((a*=2)>n?a:n),n-=r,this.view.set(e.view.subarray(e.offset,e.limit),n),e.offset+=r,i&&(this.offset+=r),this},s.appendTo=function(e,t){return e.append(this,t),this},s.assert=function(e){return this.noAssert=!e,this},s.capacity=function(){return this.buffer.byteLength},s.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},s.clone=function(e){var t=new o(0,this.littleEndian,this.noAssert);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),t.view=new Uint8Array(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t},s.compact=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var n=t-e;if(0===n)return this.buffer=l,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(n),r=new Uint8Array(i);return r.set(this.view.subarray(e,t)),this.buffer=i,this.view=r,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=n,this},s.copy=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new o(0,this.littleEndian,this.noAssert);var n=t-e,i=new o(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,i.markedOffset>=0&&(i.markedOffset-=e),this.copyTo(i,0,e,t),i},s.copyTo=function(e,t,n,i){var r,a;if(!this.noAssert&&!o.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(a="undefined"==typeof t)?e.offset:0|t,n=(r="undefined"==typeof n)?this.offset:0|n,i="undefined"==typeof i?this.limit:0|i,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var s=i-n;return 0===s?e:(e.ensureCapacity(t+s),e.view.set(this.view.subarray(n,i),t),r&&(this.offset+=s),a&&(e.offset+=s),this)},s.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},s.fill=function(e,t,n){var i="undefined"==typeof t;if(i&&(t=this.offset),"string"==typeof e&&e.length>0&&(e=e.charCodeAt(0)),"undefined"==typeof t&&(t=this.offset),"undefined"==typeof n&&(n=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof n||n%1!==0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,t<0||t>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(t>=n)return this;for(;t<n;)this.view[t++]=e;return i&&(this.offset=t),this},s.flip=function(){return this.limit=this.offset,this.offset=0,this},s.mark=function(e){if(e="undefined"==typeof e?this.offset:e,!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},s.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},s.LE=function(e){return this.littleEndian="undefined"==typeof e||!!e,this},s.BE=function(e){return this.littleEndian="undefined"!=typeof e&&!e,this},s.prepend=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof o||(e=o.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;var a=r-n;if(a>0){var s=new ArrayBuffer(this.buffer.byteLength+a),l=new Uint8Array(s);l.set(this.view.subarray(n,this.buffer.byteLength),r),this.buffer=s,this.view=l,this.offset+=a,this.markedOffset>=0&&(this.markedOffset+=a),this.limit+=a,n+=a}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),n-r),e.offset=e.limit,i&&(this.offset-=r),this},s.prependTo=function(e,t){return e.prepend(this,t),this},s.printDebug=function(e){"function"!=typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},s.remaining=function(){return this.limit-this.offset},s.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},s.resize=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if(e|=0,e<0)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength<e){var t=new ArrayBuffer(e),n=new Uint8Array(t);n.set(this.view),this.buffer=t,this.view=n}return this},s.reverse=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t?this:(Array.prototype.reverse.call(this.view.subarray(e,t)),this)},s.skip=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},s.slice=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var n=this.clone();return n.offset=e,n.limit=t,n},s.toBuffer=function(e){var t=this.offset,n=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof n||n%1!==0)throw TypeError("Illegal limit: Not an integer");if(n>>>=0,t<0||t>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(!e&&0===t&&n===this.buffer.byteLength)return this.buffer;if(t===n)return l;var i=new ArrayBuffer(n-t);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(t,n),0),i},s.toArrayBuffer=s.toBuffer,s.toString=function(e,t,n){if("undefined"==typeof e)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(e="utf8",t=e,n=t),e){case"utf8":return this.toUTF8(t,n);case"base64":return this.toBase64(t,n);case"hex":return this.toHex(t,n);case"binary":return this.toBinary(t,n);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var d=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],n=[],i=0,r=t.length;i<r;++i)n[t[i]]=i;return e.encode=function(e,n){for(var i,r;null!==(i=e());)n(t[i>>2&63]),r=(3&i)<<4,null!==(i=e())?(r|=i>>4&15,n(t[63&(r|i>>4&15)]),r=(15&i)<<2,null!==(i=e())?(n(t[63&(r|i>>6&3)]),n(t[63&i])):(n(t[63&r]),n(61))):(n(t[63&r]),n(61),n(61))},e.decode=function(e,t){function i(e){throw Error("Illegal character code: "+e)}for(var r,a,o;null!==(r=e());)if(a=n[r],"undefined"==typeof a&&i(r),null!==(r=e())&&(o=n[r],"undefined"==typeof o&&i(r),t(a<<2>>>0|(48&o)>>4),null!==(r=e()))){if(a=n[r],"undefined"==typeof a){if(61===r)break;i(r)}if(t((15&o)<<4>>>0|(60&a)>>2),null!==(r=e())){if(o=n[r],"undefined"==typeof o){if(61===r)break;i(r)}t((3&a)<<6>>>0|o)}}},e.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)},e}();s.toBase64=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),e|=0,t|=0,e<0||t>this.capacity||e>t)throw RangeError("begin, end");var i;return d.encode(function(){return e<t?this.view[e++]:null}.bind(this),i=n()),i()},o.fromBase64=function(e,n){if("string"!=typeof e)throw TypeError("str");var i=new o(e.length/4*3,n),r=0;return d.decode(t(e),function(e){i.view[r++]=e}),i.limit=r,i},o.btoa=function(e){return o.fromBinary(e).toBase64()},o.atob=function(e){return o.fromBase64(e).toBinary()},s.toBinary=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),e|=0,t|=0,e<0||t>this.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var n=[],i=[];e<t;)n.push(this.view[e++]),n.length>=1024&&(i.push(String.fromCharCode.apply(String,n)),n=[]);return i.join("")+String.fromCharCode.apply(String,n)},o.fromBinary=function(e,t){if("string"!=typeof e)throw TypeError("str");for(var n,i=0,r=e.length,a=new o(r,t);i<r;){if(n=e.charCodeAt(i),n>255)throw RangeError("illegal char code: "+n);a.view[i++]=n}return a.limit=r,a},s.toDebug=function(e){for(var t,n=-1,i=this.buffer.byteLength,r="",a="",o="";n<i;){if(n!==-1&&(t=this.view[n],r+=t<16?"0"+t.toString(16).toUpperCase():t.toString(16).toUpperCase(),e&&(a+=t>32&&t<127?String.fromCharCode(t):".")),++n,e&&n>0&&n%16===0&&n!==i){for(;r.length<51;)r+=" ";o+=r+a+"\n",r=a=""}r+=n===this.offset&&n===this.limit?n===this.markedOffset?"!":"|":n===this.offset?n===this.markedOffset?"[":"<":n===this.limit?n===this.markedOffset?"]":">":n===this.markedOffset?"'":e||0!==n&&n!==i?" ":""}if(e&&" "!==r){for(;r.length<51;)r+=" ";o+=r+a+"\n"}return e?o:r},o.fromDebug=function(e,t,n){for(var i,r,a=e.length,s=new o((a+1)/3|0,t,n),l=0,u=0,d=!1,c=!1,f=!1,h=!1,p=!1;l<a;){switch(i=e.charAt(l++)){case"!":if(!n){if(c||f||h){p=!0;break}c=f=h=!0}s.offset=s.markedOffset=s.limit=u,d=!1;break;case"|":if(!n){if(c||h){p=!0;break}c=h=!0}s.offset=s.limit=u,d=!1;break;case"[":if(!n){if(c||f){p=!0;break}c=f=!0}s.offset=s.markedOffset=u,d=!1;break;case"<":if(!n){if(c){p=!0;break}c=!0}s.offset=u,d=!1;break;case"]":if(!n){if(h||f){p=!0;break}h=f=!0}s.limit=s.markedOffset=u,d=!1;break;case">":if(!n){if(h){p=!0;break}h=!0}s.limit=u,d=!1;break;case"'":if(!n){if(f){p=!0;break}f=!0}s.markedOffset=u,d=!1;break;case" ":d=!1;break;default:if(!n&&d){p=!0;break}if(r=parseInt(i+e.charAt(l++),16),!n&&(isNaN(r)||r<0||r>255))throw TypeError("Illegal str: Not a debug encoded string");s.view[u++]=r,d=!0}if(p)throw TypeError("Illegal str: Invalid symbol at "+l)}if(!n){if(!c||!h)throw TypeError("Illegal str: Missing offset or limit");if(u<s.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+u+" < "+a)}return s},s.toHex=function(e,t){if(e="undefined"==typeof e?this.offset:e,t="undefined"==typeof t?this.limit:t,!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var n,i=new Array(t-e);e<t;)n=this.view[e++],n<16?i.push("0",n.toString(16)):i.push(n.toString(16));return i.join("")},o.fromHex=function(e,t,n){if(!n){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if(e.length%2!==0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var i,r=e.length,a=new o(r/2|0,t),s=0,l=0;s<r;s+=2){if(i=parseInt(e.substring(s,s+2),16),!n&&(!isFinite(i)||i<0||i>255))throw TypeError("Illegal str: Contains non-hex characters");a.view[l++]=i}return a.limit=l,a};var c=function(){var e={};return e.MAX_CODEPOINT=1114111,e.encodeUTF8=function(e,t){var n=null;for("number"==typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)n<128?t(127&n):n<2048?(t(n>>6&31|192),t(63&n|128)):n<65536?(t(n>>12&15|224),t(n>>6&63|128),t(63&n|128)):(t(n>>18&7|240),t(n>>12&63|128),t(n>>6&63|128),t(63&n|128)),n=null},e.decodeUTF8=function(e,t){for(var n,i,r,a,o=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(n=e());)if(0===(128&n))t(n);else if(192===(224&n))null===(i=e())&&o([n,i]),t((31&n)<<6|63&i);else if(224===(240&n))(null===(i=e())||null===(r=e()))&&o([n,i,r]),t((15&n)<<12|(63&i)<<6|63&r);else{if(240!==(248&n))throw RangeError("Illegal starting byte: "+n);(null===(i=e())||null===(r=e())||null===(a=e()))&&o([n,i,r,a]),t((7&n)<<18|(63&i)<<12|(63&r)<<6|63&a)}},e.UTF16toUTF8=function(e,t){for(var n,i=null;null!==(n=null!==i?i:e());)n>=55296&&n<=57343&&null!==(i=e())&&i>=56320&&i<=57343?(t(1024*(n-55296)+i-56320+65536),i=null):t(n);null!==i&&t(i)},e.UTF8toUTF16=function(e,t){var n=null;for("number"==typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)n<=65535?t(n):(n-=65536,t((n>>10)+55296),t(n%1024+56320)),n=null},e.encodeUTF16toUTF8=function(t,n){e.UTF16toUTF8(t,function(t){e.encodeUTF8(t,n)})},e.decodeUTF8toUTF16=function(t,n){e.decodeUTF8(t,function(t){e.UTF8toUTF16(t,n)})},e.calculateCodePoint=function(e){return e<128?1:e<2048?2:e<65536?3:4},e.calculateUTF8=function(e){for(var t,n=0;null!==(t=e());)n+=t<128?1:t<2048?2:t<65536?3:4;return n},e.calculateUTF16asUTF8=function(t){var n=0,i=0;return e.UTF16toUTF8(t,function(e){++n,i+=e<128?1:e<2048?2:e<65536?3:4}),[n,i]},e}();return s.toUTF8=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!==0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i;try{c.decodeUTF8toUTF16(function(){return e<t?this.view[e++]:null}.bind(this),i=n())}catch(n){if(e!==t)throw RangeError("Illegal range: Truncated data, "+e+" != "+t)}return i()},o.fromUTF8=function(e,n,i){if(!i&&"string"!=typeof e)throw TypeError("Illegal str: Not a string");var r=new o(c.calculateUTF16asUTF8(t(e),!0)[1],n,i),a=0;return c.encodeUTF16toUTF8(t(e),function(e){r.view[a++]=e}),r.limit=a,r},o})}).call(t,n(9)(e))},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=n},function(e,t,n){var i,r,a;!function(n,o){r=[t,e],i=o,a="function"==typeof i?i.apply(t,r):i,!(void 0!==a&&(e.exports=a))}(this,function(e,t){function n(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function i(e){try{delete window[e]}catch(t){window[e]=void 0}}function r(e){var t=document.getElementById(e);document.getElementsByTagName("head")[0].removeChild(t)}function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=e,s=t.timeout||o.timeout,l=t.jsonpCallback||o.jsonpCallback,u=void 0;return new Promise(function(o,d){var c=t.jsonpCallbackFunction||n(),f=l+"_"+c;window[c]=function(e){o({ok:!0,json:function(){return Promise.resolve(e)}}),u&&clearTimeout(u),r(f),i(c)},a+=a.indexOf("?")===-1?"?":"&";var h=document.createElement("script");h.setAttribute("src",""+a+l+"="+c),h.id=f,document.getElementsByTagName("head")[0].appendChild(h),u=setTimeout(function(){d(new Error("JSONP request to "+e+" timed out")),i(c),r(f)},s)})}var o={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};t.exports=a})},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3;if(!(e&&e.length&&t))throw new Error("ips and callback are required.");new a(e,t,n)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.default=i;var a=function(){function e(t,i,r){n(this,e),this.version="v2.0.1.20170819",this.ip="",this.ipcallback=i,this.timeoutId=null,this.reqsCache=[];for(var a=0;a<t.length;a++)this.reqsCache.push(this.send(t[a],r-10));this.timeoutId=setTimeout(this.notify.bind(this),r)}return r(e,[{key:"clearAll",value:function(){this.reqsCache&&this.reqsCache.length&&this.reqsCache.forEach(function(e){e.abort()}),clearTimeout(this.timeoutId),this.ip="",this.ipcallback=null,this.timeoutId=null,this.reqsCache=[]}},{key:"clearReq",value:function(e){this.reqsCache.splice(this.reqsCache.indexOf(e),1)}},{key:"notify",value:function(){this.ipcallback&&this.ipcallback(this.ip),this.clearAll()}},{key:"send",value:function(e,t){var n=this,i=new XMLHttpRequest;return i.open("HEAD","//"+e+"/?_="+Date.now()),i.timeout=t,i.onload=function(){n.ip=e,n.clearReq(i),i.onload=null,n.notify()},i.ontimeout=function(){n.clearReq(i),i.ontimeout=null},i.onerror=function(){n.clearReq(i),i.onerror=null},i.onabort=function(){n.clearReq(i),i.onabort=null},i.send(),i}}]),e}();!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(a,"IpHunter","D:/work/McuClient/node_modules/iphunter/src/main.js"),__REACT_HOT_LOADER__.register(i,"check","D:/work/McuClient/node_modules/iphunter/src/main.js"))}()}])})},function(e,t,n){var r,a;!function(t,n){"object"==("undefined"==typeof e?"undefined":i(e))&&"object"==i(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){function s(e,t){t=t||re;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function l(e){var t=!!e&&"length"in e&&e.length,n=me.type(e);return"function"!==n&&!me.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function u(e,t,n){if(me.isFunction(t))return me.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return me.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ae.test(t))return me.filter(t,e,n);t=me.filter(t,e)}return me.grep(e,function(e){return ue.call(t,e)>-1!==n&&1===e.nodeType})}function d(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function c(e){var t={};return me.each(e.match(Le)||[],function(e,n){t[n]=!0}),t}function f(e){return e}function h(e){throw e}function p(e,t,n){var i;try{e&&me.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&me.isFunction(i=e.then)?i.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function _(){re.removeEventListener("DOMContentLoaded",_),n.removeEventListener("load",_),me.ready()}function g(){this.expando=me.expando+g.uid++}function m(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(je,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Fe.test(n)?JSON.parse(n):n)}catch(e){}Be.set(e,t,n)}else n=void 0;return n}function v(e,t,n,i){var r,a=1,o=20,s=i?function(){return i.cur()}:function(){return me.css(e,t,"")},l=s(),u=n&&n[3]||(me.cssNumber[t]?"":"px"),d=(me.cssNumber[t]||"px"!==u&&+l)&&Ve.exec(me.css(e,t));if(d&&d[3]!==u){u=u||d[3],n=n||[],d=+l||1;do a=a||".5",d/=a,me.style(e,t,d+u);while(a!==(a=s()/l)&&1!==a&&--o)}return n&&(d=+d||+l||0,r=n[1]?d+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=d,i.end=r)),r}function y(e){var t,n=e.ownerDocument,i=e.nodeName,r=Je[i];return r?r:(t=n.body.appendChild(n.createElement(i)),r=me.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Je[i]=r,r)}function E(e,t){for(var n,i,r=[],a=0,o=e.length;a<o;a++)i=e[a],i.style&&(n=i.style.display,t?("none"===n&&(r[a]=He.get(i,"display")||null,r[a]||(i.style.display="")),""===i.style.display&&We(i)&&(r[a]=y(i))):"none"!==n&&(r[a]="none",He.set(i,"display",n)));for(a=0;a<o;a++)null!=r[a]&&(e[a].style.display=r[a]);return e}function S(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&me.nodeName(e,t)?me.merge([e],n):n}function T(e,t){for(var n=0,i=e.length;n<i;n++)He.set(e[n],"globalEval",!t||He.get(t[n],"globalEval"))}function C(e,t,n,i,r){for(var a,o,s,l,u,d,c=t.createDocumentFragment(),f=[],h=0,p=e.length;h<p;h++)if(a=e[h],a||0===a)if("object"===me.type(a))me.merge(f,a.nodeType?[a]:a);else if(Ze.test(a)){for(o=o||c.appendChild(t.createElement("div")),s=(Ke.exec(a)||["",""])[1].toLowerCase(),l=Xe[s]||Xe._default,o.innerHTML=l[1]+me.htmlPrefilter(a)+l[2],d=l[0];d--;)o=o.lastChild;me.merge(f,o.childNodes),o=c.firstChild,o.textContent=""}else f.push(t.createTextNode(a));for(c.textContent="",h=0;a=f[h++];)if(i&&me.inArray(a,i)>-1)r&&r.push(a);else if(u=me.contains(a.ownerDocument,a),o=S(c.appendChild(a),"script"),u&&T(o),n)for(d=0;a=o[d++];)ze.test(a.type||"")&&n.push(a);return c}function R(){return!0}function b(){return!1}function w(){try{return re.activeElement}catch(e){}}function A(e,t,n,r,a,o){var s,l;if("object"==("undefined"==typeof t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(l in t)A(e,l,n,r,t[l],o);return e}if(null==r&&null==a?(a=n,r=n=void 0):null==a&&("string"==typeof n?(a=r,r=void 0):(a=r,r=n,n=void 0)),a===!1)a=b;else if(!a)return e;return 1===o&&(s=a,a=function(e){return me().off(e),s.apply(this,arguments)},a.guid=s.guid||(s.guid=me.guid++)),e.each(function(){me.event.add(this,t,a,r,n)})}function I(e,t){return me.nodeName(e,"table")&&me.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function P(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function O(e){var t=ot.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function D(e,t){var n,i,r,a,o,s,l,u;if(1===t.nodeType){if(He.hasData(e)&&(a=He.access(e),o=He.set(t,a),u=a.events)){delete o.handle,o.events={};for(r in u)for(n=0,i=u[r].length;n<i;n++)me.event.add(t,r,u[r][n])}Be.hasData(e)&&(s=Be.access(e),l=me.extend({},s),Be.set(t,l))}}function k(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Qe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function L(e,t,n,i){t=se.apply([],t);var r,a,o,l,u,d,c=0,f=e.length,h=f-1,p=t[0],_=me.isFunction(p);if(_||f>1&&"string"==typeof p&&!_e.checkClone&&at.test(p))return e.each(function(r){var a=e.eq(r);_&&(t[0]=p.call(this,r,a.html())),L(a,t,n,i)});if(f&&(r=C(t,e[0].ownerDocument,!1,e,i),a=r.firstChild,1===r.childNodes.length&&(r=a),a||i)){for(o=me.map(S(r,"script"),P),l=o.length;c<f;c++)u=r,c!==h&&(u=me.clone(u,!0,!0),l&&me.merge(o,S(u,"script"))),n.call(e[c],u,c);if(l)for(d=o[o.length-1].ownerDocument,me.map(o,O),c=0;c<l;c++)u=o[c],ze.test(u.type||"")&&!He.access(u,"globalEval")&&me.contains(d,u)&&(u.src?me._evalUrl&&me._evalUrl(u.src):s(u.textContent.replace(st,""),d))}return e}function N(e,t,n){for(var i,r=t?me.filter(t,e):e,a=0;null!=(i=r[a]);a++)n||1!==i.nodeType||me.cleanData(S(i)),i.parentNode&&(n&&me.contains(i.ownerDocument,i)&&T(S(i,"script")),i.parentNode.removeChild(i));return e}function M(e,t,n){var i,r,a,o,s=e.style;return n=n||dt(e),n&&(o=n.getPropertyValue(t)||n[t],""!==o||me.contains(e.ownerDocument,e)||(o=me.style(e,t)),
!_e.pixelMarginRight()&&ut.test(o)&&lt.test(t)&&(i=s.width,r=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=i,s.minWidth=r,s.maxWidth=a)),void 0!==o?o+"":o}function x(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function U(e){if(e in _t)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=pt.length;n--;)if(e=pt[n]+t,e in _t)return e}function H(e,t,n){var i=Ve.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function B(e,t,n,i,r){for(var a=n===(i?"border":"content")?4:"width"===t?1:0,o=0;a<4;a+=2)"margin"===n&&(o+=me.css(e,n+qe[a],!0,r)),i?("content"===n&&(o-=me.css(e,"padding"+qe[a],!0,r)),"margin"!==n&&(o-=me.css(e,"border"+qe[a]+"Width",!0,r))):(o+=me.css(e,"padding"+qe[a],!0,r),"padding"!==n&&(o+=me.css(e,"border"+qe[a]+"Width",!0,r)));return o}function F(e,t,n){var i,r=!0,a=dt(e),o="border-box"===me.css(e,"boxSizing",!1,a);if(e.getClientRects().length&&(i=e.getBoundingClientRect()[t]),i<=0||null==i){if(i=M(e,t,a),(i<0||null==i)&&(i=e.style[t]),ut.test(i))return i;r=o&&(_e.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+B(e,t,n||(o?"border":"content"),r,a)+"px"}function j(e,t,n,i,r){return new j.prototype.init(e,t,n,i,r)}function G(){mt&&(n.requestAnimationFrame(G),me.fx.tick())}function V(){return n.setTimeout(function(){gt=void 0}),gt=me.now()}function q(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=qe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function W(e,t,n){for(var i,r=(Q.tweeners[t]||[]).concat(Q.tweeners["*"]),a=0,o=r.length;a<o;a++)if(i=r[a].call(n,t,e))return i}function Y(e,t,n){var i,r,a,o,s,l,u,d,c="width"in t||"height"in t,f=this,h={},p=e.style,_=e.nodeType&&We(e),g=He.get(e,"fxshow");n.queue||(o=me._queueHooks(e,"fx"),null==o.unqueued&&(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,f.always(function(){f.always(function(){o.unqueued--,me.queue(e,"fx").length||o.empty.fire()})}));for(i in t)if(r=t[i],vt.test(r)){if(delete t[i],a=a||"toggle"===r,r===(_?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;_=!0}h[i]=g&&g[i]||me.style(e,i)}if(l=!me.isEmptyObject(t),l||!me.isEmptyObject(h)){c&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],u=g&&g.display,null==u&&(u=He.get(e,"display")),d=me.css(e,"display"),"none"===d&&(u?d=u:(E([e],!0),u=e.style.display||u,d=me.css(e,"display"),E([e]))),("inline"===d||"inline-block"===d&&null!=u)&&"none"===me.css(e,"float")&&(l||(f.done(function(){p.display=u}),null==u&&(d=p.display,u="none"===d?"":d)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1;for(i in h)l||(g?"hidden"in g&&(_=g.hidden):g=He.access(e,"fxshow",{display:u}),a&&(g.hidden=!_),_&&E([e],!0),f.done(function(){_||E([e]),He.remove(e,"fxshow");for(i in h)me.style(e,i,h[i])})),l=W(_?g[i]:0,i,f),i in g||(g[i]=l.start,_&&(l.end=l.start,l.start=0))}}function J(e,t){var n,i,r,a,o;for(n in e)if(i=me.camelCase(n),r=t[i],a=e[n],me.isArray(a)&&(r=a[1],a=e[n]=a[0]),n!==i&&(e[i]=a,delete e[n]),o=me.cssHooks[i],o&&"expand"in o){a=o.expand(a),delete e[i];for(n in a)n in e||(e[n]=a[n],t[n]=r)}else t[i]=r}function Q(e,t,n){var i,r,a=0,o=Q.prefilters.length,s=me.Deferred().always(function(){delete l.elem}),l=function t(){if(r)return!1;for(var n=gt||V(),i=Math.max(0,u.startTime+u.duration-n),a=i/u.duration||0,o=1-a,l=0,t=u.tweens.length;l<t;l++)u.tweens[l].run(o);return s.notifyWith(e,[u,o,i]),o<1&&t?i:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:me.extend({},t),opts:me.extend(!0,{specialEasing:{},easing:me.easing._default},n),originalProperties:t,originalOptions:n,startTime:gt||V(),duration:n.duration,tweens:[],createTween:function(t,n){var i=me.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),d=u.props;for(J(d,u.opts.specialEasing);a<o;a++)if(i=Q.prefilters[a].call(u,e,d,u.opts))return me.isFunction(i.stop)&&(me._queueHooks(u.elem,u.opts.queue).stop=me.proxy(i.stop,i)),i;return me.map(d,W,u),me.isFunction(u.opts.start)&&u.opts.start.call(e,u),me.fx.timer(me.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function K(e){return e.getAttribute&&e.getAttribute("class")||""}function z(e,t,n,r){var a;if(me.isArray(t))me.each(t,function(t,a){n||Dt.test(e)?r(e,a):z(e+"["+("object"==("undefined"==typeof a?"undefined":i(a))&&null!=a?t:"")+"]",a,n,r)});else if(n||"object"!==me.type(t))r(e,t);else for(a in t)z(e+"["+a+"]",t[a],n,r)}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,a=t.toLowerCase().match(Le)||[];if(me.isFunction(n))for(;i=a[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Z(e,t,n,i){function r(s){var l;return a[s]=!0,me.each(e[s]||[],function(e,s){var u=s(t,n,i);return"string"!=typeof u||o||a[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),r(u),!1)}),l}var a={},o=e===Vt;return r(t.dataTypes[0])||!a["*"]&&r("*")}function $(e,t){var n,i,r=me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&me.extend(!0,e,i),e}function ee(e,t,n){for(var i,r,a,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)a=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){a=r;break}o||(o=r)}a=a||o}if(a)return a!==l[0]&&l.unshift(a),n[a]}function te(e,t,n,i){var r,a,o,s,l,u={},d=e.dataTypes.slice();if(d[1])for(o in e.converters)u[o.toLowerCase()]=e.converters[o];for(a=d.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=a,a=d.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){if(o=u[l+" "+a]||u["* "+a],!o)for(r in u)if(s=r.split(" "),s[1]===a&&(o=u[l+" "+s[0]]||u["* "+s[0]])){o===!0?o=u[r]:u[r]!==!0&&(a=s[0],d.unshift(s[1]));break}if(o!==!0)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+a}}}return{state:"success",data:t}}function ne(e){return me.isWindow(e)?e:9===e.nodeType&&e.defaultView}var ie=[],re=n.document,ae=Object.getPrototypeOf,oe=ie.slice,se=ie.concat,le=ie.push,ue=ie.indexOf,de={},ce=de.toString,fe=de.hasOwnProperty,he=fe.toString,pe=he.call(Object),_e={},ge="3.1.0",me=function e(t,n){return new e.fn.init(t,n)},ve=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ye=/^-ms-/,Ee=/-([a-z])/g,Se=function(e,t){return t.toUpperCase()};me.fn=me.prototype={jquery:ge,constructor:me,length:0,toArray:function(){return oe.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:oe.call(this)},pushStack:function(e){var t=me.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return me.each(this,e)},map:function(e){return this.pushStack(me.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(oe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:le,sort:ie.sort,splice:ie.splice},me.extend=me.fn.extend=function(){var e,t,n,r,a,o,s=arguments[0]||{},l=1,u=arguments.length,d=!1;for("boolean"==typeof s&&(d=s,s=arguments[l]||{},l++),"object"==("undefined"==typeof s?"undefined":i(s))||me.isFunction(s)||(s={}),l===u&&(s=this,l--);l<u;l++)if(null!=(e=arguments[l]))for(t in e)n=s[t],r=e[t],s!==r&&(d&&r&&(me.isPlainObject(r)||(a=me.isArray(r)))?(a?(a=!1,o=n&&me.isArray(n)?n:[]):o=n&&me.isPlainObject(n)?n:{},s[t]=me.extend(d,o,r)):void 0!==r&&(s[t]=r));return s},me.extend({expando:"jQuery"+(ge+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===me.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=me.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==ce.call(e)||(t=ae(e))&&(n=fe.call(t,"constructor")&&t.constructor,"function"!=typeof n||he.call(n)!==pe))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==("undefined"==typeof e?"undefined":i(e))||"function"==typeof e?de[ce.call(e)]||"object":"undefined"==typeof e?"undefined":i(e)},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(ye,"ms-").replace(Ee,Se)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,i=0;if(l(e))for(n=e.length;i<n&&t.call(e[i],i,e[i])!==!1;i++);else for(i in e)if(t.call(e[i],i,e[i])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ve,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(l(Object(e))?me.merge(n,"string"==typeof e?[e]:e):le.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:ue.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],a=0,o=e.length,s=!n;a<o;a++)i=!t(e[a],a),i!==s&&r.push(e[a]);return r},map:function(e,t,n){var i,r,a=0,o=[];if(l(e))for(i=e.length;a<i;a++)r=t(e[a],a,n),null!=r&&o.push(r);else for(a in e)r=t(e[a],a,n),null!=r&&o.push(r);return se.apply([],o)},guid:1,proxy:function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),me.isFunction(e))return i=oe.call(arguments,2),r=function(){return e.apply(t||this,i.concat(oe.call(arguments)))},r.guid=e.guid=e.guid||me.guid++,r},now:Date.now,support:_e}),"function"==typeof Symbol&&(me.fn[Symbol.iterator]=ie[Symbol.iterator]),me.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){de["[object "+t+"]"]=t.toLowerCase()});var Te=function(e){function t(e,t,n,i){var r,a,o,s,l,u,d,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!i&&((t?t.ownerDocument||t:j)!==L&&k(t),t=t||L,M)){if(11!==p&&(l=me.exec(e)))if(r=l[1]){if(9===p){if(!(o=t.getElementById(r)))return n;if(o.id===r)return n.push(o),n}else if(f&&(o=f.getElementById(r))&&B(t,o)&&o.id===r)return n.push(o),n}else{if(l[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&T.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(r)),n}if(T.qsa&&!Y[e+" "]&&(!x||!x.test(e))){if(1!==p)f=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(Se,Te):t.setAttribute("id",s=F),u=w(e),a=u.length;a--;)u[a]="#"+s+" "+h(u[a]);d=u.join(","),f=ve.test(e)&&c(t.parentNode)||t}if(d)try{return Z.apply(n,f.querySelectorAll(d)),n}catch(e){}finally{s===F&&t.removeAttribute("id")}}}return I(e.replace(se,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[F]=!0,e}function r(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),i=n.length;i--;)C.attrHandle[n[i]]=t}function o(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return function(t){return"label"in t&&t.disabled===e||"form"in t&&t.disabled===e||"form"in t&&t.disabled===!1&&(t.isDisabled===e||t.isDisabled!==!e&&("label"in t||!Re(t))!==e)}}function d(e){return i(function(t){return t=+t,i(function(n,i){for(var r,a=e([],n.length,t),o=a.length;o--;)n[r=a[o]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function h(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function p(e,t,n){var i=t.dir,r=t.next,a=r||i,o=n&&"parentNode"===a,s=V++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,l){var u,d,c,f=[G,s];if(l){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||o)if(c=t[F]||(t[F]={}),d=c[t.uniqueID]||(c[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[i]||t;else{if((u=d[a])&&u[0]===G&&u[1]===s)return f[2]=u[2];if(d[a]=f,f[2]=e(t,n,l))return!0}}}function _(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var r=0,a=n.length;r<a;r++)t(e,n[r],i);return i}function m(e,t,n,i,r){for(var a,o=[],s=0,l=e.length,u=null!=t;s<l;s++)(a=e[s])&&(n&&!n(a,i,r)||(o.push(a),u&&t.push(s)));return o}function v(e,t,n,r,a,o){return r&&!r[F]&&(r=v(r)),a&&!a[F]&&(a=v(a,o)),i(function(i,o,s,l){var u,d,c,f=[],h=[],p=o.length,_=i||g(t||"*",s.nodeType?[s]:s,[]),v=!e||!i&&t?_:m(_,f,e,s,l),y=n?a||(i?e:p||r)?[]:o:v;if(n&&n(v,y,s,l),r)for(u=m(y,h),r(u,[],s,l),d=u.length;d--;)(c=u[d])&&(y[h[d]]=!(v[h[d]]=c));if(i){if(a||e){if(a){for(u=[],d=y.length;d--;)(c=y[d])&&u.push(v[d]=c);a(null,y=[],u,l)}for(d=y.length;d--;)(c=y[d])&&(u=a?ee(i,c):f[d])>-1&&(i[u]=!(o[u]=c))}}else y=m(y===o?y.splice(p,y.length):y),a?a(null,o,y,l):Z.apply(o,y)})}function y(e){for(var t,n,i,r=e.length,a=C.relative[e[0].type],o=a||C.relative[" "],s=a?1:0,l=p(function(e){return e===t},o,!0),u=p(function(e){return ee(t,e)>-1},o,!0),d=[function(e,n,i){var r=!a&&(i||n!==P)||((t=n).nodeType?l(e,n,i):u(e,n,i));return t=null,r}];s<r;s++)if(n=C.relative[e[s].type])d=[p(_(d),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[F]){for(i=++s;i<r&&!C.relative[e[i].type];i++);return v(s>1&&_(d),s>1&&h(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<i&&y(e.slice(s,i)),i<r&&y(e=e.slice(i)),i<r&&h(e))}d.push(n)}return _(d)}function E(e,n){var r=n.length>0,a=e.length>0,o=function(i,o,s,l,u){var d,c,f,h=0,p="0",_=i&&[],g=[],v=P,y=i||a&&C.find.TAG("*",u),E=G+=null==v?1:Math.random()||.1,S=y.length;for(u&&(P=o===L||o||u);p!==S&&null!=(d=y[p]);p++){if(a&&d){for(c=0,o||d.ownerDocument===L||(k(d),s=!M);f=e[c++];)if(f(d,o||L,s)){l.push(d);break}u&&(G=E)}r&&((d=!f&&d)&&h--,i&&_.push(d))}if(h+=p,r&&p!==h){for(c=0;f=n[c++];)f(_,g,o,s);if(i){if(h>0)for(;p--;)_[p]||g[p]||(g[p]=z.call(l));g=m(g)}Z.apply(l,g),u&&!i&&g.length>0&&h+n.length>1&&t.uniqueSort(l)}return u&&(G=E,P=v),_};return r?i(o):o}var S,T,C,R,b,w,A,I,P,O,D,k,L,N,M,x,U,H,B,F="sizzle"+1*new Date,j=e.document,G=0,V=0,q=n(),W=n(),Y=n(),J=function(e,t){return e===t&&(D=!0),0},Q={}.hasOwnProperty,K=[],z=K.pop,X=K.push,Z=K.push,$=K.slice,ee=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",re="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",oe=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),de=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),ce=new RegExp(ae),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,_e=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,ye=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),Ee=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Se=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){k()},Re=p(function(e){return e.disabled===!0},{dir:"parentNode",next:"legend"});try{Z.apply(K=$.call(j.childNodes),j.childNodes),K[j.childNodes.length].nodeType}catch(e){Z={apply:K.length?function(e,t){X.apply(e,$.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}T=t.support={},b=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},k=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:j;return i!==L&&9===i.nodeType&&i.documentElement?(L=i,N=L.documentElement,M=!b(L),j!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),T.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=r(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=ge.test(L.getElementsByClassName),T.getById=r(function(e){return N.appendChild(e).id=F,!L.getElementsByName||!L.getElementsByName(F).length}),T.getById?(C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&M){var n=t.getElementById(e);return n?[n]:[]}},C.filter.ID=function(e){var t=e.replace(ye,Ee);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(ye,Ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[r++];)1===n.nodeType&&i.push(n);return i}return a},C.find.CLASS=T.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&M)return t.getElementsByClassName(e)},U=[],x=[],(T.qsa=ge.test(L.querySelectorAll))&&(r(function(e){N.appendChild(e).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&x.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||x.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+F+"-]").length||x.push("~="),e.querySelectorAll(":checked").length||x.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||x.push(".#.+[+~]")}),r(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&x.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&x.push(":enabled",":disabled"),N.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&x.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),x.push(",.*:")})),(T.matchesSelector=ge.test(H=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&r(function(e){T.disconnectedMatch=H.call(e,"*"),H.call(e,"[s!='']:x"),U.push("!=",ae)}),x=x.length&&new RegExp(x.join("|")),U=U.length&&new RegExp(U.join("|")),t=ge.test(N.compareDocumentPosition),B=t||ge.test(N.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},J=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===j&&B(j,e)?-1:t===L||t.ownerDocument===j&&B(j,t)?1:O?ee(O,e)-ee(O,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,i=0,r=e.parentNode,a=t.parentNode,s=[e],l=[t];if(!r||!a)return e===L?-1:t===L?1:r?-1:a?1:O?ee(O,e)-ee(O,t):0;if(r===a)return o(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?o(s[i],l[i]):s[i]===j?-1:l[i]===j?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&k(e),n=n.replace(de,"='$1']"),T.matchesSelector&&M&&!Y[n+" "]&&(!U||!U.test(n))&&(!x||!x.test(n)))try{var i=H.call(e,n);if(i||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&k(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&k(e);var n=C.attrHandle[t.toLowerCase()],i=n&&Q.call(C.attrHandle,t.toLowerCase())?n(e,t,!M):void 0;return void 0!==i?i:T.attributes||!M?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(Se,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(D=!T.detectDuplicates,O=!T.sortStable&&e.slice(0),e.sort(J),D){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return O=null,e},R=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=R(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=R(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,Ee),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,Ee),"~="===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]||t.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]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=w(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(ye,Ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var a=t.attr(r,e);return null==a?"!="===n:!n||(a+="","="===n?a===i:"!="===n?a!==i:"^="===n?i&&0===a.indexOf(i):"*="===n?i&&a.indexOf(i)>-1:"$="===n?i&&a.slice(-i.length)===i:"~="===n?(" "+a.replace(oe," ")+" ").indexOf(i)>-1:"|="===n&&(a===i||a.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,d,c,f,h,p,_=a!==o?"nextSibling":"previousSibling",g=t.parentNode,m=s&&t.nodeName.toLowerCase(),v=!l&&!s,y=!1;if(g){if(a){for(;_;){for(f=t;f=f[_];)if(s?f.nodeName.toLowerCase()===m:1===f.nodeType)return!1;p=_="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?g.firstChild:g.lastChild],o&&v){for(f=g,c=f[F]||(f[F]={}),d=c[f.uniqueID]||(c[f.uniqueID]={}),u=d[e]||[],h=u[0]===G&&u[1],y=h&&u[2],f=h&&g.childNodes[h];f=++h&&f&&f[_]||(y=h=0)||p.pop();)if(1===f.nodeType&&++y&&f===t){d[e]=[G,h,y];break}}else if(v&&(f=t,c=f[F]||(f[F]={}),d=c[f.uniqueID]||(c[f.uniqueID]={}),u=d[e]||[],h=u[0]===G&&u[1],y=h),y===!1)for(;(f=++h&&f&&f[_]||(y=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==m:1!==f.nodeType)||!++y||(v&&(c=f[F]||(f[F]={}),d=c[f.uniqueID]||(c[f.uniqueID]={}),d[e]=[G,y]),f!==t)););return y-=r,y===i||y%i===0&&y/i>=0}}},PSEUDO:function(e,n){var r,a=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[F]?a(n):a.length>1?(r=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=a(e,n),o=r.length;o--;)i=ee(e,r[o]),e[i]=!(t[i]=r[o])}):function(e){return a(e,0,r)}):a}},pseudos:{not:i(function(e){var t=[],n=[],r=A(e.replace(se,"$1"));return r[F]?i(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ye,Ee),function(t){return(t.textContent||t.innerText||R(t)).indexOf(e)>-1}}),lang:i(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,Ee).toLowerCase(),function(t){var n;do if(n=M?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===N},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:u(!1),disabled:u(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return _e.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:d(function(){return[0]}),last:d(function(e,t){return[t-1]}),eq:d(function(e,t,n){return[n<0?n+t:n]}),even:d(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:d(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:d(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:d(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},C.pseudos.nth=C.pseudos.eq;for(S in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[S]=s(S);for(S in{submit:!0,reset:!0})C.pseudos[S]=l(S);return f.prototype=C.filters=C.pseudos,C.setFilters=new f,w=t.tokenize=function(e,n){var i,r,a,o,s,l,u,d=W[e+" "];if(d)return n?0:d.slice(0);for(s=e,l=[],u=C.preFilter;s;){i&&!(r=le.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(a=[])),i=!1,(r=ue.exec(s))&&(i=r.shift(),a.push({value:i,type:r[0].replace(se," ")}),s=s.slice(i.length));for(o in C.filter)!(r=he[o].exec(s))||u[o]&&!(r=u[o](r))||(i=r.shift(),a.push({value:i,type:o,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):W(e,l).slice(0)},A=t.compile=function(e,t){var n,i=[],r=[],a=Y[e+" "];if(!a){for(t||(t=w(e)),n=t.length;n--;)a=y(t[n]),a[F]?i.push(a):r.push(a);a=Y(e,E(r,i)),a.selector=e}return a},I=t.select=function(e,t,n,i){var r,a,o,s,l,u="function"==typeof e&&e,d=!i&&w(e=u.selector||e);if(n=n||[],1===d.length){if(a=d[0]=d[0].slice(0),a.length>2&&"ID"===(o=a[0]).type&&T.getById&&9===t.nodeType&&M&&C.relative[a[1].type]){if(t=(C.find.ID(o.matches[0].replace(ye,Ee),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(r=he.needsContext.test(e)?0:a.length;r--&&(o=a[r],!C.relative[s=o.type]);)if((l=C.find[s])&&(i=l(o.matches[0].replace(ye,Ee),ve.test(a[0].type)&&c(t.parentNode)||t))){if(a.splice(r,1),e=i.length&&h(a),!e)return Z.apply(n,i),n;break}}return(u||A(e,d))(i,t,!M,n,!t||ve.test(e)&&c(t.parentNode)||t),n},T.sortStable=F.split("").sort(J).join("")===F,T.detectDuplicates=!!D,k(),T.sortDetached=r(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||a(te,function(e,t,n){var i;if(!n)return e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(n);me.find=Te,me.expr=Te.selectors,me.expr[":"]=me.expr.pseudos,me.uniqueSort=me.unique=Te.uniqueSort,me.text=Te.getText,me.isXMLDoc=Te.isXML,me.contains=Te.contains,me.escapeSelector=Te.escape;var Ce=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&me(e).is(n))break;i.push(e)}return i},Re=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},be=me.expr.match.needsContext,we=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ae=/^.[^:#\[\.,]*$/;me.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?me.find.matchesSelector(i,e)?[i]:[]:me.find.matches(e,me.grep(t,function(e){return 1===e.nodeType}))},me.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(me(e).filter(function(){for(t=0;t<i;t++)if(me.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)me.find(e,r[t],n);return i>1?me.uniqueSort(n):n},filter:function(e){return this.pushStack(u(this,e||[],!1))},not:function(e){return this.pushStack(u(this,e||[],!0))},is:function(e){return!!u(this,"string"==typeof e&&be.test(e)?me(e):e||[],!1).length}});var Ie,Pe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Oe=me.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||Ie,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Pe.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof me?t[0]:t,me.merge(this,me.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),we.test(i[1])&&me.isPlainObject(t))for(i in t)me.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=re.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):me.isFunction(e)?void 0!==n.ready?n.ready(e):e(me):me.makeArray(e,this)};Oe.prototype=me.fn,Ie=me(re);var De=/^(?:parents|prev(?:Until|All))/,ke={children:!0,contents:!0,next:!0,prev:!0};me.fn.extend({has:function(e){var t=me(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(me.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,a=[],o="string"!=typeof e&&me(e);if(!be.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&me.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?me.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?ue.call(me(e),this[0]):ue.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1;
},add:function(e,t){return this.pushStack(me.uniqueSort(me.merge(this.get(),me(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),me.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Ce(e,"parentNode")},parentsUntil:function(e,t,n){return Ce(e,"parentNode",n)},next:function(e){return d(e,"nextSibling")},prev:function(e){return d(e,"previousSibling")},nextAll:function(e){return Ce(e,"nextSibling")},prevAll:function(e){return Ce(e,"previousSibling")},nextUntil:function(e,t,n){return Ce(e,"nextSibling",n)},prevUntil:function(e,t,n){return Ce(e,"previousSibling",n)},siblings:function(e){return Re((e.parentNode||{}).firstChild,e)},children:function(e){return Re(e.firstChild)},contents:function(e){return e.contentDocument||me.merge([],e.childNodes)}},function(e,t){me.fn[e]=function(n,i){var r=me.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=me.filter(i,r)),this.length>1&&(ke[e]||me.uniqueSort(r),De.test(e)&&r.reverse()),this.pushStack(r)}});var Le=/\S+/g;me.Callbacks=function(e){e="string"==typeof e?c(e):me.extend({},e);var t,n,i,r,a=[],o=[],s=-1,l=function(){for(r=e.once,i=t=!0;o.length;s=-1)for(n=o.shift();++s<a.length;)a[s].apply(n[0],n[1])===!1&&e.stopOnFalse&&(s=a.length,n=!1);e.memory||(n=!1),t=!1,r&&(a=n?[]:"")},u={add:function(){return a&&(n&&!t&&(s=a.length-1,o.push(n)),function t(n){me.each(n,function(n,i){me.isFunction(i)?e.unique&&u.has(i)||a.push(i):i&&i.length&&"string"!==me.type(i)&&t(i)})}(arguments),n&&!t&&l()),this},remove:function(){return me.each(arguments,function(e,t){for(var n;(n=me.inArray(t,a,n))>-1;)a.splice(n,1),n<=s&&s--}),this},has:function(e){return e?me.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return r=o=[],a=n="",this},disabled:function(){return!a},lock:function(){return r=o=[],n||t||(a=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},me.extend({Deferred:function(e){var t=[["notify","progress",me.Callbacks("memory"),me.Callbacks("memory"),2],["resolve","done",me.Callbacks("once memory"),me.Callbacks("once memory"),0,"resolved"],["reject","fail",me.Callbacks("once memory"),me.Callbacks("once memory"),1,"rejected"]],r="pending",a={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var e=arguments;return me.Deferred(function(n){me.each(t,function(t,i){var r=me.isFunction(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&me.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,r,a){function o(e,t,r,a){return function(){var l=this,u=arguments,d=function n(){var d,n;if(!(e<s)){if(d=r.apply(l,u),d===t.promise())throw new TypeError("Thenable self-resolution");n=d&&("object"==("undefined"==typeof d?"undefined":i(d))||"function"==typeof d)&&d.then,me.isFunction(n)?a?n.call(d,o(s,t,f,a),o(s,t,h,a)):(s++,n.call(d,o(s,t,f,a),o(s,t,h,a),o(s,t,f,t.notifyWith))):(r!==f&&(l=void 0,u=[d]),(a||t.resolveWith)(l,u))}},c=a?d:function(){try{d()}catch(n){me.Deferred.exceptionHook&&me.Deferred.exceptionHook(n,c.stackTrace),e+1>=s&&(r!==h&&(l=void 0,u=[n]),t.rejectWith(l,u))}};e?c():(me.Deferred.getStackHook&&(c.stackTrace=me.Deferred.getStackHook()),n.setTimeout(c))}}var s=0;return me.Deferred(function(n){t[0][3].add(o(0,n,me.isFunction(a)?a:f,n.notifyWith)),t[1][3].add(o(0,n,me.isFunction(e)?e:f)),t[2][3].add(o(0,n,me.isFunction(r)?r:h))}).promise()},promise:function(e){return null!=e?me.extend(e,a):a}},o={};return me.each(t,function(e,n){var i=n[2],s=n[5];a[n[1]]=i.add,s&&i.add(function(){r=s},t[3-e][2].disable,t[0][2].lock),i.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=i.fireWith}),a.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=oe.call(arguments),a=me.Deferred(),o=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?oe.call(arguments):n,--t||a.resolveWith(i,r)}};if(t<=1&&(p(e,a.done(o(n)).resolve,a.reject),"pending"===a.state()||me.isFunction(r[n]&&r[n].then)))return a.then();for(;n--;)p(r[n],o(n),a.reject);return a.promise()}});var Ne=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;me.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Ne.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},me.readyException=function(e){n.setTimeout(function(){throw e})};var Me=me.Deferred();me.fn.ready=function(e){return Me.then(e).catch(function(e){me.readyException(e)}),this},me.extend({isReady:!1,readyWait:1,holdReady:function(e){e?me.readyWait++:me.ready(!0)},ready:function(e){(e===!0?--me.readyWait:me.isReady)||(me.isReady=!0,e!==!0&&--me.readyWait>0||Me.resolveWith(re,[me]))}}),me.ready.then=Me.then,"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll?n.setTimeout(me.ready):(re.addEventListener("DOMContentLoaded",_),n.addEventListener("load",_));var xe=function e(t,n,i,r,a,o,s){var l=0,u=t.length,d=null==i;if("object"===me.type(i)){a=!0;for(l in i)e(t,n,l,i[l],!0,o,s)}else if(void 0!==r&&(a=!0,me.isFunction(r)||(s=!0),d&&(s?(n.call(t,r),n=null):(d=n,n=function(e,t,n){return d.call(me(e),n)})),n))for(;l<u;l++)n(t[l],i,s?r:r.call(t[l],l,n(t[l],i)));return a?t:d?n.call(t):u?n(t[0],i):o},Ue=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};g.uid=1,g.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Ue(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[me.camelCase(t)]=n;else for(i in t)r[me.camelCase(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][me.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){me.isArray(t)?t=t.map(me.camelCase):(t=me.camelCase(t),t=t in i?[t]:t.match(Le)||[]),n=t.length;for(;n--;)delete i[t[n]]}(void 0===t||me.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!me.isEmptyObject(t)}};var He=new g,Be=new g,Fe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,je=/[A-Z]/g;me.extend({hasData:function(e){return Be.hasData(e)||He.hasData(e)},data:function(e,t,n){return Be.access(e,t,n)},removeData:function(e,t){Be.remove(e,t)},_data:function(e,t,n){return He.access(e,t,n)},_removeData:function(e,t){He.remove(e,t)}}),me.fn.extend({data:function(e,t){var n,r,a,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(a=Be.get(o),1===o.nodeType&&!He.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=me.camelCase(r.slice(5)),m(o,r,a[r])));He.set(o,"hasDataAttrs",!0)}return a}return"object"==("undefined"==typeof e?"undefined":i(e))?this.each(function(){Be.set(this,e)}):xe(this,function(t){var n;if(o&&void 0===t){if(n=Be.get(o,e),void 0!==n)return n;if(n=m(o,e),void 0!==n)return n}else this.each(function(){Be.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Be.remove(this,e)})}}),me.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=He.get(e,t),n&&(!i||me.isArray(n)?i=He.access(e,t,me.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=me.queue(e,t),i=n.length,r=n.shift(),a=me._queueHooks(e,t),o=function(){me.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete a.stop,r.call(e,o,a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return He.get(e,n)||He.access(e,n,{empty:me.Callbacks("once memory").add(function(){He.remove(e,[t+"queue",n])})})}}),me.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?me.queue(this[0],e):void 0===t?this:this.each(function(){var n=me.queue(this,e,t);me._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&me.dequeue(this,e)})},dequeue:function(e){return this.each(function(){me.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=me.Deferred(),a=this,o=this.length,s=function(){--i||r.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)n=He.get(a[o],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var Ge=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ve=new RegExp("^(?:([+-])=|)("+Ge+")([a-z%]*)$","i"),qe=["Top","Right","Bottom","Left"],We=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&me.contains(e.ownerDocument,e)&&"none"===me.css(e,"display")},Ye=function(e,t,n,i){var r,a,o={};for(a in t)o[a]=e.style[a],e.style[a]=t[a];r=n.apply(e,i||[]);for(a in t)e.style[a]=o[a];return r},Je={};me.fn.extend({show:function(){return E(this,!0)},hide:function(){return E(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){We(this)?me(this).show():me(this).hide()})}});var Qe=/^(?:checkbox|radio)$/i,Ke=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ze=/^$|\/(?:java|ecma)script/i,Xe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ze=/<|&#?\w+;/;!function(){var e=re.createDocumentFragment(),t=e.appendChild(re.createElement("div")),n=re.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),_e.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",_e.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var $e=re.documentElement,et=/^key/,tt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,nt=/^([^.]*)(?:\.(.+)|)/;me.event={global:{},add:function(e,t,n,i,r){var a,o,s,l,u,d,c,f,h,p,_,g=He.get(e);if(g)for(n.handler&&(a=n,n=a.handler,r=a.selector),r&&me.find.matchesSelector($e,r),n.guid||(n.guid=me.guid++),(l=g.events)||(l=g.events={}),(o=g.handle)||(o=g.handle=function(t){return"undefined"!=typeof me&&me.event.triggered!==t.type?me.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Le)||[""],u=t.length;u--;)s=nt.exec(t[u])||[],h=_=s[1],p=(s[2]||"").split(".").sort(),h&&(c=me.event.special[h]||{},h=(r?c.delegateType:c.bindType)||h,c=me.event.special[h]||{},d=me.extend({type:h,origType:_,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&me.expr.match.needsContext.test(r),namespace:p.join(".")},a),(f=l[h])||(f=l[h]=[],f.delegateCount=0,c.setup&&c.setup.call(e,i,p,o)!==!1||e.addEventListener&&e.addEventListener(h,o)),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,d):f.push(d),me.event.global[h]=!0)},remove:function(e,t,n,i,r){var a,o,s,l,u,d,c,f,h,p,_,g=He.hasData(e)&&He.get(e);if(g&&(l=g.events)){for(t=(t||"").match(Le)||[""],u=t.length;u--;)if(s=nt.exec(t[u])||[],h=_=s[1],p=(s[2]||"").split(".").sort(),h){for(c=me.event.special[h]||{},h=(i?c.delegateType:c.bindType)||h,f=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=f.length;a--;)d=f[a],!r&&_!==d.origType||n&&n.guid!==d.guid||s&&!s.test(d.namespace)||i&&i!==d.selector&&("**"!==i||!d.selector)||(f.splice(a,1),d.selector&&f.delegateCount--,c.remove&&c.remove.call(e,d));o&&!f.length&&(c.teardown&&c.teardown.call(e,p,g.handle)!==!1||me.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)me.event.remove(e,h+t[u],n,i,!0);me.isEmptyObject(l)&&He.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,a,o,s=me.event.fix(e),l=new Array(arguments.length),u=(He.get(this,"events")||{})[s.type]||[],d=me.event.special[s.type]||{};for(l[0]=s,t=1;t<arguments.length;t++)l[t]=arguments[t];if(s.delegateTarget=this,!d.preDispatch||d.preDispatch.call(this,s)!==!1){for(o=me.event.handlers.call(this,s,u),t=0;(r=o[t++])&&!s.isPropagationStopped();)for(s.currentTarget=r.elem,n=0;(a=r.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(a.namespace)||(s.handleObj=a,s.data=a.data,i=((me.event.special[a.origType]||{}).handle||a.handler).apply(r.elem,l),void 0!==i&&(s.result=i)===!1&&(s.preventDefault(),s.stopPropagation()));return d.postDispatch&&d.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,i,r,a,o=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(i=[],n=0;n<s;n++)a=t[n],r=a.selector+" ",void 0===i[r]&&(i[r]=a.needsContext?me(r,this).index(l)>-1:me.find(r,this,null,[l]).length),i[r]&&i.push(a);i.length&&o.push({elem:l,handlers:i})}return s<t.length&&o.push({elem:this,handlers:t.slice(s)}),o},addProp:function(e,t){Object.defineProperty(me.Event.prototype,e,{enumerable:!0,configurable:!0,get:me.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[me.expando]?e:new me.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==w()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===w()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&me.nodeName(this,"input"))return this.click(),!1},_default:function(e){return me.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},me.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},me.Event=function(e,t){return this instanceof me.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?R:b,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&me.extend(this,t),this.timeStamp=e&&e.timeStamp||me.now(),void(this[me.expando]=!0)):new me.Event(e,t)},me.Event.prototype={constructor:me.Event,isDefaultPrevented:b,isPropagationStopped:b,isImmediatePropagationStopped:b,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=R,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=R,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=R,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},me.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&et.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&tt.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},me.event.addProp),me.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){me.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,a=e.handleObj;return r&&(r===i||me.contains(i,r))||(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),me.fn.extend({on:function(e,t,n,i){return A(this,e,t,n,i)},one:function(e,t,n,i){return A(this,e,t,n,i,1)},off:function(e,t,n){var r,a;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,me(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==("undefined"==typeof e?"undefined":i(e))){for(a in e)this.off(a,t,e[a]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=b),this.each(function(){me.event.remove(this,e,n,t)})}});var it=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,rt=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,ot=/^true\/(.*)/,st=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;me.extend({htmlPrefilter:function(e){return e.replace(it,"<$1></$2>")},clone:function(e,t,n){var i,r,a,o,s=e.cloneNode(!0),l=me.contains(e.ownerDocument,e);if(!(_e.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||me.isXMLDoc(e)))for(o=S(s),a=S(e),i=0,r=a.length;i<r;i++)k(a[i],o[i]);if(t)if(n)for(a=a||S(e),o=o||S(s),i=0,r=a.length;i<r;i++)D(a[i],o[i]);else D(e,s);return o=S(s,"script"),o.length>0&&T(o,!l&&S(e,"script")),s},cleanData:function(e){for(var t,n,i,r=me.event.special,a=0;void 0!==(n=e[a]);a++)if(Ue(n)){if(t=n[He.expando]){if(t.events)for(i in t.events)r[i]?me.event.remove(n,i):me.removeEvent(n,i,t.handle);n[He.expando]=void 0}n[Be.expando]&&(n[Be.expando]=void 0)}}}),me.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return xe(this,function(e){return void 0===e?me.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return L(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=I(this,e);t.appendChild(e)}})},prepend:function(){return L(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=I(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return L(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return L(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(me.cleanData(S(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return me.clone(this,e,t)})},html:function(e){return xe(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!rt.test(e)&&!Xe[(Ke.exec(e)||["",""])[1].toLowerCase()]){e=me.htmlPrefilter(e);try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(me.cleanData(S(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return L(this,arguments,function(t){var n=this.parentNode;me.inArray(this,e)<0&&(me.cleanData(S(this)),n&&n.replaceChild(t,this))},e)}}),me.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){me.fn[e]=function(e){for(var n,i=[],r=me(e),a=r.length-1,o=0;o<=a;o++)n=o===a?this:this.clone(!0),me(r[o])[t](n),le.apply(i,n.get());return this.pushStack(i)}});var lt=/^margin/,ut=new RegExp("^("+Ge+")(?!px)[a-z%]+$","i"),dt=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",$e.appendChild(o);var e=n.getComputedStyle(s);t="1%"!==e.top,a="2px"===e.marginLeft,i="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,$e.removeChild(o),s=null}}var t,i,r,a,o=re.createElement("div"),s=re.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",_e.clearCloneStyle="content-box"===s.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(s),me.extend(_e,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),i},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),a}}))}();var ct=/^(none|table(?!-c[ea]).+)/,ft={position:"absolute",visibility:"hidden",display:"block"},ht={letterSpacing:"0",fontWeight:"400"},pt=["Webkit","Moz","ms"],_t=re.createElement("div").style;me.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=M(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,o,s,l=me.camelCase(t),u=e.style;return t=me.cssProps[l]||(me.cssProps[l]=U(l)||l),s=me.cssHooks[t]||me.cssHooks[l],void 0===n?s&&"get"in s&&void 0!==(a=s.get(e,!1,r))?a:u[t]:(o="undefined"==typeof n?"undefined":i(n),"string"===o&&(a=Ve.exec(n))&&a[1]&&(n=v(e,t,a),o="number"),void(null!=n&&n===n&&("number"===o&&(n+=a&&a[3]||(me.cssNumber[l]?"":"px")),_e.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u[t]=n))))}},css:function(e,t,n,i){var r,a,o,s=me.camelCase(t);return t=me.cssProps[s]||(me.cssProps[s]=U(s)||s),o=me.cssHooks[t]||me.cssHooks[s],o&&"get"in o&&(r=o.get(e,!0,n)),void 0===r&&(r=M(e,t,i)),"normal"===r&&t in ht&&(r=ht[t]),""===n||n?(a=parseFloat(r),n===!0||isFinite(a)?a||0:r):r}}),me.each(["height","width"],function(e,t){me.cssHooks[t]={get:function(e,n,i){if(n)return!ct.test(me.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?F(e,t,i):Ye(e,ft,function(){return F(e,t,i)})},set:function(e,n,i){var r,a=i&&dt(e),o=i&&B(e,t,i,"border-box"===me.css(e,"boxSizing",!1,a),a);return o&&(r=Ve.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=me.css(e,t)),H(e,n,o)}}}),me.cssHooks.marginLeft=x(_e.reliableMarginLeft,function(e,t){if(t)return(parseFloat(M(e,"marginLeft"))||e.getBoundingClientRect().left-Ye(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),me.each({margin:"",padding:"",border:"Width"},function(e,t){me.cssHooks[e+t]={expand:function(n){for(var i=0,r={},a="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+qe[i]+t]=a[i]||a[i-2]||a[0];return r}},lt.test(e)||(me.cssHooks[e+t].set=H)}),me.fn.extend({css:function(e,t){return xe(this,function(e,t,n){var i,r,a={},o=0;if(me.isArray(t)){for(i=dt(e),r=t.length;o<r;o++)a[t[o]]=me.css(e,t[o],!1,i);return a}return void 0!==n?me.style(e,t,n):me.css(e,t)},e,t,arguments.length>1)}}),me.Tween=j,j.prototype={constructor:j,init:function(e,t,n,i,r,a){this.elem=e,this.prop=n,this.easing=r||me.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=a||(me.cssNumber[n]?"":"px")},cur:function(){var e=j.propHooks[this.prop];return e&&e.get?e.get(this):j.propHooks._default.get(this)},run:function(e){var t,n=j.propHooks[this.prop];return this.options.duration?this.pos=t=me.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):j.propHooks._default.set(this),this}},j.prototype.init.prototype=j.prototype,j.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=me.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){me.fx.step[e.prop]?me.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[me.cssProps[e.prop]]&&!me.cssHooks[e.prop]?e.elem[e.prop]=e.now:me.style(e.elem,e.prop,e.now+e.unit)}}},j.propHooks.scrollTop=j.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},me.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},me.fx=j.prototype.init,me.fx.step={};var gt,mt,vt=/^(?:toggle|show|hide)$/,yt=/queueHooks$/;me.Animation=me.extend(Q,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return v(n.elem,e,Ve.exec(t),n),n}]},tweener:function(e,t){me.isFunction(e)?(t=e,e=["*"]):e=e.match(Le);for(var n,i=0,r=e.length;i<r;i++)n=e[i],Q.tweeners[n]=Q.tweeners[n]||[],Q.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?Q.prefilters.unshift(e):Q.prefilters.push(e)}}),me.speed=function(e,t,n){var r=e&&"object"==("undefined"==typeof e?"undefined":i(e))?me.extend({},e):{complete:n||!n&&t||me.isFunction(e)&&e,duration:e,easing:n&&t||t&&!me.isFunction(t)&&t};return me.fx.off||re.hidden?r.duration=0:r.duration="number"==typeof r.duration?r.duration:r.duration in me.fx.speeds?me.fx.speeds[r.duration]:me.fx.speeds._default,null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){me.isFunction(r.old)&&r.old.call(this),r.queue&&me.dequeue(this,r.queue)},r},me.fn.extend({fadeTo:function(e,t,n,i){return this.filter(We).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=me.isEmptyObject(e),a=me.speed(t,n,i),o=function(){var t=Q(this,me.extend({},e),a);(r||He.get(this,"finish"))&&t.stop(!0)};return o.finish=o,r||a.queue===!1?this.each(o):this.queue(a.queue,o)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",a=me.timers,o=He.get(this);if(r)o[r]&&o[r].stop&&i(o[r]);else for(r in o)o[r]&&o[r].stop&&yt.test(r)&&i(o[r]);for(r=a.length;r--;)a[r].elem!==this||null!=e&&a[r].queue!==e||(a[r].anim.stop(n),t=!1,a.splice(r,1));!t&&n||me.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=He.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],a=me.timers,o=i?i.length:0;for(n.finish=!0,me.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<o;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),me.each(["toggle","show","hide"],function(e,t){var n=me.fn[t];me.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(q(t,!0),e,i,r)}}),me.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){me.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),me.timers=[],me.fx.tick=function(){var e,t=0,n=me.timers;for(gt=me.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||me.fx.stop(),gt=void 0},me.fx.timer=function(e){me.timers.push(e),e()?me.fx.start():me.timers.pop()},me.fx.interval=13,me.fx.start=function(){mt||(mt=n.requestAnimationFrame?n.requestAnimationFrame(G):n.setInterval(me.fx.tick,me.fx.interval))},me.fx.stop=function(){n.cancelAnimationFrame?n.cancelAnimationFrame(mt):n.clearInterval(mt),mt=null},me.fx.speeds={slow:600,fast:200,_default:400},me.fn.delay=function(e,t){return e=me.fx?me.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,i){var r=n.setTimeout(t,e);i.stop=function(){n.clearTimeout(r)}})},function(){var e=re.createElement("input"),t=re.createElement("select"),n=t.appendChild(re.createElement("option"));e.type="checkbox",_e.checkOn=""!==e.value,_e.optSelected=n.selected,e=re.createElement("input"),e.value="t",e.type="radio",_e.radioValue="t"===e.value}();var Et,St=me.expr.attrHandle;me.fn.extend({attr:function(e,t){return xe(this,me.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){me.removeAttr(this,e)})}}),me.extend({attr:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return"undefined"==typeof e.getAttribute?me.prop(e,t,n):(1===a&&me.isXMLDoc(e)||(r=me.attrHooks[t.toLowerCase()]||(me.expr.match.bool.test(t)?Et:void 0)),void 0!==n?null===n?void me.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=me.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!_e.radioValue&&"radio"===t&&me.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(Le);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),Et={set:function(e,t,n){return t===!1?me.removeAttr(e,n):e.setAttribute(n,n),n}},me.each(me.expr.match.bool.source.match(/\w+/g),function(e,t){var n=St[t]||me.find.attr;St[t]=function(e,t,i){var r,a,o=t.toLowerCase();return i||(a=St[o],St[o]=r,r=null!=n(e,t,i)?o:null,St[o]=a),r}});var Tt=/^(?:input|select|textarea|button)$/i,Ct=/^(?:a|area)$/i;me.fn.extend({prop:function(e,t){return xe(this,me.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[me.propFix[e]||e]})}}),me.extend({prop:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&me.isXMLDoc(e)||(t=me.propFix[t]||t,r=me.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=me.find.attr(e,"tabindex");return t?parseInt(t,10):Tt.test(e.nodeName)||Ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_e.optSelected||(me.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),me.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){me.propFix[this.toLowerCase()]=this});var Rt=/[\t\r\n\f]/g;me.fn.extend({addClass:function(e){var t,n,i,r,a,o,s,l=0;if(me.isFunction(e))return this.each(function(t){me(this).addClass(e.call(this,t,K(this)))});if("string"==typeof e&&e)for(t=e.match(Le)||[];n=this[l++];)if(r=K(n),i=1===n.nodeType&&(" "+r+" ").replace(Rt," ")){for(o=0;a=t[o++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");s=me.trim(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,a,o,s,l=0;if(me.isFunction(e))return this.each(function(t){me(this).removeClass(e.call(this,t,K(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Le)||[];n=this[l++];)if(r=K(n),i=1===n.nodeType&&(" "+r+" ").replace(Rt," ")){for(o=0;a=t[o++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");s=me.trim(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n="undefined"==typeof e?"undefined":i(e);return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):me.isFunction(e)?this.each(function(n){me(this).toggleClass(e.call(this,n,K(this),t),t)}):this.each(function(){var t,i,r,a;if("string"===n)for(i=0,r=me(this),a=e.match(Le)||[];t=a[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||(t=K(this),t&&He.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":He.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+K(n)+" ").replace(Rt," ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g,wt=/[\x20\t\r\n\f]+/g;me.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=me.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,me(this).val()):e,null==r?r="":"number"==typeof r?r+="":me.isArray(r)&&(r=me.map(r,function(e){
return null==e?"":e+""})),t=me.valHooks[this.type]||me.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=me.valHooks[r.type]||me.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(bt,""):null==n?"":n)):void 0}}),me.extend({valHooks:{option:{get:function(e){var t=me.find.attr(e,"value");return null!=t?t:me.trim(me.text(e)).replace(wt," ")}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,a="select-one"===e.type,o=a?null:[],s=a?r+1:i.length,l=r<0?s:a?r:0;l<s;l++)if(n=i[l],(n.selected||l===r)&&!n.disabled&&(!n.parentNode.disabled||!me.nodeName(n.parentNode,"optgroup"))){if(t=me(n).val(),a)return t;o.push(t)}return o},set:function(e,t){for(var n,i,r=e.options,a=me.makeArray(t),o=r.length;o--;)i=r[o],(i.selected=me.inArray(me.valHooks.option.get(i),a)>-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),me.each(["radio","checkbox"],function(){me.valHooks[this]={set:function(e,t){if(me.isArray(t))return e.checked=me.inArray(me(e).val(),t)>-1}},_e.checkOn||(me.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var At=/^(?:focusinfocus|focusoutblur)$/;me.extend(me.event,{trigger:function(e,t,r,a){var o,s,l,u,d,c,f,h=[r||re],p=fe.call(e,"type")?e.type:e,_=fe.call(e,"namespace")?e.namespace.split("."):[];if(s=l=r=r||re,3!==r.nodeType&&8!==r.nodeType&&!At.test(p+me.event.triggered)&&(p.indexOf(".")>-1&&(_=p.split("."),p=_.shift(),_.sort()),d=p.indexOf(":")<0&&"on"+p,e=e[me.expando]?e:new me.Event(p,"object"==("undefined"==typeof e?"undefined":i(e))&&e),e.isTrigger=a?2:3,e.namespace=_.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:me.makeArray(t,[e]),f=me.event.special[p]||{},a||!f.trigger||f.trigger.apply(r,t)!==!1)){if(!a&&!f.noBubble&&!me.isWindow(r)){for(u=f.delegateType||p,At.test(u+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),l=s;l===(r.ownerDocument||re)&&h.push(l.defaultView||l.parentWindow||n)}for(o=0;(s=h[o++])&&!e.isPropagationStopped();)e.type=o>1?u:f.bindType||p,c=(He.get(s,"events")||{})[e.type]&&He.get(s,"handle"),c&&c.apply(s,t),c=d&&s[d],c&&c.apply&&Ue(s)&&(e.result=c.apply(s,t),e.result===!1&&e.preventDefault());return e.type=p,a||e.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),t)!==!1||!Ue(r)||d&&me.isFunction(r[p])&&!me.isWindow(r)&&(l=r[d],l&&(r[d]=null),me.event.triggered=p,r[p](),me.event.triggered=void 0,l&&(r[d]=l)),e.result}},simulate:function(e,t,n){var i=me.extend(new me.Event,n,{type:e,isSimulated:!0});me.event.trigger(i,null,t)}}),me.fn.extend({trigger:function(e,t){return this.each(function(){me.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return me.event.trigger(e,t,n,!0)}}),me.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){me.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),me.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),_e.focusin="onfocusin"in n,_e.focusin||me.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){me.event.simulate(t,e.target,me.event.fix(e))};me.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=He.access(i,t);r||i.addEventListener(e,n,!0),He.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=He.access(i,t)-1;r?He.access(i,t,r):(i.removeEventListener(e,n,!0),He.remove(i,t))}}});var It=n.location,Pt=me.now(),Ot=/\?/;me.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||me.error("Invalid XML: "+e),t};var Dt=/\[\]$/,kt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;me.param=function(e,t){var n,i=[],r=function(e,t){var n=me.isFunction(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(me.isArray(e)||e.jquery&&!me.isPlainObject(e))me.each(e,function(){r(this.name,this.value)});else for(n in e)z(n,e[n],t,r);return i.join("&")},me.fn.extend({serialize:function(){return me.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=me.prop(this,"elements");return e?me.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!me(this).is(":disabled")&&Nt.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Qe.test(e))}).map(function(e,t){var n=me(this).val();return null==n?null:me.isArray(n)?me.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Mt=/%20/g,xt=/#.*$/,Ut=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ft=/^(?:GET|HEAD)$/,jt=/^\/\//,Gt={},Vt={},qt="*/".concat("*"),Wt=re.createElement("a");Wt.href=It.href,me.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:It.href,type:"GET",isLocal:Bt.test(It.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":me.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$($(e,me.ajaxSettings),t):$(me.ajaxSettings,e)},ajaxPrefilter:X(Gt),ajaxTransport:X(Vt),ajax:function(e,t){function r(e,t,i,r){var l,d,h,p,S,T=t;c||(c=!0,u&&n.clearTimeout(u),a=void 0,s=r||"",R.readyState=e>0?4:0,l=e>=200&&e<300||304===e,i&&(p=ee(_,R,i)),p=te(_,p,R,l),l?(_.ifModified&&(S=R.getResponseHeader("Last-Modified"),S&&(me.lastModified[o]=S),S=R.getResponseHeader("etag"),S&&(me.etag[o]=S)),204===e||"HEAD"===_.type?T="nocontent":304===e?T="notmodified":(T=p.state,d=p.data,h=p.error,l=!h)):(h=T,!e&&T||(T="error",e<0&&(e=0))),R.status=e,R.statusText=(t||T)+"",l?v.resolveWith(g,[d,T,R]):v.rejectWith(g,[R,T,h]),R.statusCode(E),E=void 0,f&&m.trigger(l?"ajaxSuccess":"ajaxError",[R,_,l?d:h]),y.fireWith(g,[R,T]),f&&(m.trigger("ajaxComplete",[R,_]),--me.active||me.event.trigger("ajaxStop")))}"object"==("undefined"==typeof e?"undefined":i(e))&&(t=e,e=void 0),t=t||{};var a,o,s,l,u,d,c,f,h,p,_=me.ajaxSetup({},t),g=_.context||_,m=_.context&&(g.nodeType||g.jquery)?me(g):me.event,v=me.Deferred(),y=me.Callbacks("once memory"),E=_.statusCode||{},S={},T={},C="canceled",R={readyState:0,getResponseHeader:function(e){var t;if(c){if(!l)for(l={};t=Ht.exec(s);)l[t[1].toLowerCase()]=t[2];t=l[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,S[e]=t),this},overrideMimeType:function(e){return null==c&&(_.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)R.always(e[R.status]);else for(t in e)E[t]=[E[t],e[t]];return this},abort:function(e){var t=e||C;return a&&a.abort(t),r(0,t),this}};if(v.promise(R),_.url=((e||_.url||It.href)+"").replace(jt,It.protocol+"//"),_.type=t.method||t.type||_.method||_.type,_.dataTypes=(_.dataType||"*").toLowerCase().match(Le)||[""],null==_.crossDomain){d=re.createElement("a");try{d.href=_.url,d.href=d.href,_.crossDomain=Wt.protocol+"//"+Wt.host!=d.protocol+"//"+d.host}catch(e){_.crossDomain=!0}}if(_.data&&_.processData&&"string"!=typeof _.data&&(_.data=me.param(_.data,_.traditional)),Z(Gt,_,t,R),c)return R;f=me.event&&_.global,f&&0===me.active++&&me.event.trigger("ajaxStart"),_.type=_.type.toUpperCase(),_.hasContent=!Ft.test(_.type),o=_.url.replace(xt,""),_.hasContent?_.data&&_.processData&&0===(_.contentType||"").indexOf("application/x-www-form-urlencoded")&&(_.data=_.data.replace(Mt,"+")):(p=_.url.slice(o.length),_.data&&(o+=(Ot.test(o)?"&":"?")+_.data,delete _.data),_.cache===!1&&(o=o.replace(Ut,""),p=(Ot.test(o)?"&":"?")+"_="+Pt++ +p),_.url=o+p),_.ifModified&&(me.lastModified[o]&&R.setRequestHeader("If-Modified-Since",me.lastModified[o]),me.etag[o]&&R.setRequestHeader("If-None-Match",me.etag[o])),(_.data&&_.hasContent&&_.contentType!==!1||t.contentType)&&R.setRequestHeader("Content-Type",_.contentType),R.setRequestHeader("Accept",_.dataTypes[0]&&_.accepts[_.dataTypes[0]]?_.accepts[_.dataTypes[0]]+("*"!==_.dataTypes[0]?", "+qt+"; q=0.01":""):_.accepts["*"]);for(h in _.headers)R.setRequestHeader(h,_.headers[h]);if(_.beforeSend&&(_.beforeSend.call(g,R,_)===!1||c))return R.abort();if(C="abort",y.add(_.complete),R.done(_.success),R.fail(_.error),a=Z(Vt,_,t,R)){if(R.readyState=1,f&&m.trigger("ajaxSend",[R,_]),c)return R;_.async&&_.timeout>0&&(u=n.setTimeout(function(){R.abort("timeout")},_.timeout));try{c=!1,a.send(S,r)}catch(e){if(c)throw e;r(-1,e)}}else r(-1,"No Transport");return R},getJSON:function(e,t,n){return me.get(e,t,n,"json")},getScript:function(e,t){return me.get(e,void 0,t,"script")}}),me.each(["get","post"],function(e,t){me[t]=function(e,n,i,r){return me.isFunction(n)&&(r=r||i,i=n,n=void 0),me.ajax(me.extend({url:e,type:t,dataType:r,data:n,success:i},me.isPlainObject(e)&&e))}}),me._evalUrl=function(e){return me.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},me.fn.extend({wrapAll:function(e){var t;return this[0]&&(me.isFunction(e)&&(e=e.call(this[0])),t=me(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return me.isFunction(e)?this.each(function(t){me(this).wrapInner(e.call(this,t))}):this.each(function(){var t=me(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=me.isFunction(e);return this.each(function(n){me(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){me(this).replaceWith(this.childNodes)}),this}}),me.expr.pseudos.hidden=function(e){return!me.expr.pseudos.visible(e)},me.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},me.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Jt=me.ajaxSettings.xhr();_e.cors=!!Jt&&"withCredentials"in Jt,_e.ajax=Jt=!!Jt,me.ajaxTransport(function(e){var t,i;if(_e.cors||Jt&&!e.crossDomain)return{send:function(r,a){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)s.setRequestHeader(o,r[o]);t=function(e){return function(){t&&(t=i=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a(Yt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),i=s.onerror=t("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&i()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),me.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),me.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return me.globalEval(e),e}}}),me.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),me.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=me("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),re.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Qt=[],Kt=/(=)\?(?=&|$)|\?\?/;me.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Qt.pop()||me.expando+"_"+Pt++;return this[e]=!0,e}}),me.ajaxPrefilter("json jsonp",function(e,t,i){var r,a,o,s=e.jsonp!==!1&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=me.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Kt,"$1"+r):e.jsonp!==!1&&(e.url+=(Ot.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||me.error(r+" was not called"),o[0]},e.dataTypes[0]="json",a=n[r],n[r]=function(){o=arguments},i.always(function(){void 0===a?me(n).removeProp(r):n[r]=a,e[r]&&(e.jsonpCallback=t.jsonpCallback,Qt.push(r)),o&&me.isFunction(a)&&a(o[0]),o=a=void 0}),"script"}),_e.createHTMLDocument=function(){var e=re.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),me.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,r,a;return t||(_e.createHTMLDocument?(t=re.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=re.location.href,t.head.appendChild(i)):t=re),r=we.exec(e),a=!n&&[],r?[t.createElement(r[1])]:(r=C([e],t,a),a&&a.length&&me(a).remove(),me.merge([],r.childNodes))},me.fn.load=function(e,t,n){var r,a,o,s=this,l=e.indexOf(" ");return l>-1&&(r=me.trim(e.slice(l)),e=e.slice(0,l)),me.isFunction(t)?(n=t,t=void 0):t&&"object"==("undefined"==typeof t?"undefined":i(t))&&(a="POST"),s.length>0&&me.ajax({url:e,type:a||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?me("<div>").append(me.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},me.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){me.fn[t]=function(e){return this.on(t,e)}}),me.expr.pseudos.animated=function(e){return me.grep(me.timers,function(t){return e===t.elem}).length},me.offset={setOffset:function(e,t,n){var i,r,a,o,s,l,u,d=me.css(e,"position"),c=me(e),f={};"static"===d&&(e.style.position="relative"),s=c.offset(),a=me.css(e,"top"),l=me.css(e,"left"),u=("absolute"===d||"fixed"===d)&&(a+l).indexOf("auto")>-1,u?(i=c.position(),o=i.top,r=i.left):(o=parseFloat(a)||0,r=parseFloat(l)||0),me.isFunction(t)&&(t=t.call(e,n,me.extend({},s))),null!=t.top&&(f.top=t.top-s.top+o),null!=t.left&&(f.left=t.left-s.left+r),"using"in t?t.using.call(e,f):c.css(f)}},me.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){me.offset.setOffset(this,e,t)});var t,n,i,r,a=this[0];return a?a.getClientRects().length?(i=a.getBoundingClientRect(),i.width||i.height?(r=a.ownerDocument,n=ne(r),t=r.documentElement,{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===me.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),me.nodeName(e[0],"html")||(i=e.offset()),i={top:i.top+me.css(e[0],"borderTopWidth",!0),left:i.left+me.css(e[0],"borderLeftWidth",!0)}),{top:t.top-i.top-me.css(n,"marginTop",!0),left:t.left-i.left-me.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===me.css(e,"position");)e=e.offsetParent;return e||$e})}}),me.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;me.fn[e]=function(i){return xe(this,function(e,i,r){var a=ne(e);return void 0===r?a?a[t]:e[i]:void(a?a.scrollTo(n?a.pageXOffset:r,n?r:a.pageYOffset):e[i]=r)},e,i,arguments.length)}}),me.each(["top","left"],function(e,t){me.cssHooks[t]=x(_e.pixelPosition,function(e,n){if(n)return n=M(e,t),ut.test(n)?me(e).position()[t]+"px":n})}),me.each({Height:"height",Width:"width"},function(e,t){me.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){me.fn[i]=function(r,a){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||a===!0?"margin":"border");return xe(this,function(t,n,r){var a;return me.isWindow(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===r?me.css(t,n,s):me.style(t,n,r,s)},t,o?r:void 0,o)}})}),me.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,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),me.parseJSON=JSON.parse,r=[],a=function(){return me}.apply(t,r),!(void 0!==a&&(e.exports=a));var zt=n.jQuery,Xt=n.$;return me.noConflict=function(e){return n.$===me&&(n.$=Xt),e&&n.jQuery===me&&(n.jQuery=zt),me},o||(n.jQuery=n.$=me),me})},function(e,t){String.fromCodePoint||!function(){var e=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(e){}return n}(),t=String.fromCharCode,n=Math.floor,i=function e(i){var e,r,a=16384,o=[],s=-1,l=arguments.length;if(!l)return"";for(var u="";++s<l;){var d=Number(arguments[s]);if(!isFinite(d)||d<0||d>1114111||n(d)!=d)throw RangeError("Invalid code point: "+d);d<=65535?o.push(d):(d-=65536,e=(d>>10)+55296,r=d%1024+56320,o.push(e,r)),(s+1==l||o.length>a)&&(u+=t.apply(null,o),o.length=0)}return u};e?e(String,"fromCodePoint",{value:i,configurable:!0,writable:!0}):String.fromCodePoint=i}()},function(e,t){},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(7),d=r(u),c=n(15),f=r(c),h=n(37),p=r(h),_=n(22),g=r(_),m=n(20),v=r(m),y=n(26),E=r(y),S=n(4),T=r(S),C=n(1),R=r(C),b=n(23),w=r(b),A=n(41),I=r(A),P=n(49),O=r(P),D=n(40),k=r(D),L=n(43),N=r(L),M=n(50),x=r(M),U=n(42),H=r(U),B=n(5),F=r(B),j=n(2),G=r(j),V=n(39),q=r(V),W=n(3),Y=r(W),J=n(14),Q=(r(J),n(11)),K=(r(Q),n(25)),z=r(K),X=n(17),Z=(r(X),n(44)),$=r(Z),ee=n(46),te=r(ee),ne=n(47),ie=r(ne),re=n(10),ae=(r(re),n(21)),oe=r(ae);n(56).polyfill(),n(62),n(58),n(34);var se=R.default.getLoger("McuClient"),le=void 0,ue=void 0,de=void 0,ce=void 0,fe=void 0,he=void 0,pe=void 0,_e=void 0,ge=void 0,me=void 0,ve=void 0,ye=void 0,Ee=void 0,Se=void 0,Te=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));G.default.sdkVersion="v1.80.1.20170823",se.warn("sdkVersion:"+G.default.sdkVersion);var n=location.protocol;return"https:"==n?(G.default.isHttps=!0,G.default.locationProtocol="https://",G.default.websocketProtocol="wss://"):(G.default.isHttps=!1,G.default.locationProtocol="http://",G.default.websocketProtocol="ws://"),se.warn("protocol:"+G.default.locationProtocol),q.default.getSystemInfo(),p.default.getUserIp(),e.classRecordStatusUpdateTimer=0,e.isGetUserIpCallback=!1,e.isGetFastestMcuCallback=!1,e.isGetFastestMsCallback=!1,e.isGetFastestRtmpPullCallback=!1,e.isGetFastestHlsPullCallback=!1,e.isGetFastestRsCallback=!1,e.on(T.default.MCU_ERROR,e._mcuErrorHandler.bind(e)),le=f.default,le.on("*",function(t,n){return e._emit(t,n)}),le.on(le.SUCCESS,e._sassJoinSuccessHandler.bind(e)),le.on(le.CLASS_INIT_SUCCESS,e._sassInitSuccessHandler.bind(e)),le.on(le.CLASS_GET_CLASS_PARAM,e._sassGetClassParamSuccessHandler.bind(e)),le.on(le.CLASS_SAVE_STATUS_INFO_SUCCESS,e._sassSaveClassStatusInfoSuccessHandler.bind(e)),le.on(le.CLASS_SAVE_RECORD_INFO_SUCCESS,e._sassSaveClassRecordInfoSuccessHandler.bind(e)),le.on(le.DELETE_DOCUMENT_SUCCESS,e._sassDeleteDocumentSuccess.bind(e)),le.on(le.DELETE_MEDIASHARE_SUCCESS,e._sassDeleteMediaShareSuccess.bind(e)),le.on(le.DELETE_MUSICSHARE_SUCCESS,e._sassDeleteMusicShareSuccess.bind(e)),ue=new p.default,de=E.default,de.on("*",function(t,n){return e._emit(t,n)}),de.on(T.default.CLASS_JOIN_MCU_SUCCESS,e._mcuJoinMCUClassSuccessHandler.bind(e)),de.on(T.default.SWITCH_MCU_IP,e._switchMcuIpHandler.bind(e)),ve=g.default,ve.on("*",function(t,n){return e._emit(t,n)}),ve.on(g.default.CLASS_JOIN_RECORD_PLAYBACK_SUCCESS,e._joinRecordPlaybackSuccessHandler.bind(e)),ve.on(g.default.RECORD_PLAYBACK_CLEAR_DATA,e._recordPlaybackClearDataHandler.bind(e)),ce=new w.default,ce.on("*",function(t,n){return e._emit(t,n)}),ce.on(T.default.CLASS_RUN_EXIT,e._runClassExit.bind(e)),ce.on(T.default.CLASS_STATUS_INFO_CHANGE,e._onClassStatusInfoChange.bind(e)),ce.on(T.default.CLASS_DELETE_ROSTER,e._onClassDeleteRoster.bind(e)),ce.on(T.default.CLASS_NONENTITY_ROSTER,e._onClassNonentityRoster.bind(e)),ce.on(T.default.CLASS_RECORD_START,e._onClassRecordStart.bind(e)),ce.on(T.default.CLASS_RECORD_SUCCESS,e._onClassRecordSuccess.bind(e)),ce.on(T.default.SWITCH_MS_IP,e._switchMsIpHandler.bind(e)),ce.on(T.default.STOP_ALL_MEDIA_PUBLISH,e._stopAllMediaPublishHandler.bind(e)),fe=new I.default,fe.on("*",function(t,n){return e._emit(t,n)}),he=new O.default,he.on("*",function(t,n){return e._emit(t,n)}),he.on(T.default.VIDEO_UPDATE,e.videoUpdate.bind(e)),he.on(T.default.USER_DEVICE_STATUS_CHAANGE,e.userDeviecStatusChange.bind(e)),pe=new k.default,pe.on("*",function(t,n){return e._emit(t,n)}),pe.on(T.default.AUDIO_UPDATE,e.audioUpdate.bind(e)),pe.on(T.default.USER_DEVICE_STATUS_CHAANGE,e.userDeviecStatusChange.bind(e)),ye=new $.default,ye.on("*",function(t,n){return e._emit(t,n)}),ye.on($.default.MEDIASHARED_JOIN_CHANNEL_SUCCESS,e.mediaShareApeJoinChannelSuccess.bind(e)),Ee=new te.default,Ee.on("*",function(t,n){return e._emit(t,n)}),Ee.on(te.default.MUSICSHARED_JOIN_CHANNEL_SUCCESS,e.musicShareApeJoinChannelSuccess.bind(e)),ge=new x.default,ge.on("*",function(t,n){return e._emit(t,n)}),me=new H.default,me.on("*",function(t,n){return e._emit(t,n)}),_e=new N.default,_e.on("*",function(t,n){return e._emit(t,n)}),_e.on(T.default.DOC_UPDATE,e.docUpdateHandler.bind(e)),_e.on(T.default.DOC_DELETE,e.docDeleteHandler.bind(e)),_e.on(N.default.DOC_JOIN_CHANNEL_SUCCESS,e.docJoinChannelSuccess.bind(e)),Se=new ie.default,Se.on("*",function(t,n){return e._emit(t,n)}),e.init=e._init.bind(e),e.joinClass=e._joinClass.bind(e),e.leaveClass=e._leaveClass.bind(e),e.getMcuClientStatus=e._getMcuClientStatus.bind(e),e.getClassStatusInfo=e._getClassStatusInfo.bind(e),e.sendStartClass=e._sendStartClass.bind(e),e.silenceClass=e._silenceClass.bind(e),e.sendPauseClass=e._sendPauseClass.bind(e),e.sendCloseClass=e._sendCloseClass.bind(e),e.changeHandUpStatus=e._changeHandUpStatus.bind(e),e.controlHandUpStatus=e._controlHandUpStatus.bind(e),e.controlSilenceStatus=e._controlSilenceStatus.bind(e),e.sceneTableChange=e._sceneTableChange.bind(e),e.kickOutRosterFormNodeId=e._kickOutRosterFormNodeId.bind(e),e.sendThridChannelMessage=e._sendThridChannelMessage.bind(e),e.changeDrawStatus=e._changeDrawStatus.bind(e),e.initRecordPlayback=e._initRecordPlayback.bind(e),e.startRecordPlayback=e._startRecordPlayback.bind(e),e.stopRecordPlayback=e._stopRecordPlayback.bind(e),e.pauseRecordPlayback=e._pauseRecordPlayback.bind(e),e.seekRecordPlayback=e._seekRecordPlayback.bind(e),e.sendChatMsg=e._sendChatMsg.bind(e),e.publishScreenShare=e._publishScreenShare.bind(e),e.stopPublishScreenShare=e._stopPublishScreenShare.bind(e),e.getVideoPublishPath=e._getVideoPublishPath.bind(e),e.getVideoAllChannelInfo=e._getVideoAllChannelInfo.bind(e),e.publishVideo=e._publishVideo.bind(e),e.stopPublishVideo=e.unPublishVideo=e._stopPublishVideo.bind(e),e.sendVideoBroadcastMsg=e._sendVideoBroadcastMsg.bind(e),e.getAudioPublishPath=e._getPublishAudioPath.bind(e),e.getAudioAllChannelInfo=e._getAudioAllChannelInfo.bind(e),e.publishAudio=e._publishAudio.bind(e),e.stopPublishAudio=e.unPublishAudio=e._stopPublishAudio.bind(e),e.sendAudioBroadcastMsg=e.sendAudioCommandMsg.bind(e),e.sendInsertAnnotaion=e._sendInsertAnnotaion.bind(e),e.sendDeleteAllAnnotation=e._sendDeleteAllAnnotation.bind(e),e.sendDeleteCurPageAnnotation=e._sendDeleteCurPageAnnotation.bind(e),e.sendGotoPrev=e._sendGotoPrev.bind(e),e.sendInsertCursor=e._sendInsertCursor.bind(e),e.sendDocumentUpload=e._sendDocumentUpload.bind(e),e.sendDocumentSwitchDoc=e._sendDocumentSwitchDoc.bind(e),e.sendDocumentSwitchPage=e._sendDocumentSwitchPage.bind(e),e.sendDocumentSwitchAnimation=e._sendDocumentSwitchAnimation.bind(e),e.sendDocumentDelete=e._sassDeleteDocument.bind(e),e.sendDocBroadcastMsg=e._sendDocBroadcastMsg.bind(e),e.sendDocumentCommand=e._sendDocumentCommand.bind(e),e.getDocImageFullPath=e._getDocImageFullPath.bind(e),e.getDocPDFFullPath=e._getDocPDFFullPath.bind(e),e.getDocFullAddress=e._getDocFullAddress.bind(e),e.mediaSharedUpload=e._sendMediaSharedUpload.bind(e),e.mediaSharedDelete=e._sassDeletMediaShare.bind(e),e.mediaSharedPlay=e._sendMediaSharedPlay.bind(e),e.mediaSharedStop=e._sendMediaSharedStop.bind(e),e.mediaSharedUpdate=e._sendMediaSharedUpdate.bind(e),e.musicSharedUpload=e._sendMusicSharedUpload.bind(e),e.musicSharedDelete=e._sassDeletMusicShare.bind(e),e.musicSharedPlay=e._sendMusicSharedPlay.bind(e),e.musicSharedStop=e._sendMusicSharedStop.bind(e),e.musicSharedUpdate=e._sendMusicSharedUpdate.bind(e),e.creatQuestion=e._creatQuestion.bind(e),e.getQuestion=e._getQuestion.bind(e),e.getQuestionResult=e._getQuestionResult.bind(e),e.sendAnswer=e._sendAnswer.bind(e),e.stopQuestion=e._stopQuestion.bind(e),e.setDeviceInfo=e._setDeviceInfo.bind(e),e.setMessageDelay=e._setMessageDelay.bind(e),e.switchServer=e._switchMcuIpHandler.bind(e),e.switchMediaServer=e._switchMediaServer.bind(e),e.setDebugInfo=e._setDebugInfo.bind(e),e.setOpenSendLogToServer=e._setOpenSendLogToServer.bind(e),e.addLog=e._addLog.bind(e),e.addWarn=e._addWarn.bind(e),e.addError=e._addError.bind(e),e}return s(t,e),l(t,[{key:"_setDebugInfo",value:function(e){se.log("设置debug信息-->",e),e&&R.default.setLogDebug(e.isDebug)}},{key:"_setOpenSendLogToServer",value:function(e){se.log("设置日志上报状态-->",e),e&&(oe.default.IS_OPEN_SEND_LOG=e.isOpen)}},{key:"_addLog",value:function(e){e&&oe.default.addLog(oe.default.LOG,e)}},{key:"_addWarn",value:function(e){e&&oe.default.addLog(oe.default.WARN,e)}},{key:"_addError",value:function(e){e&&oe.default.addLog(oe.default.ERROR,e)}},{key:"_setDeviceInfo",value:function(e){se.log("设置设备信息-->",e),e&&(G.default.cameras=e.cameras||[],G.default.microphones=e.microphones||[],G.default.videoQuality=parseInt(e.videoQuality),G.default.curVideoQuality=parseInt(e.curVideoQuality),G.default.micGain=e.micGain||70,G.default.micNoise=e.micNoise||70,G.default.autoGain=e.autoGain||!1,G.default.speakerVolume=e.speakerVolume||80,G.default.micCode=e.micCode||0,G.default.curCamera=e.curCamera||"",G.default.curMicrophone=e.curMicrophone||"",!G.default.curCamera&&G.default.cameras.length>0&&(G.default.curCamera=G.default.cameras[0]),!G.default.curMicrophone&&G.default.microphones.length>0&&(G.default.curMicrophone=G.default.microphones[0]),this._updateDeviceInfo())}},{key:"_setMessageDelay",value:function(e){se.warn("延迟消息-->",e),e&&(G.default.messageDelay=e.messageDelay||!1)}},{key:"_mcuErrorHandler",value:function(e){var t={};switch(e.type){case T.default.ERR_CLASS_KICK_OUT:case T.default.ERR_CLASS_REMOTE_LANDING:e&&(t={code:e.type,reson:T.default.ErrorReson[e.type],data:e.data});break;default:t={code:e,reson:T.default.ErrorReson[e],data:{}}}this._emit(T.default.ERROR_EVENT,t),se.error("MCU_ERROR",t)}},{key:"_getMcuClientStatus",value:function(){return G.default.getCurrentStatus()}},{key:"_getClassDetail",value:function(){return G.default.getClassDetail()}},{key:"_getClassStatusInfo",value:function(){return G.default.classStatusInfo}},{key:"_runClassExit",value:function(e){this._leaveClass(e)}},{key:"_onClassStatusInfoChange",value:function(e){return G.default.getCurrentStatus().code!=G.default.statusCode_2.code?void se.warn("不能保存课堂状态",G.default.getCurrentStatus()):void this._sassSaveClassStatusInfo(e)}},{key:"_onClassRecordStart",value:function(e){return G.default.getCurrentStatus().code!=G.default.statusCode_2.code?void se.warn("不能保存课堂状态",G.default.getCurrentStatus()):void(le&&le.saveClassRecordContrlInfo(e))}},{key:"_onClassRecordSuccess",value:function(e){clearTimeout(this.classRecordStatusUpdateTimer);var t=this;this.classRecordStatusUpdateTimer=setTimeout(function(){clearTimeout(this.classRecordStatusUpdateTimer),t.updaterRecordAllApeStatus(e)},2e3)}},{key:"updaterRecordAllApeStatus",value:function(e){G.default.isHost&&!G.default.isRecordPlayBack&&(se.warn("录制状态发送改变->更新所有模块的当前数据发送到MCU"),_e&&_e.updaterRecordApeStatus(),ge&&ge.updaterRecordApeStatus(),he&&he.updaterRecordApeStatus(),pe&&pe.updaterRecordApeStatus(),ye&&ye.updaterRecordApeStatus())}},{key:"_onClassDeleteRoster",value:function(e){}},{key:"_onClassNonentityRoster",value:function(e){if(G.default.isRecordPlayBack)return void se.warn("录制回放中,不处理");if(null==e||null==e.nodeId)return void se.warn("onClassNonentityRoster.参数错误");var t={nodeId:e.nodeId};he&&(he.stopPublishVideo(t),G.default.nodeId==t.nodeId&&he.stopPublishScreenShare(t)),pe&&pe.stopPublishAudio(t)}},{key:"_init",value:function(e){return null==e||F.default.isEmptyObject(e)?(se.error("初始化课堂失败->参数错误",e),void this._emit(T.default.MCU_ERROR,T.default.ERR_CLASS_INIT_PARAM)):null==e.classId||isNaN(e.classId)||null==e.portal||""==e.portal?(se.error("初始化课堂失败->参数错误",e),void this._emit(T.default.MCU_ERROR,T.default.ERR_CLASS_INIT_PARAM)):(se.warn("=====================STEP1======================="),se.log("初始化课堂->",e),G.default.isRecordPlayBack=!1,G.default.classId=parseInt(e.classId),G.default.portal=e.portal||"",1==G.default.isHttps&&(G.default.portal=G.default.replacePort(G.default.portal,":80","")),G.default.userId=e.userId||"0",G.default.isH5=e.isH5||!1,1==G.default.isH5&&(G.default.platform="h5",G.default.deviceType=3,se.warn("设备类型是H5")),G.default.isMobile&&(G.default.cameras=e.cameras||[],G.default.microphones=e.microphones||[]),G.default.userName=e.userName||"user_"+(new Date).getTime()%1e6,"0"==G.default.userId&&(G.default.userId="user_"+(new Date).getTime()%1e6),G.default.userRole=e.userRole||Y.default.normal,G.default.userRole!=Y.default.host&&G.default.userRole!=Y.default.presenter&&G.default.userRole!=Y.default.assistant&&G.default.userRole!=Y.default.record&&G.default.userRole!=Y.default.invisible&&(G.default.userRole=Y.default.normal),G.default.messageDelay=e.messageDelay||!1,e.allowRecordMaxTime&&(G.default.allowRecordMaxTime=parseInt(e.allowRecordMaxTime)),void(le&&le.getJoinParams(G.default.getClassInfo())))}},{key:"_joinClass",value:function(e){if(null==e||F.default.isEmptyObject(e))return this._emit(T.default.MCU_ERROR,T.default.ERR_CLASS_JOIN_PARAM),void se.log("加入课堂失败->参数错误.",e);if(null==e.userName||""==e.userName)return se.log("加入课堂失败->参数错误->名字不能为空"),void this._emit(T.default.MCU_ERROR,T.default.ERR_CLASS_JOIN_PARAM);G.default.userName=e.userName||G.default.userName,
G.default.autoLogin=e.autoLogin||"",G.default.password=e.password||"",G.default.hasCamera="boolean"==typeof e.hasCamera&&e.hasCamera,G.default.hasMicrophone="boolean"==typeof e.hasMicrophone&&e.hasMicrophone;var t=(0,v.default)(""+G.default.classId+G.default.userId+G.default.userRole);G.default.autoLogin&&t==G.default.autoLogin?(se.log("自动登录"),this._sassJoinSuccessHandler()):le&&le.passwordAndMd5Checking(G.default.getClassInfo())}},{key:"_sassInitSuccessHandler",value:function(e){G.default.md5=e.md5||"",G.default.msType=e.msType||1,G.default.siteId=e.siteId||"",G.default.classType=e.meetingType||Y.default.CLASS_TYPE_1,G.default.passwordRequired=e.passwordRequired||!1,se.log("初始化课堂验证完成."),G.default.setCurrentStatus(G.default.statusCode_1);var t={};t.siteId=G.default.siteId,t.classId=G.default.classId,t.userRole=G.default.userRole,t.userId=G.default.userId,t.userName=G.default.userName,t.classType=G.default.classType,G.default.userRole==Y.default.host?t.passwordRequired=!0:t.passwordRequired=G.default.passwordRequired,this._emit(T.default.CLASS_INIT_SUCCESS,t)}},{key:"_sassJoinSuccessHandler",value:function(e){le&&le.getClassParam()}},{key:"loadServerJsonAndgetUserIpInfo",value:function(){var e=this;se.warn("=====================STEP6======================="),ue&&ue.loadServerJosn(function(t){t?(z.default.localServerJson=t.data,console.warn("本地SERVER数据",t)):z.default.localServerJson={},z.default.localServerJson&&z.default.localServerJson.MCU&&z.default.localServerJson.MS?(z.default.serverList=z.default.localServerJson,se.warn("使用从本地获取的server")):(z.default.serverList=z.default.sassServerJson,se.warn("使用从Sass获取的server")),ue.getUserIpInfo("",G.default.userIp,e._getUserIpCallbackHandler.bind(e),2e3)})}},{key:"_getUserIpCallbackHandler",value:function(e){this.isGetUserIpCallback||(this.isGetUserIpCallback=!0,e&&"ok"==e.ret&&(G.default.country=e.country,G.default.city=e.city,G.default.province=e.province,G.default.isp=e.isp),this._choiceMcuAndMsListFromServer(),this.getMcuAndMsDefaultServerIp(),se.warn("加入课堂之前->开始测速->选择默认服务"),this._startFirstTestBestServer())}},{key:"_startFirstTestBestServer",value:function(){var e=this;se.warn("=====================STEP7======================="),this._getFastestIpFromServer(G.default.msListFinal,function(t){se.log("推流地址测速->",t),t&&t.ip&&(G.default.MS_PUBLISH_IP=t.ip||"",G.default.MS_PUBLISH_PORT=t.port||""),e.isGetFastestMsCallback=!0,e._startConnectMCU()}),this._getFastestIpFromServer(G.default.rsPullListFinal,function(t){se.log("录制回放HLS拉流地址测速->",t),t&&t.ip&&(G.default.RS_RECORD_PLAY_IP=t.ip||"",G.default.RS_RECORD_PLAY_PORT=t.port||""),e.isGetFastestRsCallback=!0,e._startConnectMCU()}),this._getFastestIpFromServer(G.default.rtmpPullListFinal,function(t){se.log("RTMP拉流地址测速->",t),t&&t.ip&&(G.default.MS_PLAY_RTMP_IP=t.ip||"",G.default.MS_PLAY_RTMP_PORT=t.port||""),e.isGetFastestRtmpPullCallback=!0,e._startConnectMCU()}),this._getFastestIpFromServer(G.default.hlsPullListFinal,function(t){se.log("HLS拉流地址测速->",t),t&&t.ip&&(G.default.MS_PLAY_HLS_IP=t.ip||"",G.default.MS_PLAY_HLS_PORT=t.port||""),e.isGetFastestHlsPullCallback=!0,e._startConnectMCU()}),this._getFastestMcuServer(function(t){se.log("MCU测速->",t),t&&t.ip&&(G.default.MCUServerIP=t.ip||"",G.default.MCUServerPort=t.port||""),e.isGetFastestMcuCallback=!0,e._startConnectMCU()})}},{key:"_startConnectMCU",value:function(){this.isGetFastestMcuCallback&&this.isGetFastestMsCallback&&this.isGetFastestRtmpPullCallback&&this.isGetFastestHlsPullCallback&&this.isGetFastestRsCallback&&this._joinMCU()}},{key:"_choiceMcuAndMsListFromServer",value:function(){ue&&(G.default.mcuListFinal=ue.getServerListForUserInfo("MCU",G.default.country,G.default.province,G.default.city,G.default.isp,z.default.serverList),G.default.msListFinal=ue.getServerListForUserInfo("MS",G.default.country,G.default.province,G.default.city,G.default.isp,z.default.serverList),G.default.rtmpPullListFinal=ue.getServerListForUserInfo("RTMP_PULL",G.default.country,G.default.province,G.default.city,G.default.isp,z.default.serverList),G.default.rsPullListFinal=ue.getServerListForUserInfo("RS_PULL",G.default.country,G.default.province,G.default.city,G.default.isp,z.default.serverList),G.default.hlsPullListFinal=ue.getServerListForUserInfo("HLS_PULL",G.default.country,G.default.province,G.default.city,G.default.isp,z.default.serverList)),(!G.default.rtmpPullListFinal||G.default.rtmpPullListFinal.length<1)&&(G.default.rtmpPullListFinal=G.default.msListFinal),(!G.default.hlsPullListFinal||G.default.hlsPullListFinal.length<1)&&(G.default.hlsPullListFinal=G.default.rsPullListFinal),z.default.localServerJson&&z.default.localServerJson.MCU&&z.default.localServerJson.MS?se.warn("课堂最终使用的服务列表->来自本地Server.json"):se.warn("课堂最终使用的服务列表->来自Sass"),se.warn("mcuListFinal",G.default.mcuListFinal),se.warn("msListFinal",G.default.msListFinal),se.warn("rtmpPullListFinal",G.default.rtmpPullListFinal),se.warn("hlsListFinal",G.default.hlsPullListFinal),se.warn("rsListFinal",G.default.rsPullListFinal)}},{key:"_choiceMcuAndMsListFromSass",value:function(){ue&&(G.default.mcuListFinal=ue.getServerListForUserInfo("MCU",G.default.country,G.default.province,G.default.city,G.default.isp,z.default.serverList),G.default.msListFinal=ue.getServerListForUserInfo("MS",G.default.country,G.default.province,G.default.city,G.default.isp,z.default.serverList),G.default.rtmpPullListFinal=ue.getServerListForUserInfo("RTMP_PULL",G.default.country,G.default.province,G.default.city,G.default.isp,z.default.serverList),G.default.rsPullListFinal=ue.getServerListForUserInfo("RS_PULL",G.default.country,G.default.province,G.default.city,G.default.isp,z.default.serverList),G.default.hlsPullListFinal=ue.getServerListForUserInfo("HLS_PULL",G.default.country,G.default.province,G.default.city,G.default.isp,z.default.serverList)),se.warn("Sass中获取的服务器信息;"),(!G.default.rtmpPullListFinal||G.default.rtmpPullListFinal.length<1)&&(G.default.rtmpPullListFinal=G.default.msListFinal),(!G.default.hlsPullListFinal||G.default.hlsPullListFinal.length<1)&&(G.default.hlsPullListFinal=G.default.rsPullListFinal),se.warn("课堂最终使用的服务列表->来自Sass"),se.warn(" GlobalConfig.mcuListFinal",G.default.mcuListFinal),se.warn(" GlobalConfig.msListFinal",G.default.msListFinal),se.warn(" GlobalConfig.rtmpPullListFinal",G.default.rtmpPullListFinal),se.warn(" GlobalConfig.hlsListFinal",G.default.hlsPullListFinal),se.warn(" GlobalConfig.rsListFinal",G.default.rsPullListFinal)}},{key:"_getFastestIpFromServer",value:function(e,t){ue?ue.testFastestIpFromServer(e,t):t&&t({ip:""})}},{key:"_getFastestMcuServer",value:function(e){ue?ue.getFastestMcuServer(G.default.mcuListFinal,e):e&&e({ip:""})}},{key:"_getFastestMsServer",value:function(e){ue?ue.getFastestMsServer(G.default.msListFinal,e):e&&e({ip:""})}},{key:"_getFastestRtmpPullServer",value:function(e){ue?ue.getFastestMsServer(G.default.rtmpPullListFinal,e):e&&e({ip:""})}},{key:"_getFastestHlsServer",value:function(e){ue?ue.getFastestMsServer(G.default.rtmpPullListFinal,e):e&&e({ip:""})}},{key:"_sassSaveClassStatusInfo",value:function(e){var t=!1;e&&1==e.isForce&&(t=!0),G.default.isHost||t?G.default.getCurrentStatus().code==G.default.statusCode_2.code?le.saveClassStatusInfo({classStatusInfo:G.default.classStatusInfo}):se.error("不能保存课堂数据",G.default.getCurrentStatus()):se.log("没有保存课堂状态信息的权限->身份",G.default.userRole)}},{key:"_sassSaveClassStatusInfoSuccessHandler",value:function(e){se.log("保存课堂状态信息成功."),se.log(e)}},{key:"_sassSaveClassRecordInfoSuccessHandler",value:function(e){se.log("保存课堂录制信息成功."),se.log(e)}},{key:"_joinMCU",value:function(){se.warn("=====================STEP8======================="),se.log("加入课堂->."),se.warn("最终使用课堂服务信息->"),se.warn("MCU服务器地址->mcu->",G.default.MCUServerIP,G.default.MCUServerPort),se.warn("推流地址->MS->",G.default.MS_PUBLISH_IP,G.default.MS_PUBLISH_PORT),se.warn("RTMP拉流地址->RTMP->",G.default.MS_PLAY_RTMP_IP,G.default.MS_PLAY_RTMP_PORT),se.warn("HLS拉流地址->HLS->",G.default.MS_PLAY_HLS_IP,G.default.MS_PLAY_HLS_PORT),se.warn("HLS录制回放拉流地址->HLS->",G.default.RS_RECORD_PLAY_IP,G.default.RS_RECORD_PLAY_PORT),G.default.MS_PUBLISH_IP||se.error("推流MS地址地址无效"),G.default.MS_PLAY_RTMP_IP||(se.warn("RTMP拉流地址无效->使用推流地址作为RTMP拉流地址"),G.default.MS_PLAY_RTMP_IP=G.default.MS_PUBLISH_IP,G.default.MS_PLAY_RTMP_PORT=G.default.MS_PUBLISH_PORT),G.default.MS_PLAY_HLS_IP||(se.warn("HLS拉流地址无效->使用HLS回放地址作为HLS拉流地址"),G.default.MS_PLAY_HLS_IP=G.default.MS_PLAY_HLS_PORT,G.default.RS_RECORD_PLAY_IP=G.default.RS_RECORD_PLAY_PORT),de&&de.joinMCU(G.default.getClassInfo())}},{key:"_switchMcuIp",value:function(){se.log("切换MCU IP->."),de&&de.switchMCUIp(G.default.getClassInfo())}},{key:"_mcuJoinMCUClassSuccessHandler",value:function(e){se.warn("=====================STEP9======================="),G.default.setCurrentStatus(G.default.statusCode_2),G.default.classJoinSuccess=!0,G.default.screenWidth=window.screen.width,G.default.screenHeight=window.screen.height;var t={};t.isRecordPlayBack=G.default.isRecordPlayBack,t.DOCServerIP=G.default.DOCServerIP,t.DOCServerPort=G.default.DOCServerPort,t.classStatus=G.default.classStatus,t.classId=G.default.classId,t.className=G.default.className,t.h5Module=G.default.h5Module,t.isHost=G.default.isHost,t.maxAudioChannels=G.default.maxAudioChannels,t.maxVideoChannels=G.default.maxVideoChannels,t.maxMediaChannels=G.default.maxMediaChannels,t.mcuDelay=G.default.mcuDelay,t.msType=G.default.msType,t.nodeId=G.default.nodeId,t.password=G.default.password,t.passwordRequired=G.default.passwordRequired,t.role=G.default.role,t.siteId=G.default.siteId,t.topNodeID=G.default.topNodeID,t.userId=G.default.userId,t.userName=G.default.userName,t.userRole=G.default.userRole,t.userType=G.default.userType,t.siteId=G.default.siteId,t.classId=G.default.classId,t.userRole=G.default.userRole,t.userId=G.default.userId,t.passwordRequired=G.default.passwordRequired,t.classType=G.default.classType||Y.default.CLASS_TYPE_1,t.country=G.default.country,t.city=G.default.city,t.province=G.default.province,t.isp=G.default.isp,t.classTimestamp=G.default.classTimestamp,t.recordTimestamp=G.default.recordTimestamp,t.recordPlaybackMaxTime=G.default.recordPlaybackMaxTime,t.fps=G.default.fps,t.gop=G.default.gop,t.videoQuality=G.default.videoQuality,t.ssTunnelAppURL=G.default.ssTunnelAppURL,t.currentSceneTableId=G.default.currentSceneTableId,t.serverAndLoacTimeDistanc=G.default.serverAndLoacTimeDistanc,t.deviceType=G.default.deviceType,t.language=G.default.language,t.explorer=G.default.explorer,t.explorerVersion=G.default.explorerVersion,t.os=G.default.os,oe.default.serverAndLoacTimeDistanc=G.default.serverAndLoacTimeDistanc,oe.default.classId=G.default.classId,oe.default.userId=G.default.userId,oe.default.nodeId=G.default.nodeId,oe.default.userRole=G.default.userRole,oe.default.userName=G.default.userName,oe.default.logUrl=G.default.logUrl,oe.default.platform=G.default.platform,se.log("加入课堂成功->"),se.log(t),this._emit(T.default.CLASS_JOIN_SUCCESS,t)}},{key:"_switchMcuIpHandler",value:function(e){if(G.default.isRecordPlayBack)return void se.log("录制回放->不进行MCU动态选点");se.log("MCU->动态选点");var t=this;this._getFastestMcuServer(function(n){se.log("MCU选点结束->",n);var i=G.default.MCUServerIP;if(n&&n.ip)G.default.MCUServerIP=n.ip||"",G.default.MCUServerPort=n.port||"";else if(G.default.mcuListFinal&&G.default.mcuListFinal.length>0)if(G.default.MCUServerIP&&1!=G.default.mcuListFinal.length){for(var r=0;r<G.default.mcuListFinal.length;r++)if(G.default.MCUServerIP==G.default.mcuListFinal[r].ip){var a=G.default.mcuListFinal[r+1];a||(a=G.default.mcuListFinal[0]),a&&(G.default.MCUServerIP=a.ip||"",G.default.MCUServerPort=a.port||"");break}}else{var o=parseInt(Math.random()*G.default.mcuListFinal.length);G.default.MCUServerIP=G.default.mcuListFinal[o].ip||"",G.default.MCUServerPort=G.default.mcuListFinal[o].port||""}i&&i!=G.default.MCUServerIP?(se.log("MCU->最新地址->",G.default.MCUServerIP,G.default.MCUServerPort),e&&1==e.reConnect?(se.log("MCU->切换到最新的IP->",G.default.MCUServerIP,G.default.MCUServerPort),t._startConnectMCU()):t._switchMcuIp()):se.log("MCU不需要切换->之前的IP->",i,"新的IP->",G.default.MCUServerIP)})}},{key:"_stopAllMediaPublishHandler",value:function(e){se.log("课堂状态发生改变,需要停止当前的所有推流"),this._emit(T.default.MEDIA_STOP_PUBLISH)}},{key:"_switchMediaServer",value:function(e){return G.default.isRecordPlayBack?void se.warn("录制回放->不能手动切换MS"):(e&&e.ip&&(G.default.MS_PUBLISH_IP=e.ip||"",G.default.MS_PUBLISH_PORT=e.port||""),se.warn("手动切换MS->",G.default.MS_PUBLISH_IP+":"+G.default.MS_PUBLISH_PORT),void(ce&&ce.updateUserInfo()))}},{key:"_switchMsIpHandler",value:function(e){return G.default.isRecordPlayBack?void se.warn("录制回放->不进行MS动态选点"):void this._getFastestMsServer(function(e){se.log("MS选点结束->",e);var t=G.default.MS_PUBLISH_IP;if(e&&e.ip)G.default.MS_PUBLISH_IP=e.ip||"",G.default.MS_PUBLISH_PORT=e.port||"";else if(G.default.msListFinal&&G.default.msListFinal.length>0){var n=parseInt(Math.random()*G.default.msListFinal.length);G.default.MS_PUBLISH_IP=G.default.msListFinal[n].ip||"",G.default.MS_PUBLISH_PORT=G.default.msListFinal[n].port||""}t&&t!=G.default.MS_PUBLISH_IP?(ce&&ce.updateUserInfo(),se.log("MS->最新地址->",G.default.MS_PUBLISH_IP,G.default.MS_PUBLISH_PORT)):se.log("MS不需要切换->IP",G.default.MS_PUBLISH_IP)})}},{key:"_switchRtmpPullIpHandler",value:function(e){return G.default.isRecordPlayBack?void se.warn("录制回放->不进行MS-PULL动态选点"):void(!G.default.rtmpPullListFinal||G.default.rtmpPullListFinal.length<1||this._getFastestRtmpPullServer(function(e){if(se.log("MS->PULL->选点结束->",e),e&&e.ip)G.default.MS_PLAY_RTMP_IP=e.ip||"",G.default.MS_PLAY_RTMP_PORT=e.port||"";else if(G.default.rtmpPullListFinal&&G.default.rtmpPullListFinal.length>0){var t=parseInt(Math.random()*G.default.rtmpPullListFinal.length);G.default.MS_PLAY_RTMP_IP=G.default.rtmpPullListFinal[t].ip||"",G.default.MS_PLAY_RTMP_PORT=G.default.rtmpPullListFinal[t].port||""}G.default.MS_PLAY_RTMP_IP||(G.default.MS_PLAY_RTMP_IP=G.default.MS_PUBLISH_IP,G.default.MS_PLAY_RTMP_PORT=G.default.MS_PUBLISH_PORT)}))}},{key:"_switchHlsIpHandler",value:function(e){return G.default.isRecordPlayBack?void se.warn("录制回放->不进行MS-HLS动态选点"):void(!G.default.hlsPullListFinal||G.default.hlsPullListFinal.length<1||this._getFastestHlsServer(function(e){if(se.log("HLS选点结束->",e),e&&e.ip)G.default.MS_PLAY_HLS_IP=e.ip||"",G.default.MS_PLAY_HLS_PORT=e.port||"";else if(G.default.hlsPullListFinal&&G.default.hlsPullListFinal.length>0){var t=parseInt(Math.random()*G.default.hlsPullListFinal.length);G.default.MS_PLAY_HLS_IP=G.default.hlsPullListFinal[t].ip||"",G.default.MS_PLAY_HLS_PORT=G.default.hlsPullListFinal[t].port||""}G.default.MS_PLAY_HLS_IP||(G.default.MS_PLAY_HLS_IP=G.default.RS_RECORD_PLAY_IP,G.default.MS_PLAY_HLS_PORT=G.default.RS_RECORD_PLAY_PORT)}))}},{key:"_sassDeleteDocument",value:function(e){return de.connected?null==e||F.default.isEmptyObject(e)?(se.error("删除文档失败->参数错误",e),void this._emit(T.default.MCU_ERROR,T.default.ERR_DOC_DELETE_FAILED_PARAM)):null==e.itemIdx||isNaN(e.itemIdx)||null==e.docId||""==e.docId?(se.error("删除文档失败->",e),void this._emit(T.default.MCU_ERROR,T.default.ERR_DOC_DELETE_FAILED_PARAM)):(se.log("删除文档->",e),void(le&&le.sassDeleteDocument(e))):void se.warn(G.default.getCurrentStatus())}},{key:"_sendDocBroadcastMsg",value:function(e){return de.connected?void(_e&&_e.sendDocBroadcastMsg(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sassDeleteDocumentSuccess",value:function(e){se.log("删除文档成功->",e),this._sendDocumentDelete(e)}},{key:"_sassDeleteMediaShareSuccess",value:function(e){se.log("删除媒体文件成功->",e),this._sendMediaSharedDelete(e)}},{key:"_sassDeleteMusicShareSuccess",value:function(e){se.log("删除Music文件成功->",e),this._sendMusicSharedDelete(e)}},{key:"_sendStartClass",value:function(e){return de.connected?void(ce&&ce.startClass(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_silenceClass",value:function(e){return de.connected?void(ce&&ce.silenceClass(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_changeDrawStatus",value:function(e){return de.connected?void(ce&&ce.changeDrawStatus(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendPauseClass",value:function(e){return de.connected?void(ce&&ce.pauseClass(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_updateDeviceInfo",value:function(e){return de.connected?(G.default.classJoinSuccess||se.warn("更新设备信息->失败->还没有加入课堂成功",G.default.getCurrentStatus()),void(ce&&ce.updateDeviceInfo(e))):(se.warn("更新设备信息->失败",G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_sceneTableChange",value:function(e){return de.connected?void(ce&&ce.sceneTableChange(e)):(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_sendThridChannelMessage",value:function(e){return de.connected?void(ce&&ce.onThirdReciveParentMessage(e)):(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_kickOutRosterFormNodeId",value:function(e){return de.connected?void(ce&&ce.kickOutRosterFormNodeId(e)):(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_controlSilenceStatus",value:function(e){return de.connected?void(ce&&ce.controlSilenceStatus(e)):(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_controlHandUpStatus",value:function(e){return de.connected?void(ce&&ce.controlHandUpStatus(e)):(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_changeHandUpStatus",value:function(e){return de.connected?void(ce&&ce.changeHandUpStatus(e)):(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_sendCloseClass",value:function(e){return de.connected?void(ce&&ce.closeClass(e)):(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_leaveClass",value:function(e){if(!de.connected)return se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""};he&&(he.stopPublishVideo(),he.stopPublishScreenShare()),pe&&pe.stopPublishAudio(),ce&&(ce.stopRecord(),ce.leaveClass());var t={};e&&e.type?t=e:t.type=0,se.warn("离开课堂->",T.default.CLASS_EXIT,t),oe.default.sendLogToServer(),this._emit(T.default.CLASS_EXIT,t),de&&(de.leaveMCU(),G.default.setCurrentStatus(G.default.statusCode_3))}},{key:"_sassGetClassParamSuccessHandler",value:function(e){if(se.log("获取课堂课堂信息完成."),e){if(G.default.mcuDelay=e.h5Delay||0,G.default.className=e.meetingName||"",G.default.classBeginTime=e.beginTime||"",G.default.classEndTime=e.endTime||"",G.default.userIp?se.warn("使用SDK获取的userIp",G.default.userIp):(G.default.userIp=e.userIp||"",se.warn("使用从Sass返回的userIp",G.default.userIp)),G.default.maxVideoChannels=e.maxVideoChannels,G.default.maxAudioChannels=e.maxAudioChannels,G.default.maxMediaChannels=Math.max(G.default.maxVideoChannels,G.default.maxAudioChannels),se.warn("当前课堂允许最大推流数量-"+G.default.maxMediaChannels+" 视频频:"+G.default.maxVideoChannels+" 音频:"+G.default.maxAudioChannels),G.default.ssTunnelAppURL=e.ssTunnelAppURL||"",G.default.fps=e.fps||15,G.default.gop=e.gop||3,G.default.videoQuality=parseInt(e.videoQuality),G.default.curVideoQuality=G.default.videoQuality,G.default.isAutoStartClass=e.autoRecord||0,G.default.logUrl=e.logUrl||"",G.default.logUrl=G.default.logUrl.replace("https://",""),G.default.logUrl=G.default.logUrl.replace("http://",""),G.default.logUrl=G.default.locationProtocol+G.default.logUrl,G.default.serverTime=e.serverTime||(new Date).getTime(),G.default.serverAndLoacTimeDistanc=((new Date).getTime()-G.default.serverTime)/1e3,se.warn("服务器时间:"+G.default.serverTime+"  系统时间:"+(new Date).getTime()+"  时间差:"+G.default.serverAndLoacTimeDistanc),G.default.setDocListPrepare(e.docListPrepare),G.default.setRecordList(e.recordList),G.default.setDocList(e.docList),G.default.setMusicList(e.musicList),G.default.setMusicListPrepare(e.musicListPrepare),G.default.setVideoCDNAddr(e.videoCDNAddr),G.default.setMediaShareList(e.sharedMediaList),G.default.docList&&G.default.docList.length>0){var t=parseInt(Math.random()*G.default.docList.length);G.default.DOCServerIP=G.default.docList[t].ip||"",G.default.DOCServerPort=G.default.docList[t].port||"",G.default.isHttps&&(G.default.DOCServerPort=G.default.replacePort(G.default.DOCServerPort,"80",""))}if(G.default.recordList&&G.default.recordList.length>0){var n=parseInt(Math.random()*G.default.recordList.length);G.default.RecordServerIP=G.default.recordList[n].ip||"",G.default.RecordServerPort=G.default.recordList[n].port||"",G.default.isHttps&&(G.default.RecordServerPort=G.default.replacePort(G.default.RecordServerPort,"80",""))}se.warn("默认->文档服务器地址->.",G.default.DOCServerIP,G.default.DOCServerPort),se.warn("默认->录制回放文件下载地址->.",G.default.RecordServerIP,G.default.RecordServerPort);var i=e.serverJson;try{z.default.sassServerJson=JSON.parse(i)}catch(e){se.error("从SASS获取的SERVER数据解析失败",e.message)}}if(this._emit(T.default.CLASS_GET_INFO_SUCCESS,G.default.getClassInfo()),e.currentInfo){try{G.default.setClassStatusInfo(JSON.parse(e.currentInfo))}catch(t){se.warn("从Sass获取的课堂数据JSON转换失败->"),console.log("currentInfo",e.currentInfo),G.default.setClassStatusInfo(e.currentInfo)}se.log(G.default.classStatusInfo)}else se.log("还没有保存过课堂状信息");G.default.isRecordPlayBack?ve?(se.warn("开启录制回放流程"),z.default.serverList=z.default.sassServerJson,this._choiceMcuAndMsListFromSass(),this.getMcuAndMsDefaultServerIp(),ve.readyRecordPlay()):se.warn("开启录制回放流程失败->还未创建模块"):this.loadServerJsonAndgetUserIpInfo()}},{key:"getMcuAndMsDefaultServerIp",value:function(){if(G.default.mcuListFinal&&G.default.mcuListFinal.length>0){var e=parseInt(Math.random()*G.default.mcuListFinal.length);G.default.MCUServerIP=G.default.mcuListFinal[e].ip||"",G.default.MCUServerPort=G.default.mcuListFinal[e].port||""}if(G.default.rsPullListFinal&&G.default.rsPullListFinal.length>0){var t=parseInt(Math.random()*G.default.rsPullListFinal.length);G.default.RS_RECORD_PLAY_IP=G.default.rsPullListFinal[t].ip||"",G.default.RS_RECORD_PLAY_PORT=G.default.rsPullListFinal[t].port||""}if(G.default.msListFinal&&G.default.msListFinal.length>0){var n=parseInt(Math.random()*G.default.msListFinal.length);G.default.MS_PUBLISH_IP=G.default.msListFinal[n].ip||"",G.default.MS_PUBLISH_PORT=G.default.msListFinal[n].port||""}if(G.default.rtmpPullListFinal&&G.default.rtmpPullListFinal.length>0){var i=parseInt(Math.random()*G.default.rtmpPullListFinal.length);G.default.MS_PLAY_RTMP_IP=G.default.rtmpPullListFinal[i].ip||"",G.default.MS_PLAY_RTMP_PORT=G.default.rtmpPullListFinal[i].port||""}else G.default.MS_PLAY_RTMP_IP=G.default.MS_PUBLISH_IP,G.default.MS_PLAY_RTMP_PORT=G.default.MS_PUBLISH_PORT;if(G.default.hlsPullListFinal&&G.default.hlsPullListFinal.length>0){var r=parseInt(Math.random()*G.default.hlsPullListFinal.length);G.default.MS_PLAY_HLS_IP=G.default.hlsPullListFinal[r].ip||"",G.default.MS_PLAY_HLS_PORT=G.default.hlsPullListFinal[r].port||""}else G.default.MS_PLAY_HLS_IP=G.default.RS_RECORD_PLAY_IP,G.default.MS_PLAY_HLS_PORT=G.default.RS_RECORD_PLAY_PORT;se.warn("默认->MCU地址->.",G.default.MCUServerIP,G.default.MCUServerPort),se.warn("默认->MS推流地址->.",G.default.MS_PUBLISH_IP,G.default.MS_PUBLISH_PORT),se.warn("默认->HLS点播地址->.",G.default.RS_RECORD_PLAY_IP,G.default.RS_RECORD_PLAY_PORT),se.warn("默认->HLS拉流地址->.",G.default.MS_PLAY_HLS_IP,G.default.MS_PLAY_HLS_PORT),se.warn("默认->RTMP拉流地址->.",G.default.MS_PLAY_RTMP_IP,G.default.MS_PLAY_RTMP_PORT)}},{key:"_sendChatMsg",value:function(e){return de.connected?null===e||F.default.isEmptyObject(e)?(se.log("发送聊天消息失败->参数错误",e),{code:Y.default.RETURN_FAILED,data:""}):void(fe&&fe.sendChatMsg(e)):(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"userDeviecStatusChange",value:function(e){ce&&ce.updaterUserDeviecStatusChange(e)}},{key:"_publishScreenShare",value:function(e){he&&he.publishScreenShare(e)}},{key:"_stopPublishScreenShare",value:function(e){he&&he.stopPublishScreenShare(e)}},{key:"videoUpdate",value:function(e){ce&&ce.updaterRosterStatus(e)}},{key:"_sendVideoBroadcastMsg",value:function(e){return de.connected?he?he.sendVideoBroadcastMsg(e):void 0:(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_getVideoPlayPath",value:function(e){if(he)return he.getPlayVideoPath(e)}},{key:"_getVideoPublishPath",value:function(e){if(he)return he.getPublishVideoPath(e)}},{key:"_getVideoAllChannelInfo",value:function(e){if(he)return he.getAllChannelInfo(e)}},{key:"_publishVideo",value:function(e){return de.connected?he?he.publishVideo(e):void 0:(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_stopPublishVideo",value:function(e){return de.connected?he?he.stopPublishVideo(e):void 0:(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"audioUpdate",value:function(e){ce&&ce.updaterRosterStatus(e)}},{key:"sendAudioCommandMsg",value:function(e){return de.connected?pe?pe.sendAudioBroadcastMsg(e):void 0:(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_getPlayAudioPath",value:function(e){if(pe)return pe.getAudioPlayPath(e)}},{key:"_getPublishAudioPath",value:function(e){if(pe)return pe.getAudioPublishPath(e)}},{key:"_getAudioAllChannelInfo",value:function(e){if(pe)return pe.getAllChannelInfo(e)}},{key:"_publishAudio",value:function(e){return de.connected?pe?pe.publishAudio(e):void 0:(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_stopPublishAudio",value:function(e){return de.connected?pe?pe.stopPublishAudio(e):void 0:(se.warn(G.default.getCurrentStatus()),{code:Y.default.RETURN_FAILED,data:""})}},{key:"_sendInsertAnnotaion",value:function(e){return de.connected?void(ge&&ge.sendInsetAnnotaion(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendInsertCursor",value:function(e){return de.connected?void(me&&me.sendInsertCursor(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendDeleteCurPageAnnotation",value:function(e){return de.connected?void(ge&&ge.sendDeleteCurPageAnnotation(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendDeleteAllAnnotation",value:function(e){return de.connected?void(ge&&ge.sendDeleteAllAnnotation(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendGotoPrev",value:function(e){ge&&ge.sendGotoPrev(e)}},{key:"_getDocFullAddress",value:function(e){return _e?_e.getDocFullAddress(e):(se.error("文档模块还没有创建无法获取"),{code:Y.default.RETURN_FAILED,data:"文档模块还没有创建无法获取"})}},{key:"_getDocImageFullPath",value:function(e){return _e?_e.getDocImageFullPath(e):(se.error("文档模块还没有创建无法获取"),[])}},{key:"_getDocPDFFullPath",value:function(e){return _e?_e.getDocPDFFullPath(e):(se.error("文档模块还没有创建,无法获取"),[])}},{key:"_sendDocumentUpload",value:function(e){return de.connected?void(_e&&_e.documentUpload(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendDocumentSwitchDoc",value:function(e){return de.connected?void(_e&&_e.documentSwitchDoc(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendDocumentSwitchPage",value:function(e){return de.connected?void(_e&&_e.documentSwitchPage(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendDocumentSwitchAnimation",value:function(e){return de.connected?void(_e&&_e.documentSwitchAnimation(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendDocumentCommand",value:function(e){return de.connected?void(_e&&_e.documentCommand(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendDocumentDelete",value:function(e){return de.connected?void(_e&&_e.documentDelete(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_documentDeleteAll",value:function(e){return de.connected?void(_e&&_e.documentDeleteAll(e)):void se.warn(G.default.getCurrentStatus())}},{key:"docUpdateHandler",value:function(e){return de.connected||G.default.isRecordPlayBack?void(ge&&ge.docUpdateHandler(e)):void se.warn(G.default.getCurrentStatus())}},{key:"docDeleteHandler",value:function(e){ge&&ge.docDeleteHandler(e)}},{key:"docJoinChannelSuccess",value:function(){if(se.log("docJoinChannelSuccess->isHost=",G.default.isHost,"当前总人数:",G.default.rosterNumber,"sassDoclength=",G.default.docListPrepare.length),G.default.docListPrepare&&G.default.docListPrepare.length>0&&(G.default.isHost||G.default.rosterNumber<=1))for(var e=0;e<G.default.docListPrepare.length;e++){var t=G.default.docListPrepare[e];if(t){var n={pageNum:t.pdfSize,fileName:t.name,fileType:t.type,relativeUrl:t.relativeLocation,url:t.absoluteLocation,creatUserId:t.createUserID,docId:t.id,md5:t.MD5,visible:!1};this._sendDocumentUpload(n)}}}},{key:"_sendMediaSharedUpload",value:function(e){return de.connected?void(ye&&ye.mediaSharedUpload(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendMusicSharedUpload",value:function(e){return de.connected?void(Ee&&Ee.musicSharedUpload(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sassDeletMediaShare",value:function(e){return de.connected?null==e||F.default.isEmptyObject(e)?(se.error("删除媒体文件失败->参数错误",e),void this._emit(T.default.MCU_ERROR,T.default.ERR_MEDIASHARE_DELETE_FAILED_PARAM)):null==e.itemIdx||isNaN(e.itemIdx)||null==e.fileId||""==e.fileId?(se.error("删除媒体文件失败->",e),void this._emit(T.default.MCU_ERROR,T.default.ERR_MEDIASHARE_DELETE_FAILED_PARAM)):(se.log("删除媒体文件->",e),void(le&&le.sassDeletMediaShare(e))):void se.warn(G.default.getCurrentStatus())}},{key:"_sassDeletMusicShare",value:function(e){return de.connected?null==e||F.default.isEmptyObject(e)?(se.error("删除媒体文件失败->参数错误",e),void this._emit(T.default.MCU_ERROR,T.default.ERR_MUSICSHARE_DELETE_FAILED_PARAM)):null==e.itemIdx||isNaN(e.itemIdx)||null==e.fileId||""==e.fileId?(se.error("删除媒体文件失败->",e),void this._emit(T.default.MCU_ERROR,T.default.ERR_MUSICSHARE_DELETE_FAILED_PARAM)):(se.log("删除媒体文件->",e),void(le&&le.sassDeletMusicShare(e))):void se.warn(G.default.getCurrentStatus())}},{key:"_sendMediaSharedDelete",value:function(e){return de.connected?void(ye&&ye.mediaSharedDelete(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendMusicSharedDelete",value:function(e){return de.connected?void(Ee&&Ee.musicSharedDelete(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendMusicSharedUpdate",value:function(e){return de.connected?void(Ee&&Ee.musicSharedUpdate(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendMusicSharedPlay",value:function(e){return de.connected?void(Ee&&Ee.musicSharedPlay(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendMusicSharedStop",value:function(e){return de.connected?void(Ee&&Ee.musicSharedStop(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendMediaSharedUpdate",value:function(e){return de.connected?void(ye&&ye.mediaSharedUpdate(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendMediaSharedPlay",value:function(e){return de.connected?void(ye&&ye.mediaSharedPlay(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendMediaSharedStop",value:function(e){return de.connected?void(ye&&ye.mediaSharedStop(e)):void se.warn(G.default.getCurrentStatus())}},{key:"musicShareApeJoinChannelSuccess",value:function(){if(se.log("伴音MUSIC模块加入频道成功->isHost=",G.default.isHost,"length=",G.default.musicListPrepare.length),G.default.isHost&&G.default.musicListPrepare.length>0)for(var e=0;e<G.default.musicListPrepare.length;e++){var t=G.default.musicListPrepare[e];if(t){var n={status:0,creatUserId:t.creatUserId,creatUserName:t.createUserName,url:t.url||t.absoluteLocation,fileType:t.type,fileId:""+t.id,fileName:t.name,seek:0,duration:parseInt(t.duration)||0};this._sendMusicSharedUpload(n)}}}},{key:"mediaShareApeJoinChannelSuccess",value:function(){if(se.log("媒体共享模块加入频道成功->isHost=",G.default.isHost,"length=",G.default.sharedMediaList.length),G.default.isHost&&G.default.sharedMediaList.length>0)for(var e=0;e<G.default.sharedMediaList.length;e++){var t=G.default.sharedMediaList[e];if(t){var n={status:0,creatUserId:t.creatUserId,creatUserName:t.createUserName,url:t.url,fileType:t.type,fileId:""+t.id,fileName:t.name,seek:0,duration:parseInt(t.duration)||0};this._sendMediaSharedUpload(n)}}}},{key:"_initRecordPlayback",value:function(e){return null==e?(se.error("录制回放初始化失败->参数错误"),void this._emit(T.default.MCU_ERROR,T.default.ERR_INIT_RECORD_PLAY_BACK_FAILED)):null==e.classId||isNaN(e.classId)||null==e.portal||""==e.portal?(se.error("录制回放初始化失败->",e),
void this._emit(T.default.MCU_ERROR,T.default.ERR_INIT_RECORD_PLAY_BACK_FAILED)):(se.log("录制回放初始化->",e),G.default.isRecordPlayBack=!0,G.default.classId=parseInt(e.classId),G.default.portal=e.portal||"",1==G.default.isHttps&&(G.default.portal=G.default.replacePort(G.default.portal,":80","")),G.default.userRole=Y.default.normal,G.default.userId=e.userId||"0",G.default.userName=e.userName||"",void(le&&le.getClassParam()))}},{key:"_startRecordPlayback",value:function(e){ve&&ve.startRecordPlayback(e)}},{key:"_stopRecordPlayback",value:function(e){ve&&ve.stopRecordPlayback(e)}},{key:"_pauseRecordPlayback",value:function(e){ve&&ve.pauseRecordPlayback(e)}},{key:"_seekRecordPlayback",value:function(e){ve&&ve.seekRecordPlayback(e)}},{key:"_recordPlaybackClearDataHandler",value:function(e){se.log("录制回放状态更新->"),_e&&_e.clearData(),ge&&ge.clearData(),he&&he.clearData(),ye&&ye.clearData(),Ee&&Ee.clearData()}},{key:"_joinRecordPlaybackSuccessHandler",value:function(e){se.log("加入录制回放成功."),oe.default.IS_OPEN_SEND_LOG=!1,G.default.setCurrentStatus(G.default.statusCode_2);var t={};t.isRecordPlayBack=G.default.isRecordPlayBack,t.DOCServerIP=G.default.DOCServerIP,t.DOCServerPort=G.default.DOCServerPort,t.classStatus=G.default.classStatus,t.classId=G.default.classId,t.className=G.default.className,t.h5Module=G.default.h5Module,t.isHost=G.default.isHost,t.maxAudioChannels=G.default.maxAudioChannels,t.maxVideoChannels=G.default.maxVideoChannels,t.maxMediaChannels=G.default.maxMediaChannels,t.mcuDelay=G.default.mcuDelay,t.msType=G.default.msType,t.nodeId=G.default.nodeId,t.password=G.default.password,t.passwordRequired=G.default.passwordRequired,t.role=G.default.role,t.siteId=G.default.siteId,t.topNodeID=G.default.topNodeID,t.userId=G.default.userId,t.userName=G.default.userName,t.userRole=G.default.userRole,t.userType=G.default.userType,t.siteId=G.default.siteId,t.classId=G.default.classId,t.userRole=G.default.userRole,t.userId=G.default.userId,t.passwordRequired=G.default.passwordRequired,t.classType=G.default.classType||Y.default.CLASS_TYPE_1,t.country=G.default.country,t.city=G.default.city,t.province=G.default.province,t.isp=G.default.isp,t.classTimestamp=G.default.classTimestamp,t.recordTimestamp=G.default.recordTimestamp,t.recordPlaybackMaxTime=G.default.recordPlaybackMaxTime,t.fps=G.default.fps,t.gop=G.default.gop,t.videoQuality=G.default.videoQuality,t.ssTunnelAppURL=G.default.ssTunnelAppURL,t.currentSceneTableId=G.default.currentSceneTableId,t.serverAndLoacTimeDistanc=G.default.serverAndLoacTimeDistanc,t.deviceType=G.default.deviceType,t.language=G.default.language,t.explorer=G.default.explorer,t.explorerVersion=G.default.explorerVersion,t.os=G.default.os,se.log(t),this._emit(T.default.CLASS_JOIN_SUCCESS,t)}},{key:"_creatQuestion",value:function(e){return de.connected?void(Se&&Se.creatQuestion(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_getQuestion",value:function(e){return de.connected?void(Se&&Se.getQuestion(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_getQuestionResult",value:function(e){return de.connected?void(Se&&Se.getQuestionResult(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_stopQuestion",value:function(e){return de.connected?void(Se&&Se.stopQuestion(e)):void se.warn(G.default.getCurrentStatus())}},{key:"_sendAnswer",value:function(e){return de.connected?void(Se&&Se.sendAnswer(e)):void se.warn(G.default.getCurrentStatus())}}]),t}(d.default),Ce=Te;t.default=Ce,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(se,"loger","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(le,"_sass","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(ue,"_ipManager","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(de,"_mcu","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(ce,"_confer_ape","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(fe,"_chat_ape","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(he,"_video_ape","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(pe,"_audio_ape","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(_e,"_doc_ape","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(ge,"_whiteboard_ape","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(me,"_cursor_ape","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(ve,"_recordPlayback","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(ye,"_mediaShareApe","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(Ee,"_musicShareApe","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(Se,"_questionApe","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(Te,"MessageEntrance","D:/work/McuClient/src/EngineEntrance.js"),__REACT_HOT_LOADER__.register(Ce,"default","D:/work/McuClient/src/EngineEntrance.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(7),d=r(u),c=n(1),f=r(c),h=n(20),p=r(h),_=n(32),g=r(_),m=n(31),v=r(m),y=n(25),E=(r(y),n(2)),S=r(E),T=f.default.getLoger("IpManager"),C=2e3,R="1935",b="",w="5555",A="5556",I=function(e){function t(){return a(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return s(t,e),l(t,[{key:"loadServerJosn",value:function(e){if(e)return void e(t);return;var t}},{key:"getUserIpInfo",value:function(e,t,n,i){var r={ret:-1},a=(0,p.default)("addr="+t+"&token=b657c3507b324353e09c1958ee956a98efceb3e3"),o=(new Date).getTime(),s=S.default.locationProtocol+"ipapi.ipip.net/find?addr="+t+"&sid=14&uid=5237&sig="+a+"&_="+o;T.log("获取IP信息->",s),(0,v.default)(s,{timeout:i||C}).then(function(e){return e.json()}).then(function(e){e&&(r.ret=e.ret,r.country=e.data[0],r.province=e.data[1],r.city=e.data[2],r.isp=e.data[4]),T.warn("获取IP信息->完成->",r),n&&n(r)}).catch(function(e){T.warn("获取IP信息->失败->",e.message),n&&n(r)})}},{key:"getFastestMcuServer",value:function(e,t,n){T.log("开始MCU选点-> ",e);var i={ip:""};if(null==e||e.length<1)return void(t&&t(i));for(var r=new Object,a=e.length,o=0;o<a;o++){var s=e[o];s&&s.ip&&(r[s.ip+":"+A]=s.ip+":"+A)}var l=new Array;for(var u in r)l.push(u);if(T.log("MCU选点->列表",l),null==l||l.length<1)return void(t&&t(i));try{(0,g.default)(l,function(n){if(n){T.log("MCU选点->done -> ",n);var r=n.replace(":"+A,"")||"";i.ip=r,i.port="";for(var a=e.length,o=0;o<a;o++){var s=e[o];if(s&&s.ip&&r==s.ip){i.port=s.port||b;break}}t&&t(i)}else T.warn("MCU选点-> nothing!"),t&&t(i)},n||C)}catch(e){T.log("MCU选点->失败",e.message)}}},{key:"getFastestMsServer",value:function(e,t,n){T.log("开始MS选点->",e);var i={ip:""};if(null==e||e.length<1)return void(t&&t(i));for(var r=new Object,a=e.length,o=0;o<a;o++){var s=e[o];s&&s.ip&&(r[s.ip+":"+w]=s.ip+":"+w)}var l=new Array;for(var u in r)l.push(u);if(null==l||l.length<1)return void(t&&t(i));T.log("MS选点->列表",l);try{(0,g.default)(l,function(n){if(n){T.log("MS选点->done -> ",n);var r=n.replace(":"+w,"")||"";i.ip=r,i.port="";for(var a=e.length,o=0;o<a;o++){var s=e[o];if(s&&s.ip&&r==s.ip){i.port=s.port||R;break}}t&&t(i)}else T.warn("MS选点-> nothing!"),t&&t(i)},n||C)}catch(e){T.warn("MS选点->ERROR -> ",e.message),t&&t(i)}}},{key:"testFastestIpFromServer",value:function(e,t,n){T.log("开始测试->",e);var i={ip:""};if(null==e||e.length<1)return void(t&&t(i));for(var r=new Object,a=e.length,o=0;o<a;o++){var s=e[o];s&&s.ip&&(r[s.ip+":"+w]=s.ip+":"+w)}var l=new Array;for(var u in r)l.push(u);if(null==l||l.length<1)return void(t&&t(i));T.log("测速地址列表->",l);try{(0,g.default)(l,function(n){if(n){T.log("测速返回->完成 -> ",n);var r=n.replace(":"+w,"")||"";i.ip=r,i.port="";for(var a=e.length,o=0;o<a;o++){var s=e[o];if(s&&s.ip&&r==s.ip){i.port=s.port||R;break}}t&&t(i)}else T.warn("测速返回-> nothing!"),t&&t(i)},n||C)}catch(e){T.warn("测速失败->ERROR -> ",e.message),t&&t(i)}}},{key:"getServerListForUserInfo",value:function(e,t,n,i,r,a){if(!a)return[];if(!a[e])return[];var o=a[e][t];if(!o)return o=a[e].default||[];if("中国"!=t)return o;var s=null;if(o.isp&&(s=o.isp[r]),s)return s;var l=null;if(o.province&&(l=o.province[n]),l)return l;var u=o.default;return u?u:[]}}],[{key:"getUserIp",value:function(){try{var e=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.src="https://pv.sohu.com/cityjson?ie=utf-8",e.appendChild(t),window.onload=function(){T.warn("获取本机IP->",window.returnCitySN),S.default.returnCitySN=window.returnCitySN,S.default.returnCitySN&&(S.default.userIp=S.default.returnCitySN.cip||"")}}catch(e){T.warn("获取IP失败 ",e.message)}}}]),t}(d.default),P=I;t.default=P,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(T,"loger","D:/work/McuClient/src/IpManager.js"),__REACT_HOT_LOADER__.register(C,"TIME_OUT","D:/work/McuClient/src/IpManager.js"),__REACT_HOT_LOADER__.register(R,"MS_DEFAULT_PORT","D:/work/McuClient/src/IpManager.js"),__REACT_HOT_LOADER__.register(b,"MCU_DEFAULT_PORT","D:/work/McuClient/src/IpManager.js"),__REACT_HOT_LOADER__.register(w,"SPEED_TEST_PORT","D:/work/McuClient/src/IpManager.js"),__REACT_HOT_LOADER__.register(A,"MCU_SPEED_TEST_PORT","D:/work/McuClient/src/IpManager.js"),__REACT_HOT_LOADER__.register(I,"IpManager","D:/work/McuClient/src/IpManager.js"),__REACT_HOT_LOADER__.register(P,"default","D:/work/McuClient/src/IpManager.js"))}()},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(){return u}Object.defineProperty(t,"__esModule",{value:!0}),t.MessageTypes=void 0,t.createMcuClient=r;var a=n(36),o=i(a),s=n(4),l=i(s),u=new o.default;t.MessageTypes=l.default,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(u,"MCU_CLIENT","D:/work/McuClient/src/McuClientEngine.js"),__REACT_HOT_LOADER__.register(r,"createMcuClient","D:/work/McuClient/src/McuClientEngine.js"))}()},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(1),s=i(o),l=n(59),u=i(l),d=n(2),c=i(d),f=s.default.getLoger("SystemConfig"),h=function(){function e(){r(this,e)}return a(e,null,[{key:"getSystemInfo",value:function(){if(c.default.isMobile=u.default.isMobileUA(),c.default.isMobile?(f.warn("当前设备是移动设备"),c.default.platform="h5",c.default.deviceType=3):(f.warn("当前设备是PC"),c.default.platform="pc",c.default.deviceType=0),u.default.isIOS()&&(c.default.platform="ios",c.default.deviceType=1),u.default.isAndroid()&&(c.default.platform="android",c.default.deviceType=2),c.default.language="unknown",navigator){var e=navigator.language||navigator.browserLanguage;c.default.language=e.toLocaleLowerCase()}var t=this.getBrowserInfo();c.default.explorer=t.explorer||"未知",c.default.explorerVersion=t.explorerVersion||"未知",c.default.os=this.detectOS(),f.log("deviceType:"+c.default.deviceType),f.log("language:"+c.default.language),f.log("explorer:"+c.default.explorer),f.log("explorerVersion:"+c.default.explorerVersion),f.log("os:"+c.default.os)}},{key:"getBrowserInfo",value:function(){var e={},t=navigator.userAgent.toLowerCase(),n=/(trident|msie|firefox|chrome|opera|version).*?([\d.]+)/,i=t.match(n);return i||(i=["version/1.0.0","version","1.0.0"]),e.explorer=i[1].replace(/version/,"'safari"),"trident"==e.explorer?(e.explorer="IE11",e.explorerVersion="11.0"):"msie"==e.explorer?(e.explorer="IE",e.explorerVersion=i[2]):e.explorerVersion=i[2],e}},{key:"detectOS",value:function(){var e=navigator.userAgent,t="Win32"==navigator.platform||"Windows"==navigator.platform,n="Mac68K"==navigator.platform||"MacPPC"==navigator.platform||"Macintosh"==navigator.platform||"MacIntel"==navigator.platform;if(n)return"Mac";var i="X11"==navigator.platform&&!t&&!n;if(i)return"Unix";var r=String(navigator.platform).indexOf("Linux")>-1;if(r)return"Linux";if(t){var a=e.indexOf("Windows NT 5.0")>-1||e.indexOf("Windows 2000")>-1;if(a)return"Win2000";var o=e.indexOf("Windows NT 5.1")>-1||e.indexOf("Windows XP")>-1;if(o)return"WinXP";var s=e.indexOf("Windows NT 5.2")>-1||e.indexOf("Windows 2003")>-1;if(s)return"Win2003";var l=e.indexOf("Windows NT 6.0")>-1||e.indexOf("Windows Vista")>-1;if(l)return"WinVista";var u=e.indexOf("Windows NT 6.1")>-1||e.indexOf("Windows 7")>-1;if(u)return"Win7"}return"other"}}]),e}(),p=h;t.default=p,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(f,"loger","D:/work/McuClient/src/SystemConfig.js"),__REACT_HOT_LOADER__.register(h,"SystemConfig","D:/work/McuClient/src/SystemConfig.js"),__REACT_HOT_LOADER__.register(p,"default","D:/work/McuClient/src/SystemConfig.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(8),d=r(u),c=n(3),f=r(c),h=n(6),p=r(h),_=n(1),g=r(_),m=n(4),v=r(m),y=n(2),E=r(y),S=n(5),T=r(S),C=n(17),R=r(C),b=g.default.getLoger("AudioApe"),w=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f.default.AUDIO_SESSION_ID,f.default.AUDIO_SESSION_NAME,f.default.AUDIO_SESSION_TAG));return e.releaseTimeId=0,e.mediaModule=new R.default,e.mediaModule.MEDIA_OBJ_TABLE_ID=f.default.AUDIO_OBJ_TABLE_ID,e.mediaModule.mediaChannels={},e.mediaModule.mediaType=f.default.MEDIA_TYPE_AUDIO,e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(p.default.RCPDU_REG_REGISTER_TABLE,f.default.AUDIO_OBJ_TABLE_ID,f.default.AUDIO_OBJ_TABLE_NAME,f.default.AUDIO_OBJ_TABLE_TAG,0,new ArrayBuffer),e.on(p.default.RCPDU_SEND_AUDIO_DATA_REQUEST,e.receiveAudiooCommandHandler.bind(e)),e}return s(t,e),l(t,[{key:"onJoinChannelHandlerSuccess",value:function(){this.mediaModule.maxMediaChannel=E.default.maxAudioChannels}},{key:"getAudioPlayPath",value:function(e){return b.log("获取播流地址->"),this.mediaModule.getMediaPlayPath(e)}},{key:"getAudioPublishPath",value:function(e){if(b.log("获取推流地址->"),!this.mcu.connected)return b.warn(E.default.getCurrentStatus()),{code:f.default.RETURN_FAILED,data:"已经断开连接"};if(E.default.userRole==f.default.invisible){var t=this.mediaModule.getMediaPublishPathForInVisible(e);return this._emit(v.default.AUDIO_GET_PUBLISH_PATH,t),t}var n=0,i=R.default.allMediaChannelsList;for(var r in i){var a=i[r];a&&a.status==f.default.CHANNEL_STATUS_OPENING&&a.userRole!=f.default.invisible&&n++}if(n>=E.default.maxMediaChannels)return b.warn("不能再打开设备->当前开启的设备数量->",n),{code:f.default.RETURN_FAILED,data:"不能再打开设备,当前开启的设备数量"};var o=this.mediaModule.getMediaPublishPath(e);return this._emit(v.default.AUDIO_GET_PUBLISH_PATH,o),o}},{key:"getAllChannelInfo",value:function(e){return b.log("获取当前所有频道信息->"),this.mediaModule.getAllMediaChannelInfo()}},{key:"publishAudio",value:function(e){if(!this.mcu.connected)return b.warn(E.default.getCurrentStatus()),this._emit(v.default.AUDIO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"已经断开连接!",mediaId:0}),{code:f.default.RETURN_FAILED,data:"已经断开连接",mediaId:0};if(null==e||null==e.publishUrl)return b.warn("推流->参数错误",e),this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),this._emit(v.default.AUDIO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"参数错误!",mediaId:0}),{code:f.default.RETURN_FAILED,data:"参数错误"};try{E.default.optionJsonData=JSON.stringify(e.optionJsonData)||""}catch(e){E.default.optionJsonData=""}var t=this.mediaModule.getNeedPublishMediaChannel(e.publishUrl);if(null==t)return b.warn("推流->推流数据已经无效",e),this._emit(v.default.AUDIO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"推流数据已经无效!",mediaId:0}),{code:f.default.RETURN_FAILED,data:"推流数据已经无效"};var n=this.mediaModule.getFreeMediaChannel();if(0==n)return b.warn("推流->不能再打开更多的设备"),this._emit(v.default.AUDIO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"不能再打开更多的设备",mediaId:0}),{code:f.default.RETURN_FAILED,data:"不能再打开更多的设备",mediaChannels:this.mediaModule.mediaChannels};if(this.mediaModule.checkChannelIsOpening(t.channelId))return t.nodeId==E.default.nodeId?(b.warn(t.channelId,"已经推送过消息,不需要再次推送!"),this._emit(v.default.AUDIO_PUBLISH_RESULT,{code:f.default.RETURN_SUCCESS,data:"已经推送过消息,不需要再次推送!",mediaId:t.channelId}),{code:f.default.RETURN_SUCCESS,data:"已经推送过消息,不需要再次推送!",mediaId:t.channelId}):(b.warn(t.channelId,"频道已经被占用"),this._emit(v.default.AUDIO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"频道已经被占用!",mediaId:0}),{code:f.default.RETURN_FAILED,data:"频道已经被占用!"});var i=this.mediaModule.getDefaultChannelInfo();return i.owner=E.default.nodeId,i.status=f.default.CHANNEL_STATUS_OPENING,i.channelId=t.channelId,i.streamId=t.streamId,i.timestamp=t.timestamp,i.mediaType=f.default.MEDIA_TYPE_AUDIO,this.sendTableUpdateHandler(i),this._emit(v.default.AUDIO_PUBLISH_RESULT,{code:f.default.RETURN_SUCCESS,data:"推流成功!",mediaId:t.channelId}),{code:f.default.RETURN_SUCCESS,data:"推流成功!",mediaId:t.channelId}}},{key:"stopPublishAudio",value:function(e){if(b.log("停止推流 ->",e),!this.mcu.connected)return b.warn(E.default.getCurrentStatus()),{code:f.default.RETURN_FAILED,data:"已经断开连接"};var t=E.default.nodeId;e&&parseInt(e.nodeId)>0&&(t=parseInt(e.nodeId));var n=0;e&&parseInt(e.mediaId)>0&&(n=parseInt(e.mediaId)),n>0?this._releaseChannelForNodeId(t,n):this._releaseNodeIdAllChannel(t)}},{key:"_releaseChannelForNodeId",value:function(e,t){b.log(e,"释放占用的频道-->",t);var n=this.mediaModule.mediaChannels[t];if(n&&n.status==f.default.CHANNEL_STATUS_OPENING)if(n.fromNodeId==e){var i=this.mediaModule.getDefaultChannelInfo();i.status=f.default.CHANNEL_STATUS_RELEASED,i.channelId=t,this.sendTableUpdateHandler(i)}else b.warn(t,"不属于nodeId",e,"不能释放",n);else b.warn(e,"要释放的频道不存在或者已经释放-->channelId",n)}},{key:"_releaseNodeIdAllChannel",value:function(e){if(b.log(e,"_releaseNodeIdAllChannel",this.mcu.connected),!this.mcu.connected)return clearTimeout(this.releaseTimeId),b.warn(E.default.getCurrentStatus()),{code:f.default.RETURN_FAILED,data:"已经断开连接"};var t=this.mediaModule.getOpeningMediaChannelForNodeId(e);if(0==t.channelId)return b.warn(e,"没有占用频道不需要处理"),{code:f.default.RETURN_FAILED,data:"没有占用channel不需要处理"};var n=this.mediaModule.getDefaultChannelInfo();n.status=f.default.CHANNEL_STATUS_RELEASED,n.channelId=t.channelId,n.nodeId=t.fromNodeId,n.userRole=t.userRole,n.userName=t.userName,n.userId=t.userId,this.sendTableUpdateHandler(n),this.releaseTimeId=setTimeout(function(){b.warn(e,"检查频道是否占用"),this._releaseNodeIdAllChannel(e)}.bind(this),800)}},{key:"sendAudioBroadcastMsg",value:function(e){if(!this.mcu.connected)return b.warn(E.default.getCurrentStatus()),{code:f.default.RETURN_FAILED,data:"已经断开连接"};if(null===this._classInfo||T.default.isEmptyObject(this._classInfo))return b.log("音频模块广播->失败->还未初始化数据!"),0==E.default.getCurrentStatus().code||1==E.default.getCurrentStatus().code?(this._emit(v.default.MCU_ERROR,v.default.ERR_APE_SEND_FAILED_NO_JOIN),{code:f.default.RETURN_FAILED,data:"sendAudioBroadcastMsg.McuClient还未初始化数据"}):{code:f.default.RETURN_FAILED,data:"sendAudioBroadcastMsg.McuClient还未初始化数据"};if(null==e)return b.warn("音频模块广播->失败->,参数错误",e),this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),{code:f.default.RETURN_FAILED,data:"sendAudioBroadcastMsg,参数错误"};if(b.log("音频模块广播->",e),null!=e.actionType&&e.actionType==f.default.MEDIA_ACTION_OPEN_CAMERA){var t=this.mediaModule.getFreeMediaChannel();if(0==t)return b.warn("不能再打开更多的设备",e),{code:f.default.RETURN_FAILED,data:"不能再打开更多的设备",mediaChannels:this.mediaModule.mediaChannels}}var n=new p.default.RCAudioSendDataRequestPdu;n.type=p.default.RCPDU_SEND_AUDIO_DATA_REQUEST,n.isPublic=!0,n.fromNodeId=E.default.nodeId,n.toNodeId=parseInt(e.toNodeId)||0,n.actionType=parseInt(e.actionType)||f.default.MEDIA_ACTION_DEFAULT;var i="";try{i=JSON.stringify(e.data)}catch(t){b.warn("控制消息->JSON转换失败"),i=e.data}return n.data=this._rCArrayBufferUtil.strToUint8Array("h5"+i),n.isPublic||0==n.toNodeId?this.sendChatUniform(n):this.send(n),{code:f.default.RETURN_SUCCESS,data:""}}},{key:"sendTableUpdateHandler",value:function(e){var t=this.packPdu(e,e.channelId);if(null==t)return void b.warn("音频模块更新数据-> 失败->数据无效",e);var n=new p.default.RCRegistryTableItemPdu;n.itemIdx=e.channelId,n.owner=e.owner,n.itemData=t.toArrayBuffer();var i=new p.default.RCRegistryTableUpdateItemPdu;i.type=p.default.RCPDU_REG_TABLE_UPDATE_PDU,i.items.push(n);var r=new p.default.RCRegistryUpdateObjPdu;r.objId=f.default.AUDIO_OBJ_TABLE_ID,r.subType=i.type,r.userData=i.toArrayBuffer();var a=new p.default.RCAdapterItemPdu;a.type=p.default.RCPDU_REG_UPDATE_OBJ,a.itemData=r.toArrayBuffer();var o=new p.default.RCAdapterPdu;o.type=p.default.RCPDU_REG_ADAPTER,o.item.push(a),b.log("音频模块更新数据->itemIdx="+n.itemIdx),this.sendUniform(o,!0)}},{key:"receiveAudiooCommandHandler",value:function(e){var t=p.default.RCAudioSendDataRequestPdu.decode(e);if(null==t)return void b.warn("音频消息处理,收到的消息为null,不做处理");t.data=this._rCArrayBufferUtil.uint8ArrayToStr(t.data,2);var n={};try{n=JSON.parse(t.data)}catch(e){b.warn("控制消息->JSON转换失败"),n=t.data}t.data=n,0!=t.toNodeId&&t.toNodeId!=E.default.nodeId?b.log("音频消息不处理 toNodeId=",t.toNodeId,"my nodeId=",E.default.nodeId):(b.log("音频控制消息处理 .",t),this._emit(v.default.AUDIO_BROADCAST,t))}},{key:"tableUpdateHandler",value:function(e,t,n,i){var r=this.unPackPdu(e,t,n);if(b.log("tableUpdateHandler->channel",t,"status->",r.status,"seek->",i),0==e&&(b.log("释放占用的频道,channel",t),r.status=f.default.CHANNEL_STATUS_RELEASED,r.streamId=""),this.mediaModule.mediaChannels[t]=r,r&&r.fromNodeId!=E.default.nodeId){var a={};if(a.mediaId=r.channelId,a.fromNodeId=r.fromNodeId,a.userName=r.userName||"",a.userRole=r.userRole||f.default.normal,a.mediaType=r.mediaType||f.default.MEDIA_TYPE_DEFAULT,a.screenWidth=r.screenWidth||E.default.screenWidth,a.screenHeight=r.screenHeight||E.default.screenHeight,a.deviceType=r.deviceType||0,a.optionJsonData=r.optionJsonData||"",r.status==f.default.CHANNEL_STATUS_OPENING){a.m3u8Url="",a.rtmpUrl="",a.replay="",a.seek=i||0;var o=this.mediaModule.getMediaPlayPath({type:"m3u8",streamId:r.streamId}),s=this.mediaModule.getMediaPlayPath({type:"rtmp",streamId:r.streamId}),l=this.mediaModule.getMediaRecordPlaybackPath({type:"m3u8",streamId:r.streamId});0==o.code&&(a.m3u8Url=o.playUrl),0==s.code&&(a.rtmpUrl=s.playUrl),0==l.code&&(a.replay=l.playUrl),b.log("AUDIO_PLAY->",a),this._emit(v.default.AUDIO_PLAY,a)}else b.log("AUDIO_STOP->",a),this._emit(v.default.AUDIO_STOP,a)}else b.warn("消息是自己发送的或者是消息无效,不需要处理,消息内容如下:"),b.log(r),r.status==f.default.CHANNEL_STATUS_OPENING?(E.default.openMicrophones=T.default.creatTimestamp(),E.default.openCamera=0):(E.default.openCamera=0,E.default.openMicrophones=0),this._emit(v.default.USER_DEVICE_STATUS_CHAANGE,{nodeId:E.default.nodeId,userRole:E.default.userRole,userName:E.default.userName,userId:E.default.userId,openCamera:E.default.openCamera,openMicrophones:E.default.openMicrophones});R.default.allMediaChannelsList[t]=r,console.log("MediaModule.allMediaChannelsList",R.default.allMediaChannelsList),this._emit(v.default.AUDIO_UPDATE,r)}},{key:"updaterRecordApeStatus",value:function(e){console.warn("录制状态发送改变->更新当前的状态->",this.mediaModule.mediaChannels);for(var t in this.mediaModule.mediaChannels){var n=this.mediaModule.mediaChannels[t];n&&(n.status==f.default.CHANNEL_STATUS_RELEASED?n.owner=0:n.owner=n.fromNodeId,this.sendTableUpdateHandler(n))}}},{key:"packPdu",value:function(e,t){if(null==e||null==t)return b.warn("packPdu->失败"),this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new p.default.RCAudioChannelInfoPdu;return n.status=e.status||f.default.CHANNEL_STATUS_RELEASED,n.channelId=t,n.streamId=e.streamId||"",n.siteId=e.siteId||E.default.siteId,n.classId=parseInt(e.classId)||parseInt(E.default.classId),n.userId=e.userId||"0",n.mediaType=e.mediaType||f.default.MEDIA_TYPE_AUDIO,n.timestamp=e.timestamp||T.default.creatTimestamp(),n.fromNodeId=e.nodeId||E.default.nodeId,n.userName=e.userName||E.default.userName||"",n.toNodeId=0,n.userRole=e.userRole||E.default.userRole,n.screenWidth=e.screenWidth||E.default.screenWidth,n.screenHeight=e.screenHeight||E.default.screenHeight,n.deviceType=e.deviceType||E.default.deviceType,n.optionJsonData=E.default.optionJsonData,b.log("packPdu->",n),n}},{key:"unPackPdu",value:function(e,t,n){if(null==e||null==t||null==n)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var i=p.default.RCAudioChannelInfoPdu.decode(n);return b.log("unPackPdu->",i),i}catch(e){b.log("unPackPdu error->itemIdx="+t+"  err:"+e.message)}return null}}]),t}(d.default),A=w;t.default=A,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"loger","D:/work/McuClient/src/apes/AudioApe.js"),__REACT_HOT_LOADER__.register(w,"AudioApe","D:/work/McuClient/src/apes/AudioApe.js"),__REACT_HOT_LOADER__.register(A,"default","D:/work/McuClient/src/apes/AudioApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(8),d=r(u),c=n(3),f=r(c),h=n(6),p=r(h),_=n(1),g=r(_),m=n(4),v=r(m),y=n(5),E=r(y),S=g.default.getLoger("ChatApe"),T=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f.default.CHAT_SESSION_ID,f.default.CHAT_SESSION_NAME,f.default.CHAT_SESSION_TAG));return e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(p.default.RCPDU_REG_REGISTER_TABLE,f.default.CHAT_OBJ_TABLE_ID,f.default.CHAT_OBJ_TABLE_NAME,f.default.CHAT_OBJ_TABLE_TAG,0,new ArrayBuffer),e.on(p.default.RCPDU_SEND_CHAT_DATA_REQUEST,e.chatMsgIncomingHandler.bind(e)),e}return s(t,e),l(t,[{key:"sendChatMsg",value:function(e){if(null===this._classInfo||E.default.isEmptyObject(this._classInfo)){if(S.log("不能发送聊天消息.McuClient还未初始化数据!"),0==GlobalConfig.getCurrentStatus().code||1==GlobalConfig.getCurrentStatus().code)return void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_SEND_FAILED_NO_JOIN)}else{S.log("发送聊天消息.",e.to,e.message);var t=new p.default.RCChatSendDataRequestPdu;t.type=p.default.RCPDU_SEND_CHAT_DATA_REQUEST,t.initiator=this._classInfo.nodeId,t.peer=parseInt(e.to),t.msgType=parseInt(e.msgType)||0,t.userData=this._rCArrayBufferUtil.strToUint8Array("h5"+e.message),t.fromName=this._rCArrayBufferUtil.strToUint8Array("h5"+this._classInfo.userName),t.fromRole=this._classInfo.userRole,t.isPublic=!0,t.isPublic||0==t.peer?this.sendChatUniform(t):this.send(t)}}},{key:"chatMsgIncomingHandler",value:function(e){var t=p.default.RCChatSendDataRequestPdu.decode(e),n={};n.fromNodeId=t.initiator,n.toNodeId=t.peer,n.message=this._rCArrayBufferUtil.uint8ArrayToStr(t.userData,2),n.fromName=this._rCArrayBufferUtil.uint8ArrayToStr(t.fromName,2),n.fromRole=t.fromRole,n.msgType=t.msgType||0,S.log("接收聊天消息.",n),this._emit(v.default.CHAT_RECEIVE,n)}}]),t}(d.default),C=T;t.default=C,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(S,"loger","D:/work/McuClient/src/apes/ChatApe.js"),__REACT_HOT_LOADER__.register(T,"ChatApe","D:/work/McuClient/src/apes/ChatApe.js"),__REACT_HOT_LOADER__.register(C,"default","D:/work/McuClient/src/apes/ChatApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(8),d=r(u),c=n(3),f=r(c),h=n(6),p=r(h),_=n(1),g=r(_),m=n(4),v=r(m),y=n(2),E=r(y),S=n(5),T=r(S),C=g.default.getLoger("CursorApe"),R=0,b=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f.default.CURSOR_SESSION_ID,f.default.CURSOR_SESSION_NAME,f.default.CURSOR_SESSION_TAG));return e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(p.default.RCPDU_REG_REGISTER_TABLE,f.default.CURSOR_OBJ_TABLE_ID,f.default.CURSOR_OBJ_TABLE_NAME,f.default.CURSOR_OBJ_TABLE_TAG,0,new ArrayBuffer),e.on(p.default.RCPDU_SESSION_JOIN_RESPONSE,e._joinSessionHandler.bind(e)),e}return s(t,e),l(t,[{key:"_joinSessionHandler",value:function(e){}},{key:"sendInsertCursor",value:function(e){if(null==e||T.default.isEmptyObject(e))return C.warn("添加激光笔失败->参数错误->",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=f.default.CURSOR_OBJ_TABLE_ID,n=this.packPdu(e,t);if(null==n)return C.warn("添加激光笔失败-->参数错误->",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);
var i=new p.default.RCRegistryTableItemPdu;i.itemIdx=t,i.registerObjId=f.default.CURSOR_OBJ_TABLE_ID,i.owner=0,i.itemData=n.toArrayBuffer();var r=new p.default.RCRegistryTableUpdateItemPdu;r.type=p.default.RCPDU_REG_TABLE_UPDATE_PDU,r.items.push(i);var a=new p.default.RCRegistryUpdateObjPdu;a.objId=f.default.CURSOR_OBJ_TABLE_ID,a.subType=r.type,a.userData=r.toArrayBuffer();var o=new p.default.RCAdapterItemPdu;o.type=p.default.RCPDU_REG_UPDATE_OBJ,o.itemData=a.toArrayBuffer();var s=new p.default.RCAdapterPdu;s.type=p.default.RCPDU_REG_ADAPTER,s.item.push(o),C.log("发送更新.itemIdx="+i.itemIdx),this.sendUniform(s,!0)}},{key:"tableUpdateHandler",value:function(e,t,n){var i=this.unPackPdu(e,t,n);C.log("鼠标数据->tableUpdateHandler"),C.log(i),i&&this._emit(v.default.CURSOR_UPDATE,i)}},{key:"packPdu",value:function(e,t){if(null==e.pointGroup)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new p.default.RCCursorDataModelPdu;return n.type=R,n.itemIdx=t,n.initiator=E.default.nodeId,n.parentId=E.default.activeDocId,n.curPageNo=E.default.activeDocCurPage,n.pointGroup=T.default.arrayToJsonString(e.pointGroup),n.color=e.color||"#000000",n.thickness=e.thickness||1,n.duration=e.duration||0,n}},{key:"unPackPdu",value:function(e,t,n){try{C.log("鼠标激光笔数据->unPackPdu");var i=p.default.RCCursorDataModelPdu.decode(n),r=T.default.arrayFromJsonString(i.pointGroup);return i.pointGroup=r,i}catch(e){C.log("鼠标激光笔数据->unPackPdu->Pdu解析错误,itemIdx="+t+"  err:"+e.message)}return null}}]),t}(d.default),w=b;t.default=w,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(C,"loger","D:/work/McuClient/src/apes/CursorApe.js"),__REACT_HOT_LOADER__.register(R,"DEFAULT_TYPE","D:/work/McuClient/src/apes/CursorApe.js"),__REACT_HOT_LOADER__.register(b,"CursorApe","D:/work/McuClient/src/apes/CursorApe.js"),__REACT_HOT_LOADER__.register(w,"default","D:/work/McuClient/src/apes/CursorApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(8),d=r(u),c=n(3),f=r(c),h=n(6),p=r(h),_=n(1),g=r(_),m=n(4),v=r(m),y=n(2),E=r(y),S=n(5),T=r(S),C=g.default.getLoger("DocApe"),R=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f.default.DOCSHARING_SESSION_ID,f.default.DOCSHARING_SESSION_NAME,f.default.DOCSHARING_SESSION_TAG));return e.docList={},e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(p.default.RCPDU_REG_REGISTER_TABLE,f.default.DOCSHARING_OBJ_TABLE_ID,f.default.DOCSHARING_OBJ_TABLE_NAME,f.default.DOCSHARING_OBJ_TABLE_TAG,0,new ArrayBuffer),e}return s(t,e),l(t,[{key:"documentUpload",value:function(e){if(null==e||T.default.isEmptyObject(e))return C.warn("上传文档->失败->参数错误->",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);if(this.checkDocId(e.docId))return void C.warn("上传文档->失败->文档档的docId无效或已经存在相同的docId不需要上传");var t=T.default.creatSoleNumberFromTimestamp(),n=this.packPdu(e,t);if(null==n)return C.log("上传文档->失败->数据无效"),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var i=new p.default.RCRegistryTableItemPdu;i.itemIdx=t,i.registerObjId=f.default.DOCSHARING_OBJ_TABLE_ID,i.owner=0,i.itemData=n.toArrayBuffer();var r=new p.default.RCRegistryTableInsertItemPdu;r.type=p.default.RCPDU_REG_TABLE_INSERT_PDU,r.items.push(i);var a=new p.default.RCRegistryUpdateObjPdu;a.objId=f.default.DOCSHARING_OBJ_TABLE_ID,a.subType=r.type,a.userData=r.toArrayBuffer();var o=new p.default.RCAdapterItemPdu;o.type=p.default.RCPDU_REG_UPDATE_OBJ,o.itemData=a.toArrayBuffer();var s=new p.default.RCAdapterPdu;s.type=p.default.RCPDU_REG_ADAPTER,s.item.push(o),C.log("上传文档->发送->itemIdx="+i.itemIdx),this.sendUniform(s,!0)}},{key:"updaterDoc",value:function(e,t){if(null==e||null==t)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=this.packPdu(e,t),i=new p.default.RCRegistryTableItemPdu;i.itemIdx=t,i.owner=0,i.itemData=n.toArrayBuffer();var r=new p.default.RCRegistryTableUpdateItemPdu;r.type=p.default.RCPDU_REG_TABLE_UPDATE_PDU,r.items.push(i);var a=new p.default.RCRegistryUpdateObjPdu;a.objId=f.default.DOCSHARING_OBJ_TABLE_ID,a.subType=r.type,a.userData=r.toArrayBuffer();var o=new p.default.RCAdapterItemPdu;o.type=p.default.RCPDU_REG_UPDATE_OBJ,o.itemData=a.toArrayBuffer();var s=new p.default.RCAdapterPdu;s.type=p.default.RCPDU_REG_ADAPTER,s.item.push(o),this.sendUniform(s,!0)}},{key:"getDocFullAddress",value:function(e){if(null==e||null==e.url||null==e.itemIdx)return C.warn("获取文档完整地址->传递的参数不正确->",e),{code:f.default.RETURN_FAILED,data:"获取文档时传递的参数不对"};var t="",n=1,i="",r="",a=this.docList[e.itemIdx];a?(t=a.url||"",n=a.pageNum||1,r=a.fileType||""):t=e.url,t=t.replace("http://",E.default.locationProtocol),i=this._getDocType(t);var o=this._getDocPath(t),s=[],l="",u="";if("jpg"==i||"png"==i||"swf"==i||"pdf"==i||"doc"==i||"pptx"==i)for(var d=1;d<=n;d++)s.push(o+"/"+d+".jpg");return"swf"!=i&&"pdf"!=i&&"doc"!=i&&"pptx"!=i||(u=t.replace(/\.swf/g,".pdf")||""),"html"==i&&(l=t),{code:f.default.RETURN_SUCCESS,data:"",docFullAddress:{images:s,pdf:u,html:l}}}},{key:"_getDocType",value:function(e){return e?e.lastIndexOf(".jpg")>=0?"jpg":e.lastIndexOf(".png")>=0?"png":e.lastIndexOf(".swf")>=0?"swf":e.lastIndexOf(".pdf")>=0?"pdf":e.lastIndexOf(".doc")>=0?"doc":e.lastIndexOf(".html")>=0?"html":e.lastIndexOf(".pptx")>=0?"pptx":"":""}},{key:"_getDocPath",value:function(e){if(!e)return"";var t=e.lastIndexOf("/");return t>0?e.substr(0,t):e}},{key:"getDocImageFullPath",value:function(e){return[]}},{key:"getDocPDFFullPath",value:function(e){return[]}},{key:"replacePathType",value:function(e){var t=e;return t=t.replace(/.jpg/g,""),t=t.replace(/.png/g,""),t=t.replace(/.swf/g,""),t=t.replace(/.pdf/g,"")}},{key:"_docPackFullInfo",value:function(e){var t=e,n=this.getDocFullAddress(e);return n.code==f.default.RETURN_SUCCESS?(t.images=n.docFullAddress.images||[],t.pdf=n.docFullAddress.pdf||"",t.html=n.docFullAddress.html||""):(t.images=[],t.pdf="",t.html=""),t}},{key:"updaterRecordApeStatus",value:function(e){C.warn("录制状态发送改变->更新当前的文档数据->docId:",E.default.activeDocId,"page:",E.default.activeDocCurPage),this.documentSwitchPage({itemIdx:E.default.activeDocId,curPageNo:E.default.activeDocCurPage})}},{key:"clearData",value:function(){C.log("clearData->"),this.docList={},E.default.activeDocId=0,E.default.activeDocCurPage=1}},{key:"documentSwitchDoc",value:function(e){if(C.log("切换文档->",e),E.default.isRecordPlayBack)return void C.warn("录制回放状态不允许切换文档");if(null==e||null==e.itemIdx)return C.warn("切换文档失败,参数错误",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);if(e.itemIdx==E.default.activeDocId&&0!=E.default.activeDocId)return void C.warn("文档已经显示",e.itemIdx,E.default.activeDocId);var t=void 0;0!=E.default.activeDocId&&(t=this.docList[E.default.activeDocId],t&&(t.action=f.default.DOC_ACTION_NORMAL,t.visible=!1,t.animationStep=1));var n=this.docList[e.itemIdx];return null==n?(C.warn("切换文档失败,文档不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(n.action=f.default.DOC_ACTION_SWITCH_DOC,n.visible=e.visible||!1,n.animationStep=1,C.log({oldDoc:t,nowDoc:n}),this.updaterDoc(n,n.itemIdx),void(t&&this.updaterDoc(t,t.itemIdx)))}},{key:"documentSwitchPage",value:function(e){C.log("文档翻页->",e);var t=this.docList[e.itemIdx];return null==t?(C.log("文档翻页->文档不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.action=f.default.DOC_ACTION_SWITCH_PAGE,t.curPageNo=parseInt(e.curPageNo)||1,t.animationStep=1,t.curPageNo<1&&(t.curPageNo=1),void this.updaterDoc(t,t.itemIdx))}},{key:"documentSwitchAnimation",value:function(e){C.log("文档页面动画切换->",e);var t=this.docList[E.default.activeDocId];return null==t?(C.log("文档页面动画切换->文档不存在",E.default.activeDocId,e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.action=f.default.DOC_ACTION_SWITCH_ANIMATION,t.animationStep=t.animationStep||1,e&&e.step==-1?t.animationStep--:t.animationStep++,(!t.animationStep||t.animationStep<1)&&(t.animationStep=1),void this.updaterDoc(t,t.itemIdx))}},{key:"documentSwitchShowModel",value:function(e){C.log("文档切换显示模式",e);var t=this.docList[e.itemIdx];return null==t?(C.log("文档切换显示模式->文档不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.action=f.default.DOC_ACTION_SWITCH_PAGE,t.curPageNo=parseInt(e.curPageNo)||1,t.curPageNo<1&&(t.curPageNo=1),void this.updaterDoc(t,t.itemIdx))}},{key:"documentCommand",value:function(e){var t=this.docList[e.itemIdx];return null==t?(C.log("文档显示控制失败->文档不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.action=f.default.DOC_ACTION_COMMAND,t.showType=parseInt(e.showType)||0,t.curV=parseInt(e.curV)||0,t.curH=parseInt(e.curH)||0,t.scale=parseInt(e.scale)||100,void this.updaterDoc(t,t.itemIdx))}},{key:"documentDeleteAll",value:function(e){for(var t in this.docList)C.log("删除文档数据->itemIdx:"+t),this.documentDelete({itemIdx:t})}},{key:"documentDelete",value:function(e){var t=new p.default.RCRegistryTableDeleteItemPdu;t.type=p.default.RCPDU_REG_TABLE_DELETE_PDU,t.itemIdx=parseInt(e.itemIdx);var n=new p.default.RCRegistryUpdateObjPdu;n.objId=f.default.DOCSHARING_OBJ_TABLE_ID,n.subType=t.type,n.userData=t.toArrayBuffer();var i=new p.default.RCAdapterItemPdu;i.type=p.default.RCPDU_REG_UPDATE_OBJ,i.itemData=n.toArrayBuffer();var r=new p.default.RCAdapterPdu;r.type=p.default.RCPDU_REG_ADAPTER,r.item.push(i),C.log("文档发送删除数据=============>"+t.itemIdx),this.sendUniform(r,!0)}},{key:"tableInsertHandler",value:function(e,t,n){}},{key:"tableInsertApeHandler",value:function(e,t){var n=e,i=n.length;C.log("添加文档->","activeDocId->",E.default.activeDocId,"tableUpdateItemsLen->",i);for(var r=0;r<i;++r){var a=n[r];if(a){var o=this.unPackPdu(a.owner,a.itemIdx,a.itemData);if(o){this.docList[a.itemIdx]=o,"true"!=o.visible&&1!=o.visible||(E.default.activeDocId=o.itemIdx,E.default.activeDocCurPage=o.curPageNo);var s=this._docPackFullInfo(o);C.log("添加文档->",s),this._emit(v.default.DOC_UPDATE,s)}else C.warn("文档数据解析失败->删除->itemIdx:"+a.itemIdx),this.documentDelete({itemIdx:a.itemIdx})}}this._showDefaultDoc()}},{key:"tableDeleteHandler",value:function(e,t){if(C.log("删除文档数据->",e,t),t&&t.itemIdx)for(var n=t.itemIdx.length,i=t.itemIdx,r=0;r<n;r++)if(this.docList[i[r]]){C.log("删除文档数据:",i[r]);var a=this.docList[i[r]];!a||"true"!=a.visible&&1!=a.visible||(E.default.activeDocId=0,E.default.activeDocCurPage=1,C.log("删除文档数据->清除当前显示的文档")),this._emit(v.default.DOC_DELETE,{itemIdx:i[r]}),delete this.docList[i[r]]}}},{key:"tableUpdateHandler",value:function(e,t,n){}},{key:"tableUpdateApeHandler",value:function(e,t){for(var n=e.length,i=0;i<n;++i){var r=e[i];if(r){var a=this.unPackPdu(r.owner,r.itemIdx,r.itemData);if(a){this.docList[r.itemIdx]=a,!a||"true"!=a.visible&&1!=a.visible||(E.default.activeDocId=a.itemIdx,E.default.activeDocCurPage=a.curPageNo,C.log("更新文档->设置当前激活的文档id->",E.default.activeDocId,"curPageNum->",E.default.activeDocCurPage));var o=this._docPackFullInfo(a);this._emit(v.default.DOC_UPDATE,o)}else C.warn("文档数据解析失败->删除->itemIdx:"+r.itemIdx),this.documentDelete({itemIdx:r.itemIdx})}}this._showDefaultDoc()}},{key:"_showDefaultDoc",value:function(){if(!(E.default.isRecordPlayBack||E.default.activeDocId>0)&&(E.default.isHost||!(E.default.rosterNumber>1))){var e=void 0;for(var t in this.docList)if(e=this.docList[t]){C.log("选择一个文档作为默认文档显示->",e);var n={itemIdx:e.itemIdx,visible:!0};return void this.documentSwitchDoc(n)}}}},{key:"onJoinChannelHandlerSuccess",value:function(){var e=this;C.log(this._session_name+" onJoinChannelHandlerSuccess==========================="),this._apeDelayed?setTimeout(function(){e._emit(t.DOC_JOIN_CHANNEL_SUCCESS)},E.default.mcuDelay+E.default.docDelay||12e3+E.default.docDelay):setTimeout(function(){e._emit(t.DOC_JOIN_CHANNEL_SUCCESS)},E.default.docDelay)}},{key:"checkDocId",value:function(e){if(null==e)return C.warn("查找文档->失败->参数为null"),!0;for(var t in this.docList){var n=this.docList[t];if(n&&n.docId==e)return!0}return C.log("查找文档->没有查找到文档->",e),!1}},{key:"packPdu",value:function(e,t){if(null==e||null==t)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new p.default.RCDocSendDataModelPdu;return n.itemIdx=t,n.owner=E.default.nodeId,n.from=E.default.nodeId,n.curPageNo=e.curPageNo||1,n.pageNum=e.pageNum||1,n.fileType=e.fileType||"",n.creatUserId=e.creatUserId||"0",n.url=e.url||"",n.relativeUrl=e.relativeUrl||"",n.curV=parseInt(e.curV)||0,n.curH=parseInt(e.curH)||0,n.scale=e.scale||100,n.visible=e.visible||!1,n.action=e.action||f.default.DOC_ACTION_NORMAL,n.docId=e.docId||"",n.md5=e.md5||"",n.fileName=e.fileName||"doc_"+t,n.dynamicTS=e.dynamicTS||"0",n.showType=e.showType||0,n.animationStep=e.animationStep||1,n}},{key:"unPackPdu",value:function(e,t,n){if(null==e||null==t||null==n)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var i=p.default.RCDocSendDataModelPdu.decode(n);return i}catch(e){C.log("文档===>unPackPdu->Pdu解析错误->itemIdx="+t+"->err:"+e.message)}return null}}]),t}(d.default);R.prototype.DOC_JOIN_CHANNEL_SUCCESS=R.DOC_JOIN_CHANNEL_SUCCESS="docServer.join.channel.success";var b=R;t.default=b,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(C,"loger","D:/work/McuClient/src/apes/DocApe.js"),__REACT_HOT_LOADER__.register(R,"DocApe","D:/work/McuClient/src/apes/DocApe.js"),__REACT_HOT_LOADER__.register(b,"default","D:/work/McuClient/src/apes/DocApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(8),d=r(u),c=n(3),f=r(c),h=n(6),p=r(h),_=n(1),g=r(_),m=n(4),v=r(m),y=n(2),E=r(y),S=n(5),T=r(S),C=g.default.getLoger("MediaSharedApe"),R=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f.default.MEDIA_SESSION_ID,f.default.MEDIA_SESSION_NAME,f.default.MEDIA_SESSION_TAG));return e.lastActiveData=null,e.mediaSharedList={},e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(p.default.RCPDU_REG_REGISTER_TABLE,f.default.MEDIA_OBJ_TABLE_ID,f.default.MEDIA_OBJ_TABLE_NAME,f.default.MEDIA_OBJ_TABLE_TAG,0,new ArrayBuffer),e}return s(t,e),l(t,[{key:"mediaSharedUpload",value:function(e){if(null==e||T.default.isEmptyObject(e))return C.warn("上传媒体文件->失败->参数错误->",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);if(this.checkMediaSharedId(e.fileId))return void C.warn("上传媒体文件->失败->媒体文件档的fileId无效或已经存在相同的fileId不需要上传");var t=T.default.creatSoleNumberFromTimestamp(),n=this.packPdu(e,t);if(null==n)return C.log("上传媒体文件->失败->数据无效"),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var i=new p.default.RCRegistryTableItemPdu;i.itemIdx=t,i.registerObjId=f.default.MEDIA_OBJ_TABLE_ID,i.owner=0,i.itemData=n.toArrayBuffer();var r=new p.default.RCRegistryTableInsertItemPdu;r.type=p.default.RCPDU_REG_TABLE_INSERT_PDU,r.items.push(i);var a=new p.default.RCRegistryUpdateObjPdu;a.objId=f.default.MEDIA_OBJ_TABLE_ID,a.subType=r.type,a.userData=r.toArrayBuffer();var o=new p.default.RCAdapterItemPdu;o.type=p.default.RCPDU_REG_UPDATE_OBJ,o.itemData=a.toArrayBuffer();var s=new p.default.RCAdapterPdu;s.type=p.default.RCPDU_REG_ADAPTER,s.item.push(o),C.log("上传媒体文件->发送->itemIdx="+i.itemIdx),this.sendUniform(s,!0)}},{key:"mediaSharedDelete",value:function(e){var t=new p.default.RCRegistryTableDeleteItemPdu;t.type=p.default.RCPDU_REG_TABLE_DELETE_PDU,t.itemIdx=parseInt(e.itemIdx);var n=new p.default.RCRegistryUpdateObjPdu;n.objId=f.default.MEDIA_OBJ_TABLE_ID,n.subType=t.type,n.userData=t.toArrayBuffer();var i=new p.default.RCAdapterItemPdu;i.type=p.default.RCPDU_REG_UPDATE_OBJ,i.itemData=n.toArrayBuffer();var r=new p.default.RCAdapterPdu;r.type=p.default.RCPDU_REG_ADAPTER,r.item.push(i),C.log("媒体文件发送删除数据=============>"+t.itemIdx),this.sendUniform(r,!0)}},{key:"updaterMediaShared",value:function(e,t){if(null==e||null==t)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=this.mediaSharedList[t];n&&(e.duration=n.duration||0),C.log("发送媒体文件->更新 ",e);var i=this.packPdu(e,t),r=new p.default.RCRegistryTableItemPdu;r.itemIdx=t,r.owner=0,r.itemData=i.toArrayBuffer();var a=new p.default.RCRegistryTableUpdateItemPdu;a.type=p.default.RCPDU_REG_TABLE_UPDATE_PDU,a.items.push(r);var o=new p.default.RCRegistryUpdateObjPdu;o.objId=f.default.MEDIA_OBJ_TABLE_ID,o.subType=a.type,o.userData=a.toArrayBuffer();var s=new p.default.RCAdapterItemPdu;s.type=p.default.RCPDU_REG_UPDATE_OBJ,s.itemData=o.toArrayBuffer();var l=new p.default.RCAdapterPdu;l.type=p.default.RCPDU_REG_ADAPTER,l.item.push(s),this.sendUniform(l,!0)}},{key:"_mediaSharedPackFullInfo",value:function(e){var t=e;return t.seek||(t.seek=1),t}},{key:"updaterRecordApeStatus",value:function(e){C.warn("录制状态发送改变->更新当前的媒体文件数据->fileId:",E.default.activeMediaId,"page:",E.default.activeMediaSeek),this.mediaSharedSeek({itemIdx:E.default.activeMediaId,seek:E.default.activeMediaSeek})}},{key:"clearData",value:function(){C.log("clearData->"),this.lastActiveData=null,this.mediaSharedList={},E.default.activeMediaId=0,E.default.activeMediaSeek=1}},{key:"mediaSharedUpdate",value:function(e){if(null==e||null==e.itemIdx)return C.warn("媒体文件更新失败->参数错误",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=this.mediaSharedList[e.itemIdx];return null==t?(C.warn("更新媒体文件->媒体文件不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.status=parseInt(e.status)||0,t.seek=parseInt(e.seek)||1,t.mediaVolume=parseInt(e.mediaVolume)||0,void this.updaterMediaShared(t,t.itemIdx))}},{key:"mediaSharedPlay",value:function(e){if(C.log("切换媒体文件->",e),E.default.isRecordPlayBack)return void C.warn("录制回放状态不允许切换媒体文件");if(null==e||null==e.itemIdx)return C.warn("切换媒体文件失败,参数错误",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=void 0;0!=E.default.activeMediaId&&(t=this.mediaSharedList[E.default.activeMediaId],t&&(t.status=0));var n=this.mediaSharedList[e.itemIdx];return null==n?(C.warn("切换媒体文件失败,媒体文件不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(n.status=e.status||0,n.seek=e.seek||1,n.mediaVolume=parseInt(e.mediaVolume)||0,C.log({oldDoc:t,nowDoc:n}),this.updaterMediaShared(n,n.itemIdx),void(t&&t.itemIdx!=n.itemIdx&&this.updaterMediaShared(t,t.itemIdx)))}},{key:"mediaSharedStop",value:function(e){if(C.log("停止媒体文件->",e),E.default.isRecordPlayBack)return void C.warn("录制回放状态不允许停止媒体文件");if(null==e||null==e.itemIdx)return C.warn("停止媒体文件,参数错误",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=this.mediaSharedList[e.itemIdx];return null==t?(C.warn("停止媒体文件,媒体文件不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.status=0,t.seek=0,void this.updaterMediaShared(t,t.itemIdx))}},{key:"mediaSharedPause",value:function(e){if(C.log("暂停媒体文件->",e),E.default.isRecordPlayBack)return void C.warn("录制回放-》暂停媒体文件");if(null==e||null==e.itemIdx)return C.warn("暂停媒体文件,参数错误",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=this.mediaSharedList[e.itemIdx];return null==t?(C.warn("暂停媒体文件,媒体文件不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.status=2,void this.updaterMediaShared(t,t.itemIdx))}},{key:"mediaSharedSeek",value:function(e){C.log("媒体文件SEEK->",e);var t=this.mediaSharedList[e.itemIdx];return null==t?(C.log("媒体文件SEEK->媒体文件不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.seek=parseInt(e.seek)||1,t.seek<1&&(t.seek=1),void this.updaterMediaShared(t,t.itemIdx))}},{key:"tableInsertHandler",value:function(e,t,n){}},{key:"tableInsertApeHandler",value:function(e,t){var n=e,i=n.length;C.log("添加媒体文件->_seekTime:"+t,"activeMediaId->",E.default.activeMediaId,"tableUpdateItemsLen->",i);for(var r=0;r<i;++r){var a=n[r],o=this.unPackPdu(a.owner,a.itemIdx,a.itemData);if(o){o.seek=o.seek+parseInt(t),this.mediaSharedList[a.itemIdx]=o,1==o.status&&(E.default.activeMediaId=o.itemIdx,E.default.activeMediaSeek=o.seek,C.log("添加媒体文件->设置当前激活的媒体文件id"));var s=this._mediaSharedPackFullInfo(o);this._emit(v.default.MEDIA_SHARED_UPDATE,s)}}this._showDefaultMeida()}},{key:"tableDeleteHandler",value:function(e,t){if(C.log("删除媒体文件数据->",e,t),t&&t.itemIdx)for(var n=t.itemIdx.length,i=t.itemIdx,r=0;r<n;r++)if(this.mediaSharedList[i[r]]){C.log("删除媒体文件数据:",i[r]);var a=this.mediaSharedList[i[r]];a&&1==a.status&&(E.default.activeMediaId=0,E.default.activeMediaSeek=1,C.log("删除媒体文件数据->清除当前显示的媒体文件")),this._emit(v.default.MEDIA_SHARED_DELETE,{itemIdx:i[r]}),delete this.mediaSharedList[i[r]]}}},{key:"tableUpdateHandler",value:function(e,t,n){}},{key:"tableUpdateApeHandler",value:function(e,t){var n=e.length;C.log("更新媒体文件->_seekTime:"+t,"activeDocId->",E.default.activeMediaId,"更新的数量->",n);for(var i=0;i<n;++i){var r=e[i],a=this.unPackPdu(r.owner,r.itemIdx,r.itemData);if(null!=a){a.seek=a.seek+parseInt(t),this.mediaSharedList[r.itemIdx]=a,a&&1==a.status&&(E.default.activeMediaId=a.itemIdx,E.default.activeMediaSeek=a.seek);var o=this._mediaSharedPackFullInfo(a);this._emit(v.default.MEDIA_SHARED_UPDATE,o)}else C.log("更新媒体文件-> 数据无效--> itemIdx")}this._showDefaultMeida()}},{key:"_showDefaultMeida",value:function(){E.default.isRecordPlayBack||!E.default.isHost||E.default.activeMediaId>0}},{key:"onJoinChannelHandlerSuccess",value:function(){var e=this;this._apeDelayed?setTimeout(function(){e._emit(t.MEDIASHARED_JOIN_CHANNEL_SUCCESS)},E.default.mcuDelay+E.default.docDelay||12e3+E.default.docDelay):setTimeout(function(){e._emit(t.MEDIASHARED_JOIN_CHANNEL_SUCCESS)},E.default.docDelay)}},{key:"checkMediaSharedId",value:function(e){if(null==e)return C.warn("查找媒体文件->失败->参数为null"),!0;for(var t in this.mediaSharedList){var n=this.mediaSharedList[t];if(n&&n.fileId==e)return!0}return C.log("查找媒体文件->没有查找到媒体文件->",e),!1}},{key:"packPdu",value:function(e,t){if(null==e||null==t)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new p.default.RCMediaSharedSendDataModelPdu;return n.itemIdx=t,n.owner=E.default.nodeId,n.from=E.default.nodeId,n.fileType=e.fileType||"",n.creatUserId=e.creatUserId||"0",n.url=e.url||"",n.status=e.status||0,n.fileId=e.fileId||"",n.fileName=e.fileName||"media_"+t,n.seek=parseInt(e.seek)||1,n.mediaVolume=parseInt(e.mediaVolume)||0,n.duration=parseInt(e.duration)||0,n}},{key:"unPackPdu",value:function(e,t,n){if(null==e||null==t||null==n)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var i=p.default.RCMediaSharedSendDataModelPdu.decode(n);return i}catch(e){C.log("媒体文件===>unPackPdu->Pdu解析错误->itemIdx="+t+"->err:"+e.message)}return null}}]),t}(d.default);R.prototype.MEDIASHARED_JOIN_CHANNEL_SUCCESS=R.MEDIASHARED_JOIN_CHANNEL_SUCCESS="mediaShared_join_channel_success";var b=R;t.default=b,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(C,"loger","D:/work/McuClient/src/apes/MediaSharedApe.js"),__REACT_HOT_LOADER__.register(R,"MediaSharedApe","D:/work/McuClient/src/apes/MediaSharedApe.js"),__REACT_HOT_LOADER__.register(b,"default","D:/work/McuClient/src/apes/MediaSharedApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==i(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":i(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":i(e)},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(7),u=(r(l),n(1)),d=r(u),c=d.default.getLoger("MessengerMoudle"),f=function(){function e(t,n){a(this,e),this.prefix="[PROJECT_NAME]",this.supportPostMessage="postMessage"in window,this.targets={},this.name=t,this.listenFunc=[],this.prefix=n||this.prefix,this.initListen()}return s(e,[{key:"Target",value:function(e,t,n){var i="";arguments.length<2?i="target error - target and name are both required":"object"!=("undefined"==typeof e?"undefined":o(e))?i="target error - target itself must be window object":"string"!=typeof t&&(i="target error - target name must be string type"),i&&c.warn(i),this.target=e,this.name=t,this.prefix=n}},{key:"targetSend",value:function(e,t,n,i,r){if(c.log("_supportPostMessage",n,"_prefix:"+i,"_name:"+r),n)e&&e.target?e.target.postMessage(i+"|"+r+"__Messenger__"+t,"*"):c.warn("第三方消息通道发送消息失败->target->",e);else try{var a=window.navigator[i+r];"function"==typeof a?a(i+t,window):c.warn("第三方消息通道发送消息失败->target callback function is not defined")}catch(e){c.warn("第三方消息通道发送消息失败->",e.message)}}},{key:"addTarget",value:function(e,t){var n="";arguments.length<2?n="target error - target and name are both required":"object"!=("undefined"==typeof e?"undefined":o(e))?n="target error - target itself must be window object":"string"!=typeof t&&(n="target error - target name must be string type"),n&&c.warn(n),this.supportPostMessage="postMessage"in window,c.log("addTarget->supportPostMessage",this.supportPostMessage);var i=new Object;i.target=e,i.name=t,i.targetSend=this.targetSend,i.prefix=this.prefix,this.targets[t]=i}},{key:"initListen",value:function(){var e=this,t=function(t){var n=void 0;"object"==("undefined"==typeof t?"undefined":o(t))&&t.data&&(n=t.data);for(var i=n.split("__Messenger__"),r=i[1],a=i[0].split("|"),s=a[0],l=a[1],u=0;u<e.listenFunc.length;u++)s+l===e.prefix+e.name&&e.listenFunc[u](r)};this.supportPostMessage?"addEventListener"in document?window.addEventListener("message",t,!1):"attachEvent"in document&&window.attachEvent("onmessage",t):window.navigator[this.prefix+this.name]=t}},{key:"listen",value:function(e){for(var t=0,n=this.listenFunc.length,i=!1;t<n;t++)if(this.listenFunc[t]==e){i=!0;break}i||this.listenFunc.push(e)}},{key:"clear",value:function(){this.listenFunc=[]}},{key:"send",value:function(e){var t=this.targets,n=void 0;for(n in t)if(t.hasOwnProperty(n)){var i=t[n];i&&i.targetSend(i,e,this.supportPostMessage,i.prefix,i.name)}}}]),e}(),h=f;t.default=h,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"loger","D:/work/McuClient/src/apes/MessengerMoudle.js"),__REACT_HOT_LOADER__.register(f,"MessengerMoudle","D:/work/McuClient/src/apes/MessengerMoudle.js"),__REACT_HOT_LOADER__.register(h,"default","D:/work/McuClient/src/apes/MessengerMoudle.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(8),d=r(u),c=n(3),f=r(c),h=n(6),p=r(h),_=n(1),g=r(_),m=n(4),v=r(m),y=n(2),E=r(y),S=n(5),T=r(S),C=g.default.getLoger("MusicSharedApe"),R=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f.default.MUSIC_SESSION_ID,f.default.MUSIC_SESSION_NAME,f.default.MUSIC_SESSION_TAG));return e.lastActiveData=null,e.musicSharedList={},e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(p.default.RCPDU_REG_REGISTER_TABLE,f.default.MUSIC_OBJ_TABLE_ID,f.default.MUSIC_OBJ_TABLE_NAME,f.default.MUSIC_OBJ_TABLE_TAG,0,new ArrayBuffer),e}return s(t,e),l(t,[{key:"musicSharedUpload",value:function(e){if(null==e||T.default.isEmptyObject(e))return C.warn("上传伴音文件->失败->参数错误->",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);if(this.checkMusicSharedId(e.fileId))return void C.warn("上传伴音文件->失败->伴音文件档的fileId无效或已经存在相同的fileId不需要上传");var t=T.default.creatSoleNumberFromTimestamp(),n=this.packPdu(e,t);if(null==n)return C.log("上传伴音文件->失败->数据无效"),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var i=new p.default.RCRegistryTableItemPdu;i.itemIdx=t,i.registerObjId=f.default.MUSIC_OBJ_TABLE_ID,i.owner=0,i.itemData=n.toArrayBuffer();var r=new p.default.RCRegistryTableInsertItemPdu;r.type=p.default.RCPDU_REG_TABLE_INSERT_PDU,r.items.push(i);var a=new p.default.RCRegistryUpdateObjPdu;a.objId=f.default.MUSIC_OBJ_TABLE_ID,a.subType=r.type,a.userData=r.toArrayBuffer();var o=new p.default.RCAdapterItemPdu;o.type=p.default.RCPDU_REG_UPDATE_OBJ,o.itemData=a.toArrayBuffer();var s=new p.default.RCAdapterPdu;s.type=p.default.RCPDU_REG_ADAPTER,s.item.push(o),C.log("上传伴音文件->发送->itemIdx="+i.itemIdx),this.sendUniform(s,!0)}},{key:"musicSharedDelete",value:function(e){var t=new p.default.RCRegistryTableDeleteItemPdu;t.type=p.default.RCPDU_REG_TABLE_DELETE_PDU,t.itemIdx=parseInt(e.itemIdx);var n=new p.default.RCRegistryUpdateObjPdu;n.objId=f.default.MUSIC_OBJ_TABLE_ID,n.subType=t.type,n.userData=t.toArrayBuffer();var i=new p.default.RCAdapterItemPdu;i.type=p.default.RCPDU_REG_UPDATE_OBJ,i.itemData=n.toArrayBuffer();var r=new p.default.RCAdapterPdu;r.type=p.default.RCPDU_REG_ADAPTER,r.item.push(i),C.log("MUSIC文件发送删除数据=============>"+t.itemIdx),this.sendUniform(r,!0)}},{key:"updaterMusicShared",value:function(e,t){if(null==e||null==t)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),
null;var n=this.musicSharedList[t];n&&(e.duration=n.duration||0),C.log("发送伴音文件->更新 ",e);var i=this.packPdu(e,t),r=new p.default.RCRegistryTableItemPdu;r.itemIdx=t,r.owner=0,r.itemData=i.toArrayBuffer();var a=new p.default.RCRegistryTableUpdateItemPdu;a.type=p.default.RCPDU_REG_TABLE_UPDATE_PDU,a.items.push(r);var o=new p.default.RCRegistryUpdateObjPdu;o.objId=f.default.MUSIC_OBJ_TABLE_ID,o.subType=a.type,o.userData=a.toArrayBuffer();var s=new p.default.RCAdapterItemPdu;s.type=p.default.RCPDU_REG_UPDATE_OBJ,s.itemData=o.toArrayBuffer();var l=new p.default.RCAdapterPdu;l.type=p.default.RCPDU_REG_ADAPTER,l.item.push(s),this.sendUniform(l,!0)}},{key:"_musicSharedPackFullInfo",value:function(e){var t=e;return t.seek||(t.seek=1),t}},{key:"updaterRecordApeStatus",value:function(e){C.warn("录制状态发送改变->更新当前的伴音文件数据->fileId:",E.default.activeMusicId,"page:",E.default.activeMusicSeek),this.musicSharedSeek({itemIdx:E.default.activeMusicId,seek:E.default.activeMusicSeek})}},{key:"clearData",value:function(){C.log("clearData->"),this.lastActiveData=null,this.musicSharedList={},E.default.activeMusicId=0,E.default.activeMusicSeek=1}},{key:"musicSharedUpdate",value:function(e){if(null==e||null==e.itemIdx)return C.warn("伴音文件更新失败->参数错误",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=this.musicSharedList[e.itemIdx];return null==t?(C.warn("更新伴音文件->伴音文件不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.status=parseInt(e.status)||0,t.seek=parseInt(e.seek)||1,t.musicVolume=parseInt(e.musicVolume)||0,void this.updaterMusicShared(t,t.itemIdx))}},{key:"musicSharedPlay",value:function(e){if(C.log("切换伴音文件->",e),E.default.isRecordPlayBack)return void C.warn("录制回放状态不允许切换伴音文件");if(null==e||null==e.itemIdx)return C.warn("切换伴音文件失败,参数错误",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=void 0;0!=E.default.activeMusicId&&(t=this.musicSharedList[E.default.activeMusicId],t&&(t.status=0));var n=this.musicSharedList[e.itemIdx];return null==n?(C.warn("切换伴音文件失败,伴音文件不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(n.status=e.status||0,n.seek=e.seek||1,n.musicVolume=parseInt(e.musicVolume)||0,C.log({oldDoc:t,nowDoc:n}),this.updaterMusicShared(n,n.itemIdx),void(t&&t.itemIdx!=n.itemIdx&&this.updaterMusicShared(t,t.itemIdx)))}},{key:"musicSharedStop",value:function(e){if(C.log("停止伴音文件->",e),E.default.isRecordPlayBack)return void C.warn("录制回放状态不允许停止伴音文件");if(null==e||null==e.itemIdx)return C.warn("停止伴音文件,参数错误",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=this.musicSharedList[e.itemIdx];return null==t?(C.warn("停止伴音文件,伴音文件不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.status=0,t.seek=0,void this.updaterMusicShared(t,t.itemIdx))}},{key:"musicSharedPause",value:function(e){if(C.log("暂停伴音文件->",e),E.default.isRecordPlayBack)return void C.warn("录制回放-》暂停伴音文件");if(null==e||null==e.itemIdx)return C.warn("暂停伴音文件,参数错误",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=this.musicSharedList[e.itemIdx];return null==t?(C.warn("暂停伴音文件,伴音文件不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.status=2,void this.updaterMusicShared(t,t.itemIdx))}},{key:"musicSharedSeek",value:function(e){C.log("伴音文件SEEK->",e);var t=this.musicSharedList[e.itemIdx];return null==t?(C.log("伴音文件SEEK->伴音文件不存在",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)):(t.seek=parseInt(e.seek)||1,t.seek<1&&(t.seek=1),void this.updaterMusicShared(t,t.itemIdx))}},{key:"tableInsertHandler",value:function(e,t,n){}},{key:"tableInsertApeHandler",value:function(e,t){var n=e,i=n.length;C.log("添加伴音文件->_seekTime:"+t,"activeMusicId->",E.default.activeMusicId,"tableUpdateItemsLen->",i);for(var r=0;r<i;++r){var a=n[r],o=this.unPackPdu(a.owner,a.itemIdx,a.itemData);if(o){o.seek=o.seek+parseInt(t),this.musicSharedList[a.itemIdx]=o,1==o.status&&(E.default.activeMusicId=o.itemIdx,E.default.activeMusicSeek=o.seek,C.log("添加伴音文件->设置当前激活的伴音文件id"));var s=this._musicSharedPackFullInfo(o);this._emit(v.default.MUSIC_SHARED_UPDATE,s)}}this._showDefaultMeida()}},{key:"tableDeleteHandler",value:function(e,t){if(C.log("删除伴音文件数据->",e,t),t&&t.itemIdx)for(var n=t.itemIdx.length,i=t.itemIdx,r=0;r<n;r++)if(this.musicSharedList[i[r]]){C.log("删除伴音文件数据:",i[r]);var a=this.musicSharedList[i[r]];a&&1==a.status&&(E.default.activeMusicId=0,E.default.activeMusicSeek=1,C.log("删除伴音文件数据->清除当前显示的伴音文件")),this._emit(v.default.MUSIC_SHARED_DELETE,{itemIdx:i[r]}),delete this.musicSharedList[i[r]]}}},{key:"tableUpdateHandler",value:function(e,t,n){}},{key:"tableUpdateApeHandler",value:function(e,t){var n=e.length;C.log("更新伴音文件->_seekTime:"+t,"activeDocId->",E.default.activeMusicId,"更新的数量->",n);for(var i=0;i<n;++i){var r=e[i],a=this.unPackPdu(r.owner,r.itemIdx,r.itemData);if(null!=a){a.seek=a.seek+parseInt(t),this.musicSharedList[r.itemIdx]=a,a&&1==a.status&&(E.default.activeMusicId=a.itemIdx,E.default.activeMusicSeek=a.seek);var o=this._musicSharedPackFullInfo(a);this._emit(v.default.MUSIC_SHARED_UPDATE,o)}else C.log("更新伴音文件-> 数据无效--> itemIdx",itemIdx)}this._showDefaultMeida()}},{key:"_showDefaultMeida",value:function(){E.default.isRecordPlayBack||!E.default.isHost||E.default.activeMusicId>0}},{key:"onJoinChannelHandlerSuccess",value:function(){var e=this;this._apeDelayed?setTimeout(function(){e._emit(t.MUSICSHARED_JOIN_CHANNEL_SUCCESS)},E.default.mcuDelay+E.default.docDelay||12e3+E.default.docDelay):setTimeout(function(){e._emit(t.MUSICSHARED_JOIN_CHANNEL_SUCCESS)},E.default.docDelay)}},{key:"checkMusicSharedId",value:function(e){if(null==e)return C.warn("查找伴音伴音文件->失败->参数为null"),!0;for(var t in this.musicSharedList){var n=this.musicSharedList[t];if(n&&n.fileId==e)return!0}return C.log("查找伴音文件->没有查找到伴音文件->",e),!1}},{key:"packPdu",value:function(e,t){if(null==e||null==t)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new p.default.RCMusicSharedSendDataModelPdu;return n.itemIdx=t,n.owner=E.default.nodeId,n.from=E.default.nodeId,n.fileType=e.fileType||"",n.creatUserId=e.creatUserId||"0",n.url=e.url||"",n.status=e.status||0,n.fileId=e.fileId||"",n.fileName=e.fileName||"music_"+t,n.seek=parseInt(e.seek)||1,n.musicVolume=parseInt(e.musicVolume)||0,n.duration=parseInt(e.duration)||0,n}},{key:"unPackPdu",value:function(e,t,n){if(null==e||null==t||null==n)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var i=p.default.RCMusicSharedSendDataModelPdu.decode(n);return i}catch(e){C.log("伴音文件===>unPackPdu->Pdu解析错误->itemIdx="+t+"->err:"+e.message)}return null}}]),t}(d.default);R.prototype.MUSICSHARED_JOIN_CHANNEL_SUCCESS=R.MUSICSHARED_JOIN_CHANNEL_SUCCESS="musicShared_join_channel_success";var b=R;t.default=b,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(C,"loger","D:/work/McuClient/src/apes/MusicSharedApe.js"),__REACT_HOT_LOADER__.register(R,"MusicSharedApe","D:/work/McuClient/src/apes/MusicSharedApe.js"),__REACT_HOT_LOADER__.register(b,"default","D:/work/McuClient/src/apes/MusicSharedApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(8),d=r(u),c=n(3),f=r(c),h=n(24),p=(r(h),n(4)),_=r(p),g=n(6),m=r(g),v=n(10),y=(r(v),n(1)),E=r(y),S=n(2),T=r(S),C=n(5),R=r(C),b=n(16),w=r(b),A=n(15),I=r(A),P=E.default.getLoger("QuestionApe"),O=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f.default.QUESTION_SESSION_ID,f.default.QUESTION_SESSION_NAME,f.default.QUESTION_SESSION_TAG));return e.getResultTimer=0,e.isShow={},e.questionList={},e.questionTimer=new w.default,e.questionTimer.addTimerCallBack(e.questionTimerCounterUptate.bind(e),1),e._sass=I.default,e._sass.on(I.default.SASS_CREAT_QUESTION_SUCCESS,e._sassCreatQuestionSuccessHandler.bind(e)),e._sass.on(I.default.SASS_CREAT_QUESTION_FAILED,e._sassCreatQuestionFailedHandler.bind(e)),e._sass.on(I.default.SASS_GET_QUESTION_SUCCESS,e._sassGetQuestionSuccessHandler.bind(e)),e._sass.on(I.default.SASS_GET_QUESTION_FAILED,e._sassGetQuestionFailedHandler.bind(e)),e._sass.on(I.default.SASS_GET_QUESTION_RESULT_SUCCESS,e._sassGetQuestionResultSuccessHandler.bind(e)),e._sass.on(I.default.SASS_GET_QUESTION_RESULT_FAILED,e._sassGetQuestionResultFailedHandler.bind(e)),e._sass.on(I.default.SASS_SEND_ANSWER_SUCCESS,e._sassSendAnswerSuccessHandler.bind(e)),e._sass.on(I.default.SASS_SEND_ANSWER_FAILED,e._sassSendAnswerFailedHandler.bind(e)),e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(m.default.RCPDU_REG_REGISTER_TABLE,f.default.CONFERENCE_OBJ_QUESTION_ID,f.default.CONFERENCE_OBJ_QUESTION_NAME,f.default.CONFERENCE_OBJ_QUESTION_TAG,0,new ArrayBuffer),e}return s(t,e),l(t,[{key:"questionTimerCounterUptate",value:function(){this.mcu.connected||(P.warn("MCU 连接已经断开"),this.questionTimer&&this.questionTimer.stopTimer());for(var e in this.questionList){var t=this.questionList[e];if(t){var n=R.default.creatTimestamp()-T.default.serverAndLoacTimeDistanc,i=parseInt(t.timeLimit-(n-t.timestamp));i>=0?this._emit(_.default.UPDATE_QUESTION_TIME,{type:t.type,itemIdx:t.itemIdx,timestamp:i}):this.stopQuestion({itemIdx:t.itemIdx})}}this.questionTimer&&Object.keys(this.questionList).length<1&&this.questionTimer.stopTimer()}},{key:"sendUpdaterTable",value:function(e){if(P.log("答题卡->发送更新信息->"),null==e||R.default.isEmptyObject(e))return P.log("答题卡->发送更新信息->参数错误"),void this._emit(_.default.MCU_ERROR,_.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=e.itemIdx,n=this.packPdu(e,t);if(null==n)return P.log("答题卡->发送更新信息->参数错误"),void this._emit(_.default.MCU_ERROR,_.default.ERR_APE_INTERFACE_PARAM_WRONG);console.log("modelPdu",n);var i=new m.default.RCRegistryTableItemPdu;i.itemIdx=t,i.owner=0,i.registerObjId=f.default.CONFERENCE_OBJ_QUESTION_ID,i.itemData=n.toArrayBuffer();var r=new m.default.RCRegistryTableUpdateItemPdu;r.type=m.default.RCPDU_REG_TABLE_UPDATE_PDU,r.items.push(i);var a=new m.default.RCRegistryUpdateObjPdu;a.objId=f.default.CONFERENCE_OBJ_QUESTION_ID,a.subType=r.type,a.userData=r.toArrayBuffer();var o=new m.default.RCAdapterItemPdu;o.type=m.default.RCPDU_REG_UPDATE_OBJ,o.itemData=a.toArrayBuffer();var s=new m.default.RCAdapterPdu;s.type=m.default.RCPDU_REG_ADAPTER,s.item.push(o),this.sendUniform(s,!0)}},{key:"tableDelete",value:function(e){if(!e)return void P.warn("答题卡->删除数据失败->参数错误",e);var t=new m.default.RCRegistryTableDeleteItemPdu;t.type=m.default.RCPDU_REG_TABLE_DELETE_PDU,t.itemIdx=parseInt(e.itemIdx);var n=new m.default.RCRegistryUpdateObjPdu;n.objId=f.default.CONFERENCE_OBJ_QUESTION_ID,n.subType=t.type,n.userData=t.toArrayBuffer();var i=new m.default.RCAdapterItemPdu;i.type=m.default.RCPDU_REG_UPDATE_OBJ,i.itemData=n.toArrayBuffer();var r=new m.default.RCAdapterPdu;r.type=m.default.RCPDU_REG_ADAPTER,r.item.push(i),P.log("发送答题卡删除数据->"+t.itemIdx),this.sendUniform(r,!0)}},{key:"tableUpdateHandler",value:function(e,t,n){var i=this;try{!function(){var r=i.unPackPdu(e,t,n);if(P.log("答题卡更新数据->",r),i.questionList[t]=r,console.log("this.questionList",i.questionList),r)switch(r.type){case 1:case 2:case 3:case 4:case 100:T.default.isHost?(clearTimeout(i.getResultTimer),i.getResultTimer=setTimeout(function(){i.getQuestionResult(r)},600)):T.default.isNormal&&(r.totalUserList.indexOf(T.default.userId)>=0?P.log("已经提交过答案-不需要显示答题卡->userId:"+T.default.userId):i.isShow[t]?P.warn("已经显现答题卡数据"):(i._emit(_.default.START_ANSWER_QUESTION,r),i.isShow[t]=t)),i.questionTimer&&i.questionTimer.startTimer()}}()}catch(e){P.warn("答题卡更新数据->解析失败->err",e.message)}}},{key:"tableDeleteHandler",value:function(e,t){if(P.log("答题卡删除数据->",e,t),t&&t.itemIdx)for(var n=t.itemIdx.length,i=t.itemIdx,r=0;r<n;r++)if(this.questionList[i[r]]){P.log("答题卡删除数据:",i[r]);var a=this.questionList[i[r]];if(a)switch(a.type){case 1:case 2:case 3:case 4:case 100:P.log("停止答题->",a),this._emit(_.default.STOP_ANSWER_QUESTION,a)}try{delete this.questionList[i[r]],delete this.isShow[i[r]]}catch(e){}}}},{key:"packPdu",value:function(e,t){if(null==e||null==t)return P.log("答题卡->packPdu->参数错误",t,e),this._emit(_.default.MCU_ERROR,_.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new m.default.RCQuestionDataModelPdu;return n.itemIdx=t,n.from=e.nodeId||T.default.nodeId,n.owner=e.owner||T.default.nodeId,n.type=parseInt(e.type)||0,n.questionId=parseInt(e.questionId)||0,n.timeLimit=parseInt(e.timeLimit)||1,n.timestamp=parseInt(e.timestamp)||parseInt(R.default.creatTimestamp()-T.default.serverAndLoacTimeDistanc),n.content=e.content||[],n.options=e.options||[],n.answer=e.answer||[],n.correct=e.correct||[],n.totalUserList=e.totalUserList||[],P.log("答题卡->packPdu",n),n}},{key:"unPackPdu",value:function(e,t,n){if(null==e||null==t||null==n)return this._emit(_.default.MCU_ERROR,_.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var i=m.default.RCQuestionDataModelPdu.decode(n);return i}catch(e){P.log("答题卡->Pdu解析错误,itemIdx="+t+"  err:"+e.message)}return null}},{key:"creatQuestion",value:function(e){if(!e)return void P.warn("创建答题卡->参数错误",e);if(P.log("创建答题卡->",e),this._sass){var t=e;t.classId=T.default.classId,this._sass.creatQuestion(t)}}},{key:"getQuestion",value:function(e){return e?(P.log("获取答题卡数据->.",e),void(this.questionList[e.itemIdx]?this._emit(_.default.START_ANSWER_QUESTION,this.questionList[e.itemIdx]):this._sass&&this._sass.getQuestion(e))):void P.warn("获取答题卡数据->参数错误",e)}},{key:"getQuestionResult",value:function(e){return e?(P.log("获取答题卡结果->",e),void(this._sass&&this._sass.getQuestionResult(e))):void P.warn("获取答题卡结果->参数错误",e)}},{key:"sendAnswer",value:function(e){if(!e)return void P.warn("保存答题答案->参数错误",e);var t=this.questionList[e.itemIdx];if(t){if(t.totalUserList.indexOf(T.default.userId)>=0)return void P.warn("保存答题答案->已经提交过答案不能再次提交");if(this._sass)if(t.questionId==parseInt(e.questionId)){P.log("保存答题答案->",e);var n=e;n.classId=T.default.classId,n.userId=T.default.userId,n.userName=T.default.userName,this._sass.sendAnswer(n)}else P.log("保存答题答案->questionId不存在",e),console.log("questionList",this.questionList)}else P.warn("保存答题答案->数据不存在",e)}},{key:"stopQuestion",value:function(e){return e?(clearTimeout(this.getResultTimer),void(this.questionList[e.itemIdx]?(P.log("停止答题->",e),this.tableDelete(e)):P.warn("停止答题->数据不存在",e))):void P.warn("停止答题->参数错误",e)}},{key:"_sassCreatQuestionSuccessHandler",value:function(e){if(e){var t=parseInt(R.default.creatTimestamp()-T.default.serverAndLoacTimeDistanc),n=e;n.itemIdx=t,n.timestamp=t,this.sendUpdaterTable(n)}}},{key:"_sassCreatQuestionFailedHandler",value:function(e){P.warn("创建答题卡失败",e)}},{key:"_sassGetQuestionSuccessHandler",value:function(e){P.log("获取答题卡数据成功",e)}},{key:"_sassGetQuestionFailedHandler",value:function(e){P.warn("获取答题卡数据失败",e)}},{key:"_sassGetQuestionResultSuccessHandler",value:function(e){if(P.log("获取答题卡结果成功",e),e){var t=this.questionList[e.itemIdx];if(t){var n=e.list||[],i=n.length;t.totalUser=i,t.answers=[];for(var r=t.options,a=0;a<r.length;a++){var o=new Object;o.percent=0,o.userNames=[],t.answers.push(o)}for(var s=0;s<i;s++){var l=n[s];if(l){var u=parseInt(l.answer),d=t.answers[u];d&&(d.userNames.push(l.userName),d.percent=parseInt(d.userNames.length/i*100))}}P.log("获取答题卡结果统计->",t),this._emit(_.default.UPDATE_ANSWER_QUESTION,t)}}}},{key:"_sassGetQuestionResultFailedHandler",value:function(e){P.warn("获取答题卡结果失败",e)}},{key:"_sassSendAnswerSuccessHandler",value:function(e){P.log("保存答案成功",e);var t=this.questionList[e.itemIdx];t&&(t.totalUserList.indexOf(T.default.userId)<0&&t.totalUserList.push(""+T.default.userId),this.sendUpdaterTable(t))}},{key:"_sassSendAnswerFailedHandler",value:function(e){P.warn("保存答案失败",e)}}]),t}(d.default),D=O;t.default=D,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(P,"loger","D:/work/McuClient/src/apes/QuestionApe.js"),__REACT_HOT_LOADER__.register(O,"QuestionApe","D:/work/McuClient/src/apes/QuestionApe.js"),__REACT_HOT_LOADER__.register(D,"default","D:/work/McuClient/src/apes/QuestionApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(1),d=r(u),c=n(4),f=r(c),h=n(2),p=r(h),_=n(5),g=(r(_),n(54)),m=r(g),v=n(7),y=r(v),E=n(3),S=r(E),T=d.default.getLoger("ShareApe"),C=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.channelId=S.default.SCREENSHARING_OBJ_TABLE_ID,e.streamId="",e.publishUrl="",e.isConnect=!1,e.isStopPublish=!1,e.shareScreen=m.default,e.defaultPort="605",e.defaultIp="localhost.xuedianyun.com",e.ip=e.defaultIp,e.port=e.defaultPort,e.fullIpPort="",e.init(),e}return s(t,e),l(t,[{key:"init",value:function(){var e=this;this.shareScreen.on(m.default.VERSION_INFO_CHANGE,function(e){console.log("VERSION_INFO_CHANGE->",e)}),this.shareScreen.on(m.default.CAMERA_INFO_CHANGE,function(e){console.log("CAMERA_INFO_CHANGE->",e)}),this.shareScreen.on(m.default.MIC_INFO_CHANGE,function(e){console.log("MIC_INFO_CHANGE->",e)}),this.shareScreen.on(m.default.RTMP_PORT_CHANGE,function(e){console.log("RTMP_PORT_CHANGE->",e)}),this.shareScreen.on(m.default.MIC_VOL_CHANGE,function(e){console.log("MIC_VOL_CHANGE->",e)}),this.shareScreen.on(m.default.MOVIE_INFO_CHANGE,function(t){console.log("MOVIE_INFO_CHANGE->",t),e._emit(f.default.PUBLISH_SCREEN_MOVIE_INFO_CHANGE,t)}),this.shareScreen.on(m.default.VIDEO_INFO_CHANGE,function(t){console.log("VIDEO_INFO_CHANGE->",t),e._emit(f.default.PUBLISH_SCREEN_VIDEO_INFO_CHANGE,t)}),this.shareScreen.on(m.default.SS_START,function(){console.log("屏幕共享开始开启"),e._emit(f.default.PUBLISH_SCREEN_SHARE_SUCCESS)}),this.shareScreen.on(m.default.SS_STOP,function(){console.log("屏幕共享开启失败"),e._emit(f.default.PUBLISH_SCREEN_SHARE_FAILE)}),this.shareScreen.on(m.default.ERROR,function(){console.log("无法连接本地服务-ERROR")}),this.shareScreen.on(m.default.CLOSE,function(){console.log("屏幕共享服务-CLOSE->重连"),e.isConnect=!1,e._emit(f.default.PUBLISH_SCREEN_SHARE_DISCONNECT),e.reConnectTimer=setTimeout(function(){e.startConnectSocket()},1400)}),this.shareScreen.on(m.default.OPEN,function(){console.log("屏幕共享服务开启-OPEN"),e.isConnect=!0,e._emit(f.default.PUBLISH_SCREEN_SHARE_CONNECTED),e.sendPublishRequest()})}},{key:"startConnectSocket",value:function(){clearTimeout(this.reConnectTimer),this.isConnect||(this.port?this.fullIpPort=p.default.websocketProtocol+this.ip+":"+this.port:this.fullIpPort=p.default.websocketProtocol+this.ip,1==p.default.isHttps&&(this.fullIpPort=p.default.replacePort(this.fullIpPort,":80","")),T.log("开始连接本地流媒体服务->",this.fullIpPort),this.shareScreen.startConnect(this.fullIpPort))}},{key:"publish",value:function(e){e&&(this.publishUrl=e.publishUrl||"",this.streamId=e.streamId||"",this.port=e.port||this.defaultPort,this.ip=e.ip||this.defaultIp),clearTimeout(this.reConnectTimer),this.isConnect?this.sendPublishRequest():this.startConnectSocket()}},{key:"sendPublishRequest",value:function(){this.publishUrl&&this.shareScreen&&this.shareScreen.startShareScreen(this.publishUrl)}},{key:"stopPublish",value:function(){if(clearTimeout(this.reConnectTimer),this.shareScreen)try{this.shareScreen.stopShareScreen()}catch(e){console.log("关闭屏幕共享->失败",e.message)}this.publishUrl=""}},{key:"getPublishChannelInfo",value:function(){var e={};return e.owner=p.default.nodeId,e.status=S.default.CHANNEL_STATUS_OPENING,e.fromNodeId=p.default.nodeId,e.channelId=this.channelId,e.streamId=this.streamId,e.classId=p.default.classId,e.siteId=p.default.siteId,e.toNodeId=0,e.userId=p.default.userId,e.mediaType=S.default.MEDIA_TYPE_SHARE,e.screenWidth=p.default.screenWidth,e.screenHeight=p.default.screenHeight,e}},{key:"getDefaultChannelInfo",value:function(){var e={};return e.owner=0,e.status=S.default.CHANNEL_STATUS_RELEASED,e.fromNodeId=p.default.nodeId,e.channelId=this.channelId,e.streamId="",e.classId=p.default.classId,e.siteId=p.default.siteId,e.toNodeId=0,e.userId=p.default.userId,e.mediaType=S.default.MEDIA_TYPE_SHARE,e.screenWidth=p.default.screenWidth,e.screenHeight=p.default.screenHeight,e}}]),t}(y.default),R=C;t.default=R,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(T,"loger","D:/work/McuClient/src/apes/ShareApe.js"),__REACT_HOT_LOADER__.register(C,"ShareApe","D:/work/McuClient/src/apes/ShareApe.js"),__REACT_HOT_LOADER__.register(R,"default","D:/work/McuClient/src/apes/ShareApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(8),d=r(u),c=n(3),f=r(c),h=n(6),p=r(h),_=n(1),g=r(_),m=n(4),v=r(m),y=n(2),E=r(y),S=n(5),T=r(S),C=n(17),R=r(C),b=n(48),w=r(b),A=g.default.getLoger("VideoApe"),I=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f.default.VIDEO_SESSION_ID,f.default.VIDEO_SESSION_NAME,f.default.VIDEO_SESSION_TAG));return e.mediaModule=new R.default,e.mediaModule.MEDIA_OBJ_TABLE_ID=f.default.VIDEO_OBJ_TABLE_ID,e.mediaModule.mediaChannels={},e.mediaModule.mediaType=f.default.MEDIA_TYPE_VIDEO,e.shareApe=new w.default,e.shareApe.on(v.default.PUBLISH_SCREEN_SHARE_SUCCESS,e.onPublishScreenShareSuccess.bind(e)),e.shareApe.on(v.default.PUBLISH_SCREEN_SHARE_FAILE,e.onPublishScreenShareFaile.bind(e)),e.shareApe.on(v.default.PUBLISH_SCREEN_SHARE_CLOSE,e.onPublishScreenShareClose.bind(e)),e.shareApe.on(v.default.PUBLISH_SCREEN_SHARE_DISCONNECT,e.onPublishScreenShareDisconnect.bind(e)),e.shareApe.on(v.default.PUBLISH_SCREEN_SHARE_CONNECTED,e.onPublishScreenShareConnected.bind(e)),e.shareApe.on(v.default.PUBLISH_SCREEN_MOVIE_INFO_CHANGE,e.onPublishScreenMovieInfoChange.bind(e)),e.shareApe.on(v.default.PUBLISH_SCREEN_VIDEO_INFO_CHANGE,e.onPublishScreenVideoInfoChange.bind(e)),e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(p.default.RCPDU_REG_REGISTER_TABLE,f.default.VIDEO_OBJ_TABLE_ID,f.default.VIDEO_OBJ_TABLE_NAME,f.default.VIDEO_OBJ_TABLE_TAG,0,new ArrayBuffer),e.on(p.default.RCPDU_SEND_VIDEO_DATA_REQUEST,e.receiveVideoCommandHandler.bind(e)),e}return s(t,e),l(t,[{key:"onJoinChannelHandlerSuccess",value:function(){this.mediaModule.maxMediaChannel=E.default.maxVideoChannels}},{key:"getPlayVideoPath",value:function(e){return A.log("getPlayVideoPath"),this.mediaModule.getMediaPlayPath(e)}},{key:"getPublishVideoPath",value:function(e){if(A.log("获取推流地址->"),!this.mcu.connected)return A.warn(E.default.getCurrentStatus()),{code:f.default.RETURN_FAILED,data:"已经断开连接"};if(E.default.userRole==f.default.invisible){var t=this.mediaModule.getMediaPublishPathForInVisible(e);return this._emit(v.default.VIDEO_GET_PUBLISH_PATH,t),t}var n=0,i=R.default.allMediaChannelsList;for(var r in i){var a=i[r];a&&a.status==f.default.CHANNEL_STATUS_OPENING&&a.userRole!=f.default.invisible&&n++}if(n>=E.default.maxMediaChannels)return A.warn("不能再打开设备->当前开启的设备数量->",n),{code:f.default.RETURN_FAILED,data:"不能再打开设备,当前开启的设备数量"};var o=this.mediaModule.getMediaPublishPath(e);return this._emit(v.default.VIDEO_GET_PUBLISH_PATH,o),o}},{key:"getAllChannelInfo",value:function(e){return A.log("获取当前所有频道信息->"),this.mediaModule.getAllMediaChannelInfo()}},{key:"publishVideo",value:function(e){if(!this.mcu.connected)return A.warn(E.default.getCurrentStatus()),this._emit(v.default.VIDEO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"已经断开连接!",mediaId:0}),{code:f.default.RETURN_FAILED,data:"已经断开连接"};if(null==e||null==e.publishUrl)return A.warn("推流->参数错误",e),this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),this._emit(v.default.VIDEO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"参数错误!",mediaId:0}),{code:f.default.RETURN_FAILED,data:"参数错误"};try{E.default.optionJsonData=JSON.stringify(e.optionJsonData)||""}catch(e){E.default.optionJsonData=""}var t=this.mediaModule.getNeedPublishMediaChannel(e.publishUrl);if(null==t)return A.warn("推流->推流数据已经无效",e),this._emit(v.default.VIDEO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"推流数据已经无效!",mediaId:0}),{code:f.default.RETURN_FAILED,data:"推流数据已经无效"};var n=this.mediaModule.getFreeMediaChannel();if(0==n)return A.warn("推流->不能再打开更多的设备 "),this._emit(v.default.VIDEO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"不能再打开更多的设备!",mediaId:0}),{code:f.default.RETURN_FAILED,data:"不能再打开更多的设备",mediaChannels:this.mediaModule.mediaChannels};if(this.mediaModule.checkChannelIsOpening(t.channelId))return t.nodeId==E.default.nodeId?(A.warn(t.channelId,"已经推送过消息,不需要再次推送"),this._emit(v.default.VIDEO_PUBLISH_RESULT,{code:f.default.RETURN_SUCCESS,data:"已经推送过消息,不需要再次推送!",mediaId:t.channelId}),{code:f.default.RETURN_SUCCESS,data:"已经推送过消息,不需要再次推送!",mediaId:t.channelId}):(A.warn(t.channelId,"频道已经被占用"),this._emit(v.default.VIDEO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"频道已经被占用!",mediaId:0}),{code:f.default.RETURN_FAILED,data:"频道已经被占用!",mediaChannels:this.mediaModule.mediaChannels});var i=this.mediaModule.getDefaultChannelInfo();return i.owner=E.default.nodeId,i.status=f.default.CHANNEL_STATUS_OPENING,i.channelId=t.channelId,i.streamId=t.streamId,i.timestamp=t.timestamp,i.mediaType=f.default.MEDIA_TYPE_VIDEO,this.sendTableUpdateHandler(i),this._emit(v.default.VIDEO_PUBLISH_RESULT,{code:f.default.RETURN_SUCCESS,data:"推流成功!",mediaId:t.channelId}),{code:f.default.RETURN_SUCCESS,data:"推流成功!",mediaId:t.channelId}}},{key:"stopPublishVideo",value:function(e){if(A.log("停止推流->",e),!this.mcu.connected)return A.warn(E.default.getCurrentStatus()),{code:f.default.RETURN_FAILED,data:"已经断开连接"};var t=E.default.nodeId;e&&parseInt(e.nodeId)>0&&(t=parseInt(e.nodeId));var n=0;e&&parseInt(e.mediaId)>0&&(n=parseInt(e.mediaId)),n>0?this._releaseChannelForNodeId(t,n):this._releaseNodeIdAllChannel(t)}},{key:"onPublishScreenShareFaile",value:function(){A.log("屏幕共享推流失败->"),this._emit(v.default.PUBLISH_SCREEN_SHARE_FAILE)}},{key:"onPublishScreenShareClose",value:function(){A.log("屏幕共享推流关闭->"),this._emit(v.default.PUBLISH_SCREEN_SHARE_CLOSE)}},{key:"onPublishScreenShareDisconnect",value:function(){A.log("屏幕共享服务器连接失败->"),this._emit(v.default.PUBLISH_SCREEN_SHARE_DISCONNECT)}},{key:"onPublishScreenShareConnected",value:function(){A.log("屏幕共享服务器连接成功->"),this._emit(v.default.PUBLISH_SCREEN_SHARE_CONNECTED)}},{key:"onPublishScreenMovieInfoChange",value:function(e){A.log("屏幕共享MOVIE信息发生改变->"),this._emit(v.default.PUBLISH_SCREEN_MOVIE_INFO_CHANGE,e)}},{key:"onPublishScreenVideoInfoChange",value:function(e){A.log("屏幕共享视频信息发生改变->"),this._emit(v.default.PUBLISH_SCREEN_VIDEO_INFO_CHANGE,e)}},{key:"onPublishScreenShareSuccess",value:function(){A.log("屏幕共享推流成功之后才能更新同步消息->");var e=this.shareApe.getPublishChannelInfo();return this.sendTableUpdateHandler(e),this._emit(v.default.PUBLISH_SCREEN_SHARE_SUCCESS,{code:f.default.RETURN_SUCCESS,data:"桌面共享推流!",mediaId:e.channelId}),{code:f.default.RETURN_SUCCESS,data:"桌面共享推流!",mediaId:e.channelId}}},{key:"publishScreenShare",value:function(e){if(!this.mcu.connected)return A.warn(E.default.getCurrentStatus()),this._emit(v.default.VIDEO_PUBLISH_RESULT,{code:f.default.RETURN_FAILED,data:"已经断开连接!",mediaId:0}),{code:f.default.RETURN_FAILED,data:"已经断开连接"};var t="flash";if(e&&"live"==e.type&&(t="live"),E.default.isHost){var n=this.mediaModule.getMediaPublishPathForScreenShare(this.shareApe.channelId,t);n.ip=e.ip||"",n.port=e.port||"",this.shareApe.publish(n)}}},{key:"stopPublishScreenShare",value:function(e){if(A.log("停止桌面共享推流->",e),!this.mcu.connected)return A.warn(E.default.getCurrentStatus()),{code:f.default.RETURN_FAILED,data:"已经断开连接"};if(E.default.isHost){var t=this.shareApe.getDefaultChannelInfo();t.status=f.default.CHANNEL_STATUS_RELEASED,this.sendTableUpdateHandler(t),this.shareApe.stopPublish()}}},{key:"_releaseChannelForNodeId",value:function(e,t){A.log(e,"_releaseChannelForNodeId-->channelId",t);var n=this.mediaModule.mediaChannels[t];if(n&&n.status==f.default.CHANNEL_STATUS_OPENING)if(n.fromNodeId==e){var i=this.mediaModule.getDefaultChannelInfo();i.status=f.default.CHANNEL_STATUS_RELEASED,i.channelId=t,this.sendTableUpdateHandler(i)}else A.warn(t,"不属于nodeId",e,"不能释放",n);else A.warn(e,"要释放的channel不存在或者已经释放-->channelId",n)}},{key:"_releaseNodeIdAllChannel",value:function(e){if(!this.mcu.connected)return clearTimeout(this.releaseTimeId),A.warn(E.default.getCurrentStatus()),{code:f.default.RETURN_FAILED,data:"已经断开连接"};A.log("释放nodeId占用的所有频道->",e);var t=this.mediaModule.getOpeningMediaChannelForNodeId(e);if(0==t.channelId)return A.warn(e,"没有占用channel不需要处理"),{code:f.default.RETURN_FAILED,data:"没有占用channel不需要处理"};var n=this.mediaModule.getDefaultChannelInfo();n.status=f.default.CHANNEL_STATUS_RELEASED,n.channelId=t.channelId,n.nodeId=t.fromNodeId,n.userRole=t.userRole,n.userName=t.userName,n.userId=t.userId,this.sendTableUpdateHandler(n),this.releaseTimeId=setTimeout(function(){A.warn(e,"检查频道是否占用"),this._releaseNodeIdAllChannel(e)}.bind(this),800)}},{key:"sendVideoBroadcastMsg",value:function(e){if(!this.mcu.connected)return A.warn(E.default.getCurrentStatus()),{code:f.default.RETURN_FAILED,data:"已经断开连接"};if(null===this._classInfo||T.default.isEmptyObject(this._classInfo))return A.log("不能发送Video消息.McuClient还未初始化数据!"),0==E.default.getCurrentStatus().code||1==E.default.getCurrentStatus().code?(this._emit(v.default.MCU_ERROR,v.default.ERR_APE_SEND_FAILED_NO_JOIN),{code:1,data:"不能发送Video消息.McuClient还未初始化数据"}):{code:f.default.RETURN_FAILED,data:"不能发送Video消息.McuClient还未初始化数据"};if(null==e)return A.warn("sendVideoCommandMsg失败,参数错误",e),
this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),{code:f.default.RETURN_FAILED,data:"sendVideoCommandMsg失败,参数错误"};if(A.log("视频模块广播消息.",e),null!=e.actionType&&e.actionType==f.default.MEDIA_ACTION_OPEN_CAMERA){var t=this.mediaModule.getFreeMediaChannel();if(0==t)return A.warn("视频模块广播消息->不能再打开更多的设备",e),{code:f.default.RETURN_FAILED,data:"不能再打开更多的设备",mediaChannels:this.mediaModule.mediaChannels}}var n=new p.default.RCVideoSendDataRequestPdu;n.type=p.default.RCPDU_SEND_VIDEO_DATA_REQUEST,n.isPublic=!0,n.fromNodeId=E.default.nodeId,n.toNodeId=parseInt(e.toNodeId)||0,n.actionType=parseInt(e.actionType)||f.default.MEDIA_ACTION_DEFAULT;var i="";try{i=JSON.stringify(e.data)}catch(t){A.warn("控制消息->JSON转换失败"),i=e.data}return n.data=this._rCArrayBufferUtil.strToUint8Array("h5"+i),n.isPublic||0==n.toNodeId?this.sendChatUniform(n):this.send(n),{code:f.default.RETURN_SUCCESS,data:""}}},{key:"sendTableUpdateHandler",value:function(e){var t=this.packPdu(e,e.channelId);if(null==t)return void A.warn("sendTableUpdateHandler error,updateModelPdu=null");var n=new p.default.RCRegistryTableItemPdu;n.itemIdx=e.channelId,n.owner=e.owner,n.itemData=t.toArrayBuffer();var i=new p.default.RCRegistryTableUpdateItemPdu;i.type=p.default.RCPDU_REG_TABLE_UPDATE_PDU,i.items.push(n);var r=new p.default.RCRegistryUpdateObjPdu;r.objId=f.default.VIDEO_OBJ_TABLE_ID,r.subType=i.type,r.userData=i.toArrayBuffer();var a=new p.default.RCAdapterItemPdu;a.type=p.default.RCPDU_REG_UPDATE_OBJ,a.itemData=r.toArrayBuffer();var o=new p.default.RCAdapterPdu;o.type=p.default.RCPDU_REG_ADAPTER,o.item.push(a),A.log("发送更新VIDEO.itemIdx="+n.itemIdx),this.sendUniform(o,!0)}},{key:"receiveVideoCommandHandler",value:function(e){var t=p.default.RCVideoSendDataRequestPdu.decode(e);if(null==t)return void A.warn("视频控制消息处理,收到的消息为null,不做处理");t.data=this._rCArrayBufferUtil.uint8ArrayToStr(t.data,2);var n={};try{n=JSON.parse(t.data)}catch(e){A.warn("控制消息->JSON转换失败"),n=t.data}t.data=n,0!=t.toNodeId&&t.toNodeId!=E.default.nodeId?A.log("视频消息不处理 toNodeId=",t.toNodeId,"my nodeId=",E.default.nodeId):(A.log("视频控制消息处理 .",t),this._emit(v.default.VIDEO_BROADCAST,t))}},{key:"tableUpdateHandler",value:function(e,t,n,i){var r=this.unPackPdu(e,t,n);if(A.log("tableUpdateHandler->channel",t,"mediaType",r.mediaType,"status->",r.status,"seek->",i),0==e&&(A.log("释放占用的频道,channel",t),r.status=f.default.CHANNEL_STATUS_RELEASED,r.streamId=""),r.mediaType!=f.default.MEDIA_TYPE_SHARE&&r.channelId>0&&(this.mediaModule.mediaChannels[t]=r),r&&r.fromNodeId!=E.default.nodeId){var a={};if(a.mediaId=r.channelId,a.fromNodeId=r.fromNodeId,a.userName=r.userName||"",a.userRole=r.userRole||f.default.normal,a.mediaType=r.mediaType||f.default.MEDIA_TYPE_DEFAULT,a.screenWidth=r.screenWidth||E.default.screenWidth,a.screenHeight=r.screenHeight||E.default.screenHeight,a.deviceType=r.deviceType||0,a.optionJsonData=r.optionJsonData||"",r.status==f.default.CHANNEL_STATUS_OPENING){a.m3u8Url="",a.rtmpUrl="",a.replay="",a.seek=i||0;var o=this.mediaModule.getMediaPlayPath({type:"m3u8",streamId:r.streamId}),s=this.mediaModule.getMediaPlayPath({type:"rtmp",streamId:r.streamId}),l=this.mediaModule.getMediaRecordPlaybackPath({type:"m3u8",streamId:r.streamId});0==o.code&&(a.m3u8Url=o.playUrl),0==s.code&&(a.rtmpUrl=s.playUrl),0==l.code&&(a.replay=l.playUrl),r.mediaType!=f.default.MEDIA_TYPE_SHARE?(A.log("VIDEO_PLAY",a),this._emit(v.default.VIDEO_PLAY,a)):(A.log("SCREEN_SHARE_PLAY",a),this._emit(v.default.SCREEN_SHARE_PLAY,a))}else r.mediaType!=f.default.MEDIA_TYPE_SHARE?(A.log("VIDEO_STOP",a),this._emit(v.default.VIDEO_STOP,a)):0!=r.channelId?(A.log("SCREEN_SHARE_STOP",a),this._emit(v.default.SCREEN_SHARE_STOP,a)):A.log("停止播放视频->channelId=0->不合法的id",a)}else A.warn("视频消息是自己发送的或者是视频消息无效,不需要处理,消息内容如下:"),A.log(r),r.status==f.default.CHANNEL_STATUS_OPENING?(E.default.openCamera=T.default.creatTimestamp(),E.default.openMicrophones=E.default.openCamera):(E.default.openCamera=0,E.default.openMicrophones=0),r.mediaType!=f.default.MEDIA_TYPE_SHARE&&this._emit(v.default.USER_DEVICE_STATUS_CHAANGE,{nodeId:E.default.nodeId,userRole:E.default.userRole,userName:E.default.userName,userId:E.default.userId,openCamera:E.default.openCamera,openMicrophones:E.default.openMicrophones});r.mediaType!=f.default.MEDIA_TYPE_SHARE&&(R.default.allMediaChannelsList[t]=r,console.log("MediaModule.allMediaChannelsList",R.default.allMediaChannelsList),this._emit(v.default.VIDEO_UPDATE,r))}},{key:"updaterRecordApeStatus",value:function(e){console.warn("录制状态发送改变->更新当前的状态->",this.mediaModule.mediaChannels);for(var t in this.mediaModule.mediaChannels){var n=this.mediaModule.mediaChannels[t];n&&(n.status==f.default.CHANNEL_STATUS_RELEASED?n.owner=0:n.owner=n.fromNodeId,this.sendTableUpdateHandler(n))}}},{key:"clearData",value:function(){A.log("clearData->"),R.default.allMediaChannelsList={}}},{key:"packPdu",value:function(e,t){if(null==e||null==t)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new p.default.RCVideoChannelInfoPdu;return n.status=e.status||f.default.CHANNEL_STATUS_RELEASED,n.channelId=t,n.streamId=e.streamId||"",n.siteId=e.siteId||E.default.siteId,n.classId=parseInt(e.classId)||parseInt(E.default.classId),n.userId=e.userId||"0",n.mediaType=e.mediaType||f.default.MEDIA_TYPE_VIDEO,n.timestamp=e.timestamp||0,n.fromNodeId=e.nodeId||E.default.nodeId,n.userName=e.userName||E.default.userName,n.toNodeId=0,n.userRole=e.userRole||E.default.userRole,n.screenWidth=e.screenWidth||E.default.screenWidth,n.screenHeight=e.screenHeight||E.default.screenHeight,n.deviceType=e.deviceType||E.default.deviceType,n.optionJsonData=E.default.optionJsonData,A.log("packPdu->",n),n}},{key:"unPackPdu",value:function(e,t,n){if(A.log("unPackPdu->owner:",e,"itemIdx->",t),null==e||null==t||null==n)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;try{var i=p.default.RCVideoChannelInfoPdu.decode(n);return A.log(i),i}catch(e){A.log("unPackPdu error,itemIdx="+t+"  err:"+e.message)}return null}}]),t}(d.default),P=I;t.default=P,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(A,"loger","D:/work/McuClient/src/apes/VideoApe.js"),__REACT_HOT_LOADER__.register(I,"VideoApe","D:/work/McuClient/src/apes/VideoApe.js"),__REACT_HOT_LOADER__.register(P,"default","D:/work/McuClient/src/apes/VideoApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(8),d=r(u),c=n(3),f=r(c),h=n(6),p=r(h),_=n(1),g=r(_),m=n(4),v=r(m),y=n(10),E=(r(y),n(2)),S=r(E),T=n(5),C=r(T),R=g.default.getLoger("WhiteBoardApe"),b=0,w=1,A=2,I=3,P=4,O=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f.default.WHITEBOARD_SESSION_ID,f.default.WHITEBOARD_SESSION_NAME,f.default.WHITEBOARD_SESSION_TAG));return e.annoInfos={},e.insertHistory=[],e.registerKey(e._session_id,e._session_name,e._session_tag,new ArrayBuffer),e.registerObj(p.default.RCPDU_REG_REGISTER_TABLE,f.default.WHITEBOARD_OBJ_TABLE_ID,f.default.WHITEBOARD_OBJ_TABLE_NAME,f.default.WHITEBOARD_OBJ_TABLE_TAG,0,new ArrayBuffer),e.on(p.default.RCPDU_SESSION_JOIN_RESPONSE,e._joinSessionHandler.bind(e)),e}return s(t,e),l(t,[{key:"_joinSessionHandler",value:function(e){this.insertHistory=[]}},{key:"clearData",value:function(){R.log("clearData->"),this.annoInfos={},this.insertHistory=[]}},{key:"updaterRecordApeStatus",value:function(e){var t={};for(var n in this.annoInfos){var i=this.annoInfos[n];i&&i.parentId==S.default.activeDocId&&i.curPageNo==S.default.activeDocCurPage&&(t[n]=i)}Object.keys(t).length>0?(R.warn("录制状态发送改变->更新当前的标注数据->docId:",S.default.activeDocId,"page:",S.default.activeDocCurPage),this.sendUpdaterAnnotaion({itemIdxArr:t})):R.warn("录制状态发送改变->当前没有标注数据需要更新->docId:",S.default.activeDocId,"page:",S.default.activeDocCurPage)}},{key:"sendInsetAnnotaion",value:function(e){if(null==e||C.default.isEmptyObject(e))return R.warn("添加标注失败->参数错误->",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=C.default.creatSoleNumberFromTimestamp(),n=this.packPdu(e,t);if(null==n)return R.warn("添加标注失败-->参数错误->",e),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);this.insertHistory.push(n);var i=new p.default.RCRegistryTableItemPdu;i.itemIdx=t,i.registerObjId=f.default.WHITEBOARD_OBJ_TABLE_ID,i.owner=0,i.itemData=n.toArrayBuffer();var r=new p.default.RCRegistryTableInsertItemPdu;r.type=p.default.RCPDU_REG_TABLE_INSERT_PDU,r.items.push(i);var a=new p.default.RCRegistryUpdateObjPdu;a.objId=f.default.WHITEBOARD_OBJ_TABLE_ID,a.subType=r.type,a.userData=r.toArrayBuffer();var o=new p.default.RCAdapterItemPdu;o.type=p.default.RCPDU_REG_UPDATE_OBJ,o.itemData=a.toArrayBuffer();var s=new p.default.RCAdapterPdu;s.type=p.default.RCPDU_REG_ADAPTER,s.item.push(o),this.sendUniform(s,!0)}},{key:"sendGotoPrev",value:function(){if(R.log("撤销上一步"),null==this.insertHistory||this.insertHistory.length<1)return void R.warn("无法继续上一步操作,已经没有可以撤销的数据");var e=this.insertHistory.pop();if(e){var t={};t[e.itemIdx]=e,this.sendDeleteAnnotaion({itemIdxArr:t})}}},{key:"sendDeleteCurPageAnnotation",value:function(e){this.insertHistory=[];var t={};for(var n in this.annoInfos){var i=this.annoInfos[n];i&&i.parentId==S.default.activeDocId&&i.curPageNo==S.default.activeDocCurPage&&(t[n]=i)}this.sendDeleteAnnotaion({itemIdxArr:t})}},{key:"sendDeleteAllAnnotation",value:function(e){this.insertHistory=[],this.sendDeleteAnnotaion({itemIdxArr:this.annoInfos})}},{key:"sendDeleteAnnotaion",value:function(e){if(null==e||null==e.itemIdxArr)return void R.warn("要删除的数据不存在->",e);var t=new p.default.RCAdapterPdu;t.type=p.default.RCPDU_REG_ADAPTER;var n=new p.default.RCRegistryTableDeleteItemPdu;n.type=p.default.RCPDU_REG_TABLE_DELETE_PDU;for(var i in e.itemIdxArr)n.itemIdx.push(parseInt(i));R.log("发送删除白板标注数据->数量:"+n.itemIdx.length);var r=new p.default.RCRegistryUpdateObjPdu;r.objId=f.default.WHITEBOARD_OBJ_TABLE_ID,r.subType=n.type,r.userData=n.toArrayBuffer();var a=new p.default.RCAdapterItemPdu;a.type=p.default.RCPDU_REG_UPDATE_OBJ,a.itemData=r.toArrayBuffer(),t.item.push(a),this.sendUniform(t,!0)}},{key:"sendUpdaterAnnotaion",value:function(e){if(null==e||null==e.itemIdxArr)return R.log("更新标注数据->失败->参数错误"),void this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG);var t=new p.default.RCAdapterPdu;t.type=p.default.RCPDU_REG_ADAPTER;for(var n in e.itemIdxArr){var i=parseInt(n),r=e.itemIdxArr[n],a=this.packPdu(r,i);if(null!=a){var o=new p.default.RCRegistryTableItemPdu;o.itemIdx=i,o.owner=0,o.registerObjId=f.default.WHITEBOARD_OBJ_TABLE_ID,o.itemData=a.toArrayBuffer();var s=new p.default.RCRegistryTableUpdateItemPdu;s.type=p.default.RCPDU_REG_TABLE_UPDATE_PDU,s.items.push(o);var l=new p.default.RCRegistryUpdateObjPdu;l.objId=f.default.WHITEBOARD_OBJ_TABLE_ID,l.subType=s.type,l.userData=s.toArrayBuffer();var u=new p.default.RCAdapterItemPdu;u.type=p.default.RCPDU_REG_UPDATE_OBJ,u.itemData=l.toArrayBuffer(),t.item.push(u)}else R.log("更新标注数据->失败->数据无效"),this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG)}var d=t.item.length;d>0?(R.log("更新标注数据->发送数量->",t.item.length),this.sendUniform(t,!0)):R.log("更新标注数据->没有可更新的数据")}},{key:"tableInsertHandler",value:function(e,t,n){var i=this.unPackPdu(e,t,n);R.log("新增标注","activeDocId->",S.default.activeDocId,"parentId->",i.parentId),i&&S.default.activeDocId==i.parentId&&S.default.activeDocCurPage==i.curPageNo&&this.insertAandShowAnnotaion(i)}},{key:"tableUpdateHandler",value:function(e,t,n){}},{key:"tableUpdateApeHandler",value:function(e,t){var n=e.length;R.log("白板标注更新->","activeDocId->",S.default.activeDocId,"数量->",n);for(var i=0;i<n;++i){var r=e[i];this.unPackPdu(r.owner,r.itemIdx,r.itemData)}this.updateAandShowAnnotaion()}},{key:"tableDeleteHandler",value:function(e,t){if(R.log("删除白板数据->",e,t),t&&t.itemIdx)for(var n=t.itemIdx.length,i=t.itemIdx,r=0;r<n;r++)this.annoInfos[i[r]]&&delete this.annoInfos[i[r]];this.updateAandShowAnnotaion()}},{key:"docUpdateHandler",value:function(e){e.action!=f.default.DOC_ACTION_SWITCH_DOC&&e.action!=f.default.DOC_ACTION_SWITCH_PAGE||(this.insertHistory=[]),this.updateAandShowAnnotaion()}},{key:"docDeleteHandler",value:function(e){R.log("白板收到文档删除的消息->",e);for(var t in this.annoInfos){var n=this.annoInfos[t];n&&n.parentId==e&&(R.log("文档删除->白板数据也删除,itemIdx:"+t,"_parentId:",e),this.sendDeleteAnnotaion({itemIdx:t}))}0==S.default.activeDocId&&(this.insertHistory=[],this.updateAandShowAnnotaion())}},{key:"insertAandShowAnnotaion",value:function(e){var t=[e],n={isFresh:!1,annotaionItems:t};this._emit(v.default.WHITEBOARD_ANNOTATION_UPDATE,n)}},{key:"updateAandShowAnnotaion",value:function(){var e=[];for(var t in this.annoInfos){var n=this.annoInfos[t];n&&n.parentId==S.default.activeDocId&&n.curPageNo==S.default.activeDocCurPage&&e.push(n)}var i={isFresh:!0,annotaionItems:e};this._emit(v.default.WHITEBOARD_ANNOTATION_UPDATE,i)}},{key:"packPdu",value:function(e,t){if(null==e.pointGroup||e.pointGroup.length<1)return this._emit(v.default.MCU_ERROR,v.default.ERR_APE_INTERFACE_PARAM_WRONG),null;var n=new p.default.RCWhiteBoardDataModelPdu;switch(e.type){case b:break;case w:break;case A:break;case I:n.radius=parseInt(e.radius);break;case P:n.fontSize=parseInt(e.fontSize),n.fontName=e.fontName||null,n.text=e.text||null;break;default:return null}n.type=e.type,n.itemIdx=t,n.initiator=S.default.nodeId,n.parentId=S.default.activeDocId,n.curPageNo=S.default.activeDocCurPage;var i=C.default.compressPoint(e.pointGroup),r=C.default.optimizePoint(i);return n.pointGroup=r||"",n.color=e.color||"#000000",n.thickness=e.thickness||1,n}},{key:"unPackPdu",value:function(e,t,n){try{var i=p.default.RCWhiteBoardDataModelPdu.decode(n),r=C.default.unPackOptimizePoint(i.pointGroup);return i.pointGroup=r,this.annoInfos[t]=i,i}catch(e){R.log("白板标注数据->unPackPdu->Pdu解析错误,itemIdx="+t+"  err:"+e.message)}return null}}]),t}(d.default),D=O;t.default=D,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(R,"loger","D:/work/McuClient/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(b,"TYPE_BIGHT","D:/work/McuClient/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(w,"TYPE_LINE","D:/work/McuClient/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(A,"TYPE_RECT","D:/work/McuClient/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(I,"TYPE_CIRCLE","D:/work/McuClient/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(P,"TYPE_TEXT","D:/work/McuClient/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(O,"WhiteBoardApe","D:/work/McuClient/src/apes/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(D,"default","D:/work/McuClient/src/apes/WhiteBoardApe.js"))}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(7),d=r(u),c=n(1),f=r(c),h=n(2),p=r(h),_=f.default.getLoger("EverSocket"),g=4,m=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._connected=!1,e._lastActiveTime=0,e._enableEverSocket=!1,e.reConnectionCounter=0,e}return s(t,e),l(t,[{key:"begin",value:function(e,t){this._clearHistory(),_.log("开始WebSocket应用."),e||_.error("开始MCU连接->MCU连接地址无效"),this._enableEverSocket=!0,t?this.wsURL=p.default.websocketProtocol+e+":"+t:this.wsURL=p.default.websocketProtocol+e,this._newConnection()}},{key:"end",value:function(){_.log("停止WebSocket应用."),this._clear()}},{key:"switchSocketIp",value:function(e,t){t?this.wsURL=p.default.websocketProtocol+e+":"+t:this.wsURL=p.default.websocketProtocol+e}},{key:"send",value:function(e){this._connected?(e&&e.byteLength>1024&&_.warn("发送到MCU的数据文件超过1k-->byteLength->",e.byteLength),this.websocket.send(e)):_.warn("WebSocket未建立连接.消息忽略")}},{key:"_setConnected",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._connected=e,this._connected?this._emit(t.OPEN):this._emit(t.CLOSED)}},{key:"_newConnection",value:function(){1==p.default.isHttps&&(this.wsURL=p.default.replacePort(this.wsURL,":80","")),this.websocket=new WebSocket(this.wsURL),this.websocket.binaryType="arraybuffer",this.websocket.onopen=this._onOpen.bind(this),this.websocket.onclose=this._onClose.bind(this),this.websocket.onerror=this._onError.bind(this),this.websocket.onmessage=this._onMessage.bind(this)}},{key:"_reConnection",value:function(){var e=this;this._clear(),window.clearTimeout(this.reConnectionTimeout),this.reConnectionCounter++,this.reConnectionCounter>g&&(_.warn("MCU断线重连->已经达到最大重连次数!"),this._emit(t.ERROR,t.ERR_SOCKET_RECONNECT_FAILED),this.reConnectionCounter=0),this.reConnectionTimeout=window.setTimeout(function(){_.log("MCU断线重连->",e.reConnectionCounter),window.clearTimeout(e.reConnectionTimeout),e._newConnection()},t.RECONN_INTERVAL)}},{key:"_clear",value:function(){if(_.log("WebSocket,Timers销毁"),window.clearInterval(this.pingTimer),window.clearInterval(this.pongTimer),window.clearInterval(this.reConnectionTimeout),this._setConnected(!1),this._enableEverSocket=!1,null==this.websocket)return void _.log("WebSocket,Timers已经销毁");this.websocket.onopen=void 0,this.websocket.onclose=void 0,this.websocket.onerror=void 0,this.websocket.onmessage=void 0;try{this.websocket.close()}catch(e){_.log("ignore errors")}this.websocket=void 0}},{key:"_clearHistory",value:function(){if(_.log("WebSocket->清除记录"),window.clearInterval(this.pingTimer),window.clearInterval(this.pongTimer),window.clearInterval(this.reConnectionTimeout),this._connected=!1,this._enableEverSocket=!1,null==this.websocket)return void _.log("WebSocket->已经销毁");this.websocket.onopen=void 0,this.websocket.onclose=void 0,this.websocket.onerror=void 0,this.websocket.onmessage=void 0;try{this.websocket.close()}catch(e){_.log("ignore errors")}this.websocket=void 0}},{key:"_onOpen",value:function(){_.log("WebSocket建立成功",this.wsURL),this.reConnectionCounter=0,this.pingTimer=window.setInterval(this._sendPingHandler.bind(this),t.PING_INTERVAL),this.pongTimer=window.setInterval(this._checkPongHandler.bind(this),t.PONG_INTERVAL),this._setConnected()}},{key:"_onClose",value:function(e){_.log("WebSocket连接断开 CODE:"+e.code+" REASON:"+e.reason+" CLEAN: "+e.wasClean,this.wsURL),this._reConnection()}},{key:"_onError",value:function(){_.log("WebSocket错误出现"),this._connected=!1,this._reConnection()}},{key:"_onMessage",value:function(e){this._lastActiveTime=Date.now();var n=e.data;n.byteLength>0&&this._emit(t.MESSAGE,n)}},{key:"_sendPingHandler",value:function(){this._connected?this.websocket.send(new ArrayBuffer):this._reConnection()}},{key:"_checkPongHandler",value:function(){var e=Date.now();this._lastActiveTime&&this._lastActiveTime>=e-t.PONG_INTERVAL&&this._lastActiveTime<=e||(_.warn("---服务器PINGPONG超时-----"),this._reConnection())}},{key:"connected",get:function(){return this._connected}}]),t}(d.default);m.prototype.PONG_INTERVAL=m.PONG_INTERVAL=21e3,m.prototype.PING_INTERVAL=m.PING_INTERVAL=1e4,m.prototype.RECONN_INTERVAL=m.RECONN_INTERVAL=5e3,m.prototype.ERR_SOCKET_RECONNECT_FAILED=m.ERR_SOCKET_RECONNECT_FAILED=20001,m.prototype.CONNECTING=m.CONNECTING=0,m.prototype.OPEN=m.OPEN=1,m.prototype.CLOSING=m.CLOSING=2,m.prototype.CLOSED=m.CLOSED=3,m.prototype.MESSAGE=m.MESSAGE=4,m.prototype.ERROR=m.ERROR=5;var v=new m;t.default=v,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(_,"loger","D:/work/McuClient/src/everSocket.js"),__REACT_HOT_LOADER__.register(g,"MCU_MAX_RECONNECTION","D:/work/McuClient/src/everSocket.js"),__REACT_HOT_LOADER__.register(m,"EverSocket","D:/work/McuClient/src/everSocket.js"),__REACT_HOT_LOADER__.register(v,"default","D:/work/McuClient/src/everSocket.js"))}()},function(e,t,n){var r,a,o,s="function"==typeof Symbol&&"symbol"==i(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":i(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":i(e)};!function(i,s){a=[n(19)],r=s,o="function"==typeof r?r.apply(t,a):r,!(void 0!==o&&(e.exports=o))}(void 0,function(e){function t(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function n(){var e=[],t=[];return function(){return 0===arguments.length?t.join("")+u.apply(String,e):(1024<e.length+arguments.length&&(t.push(u.apply(String,e)),e.length=0),void Array.prototype.push.apply(e,arguments))}}function i(e,t,n,i,r){var a;a=8*r-i-1;var o=(1<<a)-1,s=o>>1,l=-7;r=n?r-1:0;var u=n?-1:1,d=e[t+r];for(r+=u,n=d&(1<<-l)-1,d>>=-l,l+=a;0<l;n=256*n+e[t+r],r+=u,l-=8);for(a=n&(1<<-l)-1,n>>=-l,l+=i;0<l;a=256*a+e[t+r],r+=u,l-=8);if(0===n)n=1-s;else{if(n===o)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),n-=s}return(d?-1:1)*a*Math.pow(2,n-i)}function r(e,t,n,i,r,a){var o,s=8*a-r-1,l=(1<<s)-1,u=l>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0;a=i?0:a-1;var c=i?1:-1,f=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(t=isNaN(t)?1:0,i=l):(i=Math.floor(Math.log(t)/Math.LN2),1>t*(o=Math.pow(2,-i))&&(i--,o*=2),t=1<=i+u?t+d/o:t+d*Math.pow(2,1-u),2<=t*o&&(i++,o/=2),i+u>=l?(t=0,i=l):1<=i+u?(t=(t*o-1)*Math.pow(2,r),i+=u):(t=t*Math.pow(2,u-1)*Math.pow(2,r),i=0));8<=r;e[n+a]=255&t,a+=c,t/=256,r-=8);for(i=i<<r|t,s+=r;0<s;e[n+a]=255&i,a+=c,i/=256,s-=8);e[n+a-c]|=128*f}var a=function e(t,n,i){if("undefined"==typeof t&&(t=e.DEFAULT_CAPACITY),"undefined"==typeof n&&(n=e.DEFAULT_ENDIAN),"undefined"==typeof i&&(i=e.DEFAULT_NOASSERT),!i){if(t|=0,0>t)throw RangeError("Illegal capacity");n=!!n,i=!!i}this.buffer=0===t?l:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=n,this.noAssert=i};a.VERSION="5.0.1",a.LITTLE_ENDIAN=!0,a.BIG_ENDIAN=!1,a.DEFAULT_CAPACITY=16,a.DEFAULT_ENDIAN=a.BIG_ENDIAN,a.DEFAULT_NOASSERT=!1,a.Long=e||null;var o=a.prototype;Object.defineProperty(o,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var l=new ArrayBuffer(0),u=String.fromCharCode;a.accessor=function(){return Uint8Array},a.allocate=function(e,t,n){return new a(e,t,n)},a.concat=function(e,t,n,i){"boolean"!=typeof t&&"string"==typeof t||(i=n,n=t,t=void 0);for(var r,o=0,s=0,l=e.length;s<l;++s)a.isByteBuffer(e[s])||(e[s]=a.wrap(e[s],t)),r=e[s].limit-e[s].offset,0<r&&(o+=r);if(0===o)return new a(0,n,i);for(t=new a(o,n,i),s=0;s<l;)n=e[s++],r=n.limit-n.offset,0>=r||(t.view.set(n.view.subarray(n.offset,n.limit),t.offset),t.offset+=r);return t.limit=t.offset,t.offset=0,t},a.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},a.type=function(){return ArrayBuffer},a.wrap=function(e,t,n,i){if("string"!=typeof t&&(i=n,n=t,t=void 0),"string"==typeof e)switch("undefined"==typeof t&&(t="utf8"),t){case"base64":return a.fromBase64(e,n);case"hex":return a.fromHex(e,n);case"binary":return a.fromBinary(e,n);case"utf8":return a.fromUTF8(e,n);case"debug":return a.fromDebug(e,n);default:throw Error("Unsupported encoding: "+t)}if(null===e||"object"!==("undefined"==typeof e?"undefined":s(e)))throw TypeError("Illegal buffer");if(a.isByteBuffer(e))return t=o.clone.call(e),t.markedOffset=-1,t;if(e instanceof Uint8Array)t=new a(0,n,i),0<e.length&&(t.buffer=e.buffer,t.offset=e.byteOffset,t.limit=e.byteOffset+e.byteLength,t.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)t=new a(0,n,i),0<e.byteLength&&(t.buffer=e,t.offset=0,t.limit=e.byteLength,t.view=0<e.byteLength?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");for(t=new a(e.length,n,i),t.limit=e.length,n=0;n<e.length;++n)t.view[n]=e[n]}return t},o.writeBitSet=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i,r=t,a=e.length,o=a>>3,s=0;for(t+=this.writeVarint32(a,t);o--;)i=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(i,t++);if(s<a){for(i=o=0;s<a;)i|=(1&!!e[s++])<<o++;this.writeByte(i,t++)}return n?(this.offset=t,this):t-r},o.readBitSet=function(e){var t="undefined"==typeof e;t&&(e=this.offset);var n=this.readVarint32(e),i=n.value,r=i>>3,a=0,o=[];for(e+=n.length;r--;)n=this.readByte(e++),o[a++]=!!(1&n),o[a++]=!!(2&n),o[a++]=!!(4&n),o[a++]=!!(8&n),o[a++]=!!(16&n),o[a++]=!!(32&n),o[a++]=!!(64&n),o[a++]=!!(128&n);if(a<i)for(r=0,n=this.readByte(e++);a<i;)o[a++]=!!(n>>r++&1);return t&&(this.offset=e),o},o.readBytes=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var i=this.slice(t,t+e);return n&&(this.offset+=e),i},o.writeBytes=o.append,o.writeInt8=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),this.view[t-1]=e,n&&(this.offset+=1),this},o.writeByte=o.writeInt8,o.readInt8=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}return e=this.view[e],128===(128&e)&&(e=-(255-e+1)),t&&(this.offset+=1),e},o.readByte=o.readInt8,o.writeUint8=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),this.view[t-1]=e,n&&(this.offset+=1),this},o.writeUInt8=o.writeUint8,o.readUint8=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}return e=this.view[e],t&&(this.offset+=1),e},o.readUInt8=o.readUint8,o.writeInt16=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},o.writeShort=o.writeInt16,o.readInt16=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),32768===(32768&n)&&(n=-(65535-n+1)),t&&(this.offset+=2),n},o.readShort=o.readInt16,o.writeUint16=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},o.writeUInt16=o.writeUint16,o.readUint16=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),t&&(this.offset+=2),n},o.readUInt16=o.readUint16,o.writeInt32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},o.writeInt=o.writeInt32,o.readInt32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,
n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),t&&(this.offset+=4),0|n},o.readInt=o.readInt32,o.writeUint32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},o.writeUInt32=o.writeUint32,o.readUint32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),t&&(this.offset+=4),n},o.readUInt32=o.readUint32,e&&(o.writeInt64=function(t,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof n||0!==n%1)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,0>n||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t)),n+=8;var r=this.buffer.byteLength;n>r&&this.resize((r*=2)>n?r:n),n-=8;var r=t.low,a=t.high;return this.littleEndian?(this.view[n+3]=r>>>24&255,this.view[n+2]=r>>>16&255,this.view[n+1]=r>>>8&255,this.view[n]=255&r,n+=4,this.view[n+3]=a>>>24&255,this.view[n+2]=a>>>16&255,this.view[n+1]=a>>>8&255,this.view[n]=255&a):(this.view[n]=a>>>24&255,this.view[n+1]=a>>>16&255,this.view[n+2]=a>>>8&255,this.view[n+3]=255&a,n+=4,this.view[n]=r>>>24&255,this.view[n+1]=r>>>16&255,this.view[n+2]=r>>>8&255,this.view[n+3]=255&r),i&&(this.offset+=8),this},o.writeLong=o.writeInt64,o.readInt64=function(t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var i=0,r=0;return this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0,t+=4,r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0,t+=4,i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0),t=new e(i,r,!1),n&&(this.offset+=8),t},o.readLong=o.readInt64,o.writeUint64=function(t,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof n||0!==n%1)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,0>n||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t)),n+=8;var r=this.buffer.byteLength;n>r&&this.resize((r*=2)>n?r:n),n-=8;var r=t.low,a=t.high;return this.littleEndian?(this.view[n+3]=r>>>24&255,this.view[n+2]=r>>>16&255,this.view[n+1]=r>>>8&255,this.view[n]=255&r,n+=4,this.view[n+3]=a>>>24&255,this.view[n+2]=a>>>16&255,this.view[n+1]=a>>>8&255,this.view[n]=255&a):(this.view[n]=a>>>24&255,this.view[n+1]=a>>>16&255,this.view[n+2]=a>>>8&255,this.view[n+3]=255&a,n+=4,this.view[n]=r>>>24&255,this.view[n+1]=r>>>16&255,this.view[n+2]=r>>>8&255,this.view[n+3]=255&r),i&&(this.offset+=8),this},o.writeUInt64=o.writeUint64,o.readUint64=function(t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var i=0,r=0;return this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0,t+=4,r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0,t+=4,i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0),t=new e(i,r,!0),n&&(this.offset+=8),t},o.readUInt64=o.readUint64),o.writeFloat32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),r(this.view,e,t-4,this.littleEndian,23,4),n&&(this.offset+=4),this},o.writeFloat=o.writeFloat32,o.readFloat32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}return e=i(this.view,e,this.littleEndian,23,4),t&&(this.offset+=4),e},o.readFloat=o.readFloat32,o.writeFloat64=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var i=this.buffer.byteLength;return t>i&&this.resize((i*=2)>t?i:t),r(this.view,e,t-8,this.littleEndian,52,8),n&&(this.offset+=8),this},o.writeDouble=o.writeFloat64,o.readFloat64=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}return e=i(this.view,e,this.littleEndian,52,8),t&&(this.offset+=8),e},o.readDouble=o.readFloat64,a.MAX_VARINT32_BYTES=5,a.calculateVarint32=function(e){return e>>>=0,128>e?1:16384>e?2:2097152>e?3:268435456>e?4:5},a.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},a.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},o.writeVarint32=function(e,t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i,r=a.calculateVarint32(e);for(t+=r,i=this.buffer.byteLength,t>i&&this.resize((i*=2)>t?i:t),t-=r,e>>>=0;128<=e;)i=127&e|128,this.view[t++]=i,e>>>=7;return this.view[t++]=e,n?(this.offset=t,this):r},o.writeVarint32ZigZag=function(e,t){return this.writeVarint32(a.zigZagEncode32(e),t)},o.readVarint32=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n,i=0,r=0;do{if(!this.noAssert&&e>this.limit)throw e=Error("Truncated"),e.truncated=!0,e;n=this.view[e++],5>i&&(r|=(127&n)<<7*i),++i}while(0!==(128&n));return r|=0,t?(this.offset=e,r):{value:r,length:i}},o.readVarint32ZigZag=function(e){return e=this.readVarint32(e),"object"===("undefined"==typeof e?"undefined":s(e))?e.value=a.zigZagDecode32(e.value):e=a.zigZagDecode32(e),e},e&&(a.MAX_VARINT64_BYTES=10,a.calculateVarint64=function(t){"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t));var n=t.toInt()>>>0,i=t.shiftRightUnsigned(28).toInt()>>>0;return t=t.shiftRightUnsigned(56).toInt()>>>0,0==t?0==i?16384>n?128>n?1:2:2097152>n?3:4:16384>i?128>i?5:6:2097152>i?7:8:128>t?9:10},a.zigZagEncode64=function(t){return"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned()),t.shiftLeft(1).xor(t.shiftRight(63)).toUnsigned()},a.zigZagDecode64=function(t){return"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned()),t.shiftRightUnsigned(1).xor(t.and(e.ONE).toSigned().negate()).toSigned()},o.writeVarint64=function(t,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof n||0!==n%1)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,0>n||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned());var r=a.calculateVarint64(t),o=t.toInt()>>>0,s=t.shiftRightUnsigned(28).toInt()>>>0,l=t.shiftRightUnsigned(56).toInt()>>>0;n+=r;var u=this.buffer.byteLength;switch(n>u&&this.resize((u*=2)>n?u:n),n-=r,r){case 10:this.view[n+9]=l>>>7&1;case 9:this.view[n+8]=9!==r?128|l:127&l;case 8:this.view[n+7]=8!==r?s>>>21|128:s>>>21&127;case 7:this.view[n+6]=7!==r?s>>>14|128:s>>>14&127;case 6:this.view[n+5]=6!==r?s>>>7|128:s>>>7&127;case 5:this.view[n+4]=5!==r?128|s:127&s;case 4:this.view[n+3]=4!==r?o>>>21|128:o>>>21&127;case 3:this.view[n+2]=3!==r?o>>>14|128:o>>>14&127;case 2:this.view[n+1]=2!==r?o>>>7|128:o>>>7&127;case 1:this.view[n]=1!==r?128|o:127&o}return i?(this.offset+=r,this):r},o.writeVarint64ZigZag=function(e,t){return this.writeVarint64(a.zigZagEncode64(e),t)},o.readVarint64=function(t){var n="undefined"==typeof t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,0>t||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=t,r=0,a=0,o=0,s=0,s=this.view[t++],r=127&s;if(128&s&&(s=this.view[t++],r|=(127&s)<<7,128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],r|=(127&s)<<14,128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],r|=(127&s)<<21,128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],a=127&s,128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],a|=(127&s)<<7,128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],a|=(127&s)<<14,128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],a|=(127&s)<<21,128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],o=127&s,128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[t++],o|=(127&s)<<7,128&s||this.noAssert&&"undefined"==typeof s))throw Error("Buffer overrun");return r=e.fromBits(r|a<<28,a>>>4|o<<24,!1),n?(this.offset=t,r):{value:r,length:t-i}},o.readVarint64ZigZag=function(t){return(t=this.readVarint64(t))&&t.value instanceof e?t.value=a.zigZagDecode64(t.value):t=a.zigZagDecode64(t),t}),o.writeCString=function(e,n){var i="undefined"==typeof n;i&&(n=this.offset);var r,a=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(r=0;r<a;++r)if(0===e.charCodeAt(r))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof n||0!==n%1)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,0>n||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}return a=c.calculateUTF16asUTF8(t(e))[1],n+=a+1,r=this.buffer.byteLength,n>r&&this.resize((r*=2)>n?r:n),n-=a+1,c.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),this.view[n++]=0,i?(this.offset=n,this):a},o.readCString=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,r=e,a=-1;return c.decodeUTF8toUTF16(function(){if(0===a)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return a=this.view[e++],0===a?null:a}.bind(this),i=n(),!0),t?(this.offset=e,i()):{string:i(),length:e-r}},o.writeIString=function(e,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof n||0!==n%1)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,0>n||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var r,a=n;r=c.calculateUTF16asUTF8(t(e),this.noAssert)[1],n+=4+r;var o=this.buffer.byteLength;if(n>o&&this.resize((o*=2)>n?o:n),n-=4+r,this.littleEndian?(this.view[n+3]=r>>>24&255,this.view[n+2]=r>>>16&255,this.view[n+1]=r>>>8&255,this.view[n]=255&r):(this.view[n]=r>>>24&255,this.view[n+1]=r>>>16&255,this.view[n+2]=r>>>8&255,this.view[n+3]=255&r),n+=4,c.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),n!==a+4+r)throw RangeError("Illegal range: Truncated data, "+n+" == "+(n+4+r));return i?(this.offset=n,this):n-a},o.readIString=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=e,i=this.readUint32(e),i=this.readUTF8String(i,a.METRICS_BYTES,e+=4);return e+=i.length,t?(this.offset=e,i.string):{string:i.string,length:e-n}},a.METRICS_CHARS="c",a.METRICS_BYTES="b",o.writeUTF8String=function(e,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||0!==n%1)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,0>n||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var r,a=n;r=c.calculateUTF16asUTF8(t(e))[1],n+=r;var o=this.buffer.byteLength;return n>o&&this.resize((o*=2)>n?o:n),n-=r,c.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),i?(this.offset=n,this):n-a},o.writeString=o.writeUTF8String,a.calculateUTF8Chars=function(e){return c.calculateUTF16asUTF8(t(e))[0]},a.calculateUTF8Bytes=function(e){return c.calculateUTF16asUTF8(t(e))[1]},a.calculateString=a.calculateUTF8Bytes,o.readUTF8String=function(e,t,i){"number"==typeof t&&(i=t,t=void 0);var r="undefined"==typeof i;if(r&&(i=this.offset),"undefined"==typeof t&&(t=a.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof i||0!==i%1)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,0>i||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var o,s=0,l=i;if(t===a.METRICS_CHARS){if(o=n(),c.decodeUTF8(function(){return s<e&&i<this.limit?this.view[i++]:null}.bind(this),function(e){++s,c.UTF8toUTF16(e,o)}),s!==e)throw RangeError("Illegal range: Truncated data, "+s+" == "+e);return r?(this.offset=i,o()):{string:o(),length:i-l}}if(t===a.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof i||0!==i%1)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,0>i||i+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+"+e+") <= "+this.buffer.byteLength)}var u=i+e;if(c.decodeUTF8toUTF16(function(){return i<u?this.view[i++]:null}.bind(this),o=n(),this.noAssert),i!==u)throw RangeError("Illegal range: Truncated data, "+i+" == "+u);return r?(this.offset=i,o()):{string:o(),length:i-l}}throw TypeError("Unsupported metrics: "+t)},o.readString=o.readUTF8String,o.writeVString=function(e,n){var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof n||0!==n%1)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,0>n||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var r,o,s=n;r=c.calculateUTF16asUTF8(t(e),this.noAssert)[1],o=a.calculateVarint32(r),n+=o+r;var l=this.buffer.byteLength;if(n>l&&this.resize((l*=2)>n?l:n),n-=o+r,n+=this.writeVarint32(r,n),c.encodeUTF16toUTF8(t(e),function(e){this.view[n++]=e}.bind(this)),n!==s+r+o)throw RangeError("Illegal range: Truncated data, "+n+" == "+(n+r+o));return i?(this.offset=n,this):n-s},o.readVString=function(e){var t="undefined"==typeof e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=this.readVarint32(e),i=this.readUTF8String(i.value,a.METRICS_BYTES,e+=i.length);return e+=i.length,t?(this.offset=e,i.string):{string:i.string,length:e-n}},o.append=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||0!==n%1)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,0>n||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}if(e instanceof a||(e=a.wrap(e,t)),t=e.limit-e.offset,0>=t)return this;n+=t;var r=this.buffer.byteLength;return n>r&&this.resize((r*=2)>n?r:n),n-=t,this.view.set(e.view.subarray(e.offset,e.limit),n),e.offset+=t,i&&(this.offset+=t),this},o.appendTo=function(e,t){return e.append(this,t),this},o.assert=function(e){return this.noAssert=!e,this},o.capacity=function(){return this.buffer.byteLength},o.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},o.clone=function(e){var t=new a(0,this.littleEndian,this.noAssert);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),t.view=new Uint8Array(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t},o.compact=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal end: Not an integer");if(t>>>=0,0>e||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var n=t-e;if(0===n)return this.buffer=l,this.view=null,0<=this.markedOffset&&(this.markedOffset-=e),this.limit=this.offset=0,this;var i=new ArrayBuffer(n),r=new Uint8Array(i);return r.set(this.view.subarray(e,t)),this.buffer=i,this.view=r,0<=this.markedOffset&&(this.markedOffset-=e),this.offset=0,this.limit=n,this},o.copy=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal end: Not an integer");if(t>>>=0,0>e||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new a(0,this.littleEndian,this.noAssert);var n=t-e,i=new a(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,0<=i.markedOffset&&(i.markedOffset-=e),this.copyTo(i,0,e,t),i},o.copyTo=function(e,t,n,i){var r,o;if(!this.noAssert&&!a.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(o="undefined"==typeof t)?e.offset:0|t,n=(r="undefined"==typeof n)?this.offset:0|n,i="undefined"==typeof i?this.limit:0|i,0>t||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(0>n||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var s=i-n;return 0===s?e:(e.ensureCapacity(t+s),e.view.set(this.view.subarray(n,i),t),r&&(this.offset+=s),o&&(e.offset+=s),this)},o.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},o.fill=function(e,t,n){var i="undefined"==typeof t;if(i&&(t=this.offset),"string"==typeof e&&0<e.length&&(e=e.charCodeAt(0)),"undefined"==typeof t&&(t=this.offset),"undefined"==typeof n&&(n=this.limit),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof n||0!==n%1)throw TypeError("Illegal end: Not an integer");if(n>>>=0,0>t||t>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(t>=n)return this;for(;t<n;)this.view[t++]=e;return i&&(this.offset=t),this},o.flip=function(){return this.limit=this.offset,this.offset=0,this},o.mark=function(e){if(e="undefined"==typeof e?this.offset:e,!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,0>e||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},o.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},o.LE=function(e){return this.littleEndian="undefined"==typeof e||!!e,this},o.BE=function(e){return this.littleEndian="undefined"!=typeof e&&!e,this},o.prepend=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var i="undefined"==typeof n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||0!==n%1)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,0>n||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}if(e instanceof a||(e=a.wrap(e,t)),t=e.limit-e.offset,0>=t)return this;var r=t-n;if(0<r){var o=new ArrayBuffer(this.buffer.byteLength+r),s=new Uint8Array(o);s.set(this.view.subarray(n,this.buffer.byteLength),t),this.buffer=o,this.view=s,this.offset+=r,0<=this.markedOffset&&(this.markedOffset+=r),this.limit+=r,n+=r}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),n-t),e.offset=e.limit,i&&(this.offset-=t),this},o.prependTo=function(e,t){return e.prepend(this,t),this},o.printDebug=function(e){"function"!=typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},o.remaining=function(){return this.limit-this.offset},o.reset=function(){return 0<=this.markedOffset?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},o.resize=function(e){if(!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal capacity: "+e+" (not an integer)");if(e|=0,0>e)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength<e){e=new ArrayBuffer(e);var t=new Uint8Array(e);t.set(this.view),this.buffer=e,this.view=t}return this},o.reverse=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal end: Not an integer");if(t>>>=0,0>e||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t?this:(Array.prototype.reverse.call(this.view.subarray(e,t)),this)},o.skip=function(e){if(!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(0>t||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},o.slice=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal end: Not an integer");if(t>>>=0,0>e||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var n=this.clone();return n.offset=e,n.limit=t,n},o.toBuffer=function(e){var t=this.offset,n=this.limit;if(!this.noAssert){if("number"!=typeof t||0!==t%1)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof n||0!==n%1)throw TypeError("Illegal limit: Not an integer");if(n>>>=0,0>t||t>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}return e||0!==t||n!==this.buffer.byteLength?t===n?l:(e=new ArrayBuffer(n-t),new Uint8Array(e).set(new Uint8Array(this.buffer).subarray(t,n),0),e):this.buffer},o.toArrayBuffer=o.toBuffer,o.toString=function(e,t,n){if("undefined"==typeof e)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(n=t=e="utf8"),e){case"utf8":return this.toUTF8(t,n);case"base64":return this.toBase64(t,n);case"hex":return this.toHex(t,n);case"binary":return this.toBinary(t,n);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var d=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],n=[],i=0,r=t.length;i<r;++i)n[t[i]]=i;return e.encode=function(e,n){for(var i,r;null!==(i=e());)n(t[i>>2&63]),r=(3&i)<<4,null!==(i=e())?(r|=i>>4&15,n(t[63&(r|i>>4&15)]),r=(15&i)<<2,null!==(i=e())?(n(t[63&(r|i>>6&3)]),n(t[63&i])):(n(t[63&r]),n(61))):(n(t[63&r]),n(61),n(61))},e.decode=function(e,t){function i(e){throw Error("Illegal character code: "+e)}for(var r,a,o;null!==(r=e());)if(a=n[r],"undefined"==typeof a&&i(r),null!==(r=e())&&(o=n[r],"undefined"==typeof o&&i(r),t(a<<2>>>0|(48&o)>>4),null!==(r=e()))){if(a=n[r],"undefined"==typeof a){if(61===r)break;i(r)}if(t((15&o)<<4>>>0|(60&a)>>2),null!==(r=e())){if(o=n[r],"undefined"==typeof o){if(61===r)break;i(r)}t((3&a)<<6>>>0|o)}}},e.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)},e}();o.toBase64=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),e|=0,t|=0,0>e||t>this.capacity||e>t)throw RangeError("begin, end");var i;return d.encode(function(){return e<t?this.view[e++]:null}.bind(this),i=n()),i()},a.fromBase64=function(e,n){if("string"!=typeof e)throw TypeError("str");var i=new a(e.length/4*3,n),r=0;return d.decode(t(e),function(e){i.view[r++]=e}),i.limit=r,i},a.btoa=function(e){return a.fromBinary(e).toBase64()},a.atob=function(e){return a.fromBase64(e).toBinary()},o.toBinary=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),e|=0,t|=0,0>e||t>this.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var n=[],i=[];e<t;)n.push(this.view[e++]),1024<=n.length&&(i.push(String.fromCharCode.apply(String,n)),n=[]);return i.join("")+String.fromCharCode.apply(String,n)},a.fromBinary=function(e,t){if("string"!=typeof e)throw TypeError("str");for(var n,i=0,r=e.length,o=new a(r,t);i<r;){if(n=e.charCodeAt(i),255<n)throw RangeError("illegal char code: "+n);o.view[i++]=n}return o.limit=r,o},o.toDebug=function(e){for(var t,n=-1,i=this.buffer.byteLength,r="",a="",o="";n<i;){if(-1!==n&&(t=this.view[n],r=16>t?r+("0"+t.toString(16).toUpperCase()):r+t.toString(16).toUpperCase(),e&&(a+=32<t&&127>t?String.fromCharCode(t):".")),++n,e&&0<n&&0===n%16&&n!==i){for(;51>r.length;)r+=" ";o+=r+a+"\n",r=a=""}r=n===this.offset&&n===this.limit?r+(n===this.markedOffset?"!":"|"):n===this.offset?r+(n===this.markedOffset?"[":"<"):n===this.limit?r+(n===this.markedOffset?"]":">"):r+(n===this.markedOffset?"'":e||0!==n&&n!==i?" ":"")}if(e&&" "!==r){for(;51>r.length;)r+=" ";o+=r+a+"\n"}return e?o:r},a.fromDebug=function(e,t,n){var i=e.length;t=new a((i+1)/3|0,t,n);for(var r,o=0,s=0,l=!1,u=!1,d=!1,c=!1,f=!1;o<i;){switch(r=e.charAt(o++)){case"!":if(!n){if(u||d||c){f=!0;break}u=d=c=!0}t.offset=t.markedOffset=t.limit=s,l=!1;break;case"|":if(!n){if(u||c){f=!0;break}u=c=!0}t.offset=t.limit=s,l=!1;break;case"[":if(!n){if(u||d){f=!0;break}u=d=!0}t.offset=t.markedOffset=s,l=!1;break;case"<":if(!n){if(u){f=!0;break}u=!0}t.offset=s,l=!1;break;case"]":if(!n){if(c||d){f=!0;break}c=d=!0}t.limit=t.markedOffset=s,l=!1;break;case">":if(!n){if(c){f=!0;break}c=!0}t.limit=s,l=!1;break;case"'":if(!n){if(d){f=!0;break}d=!0}t.markedOffset=s,l=!1;break;case" ":l=!1;break;default:if(!n&&l){f=!0;break}if(r=parseInt(r+e.charAt(o++),16),!n&&(isNaN(r)||0>r||255<r))throw TypeError("Illegal str: Not a debug encoded string");t.view[s++]=r,l=!0}if(f)throw TypeError("Illegal str: Invalid symbol at "+o)}if(!n){if(!u||!c)throw TypeError("Illegal str: Missing offset or limit");if(s<t.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+s+" < "+i)}return t},o.toHex=function(e,t){if(e="undefined"==typeof e?this.offset:e,t="undefined"==typeof t?this.limit:t,!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal end: Not an integer");if(t>>>=0,0>e||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var n,i=Array(t-e);e<t;)n=this.view[e++],16>n?i.push("0",n.toString(16)):i.push(n.toString(16));return i.join("")},a.fromHex=function(e,t,n){if(!n){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if(0!==e.length%2)throw TypeError("Illegal str: Length not a multiple of 2")}var i=e.length;t=new a(i/2|0,t);for(var r,o=0,s=0;o<i;o+=2){if(r=parseInt(e.substring(o,o+2),16),!n&&(!isFinite(r)||0>r||255<r))throw TypeError("Illegal str: Contains non-hex characters");t.view[s++]=r}return t.limit=s,t};var c=function(){var e={MAX_CODEPOINT:1114111,encodeUTF8:function(e,t){var n=null;for("number"==typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)128>n?t(127&n):(2048>n?t(n>>6&31|192):(65536>n?t(n>>12&15|224):(t(n>>18&7|240),t(n>>12&63|128)),t(n>>6&63|128)),t(63&n|128)),n=null},decodeUTF8:function(e,t){for(var n,i,r,a,o=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(n=e());)if(0===(128&n))t(n);else if(192===(224&n))null===(i=e())&&o([n,i]),t((31&n)<<6|63&i);else if(224===(240&n))null!==(i=e())&&null!==(r=e())||o([n,i,r]),t((15&n)<<12|(63&i)<<6|63&r);else{if(240!==(248&n))throw RangeError("Illegal starting byte: "+n);null!==(i=e())&&null!==(r=e())&&null!==(a=e())||o([n,i,r,a]),
t((7&n)<<18|(63&i)<<12|(63&r)<<6|63&a)}},UTF16toUTF8:function(e,t){for(var n,i=null;null!==(n=null!==i?i:e());)55296<=n&&57343>=n&&null!==(i=e())&&56320<=i&&57343>=i?(t(1024*(n-55296)+i-56320+65536),i=null):t(n);null!==i&&t(i)},UTF8toUTF16:function(e,t){var n=null;for("number"==typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)65535>=n?t(n):(n-=65536,t((n>>10)+55296),t(n%1024+56320)),n=null},encodeUTF16toUTF8:function(t,n){e.UTF16toUTF8(t,function(t){e.encodeUTF8(t,n)})},decodeUTF8toUTF16:function(t,n){e.decodeUTF8(t,function(t){e.UTF8toUTF16(t,n)})},calculateCodePoint:function(e){return 128>e?1:2048>e?2:65536>e?3:4},calculateUTF8:function(e){for(var t,n=0;null!==(t=e());)n+=128>t?1:2048>t?2:65536>t?3:4;return n},calculateUTF16asUTF8:function(t){var n=0,i=0;return e.UTF16toUTF8(t,function(e){++n,i+=128>e?1:2048>e?2:65536>e?3:4}),[n,i]}};return e}();return o.toUTF8=function(e,t){if("undefined"==typeof e&&(e=this.offset),"undefined"==typeof t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||0!==e%1)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||0!==t%1)throw TypeError("Illegal end: Not an integer");if(t>>>=0,0>e||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i;try{c.decodeUTF8toUTF16(function(){return e<t?this.view[e++]:null}.bind(this),i=n())}catch(n){if(e!==t)throw RangeError("Illegal range: Truncated data, "+e+" != "+t)}return i()},a.fromUTF8=function(e,n,i){if(!i&&"string"!=typeof e)throw TypeError("Illegal str: Not a string");var r=new a(c.calculateUTF16asUTF8(t(e),!0)[1],n,i),o=0;return c.encodeUTF16toUTF8(t(e),function(e){r.view[o++]=e}),r.limit=o,r},a}),function(){"undefined"==typeof __REACT_HOT_LOADER__}()},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n='\n//start\n// pdu_def.proto\n\n// syntax = "proto3";\n\noption optimize_for = LITE_RUNTIME;\nenum RCPduPriority_E {\n    DP_TOP = 0;\n    DP_HIGH = 1;\n    DP_MEDIUM = 2;\n    DP_LOW = 3;\n}\n\nenum RCPduSegment_E {\n    SEG_BEGIN = 0;\n    SEG_END = 1;\n    SEG_ONCE = 2;\n}\n\nenum RCPduTokenStatus_E {\n    TS_NOT_IN_USE = 0;\n    TS_SELF_GRABBED = 1;\n    TS_OTHER_GRABBED = 2;\n    TS_SELF_INHIBITED = 3;\n    TS_OTHER_INHIBITED = 4;\n    TS_SELF_RECIPIENT = 5;\n    TS_SELF_GIVING = 6;\n    TS_OTHER_GIVING = 7;\n}\n\nenum RCPduType_E {\n// GCC PDU\n    RCPDU_CONNECT_PROVIDER_REQUEST = 0;\n    RCPDU_CONNECT_PROVIDER_RESPONSE = 1;\n    RCPDU_CONFERENCE_JOIN_REQUEST = 2;\n    RCPDU_CONFERENCE_JOIN_RESPONSE = 3;\n    RCPDU_CONFERENCE_INVITE_REQUEST = 10;\n    RCPDU_CONFERENCE_INVITE_RESPONSE = 11;\n    RCPDU_CONFERENCE_LOCK_REQUEST = 20;\n    RCPDU_CONFERENCE_LOCK_RESPONSE = 21;\n    RCPDU_CONFERENCE_LOCK_INDICATION = 22;\n    RCPDU_CONFERENCE_UNLOCK_REQUEST = 30;\n    RCPDU_CONFERENCE_UNLOCK_RESPONSE = 31;\n    RCPDU_CONFERENCE_UNLOCK_INDICATION = 32;\n    RCPDU_CONFERENCE_LEAVE_REQUEST = 39;\n    RCPDU_CONFERENCE_TERMINATE_REQUEST = 40;\n    RCPDU_CONFERENCE_TERMINATE_RESPONSE = 41;\n    RCPDU_CONFERENCE_TERMINATE_INDICATION = 42;\n    RCPDU_CONFERENCE_EJECT_USER_REQUEST = 50;\n    RCPDU_CONFERENCE_EJECT_USER_RESPONSE = 51;\n    RCPDU_CONFERENCE_EJECT_USER_INDICATION = 52;\n    RCPDU_ROSTER_UPDATE_INDICATION = 60;\n    RCPDU_REGISTRY_UPDATE_REQUEST = 70; // INCLUDE ALL OBJS OPERATION\n    RCPDU_REGISTRY_UPDATE_RESPONSE = 71;\n    RCPDU_REGISTRY_UPDATE_INDICATION = 72;\n    RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE = 80;\n\n    // MCS PDU\n    RCPDU_SESSION_JOIN_REQUEST = 90;\n    RCPDU_SESSION_JOIN_RESPONSE = 91;\n    RCPDU_CHANNEL_GRAB_REQUEST = 100;\n    RCPDU_CHANNEL_GRAB_RESPONSE = 101;\n    RCPDU_CHANNEL_GRAB_INDICATION = 102;\n    RCPDU_CHANNEL_JOIN_REQUEST = 103;\n    RCPDU_CHANNEL_JOIN_RESPONSE = 104;\n    RCPDU_CHANNEL_LEAVE_REQUEST = 105;\n    RCPDU_CHANNEL_RELEASE_REQUEST = 106;\n    RCPDU_CHANNEL_RELEASE_INDICATION = 107;\n    RCPDU_SEND_DATA_REQUEST = 120;\n    RCPDU_SEND_DATA_INDICATION = 121;\n    RCPDU_UNIFORM_SEND_DATA_REQUEST = 125;\n    RCPDU_UNIFORM_SEND_DATA_INDICATION = 126;\n    RCPDU_TOKEN_GRAB_REQUEST = 130;\n    RCPDU_TOKEN_GRAB_CONFIRM = 131;\n    RCPDU_TOKEN_INHIBIT_REQUEST = 132;\n    RCPDU_TOKEN_INHIBIT_CONFIRM = 133;\n    RCPDU_TOKEN_GIVE_REQUEST = 134;\n    RCPDU_TOKEN_GIVE_INDICATION = 135;\n    RCPDU_TOKEN_GIVE_RESPONSE = 136;\n    RCPDU_TOKEN_GIVE_CONFIRM = 137;\n    RCPDU_TOKEN_PLEASE_REQUEST = 138;\n    RCPDU_TOKEN_PLEASE_INDICATION = 139;\n    RCPDU_TOKEN_RELEASE_REQUEST = 140;\n    RCPDU_TOKEN_RELEASE_CONFIRM = 141;\n    RCPDU_TOKEN_TEST_REQUEST = 142;\n    RCPDU_TOKEN_TEST_CONFIRM = 143;\n\n    // Registry PDU\n    RCPDU_REG_REGISTER_KEY = 200;\n    RCPDU_REG_UNREGISTER_KEY = 201;\n    RCPDU_REG_REGISTER_ROSTER = 202;\n    RCPDU_REG_REGISTER_TOKEN = 203;\n    RCPDU_REG_REGISTER_PARAMETER = 204;\n    RCPDU_REG_REGISTER_COUNTER = 205;\n    RCPDU_REG_REGISTER_TABLE = 206;\n    RCPDU_REG_REGISTER_CACHE = 207;\n    RCPDU_REG_REGISTER_OBJ = 208;\n    RCPDU_REG_UNREGISTER_OBJ = 209;\n    RCPDU_REG_UPDATE_OBJ = 210;\n    RCPDU_REG_ADAPTER = 211;\n    RCPDU_REG_CLEANUP_NODE = 212;\n    RCPDU_REG_REGISTER_QUEUE = 213;\n\n    // Registry Obj update PDU\n    RCPDU_REG_TABLE_INSERT_PDU = 230;\n    RCPDU_REG_TABLE_DELETE_PDU = 231;\n    RCPDU_REG_TABLE_UPDATE_PDU = 232;\n    RCPDU_REG_ROSTER_INSERT_PDU = 240;\n    RCPDU_REG_ROSTER_DELETE_PDU = 241;\n    RCPDU_REG_ROSTER_UPDATE_PDU = 242;\n    RCPDU_REG_PARAMETER_UPDATE_PDU = 250;\n    RCPDU_REG_QUEUE_INSERT_PDU = 255;\n    RCPDU_REG_QUEUE_DELETE_PDU = 256;\n    RCPDU_REG_QUEUE_UPDATE_PDU = 257;\n\n    // data\n    RCPDU_CONFERENCE_SEND_DATA_REQUEST = 259;\n    RCPDU_VIDEO_SEND_DATA_REQUEST = 260;\n    RCPDU_AUDIO_SEND_DATA_REQUEST = 261;\n    RCPDU_GIFT_SEND_DATA_REQUEST = 262;\n    RCPDU_CHAT_SEND_DATA_REQUEST = 263;\n    RCPDU_VOTING_POLL_RECORD = 265;\n    RCPDU_CONFERENCE_RECORD_REQUEST = 270;\n\n    // Registry resource request or response PDU\n    RCPDU_REG_REQUEST_OBJ = 290;\n    RCPDU_REG_RESPONSE_OBJ = 291;\n    RCPDU_REG_COUNTER_REQUEST_PDU = 292;\n    RCPDU_REG_COUNTER_RESPONSE_PDU = 293;\n\n    // Index exchange\n    RCPDU_INDEX_ADAPTER = 300;\n    RCPDU_INDEX_SERVER_USERS = 301;\n    RCPDU_INDEX_CONFERENCE_USER_JOINED = 302;\n    RCPDU_INDEX_CONFERENCE_USER_EXITED = 303;\n    RCPDU_INDEX_CONFERENCE_USERS = 304;\n\n\n\n\n    //new data\n    RCPDU_SEND_CONFERENCE_DATA_REQUEST =500;\n    RCPDU_SEND_VIDEO_DATA_REQUEST = 501;\n    RCPDU_SEND_AUDIO_DATA_REQUEST = 502;\n    RCPDU_SEND_GIFT_DATA_REQUEST = 503;\n    RCPDU_SEND_CHAT_DATA_REQUEST = 504;\n    RCPDU_THIRD_BROADCAST_DATA_REQUEST = 505;\n    RCPDU_SEND_DOC_BROADCAST_DATA_REQUEST = 506;\n}\n\nenum RCPduNodeType_E {\n    NT_TERMINAL = 0;\n    NT_MULTIPORT_TERMINAL = 1;\n    NT_MCU = 2;\n}\n\nenum RCPduReason_E {\n    RSN_USERINITIATED = 0;\n    RSN_DISCONNECTED = 1;\n    RSN_SUPER_LEFT = 2;\n}\n\nenum RCPduResult_E {\n    RET_SUCCESS = 0;\n    RET_USER_REJECTED = 1;\n    RET_INVALID_CONFERENCE = 2;\n    RET_INVALID_PASSWORD = 3;\n    RET_INVALID_CONVENER_PASSWORD = 4;\n    RET_CHALLENGE_RESPONSE_REQUIRED = 5;\n    RET_INVALID_CHALLENGE_RESPONSE = 6;\n    RET_NO_CONNECTION = 7;\n    RET_FULL_CAPACITY = 8;\n}\n\nenum RCPduNodeCategory_E {\n    NC_CONVENTIONAL = 0;\n    NC_COUNTED = 1;\n    NC_ANONYMOUS = 2;\n}\n\nmessage RCConferenceDescriptorPdu {\n    required uint32 id = 1;\n    required string name = 2;\n    optional bytes description = 3;\n    optional uint32 mode = 4;\n    optional string password = 5;\n    optional uint32 capacity = 6;\n    optional bytes user_data = 7;\n}\n\nmessage RCNodeRecordPdu {\n    required uint32 id = 1;\n    optional uint32 superior_node = 2;\n    required RCPduNodeType_E type = 3;\n    required string name = 4;\n    required uint32 capability = 5;\n    optional string net_address = 6;\n    optional RCPduNodeCategory_E category = 7;\n}\n\nmessage RCApplicationRecordPdu {\n    required uint32 id = 1; // session id\n    required string name = 2;\n    required string tag = 3;\n    repeated uint32 channel_ids = 4 [packed = true];\n    optional uint32 capability = 5;\n}\n\n//reg.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCRegistryRegisterKeyPdu {\n    required RCPduType_E type = 1 [default = RCPDU_REG_REGISTER_KEY];\n    required uint32 id = 2;\n    required string name = 3;\n    required string tag = 4;\n    optional bytes user_data = 5;\n}\n\nmessage RCRegistryUnregisterKeyPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_KEY];\n    required uint32 key_id = 2;\n}\n\nmessage RCRegistryRegisterObjPdu {\n    optional RCPduType_E type = 1;\n    required uint32 obj_id = 2;\n    required string name = 3;\n    required string tag = 4;\n    optional uint32 owner = 5;\n    optional bytes user_data = 6;\n}\n\nmessage RCRegistryUnregisterObjPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_OBJ];\n    required uint32 obj_id = 2;\n}\n\nmessage RCRegistryUpdateObjPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_UPDATE_OBJ];\n    required RCPduType_E sub_type = 2;\n    required uint32 obj_id = 3;\n    required bytes user_data = 4;\n}\n\nmessage RCAdapterItemPdu {\n    required RCPduType_E type = 1;\n    required bytes item_data = 2;\n}\n\n// adapter pdu that used to package a list of pdu.\nmessage RCAdapterPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_ADAPTER];\n    repeated RCAdapterItemPdu item = 2;\n}\n\n// table operation pdu\nmessage RCRegistryTableItemPdu {\n    required uint32 item_idx = 1;\n    required uint32 owner = 2;\n    required bytes item_data = 3;\n    optional uint32 register_obj_id=4;\n}\n\nmessage RCRegistryTableInsertItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_INSERT_PDU];\n    repeated RCRegistryTableItemPdu items = 2;\n}\n\nmessage RCRegistryTableDeleteItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];\n    repeated uint32 item_idx = 2;\n}\n\nmessage RCRegistryTableUpdateItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];\n    repeated RCRegistryTableItemPdu items = 2;\n}\n\n// roster operation pdu\nmessage RCRegistryRosterItemPdu {\n    required uint32 node_id = 1;\n    required bytes node_data = 2;\n}\nmessage RCRegistryWBItemPdu {\n    required uint32 node_id = 1;\n    required bytes node_data = 2;\n}\nmessage RCRegistryRosterInsertItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_INSERT_PDU];\n    repeated RCRegistryRosterItemPdu items = 2;\n}\n\nmessage RCRegistryRosterDeleteItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_DELETE_PDU];\n    required uint32 node_id = 2;\n}\n\nmessage RCRegistryRosterUpdateItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_UPDATE_PDU];\n    repeated RCRegistryRosterItemPdu items = 2;\n}\n\n//message RCCleanupNodePdu\n//{\n//  optional RCPduType_E    type                = 1 [default = RCPDU_REG_CLEANUP_NODE];\n//  required uint32         node_id             = 2;\n//}\n\n// parameter operation pdu\nmessage RCRegistryParameterUpdatePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_PARAMETER_UPDATE_PDU];\n    required uint32 value = 2 [default = 0];\n    optional uint32 begin_bit = 3 [default = 31];\n    optional uint32 end_bit = 4;\n}\n\n// queue operation pdu\nmessage RCRegistryQueueItemPdu {\n    required uint32 owner = 1;\n    required uint32 item_id = 2;\n    optional bytes item_data = 3;\n    optional uint32 item_idx = 4;\n}\n\nmessage RCRegstryQueueInsertItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_INSERT_PDU];\n    repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryQueueDeleteItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_DELETE_PDU];\n    required uint32 item_id = 2;\n}\n\nmessage RCRegistryQueueUpdateItemPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_UPDATE_PDU];\n    repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryRequestObjPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_REQUEST_OBJ];\n    required RCPduType_E sub_type = 2;\n    required uint32 obj_id = 3;\n    required bytes user_data = 4;\n}\n\nmessage RCRegistryResponseObjPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_RESPONSE_OBJ];\n    required RCPduType_E sub_type = 2;\n    required uint32 obj_id = 3;\n    required bytes user_data = 4;\n}\n\nmessage RCRegistryCounterRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_REQUEST_PDU];\n    required uint32 count = 2;\n}\n\nmessage RCRegistryCounterResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_RESPONSE_PDU];\n    required uint32 start = 2;\n    required uint32 end = 3;\n}\n\n// mcs\noption optimize_for = LITE_RUNTIME;\n\n// Session management\nmessage RCSessionJoinRequestPdu {\n    required RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_REQUEST];\n    required uint32 id = 2;\n    required string name = 3;\n    required string tag = 4;\n    optional bytes session_data = 5; //聚合在一起的registry信息\n}\n\nmessage RCSessionJoinResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_RESPONSE];\n    required uint32 id = 2;\n    optional bytes response_data = 3;\n}\n\n// Channel management\nmessage RCChannelGrabRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 channel_id = 3;\n}\n\nmessage RCChannelGrabResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_RESPONSE];\n    required uint32 initiator = 2;\n    required uint32 requested_channel_id = 3;\n    required RCPduResult_E result = 4;\n    optional uint32 channel_id = 5;\n}\n\nmessage RCChannelGrabIndicationPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_INDICATION];\n    required uint32 initiator = 2;\n    optional uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinRequestPdu {\n    required RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_RESPONSE];\n    required uint32 initiator = 2;\n    required uint32 requested_channel_id = 3;\n    required RCPduResult_E result = 4;\n}\n\nmessage RCChannelLeaveRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_LEAVE_REQUEST];\n    required uint32 initiator = 2;\n    repeated uint32 channel_ids = 3 [packed = true];\n}\n\nmessage RCChannelReleaseRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_RELEASE_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 channel_id = 3;\n}\n\nmessage RCChannelReleaseIndicationPdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CHANNEL_RELEASE_INDICATION];\n    required uint32 initiator = 2;\n    required uint32 channel_id = 3;\n}\n\n// Data transfer\nmessage RCSendDataPdu {\n    required RCPduType_E type = 1 [default = RCPDU_SEND_DATA_REQUEST];\n    required RCPduType_E sub_type = 2;\n    required uint32 initiator = 3;\n    required uint32 conf_id = 4;\n    required uint32 session_id = 5;\n    required uint32 channel_id = 6;\n    required bool upward = 7;\n    required bool reliability = 8;\n    required RCPduPriority_E priority = 9;\n    required bytes data = 10;\n    optional uint32 peer = 11;\n    optional RCPduSegment_E seg = 12;\n    optional uint32 total_size = 13;\n    optional uint32 site_id = 14;\n    optional string user_id = 15;\n    optional string user_name = 16;\n    optional string user_role = 17;\n    optional string device_type = 18;\n    optional string site = 19;\n}\n\n//  Token management\nmessage RCTokenGrabRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenGrabConfirmPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_CONFIRM];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required RCPduResult_E result = 4;\n    required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenInhibitRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenInhibitConfirmPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_CONFIRM];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required RCPduResult_E result = 4;\n    required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenGiveRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveIndicationPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_INDICATION];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_RESPONSE];\n    required uint32 token_id = 2;\n    required uint64 recipient = 3;\n    required RCPduResult_E result = 4;\n}\n\nmessage RCTokenGiveConfirmPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_CONFIRM];\n    required uint32 token_id = 2;\n    required uint64 recipient = 3;\n    required RCPduResult_E result = 4;\n    required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenPleaseRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenPleaseIndicationPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_INDICATION];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_RELEASE_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseConfirmPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required RCPduResult_E result = 4;\n    required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenTestRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n}\n\nmessage RCTokenTestConfirmPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_CONFIRM];\n    required uint32 initiator = 2;\n    required uint32 token_id = 3;\n    required RCPduTokenStatus_E status = 4;\n}\n\n//gcc.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceJoinRequestPdu {\n    required RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_REQUEST];\n    required uint32 initiator = 2;\n    required RCPduNodeType_E node_type = 3;\n    required RCConferenceDescriptorPdu class_description = 4;//conf_desc\n}\n\nmessage RCConferenceJoinResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_RESPONSE];\n    required uint32 conf_id = 2;\n    required RCPduResult_E result = 3;\n    optional RCConferenceDescriptorPdu class_description = 4;\n}\n\nmessage RCConferenceInviteRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_INVITE_REQUEST];\n    required uint32 initiator = 2;\n    required RCConferenceDescriptorPdu class_description = 3;\n}\n\nmessage RCConferenceInviteResponsePdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_INVITE_RESPONSE];\n    required RCPduResult_E result = 2;\n    optional bytes user_data = 3;\n}\n\nmessage RCConferenceLockRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_REQUEST];\n}\n\nmessage RCConferenceLockResponsePdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_RESPONSE];\n    required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceLockIndicationPdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_LOCK_INDICATION];\n}\n\nmessage RCConferenceUnlockRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_UNLOCK_REQUEST];\n}\n\nmessage RCConferenceUnlockResponsePdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_UNLOCK_RESPONSE];\n    required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceUnlockIndicationPdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_UNLOCK_INDICATION];\n}\n\nmessage RCConferenceLeaveRequestPdu {\n    optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LEAVE_REQUEST];\n    required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateRequestPdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_TERMINATE_REQUEST];\n    required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateResponsePdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_TERMINATE_RESPONSE];\n    required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceTerminateIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_TERMINATE_INDICATION];\n    required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceEjectUserRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_EJECT_USER_REQUEST];\n    required uint32 ejected_node_id = 2;\n    required RCPduReason_E reason = 3;\n}\n\nmessage RCConferenceEjectUserResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_EJECT_USER_RESPONSE];\n    required uint32 ejected_node_id = 2;\n    required RCPduResult_E result = 3;\n}\n\nmessage RCConferenceEjectUserIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n    optional RCPduType_E type = 1\n    [default = RCPDU_CONFERENCE_EJECT_USER_INDICATION];\n    required uint32 ejected_node_id = 2;\n    required RCPduReason_E reason = 3;\n}\n\nmessage RCRosterUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel or\n// MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n    optional RCPduType_E type = 1 [default = RCPDU_ROSTER_UPDATE_INDICATION];\n    required bool full_refresh = 2; // Conference Roster and all\n    repeated RCNodeRecordPdu node_record = 3;\n    repeated RCApplicationRecordPdu app_record = 4;\n}\n\nmessage RCRegistryUpdateRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n    optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_REQUEST];\n    required uint32 key_id = 2;\n    required uint32 obj_id = 3;\n    required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n    optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_RESPONSE];\n    required uint32 key_id = 2;\n    required uint32 obj_id = 3;\n    required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n    optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_INDICATION];\n    required uint32 key_id = 2;\n    required uint32 obj_id = 3;\n    required RCPduResult_E result = 4;\n}\n\nmessage RCFunctionNotSupportedResponsePdu {\n    optional RCPduType_E type = 1\n    [default = RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE];\n    required uint32 request_pdu_id = 2;\n}\n\n//ape.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceSendDataRequestPdu {\n    optional uint32 initiator = 1;\n    optional uint32 peer = 2;\n    required bool is_public = 3;\n    required bytes user_data = 4;\n    optional uint32 action_type = 5;//消息的指令类型\n}\n\nmessage RCThirdSendBroadcastDataRequestPdu {\n    optional uint32 initiator = 1;\n    optional uint32 peer = 2;\n    optional bool is_public = 3;\n    optional bytes message = 4;\n}\n\nmessage RCChatSendDataRequestPdu {\n    optional uint32 initiator = 1;\n    optional uint32 peer = 2;\n    required bool is_public = 3;\n    required bytes user_data = 4;\n    required string from_role = 5;\n    required bytes from_name = 6;\n    optional uint32 msgType = 7 [default =0];//当前消息类型,0是文字消息 1是图片消息\n}\n\nmessage RCDocSendDataModelPdu {\n    required uint32 item_idx=1;//唯一标识\n    required uint32 owner=2;\n    optional uint32 from=3;\n    optional uint32 cur_page_no=4;\n    optional uint32 page_num  =5;\n    optional string file_type=6;\n    optional string creat_user_id=7;//创建文档userid\n    optional string relative_url=8;//文档相对地址\n    optional string url  =9;//文档地址\n    optional uint32 cur_V=10;\n    optional uint32 cur_H=11;\n    optional uint32 scale=12;\n    optional bool visible=13;\n    optional uint32 action=14;//0,无操作, 1翻页、2.显示/隐藏\n    optional string doc_id=15;//文档在服务器数据库中的唯一id\n    optional string file_name=16;//文档的名字\n    optional string dynamic_TS=17;//"dynamicTransferStatic": "0"\n    optional string md5=18;//md5\n    optional uint32 show_type=19;//文档显示模式\n    optional uint32 animation_step=20 [default =1];//当前页码的动画步数\n\n}\n\nmessage RCMediaSharedSendDataModelPdu {\n    optional uint32 item_idx=1;//唯一标识\n    optional uint32 owner=2;\n    optional uint32 from=3;\n    optional string file_type=4;\n    optional string creat_user_id=5;//创建文件userid\n    optional string url  =6;//文件地址\n    optional uint32 status=7;//状态0停止  1播放 2暂停\n    optional string fileId=8;//文件在服务器数据库中的唯一id\n    optional string file_name=9;//文件的名字\n    optional uint32 seek=10;//seek\n    optional uint32 mediaVolume=11;//音量\n    optional uint32 duration=12;//总长度 秒\n}\n\nmessage RCMusicSharedSendDataModelPdu {\n    optional uint32 item_idx=1;//唯一标识\n    optional uint32 owner=2;\n    optional uint32 from=3;\n    optional string file_type=4;\n    optional string creat_user_id=5;//创建文件userid\n    optional string url  =6;//文件地址\n    optional uint32 status=7;//状态0停止  1播放 2暂停\n    optional string fileId=8;//文件在服务器数据库中的唯一id\n    optional string file_name=9;//文件的名字\n    optional uint32 seek=10;//seek\n    optional uint32 musicVolume=11;//音量\n    optional uint32 duration=12;//总长度 秒\n\n}\n\nmessage RCDocBroadcastDataRequestPdu {\n    optional uint32 from_node_id = 1;//发起人\n    optional uint32 to_node_id = 2;//接收人,如果是0就是所有人都接收\n    optional uint32 actionType = 3;//消息指令类型;\n    optional bytes  data = 4;//其他数据,这个根据actionType来确定数据的结构\n}\n\nmessage RCGiftSendDataRequestPdu {\n    optional uint32 initiator = 1;\n    required uint32 peer = 2;\n    required uint32 index = 3;\n    required uint32 num = 4;\n    optional bytes user_data = 5;\n}\n\nmessage RCAudioSendDataRequestPdu1 {\n    optional uint32 initiator = 1;\n    required bytes user_data = 2;\n}\nmessage RCAudioSendDataRequestPdu {\n    required uint32 from_node_id = 1;//发起人\n    optional uint32 to_node_id = 2;//接收人,如果是0就是所有人都接收\n    optional uint32 actionType = 3;//消息指令类型;\n    optional bytes  data = 4;//其他数据,这个根据actionType来确定数据的结构\n}\n\nmessage RCVideoSendDataRequestPdu {\n    required uint32 from_node_id = 1;//发起人\n    optional uint32 to_node_id = 2;//接收人,如果是0就是所有人都接收\n    optional uint32 actionType = 3;//消息指令类型;\n    optional bytes  data = 4;//其他数据,这个根据actionType来确定数据的结构\n}\n\nmessage RCAudioChannelInfoRecordPdu {\n    required uint32 status = 1;\n    required uint32 device_id = 2;\n    required uint32 framerate = 3;\n    required uint32 bitrate = 4;\n    required uint32 codec = 5;\n}\nmessage RCAudioChannelInfoPdu {\n     optional uint32 status = 1;//开启的状态\n    optional uint32 channel_id = 2;//唯一的频道id\n    optional uint32 timestamp = 3;//更新的时间戳\n    optional uint32 from_node_id = 4;//发起者的id\n    optional uint32 to_node_id = 5;//接收者的id,(如果是0,所有人都接收)\n    optional uint32 media_type = 6;//媒体类型:视频(包含音频)或音频\n    optional uint32 class_id = 7;//课堂号\n    optional string site_id = 8;//站点号\n    optional string user_id = 9;//用户的userId\n    optional string stream_id = 10;//流名称\n    optional string user_name = 11;//用户的名字\n    optional string user_role = 12;//用户的身份\n    optional uint32 screenWidth = 13;//屏幕分辨率宽\n    optional uint32 screenHeight = 14;//屏幕分辨率高\n    optional uint32 deviceType = 15;//设备类型\n    optional string optionJsonData =16;//其他参数的json对象\n}\n\nmessage RCVideoChannelInfoPdu {\n    optional uint32 status = 1;//开启的状态\n    optional uint32 channel_id = 2;//唯一的频道id\n    optional uint32 timestamp = 3;//更新的时间戳\n    optional uint32 from_node_id = 4;//发起者的id\n    optional uint32 to_node_id = 5;//接收者的id,(如果是0,所有人都接收)\n    optional uint32 media_type = 6;//媒体类型:视频(包含音频)或音频\n    optional uint32 class_id = 7;//课堂号\n    optional string site_id = 8;//站点号\n    optional string user_id = 9;//用户的userId\n    optional string stream_id = 10;//流名称\n    optional string user_name = 11;//用户的名字\n    optional string user_role = 12;//用户的身份\n    optional uint32 screenWidth = 13;//屏幕分辨率宽\n    optional uint32 screenHeight = 14;//屏幕分辨率高\n    optional uint32 deviceType = 15;//设备类型\n    optional string optionJsonData =16;//其他参数的json对象\n}\n\nmessage RCVideoChannelInfoRecordPdu {\n    optional uint32 status = 1;\n    optional uint32 device_id = 2;\n    optional uint32 width = 3;\n    optional uint32 height = 4;\n    optional uint32 framerate = 5;\n    optional uint32 bitrate = 6;\n    optional uint32 codec = 7;\n    optional string peer_id = 8;\n    optional string url = 9;\n    optional uint32 type = 10;\n    optional string shamlive = 11;\n    optional uint32 livetype = 12;\n    optional uint32 releaseGrab = 13;\n    optional string curTime = 14;\n}\n\nmessage RCAudioDeviceInfoRecordPdu {\n    required uint32 device_id = 1;\n    required string device_name = 2;\n}\n\nmessage RCVideoDeviceInfoRecordPdu {\n    required uint32 device_id = 1;\n    required string device_name = 2;\n}\nmessage MsListItemPdu {\n    optional string ip = 1;\n    optional string port = 2;\n    optional string country = 3;\n    optional string province = 4;\n    optional string city = 5;\n    optional string name = 6;\n}\nmessage RCNodeInfoRecordPdu {\n    required uint32 node_id = 1;\n    required string name = 2;\n    required uint32 role = 3;\n    required uint32 level = 4;\n    repeated RCAudioDeviceInfoRecordPdu audio_records = 5;\n    repeated RCVideoDeviceInfoRecordPdu video_records = 6;\n    optional uint32 status = 7;\n    optional bytes user_data = 8;\n    optional string user_id = 9;\n    optional uint32 handUpTime = 10;\n    optional uint32 deviceType = 11;//设备类型,0:pc 1:ios  2:安卓\n    optional uint32 mobileDirection = 12;\n    repeated string microphones = 13;\n    repeated string cameras = 14;\n    optional uint32 openCamera=15;\n    optional uint32 openMicrophones=16;\n    optional uint32 videoQuality=17;//画质对应分辨率\n    optional string userIp=18;\n    optional uint32 curVideoQuality=19;\n    optional uint32 micGain=20;\n    optional uint32 speakerVolume=21;\n    optional uint32 micCode=22;\n    optional string curCamera=23;\n    optional string curMicrophone=24;\n    optional string country=25;\n    optional string city=26;\n    optional string province=27;\n    optional string isp=28;\n    repeated MsListItemPdu msList = 29;\n    optional string selfSilence = 30;\n    optional string msIpPort = 31;\n    optional string language = 32;//系统语言\n    optional string explorer = 33;//浏览器\n    optional string explorerVersion = 34;//浏览器版本\n    optional string os = 35;//系统版本\n    optional string sdkVersion = 36;//SDK版本\n    optional uint32 micNoise=37;\n    optional bool autoGain=38;\n}\n\nmessage RCVotingPollSettingsPdu {\n    required bool timer = 1;\n    optional uint32 time_limit = 2;\n    optional uint32 total_score = 3;\n}\n\nmessage RCVotingPollResultPdu {\n    required string title = 1;\n    required string content = 2;\n    optional uint32 score = 3;\n}\n\nmessage RCVotingPollQuestionPdu {\n    required uint32 index = 1;\n    required uint32 type = 2;\n    required string title = 3;\n    repeated string options = 4;\n    optional uint32 score = 5;\n    optional uint32 time_limit = 6;\n    optional string restrict_input = 7;\n    optional uint32 char_limit = 8;\n    optional string answer = 9;\n    repeated uint32 selections = 10;\n    repeated string responses = 11;\n}\n\nmessage RCVotingPollRecordPdu {\n    required RCVotingPollSettingsPdu settings = 1;\n    required string title = 2;\n    repeated RCVotingPollResultPdu results = 3;\n    repeated RCVotingPollQuestionPdu questions = 4;\n}\n\nmessage RCNodeInfoUserDataPdu {\n    optional string device = 1;//设备名称\n    optional bool has_camera = 2;//是否有摄像头可用\n    optional bool has_microphone = 3;//麦克风是否可用\n    optional string browser = 4;//浏览器\n    optional string qq = 5;//qq\n    optional string skype = 6;//skype\n}\n\nmessage RCTabUpdateDataRequestPdu {\n    optional uint32 id = 1;\n    optional bytes action = 2;\n    optional uint32 uncomprLen =3;\n}\n\nmessage RCWhiteBoardDataModelPdu {\n     required uint32 type= 1;//白板类型\n     required uint32 itemIdx= 2;//itemIdx 每一次绘制的唯一标识\n     required uint32 initiator=3; //绘制来自谁\n     required uint32 parentId=4; //父级的id\n     required uint32 cur_page_no= 5;//页码\n     optional string pointGroup=6; //坐标点集数组的JSON字符串\n     optional string color=7  [default = "#000000"]; //颜色\n     optional uint32 thickness= 8 ;//线条粗细\n     optional uint32 radius= 9;//园的半径\n     optional uint32 fontSize= 10;//字体大小\n     optional string fontName= 11;//字体名称\n     optional string text= 12;//文本内容\n     optional bytes data = 13;//暂时预留的参数\n}\n\nmessage RCCursorDataModelPdu {\n     required uint32 type= 1;//类型\n     required uint32 itemIdx= 2;//itemIdx 每一次绘制的唯一标识\n     required uint32 initiator=3; //绘制来自谁\n     required uint32 parentId=4; //父级的id\n     required uint32 cur_page_no= 5;//页码\n     optional string pointGroup=6; //坐标点集数组的JSON字符串\n     optional string color=7  [default = "#000000"]; //颜色\n     optional uint32 thickness= 8 ;//线条粗细\n     optional uint32 radius= 9;//园的半径\n     optional uint32 fontSize= 10;//字体大小\n     optional string fontName= 11;//字体名称\n     optional string text= 12;//文本内容\n     optional bytes data = 13;//暂时预留的参数\n     optional uint32 duration = 14; // 事件长度\n}\n\nmessage RCClassSendDataModelPdu {\n     optional uint32 item_idx=1;\n     optional uint32 from=2;\n     optional uint32 owner=3;\n     optional uint32 action_type=4;//状态改变的类型\n     optional RCClassStatusInfoPdu class_status_info=5;//当前课堂状态的信息\n}\nmessage RCClassStatusInfoPdu {\n     optional uint32 node_id=1;//mcu中的唯一ID\n     optional string user_id=2;\n     optional string user_name=3;\n     optional string site_id=4;//站点号\n     optional uint32 class_id=5;\n     optional string class_name=6;\n     required uint32 class_type=7;//课堂类型\n     required uint32 class_status=9;//课堂的状态\n     optional string class_startTime=10;//课堂点击开始时间\n     optional string class_stopTime=11;//最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳\n     optional uint32 class_timestamp=12;//相对于点开始课堂的时间戳\n     optional string class_beginTime=13;//课堂创建的时间,这个是Sass返回的\n     optional string class_endTime=14;//课堂结束的时间,这个是Sass返回的\n     optional bool record_status=15;//当前录制状态\n     optional uint32 record_timestamp=16;//相对于首次开始录制的时间戳\n     optional string record_fileName=17;//录制的文件名\n     optional string record_downloadUrl=18;//下载地址\n     optional uint32 server_timestamp=19;//当前的系统时间戳\n     optional uint32 active_doc_id=20;//当前激活的文档id\n     optional uint32 active_doc_cur_page=21;//当前激活的文档的当前页\n     optional bool isStopAllPublishMedia=22;//是否停止推流\n     optional uint32 currentSceneTableId=23;//文档区域的当前模块id\n     optional bool silence=24;//课堂禁言\n     optional string silenceUsers=25;//课堂用户禁言状态列表\n     optional bool isEnableDraw=26;//课堂用户是否开启绘制权限\n}\n\nmessage RCConferenceRecordRequestPdu {\n    \toptional uint32 initiator = 1;\t// 发起录像指令的node id\n\t\toptional bool record = 2;\t\t// 录像指令 true:开始录像, false:停止录像\n    \toptional uint32 class_time = 3;\t// 课堂进行时间(秒)\n\t\toptional string filename = 4;\t// 录像文件名称,filename中增加目录部分\n}\n\nmessage RCQuestionDataModelPdu {\n     optional uint32 item_idx=1;\n     optional uint32 from=2;\n     optional uint32 owner=3;\n     optional uint32 type=4;//类型\n     optional uint32 questionId=5;//题目id\n     optional uint32 timeLimit=6;//有效时间\n     optional string content=7;//题干\n     optional uint32 timestamp=8;//创建的时间\n     repeated string options=9;//选项列表\n     repeated uint32 answer=10;//用户选择的答案选项索引\n     repeated uint32 correct=11;//正确答案索引\n     repeated string totalUserList=12;//参与的人员userId列表\n}\n//end\n';
t.default=n,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"default","D:/work/McuClient/src/pdus/pro.js")}()},function(e,t,n){var r,a,o;(function(e){var n="function"==typeof Symbol&&"symbol"==i(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":i(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":i(e)};!function(i,s){"object"==n(t)&&"object"==n(e)?e.exports=s():(a=[],r=s,o="function"==typeof r?r.apply(t,a):r,!(void 0!==o&&(e.exports=o)))}(void 0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(2)},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e),this.MAPS={}}return i(e,[{key:"on",value:function(e,t){if(e&&t){var n=this.MAPS[e];if(!n)return this.MAPS[e]=[t];n.push(t)}}},{key:"off",value:function(e,t){if(e){var n=this.MAPS[e];if(n){if(t)return n.splice(n.indexOf(t),1);n.length=0}}}},{key:"emit",value:function(e,t){if(e){var n=this.MAPS["*"];n&&n.length&&n.forEach(function(n){n(e,t)});var i=this.MAPS[e];i&&i.length&&i.forEach(function(e){e(t)})}}}]),e}(),a=r;t.default=a,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"Emiter","D:/work/screenshare/src/Emiter.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/screenshare/src/Emiter.js"))}()},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e){var t,n,i,r;i=e.length,t=new Uint8Array(3*i);var a=0;for(n=0;n<i;n++)r=e.charCodeAt(n),r>=1&&r<=127?t[a++]=r:r>2047?(t[a++]=224|r>>12&15,t[a++]=128|r>>6&63,t[a++]=128|r>>0&63):(t[a++]=192|r>>6&31,t[a++]=128|r>>0&63);return new Uint8Array(t.buffer,0,a)}function a(e){var t,n,i,r,a,o;for(t="",i=e.length,n=0;n<i;)switch(r=e[n++],r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:t+=String.fromCharCode(r);break;case 12:case 13:a=e[n++],t+=String.fromCharCode((31&r)<<6|63&a);break;case 14:a=e[n++],o=e[n++],t+=String.fromCharCode((15&r)<<12|(63&a)<<6|(63&o)<<0)}return t}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=new Object;if(n.data_len=0,n.data="",n.name=e,"mov_start"==e)n.type=1;else if("mov_stop"==e)n.type=2;else if("mov_pause"==e){if(n.type=3,pos=t,pos.length>0){n.data_len=4;var i=new ArrayBuffer(n.data_len),a=new Uint32Array(i,0,1);a[0]=parseInt(pos),n.data=new Uint8Array(i,0,4)}}else if("mov_resume"==e)n.type=4;else if("mov_seek"==e){if(n.type=5,pos=t,pos.length>0){n.data_len=4;var i=new ArrayBuffer(n.data_len),a=new Uint32Array(i,0,1);a[0]=parseInt(pos),n.data=new Uint8Array(i,0,4)}}else if("ss_start"==e)n.type=6,n.data=r(t),n.data_len=n.data.length;else if("ss_stop"==e)n.type=7;else if("ss_version"==e)n.type=14;else if("get_mic"==e)n.type=26;else{if("ds_start"==e){n.type=27,n.data_len=536;var i=new ArrayBuffer(n.data_len),o=new Uint32Array(i,0,6);coordstr=t;var l=coordstr.split(",");if(4!=l.length)return;o[0]=parseInt(l[0]),o[1]=parseInt(l[1]),o[2]=parseInt(l[2]),o[3]=parseInt(l[3]);var u=new Uint8Array(i,24,256);window_name=t;for(var d=r(window_name),c=0;c<d.length;c++)u[c]=d[c];return o[4]=d.length,o[5]=0,new Uint8Array(i,280,256),n.data=new Uint8Array(i,0,n.data_len),void s(n)}if("ds_stop"==e)n.type=28;else{if("aud_start"==e){n.type=29,n.data_len=520;var i=new ArrayBuffer(n.data_len),f=new Uint32Array(i,0,1),h=t;f[0]=h.length;var p=new Uint32Array(i,4,1);p[0]=0;for(var _=new Uint8Array(i,8,256),g=r(h),c=0;c<g.length;c++)_[c]=g[c];return new Uint8Array(i,264,256),n.data=new Uint8Array(i,0,n.data_len),void s(n)}if("aud_stop"==e)n.type=30;else if("get_cam"==e)n.type=41;else{if("cam_start"==e){n.type=42,n.data_len=520;var i=new ArrayBuffer(n.data_len),m=new Uint32Array(i,0,1),v=t;m[0]=v.length;var p=new Uint32Array(i,4,1);p[0]=0;for(var y=new Uint8Array(i,8,256),E=r(v),c=0;c<E.length;c++)y[c]=E[c];return new Uint8Array(i,264,256),n.data=new Uint8Array(i,0,n.data_len),void s(n)}"cam_stop"==e?n.type=43:"set_videoparam"==e?(n.type=46,n.data=r(t),n.data_len=n.data.length):"get_videoparam"==e?(n.type=47,n.data=r(t),n.data_len=n.data.length):"start_record"==e?(n.type=48,n.data=r(t),n.data_len=n.data.length):"stop_record"==e?(n.type=49,n.data=r(t),n.data_len=n.data.length):"start_push"==e?(n.type=50,n.data=r(t),n.data_len=n.data.length):"stop_push"==e?(n.type=51,n.data=r(t),n.data_len=n.data.length):"get_rtmp_port"==e?n.type=52:"set_mic_vol"==e?(n.type=53,n.data=r(t),n.data_len=n.data.length):"get_mic_vol"==e&&(n.type=54)}}}s(n)}function s(e){var t=8+e.data_len,n=new ArrayBuffer(t),i=new Uint16Array(n,0,1),r=new Uint8Array(n,2,1),a=new Uint32Array(n,4,1);if(i[0]=e.type,r[0]=0,a[0]=e.data_len,e.data_len>0)for(var o=new Uint8Array(n,8,e.data_len),s=0;s<e.data_len;s++)o[s]=e.data[s];T&&T.send(n)}function l(){try{T&&(T.close(),T=T.onopen=T.onclose=T.onerror=T.onmessage=null,h.emit(h.CLOSE))}catch(e){console.log(e)}}function u(){l()}function d(){T&&l(),T=new WebSocket(b),w=setTimeout(function(){clearTimeout(w),l()},1500),T.timeout=1500,T.binaryType="arraybuffer",T.onopen=function(){clearTimeout(w),o("get_rtmp_port"),o("get_mic"),o("get_cam"),o("get_mic_vol"),h.emit(h.OPEN)},T.onclose=function(){l()},T.onerror=function(){l()},T.onmessage=function(e){var t=e.data;if("string"==typeof e.data)console.log("on message [string] ignore.");else{var n=new DataView(t),i=n.getUint16(0,!0);console.log("onmessage code->",i);var r=(n.getUint8(2,!0),n.getUint32(4,!0));if(i>=0&&i<p.length&&p[i],0==i||6==i||8==i)console.log("mov_start,mov_pause,mov_seek success");else if(10==i){if(r>36){var o=new Uint32Array(t,8,8),s="width:"+o[0]+" height:"+o[1];s="framerate:"+o[2]+" duration:"+o[3],s="playpos:"+o[4]+" filesize:"+o[5],_=s;var l=o[6],u=new Uint8Array(t,40,l),d=a(u);_.filename=d,h.emit(h.MOVIE_INFO_CHANGE,_)}}else if(11==i)console.log("ss_start success"),h.emit(h.SS_START);else if(24<=i&&26>=i){if(r>=4){var c=n.getUint32(8,!0);g=c.toString(),h.emit(h.VERSION_INFO_CHANGE,g)}}else if(55==i)console.log("ds_start success");else if(59==i)console.log("as start success");else if(83==i){if(console.log("get camera sucess"),r>4){var f=n.getUint32(8,!0),T=12;m.length=0;for(var C=0;C<f;C++){var R=n.getUint32(T,!0);T+=4;var b=new Uint8Array(t,T,R-1);T+=R;var w=a(b);m.push(w)}h.emit(h.CAMERA_INFO_CHANGE,m)}}else if(53==i){if(r>4){var A=n.getUint32(8,!0),T=12;v.length=0;for(var C=0;C<A;C++){var I=n.getUint32(T,!0);T+=4;var P=new Uint8Array(t,T,I-1);T+=I;var w=a(P);v.push(w)}h.emit(h.MIC_INFO_CHANGE,v)}}else if(85==i)console.log("cam_share success");else if(95==i){console.log("get_videoparam success");var O=new Uint8Array(t,8,t.byteLength-8-1),w=a(O);y=w,h.emit(h.VIDEO_INFO_CHANGE,y)}else if(105==i){console.log("get_rtmp_port_success");var O=new Uint8Array(t,8,t.byteLength-8-1),w=a(O);E=w,h.emit(h.RTMP_PORT_CHANGE,E)}else if(109==i){console.log("get_mic_vol success");var O=new Uint8Array(t,8,t.byteLength-8-1),w=a(O);S=w,h.emit(h.MIC_VOL_CHANGE,S)}else if(111<=i&&114>=i){var O=new Uint8Array(t,8,t.byteLength-8),D=a(O);console.log("url->",D)}else if(13==i)h.emit(h.SS_STOP);else{var O=new Uint8Array(t,8,t.byteLength-8),w=a(O);console.log("data ->",w)}}}}Object.defineProperty(t,"__esModule",{value:!0});var c=n(1),f=i(c),h=new f.default,p=["MOV_START_SUC","MOV_START_FAIL","MOV_STOP_SUC","MOV_STOP_FAIL","MOV_PAUSE_SUC","MOV_PAUSE_FAIL","MOV_RESUME_SUC","MOV_RESUME_FAIL","MOV_SEEK_SUC","MOV_SEEK_FAIL","MOV_PROPERTY","SS_START_SUC","SS_START_FAIL","SS_STOP_SUC","SS_STOP_FAIL","REC_START_SUC","REC_START_FAIL","REC_STOP_SUC","REC_STOP_FAIL","REC_PAUSE_SUC","REC_PAUSE_FAIL","REC_RESUME_SUC","REC_RESUME_FAIL","MOV_PLAY_FINISH","MOV_VERSION","SS_VERSION","REC_VERSION","MOV_SELECT_FILE_CANCEL","QAV_LOGIN_SUC","QAV_LOGIN_FAIL","QAV_LOGOUT_SUC","QAV_LOGOUT_FAIL","QAV_ENTERROOM_SUC","QAV_ENTERROOM_FAIL","QAV_LEAVEROOM_SUC","QAV_LEAVEROOM_FAIL","QAV_OPEN_MIC_SUC","QAV_OPEN_MIC_FAIL","QAV_OPEN_MIC_NODEV","QAV_CLOSE_MIC_SUC","QAV_CLOSE_MIC_FAIL","QAV_CLOSE_MIC_NODEV","QAV_OPEN_PLAYER_SUC","QAV_OPEN_PLAYER_FAIL","QAV_OPEN_PLAYER_NODEV","QAV_CLOSE_PLAYER_SUC","QAV_CLOSE_PLAYER_FAIL","QAV_CLOSE_PLAYER_NODEV","QAV_MUTE_AUDIO_SUC","QAV_MUTE_AUDIO_FAIL","QAV_UNMUTE_AUDIO_SUC","QAV_UNMUTE_AUDIO_FAIL","REC_SAVE_FILE_CANCEL","GET_MIC_SUC","GET_MIC_FAIL","DS_START_SUC","DS_START_FAIL","DS_STOP_SUC","DS_STOP_FAIL","AUD_START_SUC","AUD_START_FAIL","AUD_STOP_SUC","AUD_STOP_FAIL","AUD_DATA","SS_DATA","MOV_DATA","PEN_START_SUC","PEN_START_FAIL","PEN_STOP_SUC","PEN_STOP_FAIL","PEN_VERSION","QAV_DEVICE_SUC","QAV_DEVICE_FAIL","CBD_QUERY_SUC","CBD_QUERY_FAIL","CBD_GET_SUC","CBD_GET_FAIL","FILE_GET_SUC","FILE_GET_FAIL","FILE_SET_SUC","FILE_SET_FAIL","RESTART_SUC","RESTART_FAIL","GET_CAM_SUC","GET_CAM_FAIL","CAM_START_SUC","CAM_START_FAIL","CAM_STOP_SUC","CAM_STOP_FAIL","SWITCH_SCENE_SUC","SWITCH_SCENE_FAIL","PUSH_STREAM_FAIL","SHOW_UI_SUC","SET_VIDEO_PARAM_SUC","SET_VIDEO_PARAM_FAIL","GET_VIDEO_PARAM_SUC","GET_VIDEO_PARAM_FAIL","START_RECORD_SUC","START_RECORD_FAIL","STOP_RECORD_SUC","STOP_RECORD_FAIL","START_PUSH_SUC","START_PUSH_FAIL","STOP_PUSH_SUC","STOP_PUSH_FAIL","GET_RTMP_PORT_SUC","GET_RTMP_PORT_FAIL","SET_MIC_VOL_SUC","SET_MIC_VOL_FAIL","GET_MIC_VOL_SUC","GET_MIC_VOL_FAIL","RTMP_CONNECTING","RTMP_CONNECT_SUC","RTMP_CONNECT_FAIL","RTMP_CONNECT_CLOSED"],_=null,g="",m=[],v=[],y="",E="",S="",T=null,C="127.0.0.1",R=8090,b="ws://127.0.0.1:8090",w=0;h.infos={movieInfo:_,versionInfo:g,cameraInfo:m,micInfo:v,videoInfo:y,rtmpPort:E,micVol:S},h.MOVIE_INFO_CHANGE="MOVIE_INFO_CHANGE",h.VERSION_INFO_CHANGE="VERSION_INFO_CHANGE",h.CAMERA_INFO_CHANGE="CAMERA_INFO_CHANGE",h.MIC_INFO_CHANGE="MIC_INFO_CHANGE",h.VIDEO_INFO_CHANGE="VIDEO_INFO_CHANGE",h.RTMP_PORT_CHANGE="RTMP_PORT_CHANGE",h.MIC_VOL_CHANGE="MIC_VOL_CHANGE",h.SS_START="SS_START",h.SS_STOP="SS_STOP",h.OPEN="OPEN",h.CLOSE="CLOSE",h.ERROR="ERROR",h.getRTMPPort=function(){o("get_rtmp_port")},h.getMicInfo=function(){o("get_mic")},h.getCamInfo=function(){o("get_cam")},h.getMicVol=function(){o("get_mic_vol")},h.start=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"127.0.0.1",t=arguments[1];C=e,R=t,d()},h.startConnect=function(e){b=e,d()},h.stop=function(){u()},h.startShareScreen=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";o("ss_start",e)},h.stopShareScreen=function(){o("ss_stop")};var A=h;t.default=A,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(h,"e","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(r,"utf16to8","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(a,"utf8to16","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(p,"CODE","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(o,"sendCommand","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(s,"_sendCommand","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(_,"movieInfo","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(g,"versionInfo","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(m,"cameraInfo","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(v,"micInfo","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(y,"videoInfo","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(E,"rtmpPort","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(S,"micVol","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(T,"ws","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(C,"host","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(R,"port","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(b,"fullUrl","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(w,"wstimer","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(l,"clear","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(u,"stop","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(d,"start","D:/work/screenshare/src/main.js"),__REACT_HOT_LOADER__.register(A,"default","D:/work/screenshare/src/main.js"))}()}])}),function(){"undefined"==typeof __REACT_HOT_LOADER__}()}).call(t,n(9)(e))},function(e,t){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,i=0;n<e.length;n++,i+=8)t[i>>>5]|=e[n]<<24-i%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],i=0;i<e.length;i+=3)for(var r=e[i]<<16|e[i+1]<<8|e[i+2],a=0;a<4;a++)8*i+6*a<=8*e.length?n.push(t.charAt(r>>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],i=0,r=0;i<e.length;r=++i%4)0!=r&&n.push((t.indexOf(e.charAt(i-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(i))>>>6-2*r);return n}};e.exports=n}()},function(e,t,n){var r;(function(e,a,o){(function(){function s(e){return"function"==typeof e||"object"==("undefined"==typeof e?"undefined":i(e))&&null!==e}function l(e){return"function"==typeof e}function u(e){X=e}function d(e){te=e}function c(){return function(){e.nextTick(g)}}function f(){return function(){z(g)}}function h(){var e=0,t=new re(g),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function p(){var e=new MessageChannel;return e.port1.onmessage=g,function(){e.port2.postMessage(0)}}function _(){return function(){setTimeout(g,1)}}function g(){for(var e=0;e<ee;e+=2){var t=se[e],n=se[e+1];t(n),se[e]=void 0,se[e+1]=void 0}ee=0}function m(){try{var e=n(63);return z=e.runOnLoop||e.runOnContext,f()}catch(e){return _()}}function v(e,t){var n=this,i=new this.constructor(E);void 0===i[de]&&B(i);var r=n._state;if(r){var a=arguments[r-1];te(function(){x(r,i,a,n._result)})}else k(n,i,e,t);return i}function y(e){var t=this;if(e&&"object"==("undefined"==typeof e?"undefined":i(e))&&e.constructor===t)return e;var n=new t(E);return I(n,e),n}function E(){}function S(){return new TypeError("You cannot resolve a promise with itself")}function T(){return new TypeError("A promises callback cannot return that same promise.")}function C(e){try{return e.then}catch(e){return pe.error=e,pe}}function R(e,t,n,i){try{e.call(t,n,i)}catch(e){return e}}function b(e,t,n){te(function(e){var i=!1,r=R(n,t,function(n){i||(i=!0,t!==n?I(e,n):O(e,n))},function(t){i||(i=!0,D(e,t))},"Settle: "+(e._label||" unknown promise"));!i&&r&&(i=!0,D(e,r))},e)}function w(e,t){t._state===fe?O(e,t._result):t._state===he?D(e,t._result):k(t,void 0,function(t){I(e,t)},function(t){D(e,t)})}function A(e,t,n){t.constructor===e.constructor&&n===le&&constructor.resolve===ue?w(e,t):n===pe?D(e,pe.error):void 0===n?O(e,t):l(n)?b(e,t,n):O(e,t)}function I(e,t){e===t?D(e,S()):s(t)?A(e,t,C(t)):O(e,t)}function P(e){e._onerror&&e._onerror(e._result),L(e)}function O(e,t){e._state===ce&&(e._result=t,e._state=fe,0!==e._subscribers.length&&te(L,e))}function D(e,t){e._state===ce&&(e._state=he,e._result=t,te(P,e))}function k(e,t,n,i){var r=e._subscribers,a=r.length;e._onerror=null,r[a]=t,r[a+fe]=n,r[a+he]=i,0===a&&e._state&&te(L,e)}function L(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i,r,a=e._result,o=0;o<t.length;o+=3)i=t[o],r=t[o+n],i?x(n,i,r,a):r(a);e._subscribers.length=0}}function N(){this.error=null}function M(e,t){try{return e(t)}catch(e){return _e.error=e,_e}}function x(e,t,n,i){var r,a,o,s,u=l(n);if(u){if(r=M(n,i),r===_e?(s=!0,a=r.error,r=null):o=!0,t===r)return void D(t,T())}else r=i,o=!0;t._state!==ce||(u&&o?I(t,r):s?D(t,a):e===fe?O(t,r):e===he&&D(t,r))}function U(e,t){try{t(function(t){I(e,t)},function(t){D(e,t)})}catch(t){D(e,t)}}function H(){return ge++}function B(e){e[de]=ge++,e._state=void 0,e._result=void 0,e._subscribers=[]}function F(e){return new Se(this,e).promise}function j(e){var t=this;return new t($(e)?function(n,i){for(var r=e.length,a=0;a<r;a++)t.resolve(e[a]).then(n,i)}:function(e,t){t(new TypeError("You must pass an array to race."))})}function G(e){var t=this,n=new t(E);return D(n,e),n}function V(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function W(e){this[de]=H(),this._result=this._state=void 0,this._subscribers=[],E!==e&&("function"!=typeof e&&V(),this instanceof W?U(this,e):q())}function Y(e,t){this._instanceConstructor=e,this.promise=new e(E),this.promise[de]||B(this.promise),$(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?O(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&O(this.promise,this._result))):D(this.promise,J())}function J(){return new Error("Array Methods must be provided an Array")}function Q(){var e;if("undefined"!=typeof a)e=a;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;t&&"[object Promise]"===Object.prototype.toString.call(t.resolve())&&!t.cast||(e.Promise=Ee)}var K;K=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var z,X,Z,$=K,ee=0,te=function(e,t){se[ee]=e,se[ee+1]=t,ee+=2,2===ee&&(X?X(g):Z())},ne="undefined"!=typeof window?window:void 0,ie=ne||{},re=ie.MutationObserver||ie.WebKitMutationObserver,ae="undefined"==typeof self&&"undefined"!=typeof e&&"[object process]"==={}.toString.call(e),oe="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,se=new Array(1e3);Z=ae?c():re?h():oe?p():void 0===ne?m():_();var le=v,ue=y,de=Math.random().toString(36).substring(16),ce=void 0,fe=1,he=2,pe=new N,_e=new N,ge=0,me=F,ve=j,ye=G,Ee=W;W.all=me,W.race=ve,W.resolve=ue,W.reject=ye,W._setScheduler=u,W._setAsap=d,W._asap=te,W.prototype={constructor:W,then:le,catch:function(e){return this.then(null,e)}};var Se=Y;Y.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ce&&n<e;n++)this._eachEntry(t[n],n)},Y.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve;if(i===ue){var r=C(e);if(r===le&&e._state!==ce)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(n===Ee){var a=new n(E);A(a,e,r),this._willSettleAt(a,t)}else this._willSettleAt(new n(function(t){t(e)}),t)}else this._willSettleAt(i(e),t)},Y.prototype._settledAt=function(e,t,n){var i=this.promise;i._state===ce&&(this._remaining--,e===he?D(i,n):this._result[t]=n),0===this._remaining&&O(i,this._result)},Y.prototype._willSettleAt=function(e,t){var n=this;k(e,void 0,function(e){n._settledAt(fe,t,e)},function(e){n._settledAt(he,t,e)})};var Te=Q,Ce={Promise:Ee,polyfill:Te};n(13).amd?(r=function(){return Ce}.call(t,n,t,o),!(void 0!==r&&(o.exports=r))):"undefined"!=typeof o&&o.exports?o.exports=Ce:"undefined"!=typeof this&&(this.ES6Promise=Ce),Te()}).call(this)}).call(t,n(27),function(){return this}(),n(9)(e))},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}e.exports=function(e){return null!=e&&(n(e)||i(e)||!!e._isBuffer)}},function(e,t,n){var r,a,o;!function(i){n(28)&&n(28).jQuery?(a=[n(33)],r=i,o="function"==typeof r?r.apply(t,a):r,!(void 0!==o&&(e.exports=o))):i("undefined"!=typeof e&&e.exports?n(33):jQuery)}(function(e){function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=c),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each(function(){var i=e(this),r=i.data(P);r||(r=new n(this,t),i.data(P,r))})}function n(t,n){function r(t){if(!(de()||e(t.target).closest(n.excludedElements,We).length>0)){var i,r=t.originalEvent?t.originalEvent:t,a=r.touches,o=a?a[0]:r;return Ye=T,a?Je=a.length:n.preventDefaultEvents!==!1&&t.preventDefault(),Me=0,xe=null,Ue=null,Ve=null,He=0,Be=0,Fe=0,je=1,Ge=0,qe=me(),le(),fe(0,o),!a||Je===n.fingers||n.fingers===E||q()?(Ke=we(),2==Je&&(fe(1,a[1]),Be=Fe=Ee(Qe[0].start,Qe[1].start)),(n.swipeStatus||n.pinchStatus)&&(i=x(r,Ye))):i=!1,i===!1?(Ye=b,x(r,Ye),i):(n.hold&&(tt=setTimeout(e.proxy(function(){We.trigger("hold",[r.target]),n.hold&&(i=n.hold.call(We,r,r.target))},this),n.longTapThreshold)),ce(!0),null)}}function O(e){var t=e.originalEvent?e.originalEvent:e;if(Ye!==R&&Ye!==b&&!ue()){var i,r=t.touches,a=r?r[0]:t,o=he(a);if(ze=we(),r&&(Je=r.length),n.hold&&clearTimeout(tt),Ye=C,2==Je&&(0==Be?(fe(1,r[1]),Be=Fe=Ee(Qe[0].start,Qe[1].start)):(he(r[1]),Fe=Ee(Qe[0].end,Qe[1].end),Ve=Te(Qe[0].end,Qe[1].end)),je=Se(Be,Fe),Ge=Math.abs(Be-Fe)),Je===n.fingers||n.fingers===E||!r||q()){if(xe=be(o.start,o.end),Ue=be(o.last,o.end),G(e,Ue),Me=Ce(o.start,o.end),He=ye(),_e(xe,Me),i=x(t,Ye),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var s=!0;if(n.triggerOnTouchLeave){var l=Ae(this);s=Ie(o.end,l)}!n.triggerOnTouchEnd&&s?Ye=M(C):n.triggerOnTouchLeave&&!s&&(Ye=M(R)),Ye!=b&&Ye!=R||x(t,Ye)}}else Ye=b,x(t,Ye);i===!1&&(Ye=b,x(t,Ye))}}function D(e){var t=e.originalEvent?e.originalEvent:e,i=t.touches;if(i){if(i.length&&!ue())return se(t),!0;if(i.length&&ue())return!0}return ue()&&(Je=Ze),ze=we(),He=ye(),B()||!H()?(Ye=b,x(t,Ye)):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&Ye===C?(n.preventDefaultEvents!==!1&&e.preventDefault(),Ye=R,x(t,Ye)):!n.triggerOnTouchEnd&&X()?(Ye=R,U(t,Ye,_)):Ye===C&&(Ye=b,x(t,Ye)),ce(!1),null}function k(){Je=0,ze=0,Ke=0,Be=0,Fe=0,je=1,le(),ce(!1)}function L(e){var t=e.originalEvent?e.originalEvent:e;n.triggerOnTouchLeave&&(Ye=M(R),x(t,Ye))}function N(){We.unbind(Oe,r),We.unbind(Ne,k),We.unbind(De,O),We.unbind(ke,D),Le&&We.unbind(Le,L),ce(!1)}function M(e){var t=e,i=j(),r=H(),a=B();return!i||a?t=b:!r||e!=C||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!r&&e==R&&n.triggerOnTouchLeave&&(t=b):t=R,t}function x(e,t){var n,i=e.touches;return(Q()||J())&&(n=U(e,t,h)),(W()||q())&&n!==!1&&(n=U(e,t,p)),ae()&&n!==!1?n=U(e,t,g):oe()&&n!==!1?n=U(e,t,m):re()&&n!==!1&&(n=U(e,t,_)),t===b&&(J()&&(n=U(e,t,h)),q()&&(n=U(e,t,p)),k(e)),t===R&&(i?i.length||k(e):k(e)),n}function U(t,i,r){var c;if(r==h){if(We.trigger("swipeStatus",[i,xe||null,Me||0,He||0,Je,Qe,Ue]),n.swipeStatus&&(c=n.swipeStatus.call(We,t,i,xe||null,Me||0,He||0,Je,Qe,Ue),c===!1))return!1;if(i==R&&Y()){if(clearTimeout(et),clearTimeout(tt),We.trigger("swipe",[xe,Me,He,Je,Qe,Ue]),n.swipe&&(c=n.swipe.call(We,t,xe,Me,He,Je,Qe,Ue),c===!1))return!1;switch(xe){case a:We.trigger("swipeLeft",[xe,Me,He,Je,Qe,Ue]),n.swipeLeft&&(c=n.swipeLeft.call(We,t,xe,Me,He,Je,Qe,Ue));break;case o:We.trigger("swipeRight",[xe,Me,He,Je,Qe,Ue]),n.swipeRight&&(c=n.swipeRight.call(We,t,xe,Me,He,Je,Qe,Ue));break;case s:We.trigger("swipeUp",[xe,Me,He,Je,Qe,Ue]),n.swipeUp&&(c=n.swipeUp.call(We,t,xe,Me,He,Je,Qe,Ue));break;case l:We.trigger("swipeDown",[xe,Me,He,Je,Qe,Ue]),n.swipeDown&&(c=n.swipeDown.call(We,t,xe,Me,He,Je,Qe,Ue))}}}if(r==p){if(We.trigger("pinchStatus",[i,Ve||null,Ge||0,He||0,Je,je,Qe]),n.pinchStatus&&(c=n.pinchStatus.call(We,t,i,Ve||null,Ge||0,He||0,Je,je,Qe),c===!1))return!1;if(i==R&&V())switch(Ve){case u:We.trigger("pinchIn",[Ve||null,Ge||0,He||0,Je,je,Qe]),n.pinchIn&&(c=n.pinchIn.call(We,t,Ve||null,Ge||0,He||0,Je,je,Qe));break;case d:We.trigger("pinchOut",[Ve||null,Ge||0,He||0,Je,je,Qe]),n.pinchOut&&(c=n.pinchOut.call(We,t,Ve||null,Ge||0,He||0,Je,je,Qe))}}return r==_?i!==b&&i!==R||(clearTimeout(et),clearTimeout(tt),Z()&&!te()?($e=we(),et=setTimeout(e.proxy(function(){$e=null,We.trigger("tap",[t.target]),n.tap&&(c=n.tap.call(We,t,t.target))},this),n.doubleTapThreshold)):($e=null,We.trigger("tap",[t.target]),n.tap&&(c=n.tap.call(We,t,t.target)))):r==g?i!==b&&i!==R||(clearTimeout(et),clearTimeout(tt),$e=null,We.trigger("doubletap",[t.target]),n.doubleTap&&(c=n.doubleTap.call(We,t,t.target))):r==m&&(i!==b&&i!==R||(clearTimeout(et),$e=null,We.trigger("longtap",[t.target]),n.longTap&&(c=n.longTap.call(We,t,t.target)))),c}function H(){var e=!0;return null!==n.threshold&&(e=Me>=n.threshold),e}function B(){var e=!1;return null!==n.cancelThreshold&&null!==xe&&(e=ge(xe)-Me>=n.cancelThreshold),e}function F(){return null===n.pinchThreshold||Ge>=n.pinchThreshold}function j(){var e;return e=!(n.maxTimeThreshold&&He>=n.maxTimeThreshold)}function G(e,t){if(n.preventDefaultEvents!==!1)if(n.allowPageScroll===c)e.preventDefault();else{var i=n.allowPageScroll===f;switch(t){case a:(n.swipeLeft&&i||!i&&n.allowPageScroll!=v)&&e.preventDefault();break;case o:(n.swipeRight&&i||!i&&n.allowPageScroll!=v)&&e.preventDefault();break;case s:(n.swipeUp&&i||!i&&n.allowPageScroll!=y)&&e.preventDefault();break;case l:(n.swipeDown&&i||!i&&n.allowPageScroll!=y)&&e.preventDefault()}}}function V(){var e=K(),t=z(),n=F();return e&&t&&n}function q(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function W(){return!(!V()||!q())}function Y(){var e=j(),t=H(),n=K(),i=z(),r=B(),a=!r&&i&&n&&t&&e;return a}function J(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function Q(){return!(!Y()||!J())}function K(){return Je===n.fingers||n.fingers===E||!w}function z(){return 0!==Qe[0].end.x}function X(){return!!n.tap}function Z(){return!!n.doubleTap}function $(){return!!n.longTap}function ee(){if(null==$e)return!1;var e=we();return Z()&&e-$e<=n.doubleTapThreshold}function te(){return ee()}function ne(){return(1===Je||!w)&&(isNaN(Me)||Me<n.threshold)}function ie(){return He>n.longTapThreshold&&Me<S}function re(){return!(!ne()||!X())}function ae(){return!(!ee()||!Z())}function oe(){return!(!ie()||!$())}function se(e){Xe=we(),Ze=e.touches.length+1}function le(){Xe=0,Ze=0}function ue(){var e=!1;if(Xe){var t=we()-Xe;t<=n.fingerReleaseThreshold&&(e=!0)}return e}function de(){return!(We.data(P+"_intouch")!==!0)}function ce(e){We&&(e===!0?(We.bind(De,O),We.bind(ke,D),Le&&We.bind(Le,L)):(We.unbind(De,O,!1),We.unbind(ke,D,!1),Le&&We.unbind(Le,L,!1)),We.data(P+"_intouch",e===!0))}function fe(e,t){var n={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return n.start.x=n.last.x=n.end.x=t.pageX||t.clientX,n.start.y=n.last.y=n.end.y=t.pageY||t.clientY,Qe[e]=n,n}function he(e){var t=void 0!==e.identifier?e.identifier:0,n=pe(t);return null===n&&(n=fe(t,e)),n.last.x=n.end.x,n.last.y=n.end.y,n.end.x=e.pageX||e.clientX,n.end.y=e.pageY||e.clientY,n}function pe(e){return Qe[e]||null}function _e(e,t){t=Math.max(t,ge(e)),qe[e].distance=t}function ge(e){if(qe[e])return qe[e].distance}function me(){var e={};return e[a]=ve(a),e[o]=ve(o),e[s]=ve(s),e[l]=ve(l),e}function ve(e){return{direction:e,distance:0}}function ye(){return ze-Ke}function Ee(e,t){var n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+i*i))}function Se(e,t){var n=t/e*1;return n.toFixed(2)}function Te(){return je<1?d:u}function Ce(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}function Re(e,t){var n=e.x-t.x,i=t.y-e.y,r=Math.atan2(i,n),a=Math.round(180*r/Math.PI);return a<0&&(a=360-Math.abs(a)),a}function be(e,t){var n=Re(e,t);return n<=45&&n>=0?a:n<=360&&n>=315?a:n>=135&&n<=225?o:n>45&&n<135?l:s}function we(){var e=new Date;return e.getTime()}function Ae(t){t=e(t);var n=t.offset(),i={left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()};return i}function Ie(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}var n=e.extend({},n),Pe=w||I||!n.fallbackToMouseEvents,Oe=Pe?I?A?"MSPointerDown":"pointerdown":"touchstart":"mousedown",De=Pe?I?A?"MSPointerMove":"pointermove":"touchmove":"mousemove",ke=Pe?I?A?"MSPointerUp":"pointerup":"touchend":"mouseup",Le=Pe?I?"mouseleave":null:"mouseleave",Ne=I?A?"MSPointerCancel":"pointercancel":"touchcancel",Me=0,xe=null,Ue=null,He=0,Be=0,Fe=0,je=1,Ge=0,Ve=0,qe=null,We=e(t),Ye="start",Je=0,Qe={},Ke=0,ze=0,Xe=0,Ze=0,$e=0,et=null,tt=null;try{We.bind(Oe,r),We.bind(Ne,k)}catch(t){e.error("events not supported "+Oe+","+Ne+" on jQuery.swipe")}this.enable=function(){return We.bind(Oe,r),We.bind(Ne,k),We},this.disable=function(){return N(),We},this.destroy=function(){N(),We.data(P,null),We=null},this.option=function(t,r){if("object"==("undefined"==typeof t?"undefined":i(t)))n=e.extend(n,t);else if(void 0!==n[t]){if(void 0===r)return n[t];n[t]=r}else{if(!t)return n;e.error("Option "+t+" does not exist on jQuery.swipe.options")}return null}}var r="1.6.15",a="left",o="right",s="up",l="down",u="in",d="out",c="none",f="auto",h="swipe",p="pinch",_="tap",g="doubletap",m="longtap",v="horizontal",y="vertical",E="all",S=10,T="start",C="move",R="end",b="cancel",w="ontouchstart"in window,A=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!w,I=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!w,P="TouchSwipe",O={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!0};e.fn.swipe=function(n){var r=e(this),a=r.data(P);if(a&&"string"==typeof n){if(a[n])return a[n].apply(this,Array.prototype.slice.call(arguments,1));e.error("Method "+n+" does not exist on jQuery.swipe")}else if(a&&"object"==("undefined"==typeof n?"undefined":i(n)))a.option.apply(this,arguments);else if(!(a||"object"!=("undefined"==typeof n?"undefined":i(n))&&n))return t.apply(this,arguments);return r},e.fn.swipe.version=r,e.fn.swipe.defaults=O,e.fn.swipe.phases={PHASE_START:T,PHASE_MOVE:C,PHASE_END:R,PHASE_CANCEL:b},e.fn.swipe.directions={LEFT:a,RIGHT:o,UP:s,DOWN:l,IN:u,OUT:d},e.fn.swipe.pageScroll={NONE:c,HORIZONTAL:v,VERTICAL:y,AUTO:f},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:E}})},function(e,t){var n=Math.max(document.documentElement.clientWidth,window.innerWidth||0),i={mobile:768,tablet:992,medium:1200},r=navigator.userAgent,a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i;e.exports={isMobileUA:function(){return a.test(r)},isIOS:function(){return/iphone|ipad|ipod/i.test(r)},isAndroid:function(){return/android/i.test(r)},isWechat:function(){return/micromessenger/i.test(r)},isWechatAndroid:function(){return isWechat()&&isAndroid()},isWechatIOS:function(){
return isWechat()&&isIOS()},isMobileView:function(){return n<i.mobile},isTabletView:function(){return n<i.tablet&&n>=i.mobile},isMediumView:function(){return n<i.medium&&n>=i.tablet},isLargeView:function(){return n>=i.medium},isRetina:function(){return window.devicePixelRatio>=2},isHighResolution:function(){return window.devicePixelRatio>=1.5}}},function(e,t,n){var r,a,o;(function(e,s){!function(e,l){n(13).amd?(a=[n(29)],r=l,o="function"==typeof r?r.apply(t,a):r,!(void 0!==o&&(s.exports=o))):"object"==("undefined"==typeof s?"undefined":i(s))&&s&&s.exports?s.exports=l(n(29),!0):(e.dcodeIO=e.dcodeIO||{}).ProtoBuf=l(e.dcodeIO.ByteBuffer)}(this,function(t,r){var a={};return a.ByteBuffer=t,a.Long=t.Long||null,a.VERSION="5.0.1",a.WIRE_TYPES={},a.WIRE_TYPES.VARINT=0,a.WIRE_TYPES.BITS64=1,a.WIRE_TYPES.LDELIM=2,a.WIRE_TYPES.STARTGROUP=3,a.WIRE_TYPES.ENDGROUP=4,a.WIRE_TYPES.BITS32=5,a.PACKABLE_WIRE_TYPES=[a.WIRE_TYPES.VARINT,a.WIRE_TYPES.BITS64,a.WIRE_TYPES.BITS32],a.TYPES={int32:{name:"int32",wireType:a.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:a.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:a.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:a.WIRE_TYPES.VARINT,defaultValue:a.Long?a.Long.ZERO:void 0},uint64:{name:"uint64",wireType:a.WIRE_TYPES.VARINT,defaultValue:a.Long?a.Long.UZERO:void 0},sint64:{name:"sint64",wireType:a.WIRE_TYPES.VARINT,defaultValue:a.Long?a.Long.ZERO:void 0},bool:{name:"bool",wireType:a.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:a.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:a.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:a.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:a.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:a.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:a.WIRE_TYPES.BITS64,defaultValue:a.Long?a.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:a.WIRE_TYPES.BITS64,defaultValue:a.Long?a.Long.ZERO:void 0},float:{name:"float",wireType:a.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:a.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:a.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:a.WIRE_TYPES.STARTGROUP,defaultValue:null}},a.MAP_KEY_TYPES=[a.TYPES.int32,a.TYPES.sint32,a.TYPES.sfixed32,a.TYPES.uint32,a.TYPES.fixed32,a.TYPES.int64,a.TYPES.sint64,a.TYPES.sfixed64,a.TYPES.uint64,a.TYPES.fixed64,a.TYPES.bool,a.TYPES.string,a.TYPES.bytes],a.ID_MIN=1,a.ID_MAX=536870911,a.convertFieldsToCamelCase=!1,a.populateAccessors=!0,a.populateDefaults=!0,a.Util=function(){var t={};return t.IS_NODE=!("object"!=("undefined"==typeof e?"undefined":i(e))||e+""!="[object process]"||e.browser),t.XHR=function(){for(var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=null,n=0;n<e.length;n++){try{t=e[n]()}catch(e){continue}break}if(!t)throw Error("XMLHttpRequest is not supported");return t},t.fetch=function(e,i){if(i&&"function"!=typeof i&&(i=null),t.IS_NODE){var r=n(64);if(i)r.readFile(e,function(e,t){i(e?null:""+t)});else try{return r.readFileSync(e)}catch(e){return null}}else{var a=t.XHR();if(a.open("GET",e,!!i),a.setRequestHeader("Accept","text/plain"),"function"==typeof a.overrideMimeType&&a.overrideMimeType("text/plain"),!i)return a.send(null),200==a.status||0==a.status&&"string"==typeof a.responseText?a.responseText:null;if(a.onreadystatechange=function(){4==a.readyState&&i(200==a.status||0==a.status&&"string"==typeof a.responseText?a.responseText:null)},4==a.readyState)return;a.send(null)}},t.toCamelCase=function(e){return e.replace(/_([a-zA-Z])/g,function(e,t){return t.toUpperCase()})},t}(),a.Lang={DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,FQTYPEREF:/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},a.DotProto=function(e,t){function n(e,n){var i=-1,r=1;if("-"==e.charAt(0)&&(r=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))i=parseInt(e);else if(t.NUMBER_HEX.test(e))i=parseInt(e.substring(2),16);else{if(!t.NUMBER_OCT.test(e))throw Error("illegal id value: "+(r<0?"-":"")+e);i=parseInt(e.substring(1),8)}if(i=r*i|0,!n&&i<0)throw Error("illegal id value: "+(r<0?"-":"")+e);return i}function i(e){var n=1;if("-"==e.charAt(0)&&(n=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))return n*parseInt(e,10);if(t.NUMBER_HEX.test(e))return n*parseInt(e.substring(2),16);if(t.NUMBER_OCT.test(e))return n*parseInt(e.substring(1),8);if("inf"===e)return n*(1/0);if("nan"===e)return NaN;if(t.NUMBER_FLT.test(e))return n*parseFloat(e);throw Error("illegal number value: "+(n<0?"-":"")+e)}function r(e,t,n){"undefined"==typeof e[t]?e[t]=n:(Array.isArray(e[t])||(e[t]=[e[t]]),e[t].push(n))}var a={},o=function(e){this.source=e+"",this.index=0,this.line=1,this.stack=[],this._stringOpen=null},s=o.prototype;s._readString=function(){var e='"'===this._stringOpen?t.STRING_DQ:t.STRING_SQ;e.lastIndex=this.index-1;var n=e.exec(this.source);if(!n)throw Error("unterminated string");return this.index=e.lastIndex,this.stack.push(this._stringOpen),this._stringOpen=null,n[1]},s.next=function(){if(this.stack.length>0)return this.stack.shift();if(this.index>=this.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,n,i;do{for(e=!1;t.WHITESPACE.test(i=this.source.charAt(this.index));)if("\n"===i&&++this.line,++this.index===this.source.length)return null;if("/"===this.source.charAt(this.index))if(++this.index,"/"===this.source.charAt(this.index)){for(;"\n"!==this.source.charAt(++this.index);)if(this.index==this.source.length)return null;++this.index,++this.line,e=!0}else{if("*"!==(i=this.source.charAt(this.index)))return"/";do{if("\n"===i&&++this.line,++this.index===this.source.length)return null;n=i,i=this.source.charAt(this.index)}while("*"!==n||"/"!==i);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var r=this.index;t.DELIM.lastIndex=0;var a=t.DELIM.test(this.source.charAt(r++));if(!a)for(;r<this.source.length&&!t.DELIM.test(this.source.charAt(r));)++r;var o=this.source.substring(this.index,this.index=r);return'"'!==o&&"'"!==o||(this._stringOpen=o),o},s.peek=function(){if(0===this.stack.length){var e=this.next();if(null===e)return null;this.stack.push(e)}return this.stack[0]},s.skip=function(e){var t=this.next();if(t!==e)throw Error("illegal '"+t+"', '"+e+"' expected")},s.omit=function(e){return this.peek()===e&&(this.next(),!0)},s.toString=function(){return"Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"},a.Tokenizer=o;var l=function(e){this.tn=new o(e),this.proto3=!1},u=l.prototype;return u.parse=function(){var e,n,i={name:"[ROOT]",package:null,messages:[],enums:[],imports:[],options:{},services:[]},r=!0;try{for(;e=this.tn.next();)switch(e){case"package":if(!r||null!==i.package)throw Error("unexpected 'package'");if(e=this.tn.next(),!t.TYPEREF.test(e))throw Error("illegal package name: "+e);this.tn.skip(";"),i.package=e;break;case"import":if(!r)throw Error("unexpected 'import'");e=this.tn.peek(),("public"===e||(n="weak"===e))&&this.tn.next(),e=this._readString(),this.tn.skip(";"),n||i.imports.push(e);break;case"syntax":if(!r)throw Error("unexpected 'syntax'");this.tn.skip("="),"proto3"===(i.syntax=this._readString())&&(this.proto3=!0),this.tn.skip(";");break;case"message":this._parseMessage(i,null),r=!1;break;case"enum":this._parseEnum(i),r=!1;break;case"option":this._parseOption(i);break;case"service":this._parseService(i);break;case"extend":this._parseExtend(i);break;default:throw Error("unexpected '"+e+"'")}}catch(e){throw e.message="Parse error at line "+this.tn.line+": "+e.message,e}return delete i.name,i},l.parse=function(e){return new l(e).parse()},u._readString=function(){var e,t,n="";do{if(t=this.tn.next(),"'"!==t&&'"'!==t)throw Error("illegal string delimiter: "+t);n+=this.tn.next(),this.tn.skip(t),e=this.tn.peek()}while('"'===e||'"'===e);return n},u._readValue=function(e){var n=this.tn.peek();if('"'===n||"'"===n)return this._readString();if(this.tn.next(),t.NUMBER.test(n))return i(n);if(t.BOOL.test(n))return"true"===n.toLowerCase();if(e&&t.TYPEREF.test(n))return n;throw Error("illegal value: "+n)},u._parseOption=function(e,n){var i=this.tn.next(),r=!1;if("("===i&&(r=!0,i=this.tn.next()),!t.TYPEREF.test(i))throw Error("illegal option name: "+i);var a=i;r&&(this.tn.skip(")"),a="("+a+")",i=this.tn.peek(),t.FQTYPEREF.test(i)&&(a+=i,this.tn.next())),this.tn.skip("="),this._parseOptionValue(e,a),n||this.tn.skip(";")},u._parseOptionValue=function(e,n){var i=this.tn.peek();if("{"!==i)r(e.options,n,this._readValue(!0));else for(this.tn.skip("{");"}"!==(i=this.tn.next());){if(!t.NAME.test(i))throw Error("illegal option name: "+n+"."+i);this.tn.omit(":")?r(e.options,n+"."+i,this._readValue(!0)):this._parseOptionValue(e,n+"."+i)}},u._parseService=function(e){var n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal service name at line "+this.tn.line+": "+n);var i=n,r={name:i,rpc:{},options:{}};for(this.tn.skip("{");"}"!==(n=this.tn.next());)if("option"===n)this._parseOption(r);else{if("rpc"!==n)throw Error("illegal service token: "+n);this._parseServiceRPC(r)}this.tn.omit(";"),e.services.push(r)},u._parseServiceRPC=function(e){var n="rpc",i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal rpc service method name: "+i);var r=i,a={request:null,response:null,request_stream:!1,response_stream:!1,options:{}};if(this.tn.skip("("),i=this.tn.next(),"stream"===i.toLowerCase()&&(a.request_stream=!0,i=this.tn.next()),!t.TYPEREF.test(i))throw Error("illegal rpc service request type: "+i);if(a.request=i,this.tn.skip(")"),i=this.tn.next(),"returns"!==i.toLowerCase())throw Error("illegal rpc service request type delimiter: "+i);if(this.tn.skip("("),i=this.tn.next(),"stream"===i.toLowerCase()&&(a.response_stream=!0,i=this.tn.next()),a.response=i,this.tn.skip(")"),i=this.tn.peek(),"{"===i){for(this.tn.next();"}"!==(i=this.tn.next());){if("option"!==i)throw Error("illegal rpc service token: "+i);this._parseOption(a)}this.tn.omit(";")}else this.tn.skip(";");"undefined"==typeof e[n]&&(e[n]={}),e[n][r]=a},u._parseMessage=function(e,i){var r=!!i,a=this.tn.next(),o={name:"",fields:[],enums:[],messages:[],options:{},services:[],oneofs:{}};if(!t.NAME.test(a))throw Error("illegal "+(r?"group":"message")+" name: "+a);for(o.name=a,r&&(this.tn.skip("="),i.id=n(this.tn.next()),o.isGroup=!0),a=this.tn.peek(),"["===a&&i&&this._parseFieldOptions(i),this.tn.skip("{");"}"!==(a=this.tn.next());)if(t.RULE.test(a))this._parseMessageField(o,a);else if("oneof"===a)this._parseMessageOneOf(o);else if("enum"===a)this._parseEnum(o);else if("message"===a)this._parseMessage(o);else if("option"===a)this._parseOption(o);else if("service"===a)this._parseService(o);else if("extensions"===a)o.extensions=this._parseExtensionRanges();else if("reserved"===a)this._parseIgnored();else if("extend"===a)this._parseExtend(o);else{if(!t.TYPEREF.test(a))throw Error("illegal message token: "+a);if(!this.proto3)throw Error("illegal field rule: "+a);this._parseMessageField(o,"optional",a)}return this.tn.omit(";"),e.messages.push(o),o},u._parseIgnored=function(){for(;";"!==this.tn.peek();)this.tn.next();this.tn.skip(";")},u._parseMessageField=function(e,i,r){if(!t.RULE.test(i))throw Error("illegal message field rule: "+i);var a,o={rule:i,type:"",name:"",options:{},id:0};if("map"===i){if(r)throw Error("illegal type: "+r);if(this.tn.skip("<"),a=this.tn.next(),!t.TYPE.test(a)&&!t.TYPEREF.test(a))throw Error("illegal message field type: "+a);if(o.keytype=a,this.tn.skip(","),a=this.tn.next(),!t.TYPE.test(a)&&!t.TYPEREF.test(a))throw Error("illegal message field: "+a);if(o.type=a,this.tn.skip(">"),a=this.tn.next(),!t.NAME.test(a))throw Error("illegal message field name: "+a);o.name=a,this.tn.skip("="),o.id=n(this.tn.next()),a=this.tn.peek(),"["===a&&this._parseFieldOptions(o),this.tn.skip(";")}else if(r="undefined"!=typeof r?r:this.tn.next(),"group"===r){var s=this._parseMessage(e,o);if(!/^[A-Z]/.test(s.name))throw Error("illegal group name: "+s.name);o.type=s.name,o.name=s.name.toLowerCase(),this.tn.omit(";")}else{if(!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field type: "+r);if(o.type=r,a=this.tn.next(),!t.NAME.test(a))throw Error("illegal message field name: "+a);o.name=a,this.tn.skip("="),o.id=n(this.tn.next()),a=this.tn.peek(),"["===a&&this._parseFieldOptions(o),this.tn.skip(";")}return e.fields.push(o),o},u._parseMessageOneOf=function(e){var n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal oneof name: "+n);var i,r=n,a=[];for(this.tn.skip("{");"}"!==(n=this.tn.next());)i=this._parseMessageField(e,"optional",n),i.oneof=r,a.push(i.id);this.tn.omit(";"),e.oneofs[r]=a},u._parseFieldOptions=function(e){this.tn.skip("[");for(var t,n=!0;"]"!==(t=this.tn.peek());)n||this.tn.skip(","),this._parseOption(e,!0),n=!1;this.tn.next()},u._parseEnum=function(e){var i={name:"",values:[],options:{}},r=this.tn.next();if(!t.NAME.test(r))throw Error("illegal name: "+r);for(i.name=r,this.tn.skip("{");"}"!==(r=this.tn.next());)if("option"===r)this._parseOption(i);else{if(!t.NAME.test(r))throw Error("illegal name: "+r);this.tn.skip("=");var a={name:r,id:n(this.tn.next(),!0)};r=this.tn.peek(),"["===r&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),i.values.push(a)}this.tn.omit(";"),e.enums.push(i)},u._parseExtensionRanges=function(){var t,n,r,a=[];do{for(n=[];;){switch(t=this.tn.next()){case"min":r=e.ID_MIN;break;case"max":r=e.ID_MAX;break;default:r=i(t)}if(n.push(r),2===n.length)break;if("to"!==this.tn.peek()){n.push(r);break}this.tn.next()}a.push(n)}while(this.tn.omit(","));return this.tn.skip(";"),a},u._parseExtend=function(e){var n=this.tn.next();if(!t.TYPEREF.test(n))throw Error("illegal extend reference: "+n);var i={ref:n,fields:[]};for(this.tn.skip("{");"}"!==(n=this.tn.next());)if(t.RULE.test(n))this._parseMessageField(i,n);else{if(!t.TYPEREF.test(n))throw Error("illegal extend token: "+n);if(!this.proto3)throw Error("illegal field rule: "+n);this._parseMessageField(i,"optional",n)}return this.tn.omit(";"),e.messages.push(i),i},u.toString=function(){return"Parser at line "+this.tn.line},a.Parser=l,a}(a,a.Lang),a.Reflect=function(e){function n(n){if("string"==typeof n&&(n=e.TYPES[n]),"undefined"==typeof n.defaultValue)throw Error("default value for type "+n.name+" is not supported");return n==e.TYPES.bytes?new t(0):n.defaultValue}function r(t,n){if(t&&"number"==typeof t.low&&"number"==typeof t.high&&"boolean"==typeof t.unsigned&&t.low===t.low&&t.high===t.high)return new e.Long(t.low,t.high,"undefined"==typeof n?t.unsigned:n);if("string"==typeof t)return e.Long.fromString(t,n||!1,10);if("number"==typeof t)return e.Long.fromNumber(t,n||!1);throw Error("not convertible to Long")}function a(t,n){var i=n.readVarint32(),r=7&i,o=i>>>3;switch(r){case e.WIRE_TYPES.VARINT:do i=n.readUint8();while(128===(128&i));break;case e.WIRE_TYPES.BITS64:n.offset+=8;break;case e.WIRE_TYPES.LDELIM:i=n.readVarint32(),n.offset+=i;break;case e.WIRE_TYPES.STARTGROUP:a(o,n);break;case e.WIRE_TYPES.ENDGROUP:if(o===t)return!1;throw Error("Illegal GROUPEND after unknown group: "+o+" ("+t+" expected)");case e.WIRE_TYPES.BITS32:n.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+t+": "+r)}return!0}var o={},s=function(e,t,n){this.builder=e,this.parent=t,this.name=n,this.className},l=s.prototype;l.fqn=function(){for(var e=this.name,t=this;t=t.parent,null!=t;)e=t.name+"."+e;return e},l.toString=function(e){return(e?this.className+" ":"")+this.fqn()},l.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},o.T=s;var u=function(e,t,n,i,r){s.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=i||{},this.syntax=r||"proto2"},d=u.prototype=Object.create(s.prototype);d.getChildren=function(e){if(e=e||null,null==e)return this.children.slice();for(var t=[],n=0,i=this.children.length;n<i;++n)this.children[n]instanceof e&&t.push(this.children[n]);return t},d.addChild=function(e){var t;if(t=this.getChild(e.name))if(t instanceof h.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName))t.name=t.originalName;else{if(!(e instanceof h.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+e.name);e.name=e.originalName}this.children.push(e)},d.getChild=function(e){for(var t="number"==typeof e?"id":"name",n=0,i=this.children.length;n<i;++n)if(this.children[n][t]===e)return this.children[n];return null},d.resolve=function(e,t){var n="string"==typeof e?e.split("."):e,i=this,r=0;if(""===n[r]){for(;null!==i.parent;)i=i.parent;r++}var a;do{do{if(!(i instanceof o.Namespace)){i=null;break}if(a=i.getChild(n[r]),!a||!(a instanceof o.T)||t&&!(a instanceof o.Namespace)){i=null;break}i=a,r++}while(r<n.length);if(null!=i)break;if(null!==this.parent)return this.parent.resolve(e,t)}while(null!=i);return i},d.qn=function(e){var t=[],n=e;do t.unshift(n.name),n=n.parent;while(null!==n);for(var i=1;i<=t.length;i++){var r=t.slice(t.length-i);if(e===this.resolve(r,e instanceof o.Namespace))return r.join(".")}return e.fqn()},d.build=function(){for(var e,t={},n=this.children,i=0,r=n.length;i<r;++i)e=n[i],e instanceof u&&(t[e.name]=e.build());return Object.defineProperty&&Object.defineProperty(t,"$options",{value:this.buildOpt()}),t},d.buildOpt=function(){for(var e={},t=Object.keys(this.options),n=0,i=t.length;n<i;++n){var r=t[n],a=this.options[t[n]];e[r]=a}return e},d.getOption=function(e){return"undefined"==typeof e?this.options:"undefined"!=typeof this.options[e]?this.options[e]:null},o.Namespace=u;var c=function(t,n,i,r){if(this.type=t,this.resolvedType=n,this.isMapKey=i,this.syntax=r,i&&e.MAP_KEY_TYPES.indexOf(t)<0)throw Error("Invalid map key type: "+t.name)},f=c.prototype;c.defaultFieldValue=n,f.verifyValue=function(n){function a(e,t){throw Error("Illegal value for "+o.toString(!0)+" of type "+o.type.name+": "+e+" ("+t+")")}var o=this;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:return("number"!=typeof n||n===n&&n%1!==0)&&a("undefined"==typeof n?"undefined":i(n),"not an integer"),n>4294967295?0|n:n;case e.TYPES.uint32:case e.TYPES.fixed32:return("number"!=typeof n||n===n&&n%1!==0)&&a("undefined"==typeof n?"undefined":i(n),"not an integer"),n<0?n>>>0:n;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:if(e.Long)try{return r(n,!1)}catch(e){a("undefined"==typeof n?"undefined":i(n),e.message)}else a("undefined"==typeof n?"undefined":i(n),"requires Long.js");case e.TYPES.uint64:case e.TYPES.fixed64:if(e.Long)try{return r(n,!0)}catch(e){a("undefined"==typeof n?"undefined":i(n),e.message)}else a("undefined"==typeof n?"undefined":i(n),"requires Long.js");case e.TYPES.bool:return"boolean"!=typeof n&&a("undefined"==typeof n?"undefined":i(n),"not a boolean"),n;case e.TYPES.float:case e.TYPES.double:return"number"!=typeof n&&a("undefined"==typeof n?"undefined":i(n),"not a number"),n;case e.TYPES.string:return"string"==typeof n||n&&n instanceof String||a("undefined"==typeof n?"undefined":i(n),"not a string"),""+n;case e.TYPES.bytes:return t.isByteBuffer(n)?n:t.wrap(n,"base64");case e.TYPES.enum:var s=this.resolvedType.getChildren(e.Reflect.Enum.Value);for(u=0;u<s.length;u++){if(s[u].name==n)return s[u].id;if(s[u].id==n)return s[u].id}if("proto3"===this.syntax)return("number"!=typeof n||n===n&&n%1!==0)&&a("undefined"==typeof n?"undefined":i(n),"not an integer"),(n>4294967295||n<0)&&a("undefined"==typeof n?"undefined":i(n),"not in range for uint32"),n;a(n,"not a valid enum value");case e.TYPES.group:case e.TYPES.message:if(n&&"object"==("undefined"==typeof n?"undefined":i(n))||a("undefined"==typeof n?"undefined":i(n),"object expected"),n instanceof this.resolvedType.clazz)return n;if(n instanceof e.Builder.Message){var l={};for(var u in n)n.hasOwnProperty(u)&&(l[u]=n[u]);n=l}return new this.resolvedType.clazz(n)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+n+" (undefined type "+this.type+")")},f.calculateLength=function(n,i){if(null===i)return 0;var r;switch(this.type){case e.TYPES.int32:return i<0?t.calculateVarint64(i):t.calculateVarint32(i);case e.TYPES.uint32:return t.calculateVarint32(i);case e.TYPES.sint32:return t.calculateVarint32(t.zigZagEncode32(i));case e.TYPES.fixed32:case e.TYPES.sfixed32:case e.TYPES.float:return 4;case e.TYPES.int64:case e.TYPES.uint64:return t.calculateVarint64(i);case e.TYPES.sint64:return t.calculateVarint64(t.zigZagEncode64(i));case e.TYPES.fixed64:case e.TYPES.sfixed64:return 8;case e.TYPES.bool:return 1;case e.TYPES.enum:return t.calculateVarint32(i);case e.TYPES.double:return 8;case e.TYPES.string:return r=t.calculateUTF8Bytes(i),t.calculateVarint32(r)+r;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");return t.calculateVarint32(i.remaining())+i.remaining();case e.TYPES.message:return r=this.resolvedType.calculate(i),t.calculateVarint32(r)+r;case e.TYPES.group:return r=this.resolvedType.calculate(i),r+t.calculateVarint32(n<<3|e.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")},f.encodeValue=function(n,i,r){if(null===i)return r;switch(this.type){case e.TYPES.int32:i<0?r.writeVarint64(i):r.writeVarint32(i);break;case e.TYPES.uint32:r.writeVarint32(i);break;case e.TYPES.sint32:r.writeVarint32ZigZag(i);break;case e.TYPES.fixed32:r.writeUint32(i);break;case e.TYPES.sfixed32:r.writeInt32(i);break;case e.TYPES.int64:case e.TYPES.uint64:r.writeVarint64(i);break;case e.TYPES.sint64:r.writeVarint64ZigZag(i);break;case e.TYPES.fixed64:r.writeUint64(i);break;case e.TYPES.sfixed64:r.writeInt64(i);break;case e.TYPES.bool:"string"==typeof i?r.writeVarint32("false"===i.toLowerCase()?0:!!i):r.writeVarint32(i?1:0);break;case e.TYPES.enum:r.writeVarint32(i);break;case e.TYPES.float:r.writeFloat32(i);break;case e.TYPES.double:r.writeFloat64(i);break;case e.TYPES.string:r.writeVString(i);break;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");var a=i.offset;r.writeVarint32(i.remaining()),r.append(i),i.offset=a;break;case e.TYPES.message:var o=(new t).LE();this.resolvedType.encode(i,o),r.writeVarint32(o.offset),r.append(o.flip());break;case e.TYPES.group:this.resolvedType.encode(i,r),r.writeVarint32(n<<3|e.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")}return r},f.decode=function(t,n,i){if(n!=this.type.wireType)throw Error("Unexpected wire type for element");var r,a;switch(this.type){case e.TYPES.int32:return 0|t.readVarint32();case e.TYPES.uint32:return t.readVarint32()>>>0;case e.TYPES.sint32:return 0|t.readVarint32ZigZag();case e.TYPES.fixed32:return t.readUint32()>>>0;case e.TYPES.sfixed32:return 0|t.readInt32();case e.TYPES.int64:return t.readVarint64();case e.TYPES.uint64:return t.readVarint64().toUnsigned();case e.TYPES.sint64:return t.readVarint64ZigZag();case e.TYPES.fixed64:return t.readUint64();case e.TYPES.sfixed64:return t.readInt64();case e.TYPES.bool:return!!t.readVarint32();case e.TYPES.enum:return t.readVarint32();case e.TYPES.float:return t.readFloat();case e.TYPES.double:return t.readDouble();case e.TYPES.string:return t.readVString();case e.TYPES.bytes:if(a=t.readVarint32(),t.remaining()<a)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+a+" required but got only "+t.remaining());return r=t.clone(),r.limit=r.offset+a,t.offset+=a,r;case e.TYPES.message:return a=t.readVarint32(),this.resolvedType.decode(t,a);case e.TYPES.group:return this.resolvedType.decode(t,-1,i)}throw Error("[INTERNAL] Illegal decode type")},f.valueFromString=function(n){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return this.verifyValue(parseInt(n));case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return this.verifyValue(n);case e.TYPES.bool:return"true"===n;case e.TYPES.string:return this.verifyValue(n);case e.TYPES.bytes:return t.fromBinary(n)}},f.valueToString=function(t){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===e.TYPES.bytes?t.toString("binary"):t.toString()},o.Element=c;var h=function(e,t,n,i,r,a){u.call(this,e,t,n,i,a),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!r,this._fields=null,this._fieldsById=null,this._fieldsByName=null},p=h.prototype=Object.create(u.prototype);p.build=function(n){if(this.clazz&&!n)return this.clazz;var r=function(e,n){function r(n,a,o,s){if(null===n||"object"!=("undefined"==typeof n?"undefined":i(n))){if(s&&s instanceof e.Reflect.Enum){var l=e.Reflect.Enum.getName(s.object,n);if(null!==l)return l}return n}if(t.isByteBuffer(n))return a?n.toBase64():n.toBuffer();if(e.Long.isLong(n))return o?n.toString():e.Long.fromValue(n);var u;if(Array.isArray(n))return u=[],n.forEach(function(e,t){u[t]=r(e,a,o,s)}),u;if(u={},n instanceof e.Map){for(var d=n.entries(),c=d.next();!c.done;c=d.next())u[n.keyElem.valueToString(c.value[0])]=r(c.value[1],a,o,n.valueElem.resolvedType);return u}var f=n.$type,h=void 0;for(var p in n)n.hasOwnProperty(p)&&(f&&(h=f.getChild(p))?u[p]=r(n[p],a,o,h.resolvedType):u[p]=r(n[p],a,o));return u}var a=n.getChildren(e.Reflect.Message.Field),o=n.getChildren(e.Reflect.Message.OneOf),s=function r(s,l){e.Builder.Message.call(this);for(var u=0,d=o.length;u<d;++u)this[o[u].name]=null;for(u=0,d=a.length;u<d;++u){var c=a[u];this[c.name]=c.repeated?[]:c.map?new e.Map(c):null,!c.required&&"proto3"!==n.syntax||null===c.defaultValue||(this[c.name]=c.defaultValue)}if(arguments.length>0){var f;if(1!==arguments.length||null===s||"object"!=("undefined"==typeof s?"undefined":i(s))||!("function"!=typeof s.encode||s instanceof r)||Array.isArray(s)||s instanceof e.Map||t.isByteBuffer(s)||s instanceof ArrayBuffer||e.Long&&s instanceof e.Long)for(u=0,d=arguments.length;u<d;++u)"undefined"!=typeof(f=arguments[u])&&this.$set(a[u].name,f);else this.$set(s)}},l=s.prototype=Object.create(e.Builder.Message.prototype);l.add=function(t,i,r){var a=n._fieldsByName[t];if(!r){if(!a)throw Error(this+"#"+t+" is undefined");if(!(a instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: "+a.toString(!0));if(!a.repeated)throw Error(this+"#"+t+" is not a repeated field");i=a.verifyValue(i,!0)}return null===this[t]&&(this[t]=[]),this[t].push(i),this},l.$add=l.add,l.set=function(t,r,a){if(t&&"object"==("undefined"==typeof t?"undefined":i(t))){a=r;for(var o in t)t.hasOwnProperty(o)&&"undefined"!=typeof(r=t[o])&&this.$set(o,r,a);return this}var s=n._fieldsByName[t];if(a)this[t]=r;else{if(!s)throw Error(this+"#"+t+" is not a field: undefined");if(!(s instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: "+s.toString(!0));this[s.name]=r=s.verifyValue(r)}if(s&&s.oneof){var l=this[s.oneof.name];null!==r?(null!==l&&l!==s.name&&(this[l]=null),this[s.oneof.name]=s.name):l===t&&(this[s.oneof.name]=null)}return this},l.$set=l.set,l.get=function(t,i){if(i)return this[t];var r=n._fieldsByName[t];if(!(r&&r instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: undefined");if(!(r instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: "+r.toString(!0));return this[r.name]},l.$get=l.get;for(var u=0;u<a.length;u++){var d=a[u];d instanceof e.Reflect.Message.ExtensionField||n.builder.options.populateAccessors&&function(e){var t=e.originalName.replace(/(_[a-zA-Z])/g,function(e){return e.toUpperCase().replace("_","")});t=t.substring(0,1).toUpperCase()+t.substring(1);var i=e.originalName.replace(/([A-Z])/g,function(e){return"_"+e}),r=function(t,n){return this[e.name]=n?t:e.verifyValue(t),this},a=function(){return this[e.name]};null===n.getChild("set"+t)&&(l["set"+t]=r),null===n.getChild("set_"+i)&&(l["set_"+i]=r),null===n.getChild("get"+t)&&(l["get"+t]=a),null===n.getChild("get_"+i)&&(l["get_"+i]=a)}(d)}return l.encode=function(e,i){"boolean"==typeof e&&(i=e,e=void 0);var r=!1;e||(e=new t,r=!0);var a=e.littleEndian;try{return n.encode(this,e.LE(),i),(r?e.flip():e).LE(a)}catch(t){throw e.LE(a),t}},s.encode=function(e,t,n){return new s(e).encode(t,n)},l.calculate=function(){return n.calculate(this)},l.encodeDelimited=function(e,i){var r=!1;e||(e=new t,r=!0);var a=(new t).LE();return n.encode(this,a,i).flip(),e.writeVarint32(a.remaining()),e.append(a),r?e.flip():e},l.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toArrayBuffer()),e}},l.toArrayBuffer=l.encodeAB,l.encodeNB=function(){try{return this.encode().toBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBuffer()),e}},l.toBuffer=l.encodeNB,l.encode64=function(){try{return this.encode().toBase64()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBase64()),e}},l.toBase64=l.encode64,l.encodeHex=function(){try{return this.encode().toHex()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toHex()),e}},l.toHex=l.encodeHex,l.toRaw=function(e,t){return r(this,!!e,!!t,this.$type)},l.encodeJSON=function(){return JSON.stringify(r(this,!0,!0,this.$type))},s.decode=function(e,i,r){"string"==typeof i&&(r=i,i=-1),"string"==typeof e&&(e=t.wrap(e,r?r:"base64")),e=t.isByteBuffer(e)?e:t.wrap(e);var a=e.littleEndian;try{var o=n.decode(e.LE());return e.LE(a),o}catch(t){throw e.LE(a),t}},s.decodeDelimited=function(e,i){if("string"==typeof e&&(e=t.wrap(e,i?i:"base64")),e=t.isByteBuffer(e)?e:t.wrap(e),e.remaining()<1)return null;var r=e.offset,a=e.readVarint32();if(e.remaining()<a)return e.offset=r,null;try{var o=n.decode(e.slice(e.offset,e.offset+a).LE());return e.offset+=a,o}catch(t){throw e.offset+=a,t}},s.decode64=function(e){return s.decode(e,"base64")},s.decodeHex=function(e){return s.decode(e,"hex")},s.decodeJSON=function(e){return new s(JSON.parse(e))},l.toString=function(){return n.toString()},Object.defineProperty&&(Object.defineProperty(s,"$options",{value:n.buildOpt()}),Object.defineProperty(l,"$options",{value:s.$options}),Object.defineProperty(s,"$type",{value:n}),Object.defineProperty(l,"$type",{value:n})),s}(e,this);this._fields=[],this._fieldsById={},this._fieldsByName={};for(var a,o=0,s=this.children.length;o<s;o++)if(a=this.children[o],a instanceof y||a instanceof h||a instanceof C){if(r.hasOwnProperty(a.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+a.toString(!0)+" cannot override static property '"+a.name+"'");r[a.name]=a.build()}else if(a instanceof h.Field)a.build(),this._fields.push(a),this._fieldsById[a.id]=a,this._fieldsByName[a.name]=a;else if(!(a instanceof h.OneOf||a instanceof T))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[o].toString(!0));return this.clazz=r},p.encode=function(e,t,n){for(var i,r,a=null,o=0,s=this._fields.length;o<s;++o)i=this._fields[o],r=e[i.name],i.required&&null===r?null===a&&(a=i):i.encode(n?r:i.verifyValue(r),t,e);
if(null!==a){var l=Error("Missing at least one required field for "+this.toString(!0)+": "+a);throw l.encoded=t,l}return t},p.calculate=function(e){for(var t,n,i=0,r=0,a=this._fields.length;r<a;++r){if(t=this._fields[r],n=e[t.name],t.required&&null===n)throw Error("Missing at least one required field for "+this.toString(!0)+": "+t);i+=t.calculate(n,e)}return i},p.decode=function(t,n,i){n="number"==typeof n?n:-1;for(var r,o,s,l,u=t.offset,d=new this.clazz;t.offset<u+n||n===-1&&t.remaining()>0;){if(r=t.readVarint32(),o=7&r,s=r>>>3,o===e.WIRE_TYPES.ENDGROUP){if(s!==i)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+s+" ("+(i?i+" expected":"not a group")+")");break}if(l=this._fieldsById[s]){if(l.repeated&&!l.options.packed)d[l.name].push(l.decode(o,t));else if(l.map){var c=l.decode(o,t);d[l.name].set(c[0],c[1])}else if(d[l.name]=l.decode(o,t),l.oneof){var f=d[l.oneof.name];null!==f&&f!==l.name&&(d[f]=null),d[l.oneof.name]=l.name}}else switch(o){case e.WIRE_TYPES.VARINT:t.readVarint32();break;case e.WIRE_TYPES.BITS32:t.offset+=4;break;case e.WIRE_TYPES.BITS64:t.offset+=8;break;case e.WIRE_TYPES.LDELIM:var h=t.readVarint32();t.offset+=h;break;case e.WIRE_TYPES.STARTGROUP:for(;a(s,t););break;default:throw Error("Illegal wire type for unknown field "+s+" in "+this.toString(!0)+"#decode: "+o)}}for(var p=0,_=this._fields.length;p<_;++p)if(l=this._fields[p],null===d[l.name])if("proto3"===this.syntax)d[l.name]=l.defaultValue;else{if(l.required){var g=Error("Missing at least one required field for "+this.toString(!0)+": "+l.name);throw g.decoded=d,g}e.populateDefaults&&null!==l.defaultValue&&(d[l.name]=l.defaultValue)}return d},o.Message=h;var _=function(t,n,i,r,a,o,l,u,d,c){s.call(this,t,n,o),this.className="Message.Field",this.required="required"===i,this.repeated="repeated"===i,this.map="map"===i,this.keyType=r||null,this.type=a,this.resolvedType=null,this.id=l,this.options=u||{},this.defaultValue=null,this.oneof=d||null,this.syntax=c||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,!this.builder.options.convertFieldsToCamelCase||this instanceof h.ExtensionField||(this.name=e.Util.toCamelCase(this.name))},g=_.prototype=Object.create(s.prototype);g.build=function(){this.element=new c(this.type,this.resolvedType,!1,this.syntax),this.map&&(this.keyElement=new c(this.keyType,void 0,!0,this.syntax)),"proto3"!==this.syntax||this.repeated||this.map?"undefined"!=typeof this.options.default&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=c.defaultFieldValue(this.type)},g.verifyValue=function(t,n){function r(e,t){throw Error("Illegal value for "+a.toString(!0)+" of type "+a.type.name+": "+e+" ("+t+")")}n=n||!1;var a=this;if(null===t)return this.required&&r("undefined"==typeof t?"undefined":i(t),"required"),"proto3"===this.syntax&&this.type!==e.TYPES.message&&r("undefined"==typeof t?"undefined":i(t),"proto3 field without field presence cannot be null"),null;var o;if(this.repeated&&!n){Array.isArray(t)||(t=[t]);var s=[];for(o=0;o<t.length;o++)s.push(this.element.verifyValue(t[o]));return s}return this.map&&!n?t instanceof e.Map?t:(t instanceof Object||r("undefined"==typeof t?"undefined":i(t),"expected ProtoBuf.Map or raw object for map field"),new e.Map(this,t)):(!this.repeated&&Array.isArray(t)&&r("undefined"==typeof t?"undefined":i(t),"no array expected"),this.element.verifyValue(t))},g.hasWirePresence=function(t,n){if("proto3"!==this.syntax)return null!==t;if(this.oneof&&n[this.oneof.name]===this.name)return!0;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return 0!==t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return 0!==t.low||0!==t.high;case e.TYPES.bool:return t;case e.TYPES.float:case e.TYPES.double:return 0!==t;case e.TYPES.string:return t.length>0;case e.TYPES.bytes:return t.remaining()>0;case e.TYPES.enum:return 0!==t;case e.TYPES.message:return null!==t;default:return!0}},g.encode=function(n,r,a){if(null===this.type||"object"!=i(this.type))throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===n||this.repeated&&0==n.length)return r;try{if(this.repeated){var o;if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){r.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),r.ensureCapacity(r.offset+=1);var s=r.offset;for(o=0;o<n.length;o++)this.element.encodeValue(this.id,n[o],r);var l=r.offset-s,u=t.calculateVarint32(l);if(u>1){var d=r.slice(s,r.offset);s+=u-1,r.offset=s,r.append(d)}r.writeVarint32(l,s-u)}else for(o=0;o<n.length;o++)r.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,n[o],r)}else this.map?n.forEach(function(n,i,a){var o=t.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,i)+t.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,n);r.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),r.writeVarint32(o),r.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,i,r),r.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,n,r)},this):this.hasWirePresence(n,a)&&(r.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,n,r))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+n+" ("+e+")")}return r},g.calculate=function(n,r){if(n=this.verifyValue(n),null===this.type||"object"!=i(this.type))throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===n||this.repeated&&0==n.length)return 0;var a=0;try{if(this.repeated){var o,s;if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){for(a+=t.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),s=0,o=0;o<n.length;o++)s+=this.element.calculateLength(this.id,n[o]);a+=t.calculateVarint32(s),a+=s}else for(o=0;o<n.length;o++)a+=t.calculateVarint32(this.id<<3|this.type.wireType),a+=this.element.calculateLength(this.id,n[o])}else this.map?n.forEach(function(n,i,r){var o=t.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,i)+t.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,n);a+=t.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),a+=t.calculateVarint32(o),a+=o},this):this.hasWirePresence(n,r)&&(a+=t.calculateVarint32(this.id<<3|this.type.wireType),a+=this.element.calculateLength(this.id,n))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+n+" ("+e+")")}return a},g.decode=function(t,n,i){var r,a,o=!this.map&&t==this.type.wireType||!i&&this.repeated&&this.options.packed&&t==e.WIRE_TYPES.LDELIM||this.map&&t==e.WIRE_TYPES.LDELIM;if(!o)throw Error("Illegal wire type for field "+this.toString(!0)+": "+t+" ("+this.type.wireType+" expected)");if(t==e.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0&&!i){a=n.readVarint32(),a=n.offset+a;for(var s=[];n.offset<a;)s.push(this.decode(this.type.wireType,n,!0));return s}if(this.map){var l=c.defaultFieldValue(this.keyType);if(r=c.defaultFieldValue(this.type),a=n.readVarint32(),n.remaining()<a)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+a+" required but got only "+n.remaining());var u=n.clone();for(u.limit=u.offset+a,n.offset+=a;u.remaining()>0;){var d=u.readVarint32();t=7&d;var f=d>>>3;if(1===f)l=this.keyElement.decode(u,t,f);else{if(2!==f)throw Error("Unexpected tag in map field key/value submessage");r=this.element.decode(u,t,f)}}return[l,r]}return this.element.decode(n,t,this.id)},o.Message.Field=_;var m=function(e,t,n,i,r,a,o){_.call(this,e,t,n,null,i,r,a,o),this.extension};m.prototype=Object.create(_.prototype),o.Message.ExtensionField=m;var v=function(e,t,n){s.call(this,e,t,n),this.fields=[]};o.Message.OneOf=v;var y=function(e,t,n,i,r){u.call(this,e,t,n,i,r),this.className="Enum",this.object=null};y.getName=function(e,t){for(var n,i=Object.keys(e),r=0;r<i.length;++r)if(e[n=i[r]]===t)return n;return null};var E=y.prototype=Object.create(u.prototype);E.build=function(t){if(this.object&&!t)return this.object;for(var n=new e.Builder.Enum,i=this.getChildren(y.Value),r=0,a=i.length;r<a;++r)n[i[r].name]=i[r].id;return Object.defineProperty&&Object.defineProperty(n,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=n},o.Enum=y;var S=function(e,t,n,i){s.call(this,e,t,n),this.className="Enum.Value",this.id=i};S.prototype=Object.create(s.prototype),o.Enum.Value=S;var T=function(e,t,n,i){s.call(this,e,t,n),this.field=i};T.prototype=Object.create(s.prototype),o.Extension=T;var C=function(e,t,n,i){u.call(this,e,t,n,i),this.className="Service",this.clazz=null},R=C.prototype=Object.create(u.prototype);R.build=function(n){return this.clazz&&!n?this.clazz:this.clazz=function(e,n){for(var r=function(t){e.Builder.Service.call(this),this.rpcImpl=t||function(e,t,n){setTimeout(n.bind(this,Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")),0)}},a=r.prototype=Object.create(e.Builder.Service.prototype),o=n.getChildren(e.Reflect.Service.RPCMethod),s=0;s<o.length;s++)!function(e){a[e.name]=function(r,a){try{try{r=e.resolvedRequestType.clazz.decode(t.wrap(r))}catch(e){if(!(e instanceof TypeError))throw e}if(null===r||"object"!=("undefined"==typeof r?"undefined":i(r)))throw Error("Illegal arguments");r instanceof e.resolvedRequestType.clazz||(r=new e.resolvedRequestType.clazz(r)),this.rpcImpl(e.fqn(),r,function(t,i){if(t)return void a(t);null===i&&(i="");try{i=e.resolvedResponseType.clazz.decode(i)}catch(e){}return i&&i instanceof e.resolvedResponseType.clazz?void a(null,i):void a(Error("Illegal response type received in service method "+n.name+"#"+e.name))})}catch(e){setTimeout(a.bind(this,e),0)}},r[e.name]=function(t,n,i){new r(t)[e.name](n,i)},Object.defineProperty&&(Object.defineProperty(r[e.name],"$options",{value:e.buildOpt()}),Object.defineProperty(a[e.name],"$options",{value:r[e.name].$options}))}(o[s]);return Object.defineProperty&&(Object.defineProperty(r,"$options",{value:n.buildOpt()}),Object.defineProperty(a,"$options",{value:r.$options}),Object.defineProperty(r,"$type",{value:n}),Object.defineProperty(a,"$type",{value:n})),r}(e,this)},o.Service=C;var b=function(e,t,n,i){s.call(this,e,t,n),this.className="Service.Method",this.options=i||{}},w=b.prototype=Object.create(s.prototype);w.buildOpt=d.buildOpt,o.Service.Method=b;var A=function(e,t,n,i,r,a,o,s){b.call(this,e,t,n,s),this.className="Service.RPCMethod",this.requestName=i,this.responseName=r,this.requestStream=a,this.responseStream=o,this.resolvedRequestType=null,this.resolvedResponseType=null};return A.prototype=Object.create(b.prototype),o.Service.RPCMethod=A,o}(a),a.Builder=function(e,t,r){function a(e){e.messages&&e.messages.forEach(function(t){t.syntax=e.syntax,a(t)}),e.enums&&e.enums.forEach(function(t){t.syntax=e.syntax})}var o=function(e){this.ns=new r.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=e||{}},s=o.prototype;return o.isMessage=function(e){return"string"==typeof e.name&&"undefined"==typeof e.values&&"undefined"==typeof e.rpc},o.isMessageField=function(e){return"string"==typeof e.rule&&"string"==typeof e.name&&"string"==typeof e.type&&"undefined"!=typeof e.id},o.isEnum=function(e){return"string"==typeof e.name&&!("undefined"==typeof e.values||!Array.isArray(e.values)||0===e.values.length)},o.isService=function(e){return!("string"!=typeof e.name||"object"!=i(e.rpc)||!e.rpc)},o.isExtend=function(e){return"string"==typeof e.ref},s.reset=function(){return this.ptr=this.ns,this},s.define=function(e){if("string"!=typeof e||!t.TYPEREF.test(e))throw Error("illegal namespace: "+e);return e.split(".").forEach(function(e){var t=this.ptr.getChild(e);null===t&&this.ptr.addChild(t=new r.Namespace(this,this.ptr,e)),this.ptr=t},this),this},s.create=function(t){if(!t)return this;if(Array.isArray(t)){if(0===t.length)return this;t=t.slice()}else t=[t];for(var n=[t];n.length>0;){if(t=n.pop(),!Array.isArray(t))throw Error("not a valid namespace: "+JSON.stringify(t));for(;t.length>0;){var a=t.shift();if(o.isMessage(a)){var s=new r.Message(this,this.ptr,a.name,a.options,a.isGroup,a.syntax),l={};a.oneofs&&Object.keys(a.oneofs).forEach(function(e){s.addChild(l[e]=new r.Message.OneOf(this,s,e))},this),a.fields&&a.fields.forEach(function(e){if(null!==s.getChild(0|e.id))throw Error("duplicate or invalid field id in "+s.name+": "+e.id);if(e.options&&"object"!=i(e.options))throw Error("illegal field options in "+s.name+"#"+e.name);var t=null;if("string"==typeof e.oneof&&!(t=l[e.oneof]))throw Error("illegal oneof in "+s.name+"#"+e.name+": "+e.oneof);e=new r.Message.Field(this,s,e.rule,e.keytype,e.type,e.name,e.id,e.options,t,a.syntax),t&&t.fields.push(e),s.addChild(e)},this);var u=[];if(a.enums&&a.enums.forEach(function(e){u.push(e)}),a.messages&&a.messages.forEach(function(e){u.push(e)}),a.services&&a.services.forEach(function(e){u.push(e)}),a.extensions&&("number"==typeof a.extensions[0]?s.extensions=[a.extensions]:s.extensions=a.extensions),this.ptr.addChild(s),u.length>0){n.push(t),t=u,u=null,this.ptr=s,s=null;continue}u=null}else if(o.isEnum(a))s=new r.Enum(this,this.ptr,a.name,a.options,a.syntax),a.values.forEach(function(e){s.addChild(new r.Enum.Value(this,s,e.name,e.id))},this),this.ptr.addChild(s);else if(o.isService(a))s=new r.Service(this,this.ptr,a.name,a.options),Object.keys(a.rpc).forEach(function(e){var t=a.rpc[e];s.addChild(new r.Service.RPCMethod(this,s,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))},this),this.ptr.addChild(s);else{if(!o.isExtend(a))throw Error("not a valid definition: "+JSON.stringify(a));if(s=this.ptr.resolve(a.ref,!0))a.fields.forEach(function(t){if(null!==s.getChild(0|t.id))throw Error("duplicate extended field id in "+s.name+": "+t.id);if(s.extensions){var n=!1;if(s.extensions.forEach(function(e){t.id>=e[0]&&t.id<=e[1]&&(n=!0)}),!n)throw Error("illegal extended field id in "+s.name+": "+t.id+" (not within valid ranges)")}var i=t.name;this.options.convertFieldsToCamelCase&&(i=e.Util.toCamelCase(i));var a=new r.Message.ExtensionField(this,s,t.rule,t.type,this.ptr.fqn()+"."+i,t.id,t.options),o=new r.Extension(this,this.ptr,t.name,a);a.extension=o,this.ptr.addChild(o),s.addChild(a)},this);else if(!/\.?google\.protobuf\./.test(a.ref))throw Error("extended message "+a.ref+" is not defined")}a=null,s=null}t=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},s.import=function(t,r){var o="/";if("string"==typeof r){if(e.Util.IS_NODE&&(r=n(35).resolve(r)),this.files[r]===!0)return this.reset();this.files[r]=!0}else if("object"==("undefined"==typeof r?"undefined":i(r))){var s=r.root;e.Util.IS_NODE&&(s=n(35).resolve(s)),(s.indexOf("\\")>=0||r.file.indexOf("\\")>=0)&&(o="\\");var l=s+o+r.file;if(this.files[l]===!0)return this.reset();this.files[l]=!0}if(t.imports&&t.imports.length>0){var u,d=!1;"object"==("undefined"==typeof r?"undefined":i(r))?(this.importRoot=r.root,d=!0,u=this.importRoot,r=r.file,(u.indexOf("\\")>=0||r.indexOf("\\")>=0)&&(o="\\")):"string"==typeof r?this.importRoot?u=this.importRoot:r.indexOf("/")>=0?(u=r.replace(/\/[^\/]*$/,""),""===u&&(u="/")):r.indexOf("\\")>=0?(u=r.replace(/\\[^\\]*$/,""),o="\\"):u=".":u=null;for(var c=0;c<t.imports.length;c++)if("string"==typeof t.imports[c]){if(!u)throw Error("cannot determine import root");var f=t.imports[c];if("google/protobuf/descriptor.proto"===f)continue;if(f=u+o+f,this.files[f]===!0)continue;/\.proto$/i.test(f)&&!e.DotProto&&(f=f.replace(/\.proto$/,".json"));var h=e.Util.fetch(f);if(null===h)throw Error("failed to import '"+f+"' in '"+r+"': file not found");/\.json$/i.test(f)?this.import(JSON.parse(h+""),f):this.import(e.DotProto.Parser.parse(h),f)}else r?/\.(\w+)$/.test(r)?this.import(t.imports[c],r.replace(/^(.+)\.(\w+)$/,function(e,t,n){return t+"_import"+c+"."+n})):this.import(t.imports[c],r+"_import"+c):this.import(t.imports[c]);d&&(this.importRoot=null)}t.package&&this.define(t.package),t.syntax&&a(t);var p=this.ptr;return t.options&&Object.keys(t.options).forEach(function(e){p.options[e]=t.options[e]}),t.messages&&(this.create(t.messages),this.ptr=p),t.enums&&(this.create(t.enums),this.ptr=p),t.services&&(this.create(t.services),this.ptr=p),t.extends&&this.create(t.extends),this.reset()},s.resolveAll=function(){var n;if(null==this.ptr||"object"==i(this.ptr.type))return this;if(this.ptr instanceof r.Namespace)this.ptr.children.forEach(function(e){this.ptr=e,this.resolveAll()},this);else if(this.ptr instanceof r.Message.Field){if(t.TYPE.test(this.ptr.type))this.ptr.type=e.TYPES[this.ptr.type];else{if(!t.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(n=(this.ptr instanceof r.Message.ExtensionField?this.ptr.extension.parent:this.ptr.parent).resolve(this.ptr.type,!0),!n)throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=n,n instanceof r.Enum){if(this.ptr.type=e.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==n.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(n instanceof r.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=n.isGroup?e.TYPES.group:e.TYPES.message}}if(this.ptr.map){if(!t.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=e.TYPES[this.ptr.keyType]}}else if(this.ptr instanceof e.Reflect.Service.Method){if(!(this.ptr instanceof e.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(n=this.ptr.parent.resolve(this.ptr.requestName,!0),!(n&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=n,n=this.ptr.parent.resolve(this.ptr.responseName,!0),!(n&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=n}else if(!(this.ptr instanceof e.Reflect.Message.OneOf||this.ptr instanceof e.Reflect.Extension||this.ptr instanceof e.Reflect.Enum.Value))throw Error("illegal object in namespace: "+i(this.ptr)+": "+this.ptr);return this.reset()},s.build=function(e){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!e)return this.result;for(var t="string"==typeof e?e.split("."):e,n=this.result,i=0;i<t.length;i++){if(!n[t[i]]){n=null;break}n=n[t[i]]}return n},s.lookup=function(e,t){return e?this.ns.resolve(e,t):this.ns},s.toString=function(){return"Builder"},o.Message=function(){},o.Enum=function(){},o.Service=function(){},o}(a,a.Lang,a.Reflect),a.Map=function(e,t){function n(e){var t=0;return{next:function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}}var i=function e(n,i){if(!n.map)throw Error("field is not a map");if(this.field=n,this.keyElem=new t.Element(n.keyType,null,!0,n.syntax),this.valueElem=new t.Element(n.type,n.resolvedType,!1,n.syntax),this.map={},Object.defineProperty(this,"size",{get:function(){return Object.keys(this.map).length}}),i)for(var e=Object.keys(i),r=0;r<e.length;r++){var a=this.keyElem.valueFromString(e[r]),o=this.valueElem.verifyValue(i[e[r]]);this.map[this.keyElem.valueToString(a)]={key:a,value:o}}},r=i.prototype;return r.clear=function(){this.map={}},r.delete=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e)),n=t in this.map;return delete this.map[t],n},r.entries=function(){for(var e,t=[],i=Object.keys(this.map),r=0;r<i.length;r++)t.push([(e=this.map[i[r]]).key,e.value]);return n(t)},r.keys=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].key);return n(e)},r.values=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].value);return n(e)},r.forEach=function(e,t){for(var n,i=Object.keys(this.map),r=0;r<i.length;r++)e.call(t,(n=this.map[i[r]]).value,n.key,this)},r.set=function(e,t){var n=this.keyElem.verifyValue(e),i=this.valueElem.verifyValue(t);return this.map[this.keyElem.valueToString(n)]={key:n,value:i},this},r.get=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));if(t in this.map)return this.map[t].value},r.has=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));return t in this.map},i}(a,a.Reflect),a.loadProto=function(e,t,n){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(n=t,t=void 0),a.loadJson(a.DotProto.Parser.parse(e),t,n)},a.protoFromString=a.loadProto,a.loadProtoFile=function(e,t,n){if(t&&"object"==("undefined"==typeof t?"undefined":i(t))?(n=t,t=null):t&&"function"==typeof t||(t=null),t)return a.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,function(i){if(null===i)return void t(Error("Failed to fetch file"));try{t(null,a.loadProto(i,n,e))}catch(e){t(e)}});var r=a.Util.fetch("object"==("undefined"==typeof e?"undefined":i(e))?e.root+"/"+e.file:e);return null===r?null:a.loadProto(r,n,e)},a.protoFromFile=a.loadProtoFile,a.newBuilder=function(e){return e=e||{},"undefined"==typeof e.convertFieldsToCamelCase&&(e.convertFieldsToCamelCase=a.convertFieldsToCamelCase),"undefined"==typeof e.populateAccessors&&(e.populateAccessors=a.populateAccessors),new a.Builder(e)},a.loadJson=function(e,t,n){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(n=t,t=null),t&&"object"==("undefined"==typeof t?"undefined":i(t))||(t=a.newBuilder()),"string"==typeof e&&(e=JSON.parse(e)),t.import(e,n),t.resolveAll(),t},a.loadJsonFile=function(e,t,n){if(t&&"object"==("undefined"==typeof t?"undefined":i(t))?(n=t,t=null):t&&"function"==typeof t||(t=null),t)return a.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,function(i){if(null===i)return void t(Error("Failed to fetch file"));try{t(null,a.loadJson(JSON.parse(i),n,e))}catch(e){t(e)}});var r=a.Util.fetch("object"==("undefined"==typeof e?"undefined":i(e))?e.root+"/"+e.file:e);return null===r?null:a.loadJson(JSON.parse(r),n,e)},a})}).call(t,n(27),n(9)(e))},function(e,t){String.prototype.codePointAt||!function(){var e=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(e){}return n}(),t=function e(t){if(null==this)throw TypeError();var e=String(this),n=e.length,i=t?Number(t):0;if(i!=i&&(i=0),!(i<0||i>=n)){var r,a=e.charCodeAt(i);return a>=55296&&a<=56319&&n>i+1&&(r=e.charCodeAt(i+1),r>=56320&&r<=57343)?1024*(a-55296)+r-56320+65536:a}};e?e(String.prototype,"codePointAt",{value:t,configurable:!0,writable:!0}):String.prototype.codePointAt=t}()},function(e,t){!function(e){function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function i(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return _.iterable&&(t[Symbol.iterator]=function(){return t}),t}function r(e){this.map={},e instanceof r?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function a(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function o(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function s(e){var t=new FileReader;return t.readAsArrayBuffer(e),o(t)}function l(e){var t=new FileReader;return t.readAsText(e),o(t)}function u(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(_.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(_.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(e){if(!_.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},_.blob?(this.blob=function(){var e=a(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(s)},this.text=function(){var e=a(this);if(e)return e;if(this._bodyBlob)return l(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=a(this);return e?e:Promise.resolve(this._bodyText)},_.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function d(e){var t=e.toUpperCase();return g.indexOf(t)>-1?t:e}function c(e,t){t=t||{};var n=t.body;if(c.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new r(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new r(t.headers)),this.method=d(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}}),t}function h(e){var t=new r,n=(e.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),i=n.shift().trim(),r=n.join(":").trim();t.append(i,r)}),t}function p(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof r?t.headers:new r(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var _={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};r.prototype.append=function(e,i){e=t(e),i=n(i);var r=this.map[e];r||(r=[],this.map[e]=r),r.push(i)},r.prototype.delete=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(e,i){this.map[t(e)]=[n(i)]},r.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(i){e.call(t,i,n,this)},this)},this)},r.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),i(e)},r.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),i(e)},r.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),i(e)},_.iterable&&(r.prototype[Symbol.iterator]=r.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this)},u.call(c.prototype),u.call(p.prototype),p.prototype.clone=function(){return new p(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},p.error=function(){var e=new p(null,{status:0,statusText:""});return e.type="error",e};var m=[301,302,303,307,308];p.redirect=function(e,t){if(m.indexOf(t)===-1)throw new RangeError("Invalid status code");return new p(null,{status:t,headers:{location:e}})},e.Headers=r,e.Request=c,e.Response=p,e.fetch=function(e,t){return new Promise(function(n,i){function r(){return"responseURL"in o?o.responseURL:/^X-Request-URL:/m.test(o.getAllResponseHeaders())?o.getResponseHeader("X-Request-URL"):void 0}var a;a=c.prototype.isPrototypeOf(e)&&!t?e:new c(e,t);var o=new XMLHttpRequest;o.onload=function(){var e={status:o.status,statusText:o.statusText,headers:h(o),url:r()},t="response"in o?o.response:o.responseText;n(new p(t,e))},o.onerror=function(){i(new TypeError("Network request failed"))},o.ontimeout=function(){i(new TypeError("Network request failed"))},o.open(a.method,a.url,!0),"include"===a.credentials&&(o.withCredentials=!0),"responseType"in o&&_.blob&&(o.responseType="blob"),a.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send("undefined"==typeof a._bodyInit?null:a._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},35,35]))}),function(){"undefined"==typeof __REACT_HOT_LOADER__}()}).call(t,i(6)(e))},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p="IOS",_="android",g="PC",m=f.default.getLoger("native_SDK"),v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.deviceType=g,e.clientSdk=null,navigator.userAgent.match(/(iPhone|iPod|ios)/i)?e.deviceType=p:navigator.userAgent.match(/(Android)/i)&&(e.deviceType=_),window._native2js=e.native2js.bind(e),e}return s(t,e),l(t,[{key:"native2js",value:function(e,t){var n=""+e,i="";if(t)try{i=JSON.parse(t)}catch(e){var r={code:h.MessageTypes.ERR_INTERFACE_PARAMS_ERROR,reson:h.MessageTypes.ErrorReson[h.MessageTypes.ERR_INTERFACE_PARAMS_ERROR],data:t};return m.error(r),r}var a=this.clientSdk._nativeEventHandler({apiName:n,data:i});if(a)try{a=JSON.stringify(a)}catch(e){m.warn("返回值转JSON失败->",a),a={code:0,reson:"",data:""}}else a={code:0,reson:"",data:""};return a}},{key:"clientEvent",value:function(e,t){var n=""+e,i="";try{i=JSON.stringify(t)}catch(e){m.error("clientEvent->参数数据格式不正确",t),i=JSON.stringify({code:0,reson:"",data:""})}window._js2native&&(m.log("clientEvent",e,t),window._js2native(n,i)),window.xdyAndroid&&window.xdyAndroid._js2native&&(m.log("clientEvent",e,t),window.xdyAndroid._js2native(n,i))}}]),t}(d.default),y=new v;t.default=y,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(p,"IOS","D:/work/xdySDK/src/native.js"),__REACT_HOT_LOADER__.register(_,"ANDROID","D:/work/xdySDK/src/native.js"),__REACT_HOT_LOADER__.register(g,"PC","D:/work/xdySDK/src/native.js"),__REACT_HOT_LOADER__.register(m,"loger","D:/work/xdySDK/src/native.js"),__REACT_HOT_LOADER__.register(v,"Native","D:/work/xdySDK/src/native.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/xdySDK/src/native.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{
default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(3),f=i(2),h=r(f),p=i(4),_=r(p),g=h.default.getLoger("xdySDK"),m=void 0,v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return g.log("xdySDK"),e.api=e._api.bind(e),m=(0,c.createMcuClient)(),m.on("*",e._clientEvent.bind(e)),_.default.clientSdk=e,e}return s(t,e),l(t,[{key:"_clientEvent",value:function(e,t){switch(e){case c.MessageTypes.CLASS_INIT_SUCCESS:case c.MessageTypes.CLASS_JOIN_SUCCESS:case c.MessageTypes.CLASS_UPDATE_ROSTER_NUM:case c.MessageTypes.CLASS_UPDATE_ROSTER:case c.MessageTypes.CLASS_INSERT_ROSTER:case c.MessageTypes.CLASS_DELETE_ROSTER:case c.MessageTypes.CLASS_GET_INFO_SUCCESS:case c.MessageTypes.CLASS_EXIT:case c.MessageTypes.CLASS_UPTATE_STATUS:case c.MessageTypes.CLASS_UPDATE_TIMER:case c.MessageTypes.CLASS_RECORD_START:case c.MessageTypes.CLASS_RECORD_STOP:case c.MessageTypes.CHAT_RECEIVE:case c.MessageTypes.VIDEO_PLAY:case c.MessageTypes.VIDEO_STOP:case c.MessageTypes.VIDEO_BROADCAST:case c.MessageTypes.AUDIO_PLAY:case c.MessageTypes.AUDIO_STOP:case c.MessageTypes.AUDIO_BROADCAST:case c.MessageTypes.MEDIA_STOP_PUBLISH:case c.MessageTypes.DOC_DELETE:case c.MessageTypes.DOC_UPDATE:case c.MessageTypes.WHITEBOARD_ANNOTATION_UPDATE:case c.MessageTypes.ERROR_EVENT:case c.MessageTypes.RECORD_PLAYBACK_UPDATE:case c.MessageTypes.VIDEO_GET_PUBLISH_PATH:case c.MessageTypes.VIDEO_PUBLISH_RESULT:case c.MessageTypes.AUDIO_GET_PUBLISH_PATH:case c.MessageTypes.AUDIO_PUBLISH_RESULT:case c.MessageTypes.SCREEN_SHARE_PLAY:case c.MessageTypes.SCREEN_SHARE_STOP:case c.MessageTypes.PUBLISH_SCREEN_SHARE_SUCCESS:case c.MessageTypes.PUBLISH_SCREEN_SHARE_FAILE:case c.MessageTypes.PUBLISH_SCREEN_SHARE_CLOSE:case c.MessageTypes.PUBLISH_SCREEN_SHARE_DISCONNECT:case c.MessageTypes.PUBLISH_SCREEN_SHARE_CONNECTED:case c.MessageTypes.PUBLISH_SCREEN_MOVIE_INFO_CHANGE:case c.MessageTypes.PUBLISH_SCREEN_VIDEO_INFO_CHANGE:case c.MessageTypes.MEDIA_SHARED_DELETE:case c.MessageTypes.MEDIA_SHARED_UPDATE:case c.MessageTypes.MUSIC_SHARED_DELETE:case c.MessageTypes.MUSIC_SHARED_UPDATE:case c.MessageTypes.START_ANSWER_QUESTION:case c.MessageTypes.UPDATE_ANSWER_QUESTION:case c.MessageTypes.STOP_ANSWER_QUESTION:case c.MessageTypes.UPDATE_QUESTION_TIME:case c.MessageTypes.CURSOR_UPDATE:case c.MessageTypes.RECEIVE_THIRD_MESSGAE:this._emit(e,t),_.default.clientEvent(e,t)}}},{key:"_api",value:function(e,t){if(m){if(e){var n=m[e];if(n)return n(t);var i={code:c.MessageTypes.ERR_INTERFACE_NONE,reson:c.MessageTypes.ErrorReson[c.MessageTypes.ERR_INTERFACE_NONE]};return g.warn(i),this._emit(c.MessageTypes.ERROR_EVENT,i),i}var r={code:c.MessageTypes.ERR_INTERFACE_PARAMS_ERROR,reson:c.MessageTypes.ErrorReson[c.MessageTypes.ERR_INTERFACE_PARAMS_ERROR]};return g.warn(r),this._emit(c.MessageTypes.ERROR_EVENT,r),r}var a={code:c.MessageTypes.ERR_SDK_FAILED,reson:c.MessageTypes.ErrorReson[c.MessageTypes.ERR_SDK_FAILED]};return g.warn(a),this._emit(c.MessageTypes.ERROR_EVENT,a),a}},{key:"_nativeEventHandler",value:function(e){if(e)return this._api(e.apiName,e.data);var t={code:c.MessageTypes.ERR_INTERFACE_PARAMS_ERROR,reson:c.MessageTypes.ErrorReson[c.MessageTypes.ERR_INTERFACE_PARAMS_ERROR],data:e};return g.warn(t),t}}]),t}(d.default);e.exports=new v,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(g,"loger","D:/work/xdySDK/src/xdysdk.js"),__REACT_HOT_LOADER__.register(m,"_client","D:/work/xdySDK/src/xdysdk.js"),__REACT_HOT_LOADER__.register(v,"SDK","D:/work/xdySDK/src/xdysdk.js"))}()},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}}])});(function(){"undefined"==typeof __REACT_HOT_LOADER__})()}).call(t,n(10)(e))},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(7),u=i(l),d=n(1),c=i(d),f=c.default.getLoger("PC-Ape"),h=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return o(t,e),s(t,[{key:"clear",value:function(){f.log("clear")}},{key:"play",value:function(){f.log("play")}},{key:"pause",value:function(){f.log("pause")}},{key:"stop",value:function(){f.log("stop")}}]),t}(u.default),p=h;t.default=p;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(f,"loger","D:/work/PCLive/src/ape/Ape.js"),__REACT_HOT_LOADER__.register(h,"Ape","D:/work/PCLive/src/ape/Ape.js"),__REACT_HOT_LOADER__.register(p,"default","D:/work/PCLive/src/ape/Ape.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=(i(f),n(2)),p=i(h),_=n(3),g=(i(_),u.default.getLoger("PC-ErrorApe")),m=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.init(),e}return o(t,e),s(t,[{key:"init",value:function(){(0,p.default)(".errorFlashHintA").on("click",this._hideErrorHintHandler.bind(this)),(0,p.default)(".errorSetFlashHintB").on("click",this._showErrorDetectionFlashParticular.bind(this)),(0,p.default)("#e_speed360").on("click",this._skipNewWindow.bind(this)),(0,p.default)("#e_chrome").on("click",this._skipNewWindow.bind(this)),(0,p.default)("#e_firefox").on("click",this._skipNewWindow.bind(this)),(0,p.default)("#e_ie10").on("click",this._skipNewWindow.bind(this)),(0,p.default)("#e_security360").on("click",this._skipNewWindow.bind(this)),(0,p.default)("#e_2345").on("click",this._skipNewWindow.bind(this)),(0,p.default)("#e_qq").on("click",this._skipNewWindow.bind(this)),(0,p.default)("#e_sogou").on("click",this._skipNewWindow.bind(this)),(0,p.default)("#e_safari").on("click",this._skipNewWindow.bind(this)),(0,p.default)("#warnHintA").on("click",this._hideWarnError.bind(this))}},{key:"show",value:function(){(0,p.default)(".errorHintBox").show()}},{key:"hide",value:function(){(0,p.default)(".errorHintBox").hide(),(0,p.default)("#publicChoiceErrorrBox").hide()}},{key:"_hideErrorHintHandler",value:function(e){var t=(0,p.default)(e.target).parents(".errorHint");t.attr("data",""),t.hide(),this.judgeDisplayStatus()}},{key:"_hideWarnError",value:function(){clearTimeout(this._isTime),(0,p.default)("#warnHintBox").hide()}},{key:"judgeDisplayStatus",value:function(){for(var e=(0,p.default)(".errorHintBox").find(".errorHint"),t=0,n=0;n<e.length;n++)"open"==(0,p.default)(e[n]).attr("data")&&t++;t<=0&&this.hide()}},{key:"showError",value:function(e,n,i){switch(this.show(),e){case t.TYPE_1:this.showErrorTestLive();break;case t.TYPE_2:this.showErrorPlayback();break;case t.TYPE_3:this.showPublicError(n);break;case t.TYPE_7:break;case t.TYPE_8:this.showErrorDetectionFlash(n,!0);break;case t.TYPE_9:this.showErrorDetectionFlash(n,!1);break;case t.TYPE_10:this.showErrorSafariFlash();break;case t.TYPE_11:this.showErrorQQOrChromeFlash();break;case t.TYPE_12:this.showErrorSougouOr360jisuFlash();break;case t.TYPE_13:this.showSetChromeFlash();break;case t.TYPE_14:this.showSetFirefoxFlash();break;case t.TYPE_15:this.showSetQQFlash();break;case t.TYPE_16:this.showSet2345Flash();break;case t.TYPE_17:this.showSet360anquanFlash();break;case t.TYPE_18:this.showSet360jisuFlash();break;case t.TYPE_19:this.showSetsougouFlash();break;case t.TYPE_20:this.showPublicChoiceErrorrBox(n,i);break;case t.TYPE_23:this.showErrorPublic(n);break;case t.TYPE_24:this.showNetworkDisconnection(n);break;default:this.hide()}}},{key:"showWarnError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;clearTimeout(this._isTime),(0,p.default)("#warnHintBox").show(),(0,p.default)("#warnHintContent").html(e);var n=parseInt(1e3*t);this._isTime=setTimeout(function(){(0,p.default)("#warnHintBox").hide()},n)}},{key:"showErrorTestLive",value:function(){(0,p.default)(".errorTestLive").show().attr("data","open")}},{key:"showErrorPlayback",value:function(){(0,p.default)(".errorPlayback").show().attr("data","open")}},{key:"showPublicError",value:function(e){(0,p.default)(".publicErrorBox").show().attr("data","open"),(0,p.default)(".publicErrorBox").find(".errorPublicHintContent").html(e)}},{key:"showErrorCamera",value:function(e){(0,p.default)(".notCamera").show().attr("data","open"),(0,p.default)(".notCamera").find(".errorHintContent").html(e)}},{key:"showErrorOccupyMicrophone",value:function(e){(0,p.default)(".occupyMicrophone").show().attr("data","open"),(0,p.default)(".occupyMicrophone").find(".errorHintContent").html(e)}},{key:"showErrorOccupyCamera",value:function(e){(0,p.default)(".publicErrorBox").show().attr("data","open"),(0,p.default)(".publicErrorBox").find(".errorHintContent").html(e)}},{key:"showErrorDetectionFlash",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,p.default)("#notDetectionFlash").show().attr("data","open"),1==t?((0,p.default)("#flashDetailSteps").hide(),(0,p.default)("#flashUpdataVersions").show()):((0,p.default)("#flashDetailSteps").show(),(0,p.default)("#flashUpdataVersions").hide())}},{key:"_showErrorDetectionFlashParticular",value:function(){(0,p.default)(".notDetectionFlash").hide().attr("data",""),(0,p.default)(".notDetectionFlash_1").show().attr("data","open")}},{key:"showErrorVersionsFlash",value:function(){(0,p.default)(".versionsFlash").show().attr("data","open")}},{key:"showErrorSafariFlash",value:function(){(0,p.default)(".safariFlashBan").show().attr("data","open")}},{key:"showErrorQQOrChromeFlash",value:function(){(0,p.default)(".QQOrChromeFlashBan").show().attr("data","open")}},{key:"showErrorSougouOr360jisuFlash",value:function(){(0,p.default)(".sougouOr360jisuFlashBan").show().attr("data","open")}},{key:"showSetChromeFlash",value:function(){(0,p.default)(".setChromeFlash").show().attr("data","open")}},{key:"showSetFirefoxFlash",value:function(){(0,p.default)(".setFirefoxFlash").show().attr("data","open")}},{key:"showSetQQFlash",value:function(){(0,p.default)(".setQQFlash").show().attr("data","open")}},{key:"showSet2345Flash",value:function(){(0,p.default)(".set2345Flash").show().attr("data","open")}},{key:"showSet360anquanFlash",value:function(){(0,p.default)(".set360anquanFlash").show().attr("data","open")}},{key:"showSet360jisuFlash",value:function(){(0,p.default)(".set360jisuFlash").show().attr("data","open")}},{key:"showSetsougouFlash",value:function(){(0,p.default)(".setsougouFlash").show().attr("data","open")}},{key:"showCloseEndClass",value:function(e,t){this.showPublicChoiceErrorrBox(e,t)}},{key:"showCloseExitClass",value:function(e,t){this.showPublicChoiceErrorrBox(e,t)}},{key:"showCloseEndShare",value:function(e,t){this.showPublicChoiceErrorrBox(e,t)}},{key:"showErrorPublic",value:function(e){(0,p.default)(".errorPublicHint").show().attr("data","open"),(0,p.default)(".errorPublicHint").find(".errorPublicHintContent").html(e)}},{key:"showNetworkDisconnection",value:function(e,t){(0,p.default)(".networkDisconnection").show().attr("data","open"),(0,p.default)(".networkDisconnection").find(".errornetworkHintContent").html(e)}},{key:"showPublicChoiceErrorrBox",value:function(e,t){(0,p.default)("#publicChoiceErrorrBox").show(),(0,p.default)("#choiceHintBoxText").html(e),(0,p.default)("#choiceConfirm").off("click"),(0,p.default)("#choiceCancel").off("click");var n=this;(0,p.default)("#choiceConfirm").on("click",function(){n.hide(),t&&t(!0)}),(0,p.default)("#choiceCancel").on("click",function(){n.hide(),t&&t(!1)})}},{key:"_skipNewWindow",value:function(e){var t=(0,p.default)(e.target).attr("id");window.open(this.PATH+"/"+this.language+"/"+t+".html")}}]),t}(c.default);m.prototype.TYPE_1=m.TYPE_1=1,m.prototype.TYPE_2=m.TYPE_2=2,m.prototype.TYPE_3=m.TYPE_3=3,m.prototype.TYPE_7=m.TYPE_7=7,m.prototype.TYPE_8=m.TYPE_8=8,m.prototype.TYPE_9=m.TYPE_9=9,m.prototype.TYPE_10=m.TYPE_10=10,m.prototype.TYPE_11=m.TYPE_11=11,m.prototype.TYPE_12=m.TYPE_12=12,m.prototype.TYPE_13=m.TYPE_13=13,m.prototype.TYPE_14=m.TYPE_14=14,m.prototype.TYPE_15=m.TYPE_15=15,m.prototype.TYPE_16=m.TYPE_16=16,m.prototype.TYPE_17=m.TYPE_17=17,m.prototype.TYPE_18=m.TYPE_18=18,m.prototype.TYPE_19=m.TYPE_19=19,m.prototype.TYPE_20=m.TYPE_20=20,m.prototype.TYPE_21=m.TYPE_21=21,m.prototype.TYPE_22=m.TYPE_22=22,m.prototype.TYPE_23=m.TYPE_23=23,m.prototype.TYPE_24=m.TYPE_24=24,m.prototype.language=m.language="zh_cn",m.prototype.PATH=m.PATH="explorerSetMsg";var v=new m;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(g,"loger","D:/work/PCLive/src/ape/ErrorApe.js"),__REACT_HOT_LOADER__.register(m,"ErrorApe","D:/work/PCLive/src/ape/ErrorApe.js"),__REACT_HOT_LOADER__.register(v,"default","D:/work/PCLive/src/ape/ErrorApe.js"))})()},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e),this.MAPS={}}return i(e,[{key:"on",value:function(e,t){if(e&&t){var n=this.MAPS[e];if(!n)return this.MAPS[e]=[t];n.push(t)}}},{key:"off",value:function(e,t){if(e){var n=this.MAPS[e];if(n){if(t)return n.splice(n.indexOf(t),1);n.length=0}}}},{key:"_emit",value:function(e,t,n){if(e){var i=this.MAPS["*"];i&&i.length&&i.forEach(function(i){i(e,t,n)});var r=this.MAPS[e];r&&r.length&&r.forEach(function(e){e(t,n)})}}}]),e}(),a=r;t.default=a;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"Emiter","D:/work/PCLive/src/Emiter.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/PCLive/src/Emiter.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=(i(f),n(2)),p=i(h),_=n(3),g=(i(_),u.default.getLoger("PC-UIControlApe")),m=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.showLoadingFull=!0,e.init(),e}return o(t,e),s(t,[{key:"init",value:function(){(0,p.default)(".spinnerMasker").on("mouseenter",this._showExitSpinnerMasker.bind(this)),(0,p.default)(".spinnerMasker").on("mouseleave",this._hideExitSpinnerMasker.bind(this)),(0,p.default)(".exitSpinnerMaskerA").on("click",this._exitSpinner.bind(this))}},{key:"enabledLeftBar",value:function(){(0,p.default)("#leftBarEnabledMask").hide()}},{key:"disEnabledLeftBar",value:function(){(0,p.default)("#leftBarEnabledMask").show()}},{key:"enabledBottomBar",value:function(){(0,p.default)("#bottomBarEnabledMask").hide()}},{key:"disEnabledBottomBar",value:function(){(0,p.default)("#bottomBarEnabledMask").show()}},{key:"showBottomDocControlBar",value:function(){(0,p.default)("#docControlBar").show()}},{key:"hideBottomDocControlBar",value:function(){(0,p.default)("#docControlBar").hide()}},{key:"enabledDocBar",value:function(){(0,p.default)("#docFileBtn").attr("disabled",!1),(0,p.default)(".mediaFileContentMenuSpan").css("background","#3A9AD9")}},{key:"disEnabledDocBar",value:function(){(0,p.default)("#docFileBtn").attr("disabled",!0),(0,p.default)(".mediaFileContentMenuSpan").css("background","#9aa5ad")}},{key:"enabledMediaBar",value:function(){(0,p.default)("#mediaFileBtn").attr("disabled",!1),(0,p.default)(".mediaFileContentMenuSpan").css("background","#3A9AD9")}},{key:"disEnabledMediaBar",value:function(){(0,p.default)("#mediaFileBtn").attr("disabled",!0),(0,p.default)(".mediaFileContentMenuSpan").css("background","#9aa5ad")}},{key:"enabledMusicBar",value:function(){(0,p.default)("#musicFileBtn").attr("disabled",!1),(0,p.default)(".mediaFileContentMenuSpan").css("background","#3A9AD9")}},{key:"disEnabledMusicBar",value:function(){(0,p.default)("#musicFileBtn").attr("disabled",!0),(0,p.default)(".mediaFileContentMenuSpan").css("background","#9aa5ad")}},{key:"showLoadingMask",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];(0,p.default)(".spinnerMasker").show(),this.showLoadingFull=Boolean(e),1==this.showLoadingFull?this._defaultShow():this._minimizeShow()}},{key:"hideLoadingMask",value:function(){(0,p.default)(".spinnerMasker").hide(),(0,p.default)(".minspinner").css("width","0%"),(0,p.default)(".spinnerHtml").html("")}},{key:"updataLoadingMaskProgress",value:function(e){(0,p.default)(".spinnerHtml").html("loading "+e+"%"),(0,p.default)(".minspinner").css("width",e+"%")}},{key:"_exitSpinner",value:function(){this.showLoadingMask(!this.showLoadingFull)}},{key:"_showExitSpinnerMasker",value:function(){(0,p.default)(".exitSpinnerMasker").show()}},{key:"_hideExitSpinnerMasker",value:function(){(0,p.default)(".exitSpinnerMasker").hide()}},{key:"_defaultShow",value:function(){(0,p.default)(".spinnerMasker").css({width:"100%",height:"100%",bottom:"0"}),(0,p.default)(".spinnerMask").show(),(0,p.default)(".spinner").show(),(0,p.default)(".spinnerHtml").css("top","50%"),(0,p.default)(".exitSpinnerMasker").css("top","39%")}},{key:"_minimizeShow",value:function(){var e=(0,p.default)(".spinnerMasker");e.css({width:"300px",height:"42px",bottom:-(0,p.default)(".botTurn").height()}),(0,p.default)(".spinnerMask").hide(),(0,p.default)(".spinner").hide(),(0,p.default)(".spinnerHtml").css("top","25%"),(0,p.default)(".exitSpinnerMasker").css("top","25%")}}]),t}(c.default),v=new m;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(g,"loger","D:/work/PCLive/src/ape/UIControlApe.js"),__REACT_HOT_LOADER__.register(m,"UIControlApe","D:/work/PCLive/src/ape/UIControlApe.js"),__REACT_HOT_LOADER__.register(v,"default","D:/work/PCLive/src/ape/UIControlApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(1),s=i(o),l=n(38),u=i(l),d=n(4),c=i(d),f=n(16),h=i(f),p=s.default.getLoger("PC-FlashToolComponet"),_="PC-FlashToolComponet",g=n(37),m=function(){function e(){r(this,e),this.flashId="",this.isMainFlash=!1,this.swfUrl="",this.divName="",this.flashCallback=null,this.publishTimer=0,this.isInPublish=!1,this.publishType="",this.flashObj=null,this.publishResult={},this.mediaId=0,this.rtmpURL="",this.nodeId=0,this.userName="",this.userId="",this.userRole="",this.myUserRole="",this.screenWidth=0,this.screenHeight=0,this.showFullBtn=!1,this.isPublishVideo=!0,this.isPublishAudio=!0,this.status=0,this.seek=0,this.mediaVolume=60,this.backgroundColor=3487030,this.autoShowLayout=!1,this.leftGap=e.LEFT_GAP,this.topGap=e.TOP_GAP,this.layoutType=e.LAYOUT_V,this.layoutGapV=e.LAYOUT_GAP_V,this.layoutGapH=e.LAYOUT_GAP_H,this.mediaType=e.VIDEO,this.videoImage="",this.audioImage="",this.audioBtnImage="",this.videoBtnImage="",this.stopPublishImage="",this.playersDataList=[],this.docNoteCallback=null,this.onselfFlashSettingCallback=null,this.otherFlashSettingCallback=null,this.historyPlayDataList={}}return a(e,[{key:"init",value:function(t){t&&(this.swfUrl=t.swfUrl,this.divName=""+t.divName,this.flashCallback=t.callBack,this.layoutType=t.layoutType||e.LAYOUT_V,this.videoImage=t.videoImage||"",this.audioImage=t.audioImage||"",this.audioBtnImage=t.audioBtnImage||"",this.videoBtnImage=t.videoBtnImage||"",this.stopPublishImage=t.stopPublishImage||"",this.playersDataList=t.playersDataList||[],this.autoShowLayout=t.autoShowLayout||!1,t.backgroundColor&&(this.backgroundColor=t.backgroundColor)),this.flashObj=null,this.publishResult={},p.log("init->divName:"+this.divName,"mediaId:",this.mediaId);var n=document.getElementById(this.divName);n?this.creatFlash():(p.error("创建Flash时必须传递一个div的id,不能传递class"),alert("创建Flash播放器时必须传递一个div的id,不能传递class"))}},{key:"js2native",value:function(e){var t="";try{t=JSON.stringify({type:parseInt(e.type),data:e.data||{}})}catch(e){p.warn("JS发送数据到flash->数据转换为JSON失败")}this.flashObj&&this.flashObj._js2native?(p.log("JS发送数据到flash->"+this.swfUrl),this.flashObj._js2native(t)):p.warn("JS发送数据到flash->flash对象不存在或_js2native无效")}},{key:"creatFlash",value:function(){return p.log("创建flash->",this.mediaId),this.flashObj?void p.log("已经创建了flashObj"):void(0,u.default)(this.swfUrl,this.divName,"100%","100%",this.creatFlashSuccess.bind(this),this.flashAddEventListener.bind(this),this.logCallback.bind(this))}},{key:"creatFlashSuccess",value:function(t,n,i){if(t){var r=navigator.plugins["Shockwave Flash"];return r||(p.error("flash被禁用"),this.flashCallback&&this.flashCallback({type:e.TYPE_30})),p.error("js->页面创建flash失败->",t)}this.flashObj=n,this.setVideoConfigData();var a={};if(i&&(a=JSON.parse(i)||{},this.flashId=a.data.flashId||""),console.warn("flash创建完成->infoObj","this.flashId:"+this.flashId,"this.isMainFlash:"+this.isMainFlash,a),"flashPlayer"==this.flashId){if(this.isMainFlash){console.log("flash返回的设备信息->",a),e.userDeviceInfo.deviceInfo.cameras=a.data.cameras,e.userDeviceInfo.deviceInfo.microphones=a.data.microphones;var o=e.userDeviceInfo.deviceInfo.curCamera;a.data.cameras.length>0&&a.data.cameras.indexOf(o)<0&&(e.userDeviceInfo.deviceInfo.curCamera=a.data.cameras[0]||"");var s=e.userDeviceInfo.deviceInfo.curMicrophone;a.data.microphones.length>0&&a.data.microphones.indexOf(s)<0&&(e.userDeviceInfo.deviceInfo.curMicrophone=a.data.microphones[0]||""),(!a.data.cameras||a.data.cameras.length<1)&&(p.warn("摄像头获取失败->"),this.flashCallback&&this.flashCallback({type:e.TYPE_24})),(!a.data.microphones||a.data.microphones.length<1)&&(p.warn("麦克风获取失败->"),this.flashCallback&&this.flashCallback({type:e.TYPE_25})),e.sendDeviceInfo2sdk(),e.saveLocalStore()}this.setFlashDeviceInfo(e.userDeviceInfo)}e.list[this.divName]=this,p.log(this.swfUrl+"->flash加载->完成->flashId:"+this.flashId),this.flashCallback&&this.flashCallback({type:e.TYPE_0}),this.playHistroyMedia()}},{key:"playHistroyMedia",value:function(){console.warn(this.swfUrl+"->flash加载->完成->检查是否需要播放视频->this.historyPlayDataList:",this.historyPlayDataList);for(var t in this.historyPlayDataList){var n=this.historyPlayDataList[t];n&&n.rtmpURL&&(n.mediaType==e.MEDIA_SHARE?this.playMediaUrl({rtmpUrl:n.rtmpURL,mediaId:n.mediaId,mediaType:n.mediaType||e.MEDIA_SHARE,nodeId:n.nodeId||0,userRole:n.userRole||"normal",screenWidth:n.screenWidth||0,screenHeight:n.screenHeight||0,showFullBtn:n.showFullBtn||!1,status:n.status,seek:n.seek,mediaVolume:n.mediaVolume}):this.playMedia({rtmpUrl:n.rtmpURL,mediaId:n.mediaId,mediaType:n.mediaType,nodeId:n.nodeId,userRole:n.userRole,screenWidth:n.screenWidth||0,screenHeight:n.screenHeight||0,showFullBtn:n.showFullBtn||!1}))}}},{key:"flashAddEventListener",value:function(t){var n=JSON.parse(t);switch(n.type){case e.TYPE_1:p.log("获取文档note完成->"),this.docNoteCallback&&this.docNoteCallback(n.data);break;case e.TYPE_2:p.log("播放流成功");break;case e.TYPE_3:p.log("flash->加载完成",msg);var i=msg.data.msg;i&&(e.userDeviceInfo.deviceInfo.cameras=i.cameras||[],e.userDeviceInfo.deviceInfo.microphones=i.microphones||[],e.saveLocalStore(),e.sendDeviceInfo2sdk()),this.flashCallback&&this.flashCallback({type:e.TYPE_3});break;case e.TYPE_5:p.log(this.swfUrl+"->主动->flash停止推流");break;case e.TYPE_9:p.log(this.swfUrl+"->flash中保存设备设置信息完成->");break;case e.TYPE_10:break;case e.TYPE_12:e.flashSettingChange(n.data.msg),this.onselfFlashSettingCallback&&this.onselfFlashSettingCallback(n.data.msg);break;case e.TYPE_13:this.otherFlashSettingCallback&&this.otherFlashSettingCallback(n.data.msg);break;case e.TYPE_14:this.flashCallback&&this.flashCallback(n.data),e.flashPlayerSwf&&(e.flashPlayerSwf.closeCamera(),e.flashPlayerSwf.closeMicrophone());break;case e.TYPE_15:p.warn("返回设备的系统信息->",n.data);break;case e.TYPE_16:p.warn("设置面板点击了测试MS速度->",n.data),this.flashCallback&&this.flashCallback(n.data);break;case e.TYPE_17:p.warn("设置面板测试MS速度完成返回->",n),this.flashCallback&&this.flashCallback(n);break;case e.TYPE_18:this.flashCallback&&this.flashCallback(n.data);break;case e.TYPE_20:p.warn("摄像头麦克风权限没有开启->"),this.flashCallback&&this.flashCallback(n),h.default.showSecurityPanelSeting();break;case e.TYPE_21:this.flashCallback&&this.flashCallback(n);break;case e.TYPE_24:this.flashCallback&&this.flashCallback({type:e.TYPE_24});break;case e.TYPE_25:this.flashCallback&&this.flashCallback({type:e.TYPE_25});break;case e.TYPE_27:this.flashCallback&&this.flashCallback({type:e.TYPE_27});break;case e.TYPE_31:this.flashCallback&&this.flashCallback(n);break;case e.TYPE_42:h.default.updateCameraImage(n.data);break;case e.TYPE_52:e.flashSetingToolsSwf&&e.flashSetingToolsSwf.showMicrophoneLevel(n.data.activityLevel),h.default.updateMicrophoneActivityLevel(n.data);break;case e.TYPE_62:e.flashSetingToolsSwf&&e.flashSetingToolsSwf.showSpeakerLevel(n.data.activityLevel),h.default.updateSpeakerTestActivityLevel(n.data);break;case e.TYPE_101:p.log("收到点击视频推流消息"),this.getPublishPathAndPublish({mediaType:e.VIDEO,playerId:n.data.playerId});break;case e.TYPE_102:p.log("收到点击音频推流消息"),this.getPublishPathAndPublish({mediaType:e.AUDIO,playerId:n.data.playerId});break;case e.TYPE_103:p.log("收到点击停止推流消息",n.data),this.stopPublish(n.data);break;case e.TYPE_105:p.warn("无法推流->没有空闲的播放器"),this.flashCallback&&this.flashCallback({type:e.TYPE_105});break;default:p.log("default->",n.data.type)}}},{key:"logCallback",value:function(e){console.warn(this.divName+"->"+this.swfUrl+"->",e),c.default.api("addWarn","[flash]"+e)}},{key:"updateDeviceInfo",value:function(t){if(p.log(this.divName+"->更新设备信息---->",t),t)switch(console.log(e.userDeviceInfo),t.actionType){case e.CHANGE_CAMERA:p.log("actionType-->切换摄像头",t.actionType),this.setFlashDeviceInfo(e.userDeviceInfo);break;case e.CHANGE_RESOLUTION:p.log("actionType-->切换分辨率",t.actionType),this.setFlashDeviceInfo(e.userDeviceInfo);break;case e.CHANGE_MICROPHONE:p.log("actionType-->切换麦克风",t.actionType),this.setFlashDeviceInfo(e.userDeviceInfo);break;case e.CHANGE_MICROPHONE_CODE:p.log("actionType-->切换麦克风模式",t.actionType),this.setFlashDeviceInfo(e.userDeviceInfo);break;case e.CHANGE_MICROPHONE_GAIN:p.log("actionType-->更改麦克风音量",t.actionType),this.setFlashDeviceInfo(e.userDeviceInfo);break;case e.CHANGE_MICROPHONE_NOISE:p.log("actionType-->更改麦克风回声降噪值",t.actionType),this.setFlashDeviceInfo(e.userDeviceInfo);break;case e.CHANGE_MICROPHONE_AUTO_GAIN:p.log("actionType-->更改麦克风自动调节音量",t.actionType),this.setFlashDeviceInfo(e.userDeviceInfo);break;case e.CHANGE_SPEAKER_VOLUME:p.log("actionType-->更改扬声器音量",t.actionType),this.setFlashDeviceInfo(e.userDeviceInfo);break;default:p.log("actionType-->其他",t.actionType)}}},{key:"dispatchClickPublish",value:function(t){var n=e.TYPE_101;t.mediaType==e.AUDIO&&(n=e.TYPE_102),this.isInPublish=!0,this.userName=t.userName||"",this.userRole=t.userRole||"normal",this.nodeId=t.nodeId||0,this.js2native({type:n,data:t})}},{key:"dispatchClickStopPublish",value:function(t){this.userName=t.userName||"",this.userRole=t.userRole||"normal",this.nodeId=t.nodeId||0,this.isInPublish=!1,this.publishType="",this.js2native({type:e.TYPE_103,data:t})}},{key:"changeMsAndRePublish",value:function(t){var n=this;t&&(p.warn("MS切换后,如果当前自己正在推流,需要重新推流",this.isInPublish,t),this.isInPublish&&(clearTimeout(this.publishTimer),this.dispatchClickStopPublish(t),this.publishTimer=setTimeout(function(){n.publishType==e.AUDIO?t.mediaType=e.AUDIO:t.mediaType=e.VIDEO,n.dispatchClickPublish(t)},2e3)))}},{key:"stopPublish",value:function(t){t&&(this.publishType="",t.mediaType==e.AUDIO?(this.isInPublish=!1,c.default.api("unPublishAudio",{nodeId:0,mediaId:parseInt(t.mediaId)})):(this.isInPublish=!1,c.default.api("unPublishVideo",{nodeId:0,mediaId:parseInt(t.mediaId)})))}},{key:"getPublishPathAndPublish",value:function(t){if(t){var n=this.getPublishPath(t);n.playerId=t.playerId||0,n.userName=this.userName||"",n.userRole=this.myUserRole,n.nodeId=this.nodeId||0,0==n.code?(this.sendPublishMessage2sdk(n),this.publishVideoAudio(n)):1==n.code&&(p.log("获取推流地址失败==>",n),this.flashCallback&&this.flashCallback({type:e.TYPE_106}))}}},{key:"sendPublishMessage2sdk",value:function(t){if(!t)return void p.warn("发送推流消息给SDK失败->数据无效",t);p.log("发送推流成功的消息给SDK",t);var n=null;this.publishType=t.mediaType,n=t.mediaType==e.AUDIO?c.default.api("publishAudio",t):c.default.api("publishVideo",t),this.isInPublish=!0,0==n.code?(p.log("flash推流成功-->同步消息成功"),this.flashCallback&&this.flashCallback({type:e.TYPE_10})):1==n.code&&(p.log("flash推流成功-->同步消息失败-->关闭推流"),this.dispatchClickStopPublish(t))}},{
key:"getPublishPath",value:function(t){var n={};return t.mediaType==e.AUDIO?(n=c.default.api("getAudioPublishPath",{type:"live"}),n.isPublishVideo=!1,n.isPublishAudio=!0):(n=c.default.api("getVideoPublishPath",{type:"live"}),n.isPublishVideo=!0,n.isPublishAudio=!0),n.mediaType=t.mediaType,console.log("获取音视频推流地址->",n),n}},{key:"startPublishMediaStream",value:function(t){t||p.log("startPublishMediaStream->参数错误:",t),this.mediaType=t.mediaType,this.nodeId=t.nodeId||0,this.userRole=t.userRole||"normal",this.mediaType==e.AUDIO?(this.isPublishVideo=!1,this.isPublishAudio=!0,this.publishResult=c.default.api("getAudioPublishPath",{type:"live"})):(this.isPublishVideo=!0,this.isPublishAudio=!0,this.publishResult=c.default.api("getVideoPublishPath",{type:"live"})),0==this.publishResult.code?this.flashObj?this.publishURL(this.publishResult.mediaId,this.publishResult.publishUrl):this._checkFlashPlugings():1==this.publishResult.code&&p.log("获取推流地址失败==>",this.publishResult.data)}},{key:"publishVideoAudio",value:function(t){this._checkFlashPlugings(),p.warn("当前推流数据->_publishData->",t),this.js2native({type:e.TYPE_10,data:{fps:e.videoInfo.fps||15,gop:e.videoInfo.gop||3,videoQuality:e.videoInfo.videoQuality,curVideoQuality:e.videoInfo.curVideoQuality,cameraName:e.userDeviceInfo.deviceInfo.curCamera,microphoneName:e.userDeviceInfo.deviceInfo.curMicrophone,speakerVolume:e.userDeviceInfo.deviceInfo.speakerVolume,micCode:e.userDeviceInfo.deviceInfo.micCode,micGain:e.userDeviceInfo.deviceInfo.micGain,micNoise:e.userDeviceInfo.deviceInfo.micNoise,autoGain:e.userDeviceInfo.deviceInfo.autoGain,video:t.isPublishVideo,audio:t.isPublishAudio,url:t.publishUrl,mediaId:t.mediaId,mediaType:t.mediaType,userName:t.userName,userId:t.userId,userRole:t.userRole,nodeId:t.nodeId,playerId:t.playerId}})}},{key:"publishURL",value:function(t,n,i){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];this.flashObj._js2native?(this.mediaId=t,this.rtmpURL=n,p.warn("当前推流地址->publishURL->",this.rtmpURL),this.js2native({type:e.TYPE_10,data:{fps:e.videoInfo.fps||15,gop:e.videoInfo.gop||3,videoQuality:e.videoInfo.videoQuality,curVideoQuality:e.videoInfo.curVideoQuality,cameraName:e.userDeviceInfo.deviceInfo.curCamera,microphoneName:e.userDeviceInfo.deviceInfo.curMicrophone,speakerVolume:e.userDeviceInfo.deviceInfo.speakerVolume,micCode:e.userDeviceInfo.deviceInfo.micCode,micGain:e.userDeviceInfo.deviceInfo.micGain,micNoise:e.userDeviceInfo.deviceInfo.micNoise,autoGain:e.userDeviceInfo.deviceInfo.autoGain,video:r,audio:a,url:n,mediaId:t,mediaType:i,userName:this.userName,userId:this.userId,userRole:this.userRole}})):(this.rtmpURL="",this.mediaId=0,this.nodeId=0,p.log("publishURL->_js2native无效"))}},{key:"setVideoConfigData",value:function(){this.js2native({type:e.TYPE_4,data:{backgroundColor:this.backgroundColor,leftGap:this.leftGap,topGap:this.topGap,layoutGapV:this.layoutGapV,layoutGapH:this.layoutGapH,layoutType:this.layoutType,videoImage:this.videoImage,audioImage:this.audioImage,audioBtnImage:this.audioBtnImage,videoBtnImage:this.videoBtnImage,stopPublishImage:this.stopPublishImage,playersDataList:this.playersDataList,autoShowLayout:this.autoShowLayout}})}},{key:"setFlashDeviceInfo",value:function(t){this.js2native({type:e.TYPE_9,data:{isRepublish:e.isRepublish,url:this.rtmpURL,userDeviceInfo:t}})}},{key:"playMedia",value:function(t){if(!t)return void p.warn("playMedia->参数错误",t);this.rtmpURL=t.rtmpUrl,this.mediaId=t.mediaId,this.mediaType=t.mediaType||e.VIDEO,this.nodeId=t.nodeId||0,this.userRole=t.userRole||"normal",this.userId=t.userId||"0",this.userName=t.userName||"",this.screenWidth=t.screenWidth||0,this.screenHeight=t.screenHeight||0,this.showFullBtn=t.showFullBtn||!1;var n=0;return n=0==t.deviceType?0:parseInt(t.deviceType),this.rtmpURL?void(this.flashObj?(p.warn("当前播放音视频======>"),this.js2native({type:e.TYPE_2,data:{fps:e.videoInfo.fps||15,gop:e.videoInfo.gop||3,videoQuality:e.videoInfo.videoQuality,curVideoQuality:e.videoInfo.curVideoQuality,cameraName:e.userDeviceInfo.deviceInfo.curCamera,microphoneName:e.userDeviceInfo.deviceInfo.curMicrophone,speakerVolume:e.userDeviceInfo.deviceInfo.speakerVolume||80,micCode:e.userDeviceInfo.deviceInfo.micCode,micGain:e.userDeviceInfo.deviceInfo.micGain,micNoise:e.userDeviceInfo.deviceInfo.micNoise,autoGain:e.userDeviceInfo.deviceInfo.autoGain,url:this.rtmpURL,mediaType:this.mediaType,mediaId:this.mediaId,screenWidth:this.screenWidth,screenHeight:this.screenHeight,showFullBtn:this.showFullBtn,userName:this.userName,userId:this.userId,nodeId:this.nodeId||0,userRole:this.userRole,deviceType:n,optionJsonData:t.optionJsonData}})):(p.warn(this.swfUrl,"播放音视频->flashObj->没有创建->请检查浏览器是否禁用了flash或者禁止弹框,设置之后再重新打开网页!"),this._checkFlashPlugings(),this.historyPlayDataList[this.mediaId]={rtmpURL:this.rtmpURL,mediaId:this.mediaId,mediaType:this.mediaType||e.VIDEO,nodeId:this.nodeId||0,userRole:this.userRole||"normal",screenWidth:this.screenWidth||0,screenHeight:this.screenHeight||0,showFullBtn:this.showFullBtn||!1,status:this.status||1,seek:this.seek||0,mediaVolume:this.mediaVolume||0,deviceType:n,optionJsonData:t.optionJsonData})):void p.log("播放音视频->失败->地址无效",this.rtmpURL)}},{key:"playMediaUrl",value:function(t){return t?(this.rtmpURL=t.rtmpUrl,this.mediaId=t.mediaId,this.mediaType=t.mediaType||e.VIDEO,this.nodeId=t.nodeId||0,this.userRole=t.userRole||"normal",this.screenWidth=t.screenWidth||0,this.screenHeight=t.screenHeight||0,this.showFullBtn=t.showFullBtn||!1,this.status=t.status||1,this.seek=t.seek||0,this.mediaVolume=t.mediaVolume||0,this.rtmpURL?void(this.flashObj?(p.warn("当前播放媒体文件======>"),this.js2native({type:e.TYPE_18,data:{fps:e.videoInfo.fps||15,gop:e.videoInfo.gop||3,videoQuality:e.videoInfo.videoQuality,curVideoQuality:e.videoInfo.curVideoQuality,cameraName:e.userDeviceInfo.deviceInfo.curCamera,microphoneName:e.userDeviceInfo.deviceInfo.curMicrophone,speakerVolume:e.userDeviceInfo.deviceInfo.speakerVolume||80,micCode:e.userDeviceInfo.deviceInfo.micCode,micGain:e.userDeviceInfo.deviceInfo.micGain,micNoise:e.userDeviceInfo.deviceInfo.micNoise,autoGain:e.userDeviceInfo.deviceInfo.autoGain,url:this.rtmpURL,mediaType:this.mediaType,status:this.status,seek:this.seek,mediaVolume:this.mediaVolume,screenWidth:this.screenWidth,screenHeight:this.screenHeight,showFullBtn:this.showFullBtn}})):(p.warn(this.swfUrl,"播放音视频->flashObj->没有创建->请检查浏览器是否禁用了flash或者禁止弹框,设置之后再重新打开网页!"),this.historyPlayDataList[this.mediaId]={rtmpURL:this.rtmpURL,mediaId:this.mediaId,mediaType:this.mediaType||e.VIDEO,nodeId:this.nodeId||0,userRole:this.userRole||"normal",screenWidth:this.screenWidth||0,screenHeight:this.screenHeight||0,showFullBtn:this.showFullBtn||!1,status:this.status||1,seek:this.seek||0,mediaVolume:this.mediaVolume||0})):void p.log("播放媒体文件->失败->地址无效",this.rtmpURL)):void p.warn("播放媒体文件->参数错误",t)}},{key:"stopFlashPlay",value:function(t){p.log("flash停止推流或播放->",t),this.js2native({type:e.TYPE_5,data:t})}},{key:"setPoster",value:function(t,n){console.log(this.swfUrl+"->setPoster"),t||p.log("设置播放器图片->地址无效",t),n||p.log("设置播放器图片->地址无效",n),this.flashObj?this.js2native({type:e.TYPE_11,data:{videoImage:t,audioImage:n}}):p.log("设置播放器图片->失败->播放器对象不存在")}},{key:"getDocNoteInfo",value:function(t,n){this.docNoteCallback=n,this._checkFlashPlugings(),this.flashObj?this.js2native({type:e.TYPE_1,data:{docId:t}}):(p.log("获取文档note信息->失败->FLASH对象不存在"),this.docNoteCallback&&this.docNoteCallback({docId:"",docNoteArr:[]}))}},{key:"flashTestMsBW",value:function(t){p.log("测试ms网速",t),this._checkFlashPlugings(),this.flashObj?this.js2native({type:e.TYPE_16,data:{msTestData:t.data}}):p.log("测试ms网速->失败->FLASH对象不存在")}},{key:"flashShowMsTestBWcallBack",value:function(e){p.log("显示MS测速结果"),h.default.updateMsDetection(e.data.data)}},{key:"flashSetingDeviceOnsSelf",value:function(t,n){if(console.log("flashSetingDeviceOnsSelf-",t),this.onselfFlashSettingCallback=n,this.otherFlashSettingCallback=null,this.flashObj){this.js2native({type:e.TYPE_12,data:{nodeData:t.nodeData}}),e.flashPlayerSwf?(p.log("打开自己设置面板的时候开启音视频检测"),e.flashPlayerSwf.openCamera("","",200,!0,160,120),e.flashPlayerSwf.openMicrophone()):p.warn("打开自己设置面板的时候开启音视频检测->失败->flashPlayerSwf",e.flashPlayerSwf)}else p.log("自己的设备设置->失败->FLASH对象不存在")}},{key:"flashSetingDeviceOther",value:function(t,n){console.log("flashSetingDeviceOther-",t),this.otherFlashSettingCallback=n,this.onselfFlashSettingCallback=null,this.js2native({type:e.TYPE_13,data:{nodeData:t.nodeData}})}},{key:"openCamera",value:function(t,n,i,r,a,o){this._checkFlashPlugings(),this.js2native({type:e.TYPE_40,data:{cameraName:n||"",imageBase64Str:t||"",delay:i||400,isShow:r,width:a||160,height:o||120}})}},{key:"closeCamera",value:function(t){this.js2native({type:e.TYPE_41,data:{cameraName:""}})}},{key:"openMicrophone",value:function(t,n){this._checkFlashPlugings(),this.js2native({type:e.TYPE_50,data:{micName:t||"",micGain:parseInt(n)||0}})}},{key:"closeMicrophone",value:function(t){this.js2native({type:e.TYPE_51,data:{micName:""}})}},{key:"showMicrophoneLevel",value:function(t){this._checkFlashPlugings(),this.js2native({type:e.TYPE_52,data:{activityLevel:t||0}})}},{key:"openSpeakerTest",value:function(t,n){this._checkFlashPlugings(),this.js2native({type:e.TYPE_60,data:{musicUrl:t||"sound.mp3",micGain:n||50}})}},{key:"closeSpeakerTest",value:function(){this.js2native({type:e.TYPE_61,data:{micName:""}})}},{key:"showSpeakerLevel",value:function(t){this.js2native({type:e.TYPE_52,data:{activityLevel:t||0}})}},{key:"_checkFlashPlugings",value:function(){return!!this.flashObj||(p.warn("flashObj->没有创建->请检查浏览器是否禁用了flash或者禁止弹框,设置之后再重新打开网页!"),this.flashCallback&&this.flashCallback({type:e.TYPE_30}),!1)}},{key:"publishResultObj",get:function(){return this.publishResult}}],[{key:"getLocalStore",value:function(t){p.log("获取本地设备数据->"),g.get("settings",function(n,i){!n&&i?(console.log("获取本地设备数据完成->",i),e.userDeviceInfo=i):console.log("获取本地设备数据失败->",n),t&&t(i)})}},{key:"saveLocalStore",value:function(t,n){console.log("存储数据到本地->",e.userDeviceInfo),e.userDeviceInfo.actionType="",g.set("settings",e.userDeviceInfo,function(e,t){e?console.log("保存本地设备数据失败->",e):console.log("保存本地设备数据完成->",t),n&&n()})}},{key:"flashSettingChange",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];p.log("flash设置发生改变->_isRepublish",n,t),e.isRepublish=n,t&&(e.userDeviceInfo=t,e.sendDeviceInfo2sdk(),e.saveLocalStore())}},{key:"flashSettingChangeSelf",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];p.log("h5设置发生改变->_isRepublish",n,t),e.isRepublish=n,t&&(e.userDeviceInfo.nodeData=t,e.userDeviceInfo.actionType=t.actionType||"",e.userDeviceInfo.deviceInfo.cameras=t.cameras,e.userDeviceInfo.deviceInfo.microphones=t.microphones,e.userDeviceInfo.deviceInfo.curCamera=t.curCamera,e.userDeviceInfo.deviceInfo.curMicrophone=t.curMicrophone,e.userDeviceInfo.deviceInfo.micCode=t.micCode,e.userDeviceInfo.deviceInfo.speakerVolume=t.speakerVolume,e.userDeviceInfo.deviceInfo.micGain=t.micGain,e.userDeviceInfo.deviceInfo.micNoise=t.micNoise,e.userDeviceInfo.deviceInfo.autoGain=t.autoGain,e.userDeviceInfo.deviceInfo.videoQuality=t.videoQuality,e.userDeviceInfo.deviceInfo.curVideoQuality=t.curVideoQuality,e.videoInfo.curVideoQuality=t.curVideoQuality,e.sendDeviceInfo2sdk(),e.saveLocalStore())}},{key:"sendDeviceInfo2sdk",value:function(){var t=e.userDeviceInfo.deviceInfo;p.log("sendDeviceInfo2sdk--->",t),c.default.api("setDeviceInfo",{videoQuality:parseInt(t.videoQuality),cameras:t.cameras||[],microphones:t.microphones||[],curCamera:t.curCamera||"",curMicrophone:t.curMicrophone||"",curVideoQuality:parseInt(t.curVideoQuality),micGain:t.micGain||70,micNoise:t.micNoise||70,autoGain:Boolean(t.autoGain),speakerVolume:t.speakerVolume||80});var n=e.list;for(var i in n){var r=n[i];r&&r.updateDeviceInfo(e.userDeviceInfo)}}},{key:"setMediaVideoConfig",value:function(t,n,i){p.warn("保存从Sass获取的音视频信息-->videoQuality:"+i,"fps:"+t,"gop:"+n),e.userDeviceInfo.deviceInfo.fps=t||15,e.userDeviceInfo.deviceInfo.gop=n||3,e.userDeviceInfo.deviceInfo.videoQuality=parseInt(i),e.userDeviceInfo.deviceInfo.curVideoQuality=parseInt(i),e.videoInfo.fps=t||15,e.videoInfo.gop=n||3,e.videoInfo.videoQuality=parseInt(i),e.videoInfo.curVideoQuality=parseInt(i),e.getLocalStore(function(){e.userDeviceInfo.deviceInfo.fps=t||15,e.userDeviceInfo.deviceInfo.gop=n||3,e.userDeviceInfo.deviceInfo.videoQuality=parseInt(i),e.userDeviceInfo.deviceInfo.curVideoQuality=parseInt(i),e.videoInfo.fps=t||15,e.videoInfo.gop=n||3,e.videoInfo.videoQuality=parseInt(i),e.videoInfo.curVideoQuality=parseInt(i),e.sendDeviceInfo2sdk()})}}]),e}();m.isRepublish=!0,m.isFlashGetDefaultSetting=!1,m.list={},m.flashSetingToolsSwf=null,m.flashPlayerSwf=null,m.userDeviceInfo={actionType:"",nodeData:{},deviceInfo:{cameras:[],curMicrophone:"",microphones:[],curCamera:"",micCode:0,fps:15,speakerVolume:80,micGain:70,micNoise:70,autoGain:!0,gop:3,videoQuality:1,curVideoQuality:1}},m.videoInfo={micGain:70,micNoise:70,autoGain:!0,gop:3,videoQuality:1,curVideoQuality:1},m.prototype.TYPE_0=m.TYPE_0=0,m.prototype.TYPE_1=m.TYPE_1=1,m.prototype.TYPE_2=m.TYPE_2=2,m.prototype.TYPE_3=m.TYPE_3=3,m.prototype.TYPE_4=m.TYPE_4=4,m.prototype.TYPE_5=m.TYPE_5=5,m.prototype.TYPE_9=m.TYPE_9=9,m.prototype.TYPE_10=m.TYPE_10=10,m.prototype.TYPE_11=m.TYPE_11=11,m.prototype.TYPE_12=m.TYPE_12=12,m.prototype.TYPE_13=m.TYPE_13=13,m.prototype.TYPE_14=m.TYPE_14=14,m.prototype.TYPE_15=m.TYPE_15=15,m.prototype.TYPE_16=m.TYPE_16=16,m.prototype.TYPE_17=m.TYPE_17=17,m.prototype.TYPE_18=m.TYPE_18=18,m.prototype.TYPE_20=m.TYPE_20=20,m.prototype.TYPE_21=m.TYPE_21=21,m.prototype.TYPE_22=m.TYPE_22=22,m.prototype.TYPE_24=m.TYPE_24=24,m.prototype.TYPE_25=m.TYPE_25=25,m.prototype.TYPE_26=m.TYPE_26=26,m.prototype.TYPE_27=m.TYPE_27=27,m.prototype.TYPE_28=m.TYPE_28=28,m.prototype.TYPE_29=m.TYPE_29=29,m.prototype.TYPE_30=m.TYPE_30=30,m.prototype.TYPE_31=m.TYPE_31=31,m.prototype.TYPE_40=m.TYPE_40=40,m.prototype.TYPE_41=m.TYPE_41=41,m.prototype.TYPE_42=m.TYPE_42=42,m.prototype.TYPE_50=m.TYPE_50=50,m.prototype.TYPE_51=m.TYPE_51=51,m.prototype.TYPE_52=m.TYPE_52=52,m.prototype.TYPE_60=m.TYPE_60=60,m.prototype.TYPE_61=m.TYPE_61=61,m.prototype.TYPE_62=m.TYPE_62=62,m.prototype.TYPE_101=m.TYPE_101=101,m.prototype.TYPE_102=m.TYPE_102=102,m.prototype.TYPE_103=m.TYPE_103=103,m.prototype.TYPE_104=m.TYPE_104=104,m.prototype.TYPE_105=m.TYPE_105=105,m.prototype.TYPE_106=m.TYPE_106=106,m.prototype.CHANGE_CAMERA=m.CHANGE_CAMERA="changeCamera",m.prototype.CHANGE_MICROPHONE=m.CHANGE_MICROPHONE="changeMicrophone",m.prototype.CHANGE_RESOLUTION=m.CHANGE_RESOLUTION="changeResolution",m.prototype.CHANGE_SPEAKER_VOLUME=m.CHANGE_SPEAKER_VOLUME="changeSpeakerVolume",m.prototype.CHANGE_MICROPHONE_GAIN=m.CHANGE_MICROPHONE_GAIN="changeMicrophoneGain",m.prototype.CHANGE_MICROPHONE_CODE=m.CHANGE_MICROPHONE_CODE="changeMicrophoneCode",m.prototype.CHANGE_MICROPHONE_NOISE=m.CHANGE_MICROPHONE_NOISE="changeMicrophoneNoise",m.prototype.CHANGE_MICROPHONE_AUTO_GAIN=m.CHANGE_MICROPHONE_AUTO_GAIN="changeMicrophoneAutoGain",m.prototype.AUDIO=m.AUDIO="audio",m.prototype.VIDEO=m.VIDEO="video",m.prototype.MEDIA_SHARE=m.MEDIA_SHARE="media_share",m.prototype.SCREEN_SHARE=m.SCREEN_SHARE="screen_share",m.prototype.AUDIO=m.AUDIO="audio",m.prototype.AUDIO=m.AUDIO="audio",m.prototype.LAYOUT_V=m.LAYOUT_V="V",m.prototype.LAYOUT_H=m.LAYOUT_H="H",m.prototype.LAYOUT_GAP_H=m.LAYOUT_GAP_H=6,m.prototype.LAYOUT_GAP_V=m.LAYOUT_GAP_V=6,m.prototype.LEFT_GAP=m.LEFT_GAP=0,m.prototype.TOP_GAP=m.TOP_GAP=0;var v=m;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(p,"loger","D:/work/PCLive/src/libs/FlashToolComponet.js"),__REACT_HOT_LOADER__.register(_,"FlashToolComponetLog","D:/work/PCLive/src/libs/FlashToolComponet.js"),__REACT_HOT_LOADER__.register(m,"FlashToolComponet","D:/work/PCLive/src/libs/FlashToolComponet.js"),__REACT_HOT_LOADER__.register(v,"default","D:/work/PCLive/src/libs/FlashToolComponet.js"))})()},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(2),s=i(o),l=n(3),u=function(){function e(t){var n=this;if(r(this,e),this.play=function(){return n.__play__REACT_HOT_LOADER__.apply(n,arguments)},this.onLoaded=function(){return n.__onLoaded__REACT_HOT_LOADER__.apply(n,arguments)},this.pause=function(){return n.__pause__REACT_HOT_LOADER__.apply(n,arguments)},this.resume=function(){return n.__resume__REACT_HOT_LOADER__.apply(n,arguments)},this.seek=function(){return n.__seek__REACT_HOT_LOADER__.apply(n,arguments)},this.stop=function(){return n.__stop__REACT_HOT_LOADER__.apply(n,arguments)},this._clear=function(){return n.___clear__REACT_HOT_LOADER__.apply(n,arguments)},!t)throw new Error("video is missing");this.status=e.STOP,this.video=t,this.isMobile=(0,l.isMobileUA)(),this.isMSE=s.default.isSupported()}return a(e,[{key:"__play__REACT_HOT_LOADER__",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.MODE_VOD,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this._clear(),this.mode=n,this.m3u8=t,this.offset=i+1,!this.isMobile){if(this.isMSE)return this.hls=new s.default,this.hls.loadSource(t),this.hls.attachMedia(this.video),void this.hls.on(s.default.Events.MANIFEST_PARSED,this.onLoaded);throw new Error("this device is not support [ MSE ]")}this.video.src=this.m3u8}},{key:"__onLoaded__REACT_HOT_LOADER__",value:function(){if(this.offset>1)if(this.isMobile)try{this.video.currentTime=this.offset}catch(e){}else this.hls.startLoad(parseInt(this.offset));this.video.play()}},{key:"__pause__REACT_HOT_LOADER__",value:function(){if(this.mode!==e.MODE_VOD)throw new Error("can not pause in *live mode.*");this.video.pause()}},{key:"__resume__REACT_HOT_LOADER__",value:function(){if(this.mode!==e.MODE_VOD)throw new Error("can not resume in *live mode.*");this.video.play()}},{key:"__seek__REACT_HOT_LOADER__",value:function(t){if(this.mode!==e.MODE_VOD)throw new Error("can not seek in *live mode.*");var n=this.m3u8,i=this.mode;if(this.isMobile)try{this.video.currentTime=this.offset}catch(e){}else this.play(n,i,t-1)}},{key:"__stop__REACT_HOT_LOADER__",value:function(){this._clear()}},{key:"___clear__REACT_HOT_LOADER__",value:function(){this.mode===e.MODE_VOD,this.m3u8="",this.offset=0,this.hls&&(this.hls.stopLoad(),this.hls.detachMedia(),this.hls.off(s.default.Events.MANIFEST_PARSED,this.onLoaded),this.hls=null)}}]),e}();u.PLAYING="PLAYING",u.STOP="STOP",u.PAUSE="PAUSE",u.MODE_LIVE="LIVE",u.MODE_VOD="VOD";var d=u;t.default=d,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(u,"HLSPlayer","D:/work/PCLive/node_modules/tinyhls/src/main.js"),__REACT_HOT_LOADER__.register(d,"default","D:/work/PCLive/node_modules/tinyhls/src/main.js"))}()},function(e,t,n){var i,i;!function(t){e.exports=t()}(function(){var e;return function e(t,n,r){function a(s,l){if(!n[s]){if(!t[s]){var u="function"==typeof i&&i;if(!l&&u)return i(s,!0);if(o)return o(s,!0);var d=new Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return a(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof i&&i,s=0;s<r.length;s++)a(r[s]);return a}({1:[function(e,t,n){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,n,i,a,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}if(n=this._events[e],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l<i;l++)u[l].apply(this,a);return!0},i.prototype.addListener=function(e,t){var n;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?i.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},i.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],2:[function(t,n,i){!function(t){var r=/^((?:[^\/;?#]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,a=/^([^\/;?#]*)(.*)$/,o=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,l={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),t=t.trim(),!t){if(!n.alwaysNormalize)return e;var i=this.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");return i.path=l.normalizePath(i.path),l.buildURLFromParts(i)}var r=this.parseURL(t);if(!r)throw new Error("Error trying to parse relative URL.");if(r.scheme)return n.alwaysNormalize?(r.path=l.normalizePath(r.path),l.buildURLFromParts(r)):t;var o=this.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var s=a.exec(o.path);o.netLoc=s[1],o.path=s[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:r.netLoc,path:null,params:r.params,query:r.query,fragment:r.fragment};if(!r.netLoc&&(u.netLoc=o.netLoc,"/"!==r.path[0]))if(r.path){var d=o.path,c=d.substring(0,d.lastIndexOf("/")+1)+r.path;u.path=l.normalizePath(c)}else u.path=o.path,r.params||(u.params=o.params,r.query||(u.query=o.query));return null===u.path&&(u.path=n.alwaysNormalize?l.normalizePath(r.path):r.path),l.buildURLFromParts(u)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(o,"");e.length!==(e=e.replace(s,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};"object"==typeof i&&"object"==typeof n?n.exports=l:"function"==typeof e&&e.amd?e([],function(){return l}):"object"==typeof i?i.URLToolkit=l:t.URLToolkit=l}(this)},{}],3:[function(e,t,n){var i=arguments[3],r=arguments[4],a=arguments[5],o=JSON.stringify;t.exports=function(e,t){function n(e){g[e]=!0;for(var t in r[e][1]){var i=r[e][1][t];g[i]||n(i)}}for(var s,l=Object.keys(a),u=0,d=l.length;u<d;u++){var c=l[u],f=a[c].exports;if(f===e||f&&f.default===e){s=c;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var h={},u=0,d=l.length;u<d;u++){var c=l[u];h[c]=c}r[s]=[Function(["require","module","exports"],"("+e+")(self)"),h]}var p=Math.floor(Math.pow(16,8)*Math.random()).toString(16),_={};_[s]=s,r[p]=[Function(["require"],"var f = require("+o(s)+");(f.default ? f.default : f)(self);"),_];var g={};n(p);var m="("+i+")({"+Object.keys(g).map(function(e){return o(e)+":["+r[e][0]+","+o(r[e][1])+"]"}).join(",")+"},{},["+o(p)+"])",v=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([m],{type:"text/javascript"});if(t&&t.bare)return y;var E=v.createObjectURL(y),S=new Worker(E);return S.objectURL=E,S}},{}],4:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.hlsDefaultConfig=void 0;var r=e(5),a=i(r),o=e(8),s=i(o),l=e(9),u=i(l),d=e(10),c=i(d),f=e(55),h=i(f),p=e(7),_=i(p),g=e(6),m=i(g),v=e(47),y=i(v),E=e(15),S=i(E),T=e(14),C=i(T),R=e(13),b=i(R);n.hlsDefaultConfig={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxSeekHole:2,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.2,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,fragLoadingLoopThreshold:3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:h.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,fetchSetup:void 0,abrController:a.default,bufferController:s.default,capLevelController:u.default,fpsController:c.default,audioStreamController:m.default,audioTrackController:_.default,subtitleStreamController:b.default,subtitleTrackController:C.default,timelineController:S.default,cueHandler:y.default,enableCEA708Captions:!0,enableWebVTT:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",stretchShortVideoTrack:!1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0}},{10:10,13:13,14:14,15:15,47:47,5:5,55:55,6:6,7:7,8:8,9:9}],5:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(32),u=i(l),d=e(31),c=i(d),f=e(34),h=i(f),p=e(30),_=e(50),g=e(48),m=i(g),v=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.FRAG_LOADING,u.default.FRAG_LOADED,u.default.FRAG_BUFFERED,u.default.ERROR));return n.lastLoadedFragLevel=0,n._nextAutoLevel=-1,n.hls=e,n.onCheck=n._abandonRulesCheck.bind(n),n}return o(t,e),s(t,[{key:"destroy",value:function(){this.clearTimer(),c.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(e){var t=e.frag;if("main"===t.type){if(this.timer||(this.timer=setInterval(this.onCheck,100)),!this._bwEstimator){var n=this.hls,i=e.frag.level,r=n.levels[i].details.live,a=n.config,o=void 0,s=void 0;r?(o=a.abrEwmaFastLive,s=a.abrEwmaSlowLive):(o=a.abrEwmaFastVoD,s=a.abrEwmaSlowVoD),this._bwEstimator=new m.default(n,s,o,a.abrEwmaDefaultEstimate)}this.fragCurrent=t}}},{key:"_abandonRulesCheck",value:function(){var e=this.hls,t=e.media,n=this.fragCurrent,i=n.loader,r=e.minAutoLevel;if(!i||i.stats&&i.stats.aborted)return _.logger.warn("frag loader destroy or aborted, disarm abandonRules"),void this.clearTimer();var a=i.stats;if(t&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&n.autoLevel&&n.level){var o=performance.now()-a.trequest,s=Math.abs(t.playbackRate);if(o>500*n.duration/s){var l=e.levels,d=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/o),c=l[n.level],f=c.realBitrate?Math.max(c.realBitrate,c.bitrate):c.bitrate,p=a.total?a.total:Math.max(a.loaded,Math.round(n.duration*f/8)),g=t.currentTime,m=(p-a.loaded)/d,v=(h.default.bufferInfo(t,g,e.config.maxBufferHole).end-g)/s;if(v<2*n.duration/s&&m>v){var y=void 0,E=void 0;for(E=n.level-1;E>r;E--){var S=l[E].realBitrate?Math.max(l[E].realBitrate,l[E].bitrate):l[E].bitrate;if(y=n.duration*S/(6.4*d),y<v)break}y<m&&(_.logger.warn("loading too slow, abort fragment loading and switch to level "+E+":fragLoadedDelay["+E+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+y.toFixed(1)+"<"+m.toFixed(1)+":"+v.toFixed(1)),e.nextLoadLevel=E,this._bwEstimator.sample(o,a.loaded),i.abort(),this.clearTimer(),e.trigger(u.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:a}))}}}}},{key:"onFragLoaded",value:function(e){var t=e.frag;if("main"===t.type&&!isNaN(t.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var n=this.hls.levels[t.level],i=(n.loaded?n.loaded.bytes:0)+e.stats.loaded,r=(n.loaded?n.loaded.duration:0)+e.frag.duration;
n.loaded={bytes:i,duration:r},n.realBitrate=Math.round(8*i/r)}if(e.frag.bitrateTest){var a=e.stats;a.tparsed=a.tbuffered=a.tload,this.onFragBuffered(e)}}}},{key:"onFragBuffered",value:function(e){var t=e.stats,n=e.frag;if(!(t.aborted===!0||1!==n.loadCounter||"main"!==n.type||isNaN(n.sn)||n.bitrateTest&&t.tload!==t.tbuffered)){var i=t.tparsed-t.trequest;_.logger.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this._bwEstimator.sample(i,t.loaded),n.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}}},{key:"onError",value:function(e){switch(e.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}}},{key:"clearTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"_findBestLevel",value:function(e,t,n,i,r,a,o,s,l){for(var u=r;u>=i;u--){var d=l[u],c=d.details,f=c?c.totalduration/c.fragments.length:t,h=!!c&&c.live,p=void 0;p=u<=e?o*n:s*n;var g=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,m=g*f/p;if(_.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(p)+"/"+g+"/"+f+"/"+a+"/"+m),p>g&&(!m||h||m<a))return u}return-1}},{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this._bwEstimator;if(!(e===-1||t&&t.canEstimate()))return e;var n=this._nextABRAutoLevel;return e!==-1&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}},{key:"_nextABRAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,n=e.levels,i=e.config,r=e.minAutoLevel,a=e.media,o=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,l=a?a.currentTime:0,u=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this._bwEstimator?this._bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,c=(h.default.bufferInfo(a,l,i.maxBufferHole).end-l)/u,f=this._findBestLevel(o,s,d,r,t,c,i.abrBandWidthFactor,i.abrBandWidthUpFactor,n);if(f>=0)return f;_.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,m=i.abrBandWidthUpFactor;if(0===c){var v=this.bitrateTestDelay;if(v){var y=s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay;p=y-v,_.logger.trace("bitrate test took "+Math.round(1e3*v)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),g=m=1}}return f=this._findBestLevel(o,s,d,r,t,c+p,g,m,n),Math.max(f,0)}}]),t}(c.default);n.default=v},{30:30,31:31,32:32,34:34,48:48,50:50}],6:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var 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},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=e(45),d=i(u),c=e(34),f=i(c),h=e(24),p=i(h),_=e(32),g=i(_),m=e(31),v=i(m),y=e(35),E=i(y),S=e(51),T=i(S),C=e(30),R=e(50),b={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS"},w=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,g.default.MEDIA_ATTACHED,g.default.MEDIA_DETACHING,g.default.AUDIO_TRACKS_UPDATED,g.default.AUDIO_TRACK_SWITCHING,g.default.AUDIO_TRACK_LOADED,g.default.KEY_LOADED,g.default.FRAG_LOADED,g.default.FRAG_PARSING_INIT_SEGMENT,g.default.FRAG_PARSING_DATA,g.default.FRAG_PARSED,g.default.ERROR,g.default.BUFFER_CREATED,g.default.BUFFER_APPENDED,g.default.BUFFER_FLUSHED,g.default.INIT_PTS_FOUND));return n.config=e.config,n.audioCodecSwap=!1,n.ticks=0,n._state=b.STOPPED,n.ontick=n.tick.bind(n),n.initPTS=[],n.waitingFragment=null,n}return o(t,e),l(t,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),v.default.prototype.destroy.call(this),this.state=b.STOPPED}},{key:"onInitPtsFound",value:function(e){var t=e.id,n=e.frag.cc,i=e.initPTS;"main"===t&&(this.initPTS[n]=i,R.logger.log("InitPTS for cc:"+n+" found from video track:"+i),this.state===b.WAITING_INIT_PTS&&(R.logger.log("sending pending audio frag to demuxer"),this.state=b.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null))}},{key:"startLoad",value:function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.fragLoadError=0,t>0&&e===-1?(R.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=b.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=b.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=b.STOPPED}},{key:"stopLoad",value:function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=b.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){var e,t,n,i,r,a,o=this,l=this.hls,u=l.config,c=function(){switch(o.state){case b.ERROR:case b.PAUSED:case b.BUFFER_FLUSHING:break;case b.STARTING:o.state=b.WAITING_TRACK,o.loadedmetadata=!1;break;case b.IDLE:var s=o.tracks;if(!s)break;if(!o.media&&(o.startFragRequested||!u.startFragPrefetch))break;e=o.loadedmetadata?o.media.currentTime:o.nextLoadPosition;var c=o.mediaBuffer?o.mediaBuffer:o.media,h=f.default.bufferInfo(c,e,u.maxBufferHole),p=h.len,_=h.end,m=o.fragPrevious,v=u.maxMaxBufferLength,y=o.audioSwitch,E=o.trackId;if(p<v&&E<s.length){if(n=s[E].details,"undefined"==typeof n){o.state=b.WAITING_TRACK;break}if(!y&&!n.live&&m&&m.sn===n.endSN&&(!o.media.seeking||o.media.duration-_<m.duration/2)){o.hls.trigger(g.default.BUFFER_EOS,{type:"audio"}),o.state=b.ENDED;break}var S=n.fragments,T=S.length,w=S[0].start,A=S[T-1].start+S[T-1].duration,I=void 0;if(y)if(n.live&&!n.PTSKnown)R.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),_=0;else if(_=e,n.PTSKnown&&e<w){if(!(h.end>w||h.nextStart))return{v:void 0};R.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),o.media.currentTime=w+.05}if(n.initSegment&&!n.initSegment.data)I=n.initSegment;else if(_<=w){if(I=S[0],n.live&&I.loadIdx&&I.loadIdx===o.fragLoadIdx){var P=h.nextStart?h.nextStart:w;return R.logger.log("no alt audio available @currentTime:"+o.media.currentTime+", seeking @"+(P+.05)),o.media.currentTime=P+.05,{v:void 0}}}else!function(){var e=void 0,t=u.maxFragLookUpTolerance,i=m?S[m.sn-S[0].sn+1]:void 0,r=function(e){var n=Math.min(t,e.duration);return e.start+e.duration-n<=_?1:e.start-n>_&&e.start?-1:0};_<A?(_>A-t&&(t=0),e=i&&!r(i)?i:d.default.search(S,r)):e=S[T-1],e&&(I=e,w=e.start,m&&I.level===m.level&&I.sn===m.sn&&(I.sn<n.endSN?(I=S[I.sn+1-n.startSN],R.logger.log("SN just loaded, load next one: "+I.sn)):I=null))}();if(I)if(I.decryptdata&&null!=I.decryptdata.uri&&null==I.decryptdata.key)R.logger.log("Loading key for "+I.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+E),o.state=b.KEY_LOADING,l.trigger(g.default.KEY_LOADING,{frag:I});else{if(R.logger.log("Loading "+I.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+E+", currentTime:"+e+",bufferEnd:"+_.toFixed(3)),void 0!==o.fragLoadIdx?o.fragLoadIdx++:o.fragLoadIdx=0,I.loadCounter){I.loadCounter++;var O=u.fragLoadingLoopThreshold;if(I.loadCounter>O&&Math.abs(o.fragLoadIdx-I.loadIdx)<O)return l.trigger(g.default.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:I}),{v:void 0}}else I.loadCounter=1;I.loadIdx=o.fragLoadIdx,o.fragCurrent=I,o.startFragRequested=!0,isNaN(I.sn)||(o.nextLoadPosition=I.start+I.duration),l.trigger(g.default.FRAG_LOADING,{frag:I}),o.state=b.FRAG_LOADING}}break;case b.WAITING_TRACK:t=o.tracks[o.trackId],t&&t.details&&(o.state=b.IDLE);break;case b.FRAG_LOADING_WAITING_RETRY:i=performance.now(),r=o.retryDate,c=o.media,a=c&&c.seeking,(!r||i>=r||a)&&(R.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),o.state=b.IDLE);break;case b.WAITING_INIT_PTS:case b.STOPPED:case b.FRAG_LOADING:case b.PARSING:case b.PARSED:case b.ENDED:}}();if("object"===("undefined"==typeof c?"undefined":s(c)))return c.v}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(R.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.tracks;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){this.state===b.ENDED&&(this.state=b.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()}},{key:"onMediaEnded",value:function(){this.startPosition=this.lastCurrentTime=0}},{key:"onAudioTracksUpdated",value:function(e){R.logger.log("audio tracks updated"),this.tracks=e.audioTracks}},{key:"onAudioTrackSwitching",value:function(e){var t=!!e.url;this.trackId=e.id,this.state=b.IDLE,this.fragCurrent=null,this.state=b.PAUSED,this.waitingFragment=null,t?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=b.IDLE,void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold)),this.tick()}},{key:"onAudioTrackLoaded",value:function(e){var t=e.details,n=e.id,i=this.tracks[n],r=t.totalduration,a=0;if(R.logger.log("track "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+r),t.live){var o=i.details;o&&t.fragments.length>0?(E.default.mergeDetails(o,t),a=t.fragments[0].start,t.PTSKnown?R.logger.log("live audio playlist sliding:"+a.toFixed(3)):R.logger.log("live audio playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,R.logger.log("live audio playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(i.details=t,!this.startFragRequested){if(this.startPosition===-1){var s=t.startTimeOffset;isNaN(s)?this.startPosition=0:(R.logger.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===b.WAITING_TRACK&&(this.state=b.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===b.KEY_LOADING&&(this.state=b.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent,n=e.frag;if(this.state===b.FRAG_LOADING&&t&&"audio"===n.type&&n.level===t.level&&n.sn===t.sn){var i=this.tracks[this.trackId],r=i.details,a=r.totalduration,o=t.level,s=t.sn,l=t.cc,u=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",d=this.stats=e.stats;if("initSegment"===s)this.state=b.IDLE,d.tparsed=d.tbuffered=performance.now(),r.initSegment.data=e.payload,this.hls.trigger(g.default.FRAG_BUFFERED,{stats:d,frag:t,id:"audio"}),this.tick();else{this.state=b.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new p.default(this.hls,"audio"));var c=this.initPTS[l],f=r.initSegment?r.initSegment.data:[];if(f||void 0!==c){this.pendingBuffering=!0,R.logger.log("Demuxing "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+o);var h=!1;this.demuxer.push(e.payload,f,u,null,t,a,h,c)}else R.logger.log("unknown video PTS for continuity counter "+l+", waiting for video PTS before demuxing audio frag "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+o),this.waitingFragment=e,this.state=b.WAITING_INIT_PTS}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent,n=e.frag;if(t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===b.PARSING){var i=e.tracks,r=void 0;if(i.video&&delete i.video,r=i.audio){r.levelCodec="mp4a.40.2",r.id=e.id,this.hls.trigger(g.default.BUFFER_CODECS,i),R.logger.log("audio track:audio,container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var a=r.initSegment;if(a){var o={type:"audio",data:a,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(g.default.BUFFER_APPENDING,o))}this.tick()}}}},{key:"onFragParsingData",value:function(e){var t=this,n=this.fragCurrent,i=e.frag;n&&"audio"===e.id&&"audio"===e.type&&i.sn===n.sn&&i.level===n.level&&this.state===b.PARSING&&!function(){var i=t.trackId,r=t.tracks[i],a=t.hls;isNaN(e.endPTS)&&(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),R.logger.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),E.default.updateFragPTSDTS(r.details,n.sn,e.startPTS,e.endPTS);var o=t.audioSwitch,s=t.media,l=!1;if(o&&s)if(s.readyState){var u=s.currentTime;R.logger.log("switching audio track : currentTime:"+u),u>=e.startPTS&&(R.logger.log("switching audio track : flushing all audio"),t.state=b.BUFFER_FLUSHING,a.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),l=!0,t.audioSwitch=!1,a.trigger(g.default.AUDIO_TRACK_SWITCHED,{id:i}))}else t.audioSwitch=!1,a.trigger(g.default.AUDIO_TRACK_SWITCHED,{id:i});var d=t.pendingData;t.audioSwitch||([e.data1,e.data2].forEach(function(t){t&&t.length&&d.push({type:e.type,data:t,parent:"audio",content:"data"})}),!l&&d.length&&(d.forEach(function(e){t.state===b.PARSING&&(t.pendingBuffering=!0,t.hls.trigger(g.default.BUFFER_APPENDING,e))}),t.pendingData=[],t.appended=!0)),t.tick()}()}},{key:"onFragParsed",value:function(e){var t=this.fragCurrent,n=e.frag;t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===b.PARSING&&(this.stats.tparsed=performance.now(),this.state=b.PARSED,this._checkAppendedParsed())}},{key:"onBufferCreated",value:function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0)}},{key:"onBufferAppended",value:function(e){if("audio"===e.parent){var t=this.state;t!==b.PARSING&&t!==b.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}}},{key:"_checkAppendedParsed",value:function(){if(!(this.state!==b.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,n=this.hls;if(e){this.fragPrevious=e,t.tbuffered=performance.now(),n.trigger(g.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;R.logger.log("audio buffered : "+T.default.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(g.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=b.IDLE}this.tick()}}},{key:"onError",value:function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case C.ErrorDetails.FRAG_LOAD_ERROR:case C.ErrorDetails.FRAG_LOAD_TIMEOUT:if(!e.fatal){var n=this.fragLoadError;n?n++:n=1;var i=this.config;if(n<=i.fragLoadingMaxRetry){this.fragLoadError=n,t.loadCounter=0;var r=Math.min(Math.pow(2,n-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);R.logger.warn("audioStreamController: frag loading failed, retry in "+r+" ms"),this.retryDate=performance.now()+r,this.state=b.FRAG_LOADING_WAITING_RETRY}else R.logger.error("audioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=b.ERROR}break;case C.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case C.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case C.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case C.ErrorDetails.KEY_LOAD_ERROR:case C.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==b.ERROR&&(this.state=e.fatal?b.ERROR:b.IDLE,R.logger.warn("audioStreamController: "+e.details+" while loading frag,switch to "+this.state+" state ..."));break;case C.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===e.parent&&(this.state===b.PARSING||this.state===b.PARSED)){var a=this.mediaBuffer,o=this.media.currentTime,s=a&&f.default.isBuffered(a,o)&&f.default.isBuffered(a,o+.5);if(s){var l=this.config;l.maxMaxBufferLength>=l.maxBufferLength&&(l.maxMaxBufferLength/=2,R.logger.warn("audio:reduce max buffer length to "+l.maxMaxBufferLength+"s"),this.fragLoadIdx+=2*l.fragLoadingLoopThreshold),this.state=b.IDLE}else R.logger.warn("buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=b.BUFFER_FLUSHING,this.hls.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}}},{key:"onBufferFlushed",value:function(){var e=this,t=this.pendingData;t&&t.length?(R.logger.log("appending pending audio data on Buffer Flushed"),t.forEach(function(t){e.hls.trigger(g.default.BUFFER_APPENDING,t)}),this.appended=!0,this.pendingData=[],this.state=b.PARSED):(this.state=b.IDLE,this.fragPrevious=null,this.tick())}},{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,R.logger.log("audio stream:"+t+"->"+e)}},get:function(){return this._state}}]),t}(v.default);n.default=w},{24:24,30:30,31:31,32:32,34:34,35:35,45:45,50:50,51:51}],7:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(32),u=i(l),d=e(31),c=i(d),f=e(50),h=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.AUDIO_TRACK_LOADED));return n.ticks=0,n.ontick=n.tick.bind(n),n}return o(t,e),s(t,[{key:"destroy",value:function(){c.default.prototype.destroy.call(this)}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){this.updateTrack(this.trackId)}},{key:"onManifestLoading",value:function(){this.tracks=[],this.trackId=-1}},{key:"onManifestLoaded",value:function(e){var t=this,n=e.audioTracks||[],i=!1;this.tracks=n,this.hls.trigger(u.default.AUDIO_TRACKS_UPDATED,{audioTracks:n});var r=0;n.forEach(function(e){return e.default?(t.audioTrack=r,void(i=!0)):void r++}),i===!1&&n.length&&(f.logger.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)}},{key:"onAudioTrackLoaded",value:function(e){e.id<this.tracks.length&&(f.logger.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.timer&&(this.timer=setInterval(this.ontick,1e3*e.details.targetduration)),!e.details.live&&this.timer&&(clearInterval(this.timer),this.timer=null))}},{key:"setAudioTrackInternal",value:function(e){if(e>=0&&e<this.tracks.length){this.timer&&(clearInterval(this.timer),this.timer=null),this.trackId=e,f.logger.log("switching to audioTrack "+e);var t=this.tracks[e],n=this.hls,i=t.type,r=t.url,a={id:e,type:i,url:r};n.trigger(u.default.AUDIO_TRACK_SWITCH,a),n.trigger(u.default.AUDIO_TRACK_SWITCHING,a);var o=t.details;!r||void 0!==o&&o.live!==!0||(f.logger.log("(re)loading playlist for audioTrack "+e),n.trigger(u.default.AUDIO_TRACK_LOADING,{url:r,id:e}))}}},{key:"updateTrack",value:function(e){if(e>=0&&e<this.tracks.length){this.timer&&(clearInterval(this.timer),this.timer=null),this.trackId=e,f.logger.log("updating audioTrack "+e);var t=this.tracks[e],n=t.url,i=t.details;!n||void 0!==i&&i.live!==!0||(f.logger.log("(re)loading playlist for audioTrack "+e),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:n,id:e}))}}},{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.trackId===e&&void 0!==this.tracks[e].details||this.setAudioTrackInternal(e)}}]),t}(c.default);n.default=h},{31:31,32:32,50:50}],8:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(32),u=i(l),d=e(31),c=i(d),f=e(50),h=e(30),p=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_RESET,u.default.BUFFER_APPENDING,u.default.BUFFER_CODECS,u.default.BUFFER_EOS,u.default.BUFFER_FLUSHING,u.default.LEVEL_PTS_UPDATED,u.default.LEVEL_UPDATED));return n._msDuration=null,n._levelDuration=null,n.onsbue=n.onSBUpdateEnd.bind(n),n.onsbe=n.onSBUpdateError.bind(n),n.pendingTracks={},n.tracks={},n}return o(t,e),s(t,[{key:"destroy",value:function(){c.default.prototype.destroy.call(this)}},{key:"onLevelPtsUpdated",value:function(e){var t=e.type,n=this.tracks.audio;if("audio"===t&&n&&"audio/mpeg"===n.container){var i=this.sourceBuffer.audio,r=Math.abs(i.timestampOffset-e.start);if(r>.1){var a=i.updating;try{i.abort()}catch(e){a=!0,f.logger.warn("can not abort audio buffer: "+e)}a?this.audioTimestampOffset=e.start:(f.logger.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+e.start),i.timestampOffset=e.start)}}}},{key:"onManifestParsed",value:function(e){var t=e.audio,n=e.video,i=0;e.altAudio&&(t||n)&&(i=(t?1:0)+(n?1:0),f.logger.log(i+" sourceBuffer(s) expected")),this.sourceBufferNb=i}},{key:"onMediaAttaching",value:function(e){var t=this.media=e.media;if(t){var n=this.mediaSource=new MediaSource;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),n.addEventListener("sourceopen",this.onmso),n.addEventListener("sourceended",this.onmse),n.addEventListener("sourceclose",this.onmsc),t.src=URL.createObjectURL(n)}}},{key:"onMediaDetaching",value:function(){f.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){f.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this.onmso),e.removeEventListener("sourceended",this.onmse),e.removeEventListener("sourceclose",this.onmsc),this.media&&(URL.revokeObjectURL(this.media.src),this.media.removeAttribute("src"),this.media.load()),this.mediaSource=null,this.media=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(u.default.MEDIA_DETACHED)}},{key:"onMediaSourceOpen",value:function(){f.logger.log("media source opened"),this.hls.trigger(u.default.MEDIA_ATTACHED,{media:this.media});var e=this.mediaSource;e&&e.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()}},{key:"checkPendingTracks",value:function(){var e=this.pendingTracks,t=Object.keys(e).length;t&&(this.sourceBufferNb<=t||0===this.sourceBufferNb)&&(this.createSourceBuffers(e),this.pendingTracks={},this.doAppending())}},{key:"onMediaSourceClose",value:function(){f.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){f.logger.log("media source ended")}},{key:"onSBUpdateEnd",value:function(){if(this.audioTimestampOffset){var e=this.sourceBuffer.audio;f.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+this.audioTimestampOffset),e.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var t=this.parent,n=this.segments.reduce(function(e,n){return n.parent===t?e+1:e},0);this.hls.trigger(u.default.BUFFER_APPENDED,{parent:t,pending:n}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()}},{key:"onSBUpdateError",value:function(e){f.logger.error("sourceBuffer error:",e),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})}},{key:"onBufferReset",value:function(){var e=this.sourceBuffer;for(var t in e){var n=e[t];try{this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this.onsbue),n.removeEventListener("error",this.onsbe)}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}},{key:"onBufferCodecs",value:function(e){if(0===Object.keys(this.sourceBuffer).length){for(var t in e)this.pendingTracks[t]=e[t];var n=this.mediaSource;n&&"open"===n.readyState&&this.checkPendingTracks()}}},{key:"createSourceBuffers",value:function(e){var t=this.sourceBuffer,n=this.mediaSource;for(var i in e)if(!t[i]){var r=e[i],a=r.levelCodec||r.codec,o=r.container+";codecs="+a;f.logger.log("creating sourceBuffer("+o+")");try{var s=t[i]=n.addSourceBuffer(o);s.addEventListener("updateend",this.onsbue),s.addEventListener("error",this.onsbe),this.tracks[i]={codec:a,container:r.container},r.buffer=s}catch(e){f.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:o})}}this.hls.trigger(u.default.BUFFER_CREATED,{tracks:e})}},{key:"onBufferAppending",value:function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())}},{key:"onBufferAppendFail",value:function(e){f.logger.error("sourceBuffer error:",e.event),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})}},{key:"onBufferEos",value:function(e){var t=this.sourceBuffer,n=e.type;for(var i in t)n&&i!==n||t[i].ended||(t[i].ended=!0,f.logger.log(i+" sourceBuffer now EOS"));this.checkEos()}},{key:"checkEos",value:function(){var e=this.sourceBuffer,t=this.mediaSource;if(!t||"open"!==t.readyState)return void(this._needsEos=!1);for(var n in e){var i=e[n];if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}f.logger.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){f.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}},{key:"onBufferFlushing",value:function(e){this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}),this.flushBufferCounter=0,this.doFlush()}},{key:"onLevelUpdated",value:function(e){var t=e.details;0!==t.fragments.length&&(this._levelDuration=t.totalduration+t.fragments[0].start,this.updateMediaElementDuration())}},{key:"updateMediaElementDuration",value:function(){var e=this.media,t=this.mediaSource,n=this.sourceBuffer,i=this._levelDuration;if(null!==i&&e&&t&&n&&0!==e.readyState&&"open"===t.readyState){for(var r in n)if(n[r].updating)return;null===this._msDuration&&(this._msDuration=t.duration);var a=e.duration;(i>this._msDuration&&i>a||a===1/0||isNaN(a))&&(f.logger.log("Updating mediasource duration to "+i.toFixed(3)),this._msDuration=t.duration=i)}}},{key:"doFlush",value:function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,n=this.sourceBuffer;try{for(var i in n)t+=n[i].buffered.length}catch(e){f.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(u.default.BUFFER_FLUSHED)}}},{key:"doAppending",value:function(){var e=this.hls,t=this.sourceBuffer,n=this.segments;if(Object.keys(t).length){if(this.media.error)return this.segments=[],void f.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(n&&n.length){var i=n.shift();try{var r=i.type,a=t[r];a?a.updating?n.unshift(i):(a.ended=!1,this.parent=i.parent,a.appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(t){f.logger.error("error while trying to append buffer:"+t.message),n.unshift(i);var o={type:h.ErrorTypes.MEDIA_ERROR,parent:i.parent};if(22===t.code)return this.segments=[],o.details=h.ErrorDetails.BUFFER_FULL_ERROR,o.fatal=!1,void e.trigger(u.default.ERROR,o);if(this.appendError?this.appendError++:this.appendError=1,o.details=h.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>e.config.appendErrorMaxRetry)return f.logger.log("fail "+e.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),n=[],o.fatal=!0,void e.trigger(u.default.ERROR,o);o.fatal=!1,e.trigger(u.default.ERROR,o)}}}}},{key:"flushBuffer",value:function(e,t,n){var i,r,a,o,s,l,u=this.sourceBuffer;if(Object.keys(u).length){if(f.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+e+"/"+t),this.flushBufferCounter<this.appended){for(var d in u)if(!n||d===n){if(i=u[d],i.ended=!1,i.updating)return f.logger.warn("cannot flush, sb updating in progress"),!1;try{for(r=0;r<i.buffered.length;r++)if(a=i.buffered.start(r),o=i.buffered.end(r),navigator.userAgent.toLowerCase().indexOf("firefox")!==-1&&t===Number.POSITIVE_INFINITY?(s=e,l=t):(s=Math.max(a,e),l=Math.min(o,t)),Math.min(l,o)-s>.5)return this.flushBufferCounter++,f.logger.log("flush "+d+" ["+s+","+l+"], of ["+a+","+o+"], pos:"+this.media.currentTime),
i.remove(s,l),!1}catch(e){f.logger.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else f.logger.warn("abort flushing too many retries");f.logger.log("buffer flushed")}return!0}}]),t}(c.default);n.default=p},{30:30,31:31,32:32,50:50}],9:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(32),u=i(l),d=e(31),c=i(d),f=function(e){function t(e){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.FPS_DROP_LEVEL_CAPPING,u.default.MEDIA_ATTACHING,u.default.MANIFEST_PARSED))}return o(t,e),s(t,[{key:"destroy",value:function(){this.hls.config.capLevelToPlayerSize&&(this.media=this.restrictedLevels=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer)))}},{key:"onFpsDropLevelCapping",value:function(e){this.restrictedLevels||(this.restrictedLevels=[]),this.isLevelRestricted(e.droppedLevel)||this.restrictedLevels.push(e.droppedLevel)}},{key:"onMediaAttaching",value:function(e){this.media=e.media instanceof HTMLVideoElement?e.media:null}},{key:"onManifestParsed",value:function(e){var t=this.hls;t.config.capLevelToPlayerSize&&(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.levels=e.levels,t.firstLevel=this.getMaxLevel(e.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}},{key:"detectPlayerSize",value:function(){if(this.media){var e=this.levels?this.levels.length:0;if(e){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e-1),t.autoLevelCapping>this.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}},{key:"getMaxLevel",value:function(e){var t=0,n=void 0,i=void 0,r=this.mediaWidth,a=this.mediaHeight,o=0,s=0;for(n=0;n<=e&&(i=this.levels[n],!this.isLevelRestricted(n))&&(t=n,o=i.width,s=i.height,!(r<=o||a<=s));n++);return t}},{key:"isLevelRestricted",value:function(e){return!(!this.restrictedLevels||this.restrictedLevels.indexOf(e)===-1)}},{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}},{key:"mediaWidth",get:function(){var e=void 0,t=this.media;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=this.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e=void 0,t=this.media;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=this.contentScaleFactor),e}}]),t}(c.default);n.default=f},{31:31,32:32}],10:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(32),u=i(l),d=e(31),c=i(d),f=e(50),h=function(e){function t(e){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MEDIA_ATTACHING))}return o(t,e),s(t,[{key:"destroy",value:function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1}},{key:"onMediaAttaching",value:function(e){var t=this.hls.config;if(t.capLevelOnFPSDrop){var n=this.video=e.media instanceof HTMLVideoElement?e.media:null;"function"==typeof n.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod)}}},{key:"checkFPS",value:function(e,t,n){var i=performance.now();if(t){if(this.lastTime){var r=i-this.lastTime,a=n-this.lastDroppedFrames,o=t-this.lastDecodedFrames,s=1e3*a/r,l=this.hls;if(l.trigger(u.default.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),s>0&&a>l.config.fpsDroppedMonitoringThreshold*o){var d=l.currentLevel;f.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=d)&&(d-=1,l.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:l.currentLevel}),l.autoLevelCapping=d,l.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}},{key:"checkFPSInterval",value:function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}]),t}(c.default);n.default=h},{31:31,32:32,50:50}],11:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(32),u=i(l),d=e(31),c=i(d),f=e(50),h=e(30),p=e(34),_=i(p),g=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MANIFEST_LOADED,u.default.LEVEL_LOADED,u.default.FRAG_LOADED,u.default.ERROR));return n.ontick=n.tick.bind(n),n._manualLevel=-1,n}return o(t,e),s(t,[{key:"destroy",value:function(){this.timer&&(clearTimeout(this.timer),this.timer=null),this._manualLevel=-1}},{key:"startLoad",value:function(){this.canload=!0;var e=this._levels;e&&e.forEach(function(e){e.loadError=0;var t=e.details;t&&t.live&&(e.details=void 0)}),this.timer&&this.tick()}},{key:"stopLoad",value:function(){this.canload=!1}},{key:"onManifestLoaded",value:function(e){var t,n=[],i=[],r={},a=!1,o=!1,s=this.hls,l=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=function(e,t){return MediaSource.isTypeSupported(e+"/mp4;codecs="+t)};if(e.levels.forEach(function(e){e.videoCodec&&(a=!0),l&&e.audioCodec&&e.audioCodec.indexOf("mp4a.40.34")!==-1&&(e.audioCodec=void 0),(e.audioCodec||e.attrs&&e.attrs.AUDIO)&&(o=!0);var t=r[e.bitrate];void 0===t?(r[e.bitrate]=n.length,e.url=[e.url],e.urlId=0,n.push(e)):n[t].url.push(e.url)}),a&&o?n.forEach(function(e){e.videoCodec&&i.push(e)}):i=n,i=i.filter(function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||d("audio",t))&&(!n||d("video",n))}),i.length){t=i[0].bitrate,i.sort(function(e,t){return e.bitrate-t.bitrate}),this._levels=i;for(var c=0;c<i.length;c++)if(i[c].bitrate===t){this._firstLevel=c,f.logger.log("manifest loaded,"+i.length+" level(s) found, first bitrate:"+t);break}s.trigger(u.default.MANIFEST_PARSED,{levels:i,firstLevel:this._firstLevel,stats:e.stats,audio:o,video:a,altAudio:e.audioTracks.length>0})}else s.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:s.url,reason:"no level with compatible codecs found in manifest"})}},{key:"setLevelInternal",value:function(e){var t=this._levels,n=this.hls;if(e>=0&&e<t.length){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this._level!==e){f.logger.log("switching to level "+e),this._level=e;var i=t[e];i.level=e,n.trigger(u.default.LEVEL_SWITCH,i),n.trigger(u.default.LEVEL_SWITCHING,i)}var r=t[e],a=r.details;if(!a||a.live===!0){var o=r.urlId;n.trigger(u.default.LEVEL_LOADING,{url:r.url[o],level:e,id:o})}}else n.trigger(u.default.ERROR,{type:h.ErrorTypes.OTHER_ERROR,details:h.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})}},{key:"onError",value:function(e){if(!e.fatal){var t=e.details,n=this.hls,i=void 0,r=void 0,a=!1;switch(t){case h.ErrorDetails.FRAG_LOAD_ERROR:case h.ErrorDetails.FRAG_LOAD_TIMEOUT:case h.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case h.ErrorDetails.KEY_LOAD_ERROR:case h.ErrorDetails.KEY_LOAD_TIMEOUT:i=e.frag.level;break;case h.ErrorDetails.LEVEL_LOAD_ERROR:case h.ErrorDetails.LEVEL_LOAD_TIMEOUT:i=e.context.level,a=!0;break;case h.ErrorDetails.REMUX_ALLOC_ERROR:i=e.level}if(void 0!==i){r=this._levels[i],r.loadError?r.loadError++:r.loadError=1;var o=r.url.length;if(o>1&&r.loadError<o)r.urlId=(r.urlId+1)%o,r.details=void 0,f.logger.warn("level controller,"+t+" for level "+i+": switching to redundant stream id "+r.urlId);else{var s=this._manualLevel===-1&&i;if(s)f.logger.warn("level controller,"+t+": switch-down for next fragment"),n.nextAutoLevel=Math.max(0,i-1);else if(r&&r.details&&r.details.live)f.logger.warn("level controller,"+t+" on live stream, discard"),a&&(this._level=void 0);else if(t===h.ErrorDetails.LEVEL_LOAD_ERROR||t===h.ErrorDetails.LEVEL_LOAD_TIMEOUT){var l=n.media,u=l&&_.default.isBuffered(l,l.currentTime)&&_.default.isBuffered(l,l.currentTime+.5);if(u){var d=n.config.levelLoadingRetryDelay;f.logger.warn("level controller,"+t+", but media buffered, retry in "+d+"ms"),this.timer=setTimeout(this.ontick,d)}else f.logger.error("cannot recover "+t+" error"),this._level=void 0,this.timer&&(clearTimeout(this.timer),this.timer=null),e.fatal=!0}}}}}},{key:"onFragLoaded",value:function(e){var t=e.frag;if(t&&"main"===t.type){var n=this._levels[t.level];n&&(n.loadError=0)}}},{key:"onLevelLoaded",value:function(e){var t=e.level;if(t===this._level){var n=this._levels[t];n.loadError=0;var i=e.details;if(i.live){var r=1e3*(i.averagetargetduration?i.averagetargetduration:i.targetduration),a=n.details;a&&i.endSN===a.endSN&&(r/=2,f.logger.log("same live playlist, reload twice faster")),r-=performance.now()-e.stats.trequest,r=Math.max(1e3,Math.round(r)),f.logger.log("live playlist, reload in "+r+" ms"),this.timer=setTimeout(this.ontick,r)}else this.timer=null}}},{key:"tick",value:function(){var e=this._level;if(void 0!==e&&this.canload){var t=this._levels[e],n=t.urlId;this.hls.trigger(u.default.LEVEL_LOADING,{url:t.url[n],level:e,id:n})}}},{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this._level},set:function(e){var t=this._levels;t&&t.length>e&&(this._level===e&&void 0!==t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this._manualLevel},set:function(e){this._manualLevel=e,void 0===this._startLevel&&(this._startLevel=e),e!==-1&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return this._manualLevel!==-1?this._manualLevel:this.hls.nextAutoLevel},set:function(e){this.level=e,this._manualLevel===-1&&(this.hls.nextAutoLevel=e)}}]),t}(c.default);n.default=g},{30:30,31:31,32:32,34:34,50:50}],12:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(45),u=i(l),d=e(34),c=i(d),f=e(24),h=i(f),p=e(32),_=i(p),g=e(31),m=i(g),v=e(35),y=i(v),E=e(51),S=i(E),T=e(30),C=e(50),R={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR"},b=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,_.default.MEDIA_ATTACHED,_.default.MEDIA_DETACHING,_.default.MANIFEST_LOADING,_.default.MANIFEST_PARSED,_.default.LEVEL_LOADED,_.default.KEY_LOADED,_.default.FRAG_LOADED,_.default.FRAG_LOAD_EMERGENCY_ABORTED,_.default.FRAG_PARSING_INIT_SEGMENT,_.default.FRAG_PARSING_DATA,_.default.FRAG_PARSED,_.default.ERROR,_.default.AUDIO_TRACK_SWITCHING,_.default.AUDIO_TRACK_SWITCHED,_.default.BUFFER_CREATED,_.default.BUFFER_APPENDED,_.default.BUFFER_FLUSHED));return n.config=e.config,n.audioCodecSwap=!1,n.ticks=0,n._state=R.STOPPED,n.ontick=n.tick.bind(n),n}return o(t,e),s(t,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),m.default.prototype.destroy.call(this),this.state=R.STOPPED}},{key:"startLoad",value:function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var i=n.startLevel;i===-1&&(i=0,this.bitrateTest=!0),this.level=n.nextLoadLevel=i,this.loadedmetadata=!1}t>0&&e===-1&&(C.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=R.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else C.logger.warn("cannot start loading as manifest not parsed yet"),this.state=R.STOPPED}},{key:"stopLoad",value:function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=R.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){switch(this.state){case R.ERROR:break;case R.BUFFER_FLUSHING:this.fragLoadError=0;break;case R.IDLE:if(!this._doTickIdle())return;break;case R.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=R.IDLE);break;case R.FRAG_LOADING_WAITING_RETRY:var t=performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(C.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=R.IDLE);break;case R.ERROR:case R.STOPPED:case R.FRAG_LOADING:case R.PARSING:case R.PARSED:case R.ENDED:}this._checkBuffer(),this._checkFragmentChanged()}},{key:"_doTickIdle",value:function(){var e=this.hls,t=e.config,n=this.media;if(void 0!==this.levelLastLoaded&&!n&&(this.startFragRequested||!t.startFragPrefetch))return!0;var i=void 0;i=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var r=e.nextLoadLevel,a=this.levels[r],o=a.bitrate,s=void 0;s=o?Math.max(8*t.maxBufferSize/o,t.maxBufferLength):t.maxBufferLength,s=Math.min(s,t.maxMaxBufferLength);var l=c.default.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,i,t.maxBufferHole),u=l.len;if(u>=s)return!0;C.logger.trace("buffer length of "+u.toFixed(3)+" is below max of "+s.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=r;var d=a.details;if("undefined"==typeof d||d.live&&this.levelLastLoaded!==r)return this.state=R.WAITING_LEVEL,!0;var f=this.fragPrevious;if(!d.live&&f&&f.sn===d.endSN&&n.duration-Math.max(l.end,f.start)<=Math.max(.2,f.duration/2)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(_.default.BUFFER_EOS,h),this.state=R.ENDED,!0}return this._fetchPayloadOrEos(i,l,d)}},{key:"_fetchPayloadOrEos",value:function(e,t,n){var i=this.fragPrevious,r=this.level,a=n.fragments,o=a.length;if(0===o)return!1;var s=a[0].start,l=a[o-1].start+a[o-1].duration,u=t.end,d=void 0;if(n.initSegment&&!n.initSegment.data)d=n.initSegment;else if(n.live){var c=this.config.initialLiveManifestSize;if(o<c)return C.logger.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+c),!1;if(d=this._ensureFragmentAtLivePoint(n,u,s,l,i,a,o),null===d)return!1}else u<s&&(d=a[0]);return d||(d=this._findFragment(s,i,o,a,u,l,n)),!d||this._loadFragmentOrKey(d,r,n,e,u)}},{key:"_ensureFragmentAtLivePoint",value:function(e,t,n,i,r,a,o){var s=this.hls.config,l=this.media,u=void 0,d=void 0!==s.liveMaxLatencyDuration?s.liveMaxLatencyDuration:s.liveMaxLatencyDurationCount*e.targetduration;if(t<Math.max(n-s.maxFragLookUpTolerance,i-d)){var c=this.liveSyncPosition=this.computeLivePosition(n,e);C.logger.log("buffer end: "+t.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+c.toFixed(3)),t=c,l&&l.readyState&&l.duration>c&&(l.currentTime=c)}if(e.PTSKnown&&t>i&&l&&l.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(r){var f=r.sn+1;f>=e.startSN&&f<=e.endSN&&(u=a[f-e.startSN],C.logger.log("live playlist, switching playlist, load frag with next SN: "+u.sn))}u||(u=a[Math.min(o-1,Math.round(o/2))],C.logger.log("live playlist, switching playlist, unknown, load middle frag : "+u.sn))}return u}},{key:"_findFragment",value:function(e,t,n,i,r,a,o){var s=this.hls.config,l=void 0,d=void 0,c=s.maxFragLookUpTolerance,f=t?i[t.sn-i[0].sn+1]:void 0,h=function(e){var t=Math.min(c,e.duration);return e.start+e.duration-t<=r?1:e.start-t>r&&e.start?-1:0};if(r<a?(r>a-c&&(c=0),d=f&&!h(f)?f:u.default.search(i,h)):d=i[n-1],d){l=d;var p=l.sn-o.startSN,_=t&&l.level===t.level,g=i[p-1],m=i[p+1];if(_&&l.sn===t.sn)if(l.sn<o.endSN){var v=t.deltaPTS;v&&v>s.maxBufferHole&&t.dropped&&p?(l=g,C.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),t.loadCounter--):(l=m,C.logger.log("SN just loaded, load next one: "+l.sn))}else l=null;else l.dropped&&!_&&(m&&m.backtracked?(C.logger.warn("Already backtracked from fragment "+(p+1)+", will not backtrack to fragment "+p+". Loading fragment "+(p+1)),l=m):(C.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),l.dropped=0,g?(g.loadCounter&&g.loadCounter--,l=g):l=null))}return l}},{key:"_loadFragmentOrKey",value:function(e,t,n,i,r){var a=this.hls,o=a.config;if(!e.decryptdata||null==e.decryptdata.uri||null!=e.decryptdata.key){if(C.logger.log("Loading "+e.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+t+", currentTime:"+i.toFixed(3)+",bufferEnd:"+r.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,e.loadCounter){e.loadCounter++;var s=o.fragLoadingLoopThreshold;if(e.loadCounter>s&&Math.abs(this.fragLoadIdx-e.loadIdx)<s)return a.trigger(_.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:e}),!1}else e.loadCounter=1;return e.loadIdx=this.fragLoadIdx,this.fragCurrent=e,this.startFragRequested=!0,isNaN(e.sn)||(this.nextLoadPosition=e.start+e.duration),e.autoLevel=a.autoLevelEnabled,e.bitrateTest=this.bitrateTest,a.trigger(_.default.FRAG_LOADING,{frag:e}),this.demuxer||(this.demuxer=new h.default(a,"main")),this.state=R.FRAG_LOADING,!0}C.logger.log("Loading key for "+e.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+t),this.state=R.KEY_LOADING,a.trigger(_.default.KEY_LOADING,{frag:e})}},{key:"getBufferedFrag",value:function(e){return u.default.search(this._bufferedFrags,function(t){return e<t.startPTS?-1:e>t.endPTS?1:0})}},{key:"followingBufferedFrag",value:function(e){return e?this.getBufferedFrag(e.endPTS+.5):null}},{key:"_checkFragmentChanged",value:function(){var e,t,n=this.media;if(n&&n.readyState&&n.seeking===!1&&(t=n.currentTime,t>n.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=t),c.default.isBuffered(n,t)?e=this.getBufferedFrag(t):c.default.isBuffered(n,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var i=e;if(i!==this.fragPlaying){this.hls.trigger(_.default.FRAG_CHANGED,{frag:i});var r=i.level;this.fragPlaying&&this.fragPlaying.level===r||this.hls.trigger(_.default.LEVEL_SWITCHED,{level:r}),this.fragPlaying=i}}}},{key:"immediateLevelSwitch",value:function(){if(C.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e=this.media,t=void 0;e?(t=e.paused,e.pause()):t=!0,this.previouslyPaused=t}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}},{key:"immediateLevelSwitchEnd",value:function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,c.default.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())}},{key:"nextLevelSwitch",value:function(){var e=this.media;if(e&&e.readyState){var t=void 0,n=void 0,i=void 0;if(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,n=this.getBufferedFrag(e.currentTime),n&&n.startPTS>1&&this.flushMainBuffer(0,n.startPTS-1),e.paused)t=0;else{var r=this.hls.nextLoadLevel,a=this.levels[r],o=this.fragLastKbps;t=o&&this.fragCurrent?this.fragCurrent.duration*a.bitrate/(1e3*o)+1:0}if(i=this.getBufferedFrag(e.currentTime+t),i&&(i=this.followingBufferedFrag(i))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(i.startPTS,Number.POSITIVE_INFINITY)}}}},{key:"flushMainBuffer",value:function(e,t){this.state=R.BUFFER_FLUSHING;var n={startOffset:e,endOffset:t};this.altAudio&&(n.type="video"),this.hls.trigger(_.default.BUFFER_FLUSHING,n)}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(C.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0,e.backtracked=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){var e=this.media,t=e?e.currentTime:void 0,n=this.config;if(C.logger.log("media seeking to "+t.toFixed(3)),this.state===R.FRAG_LOADING){var i=this.mediaBuffer?this.mediaBuffer:e,r=c.default.bufferInfo(i,t,this.config.maxBufferHole),a=this.fragCurrent;if(0===r.len&&a){var o=n.maxFragLookUpTolerance,s=a.start-o,l=a.start+a.duration+o;t<s||t>l?(a.loader&&(C.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=R.IDLE):C.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===R.ENDED&&(this.state=R.IDLE);e&&(this.lastCurrentTime=t),this.state!==R.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*n.fragLoadingLoopThreshold),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=t),this.tick()}},{key:"onMediaSeeked",value:function(){C.logger.log("media seeked to "+this.media.currentTime.toFixed(3)),this.tick()}},{key:"onMediaEnded",value:function(){C.logger.log("media ended"),this.startPosition=this.lastCurrentTime=0}},{key:"onManifestLoading",value:function(){C.logger.log("trigger BUFFER_RESET"),this.hls.trigger(_.default.BUFFER_RESET),this._bufferedFrags=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0}},{key:"onManifestParsed",value:function(e){var t,n=!1,i=!1;e.levels.forEach(function(e){t=e.audioCodec,t&&(t.indexOf("mp4a.40.2")!==-1&&(n=!0),t.indexOf("mp4a.40.5")!==-1&&(i=!0))}),this.audioCodecSwitch=n&&i,this.audioCodecSwitch&&C.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startLevelLoaded=!1,this.startFragRequested=!1;var r=this.config;r.autoStartLoad&&this.hls.startLoad(r.startPosition)}},{key:"onLevelLoaded",value:function(e){var t=e.details,n=e.level,i=this.levels[n],r=t.totalduration,a=0;if(C.logger.log("level "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+r),this.levelLastLoaded=n,t.live){var o=i.details;o&&t.fragments.length>0?(y.default.mergeDetails(o,t),a=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(a,o),t.PTSKnown?C.logger.log("live playlist sliding:"+a.toFixed(3)):C.logger.log("live playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,C.logger.log("live playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(i.details=t,this.hls.trigger(_.default.LEVEL_UPDATED,{details:t,level:n}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var s=t.startTimeOffset;isNaN(s)?t.live?(this.startPosition=this.computeLivePosition(a,t),C.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(s<0&&(C.logger.log("negative start time offset "+s+", count from end of last fragment"),s=a+r+s),C.logger.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===R.WAITING_LEVEL&&(this.state=R.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===R.KEY_LOADING&&(this.state=R.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent,n=e.frag;if(this.state===R.FRAG_LOADING&&t&&"main"===n.type&&n.level===t.level&&n.sn===t.sn){var i=e.stats,r=this.levels[t.level],a=r.details;if(C.logger.log("Loaded  "+t.sn+" of ["+a.startSN+" ,"+a.endSN+"],level "+t.level),this.bitrateTest=!1,this.stats=i,n.bitrateTest===!0&&this.hls.nextLoadLevel)this.state=R.IDLE,this.startFragRequested=!1,i.tparsed=i.tbuffered=performance.now(),this.hls.trigger(_.default.FRAG_BUFFERED,{stats:i,frag:t,id:"main"}),this.tick();else if("initSegment"===n.sn)this.state=R.IDLE,i.tparsed=i.tbuffered=performance.now(),a.initSegment.data=e.payload,this.hls.trigger(_.default.FRAG_BUFFERED,{stats:i,frag:t,id:"main"}),this.tick();else{this.state=R.PARSING;var o=a.totalduration,s=t.level,l=t.sn,u=this.config.defaultAudioCodec||r.audioCodec;this.audioCodecSwap&&(C.logger.log("swapping playlist audio codec"),void 0===u&&(u=this.lastAudioCodec),u&&(u=u.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,C.logger.log("Parsing "+l+" of ["+a.startSN+" ,"+a.endSN+"],level "+s+", cc "+t.cc);var d=this.demuxer;d||(d=this.demuxer=new h.default(this.hls,"main"));var c=this.media,f=c&&c.seeking,p=!f&&(a.PTSKnown||!a.live),g=a.initSegment?a.initSegment.data:[];d.push(e.payload,g,u,r.videoCodec,t,o,p,void 0)}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent,n=e.frag;if(t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===R.PARSING){var i,r,a=e.tracks;if(a.audio&&this.altAudio&&delete a.audio,r=a.audio){var o=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(C.logger.log("swapping playlist audio codec"),o=o.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==r.metadata.channelCount&&s.indexOf("firefox")===-1&&(o="mp4a.40.5"),s.indexOf("android")!==-1&&"audio/mpeg"!==r.container&&(o="mp4a.40.2",C.logger.log("Android: force audio codec to "+o)),r.levelCodec=o,r.id=e.id}r=a.video,r&&(r.levelCodec=this.levels[this.level].videoCodec,r.id=e.id),this.hls.trigger(_.default.BUFFER_CODECS,a);for(i in a){r=a[i],C.logger.log("main track:"+i+",container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var l=r.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(_.default.BUFFER_APPENDING,{type:i,data:l,parent:"main",content:"initSegment"}))}this.tick()}}},{key:"onFragParsingData",value:function(e){var t=this,n=this.fragCurrent,i=e.frag;if(n&&"main"===e.id&&i.sn===n.sn&&i.level===n.level&&("audio"!==e.type||!this.altAudio)&&this.state===R.PARSING){var r=this.levels[this.level],a=n;if(isNaN(e.endPTS)&&(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),C.logger.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0)),"video"===e.type)if(a.dropped=e.dropped,a.dropped){if(!a.backtracked)return a.backtracked=!0,this.nextLoadPosition=e.startPTS,this.state=R.IDLE,void this.tick();C.logger.warn("Already backtracked on this fragment, appending with the gap")}else a.backtracked=!1;var o=y.default.updateFragPTSDTS(r.details,a.sn,e.startPTS,e.endPTS,e.startDTS,e.endDTS),s=this.hls;s.trigger(_.default.LEVEL_PTS_UPDATED,{details:r.details,level:this.level,drift:o,type:e.type,start:e.startPTS,end:e.endPTS}),[e.data1,e.data2].forEach(function(n){n&&n.length&&t.state===R.PARSING&&(t.appended=!0,t.pendingBuffering=!0,s.trigger(_.default.BUFFER_APPENDING,{type:e.type,data:n,parent:"main",content:"data"}))}),this.tick()}}},{key:"onFragParsed",value:function(e){var t=this.fragCurrent,n=e.frag;t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===R.PARSING&&(this.stats.tparsed=performance.now(),this.state=R.PARSED,this._checkAppendedParsed())}},{key:"onAudioTrackSwitching",value:function(e){var t=!!e.url,n=e.id;if(!t){if(this.mediaBuffer!==this.media){C.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var i=this.fragCurrent;i.loader&&(C.logger.log("switching to main audio track, cancel main fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=R.IDLE}var r=this.hls;r.trigger(_.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),r.trigger(_.default.AUDIO_TRACK_SWITCHED,{id:n}),this.altAudio=!1}}},{key:"onAudioTrackSwitched",
value:function(e){var t=e.id,n=!!this.hls.audioTracks[t].url;if(n){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(C.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=n,this.tick()}},{key:"onBufferCreated",value:function(e){var t=e.tracks,n=void 0,i=void 0,r=!1;for(var a in t){var o=t[a];"main"===o.id?(i=a,n=o,"video"===a&&(this.videoBuffer=t[a].buffer)):r=!0}r&&n?(C.logger.log("alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}},{key:"onBufferAppended",value:function(e){if("main"===e.parent){var t=this.state;t!==R.PARSING&&t!==R.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}}},{key:"_checkAppendedParsed",value:function(){var e=this;if(!(this.state!==R.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;t&&!function(){var n=e.mediaBuffer?e.mediaBuffer:e.media;C.logger.log("main buffered : "+S.default.toString(n.buffered));var i=e._bufferedFrags.filter(function(e){return c.default.isBuffered(n,(e.startPTS+e.endPTS)/2)});i.push(t),e._bufferedFrags=i.sort(function(e,t){return e.startPTS-t.startPTS}),e.fragPrevious=t;var r=e.stats;r.tbuffered=performance.now(),e.fragLastKbps=Math.round(8*r.total/(r.tbuffered-r.tfirst)),e.hls.trigger(_.default.FRAG_BUFFERED,{stats:r,frag:t,id:"main"}),e.state=R.IDLE}(),this.tick()}}},{key:"onError",value:function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var n=this.media,i=n&&c.default.isBuffered(n,n.currentTime)&&c.default.isBuffered(n,n.currentTime+.5);switch(e.details){case T.ErrorDetails.FRAG_LOAD_ERROR:case T.ErrorDetails.FRAG_LOAD_TIMEOUT:case T.ErrorDetails.KEY_LOAD_ERROR:case T.ErrorDetails.KEY_LOAD_TIMEOUT:if(!e.fatal){var r=this.fragLoadError;r?r++:r=1;var a=this.config;if(r<=a.fragLoadingMaxRetry||i||t.autoLevel&&t.level){this.fragLoadError=r,t.loadCounter=0;var o=Math.min(Math.pow(2,r-1)*a.fragLoadingRetryDelay,a.fragLoadingMaxRetryTimeout);C.logger.warn("mediaController: frag loading failed, retry in "+o+" ms"),this.retryDate=performance.now()+o,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.state=R.FRAG_LOADING_WAITING_RETRY}else C.logger.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=R.ERROR}break;case T.ErrorDetails.FRAG_LOOP_LOADING_ERROR:e.fatal||(i?(this._reduceMaxBufferLength(t.duration),this.state=R.IDLE):t.autoLevel&&0!==t.level||(e.fatal=!0,this.state=R.ERROR));break;case T.ErrorDetails.LEVEL_LOAD_ERROR:case T.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==R.ERROR&&(e.fatal?(this.state=R.ERROR,C.logger.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):this.state===R.WAITING_LEVEL&&(this.state=R.IDLE));break;case T.ErrorDetails.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==R.PARSING&&this.state!==R.PARSED||(i?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=R.IDLE):(C.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}}},{key:"_reduceMaxBufferLength",value:function(e){var t=this.config;t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,C.logger.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),this.fragLoadIdx+=2*t.fragLoadingLoopThreshold)}},{key:"_checkBuffer",value:function(){var e=this.media;if(e&&e.readyState){var t=e.currentTime,n=this.mediaBuffer?this.mediaBuffer:e,i=n.buffered;if(!this.loadedmetadata&&i.length){this.loadedmetadata=!0;var r=e.seeking?t:this.startPosition,a=c.default.isBuffered(n,r);t===r&&a||(C.logger.log("target start position:"+r),a||(r=i.start(0),C.logger.log("target start position not buffered, seek to buffered.start(0) "+r)),C.logger.log("adjust currentTime from "+t+" to "+r),e.currentTime=r)}else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var o=c.default.bufferInfo(e,t,0),s=!(e.paused||e.ended||0===e.buffered.length),l=.5,u=t!==this.lastCurrentTime,d=this.config;if(u)this.stallReported&&(C.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(performance.now()-this.stalled)+"ms"),this.stallReported=!1),this.stalled=void 0,this.nudgeRetry=0;else if(s){var f=performance.now(),h=this.hls;if(this.stalled){var p=f-this.stalled,g=o.len,m=this.nudgeRetry||0;if(g<=l&&p>1e3*d.lowBufferWatchdogPeriod){this.stallReported||(this.stallReported=!0,C.logger.warn("playback stalling in low buffer @"+t),h.trigger(_.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:g}));var v=o.nextStart,y=v-t;if(v&&y<d.maxSeekHole&&y>0){this.nudgeRetry=++m;var E=m*d.nudgeOffset;C.logger.log("adjust currentTime from "+e.currentTime+" to next buffered @ "+v+" + nudge "+E),e.currentTime=v+E,this.stalled=void 0,h.trigger(_.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:v+E-t})}}else if(g>l&&p>1e3*d.highBufferWatchdogPeriod)if(this.stallReported||(this.stallReported=!0,C.logger.warn("playback stalling in high buffer @"+t),h.trigger(_.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:g})),this.stalled=void 0,this.nudgeRetry=++m,m<d.nudgeMaxRetry){var S=e.currentTime,R=S+m*d.nudgeOffset;C.logger.log("adjust currentTime from "+S+" to "+R),e.currentTime=R,h.trigger(_.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else C.logger.error("still stuck in high buffer @"+t+" after "+d.nudgeMaxRetry+", raise fatal error"),h.trigger(_.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})}else this.stalled=f,this.stallReported=!1}}}}},{key:"onFragLoadEmergencyAborted",value:function(){this.state=R.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()}},{key:"onBufferFlushed",value:function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;this._bufferedFrags=this._bufferedFrags.filter(function(t){return c.default.isBuffered(e,(t.startPTS+t.endPTS)/2)}),this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=R.IDLE,this.fragPrevious=null}},{key:"swapAudioCodec",value:function(){this.audioCodecSwap=!this.audioCodecSwap}},{key:"computeLivePosition",value:function(e,t){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-n)}},{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,C.logger.log("main stream:"+t+"->"+e),this.hls.trigger(_.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}]),t}(m.default);n.default=b},{24:24,30:30,31:31,32:32,34:34,35:35,45:45,50:50,51:51}],13:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(32),u=i(l),d=e(31),c=i(d),f=e(50),h=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.ERROR,u.default.SUBTITLE_TRACKS_UPDATED,u.default.SUBTITLE_TRACK_SWITCH,u.default.SUBTITLE_TRACK_LOADED,u.default.SUBTITLE_FRAG_PROCESSED));return n.config=e.config,n.vttFragSNsProcessed={},n.vttFragQueues=void 0,n.currentlyProcessing=null,n.currentTrackId=-1,n}return o(t,e),s(t,[{key:"destroy",value:function(){c.default.prototype.destroy.call(this)}},{key:"clearVttFragQueues",value:function(){var e=this;this.vttFragQueues={},this.tracks.forEach(function(t){e.vttFragQueues[t.id]=[]})}},{key:"nextFrag",value:function(){if(null===this.currentlyProcessing&&this.currentTrackId>-1&&this.vttFragQueues[this.currentTrackId].length){var e=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.hls.trigger(u.default.FRAG_LOADING,{frag:e})}}},{key:"onSubtitleFragProcessed",value:function(e){e.success&&this.vttFragSNsProcessed[e.frag.trackId].push(e.frag.sn),this.currentlyProcessing=null,this.nextFrag()}},{key:"onError",value:function(e){var t=e.frag;t&&"subtitle"!==t.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())}},{key:"onSubtitleTracksUpdated",value:function(e){var t=this;f.logger.log("subtitle tracks updated"),this.tracks=e.subtitleTracks,this.clearVttFragQueues(),this.vttFragSNsProcessed={},this.tracks.forEach(function(e){t.vttFragSNsProcessed[e.id]=[]})}},{key:"onSubtitleTrackSwitch",value:function(e){this.currentTrackId=e.id,this.clearVttFragQueues()}},{key:"onSubtitleTrackLoaded",value:function(e){var t=this.vttFragSNsProcessed[e.id],n=this.vttFragQueues[e.id],i=this.currentlyProcessing?this.currentlyProcessing.sn:-1,r=function(e){return t.indexOf(e.sn)>-1},a=function(e){return n.some(function(t){return t.sn===e.sn})};e.details.fragments.forEach(function(t){r(t)||t.sn===i||a(t)||(t.trackId=e.id,n.push(t))}),this.nextFrag()}}]),t}(c.default);n.default=h},{31:31,32:32,50:50}],14:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(32),u=i(l),d=e(31),c=i(d),f=e(50),h=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.SUBTITLE_TRACK_LOADED));return n.tracks=[],n.trackId=-1,n.media=void 0,n}return o(t,e),s(t,[{key:"destroy",value:function(){c.default.prototype.destroy.call(this)}},{key:"onMediaAttached",value:function(e){var t=this;this.media=e.media,this.media&&this.media.textTracks.addEventListener("change",function(){if(t.media){for(var e=-1,n=t.media.textTracks,i=0;i<n.length;i++)"showing"===n[i].mode&&(e=i);t.subtitleTrack=e}})}},{key:"onMediaDetaching",value:function(){this.media=void 0}},{key:"onManifestLoading",value:function(){this.tracks=[],this.trackId=-1}},{key:"onManifestLoaded",value:function(e){var t=this,n=e.subtitles||[],i=!1;this.tracks=n,this.trackId=-1,this.hls.trigger(u.default.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:n}),n.forEach(function(e){e.default&&(t.subtitleTrack=e.id,i=!0)})}},{key:"onTick",value:function(){var e=this.trackId,t=this.tracks[e];if(t){var n=t.details;void 0!==n&&n.live!==!0||(f.logger.log("(re)loading playlist for subtitle track "+e),this.hls.trigger(u.default.SUBTITLE_TRACK_LOADING,{url:t.url,id:e}))}}},{key:"onSubtitleTrackLoaded",value:function(e){var t=this;e.id<this.tracks.length&&(f.logger.log("subtitle track "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.timer&&(this.timer=setInterval(function(){t.onTick()},1e3*e.details.targetduration,this)),!e.details.live&&this.timer&&(clearInterval(this.timer),this.timer=null))}},{key:"setSubtitleTrackInternal",value:function(e){if(e>=0&&e<this.tracks.length){this.timer&&(clearInterval(this.timer),this.timer=null),this.trackId=e,f.logger.log("switching to subtitle track "+e);var t=this.tracks[e];this.hls.trigger(u.default.SUBTITLE_TRACK_SWITCH,{id:e});var n=t.details;void 0!==n&&n.live!==!0||(f.logger.log("(re)loading playlist for subtitle track "+e),this.hls.trigger(u.default.SUBTITLE_TRACK_LOADING,{url:t.url,id:e}))}}},{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.trackId!==e&&this.setSubtitleTrackInternal(e)}}]),t}(c.default);n.default=h},{31:31,32:32,50:50}],15:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}function l(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}function u(e,t,n,i){return Math.min(t,i)-Math.max(e,n)}Object.defineProperty(n,"__esModule",{value:!0});var d="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},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=e(32),h=i(f),p=e(31),_=i(p),g=e(46),m=i(g),v=e(54),y=i(v),E=e(50),S=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,h.default.MEDIA_ATTACHING,h.default.MEDIA_DETACHING,h.default.FRAG_PARSING_USERDATA,h.default.MANIFEST_LOADING,h.default.MANIFEST_LOADED,h.default.FRAG_LOADED,h.default.LEVEL_SWITCHING,h.default.INIT_PTS_FOUND));if(n.hls=e,n.config=e.config,n.enabled=!0,n.Cues=e.config.cueHandler,n.textTracks=[],n.tracks=[],n.unparsedVttFrags=[],n.initPTS=void 0,n.cueRanges=[],n.config.enableCEA708Captions){var i=n,o=function(e,t){var n=null;try{n=new window.Event("addtrack")}catch(e){n=document.createEvent("Event"),n.initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)},l={newCue:function(e,t,n){if(!i.textTrack1){var r=i.getExistingTrack("1");if(r)i.textTrack1=r,s(i.textTrack1),o(i.textTrack1,i.media);else{var a=i.createTextTrack("captions",i.config.captionsTextTrack1Label,i.config.captionsTextTrack1LanguageCode);a&&(a.textTrack1=!0,i.textTrack1=a)}}i.addCues("textTrack1",e,t,n)}},u={newCue:function(e,t,n){if(!i.textTrack2){var r=i.getExistingTrack("2");if(r)i.textTrack2=r,s(i.textTrack2),o(i.textTrack2,i.media);else{var a=i.createTextTrack("captions",i.config.captionsTextTrack2Label,i.config.captionsTextTrack1LanguageCode);a&&(a.textTrack2=!0,i.textTrack2=a)}}i.addCues("textTrack2",e,t,n)}};n.cea608Parser=new m.default(0,l,u)}return n}return o(t,e),c(t,[{key:"addCues",value:function(e,t,n,i){for(var r=this.cueRanges,a=!1,o=r.length;o--;){var s=r[o],l=u(s[0],s[1],t,n);if(l>=0&&(s[0]=Math.min(s[0],t),s[1]=Math.max(s[1],n),a=!0,l/(n-t)>.5))return}a||r.push([t,n]),this.Cues.newCue(this[e],t,n,i)}},{key:"onInitPtsFound",value:function(e){var t=this;"undefined"==typeof this.initPTS&&(this.initPTS=e.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach(function(e){t.onFragLoaded(e)}),this.unparsedVttFrags=[])}},{key:"getExistingTrack",value:function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var i=t.textTracks[n],r="textTrack"+e;if(i[r]===!0)return i}return null}},{key:"createTextTrack",value:function(e,t,n){var i=this.media;if(i)return i.addTextTrack(e,t,n)}},{key:"destroy",value:function(){_.default.prototype.destroy.call(this)}},{key:"onMediaAttaching",value:function(e){this.media=e.media}},{key:"onMediaDetaching",value:function(){s(this.textTrack1),s(this.textTrack2)}},{key:"onManifestLoading",value:function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0};var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)s(t[n])}}},{key:"onManifestLoaded",value:function(e){var t=this;this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=void 0,this.cueRanges=[],this.config.enableWebVTT&&!function(){t.tracks=e.subtitles||[];var n=t.media?t.media.textTracks:[];t.tracks.forEach(function(e,i){var r=void 0,a=n[i];r=l(a,e)?a:t.createTextTrack("subtitles",e.name,e.lang),r.mode=e.default?"showing":"hidden",t.textTracks.push(r)})}()}},{key:"onLevelSwitching",value:function(){this.enabled="NONE"!==this.hls.currentLevel.closedCaptions}},{key:"onFragLoaded",value:function(e){var t=this,n=e.frag,i=e.payload;if("main"===n.type){var r=n.sn;r!==this.lastSn+1&&this.cea608Parser.reset(),this.lastSn=r}else if("subtitle"===n.type)if(i.byteLength){var a=function(){if("undefined"==typeof t.initPTS)return t.unparsedVttFrags.push(e),{v:void 0};var r=t.vttCCs;r[n.cc]||(r[n.cc]={start:n.start,prevCC:t.prevCC,new:!0},t.prevCC=n.cc);var a=t.textTracks,o=t.hls;y.default.parse(i,t.initPTS,r,n.cc,function(e){e.forEach(function(e){a[n.trackId].addCue(e)}),o.trigger(h.default.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},function(e){E.logger.log("Failed to parse VTT cue: "+e),o.trigger(h.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n})})}();if("object"===("undefined"==typeof a?"undefined":d(a)))return a.v}else this.hls.trigger(h.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n})}},{key:"onFragParsingUserdata",value:function(e){if(this.enabled&&this.config.enableCEA708Captions)for(var t=0;t<e.samples.length;t++){var n=this.extractCea608Data(e.samples[t].bytes);this.cea608Parser.addData(e.samples[t].pts,n)}}},{key:"extractCea608Data",value:function(e){for(var t,n,i,r,a,o=31&e[0],s=2,l=[],u=0;u<o;u++)t=e[s++],n=127&e[s++],i=127&e[s++],r=0!==(4&t),a=3&t,0===n&&0===i||r&&0===a&&(l.push(n),l.push(i));return l}}]),t}(_.default);n.default=S},{31:31,32:32,46:46,50:50,54:54}],16:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(t,n){i(this,e),this.subtle=t,this.aesIV=n}return r(e,[{key:"decrypt",value:function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}]),e}();n.default=a},{}],17:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(){i(this,e),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return r(e,[{key:"uint8ArrayToUint32Array_",value:function(e){for(var t=new DataView(e),n=new Uint32Array(4),i=0;i<4;i++)n[i]=t.getUint32(4*i);return n}},{key:"initTable",value:function(){var e=this.sBox,t=this.invSBox,n=this.subMix,i=n[0],r=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],u=s[1],d=s[2],c=s[3],f=new Uint32Array(256),h=0,p=0,_=0;for(_=0;_<256;_++)_<128?f[_]=_<<1:f[_]=_<<1^283;for(_=0;_<256;_++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,e[h]=g,t[g]=h;var m=f[h],v=f[m],y=f[v],E=257*f[g]^16843008*g;i[h]=E<<24|E>>>8,r[h]=E<<16|E>>>16,a[h]=E<<8|E>>>24,o[h]=E,E=16843009*y^65537*v^257*m^16843008*h,l[g]=E<<24|E>>>8,u[g]=E<<16|E>>>16,d[g]=E<<8|E>>>24,c[g]=E,h?(h=m^f[f[f[y^m]]],p^=f[f[p]]):h=p=1}}},{key:"expandKey",value:function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,i=0;i<t.length&&n;)n=t[i]===this.key[i],i++;if(!n){this.key=t;var r=this.keySize=t.length;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size="+r);var a=this.ksRows=4*(r+6+1),o=void 0,s=void 0,l=this.keySchedule=new Uint32Array(a),u=this.invKeySchedule=new Uint32Array(a),d=this.sBox,c=this.rcon,f=this.invSubMix,h=f[0],p=f[1],_=f[2],g=f[3],m=void 0,v=void 0;for(o=0;o<a;o++)o<r?m=l[o]=t[o]:(v=m,o%r===0?(v=v<<8|v>>>24,v=d[v>>>24]<<24|d[v>>>16&255]<<16|d[v>>>8&255]<<8|d[255&v],v^=c[o/r|0]<<24):r>6&&o%r===4&&(v=d[v>>>24]<<24|d[v>>>16&255]<<16|d[v>>>8&255]<<8|d[255&v]),l[o]=m=(l[o-r]^v)>>>0);for(s=0;s<a;s++)o=a-s,v=3&s?l[o]:l[o-4],s<4||o<=4?u[s]=v:u[s]=h[d[v>>>24]]^p[d[v>>>16&255]]^_[d[v>>>8&255]]^g[d[255&v]],u[s]=u[s]>>>0}}},{key:"networkToHostOrderSwap",value:function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}},{key:"decrypt",value:function(e,t,n){for(var i,r,a=this.keySize+6,o=this.invKeySchedule,s=this.invSBox,l=this.invSubMix,u=l[0],d=l[1],c=l[2],f=l[3],h=this.uint8ArrayToUint32Array_(n),p=h[0],_=h[1],g=h[2],m=h[3],v=new Int32Array(e),y=new Int32Array(v.length),E=void 0,S=void 0,T=void 0,C=void 0,R=void 0,b=void 0,w=void 0,A=void 0,I=void 0,P=void 0,O=void 0,D=void 0,k=this.networkToHostOrderSwap;t<v.length;){for(I=k(v[t]),P=k(v[t+1]),O=k(v[t+2]),D=k(v[t+3]),R=I^o[0],b=D^o[1],w=O^o[2],A=P^o[3],i=4,r=1;r<a;r++)E=u[R>>>24]^d[b>>16&255]^c[w>>8&255]^f[255&A]^o[i],S=u[b>>>24]^d[w>>16&255]^c[A>>8&255]^f[255&R]^o[i+1],T=u[w>>>24]^d[A>>16&255]^c[R>>8&255]^f[255&b]^o[i+2],C=u[A>>>24]^d[R>>16&255]^c[b>>8&255]^f[255&w]^o[i+3],R=E,b=S,w=T,A=C,i+=4;E=s[R>>>24]<<24^s[b>>16&255]<<16^s[w>>8&255]<<8^s[255&A]^o[i],S=s[b>>>24]<<24^s[w>>16&255]<<16^s[A>>8&255]<<8^s[255&R]^o[i+1],T=s[w>>>24]<<24^s[A>>16&255]<<16^s[R>>8&255]<<8^s[255&b]^o[i+2],C=s[A>>>24]<<24^s[R>>16&255]<<16^s[b>>8&255]<<8^s[255&w]^o[i+3],i+=3,y[t]=k(E^p),y[t+1]=k(C^_),y[t+2]=k(T^g),y[t+3]=k(S^m),p=I,_=P,g=O,m=D,t+=4}return y.buffer}},{key:"destroy",value:function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0}}]),e}();n.default=a},{}],18:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(16),s=i(o),l=e(19),u=i(l),d=e(17),c=i(d),f=e(30),h=e(50),p=function(){function e(t,n){r(this,e),this.observer=t,this.config=n,this.logEnabled=!0;try{var i=crypto?crypto:self.crypto;this.subtle=i.subtle||i.webkitSubtle}catch(e){}this.disableWebCrypto=!this.subtle}return a(e,[{key:"isSync",value:function(){return this.disableWebCrypto&&this.config.enableSoftwareAES}},{key:"decrypt",value:function(e,t,n,i){var r=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(h.logger.log("JS AES decrypt"),this.logEnabled=!1);var a=this.decryptor;a||(this.decryptor=a=new c.default),a.expandKey(t),i(a.decrypt(e,0,n))}else!function(){r.logEnabled&&(h.logger.log("WebCrypto AES decrypt"),r.logEnabled=!1);var a=r.subtle;r.key!==t&&(r.key=t,r.fastAesKey=new u.default(a,t)),r.fastAesKey.expandKey().then(function(o){var l=new s.default(a,n);l.decrypt(e,o).catch(function(a){r.onWebCryptoError(a,e,t,n,i)}).then(function(e){i(e)})}).catch(function(a){r.onWebCryptoError(a,e,t,n,i)})}()}},{key:"onWebCryptoError",value:function(e,t,n,i,r){this.config.enableSoftwareAES?(h.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,n,i,r)):(h.logger.error("decrypting error : "+e.message),this.observer.trigger(Event.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))}},{key:"destroy",value:function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)}}]),e}();n.default=p},{16:16,17:17,19:19,30:30,50:50}],19:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(t,n){i(this,e),this.subtle=t,this.key=n}return r(e,[{key:"expandKey",value:function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}]),e}();n.default=a},{}],20:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(21),s=i(o),l=e(50),u=e(26),d=i(u),c=function(){function e(t,n,i){r(this,e),this.observer=t,this.config=i,this.remuxer=n}return a(e,[{key:"resetInitSegment",value:function(e,t,n,i){this._aacTrack={container:"audio/adts",type:"audio",id:-1,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}}},{key:"resetTimeStamp",value:function(){}},{key:"append",value:function(e,t,n,i){var r,a,o,u,c,f,h,p,_,g,m=new d.default(e),v=90*m.timeStamp;for(r=this._aacTrack,f=m.length,_=e.length;f<_-1&&(255!==e[f]||240!==(240&e[f+1]));f++);for(r.samplerate||(a=s.default.getAudioConfig(this.observer,e,f,r.manifestCodec),r.config=a.config,r.samplerate=a.samplerate,r.channelCount=a.channelCount,r.codec=a.codec,l.logger.log("parsed codec:"+r.codec+",rate:"+a.samplerate+",nb channel:"+a.channelCount)),c=0,u=9216e4/r.samplerate;f+5<_&&(h=1&e[f+1]?7:9,o=(3&e[f+3])<<11|e[f+4]<<3|(224&e[f+5])>>>5,o-=h,o>0&&f+h+o<=_);)for(p=v+c*u,g={unit:e.subarray(f+h,f+h+o),pts:p,dts:p},r.samples.push(g),r.len+=o,f+=o+h,c++;f<_-1&&(255!==e[f]||240!==(240&e[f+1]));f++);this.remuxer.remux(r,{samples:[]},{samples:[{pts:v,dts:v,unit:m.payload}]},{samples:[]},t,n,i)}},{key:"destroy",value:function(){}}],[{key:"probe",value:function(e){var t,n,i=new d.default(e);if(i.hasTimeStamp)for(t=i.length,n=e.length;t<n-1;t++)if(255===e[t]&&240===(240&e[t+1]))return!0;return!1}}]),e}();n.default=c},{21:21,26:26,50:50}],21:[function(e,t,n){"use strict";var i=e(50),r=e(30),a={getAudioConfig:function(e,t,n,a){var o,s,l,u,d,c=navigator.userAgent.toLowerCase(),f=a,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return o=((192&t[n+2])>>>6)+1,s=(60&t[n+2])>>>2,s>h.length-1?void e.trigger(Event.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+s}):(u=(1&t[n+2])<<2,u|=(192&t[n+3])>>>6,i.logger.log("manifest codec:"+a+",ADTS data:type:"+o+",sampleingIndex:"+s+"["+h[s]+"Hz],channelConfig:"+u),/firefox/i.test(c)?s>=6?(o=5,d=new Array(4),l=s-3):(o=2,d=new Array(2),l=s):c.indexOf("android")!==-1?(o=2,d=new Array(2),l=s):(o=5,d=new Array(4),a&&(a.indexOf("mp4a.40.29")!==-1||a.indexOf("mp4a.40.5")!==-1)||!a&&s>=6?l=s-3:((a&&a.indexOf("mp4a.40.2")!==-1&&s>=6&&1===u||!a&&1===u)&&(o=2,d=new Array(2)),l=s)),d[0]=o<<3,d[0]|=(14&s)>>1,d[1]|=(1&s)<<7,d[1]|=u<<3,5===o&&(d[1]|=(14&l)>>1,d[2]=(1&l)<<7,d[2]|=8,d[3]=0),{config:d,samplerate:h[s],channelCount:u,codec:"mp4a.40."+o,manifestCodec:f})}};t.exports=a},{30:30,50:50}],22:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(32),s=i(o),l=e(30),u=e(18),d=i(u),c=e(20),f=i(c),h=e(27),p=i(h),_=e(29),g=i(_),m=e(42),v=i(m),y=e(43),E=i(y),S=function(){function e(t,n,i,a){r(this,e),this.observer=t,this.typeSupported=n,this.config=i,this.vendor=a}return a(e,[{key:"destroy",value:function(){var e=this.demuxer;e&&e.destroy()}},{key:"push",value:function(e,t,n,i,r,a,o,l,u,c,f,h){if(e.byteLength>0&&null!=t&&null!=t.key&&"AES-128"===t.method){var p=this.decrypter;null==p&&(p=this.decrypter=new d.default(this.observer,this.config));var _,g=this;try{_=performance.now()}catch(e){_=Date.now()}p.decrypt(e,t.key.buffer,t.iv.buffer,function(e){var d;try{d=performance.now()}catch(e){d=Date.now()}g.observer.trigger(s.default.FRAG_DECRYPTED,{stats:{tstart:_,tdecrypt:d}}),g.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),i,r,a,o,l,u,c,f,h)})}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),i,r,a,o,l,u,c,f,h)}},{key:"pushDecrypted",value:function(e,t,n,i,r,a,o,u,d,c,h,_){var m=this.demuxer;if(!m||o&&!this.probe(e)){var y=this.observer,S=this.typeSupported,T=this.config,C=[{demux:g.default,remux:v.default},{demux:f.default,remux:v.default},{demux:p.default,remux:E.default}];for(var R in C){var b=C[R],w=b.demux.probe;if(w(e)){var A=this.remuxer=new b.remux(y,T,S,this.vendor);m=new b.demux(y,A,T,S),this.probe=w;break}}if(!m)return void y.trigger(s.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=m}var I=this.remuxer;(o||u)&&(m.resetInitSegment(n,i,r,c),I.resetInitSegment()),o&&(m.resetTimeStamp(),I.resetTimeStamp(_)),"function"==typeof m.setDecryptData&&m.setDecryptData(t),m.append(e,a,d,h)}}]),e}();n.default=S},{18:18,20:20,27:27,29:29,30:30,32:32,42:42,43:43}],23:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var r=e(22),a=i(r),o=e(32),s=i(o),l=e(50),u=e(1),d=i(u),c=function(e){
var t=new d.default;t.trigger=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];t.emit.apply(t,[e,e].concat(i))},t.off=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];t.removeListener.apply(t,[e].concat(i))};var n=function(t,n){e.postMessage({event:t,data:n})};e.addEventListener("message",function(i){var r=i.data;switch(r.cmd){case"init":var o=JSON.parse(r.config);e.demuxer=new a.default(t,r.typeSupported,o,r.vendor);try{(0,l.enableLogs)(o.debug===!0)}catch(e){console.warn("demuxerWorker: unable to enable logs")}n("init",null);break;case"demux":e.demuxer.push(r.data,r.decryptdata,r.initSegment,r.audioCodec,r.videoCodec,r.timeOffset,r.discontinuity,r.trackSwitch,r.contiguous,r.duration,r.accurateTimeOffset,r.defaultInitPTS)}}),t.on(s.default.FRAG_DECRYPTED,n),t.on(s.default.FRAG_PARSING_INIT_SEGMENT,n),t.on(s.default.FRAG_PARSED,n),t.on(s.default.ERROR,n),t.on(s.default.FRAG_PARSING_METADATA,n),t.on(s.default.FRAG_PARSING_USERDATA,n),t.on(s.default.INIT_PTS_FOUND,n),t.on(s.default.FRAG_PARSING_DATA,function(t,n){var i=[],r={event:t,data:n};n.data1&&(r.data1=n.data1.buffer,i.push(n.data1.buffer),delete n.data1),n.data2&&(r.data2=n.data2.buffer,i.push(n.data2.buffer),delete n.data2),e.postMessage(r,i)})};n.default=c},{1:1,22:22,32:32,50:50}],24:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(32),s=i(o),l=e(22),u=i(l),d=e(23),c=i(d),f=e(50),h=e(30),p=e(1),_=i(p),g=function(){function t(n,i){r(this,t),this.hls=n,this.id=i;var a=this.observer=new _.default,o=n.config;a.trigger=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];a.emit.apply(a,[e,e].concat(n))},a.off=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];a.removeListener.apply(a,[e].concat(n))};var l=function(e,t){t=t||{},t.frag=this.frag,t.id=this.id,n.trigger(e,t)}.bind(this);a.on(s.default.FRAG_DECRYPTED,l),a.on(s.default.FRAG_PARSING_INIT_SEGMENT,l),a.on(s.default.FRAG_PARSING_DATA,l),a.on(s.default.FRAG_PARSED,l),a.on(s.default.ERROR,l),a.on(s.default.FRAG_PARSING_METADATA,l),a.on(s.default.FRAG_PARSING_USERDATA,l),a.on(s.default.INIT_PTS_FOUND,l);var d={mp4:MediaSource.isTypeSupported("video/mp4"),mpeg:MediaSource.isTypeSupported("audio/mpeg"),mp3:MediaSource.isTypeSupported('audio/mp4; codecs="mp3"')},p=navigator.vendor;if(o.enableWorker&&"undefined"!=typeof Worker){f.logger.log("demuxing in webworker");var g=void 0;try{var m=e(3);g=this.w=m(c.default),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(e){n.trigger(s.default.ERROR,{type:h.ErrorTypes.OTHER_ERROR,details:h.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:e.message+" ("+e.filename+":"+e.lineno+")"}})},g.postMessage({cmd:"init",typeSupported:d,vendor:p,id:i,config:JSON.stringify(o)})}catch(e){f.logger.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),g&&URL.revokeObjectURL(g.objectURL),this.demuxer=new u.default(a,d,o,p),this.w=void 0}}else this.demuxer=new u.default(a,d,o,p)}return a(t,[{key:"destroy",value:function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var n=this.observer;n&&(n.removeAllListeners(),this.observer=null)}},{key:"push",value:function(e,t,n,i,r,a,o,s){var l=this.w,u=isNaN(r.startDTS)?r.start:r.startDTS,d=r.decryptdata,c=this.frag,h=!(c&&r.cc===c.cc),p=!(c&&r.level===c.level),_=c&&r.sn===c.sn+1,g=!h&&!p&&_;if(h&&f.logger.log(this.id+":discontinuity detected"),p&&f.logger.log(this.id+":switch detected"),this.frag=r,l)l.postMessage({cmd:"demux",data:e,decryptdata:d,initSegment:t,audioCodec:n,videoCodec:i,timeOffset:u,discontinuity:h,trackSwitch:p,contiguous:g,duration:a,accurateTimeOffset:o,defaultInitPTS:s},[e]);else{var m=this.demuxer;m&&m.push(e,d,t,n,i,u,h,p,g,a,o,s)}}},{key:"onWorkerMessage",value:function(e){var t=e.data,n=this.hls;switch(t.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case s.default.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data2&&(t.data.data2=new Uint8Array(t.data2));default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}}}]),t}();n.default=g},{1:1,22:22,23:23,3:3,30:30,32:32,50:50}],25:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e(50),o=function(){function e(t){i(this,e),this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}return r(e,[{key:"loadWord",value:function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,i=new Uint8Array(4),r=Math.min(4,t);if(0===r)throw new Error("no bytes available");i.set(e.subarray(n,n+r)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r}},{key:"skipBits",value:function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&a.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}},{key:"skipLZ",value:function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!==(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(e){var t,n,i=8,r=8;for(t=0;t<e;t++)0!==r&&(n=this.readEG(),r=(i+n+256)%256),i=0===r?i:r}},{key:"readSPS",value:function(){var e,t,n,i,r,a,o,s,l,u=0,d=0,c=0,f=0,h=this.readUByte.bind(this),p=this.readBits.bind(this),_=this.readUEG.bind(this),g=this.readBoolean.bind(this),m=this.skipBits.bind(this),v=this.skipEG.bind(this),y=this.skipUEG.bind(this),E=this.skipScalingList.bind(this);if(h(),e=h(),t=p(5),m(3),n=h(),y(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var S=_();if(3===S&&m(1),y(),y(),m(1),g())for(s=3!==S?8:12,l=0;l<s;l++)g()&&E(l<6?16:64)}y();var T=_();if(0===T)_();else if(1===T)for(m(1),v(),v(),i=_(),l=0;l<i;l++)v();y(),m(1),r=_(),a=_(),o=p(1),0===o&&m(1),m(1),g()&&(u=_(),d=_(),c=_(),f=_());var C=[1,1];if(g()&&g()){var R=h();switch(R){case 1:C=[1,1];break;case 2:C=[12,11];break;case 3:C=[10,11];break;case 4:C=[16,11];break;case 5:C=[40,33];break;case 6:C=[24,11];break;case 7:C=[20,11];break;case 8:C=[32,11];break;case 9:C=[80,33];break;case 10:C=[18,11];break;case 11:C=[15,11];break;case 12:C=[64,33];break;case 13:C=[160,99];break;case 14:C=[4,3];break;case 15:C=[3,2];break;case 16:C=[2,1];break;case 255:C=[h()<<8|h(),h()<<8|h()]}}return{width:Math.ceil(16*(r+1)-2*u-2*d),height:(2-o)*(a+1)*16-(o?2:4)*(c+f),pixelRatio:C}}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}}]),e}();n.default=o},{50:50}],26:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e(50),o=function(){function e(t){i(this,e),this._hasTimeStamp=!1;for(var n,r,o,s,l,u,d,c,f=0;;)if(d=this.readUTF(t,f,3),f+=3,"ID3"===d)f+=3,n=127&t[f++],r=127&t[f++],o=127&t[f++],s=127&t[f++],l=(n<<21)+(r<<14)+(o<<7)+s,u=f+l,this._parseID3Frames(t,f,u),f=u;else{if("3DI"!==d)return f-=3,c=f,void(c&&(this.hasTimeStamp||a.logger.warn("ID3 tag found, but no timestamp"),this._length=c,this._payload=t.subarray(0,c)));f+=7,a.logger.log("3DI footer found, end: "+f)}}return r(e,[{key:"readUTF",value:function(e,t,n){var i="",r=t,a=t+n;do i+=String.fromCharCode(e[r++]);while(r<a);return i}},{key:"_parseID3Frames",value:function(e,t,n){for(var i,r,o,s,l;t+8<=n;)switch(i=this.readUTF(e,t,4),t+=4,r=e[t++]<<24+e[t++]<<16+e[t++]<<8+e[t++],s=e[t++]<<8+e[t++],o=t,i){case"PRIV":if("com.apple.streaming.transportStreamTimestamp"===this.readUTF(e,t,44)){t+=44,t+=4;var u=1&e[t++];this._hasTimeStamp=!0,l=((e[t++]<<23)+(e[t++]<<15)+(e[t++]<<7)+e[t++])/45,u&&(l+=47721858.84),l=Math.round(l),a.logger.trace("ID3 timestamp found: "+l),this._timeStamp=l}}}},{key:"hasTimeStamp",get:function(){return this._hasTimeStamp}},{key:"timeStamp",get:function(){return this._timeStamp}},{key:"length",get:function(){return this._length}},{key:"payload",get:function(){return this._payload}}]),e}();n.default=o},{50:50}],27:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(32),s=i(o),l=function(){function e(t,n){r(this,e),this.observer=t,this.remuxer=n}return a(e,[{key:"resetTimeStamp",value:function(){}},{key:"resetInitSegment",value:function(t,n,i,r){var a=this.initData=e.parseInitSegment(t),o={};a.audio&&(o.audio={container:"audio/mp4",codec:n,initSegment:t}),a.video&&(o.video={container:"video/mp4",codec:i,initSegment:t}),this.observer.trigger(s.default.FRAG_PARSING_INIT_SEGMENT,{tracks:o})}},{key:"append",value:function(t,n,i,r){var a=this.initData,o=e.startDTS(a,t);this.remuxer.remux(a.audio,a.video,null,null,o,i,r,t)}},{key:"destroy",value:function(){}}],[{key:"probe",value:function(t){if(t.length>=8){var n=e.bin2str(t.subarray(4,8));return["moof","ftyp","styp"].indexOf(n)>=0}return!1}},{key:"bin2str",value:function(e){return String.fromCharCode.apply(null,e)}},{key:"findBox",value:function(t,n){var i,r,a,o,s,l=[];if(!n.length)return null;for(i=0;i<t.byteLength;)r=t[i]<<24,r|=t[i+1]<<16,r|=t[i+2]<<8,r|=t[i+3],a=e.bin2str(t.subarray(i+4,i+8)),o=r>1?i+r:t.byteLength,a===n[0]&&(1===n.length?l.push(t.subarray(i+8,o)):(s=e.findBox(t.subarray(i+8,o),n.slice(1)),s.length&&(l=l.concat(s)))),i=o;return l}},{key:"parseInitSegment",value:function(t){var n=[],i=e.findBox(t,["moov","trak"]);return i.forEach(function(t){var i=e.findBox(t,["tkhd"])[0];if(i){var r=i[0],a=0===r?12:20,o=i[a]<<24|i[a+1]<<16|i[a+2]<<8|i[a+3];o=o<0?4294967296+o:o;var s=e.findBox(t,["mdia","mdhd"])[0];if(s){r=s[0],a=0===r?12:20;var l=s[a]<<24|s[a+1]<<16|s[a+2]<<8|s[a+3],u=e.findBox(t,["mdia","hdlr"])[0];if(u){var d=e.bin2str(u.subarray(8,12)),c={soun:"audio",vide:"video"}[d];c&&(n[o]={timescale:l,type:c},n[c]={timescale:l,id:o})}}}}),n}},{key:"startDTS",value:function(t,n){var i,r,a;return i=e.findBox(n,["moof","traf"]),r=[].concat.apply([],i.map(function(n){return e.findBox(n,["tfhd"]).map(function(i){var r,a,o;return r=i[4]<<24|i[5]<<16|i[6]<<8|i[7],a=t[r].timescale||9e4,o=e.findBox(n,["tfdt"]).map(function(e){var t,n;return t=e[0],n=e[4]<<24|e[5]<<16|e[6]<<8|e[7],1===t&&(n*=Math.pow(2,32),n+=e[8]<<24|e[9]<<16|e[10]<<8|e[11]),n})[0],o=o||1/0,o/a})})),a=Math.min.apply(null,r),isFinite(a)?a:0}}]),e}();n.default=l},{32:32}],28:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(18),s=i(o),l=function(){function e(t,n,i,a){r(this,e),this.decryptdata=i,this.discardEPB=a,this.decrypter=new s.default(t,n)}return a(e,[{key:"decryptBuffer",value:function(e,t){this.decrypter.decrypt(e,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,t)}},{key:"decryptAacSample",value:function(e,t,n,i){var r=e[t].unit,a=r.subarray(16,r.length-r.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,function(a){a=new Uint8Array(a),r.set(a,16),i||s.decryptAacSamples(e,t+1,n)})}},{key:"decryptAacSamples",value:function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,i),!i)return}}}},{key:"getAvcEncryptedData",value:function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),i=0,r=32;r<=e.length-16;r+=160,i+=16)n.set(e.subarray(r,r+16),i);return n}},{key:"getAvcDecryptedUnit",value:function(e,t){t=new Uint8Array(t);for(var n=0,i=32;i<=e.length-16;i+=160,n+=16)e.set(t.subarray(n,n+16),i);return e}},{key:"decryptAvcSample",value:function(e,t,n,i,r,a){var o=this.discardEPB(r.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,function(s){r.data=l.getAvcDecryptedUnit(o,s),a||l.decryptAvcSamples(e,t,n+1,i)})}},{key:"decryptAvcSamples",value:function(e,t,n,i){for(;;t++,n=0){if(t>=e.length)return void i();for(var r=e[t].units;!(n>=r.length);n++){var a=r[n];if(!(a.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,i,a,o),!o)return}}}}}]),e}();n.default=l},{18:18}],29:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(21),s=i(o),l=e(32),u=i(l),d=e(25),c=i(d),f=e(28),h=i(f),p=e(50),_=e(30),g=function(){function e(t,n,i,a){r(this,e),this.observer=t,this.config=i,this.typeSupported=a,this.remuxer=n,this.sampleAes=null}return a(e,[{key:"setDecryptData",value:function(e){null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?this.sampleAes=new h.default(this.observer,this.config,e,this.discardEPB):this.sampleAes=null}},{key:"resetInitSegment",value:function(e,t,n,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack={container:"video/mp2t",type:"video",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:0},this._audioTrack={container:"video/mp2t",type:"audio",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,isAAC:!0},this._id3Track={type:"id3",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0},this._txtTrack={type:"text",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0},this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=t,this.videoCodec=n,this._duration=i}},{key:"resetTimeStamp",value:function(){}},{key:"append",value:function(e,t,n,i){var r,a,o,s,l,d,c=e.length,f=!1;this.contiguous=n;var h=this.pmtParsed,g=this._avcTrack,m=this._audioTrack,v=this._id3Track,y=g.id,E=m.id,S=v.id,T=this._pmtId,C=g.pesData,R=m.pesData,b=v.pesData,w=this._parsePAT,A=this._parsePMT,I=this._parsePES,P=this._parseAVCPES.bind(this),O=this._parseAACPES.bind(this),D=this._parseMPEGPES.bind(this),k=this._parseID3PES.bind(this);for(c-=c%188,r=0;r<c;r+=188)if(71===e[r]){if(a=!!(64&e[r+1]),o=((31&e[r+1])<<8)+e[r+2],s=(48&e[r+3])>>4,s>1){if(l=r+5+e[r+4],l===r+188)continue}else l=r+4;switch(o){case y:a&&(C&&(d=I(C))&&P(d,!1),C={data:[],size:0}),C&&(C.data.push(e.subarray(l,r+188)),C.size+=r+188-l);break;case E:a&&(R&&(d=I(R))&&(m.isAAC?O(d):D(d)),R={data:[],size:0}),R&&(R.data.push(e.subarray(l,r+188)),R.size+=r+188-l);break;case S:a&&(b&&(d=I(b))&&k(d),b={data:[],size:0}),b&&(b.data.push(e.subarray(l,r+188)),b.size+=r+188-l);break;case 0:a&&(l+=e[l]+1),T=this._pmtId=w(e,l);break;case T:a&&(l+=e[l]+1);var L=A(e,l,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,null!=this.sampleAes);y=L.avc,y>0&&(g.id=y),E=L.audio,E>0&&(m.id=E,m.isAAC=L.isAAC),S=L.id3,S>0&&(v.id=S),f&&!h&&(p.logger.log("reparse from beginning"),f=!1,r=-188),h=this.pmtParsed=!0;break;case 17:case 8191:break;default:f=!0}}else this.observer.trigger(u.default.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});C&&(d=I(C))?(P(d,!0),g.pesData=null):g.pesData=C,R&&(d=I(R))?(m.isAAC?O(d):D(d),m.pesData=null):(R&&R.size&&p.logger.log("last AAC PES packet truncated,might overlap between fragments"),m.pesData=R),b&&(d=I(b))?(k(d),v.pesData=null):v.pesData=b,null==this.sampleAes?this.remuxer.remux(m,g,v,this._txtTrack,t,n,i):this.decryptAndRemux(m,g,v,this._txtTrack,t,n,i)}},{key:"decryptAndRemux",value:function(e,t,n,i,r,a,o){var s=this;e.samples&&e.isAAC?!function(){var l=s;s.sampleAes.decryptAacSamples(e.samples,0,function(){l.decryptAndRemuxAvc(e,t,n,i,r,a,o)})}():this.decryptAndRemuxAvc(e,t,n,i,r,a,o)}},{key:"decryptAndRemuxAvc",value:function(e,t,n,i,r,a,o){var s=this;t.samples?!function(){var l=s;s.sampleAes.decryptAvcSamples(t.samples,0,0,function(){l.remuxer.remux(e,t,n,i,r,a,o)})}():this.remuxer.remux(e,t,n,i,r,a,o)}},{key:"destroy",value:function(){this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(e,t){return(31&e[t+10])<<8|e[t+11]}},{key:"_parsePMT",value:function(e,t,n,i){var r,a,o,s,l={audio:-1,avc:-1,id3:-1,isAAC:!0};for(r=(15&e[t+1])<<8|e[t+2],a=t+3+r-4,o=(15&e[t+10])<<8|e[t+11],t+=12+o;t<a;){switch(s=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!i){p.logger.log("unkown stream type:"+e[t]);break}case 15:l.audio===-1&&(l.audio=s);break;case 21:l.id3===-1&&(l.id3=s);break;case 219:if(!i){p.logger.log("unkown stream type:"+e[t]);break}case 27:l.avc===-1&&(l.avc=s);break;case 3:case 4:n?l.audio===-1&&(l.audio=s,l.isAAC=!1):p.logger.log("MPEG audio found, not supported in this browser for now");break;case 36:p.logger.warn("HEVC stream type found, not supported for now");break;default:p.logger.log("unkown stream type:"+e[t])}t+=((15&e[t+3])<<8|e[t+4])+5}return l}},{key:"_parsePES",value:function(e){var t,n,i,r,a,o,s,l,u,d=0,c=e.data;if(!e||0===e.size)return null;for(;c[0].length<19&&c.length>1;){var f=new Uint8Array(c[0].length+c[1].length);f.set(c[0]),f.set(c[1],c[0].length),c[0]=f,c.splice(1,1)}if(t=c[0],i=(t[0]<<16)+(t[1]<<8)+t[2],1===i){if(r=(t[4]<<8)+t[5],r&&r>e.size-6)return null;n=t[7],192&n&&(s=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,s>4294967295&&(s-=8589934592),64&n?(l=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,l>4294967295&&(l-=8589934592),s-l>54e5&&(p.logger.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l)):l=s),a=t[8],u=a+9,e.size-=u,o=new Uint8Array(e.size);for(var h=0,_=c.length;h<_;h++){t=c[h];var g=t.byteLength;if(u){if(u>g){u-=g;continue}t=t.subarray(u),g-=u,u=0}o.set(t,d),d+=g}return r&&(r-=a+3),{data:o,pts:s,dts:l,len:r}}return null}},{key:"pushAccesUnit",value:function(e,t){if(e.units.length&&e.frame){var n=t.samples,i=n.length;!this.config.forceKeyFrameOnDiscontinuity||e.key===!0||t.sps&&(i||this.contiguous)?(e.id=i,n.push(e)):t.dropped++}e.debug.length&&p.logger.log(e.pts+"/"+e.dts+":"+e.debug)}},{key:"_parseAVCPES",value:function(e,t){var n,i,r,a=this,o=this._avcTrack,s=this._parseAVCNALu(e.data),l=!1,u=this.avcSample;e.data=null,s.forEach(function(t){switch(t.type){case 1:i=!0,l&&u&&(u.debug+="NDR "),u.frame=!0;var s=t.data;if(s.length>4){var d=new c.default(s).readSliceType();2!==d&&4!==d&&7!==d&&9!==d||(u.key=!0)}break;case 5:i=!0,u||(u=a.avcSample=a._createAVCSample(!0,e.pts,e.dts,"")),l&&(u.debug+="IDR "),u.key=!0,u.frame=!0;break;case 6:i=!0,l&&u&&(u.debug+="SEI "),n=new c.default(a.discardEPB(t.data)),n.readUByte();for(var f=0,h=0,p=!1,_=0;!p&&n.bytesAvailable>1;){f=0;do _=n.readUByte(),f+=_;while(255===_);h=0;do _=n.readUByte(),h+=_;while(255===_);if(4===f&&0!==n.bytesAvailable){p=!0;var g=n.readUByte();if(181===g){var m=n.readUShort();if(49===m){var v=n.readUInt();if(1195456820===v){var y=n.readUByte();if(3===y){var E=n.readUByte(),S=n.readUByte(),T=31&E,C=[E,S];for(r=0;r<T;r++)C.push(n.readUByte()),C.push(n.readUByte()),C.push(n.readUByte());a._insertSampleInOrder(a._txtTrack.samples,{type:3,pts:e.pts,bytes:C})}}}}}else if(h<n.bytesAvailable)for(r=0;r<h;r++)n.readUByte()}break;case 7:if(i=!0,l&&u&&(u.debug+="SPS "),!o.sps){n=new c.default(t.data);var R=n.readSPS();o.width=R.width,o.height=R.height,o.pixelRatio=R.pixelRatio,o.sps=[t.data],o.duration=a._duration;var b=t.data.subarray(1,4),w="avc1.";for(r=0;r<3;r++){var A=b[r].toString(16);A.length<2&&(A="0"+A),w+=A}o.codec=w}break;case 8:i=!0,l&&u&&(u.debug+="PPS "),o.pps||(o.pps=[t.data]);break;case 9:i=!1,u&&a.pushAccesUnit(u,o),u=a.avcSample=a._createAVCSample(!1,e.pts,e.dts,l?"AUD ":"");break;case 12:i=!1;break;default:i=!1,u&&(u.debug+="unknown NAL "+t.type+" ")}if(u&&i){var I=u.units;I.push(t)}}),t&&u&&(this.pushAccesUnit(u,o),this.avcSample=null)}},{key:"_createAVCSample",value:function(e,t,n,i){return{key:e,pts:t,dts:n,units:[],debug:i}}},{key:"_insertSampleInOrder",value:function(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var i=n-1;i>=0;i--)if(t.pts<e[i].pts){e.splice(i,0,t);break}}else e.push(t)}},{key:"_getLastNalUnit",value:function(){var e=this.avcSample,t=void 0;if(!e||0===e.units.length){var n=this._avcTrack,i=n.samples;e=i[i.length-1]}if(e){var r=e.units;t=r[r.length-1]}return t}},{key:"_parseAVCNALu",value:function(e){var t,n,i,r,a,o=0,s=e.byteLength,l=this._avcTrack,u=l.naluState||0,d=u,c=[],f=-1;for(u===-1&&(f=0,a=31&e[0],u=0,o=1);o<s;)if(t=e[o++],u)if(1!==u)if(t)if(1===t){if(f>=0)i={data:e.subarray(f,o-u-1),type:a},c.push(i);else{var h=this._getLastNalUnit();if(h&&(d&&o<=4-d&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-d)),n=o-u-1,n>0)){var p=new Uint8Array(h.data.byteLength+n);p.set(h.data,0),p.set(e.subarray(0,n),h.data.byteLength),h.data=p}}o<s?(r=31&e[o],f=o,a=r,u=0):u=-1}else u=0;else u=3;else u=t?0:2;else u=t?0:1;if(f>=0&&u>=0&&(i={data:e.subarray(f,s),type:a,state:u},c.push(i)),0===c.length){var _=this._getLastNalUnit();if(_){var g=new Uint8Array(_.data.byteLength+e.byteLength);g.set(_.data,0),g.set(e,_.data.byteLength),_.data=g}}return l.naluState=u,c}},{key:"discardEPB",value:function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===r[0]&&(o++,r.shift()),n[a]=e[o];return n}},{key:"_parseAACPES",value:function(e){var t,n,i,r,a,o,l,d,c,f=this._audioTrack,h=e.data,g=e.pts,m=0,v=this.aacOverFlow,y=this.aacLastPTS;if(v){var E=new Uint8Array(v.byteLength+h.byteLength);E.set(v,0),E.set(h,v.byteLength),h=E}for(a=m,d=h.length;a<d-1&&(255!==h[a]||240!==(240&h[a+1]));a++);if(a){var S,T;if(a<d-1?(S="AAC PES did not start with ADTS header,offset:"+a,T=!1):(S="no ADTS header found in AAC PES",T=!0),p.logger.warn("parsing error:"+S),this.observer.trigger(u.default.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,fatal:T,reason:S}),T)return}if(!f.samplerate){var C=this.audioCodec;t=s.default.getAudioConfig(this.observer,h,a,C),f.config=t.config,f.samplerate=t.samplerate,f.channelCount=t.channelCount,f.codec=t.codec,f.manifestCodec=t.manifestCodec,f.duration=this._duration,p.logger.log("parsed codec:"+f.codec+",rate:"+t.samplerate+",nb channel:"+t.channelCount)}if(r=0,i=9216e4/f.samplerate,v&&y){var R=y+i;Math.abs(R-g)>1&&(p.logger.log("AAC: align PTS for overlapping frames by "+Math.round((R-g)/90)),g=R)}for(;a+5<d&&(o=1&h[a+1]?7:9,n=(3&h[a+3])<<11|h[a+4]<<3|(224&h[a+5])>>>5,n-=o,n>0&&a+o+n<=d);)for(l=g+r*i,c={unit:h.subarray(a+o,a+o+n),pts:l,dts:l},f.samples.push(c),f.len+=n,a+=n+o,r++;a<d-1&&(255!==h[a]||240!==(240&h[a+1]));a++);v=a<d?h.subarray(a,d):null,this.aacOverFlow=v,this.aacLastPTS=l}},{key:"_parseMPEGPES",value:function(e){for(var t,n=e.data,i=e.pts,r=n.length,a=0,o=0;o<r&&(t=this._parseMpeg(n,o,r,a++,i))>0;)o+=t}},{key:"_onMpegFrame",value:function(e,t,n,i,r,a){var o=1152/n*1e3,s=a+r*o,l=this._audioTrack;l.config=[],l.channelCount=i,l.samplerate=n,l.duration=this._duration,l.samples.push({unit:e,pts:s,dts:s}),l.len+=e.length}},{key:"_onMpegNoise",value:function(e){p.logger.warn("mpeg audio has noise: "+e.length+" bytes")}},{key:"_parseMpeg",value:function(e,t,n,i,r){var a=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],o=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3];if(t+2>n)return-1;if(255===e[t]||224===(224&e[t+1])){if(t+24>n)return-1;var s=e[t+1]>>3&3,l=e[t+1]>>1&3,u=e[t+2]>>4&15,d=e[t+2]>>2&3,c=!!(2&e[t+2]);if(1!==s&&0!==u&&15!==u&&3!==d){var f=3===s?3-l:3===l?3:4,h=1e3*a[14*f+u-1],p=3===s?0:2===s?1:2,_=o[3*p+d],g=c?1:0,m=e[t+3]>>6===3?1:2,v=3===l?(3===s?12:6)*h/_+g<<2:(3===s?144:72)*h/_+g|0;return t+v>n?-1:(this._onMpegFrame&&this._onMpegFrame(e.subarray(t,t+v),h,_,m,i,r),v)}}for(var y=t+2;y<n;){if(255===e[y-1]&&224===(224&e[y]))return this._onMpegNoise&&this._onMpegNoise(e.subarray(t,y-1)),y-t-1;y++}return-1}},{key:"_parseID3PES",value:function(e){this._id3Track.samples.push(e)}}],[{key:"probe",value:function(e){return e.length>=564&&71===e[0]&&71===e[188]&&71===e[376]}}]),e}();n.default=g},{21:21,25:25,28:28,30:30,32:32,50:50}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},n.ErrorDetails={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException",WEBVTT_EXCEPTION:"webVTTException"}},{}],31:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var 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},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e(50),l=e(30),u=e(32),d=i(u),c=function(){function e(t){r(this,e),this.hls=t,this.onEvent=this.onEvent.bind(this);for(var n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];this.handledEvents=i,this.useGenericHandler=!0,this.registerListeners()}return o(e,[{key:"destroy",value:function(){this.unregisterListeners()}},{key:"isEventHandler",value:function(){return"object"===a(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent}},{key:"registerListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){if("hlsEventGeneric"===e)throw new Error("Forbidden event name: "+e);this.hls.on(e,this.onEvent)}.bind(this))}},{key:"unregisterListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){this.hls.off(e,this.onEvent)}.bind(this))}},{key:"onEvent",value:function(e,t){this.onEventGeneric(e,t)}},{key:"onEventGeneric",value:function(e,t){var n=function(e,t){var n="on"+e.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,t)};try{n.call(this,e,t).call()}catch(t){s.logger.error("internal error happened while processing "+e+":"+t.message),this.hls.trigger(d.default.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}}}]),e}();n.default=c},{30:30,32:32,50:50}],32:[function(e,t,n){"use strict";t.exports={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCH:"hlsLevelSwitch",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",
FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},{}],33:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(){i(this,e)}return r(e,null,[{key:"getSilentFrame",value:function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),e}();n.default=a},{}],34:[function(e,t,n){"use strict";var i={isBuffered:function(e,t){if(e)for(var n=e.buffered,i=0;i<n.length;i++)if(t>=n.start(i)&&t<=n.end(i))return!0;return!1},bufferInfo:function(e,t,n){if(e){var i,r=e.buffered,a=[];for(i=0;i<r.length;i++)a.push({start:r.start(i),end:r.end(i)});return this.bufferedInfo(a,t,n)}return{len:0,start:t,end:t,nextStart:void 0}},bufferedInfo:function(e,t,n){var i,r,a,o,s,l=[];for(e.sort(function(e,t){var n=e.start-t.start;return n?n:t.end-e.end}),s=0;s<e.length;s++){var u=l.length;if(u){var d=l[u-1].end;e[s].start-d<n?e[s].end>d&&(l[u-1].end=e[s].end):l.push(e[s])}else l.push(e[s])}for(s=0,i=0,r=a=t;s<l.length;s++){var c=l[s].start,f=l[s].end;if(t+n>=c&&t<f)r=c,a=f,i=a-t;else if(t+n<c){o=c;break}}return{len:i,start:r,end:a,nextStart:o}}};t.exports=i},{}],35:[function(e,t,n){"use strict";var i=e(50),r={mergeDetails:function(e,t){var n,a=Math.max(e.startSN,t.startSN)-t.startSN,o=Math.min(e.endSN,t.endSN)-t.startSN,s=t.startSN-e.startSN,l=e.fragments,u=t.fragments,d=0;if(o<a)return void(t.PTSKnown=!1);for(var c=a;c<=o;c++){var f=l[s+c],h=u[c];h&&f&&(d=f.cc-h.cc,isNaN(f.startPTS)||(h.start=h.startPTS=f.startPTS,h.endPTS=f.endPTS,h.duration=f.duration,n=h))}if(d)for(i.logger.log("discontinuity sliding from playlist, take drift into account"),c=0;c<u.length;c++)u[c].cc+=d;if(n)r.updateFragPTSDTS(t,n.sn,n.startPTS,n.endPTS,n.startDTS,n.endDTS);else if(s>=0&&s<l.length){var p=l[s].start;for(c=0;c<u.length;c++)u[c].start+=p}t.PTSKnown=e.PTSKnown},updateFragPTSDTS:function(e,t,n,i,a,o){var s,l,u,d;if(!e||t<e.startSN||t>e.endSN)return 0;if(s=t-e.startSN,l=e.fragments,u=l[s],!isNaN(u.startPTS)){var c=Math.abs(u.startPTS-n);isNaN(u.deltaPTS)?u.deltaPTS=c:u.deltaPTS=Math.max(c,u.deltaPTS),n=Math.min(n,u.startPTS),i=Math.max(i,u.endPTS),a=Math.min(a,u.startDTS),o=Math.max(o,u.endDTS)}var f=n-u.start;for(u.start=u.startPTS=n,u.endPTS=i,u.startDTS=a,u.endDTS=o,u.duration=i-n,d=s;d>0;d--)r.updatePTS(l,d,d-1);for(d=s;d<l.length-1;d++)r.updatePTS(l,d,d+1);return e.PTSKnown=!0,f},updatePTS:function(e,t,n){var r=e[t],a=e[n],o=a.startPTS;isNaN(o)?n>t?a.start=r.start+r.duration:a.start=r.start-a.duration:n>t?(r.duration=o-r.start,r.duration<0&&i.logger.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!")):(a.duration=r.start-o,a.duration<0&&i.logger.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"))}};t.exports=r},{50:50}],36:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(32),s=i(o),l=e(30),u=e(40),d=i(u),c=e(38),f=i(c),h=e(39),p=i(h),_=e(12),g=i(_),m=e(11),v=i(m),y=e(50),E=e(1),S=i(E),T=e(4),C=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e);var i=e.DefaultConfig;if((n.liveSyncDurationCount||n.liveMaxLatencyDurationCount)&&(n.liveSyncDuration||n.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var a in i)a in n||(n[a]=i[a]);if(void 0!==n.liveMaxLatencyDurationCount&&n.liveMaxLatencyDurationCount<=n.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==n.liveMaxLatencyDuration&&(n.liveMaxLatencyDuration<=n.liveSyncDuration||void 0===n.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');(0,y.enableLogs)(n.debug),this.config=n,this._autoLevelCapping=-1;var o=this.observer=new S.default;o.trigger=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];o.emit.apply(o,[e,e].concat(n))},o.off=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];o.removeListener.apply(o,[e].concat(n))},this.on=o.on.bind(o),this.off=o.off.bind(o),this.trigger=o.trigger.bind(o);var s=this.abrController=new n.abrController(this),l=new n.bufferController(this),u=new n.capLevelController(this),c=new n.fpsController(this),h=new d.default(this),_=new f.default(this),m=new p.default(this),E=this.levelController=new v.default(this),T=this.streamController=new g.default(this),C=[E,T],R=n.audioStreamController;R&&C.push(new R(this)),this.networkControllers=C;var b=[h,_,m,s,l,u,c];if(R=n.audioTrackController){var w=new R(this);this.audioTrackController=w,b.push(w)}if(R=n.subtitleTrackController){var A=new R(this);this.subtitleTrackController=A,b.push(A)}[n.subtitleStreamController,n.timelineController].forEach(function(e){e&&b.push(new e(t))}),this.coreComponents=b}return a(e,null,[{key:"isSupported",value:function(){return window.MediaSource=window.MediaSource||window.WebKitMediaSource,window.MediaSource&&"function"==typeof window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"version",get:function(){return"0.7.4"}},{key:"Events",get:function(){return s.default}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:T.hlsDefaultConfig},set:function(t){e.defaultConfig=t}}]),a(e,[{key:"destroy",value:function(){y.logger.log("destroy"),this.trigger(s.default.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach(function(e){e.destroy()}),this.url=null,this.observer.removeAllListeners(),this._autoLevelCapping=-1}},{key:"attachMedia",value:function(e){y.logger.log("attachMedia"),this.media=e,this.trigger(s.default.MEDIA_ATTACHING,{media:e})}},{key:"detachMedia",value:function(){y.logger.log("detachMedia"),this.trigger(s.default.MEDIA_DETACHING),this.media=null}},{key:"loadSource",value:function(e){y.logger.log("loadSource:"+e),this.url=e,this.trigger(s.default.MANIFEST_LOADING,{url:e})}},{key:"startLoad",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;y.logger.log("startLoad("+e+")"),this.networkControllers.forEach(function(t){t.startLoad(e)})}},{key:"stopLoad",value:function(){y.logger.log("stopLoad"),this.networkControllers.forEach(function(e){e.stopLoad()})}},{key:"swapAudioCodec",value:function(){y.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}},{key:"recoverMediaError",value:function(){y.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),this.attachMedia(e)}},{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){y.logger.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){y.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){y.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){y.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){y.logger.log("set startLevel:"+e);var t=this;e!==-1&&(e=Math.max(e,t.minAutoLevel)),t.levelController.startLevel=e}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){y.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var e=this,t=e.levels,n=e.config.minAutoBitrate,i=t?t.length:0,r=0;r<i;r++){var a=t[r].realBitrate?Math.max(t[r].realBitrate,t[r].bitrate):t[r].bitrate;if(a>n)return r}return 0}},{key:"maxAutoLevel",get:function(){var e=this,t=e.levels,n=e.autoLevelCapping,i=void 0;return i=n===-1&&t&&t.length?t.length-1:n}},{key:"nextAutoLevel",get:function(){var e=this;return Math.min(Math.max(e.abrController.nextAutoLevel,e.minAutoLevel),e.maxAutoLevel)},set:function(e){var t=this;t.abrController.nextAutoLevel=Math.max(t.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}}]),e}();n.default=C},{1:1,11:11,12:12,30:30,32:32,38:38,39:39,4:4,40:40,50:50}],37:[function(e,t,n){"use strict";t.exports=e(36).default},{36:36}],38:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(32),u=i(l),d=e(31),c=i(d),f=e(30),h=e(50),p=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.FRAG_LOADING));return n.loaders={},n}return o(t,e),s(t,[{key:"destroy",value:function(){var e=this.loaders;for(var t in e){var n=e[t];n&&n.destroy()}this.loaders={},c.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(e){var t=e.frag,n=t.type,i=this.loaders[n],r=this.hls.config;t.loaded=0,i&&(h.logger.warn("abort previous fragment loader for type:"+n),i.abort()),i=this.loaders[n]=t.loader="undefined"!=typeof r.fLoader?new r.fLoader(r):new r.loader(r);var a=void 0,o=void 0,s=void 0;a={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1};var l=t.byteRangeStartOffset,u=t.byteRangeEndOffset;isNaN(l)||isNaN(u)||(a.rangeStart=l,a.rangeEnd=u),o={timeout:r.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:r.fragLoadingMaxRetryTimeout},s={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},i.load(a,o,s)}},{key:"loadsuccess",value:function(e,t,n){var i=e.data,r=n.frag;r.loader=void 0,this.loaders[r.type]=void 0,this.hls.trigger(u.default.FRAG_LOADED,{payload:i,frag:r,stats:t})}},{key:"loaderror",value:function(e,t){var n=t.loader;n&&n.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e})}},{key:"loadtimeout",value:function(e,t){var n=t.loader;n&&n.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag})}},{key:"loadprogress",value:function(e,t,n){var i=t.frag;i.loaded=e.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:i,stats:e})}}]),t}(c.default);n.default=p},{30:30,31:31,32:32,50:50}],39:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(32),u=i(l),d=e(31),c=i(d),f=e(30),h=e(50),p=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.default.KEY_LOADING));return n.loaders={},n.decryptkey=null,n.decrypturl=null,n}return o(t,e),s(t,[{key:"destroy",value:function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},c.default.prototype.destroy.call(this)}},{key:"onKeyLoading",value:function(e){var t=e.frag,n=t.type,i=this.loaders[n],r=t.decryptdata,a=r.uri;if(a!==this.decrypturl||null===this.decryptkey){var o=this.hls.config;i&&(h.logger.warn("abort previous key loader for type:"+n),i.abort()),t.loader=this.loaders[n]=new o.loader(o),this.decrypturl=a,this.decryptkey=null;var s=void 0,l=void 0,d=void 0;s={url:a,frag:t,responseType:"arraybuffer"},l={timeout:o.fragLoadingTimeOut,maxRetry:o.fragLoadingMaxRetry,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},t.loader.load(s,l,d)}else this.decryptkey&&(r.key=this.decryptkey,this.hls.trigger(u.default.KEY_LOADED,{frag:t}))}},{key:"loadsuccess",value:function(e,t,n){var i=n.frag;this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(u.default.KEY_LOADED,{frag:i})}},{key:"loaderror",value:function(e,t){var n=t.frag,i=n.loader;i&&i.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})}},{key:"loadtimeout",value:function(e,t){var n=t.frag,i=n.loader;i&&i.abort(),this.loaders[t.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})}}]),t}(c.default);n.default=p},{30:30,31:31,32:32,50:50}],40:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e(2),u=i(l),d=e(32),c=i(d),f=e(31),h=i(f),p=e(30),_=e(44),g=i(_),m=e(50),v=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,y=/#EXT-X-MEDIA:(.*)/g,E=/#EXTINF:(\d*(?:\.\d+)?)(?:,(.*))?|(?!#)(\S.+)|#EXT-X-BYTERANGE: *(.+)|#EXT-X-PROGRAM-DATE-TIME:(.+)|#.*/g,S=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,T=function(){function e(){o(this,e),this.method=null,this.key=null,this.iv=null,this._uri=null}return s(e,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=u.default.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}]),e}(),C=function(){function e(){o(this,e),this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[]}return s(e,[{key:"createInitializationVector",value:function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t}},{key:"fragmentDecryptdataFromLevelkey",value:function(e,t){var n=e;return e&&e.method&&e.uri&&!e.iv&&(n=new T,n.method=e.method,n.baseuri=e.baseuri,n.reluri=e.reluri,n.iv=this.createInitializationVector(t)),n}},{key:"cloneObj",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=u.default.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange){var e=this._byteRange=[];if(this.rawByteRange){var t=this.rawByteRange.split("@",2);if(1===t.length){var n=this.lastByteRangeEndOffset;e[0]=n?n:0}else e[0]=parseInt(t[1]);e[1]=parseInt(t[0])+e[0]}}return this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}}]),e}(),R=function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,c.default.MANIFEST_LOADING,c.default.LEVEL_LOADING,c.default.AUDIO_TRACK_LOADING,c.default.SUBTITLE_TRACK_LOADING));return n.loaders={},n}return a(t,e),s(t,[{key:"destroy",value:function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},h.default.prototype.destroy.call(this)}},{key:"onManifestLoading",value:function(e){this.load(e.url,{type:"manifest"})}},{key:"onLevelLoading",value:function(e){this.load(e.url,{type:"level",level:e.level,id:e.id})}},{key:"onAudioTrackLoading",value:function(e){this.load(e.url,{type:"audioTrack",id:e.id})}},{key:"onSubtitleTrackLoading",value:function(e){this.load(e.url,{type:"subtitleTrack",id:e.id})}},{key:"load",value:function(e,t){var n=this.loaders[t.type];if(n){var i=n.context;if(i&&i.url===e)return void m.logger.trace("playlist request ongoing");m.logger.warn("abort previous loader for type:"+t.type),n.abort()}var r=this.hls.config,a=void 0,o=void 0,s=void 0,l=void 0;"manifest"===t.type?(a=r.manifestLoadingMaxRetry,o=r.manifestLoadingTimeOut,s=r.manifestLoadingRetryDelay,l=r.manifestLoadingMaxRetryTimeout):(a=r.levelLoadingMaxRetry,o=r.levelLoadingTimeOut,s=r.levelLoadingRetryDelay,l=r.levelLoadingMaxRetryTimeout,m.logger.log("loading playlist for "+t.type+" "+(t.level||t.id))),n=this.loaders[t.type]=t.loader="undefined"!=typeof r.pLoader?new r.pLoader(r):new r.loader(r),t.url=e,t.responseType="";var u=void 0,d=void 0;u={timeout:o,maxRetry:a,retryDelay:s,maxRetryDelay:l},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},n.load(t,u,d)}},{key:"resolve",value:function(e,t){return u.default.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}},{key:"parseMasterPlaylist",value:function(e,t){var n=[],i=void 0;for(v.lastIndex=0;null!=(i=v.exec(e));){var r={},a=r.attrs=new g.default(i[1]);r.url=this.resolve(i[2],t);var o=a.decimalResolution("RESOLUTION");o&&(r.width=o.width,r.height=o.height),r.bitrate=a.decimalInteger("AVERAGE-BANDWIDTH")||a.decimalInteger("BANDWIDTH"),r.name=a.NAME;var s=a.CODECS;if(s){s=s.split(/[ ,]+/);for(var l=0;l<s.length;l++){var u=s[l];u.indexOf("avc1")!==-1?r.videoCodec=this.avc1toavcoti(u):r.audioCodec=u}}n.push(r)}return n}},{key:"parseMasterPlaylistMedia",value:function(e,t,n){var i=void 0,r=[],a=0;for(y.lastIndex=0;null!=(i=y.exec(e));){var o={},s=new g.default(i[1]);s.TYPE===n&&(o.groupId=s["GROUP-ID"],o.name=s.NAME,o.type=n,o.default="YES"===s.DEFAULT,o.autoselect="YES"===s.AUTOSELECT,o.forced="YES"===s.FORCED,s.URI&&(o.url=this.resolve(s.URI,t)),o.lang=s.LANGUAGE,o.name||(o.name=o.lang),o.id=a++,r.push(o))}return r}},{key:"avc1toavcoti",value:function(e){var t,n=e.split(".");return n.length>2?(t=n.shift()+".",t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):t=e,t}},{key:"parseLevelPlaylist",value:function(e,t,n,i){var r,a,o=0,s=0,l={type:null,version:null,url:t,fragments:[],live:!0,startSN:0},u=new T,d=0,c=null,f=new C;for(E.lastIndex=0;null!==(r=E.exec(e));){var h=r[1];if(h){f.duration=parseFloat(h);var p=(" "+r[2]).slice(1);f.title=p?p:null,f.tagList.push(p?["INF",h,p]:["INF",h])}else if(r[3]){if(!isNaN(f.duration)){var _=o++;f.type=i,f.start=s,f.levelkey=u,f.sn=_,f.level=n,f.cc=d,f.baseurl=t,f.relurl=(" "+r[3]).slice(1),l.fragments.push(f),c=f,s+=f.duration,f=new C}}else if(r[4]){if(f.rawByteRange=(" "+r[4]).slice(1),c){var v=c.byteRangeEndOffset;v&&(f.lastByteRangeEndOffset=v)}}else if(r[5])f.rawProgramDateTime=(" "+r[5]).slice(1),f.tagList.push(["PROGRAM-DATE-TIME",f.rawProgramDateTime]);else{for(r=r[0].match(S),a=1;a<r.length&&void 0===r[a];a++);var y=(" "+r[a+1]).slice(1),R=(" "+r[a+2]).slice(1);switch(r[a]){case"#":f.tagList.push(R?[y,R]:[y]);break;case"PLAYLIST-TYPE":l.type=y.toUpperCase();break;case"MEDIA-SEQUENCE":o=l.startSN=parseInt(y);break;case"TARGETDURATION":l.targetduration=parseFloat(y);break;case"VERSION":l.version=parseInt(y);break;case"EXTM3U":break;case"ENDLIST":l.live=!1;break;case"DIS":d++,f.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":d=parseInt(y);break;case"KEY":var b=y,w=new g.default(b),A=w.enumeratedString("METHOD"),I=w.URI,P=w.hexadecimalInteger("IV");A&&(u=new T,I&&["AES-128","SAMPLE-AES"].indexOf(A)>=0&&(u.method=A,u.baseuri=t,u.reluri=I,u.key=null,u.iv=P));break;case"START":var O=y,D=new g.default(O),k=D.decimalFloatingPoint("TIME-OFFSET");isNaN(k)||(l.startTimeOffset=k);break;case"MAP":var L=new g.default(y);f.relurl=L.URI,f.rawByteRange=L.BYTERANGE,f.baseurl=t,f.level=n,f.type=i,f.sn="initSegment",l.initSegment=f,f=new C;break;default:m.logger.warn("line parsed but not handled: "+r)}}}return f=c,f&&!f.relurl&&(l.fragments.pop(),s-=f.duration),l.totalduration=s,l.averagetargetduration=s/l.fragments.length,l.endSN=o-1,l}},{key:"loadsuccess",value:function(e,t,n){var i=e.data,r=e.url,a=n.type,o=n.id,s=n.level,l=this.hls;if(this.loaders[a]=void 0,void 0!==r&&0!==r.indexOf("data:")||(r=n.url),t.tload=performance.now(),0===i.indexOf("#EXTM3U"))if(i.indexOf("#EXTINF:")>0){var u="audioTrack"!==a&&"subtitleTrack"!==a,d=isNaN(s)?isNaN(o)?0:o:s,f=this.parseLevelPlaylist(i,r,d,"audioTrack"===a?"audio":"subtitleTrack"===a?"subtitle":"main");f.tload=t.tload,"manifest"===a&&l.trigger(c.default.MANIFEST_LOADED,{levels:[{url:r,details:f}],audioTracks:[],url:r,stats:t}),t.tparsed=performance.now(),f.targetduration?u?l.trigger(c.default.LEVEL_LOADED,{details:f,level:s||0,id:o||0,stats:t}):"audioTrack"===a?l.trigger(c.default.AUDIO_TRACK_LOADED,{details:f,id:o,stats:t}):"subtitleTrack"===a&&l.trigger(c.default.SUBTITLE_TRACK_LOADED,{details:f,id:o,stats:t}):l.trigger(c.default.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:r,reason:"invalid targetduration"})}else{var h=this.parseMasterPlaylist(i,r);if(h.length){var _=this.parseMasterPlaylistMedia(i,r,"AUDIO"),g=this.parseMasterPlaylistMedia(i,r,"SUBTITLES");if(_.length){var v=!1;_.forEach(function(e){e.url||(v=!0)}),v===!1&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(m.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),_.unshift({type:"main",name:"main"}))}l.trigger(c.default.MANIFEST_LOADED,{levels:h,audioTracks:_,subtitles:g,url:r,stats:t})}else l.trigger(c.default.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:r,reason:"no level found in manifest"})}else l.trigger(c.default.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:r,reason:"no EXTM3U delimiter"})}},{key:"loaderror",value:function(e,t){var n,i,r=t.loader;switch(t.type){case"manifest":n=p.ErrorDetails.MANIFEST_LOAD_ERROR,i=!0;break;case"level":n=p.ErrorDetails.LEVEL_LOAD_ERROR,i=!1;break;case"audioTrack":n=p.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,i=!1}r&&(r.abort(),this.loaders[t.type]=void 0),this.hls.trigger(c.default.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:n,fatal:i,url:r.url,loader:r,response:e,context:t})}},{key:"loadtimeout",value:function(e,t){var n,i,r=t.loader;switch(t.type){case"manifest":n=p.ErrorDetails.MANIFEST_LOAD_TIMEOUT,i=!0;break;case"level":n=p.ErrorDetails.LEVEL_LOAD_TIMEOUT,i=!1;break;case"audioTrack":n=p.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT,i=!1}r&&(r.abort(),this.loaders[t.type]=void 0),this.hls.trigger(c.default.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:n,fatal:i,url:r.url,loader:r,context:t})}}]),t}(h.default);n.default=R},{2:2,30:30,31:31,32:32,44:44,50:50}],41:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=Math.pow(2,32)-1,o=function(){function e(){i(this,e)}return r(e,null,[{key:"init",value:function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var t;for(t in e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:i};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,r))}},{key:"box",value:function(e){for(var t,n=Array.prototype.slice.call(arguments,1),i=8,r=n.length,a=r;r--;)i+=n[r].byteLength;for(t=new Uint8Array(i),t[0]=i>>24&255,t[1]=i>>16&255,t[2]=i>>8&255,t[3]=255&i,t.set(e,4),r=0,i=8;r<a;r++)t.set(n[r],i),i+=n[r].byteLength;return t}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}},{key:"mdhd",value:function(t,n){n*=t;var i=Math.floor(n/(a+1)),r=Math.floor(n%(a+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"minf",value:function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))}},{key:"moof",value:function(t,n,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,n))}},{key:"moov",value:function(t){for(var n=t.length,i=[];n--;)i[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))}},{key:"mvex",value:function(t){for(var n=t.length,i=[];n--;)i[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(i))}},{key:"mvhd",value:function(t,n){n*=t;var i=Math.floor(n/(a+1)),r=Math.floor(n%(a+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,r>>24,r>>16&255,r>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);
return e.box(e.types.mvhd,o)}},{key:"sdtp",value:function(t){var n,i,r=t.samples||[],a=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)n=r[i].flags,a[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e.box(e.types.sdtp,a)}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))}},{key:"avc1",value:function(t){var n,i,r,a=[],o=[];for(n=0;n<t.sps.length;n++)i=t.sps[n],r=i.byteLength,a.push(r>>>8&255),a.push(255&r),a=a.concat(Array.prototype.slice.call(i));for(n=0;n<t.pps.length;n++)i=t.pps[n],r=i.byteLength,o.push(r>>>8&255),o.push(255&r),o=o.concat(Array.prototype.slice.call(i));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,u=t.height,d=t.pixelRatio[0],c=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,c>>24,c>>16&255,c>>8&255,255&c])))}},{key:"esds",value:function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}},{key:"mp4a",value:function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))}},{key:"mp3",value:function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))}},{key:"stsd",value:function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))}},{key:"tkhd",value:function(t){var n=t.id,i=t.duration*t.timescale,r=t.width,o=t.height,s=Math.floor(i/(a+1)),l=Math.floor(i%(a+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,255&r,0,0,o>>8&255,255&o,0,0]))}},{key:"traf",value:function(t,n){var i=e.sdtp(t),r=t.id,o=Math.floor(n/(a+1)),s=Math.floor(n%(a+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)}},{key:"trak",value:function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"trex",value:function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trun",value:function(t,n){var i,r,a,o,s,l,u=t.samples||[],d=u.length,c=12+16*d,f=new Uint8Array(c);for(n+=8+c,f.set([0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),i=0;i<d;i++)r=u[i],a=r.duration,o=r.size,s=r.flags,l=r.cts,f.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,f)}},{key:"initSegment",value:function(t){e.types||e.init();var n,i=e.moov(t);return n=new Uint8Array(e.FTYP.byteLength+i.byteLength),n.set(e.FTYP),n.set(i,e.FTYP.byteLength),n}}]),e}();n.default=o},{}],42:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(33),s=i(o),l=e(32),u=i(l),d=e(50),c=e(41),f=i(c),h=e(30),p=function(){function e(t,n,i,a){r(this,e),this.observer=t,this.config=n,this.typeSupported=i;var o=navigator.userAgent;this.isSafari=a&&a.indexOf("Apple")>-1&&o&&!o.match("CriOS"),this.ISGenerated=!1}return a(e,[{key:"destroy",value:function(){}},{key:"resetTimeStamp",value:function(e){this._initPTS=this._initDTS=e}},{key:"resetInitSegment",value:function(){this.ISGenerated=!1}},{key:"remux",value:function(e,t,n,i,r,a,o){if(this.ISGenerated||this.generateIS(e,t,r),this.ISGenerated)if(e.samples.length){var s=this.remuxAudio(e,r,a,o);if(t.samples.length){var l=void 0;s&&(l=s.endPTS-s.startPTS),this.remuxVideo(t,r,a,l)}}else{var d=void 0;t.samples.length&&(d=this.remuxVideo(t,r,a)),d&&e.codec&&this.remuxEmptyAudio(e,r,a,d)}n.samples.length&&this.remuxID3(n,r),i.samples.length&&this.remuxText(i,r),this.observer.trigger(u.default.FRAG_PARSED)}},{key:"generateIS",value:function(e,t,n){var i,r,a=this.observer,o=e.samples,s=t.samples,l=this.typeSupported,c="audio/mp4",p={},_={tracks:p},g=void 0===this._initPTS;if(g&&(i=r=1/0),e.config&&o.length&&(e.timescale=e.samplerate,d.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(l.mpeg?(c="audio/mpeg",e.codec=""):l.mp3&&(e.codec="mp3")),p.audio={container:c,codec:e.codec,initSegment:!e.isAAC&&l.mpeg?new Uint8Array:f.default.initSegment([e]),metadata:{channelCount:e.channelCount}},g&&(i=r=o[0].pts-e.inputTimeScale*n)),t.sps&&t.pps&&s.length){var m=t.inputTimeScale;t.timescale=m,p.video={container:"video/mp4",codec:t.codec,initSegment:f.default.initSegment([t]),metadata:{width:t.width,height:t.height}},g&&(i=Math.min(i,s[0].pts-m*n),r=Math.min(r,s[0].dts-m*n),this.observer.trigger(u.default.INIT_PTS_FOUND,{initPTS:i}))}Object.keys(p).length?(a.trigger(u.default.FRAG_PARSING_INIT_SEGMENT,_),this.ISGenerated=!0,g&&(this._initPTS=i,this._initDTS=r)):a.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})}},{key:"remuxVideo",value:function(e,t,n,i){var r,a,o,s,l,c,p,_,g=8,m=e.timescale,v=e.samples,y=[],E=v.length,S=this._PTSNormalize,T=this._initDTS;v.sort(function(e,t){var n=e.dts-t.dts,i=e.pts-t.pts;return n?n:i?i:e.id-t.id});var C=v.reduce(function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-18e3)},0);if(C<0){d.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(C/90)+" ms to overcome this issue");for(var R=0;R<v.length;R++)v[R].dts+=C}var b=void 0;b=n?this.nextAvcDts:t*m;var w=v[0];l=Math.max(S(w.dts-T,b),0),s=Math.max(S(w.pts-T,b),0);var A=Math.round((l-b)/90);n&&A&&(A>1?d.logger.log("AVC:"+A+" ms hole between fragments detected,filling it"):A<-1&&d.logger.log("AVC:"+-A+" ms overlapping between fragments detected"),l=b,v[0].dts=l+T,s=Math.max(s-A,b),v[0].pts=s+T,d.logger.log("Video/PTS/DTS adjusted: "+Math.round(s/90)+"/"+Math.round(l/90)+",delta:"+A+" ms")),c=l,w=v[v.length-1],_=Math.max(S(w.dts-T,b),0),p=Math.max(S(w.pts-T,b),0),p=Math.max(p,_);var I=this.isSafari;I&&(r=Math.round((_-l)/(v.length-1)));for(var P=0,O=0,D=0;D<E;D++){for(var k=v[D],L=k.units,N=L.length,M=0,x=0;x<N;x++)M+=L[x].data.length;O+=M,P+=N,k.length=M,I?k.dts=l+D*r:k.dts=Math.max(S(k.dts-T,b),l),k.pts=Math.max(S(k.pts-T,b),k.dts)}var U=O+4*P+8;try{a=new Uint8Array(U)}catch(e){return void this.observer.trigger(u.default.ERROR,{type:h.ErrorTypes.MUX_ERROR,details:h.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:U,reason:"fail allocating video mdat "+U})}var H=new DataView(a.buffer);H.setUint32(0,U),a.set(f.default.types.mdat,4);for(var B=0;B<E;B++){for(var F=v[B],j=F.units,G=0,V=void 0,q=0,W=j.length;q<W;q++){var Y=j[q],J=Y.data,Q=Y.data.byteLength;H.setUint32(g,Q),g+=4,a.set(J,g),g+=Q,G+=4+Q}if(I)V=Math.max(0,r*Math.round((F.pts-F.dts)/r));else{if(B<E-1)r=v[B+1].dts-F.dts;else{var K=this.config,z=F.dts-v[B>0?B-1:B].dts;if(K.stretchShortVideoTrack){var X=K.maxBufferHole,Z=K.maxSeekHole,$=Math.floor(Math.min(X,Z)*m),ee=(i?s+i*m:this.nextAudioPts)-F.pts;ee>$?(r=ee-z,r<0&&(r=z),d.logger.log("It is approximately "+ee/90+" ms to the next segment; using duration "+r/90+" ms for the last video frame.")):r=z}else r=z}V=Math.round(F.pts-F.dts)}y.push({size:G,duration:r,cts:V,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:F.key?2:1,isNonSync:F.key?0:1}})}this.nextAvcDts=_+r;var te=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,y.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var ne=y[0].flags;ne.dependsOn=2,ne.isNonSync=0}e.samples=y,o=f.default.moof(e.sequenceNumber++,l,e),e.samples=[];var ie={data1:o,data2:a,startPTS:s/m,endPTS:(p+r)/m,startDTS:l/m,endDTS:this.nextAvcDts/m,type:"video",nb:y.length,dropped:te};return this.observer.trigger(u.default.FRAG_PARSING_DATA,ie),ie}},{key:"remuxAudio",value:function(e,t,n,i){var r,a,o,l,c,p,_,g,m,v,y,E,S,T,C,R,b=e.inputTimeScale,w=e.timescale,A=b/w,I=e.isAAC?1024:1152,P=I*A,O=this._PTSNormalize,D=this._initDTS,k=!e.isAAC&&this.typeSupported.mpeg,L=k?0:8,N=[],M=[];if(e.samples.sort(function(e,t){return e.pts-t.pts}),M=e.samples,R=this.nextAudioPts,n|=M.length&&R&&(Math.abs(t-R/b)<.1||Math.abs(M[0].pts-R-D)<20*P),n||(R=t*b),i&&e.isAAC)for(var x=0,U=R;x<M.length;){var H=M[x],B=O(H.pts-D,R),F=B-U;if(F<=-P)d.logger.warn("Dropping 1 audio frame @ "+(U/b).toFixed(3)+"s due to "+Math.abs(1e3*F/b)+" ms overlap."),M.splice(x,1),e.len-=H.unit.length;else if(F>=P&&U){var j=Math.round(F/P);d.logger.warn("Injecting "+j+" audio frame @ "+(U/b).toFixed(3)+"s due to "+1e3*F/b+" ms gap.");for(var G=0;G<j;G++)C=U+D,C=Math.max(C,D),T=s.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount),T||(d.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),T=H.unit.subarray()),M.splice(x,0,{unit:T,pts:C,dts:C}),e.len+=T.length,U+=P,x+=1;H.pts=H.dts=U+D,U+=P,x+=1}else Math.abs(F)>.1*P,U+=P,0===x?H.pts=H.dts=D+R:H.pts=H.dts=M[x-1].pts+P,x+=1}for(var V=0,q=M.length;V<q;V++){if(a=M[V],l=a.unit,v=a.pts-D,y=a.dts-D,void 0!==m)E=O(v,m),S=O(y,m),o.duration=Math.round((S-m)/A);else{E=O(v,R),S=O(y,R);var W=Math.round(1e3*(E-R)/b),Y=0;if(n&&e.isAAC&&W){if(W>0)Y=Math.round((E-R)/P),d.logger.log(W+" ms hole between AAC samples detected,filling it"),Y>0&&(T=s.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount),T||(T=l.subarray()),e.len+=Y*T.length);else if(W<-12){d.logger.log(-W+" ms overlapping between AAC samples detected, drop frame"),e.len-=l.byteLength;continue}E=S=R}if(_=Math.max(0,E),g=Math.max(0,S),!(e.len>0))return;var J=k?e.len:e.len+8;try{c=new Uint8Array(J)}catch(e){return void this.observer.trigger(u.default.ERROR,{type:h.ErrorTypes.MUX_ERROR,details:h.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:J,reason:"fail allocating audio mdat "+J})}k||(r=new DataView(c.buffer),r.setUint32(0,J),c.set(f.default.types.mdat,4));for(var Q=0;Q<Y;Q++)C=E-(Y-Q)*P,T=s.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount),T||(d.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),T=l.subarray()),c.set(T,L),L+=T.byteLength,o={size:T.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},N.push(o)}c.set(l,L);var K=l.byteLength;L+=K,o={size:K,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},N.push(o),m=S}var z=0,X=N.length;if(X>=2&&(z=N[X-2].duration,o.duration=z),X){this.nextAudioPts=E+A*z,e.len=0,e.samples=N,p=k?new Uint8Array:f.default.moof(e.sequenceNumber++,g/A,e),e.samples=[];var Z={data1:p,data2:c,startPTS:_/b,endPTS:this.nextAudioPts/b,startDTS:g/b,endDTS:(S+A*z)/b,type:"audio",nb:X};return this.observer.trigger(u.default.FRAG_PARSING_DATA,Z),Z}return null}},{key:"remuxEmptyAudio",value:function(e,t,n,i){var r=e.inputTimeScale,a=e.samplerate?e.samplerate:r,o=r/a,l=this.nextAudioPts,u=(void 0!==l?l:i.startDTS*r)+this._initDTS,c=i.endDTS*r+this._initDTS,f=1024,h=o*f,p=Math.ceil((c-u)/h),_=s.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(d.logger.warn("remux empty Audio"),!_)return void d.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var g=[],m=0;m<p;m++){var v=u+m*h;g.push({unit:_,pts:v,dts:v}),e.len+=_.length}e.samples=g,this.remuxAudio(e,t,n)}},{key:"remuxID3",value:function(e,t){var n,i=e.samples.length,r=e.inputTimeScale,a=this._initPTS,o=this._initDTS;if(i){for(var s=0;s<i;s++)n=e.samples[s],n.pts=(n.pts-a)/r,n.dts=(n.dts-o)/r;this.observer.trigger(u.default.FRAG_PARSING_METADATA,{samples:e.samples})}e.samples=[],t=t}},{key:"remuxText",value:function(e,t){e.samples.sort(function(e,t){return e.pts-t.pts});var n,i=e.samples.length,r=e.inputTimeScale,a=this._initPTS;if(i){for(var o=0;o<i;o++)n=e.samples[o],n.pts=(n.pts-a)/r;this.observer.trigger(u.default.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[],t=t}},{key:"_PTSNormalize",value:function(e,t){var n;if(void 0===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}}]),e}();n.default=p},{30:30,32:32,33:33,41:41,50:50}],43:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(32),s=i(o),l=function(){function e(t){r(this,e),this.observer=t}return a(e,[{key:"destroy",value:function(){}},{key:"resetTimeStamp",value:function(){}},{key:"resetInitSegment",value:function(){}},{key:"remux",value:function(e,t,n,i,r,a,o,l){var u=this.observer,d="";e&&(d+="audio"),t&&(d+="video"),u.trigger(s.default.FRAG_PARSING_DATA,{data1:l,startPTS:r,startDTS:r,type:d,nb:1,dropped:0}),u.trigger(s.default.FRAG_PARSED)}}]),e}();n.default=l},{32:32}],44:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=/^(\d+)x(\d+)$/,o=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,s=function(){function e(t){i(this,e),"string"==typeof t&&(t=e.parseAttrList(t));for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n])}return r(e,[{key:"decimalInteger",value:function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}},{key:"hexadecimalInteger",value:function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)n[i]=parseInt(t.slice(2*i,2*i+2),16);return n}return null}},{key:"hexadecimalIntegerAsNumber",value:function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}},{key:"decimalFloatingPoint",value:function(e){return parseFloat(this[e])}},{key:"enumeratedString",value:function(e){return this[e]}},{key:"decimalResolution",value:function(e){var t=a.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}}],[{key:"parseAttrList",value:function(e){var t,n={};for(o.lastIndex=0;null!==(t=o.exec(e));){var i=t[2],r='"';0===i.indexOf(r)&&i.lastIndexOf(r)===i.length-1&&(i=i.slice(1,-1)),n[t[1]]=i}return n}}]),e}();n.default=s},{}],45:[function(e,t,n){"use strict";var i={search:function(e,t){for(var n=0,i=e.length-1,r=null,a=null;n<=i;){r=(n+i)/2|0,a=e[r];var o=t(a);if(o>0)n=r+1;else{if(!(o<0))return a;i=r-1}}return null}};t.exports=i},{}],46:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},o=function(e){var t=e;return a.hasOwnProperty(e)&&(t=a[e]),String.fromCharCode(t)},s=15,l=100,u={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},d={17:2,18:4,21:6,22:8,23:10,19:13,20:15},c={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},f={25:2,26:4,29:6,30:8,31:10,27:13,28:15},h=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],p={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var n=this.verboseFilter[e];this.verboseLevel>=n&&console.log(this.time+" ["+e+"] "+t)}},_=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},g=function(){function e(t,n,r,a,o){i(this,e),this.foreground=t||"white",this.underline=n||!1,this.italics=r||!1,this.background=a||"black",this.flash=o||!1}return r(e,[{key:"reset",value:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}},{key:"setStyles",value:function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var i=t[n];e.hasOwnProperty(i)&&(this[i]=e[i])}}},{key:"isDefault",value:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}},{key:"equals",value:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}},{key:"copy",value:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}},{key:"toString",value:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}]),e}(),m=function(){function e(t,n,r,a,o,s){i(this,e),this.uchar=t||" ",this.penState=new g(n,r,a,o,s)}return r(e,[{key:"reset",value:function(){this.uchar=" ",this.penState.reset()}},{key:"setChar",value:function(e,t){this.uchar=e,this.penState.copy(t)}},{key:"setPenState",value:function(e){this.penState.copy(e)}},{key:"equals",value:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}},{key:"copy",value:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)}},{key:"isEmpty",value:function(){return" "===this.uchar&&this.penState.isDefault()}}]),e}(),v=function(){function e(){i(this,e),this.chars=[];for(var t=0;t<l;t++)this.chars.push(new m);this.pos=0,this.currPenState=new g}return r(e,[{key:"equals",value:function(e){for(var t=!0,n=0;n<l;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t}},{key:"copy",value:function(e){for(var t=0;t<l;t++)this.chars[t].copy(e.chars[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<l;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}},{key:"setCursor",value:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(p.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>l&&(p.log("ERROR","Too large cursor position "+this.pos),this.pos=l)}},{key:"moveCursor",value:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}},{key:"backSpace",value:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}},{key:"insertChar",value:function(e){e>=144&&this.backSpace();var t=o(e);return this.pos>=l?void p.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),void this.moveCursor(1))}},{key:"clearFromPos",value:function(e){var t;for(t=e;t<l;t++)this.chars[t].reset()}},{key:"clear",value:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}},{key:"clearToEndOfRow",value:function(){this.clearFromPos(this.pos)}},{key:"getTextString",value:function(){for(var e=[],t=!0,n=0;n<l;n++){var i=this.chars[n].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")}},{key:"setPenStyles",value:function(e){this.currPenState.setStyles(e);var t=this.chars[this.pos];t.setPenState(this.currPenState)}}]),e}(),y=function(){function e(){i(this,e),this.rows=[];for(var t=0;t<s;t++)this.rows.push(new v);this.currRow=s-1,this.nrRollUpRows=null,this.reset()}return r(e,[{key:"reset",value:function(){for(var e=0;e<s;e++)this.rows[e].clear();this.currRow=s-1}},{key:"equals",value:function(e){for(var t=!0,n=0;n<s;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}},{key:"copy",value:function(e){for(var t=0;t<s;t++)this.rows[t].copy(e.rows[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<s;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}},{key:"backSpace",value:function(){var e=this.rows[this.currRow];e.backSpace()}},{key:"clearToEndOfRow",value:function(){var e=this.rows[this.currRow];e.clearToEndOfRow()}},{key:"insertChar",value:function(e){var t=this.rows[this.currRow];t.insertChar(e)}},{key:"setPen",value:function(e){var t=this.rows[this.currRow];t.setPenStyles(e)}},{key:"moveCursor",value:function(e){var t=this.rows[this.currRow];t.moveCursor(e)}},{key:"setCursor",value:function(e){p.log("INFO","setCursor: "+e);var t=this.rows[this.currRow];t.setCursor(e)}},{key:"setPAC",value:function(e){p.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<s;n++)this.rows[n].clear();var i=this.currRow+1-this.nrRollUpRows,r=this.lastOutputScreen;if(r){var a=r.rows[i].cueStartTime;if(a&&a<p.time)for(var o=0;o<this.nrRollUpRows;o++)this.rows[t-this.nrRollUpRows+o+1].copy(r.rows[i+o])}}this.currRow=t;var l=this.rows[this.currRow];if(null!==e.indent){var u=e.indent,d=Math.max(u-1,0);l.setCursor(e.indent),e.color=l.chars[d].penState.foreground}var c={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(c)}},{key:"setBkgData",value:function(e){p.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}},{key:"setRollUpRows",value:function(e){this.nrRollUpRows=e}},{key:"rollUp",value:function(){if(null===this.nrRollUpRows)return void p.log("DEBUG","roll_up but nrRollUpRows not set yet");p.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),p.log("INFO","Rolling up")}},{key:"getDisplayText",value:function(e){e=e||!1;for(var t=[],n="",i=-1,r=0;r<s;r++){var a=this.rows[r].getTextString();a&&(i=r+1,e?t.push("Row "+i+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n}},{key:"getTextAndFormat",value:function(){return this.rows}}]),e}(),E=function(){function e(t,n){i(this,e),this.chNr=t,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new y,this.nonDisplayedMemory=new y,this.lastOutputScreen=new y,this.currRollUpRow=this.displayedMemory.rows[s-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return r(e,[{key:"reset",value:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[s-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null}},{key:"getHandler",value:function(){return this.outputFilter}},{key:"setHandler",value:function(e){this.outputFilter=e}},{key:"setPAC",value:function(e){this.writeScreen.setPAC(e)}},{key:"setBkgData",value:function(e){this.writeScreen.setBkgData(e)}},{key:"setMode",value:function(e){e!==this.mode&&(this.mode=e,p.log("INFO","MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}},{key:"insertChars",value:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";p.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(p.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}},{key:"ccRCL",value:function(){p.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}},{key:"ccBS",value:function(){p.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}},{key:"ccAOF",value:function(){}},{key:"ccAON",value:function(){}},{key:"ccDER",value:function(){p.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}},{key:"ccRU",value:function(e){p.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}},{key:"ccFON",value:function(){p.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})}},{key:"ccRDC",value:function(){p.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}},{key:"ccTR",value:function(){p.log("INFO","TR"),this.setMode("MODE_TEXT")}},{key:"ccRTD",value:function(){p.log("INFO","RTD"),this.setMode("MODE_TEXT")}},{key:"ccEDM",value:function(){p.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()}},{key:"ccCR",value:function(){p.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()}},{key:"ccENM",value:function(){p.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}},{key:"ccEOC",value:function(){if(p.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,p.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()}},{key:"ccTO",value:function(e){p.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}},{key:"ccMIDROW",value:function(e){var t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=i[n]}p.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}},{key:"outputDataUpdate",value:function(){var e=p.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))}},{key:"cueSplitAtTime",value:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}]),e}(),S=function(){function e(t,n,r){i(this,e),this.field=t||1,this.outputs=[n,r],this.channels=[new E(1,n),new E(2,r)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return r(e,[{key:"getHandler",value:function(e){return this.channels[e].getHandler()}},{key:"setHandler",value:function(e,t){this.channels[e].setHandler(t)}},{key:"addData",value:function(e,t){var n,i,r,a=!1;this.lastTime=e,p.setTime(e);for(var o=0;o<t.length;o+=2)if(i=127&t[o],r=127&t[o+1],0!==i||0!==r){if(p.log("DATA","["+_([t[o],t[o+1]])+"] -> ("+_([i,r])+")"),n=this.parseCmd(i,r),n||(n=this.parseMidrow(i,r)),n||(n=this.parsePAC(i,r)),n||(n=this.parseBackgroundAttributes(i,r)),!n&&(a=this.parseChars(i,r)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(a)}else p.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,p.log("WARNING","Couldn't parse cleaned data "+_([i,r])+" orig: "+_([t[o],t[o+1]])))}else this.dataCounters.padding+=2}},{key:"parseCmd",value:function(e,t){var n=null,i=(20===e||28===e)&&32<=t&&t<=47,r=(23===e||31===e)&&33<=t&&t<=35;if(!i&&!r)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,p.log("DEBUG","Repeated command ("+_([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var a=this.channels[n-1];return 20===e||28===e?32===t?a.ccRCL():33===t?a.ccBS():34===t?a.ccAOF():35===t?a.ccAON():36===t?a.ccDER():37===t?a.ccRU(2):38===t?a.ccRU(3):39===t?a.ccRU(4):40===t?a.ccFON():41===t?a.ccRDC():42===t?a.ccTR():43===t?a.ccRTD():44===t?a.ccEDM():45===t?a.ccCR():46===t?a.ccENM():47===t&&a.ccEOC():a.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0}},{key:"parseMidrow",value:function(e,t){var n=null;if((17===e||25===e)&&32<=t&&t<=47){if(n=17===e?1:2,n!==this.currChNr)return p.log("ERROR","Mismatch channel in midrow parsing"),!1;var i=this.channels[n-1];return i.ccMIDROW(t),p.log("DEBUG","MIDROW ("+_([e,t])+")"),!0}return!1}},{key:"parsePAC",value:function(e,t){var n=null,i=null,r=(17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127,a=(16===e||24===e)&&64<=t&&t<=95;if(!r&&!a)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=e<=23?1:2,i=64<=t&&t<=95?1===n?u[e]:c[e]:1===n?d[e]:f[e];var o=this.interpretPAC(i,t),s=this.channels[n-1];return s.setPAC(o),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0}},{key:"interpretPAC",value:function(e,t){var n=t,i={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,i.underline=1===(1&n),n<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((n-16)/2),i}},{key:"parseChars",value:function(e,t){var n=null,i=null,r=null;if(e>=25?(n=2,r=e-8):(n=1,r=e),17<=r&&r<=19){var a=t;a=17===r?t+80:18===r?t+112:t+144,p.log("INFO","Special char '"+o(a)+"' in channel "+n),i=[a]}else 32<=e&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var s=_(i);p.log("DEBUG","Char codes =  "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i}},{key:"parseBackgroundAttributes",value:function(e,t){var n,i,r,a,o=(16===e||24===e)&&32<=t&&t<=47,s=(23===e||31===e)&&45<=t&&t<=47;return!(!o&&!s||(n={},16===e||24===e?(i=Math.floor((t-32)/2),n.background=h[i],t%2===1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",
47===t&&(n.underline=!0)),r=e<24?1:2,a=this.channels[r-1],a.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,0))}},{key:"reset",value:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null}},{key:"cueSplitAtTime",value:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}}]),e}();n.default=S},{}],47:[function(e,t,n){"use strict";var i=e(53),r={newCue:function(e,t,n,r){for(var a,o,s,l,u,d=window.VTTCue||window.TextTrackCue,c=0;c<r.rows.length;c++)if(a=r.rows[c],s=!0,l=0,u="",!a.isEmpty()){for(var f=0;f<a.chars.length;f++)a.chars[f].uchar.match(/\s/)&&s?l++:(u+=a.chars[f].uchar,s=!1);a.cueStartTime=t,t===n&&(n+=1e-4),o=new d(t,n,(0,i.fixLineBreaks)(u.trim())),l>=16?l--:l++,navigator.userAgent.match(/Firefox\//)?o.line=c+1:o.line=c>7?c-2:c+1,o.align="left",o.position=Math.max(0,Math.min(100,100*(l/32)+(navigator.userAgent.match(/Firefox\//)?50:0))),e.addCue(o)}}};t.exports=r},{53:53}],48:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e(49),s=i(o),l=function(){function e(t,n,i,a){r(this,e),this.hls=t,this.defaultEstimate_=a,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new s.default(n),this.fast_=new s.default(i)}return a(e,[{key:"sample",value:function(e,t){e=Math.max(e,this.minDelayMs_);var n=8e3*t/e,i=e/1e3;this.fast_.sample(i,n),this.slow_.sample(i,n)}},{key:"canEstimate",value:function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_}},{key:"getEstimate",value:function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}},{key:"destroy",value:function(){}}]),e}();n.default=l},{49:49}],49:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(t){i(this,e),this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=0,this.totalWeight_=0}return r(e,[{key:"sample",value:function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}},{key:"getTotalWeight",value:function(){return this.totalWeight_}},{key:"getEstimate",value:function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_}}]),e}();n.default=a},{}],50:[function(e,t,n){"use strict";function i(){}function r(e,t){return t="["+e+"] > "+t}function a(e){var t=self.console[e];return t?function(){for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];i[0]&&(i[0]=r(e,i[0])),t.apply(self.console,i)}:i}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];n.forEach(function(t){u[t]=e[t]?e[t].bind(e):a(t)})}Object.defineProperty(n,"__esModule",{value:!0});var 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},l={trace:i,debug:i,log:i,warn:i,info:i,error:i},u=l;n.enableLogs=function(e){if(e===!0||"object"===("undefined"==typeof e?"undefined":s(e))){o(e,"debug","log","info","warn","error");try{u.log()}catch(e){u=l}}else u=l},n.logger=u},{}],51:[function(e,t,n){"use strict";var i={toString:function(e){for(var t="",n=e.length,i=0;i<n;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}};t.exports=i},{}],52:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){function e(e){if("string"!=typeof e)return!1;var t=a[e.toLowerCase()];return!!t&&e.toLowerCase()}function t(e){if("string"!=typeof e)return!1;var t=o[e.toLowerCase()];return!!t&&e.toLowerCase()}function n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}function i(i,a,o){var s=this,l=function(){if("undefined"!=typeof navigator)return/MSIE\s8\.0/.test(navigator.userAgent)}(),u={};l?s=document.createElement("custom"):u.enumerable=!0,s.hasBeenReset=!1;var d="",c=!1,f=i,h=a,p=o,_=null,g="",m=!0,v="auto",y="start",E=50,S="middle",T=50,C="middle";if(Object.defineProperty(s,"id",n({},u,{get:function(){return d},set:function(e){d=""+e}})),Object.defineProperty(s,"pauseOnExit",n({},u,{get:function(){return c},set:function(e){c=!!e}})),Object.defineProperty(s,"startTime",n({},u,{get:function(){return f},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",n({},u,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",n({},u,{get:function(){return p},set:function(e){p=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",n({},u,{get:function(){return _},set:function(e){_=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",n({},u,{get:function(){return g},set:function(t){var n=e(t);if(n===!1)throw new SyntaxError("An invalid or illegal string was specified.");g=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",n({},u,{get:function(){return m},set:function(e){m=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",n({},u,{get:function(){return v},set:function(e){if("number"!=typeof e&&e!==r)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",n({},u,{get:function(){return y},set:function(e){var n=t(e);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");y=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",n({},u,{get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",n({},u,{get:function(){return S},set:function(e){var n=t(e);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");S=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",n({},u,{get:function(){return T},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",n({},u,{get:function(){return C},set:function(e){var n=t(e);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");C=n,this.hasBeenReset=!0}})),s.displayState=void 0,l)return s}if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var r="auto",a={"":!0,lr:!0,rl:!0},o={start:!0,middle:!0,end:!0,left:!0,right:!0};return i.prototype.getCueAsHTML=function(){var e=window.WebVTT;return e.convertCueToDOMTree(window,this.text)},i}()},{}],53:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new f,this.regionList=[]}function a(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function o(){this.values=Object.create(null)}function s(e,t,n,i){var r=i?e.split(i):[e];for(var a in r)if("string"==typeof r[a]){var o=r[a].split(n);if(2===o.length){var s=o[0],l=o[1];t(s,l)}}}function l(e,t,n){function i(){var t=a(e);if(null===t)throw new Error("Malformed timestamp: "+u);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function r(e,t){var i=new o;s(e,function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];i.integer(e,o),i.percent(e,o)&&i.set("snapToLines",!1),i.alt(e,o,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start",p,"end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start",p,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",p,"end","left","right"])}},/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");var r=i.get("line","auto");"auto"===r&&h.line===-1&&(r=-1),t.line=r,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",p);var a=i.get("position","auto");"auto"===a&&50===h.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}function l(){e=e.replace(/^\s+/,"")}var u=e;if(l(),t.startTime=i(),l(),"-->"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+u);e=e.substr(3),l(),t.endTime=i(),l(),r(e,t)}function u(e){return e.replace(/<br(?: \/)?>/gi,"\n")}Object.defineProperty(n,"__esModule",{value:!0}),n.fixLineBreaks=void 0;var d=e(52),c=i(d),f=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i<n.length;++i)if(t===n[i]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){var n;return!!((n=t.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(t=parseFloat(t),t>=0&&t<=100))&&(this.set(e,t),!0)}};var h=new c.default(0,0,0),p="middle"===h.align?"middle":"center";r.prototype={parse:function(e){function t(){var e=i.buffer,t=0;for(e=u(e);t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,i.buffer=e.substr(t),n}function n(e){s(e,function(e,t){switch(e){case"Region":console.log("parse region",t)}},/:/)}var i=this;e&&(i.buffer+=i.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;r=t();var a=r.match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Error("Malformed WebVTT signature.");i.state="HEADER"}for(var o=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(o?o=!1:r=t(),i.state){case"HEADER":/:/.test(r)?n(r):r||(i.state="ID");continue;case"NOTE":r||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){i.state="NOTE";break}if(!r)continue;if(i.cue=new c.default(0,0,""),i.state="CUE",r.indexOf("-->")===-1){i.cue.id=r;continue}case"CUE":try{l(r,i.cue,i.regionList)}catch(e){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var d=r.indexOf("-->")!==-1;if(!r||d&&(o=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=r;continue;case"BADCUE":r||(i.state="ID");continue}}}catch(e){"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new Error("Malformed WebVTT signature.")}catch(e){throw e}return e.onflush&&e.onflush(),this}},n.fixLineBreaks=u,n.default=r},{52:52}],54:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var r=e(53),a=i(r),o=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),r=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;return isNaN(t)||isNaN(n)||isNaN(i)||isNaN(r)?-1:(t+=1e3*n,t+=6e4*i,t+=36e5*r)},s=function(e,t,n){var i=e[t],r=e[i.prevCC];if(!r||!r.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);for(;r&&r.new;)e.ccOffset+=i.start-r.start,i.new=!1,i=r,r=e[i.prevCC];e.presentationOffset=n},l={parse:function(e,t,n,i,r,l){var u=/\r\n|\n\r|\n|\r/g,d=String.fromCharCode.apply(null,new Uint8Array(e)).trim().replace(u,"\n").split("\n"),c="00:00.000",f=0,h=0,p=0,_=[],g=void 0,m=!0,v=new a.default;v.oncue=function(e){var t=n[i],r=n.ccOffset;t&&t.new&&(h?r=n.ccOffset=t.start:s(n,i,p)),p&&!h&&(r=p+n.ccOffset-n.presentationOffset),e.startTime+=r-h,e.endTime+=r-h,e.text=decodeURIComponent(escape(e.text)),e.endTime>0&&_.push(e)},v.onparsingerror=function(e){g=e},v.onflush=function(){return g&&l?void l(g):void r(_)},d.forEach(function(e){if(m){if(e.startsWith("X-TIMESTAMP-MAP=")){m=!1,e.substr(16).split(",").forEach(function(e){e.startsWith("LOCAL:")?c=e.substr(6):e.startsWith("MPEGTS:")&&(f=parseInt(e.substr(7)))});try{t=t<0?t+8589934592:t,f-=t,h=o(c)/1e3,p=f/9e4,h===-1&&(g=new Error("Malformed X-TIMESTAMP-MAP: "+e))}catch(t){g=new Error("Malformed X-TIMESTAMP-MAP: "+e)}return}""===e&&(m=!1)}v.parse(e+"\n")}),v.flush()}};t.exports=l},{53:53}],55:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e(50),o=function(){function e(t){i(this,e),t&&t.xhrSetup&&(this.xhrSetup=t.xhrSetup)}return r(e,[{key:"destroy",value:function(){this.abort(),this.loader=null}},{key:"abort",value:function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null}},{key:"load",value:function(e,t,n){this.context=e,this.config=t,this.callbacks=n,this.stats={trequest:performance.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()}},{key:"loadInternal",value:function(){var e,t=this.context;e="undefined"!=typeof XDomainRequest?this.loader=new XDomainRequest:this.loader=new XMLHttpRequest,e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.open("GET",t.url,!0),t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.responseType=t.responseType;var n=this.stats;n.tfirst=0,n.loaded=0,this.xhrSetup&&this.xhrSetup(e,t.url),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()}},{key:"readystatechange",value:function(e){var t=e.currentTarget,n=t.readyState,i=this.stats,r=this.context,o=this.config;if(!i.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(performance.now(),i.trequest)),4===n){var s=t.status;if(s>=200&&s<300){i.tload=Math.max(i.tfirst,performance.now());var l=void 0,u=void 0;"arraybuffer"===r.responseType?(l=t.response,u=l.byteLength):(l=t.responseText,u=l.length),i.loaded=i.total=u;var d={url:t.responseURL,data:l};this.callbacks.onSuccess(d,i,r)}else i.retry>=o.maxRetry||s>=400&&s<499?(a.logger.error(s+" while loading "+r.url),this.callbacks.onError({code:s,text:t.statusText},r)):(a.logger.warn(s+" while loading "+r.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),o.timeout)}},{key:"loadtimeout",value:function(){a.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context)}},{key:"loadprogress",value:function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total);var n=this.callbacks.onProgress;n&&n(t,this.context,null)}}]),e}();n.default=o},{50:50}]},{},[37])(37)})},function(e,t){"use strict";var n=Math.max(document.documentElement.clientWidth,window.innerWidth||0),i={mobile:768,tablet:992,medium:1200},r=navigator.userAgent,a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i;e.exports={isMobileUA:function(){return a.test(r)},isIOS:function(){return/iphone|ipad|ipod/i.test(r)},isAndroid:function(){return/android/i.test(r)},isWechat:function(){return/micromessenger/i.test(r)},isWechatAndroid:function(){return isWechat()&&isAndroid()},isWechatIOS:function(){return isWechat()&&isIOS()},isMobileView:function(){return n<i.mobile},isTabletView:function(){return n<i.tablet&&n>=i.mobile},isMediumView:function(){return n<i.medium&&n>=i.tablet},isLargeView:function(){return n>=i.medium},isRetina:function(){return window.devicePixelRatio>=2},isHighResolution:function(){return window.devicePixelRatio>=1.5}}}])})},function(e,t,n){!function(){var t=n(46),i=n(18).utf8,r=n(47),a=n(18).bin,o=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?a.stringToBytes(e):i.stringToBytes(e):r(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var s=t.bytesToWords(e),l=8*e.length,u=1732584193,d=-271733879,c=-1732584194,f=271733878,h=0;h<s.length;h++)s[h]=16711935&(s[h]<<8|s[h]>>>24)|4278255360&(s[h]<<24|s[h]>>>8);s[l>>>5]|=128<<l%32,s[(l+64>>>9<<4)+14]=l;for(var p=o._ff,_=o._gg,g=o._hh,m=o._ii,h=0;h<s.length;h+=16){var v=u,y=d,E=c,S=f;u=p(u,d,c,f,s[h+0],7,-680876936),f=p(f,u,d,c,s[h+1],12,-389564586),c=p(c,f,u,d,s[h+2],17,606105819),d=p(d,c,f,u,s[h+3],22,-1044525330),u=p(u,d,c,f,s[h+4],7,-176418897),f=p(f,u,d,c,s[h+5],12,1200080426),c=p(c,f,u,d,s[h+6],17,-1473231341),d=p(d,c,f,u,s[h+7],22,-45705983),u=p(u,d,c,f,s[h+8],7,1770035416),f=p(f,u,d,c,s[h+9],12,-1958414417),c=p(c,f,u,d,s[h+10],17,-42063),d=p(d,c,f,u,s[h+11],22,-1990404162),u=p(u,d,c,f,s[h+12],7,1804603682),f=p(f,u,d,c,s[h+13],12,-40341101),c=p(c,f,u,d,s[h+14],17,-1502002290),d=p(d,c,f,u,s[h+15],22,1236535329),u=_(u,d,c,f,s[h+1],5,-165796510),f=_(f,u,d,c,s[h+6],9,-1069501632),c=_(c,f,u,d,s[h+11],14,643717713),d=_(d,c,f,u,s[h+0],20,-373897302),u=_(u,d,c,f,s[h+5],5,-701558691),f=_(f,u,d,c,s[h+10],9,38016083),c=_(c,f,u,d,s[h+15],14,-660478335),d=_(d,c,f,u,s[h+4],20,-405537848),u=_(u,d,c,f,s[h+9],5,568446438),f=_(f,u,d,c,s[h+14],9,-1019803690),c=_(c,f,u,d,s[h+3],14,-187363961),d=_(d,c,f,u,s[h+8],20,1163531501),u=_(u,d,c,f,s[h+13],5,-1444681467),f=_(f,u,d,c,s[h+2],9,-51403784),c=_(c,f,u,d,s[h+7],14,1735328473),d=_(d,c,f,u,s[h+12],20,-1926607734),u=g(u,d,c,f,s[h+5],4,-378558),f=g(f,u,d,c,s[h+8],11,-2022574463),c=g(c,f,u,d,s[h+11],16,1839030562),d=g(d,c,f,u,s[h+14],23,-35309556),u=g(u,d,c,f,s[h+1],4,-1530992060),f=g(f,u,d,c,s[h+4],11,1272893353),c=g(c,f,u,d,s[h+7],16,-155497632),d=g(d,c,f,u,s[h+10],23,-1094730640),u=g(u,d,c,f,s[h+13],4,681279174),f=g(f,u,d,c,s[h+0],11,-358537222),c=g(c,f,u,d,s[h+3],16,-722521979),d=g(d,c,f,u,s[h+6],23,76029189),u=g(u,d,c,f,s[h+9],4,-640364487),f=g(f,u,d,c,s[h+12],11,-421815835),c=g(c,f,u,d,s[h+15],16,530742520),d=g(d,c,f,u,s[h+2],23,-995338651),u=m(u,d,c,f,s[h+0],6,-198630844),f=m(f,u,d,c,s[h+7],10,1126891415),c=m(c,f,u,d,s[h+14],15,-1416354905),d=m(d,c,f,u,s[h+5],21,-57434055),u=m(u,d,c,f,s[h+12],6,1700485571),f=m(f,u,d,c,s[h+3],10,-1894986606),c=m(c,f,u,d,s[h+10],15,-1051523),d=m(d,c,f,u,s[h+1],21,-2054922799),u=m(u,d,c,f,s[h+8],6,1873313359),f=m(f,u,d,c,s[h+15],10,-30611744),c=m(c,f,u,d,s[h+6],15,-1560198380),d=m(d,c,f,u,s[h+13],21,1309151649),u=m(u,d,c,f,s[h+4],6,-145523070),f=m(f,u,d,c,s[h+11],10,-1120210379),c=m(c,f,u,d,s[h+2],15,718787259),d=m(d,c,f,u,s[h+9],21,-343485551),u=u+v>>>0,d=d+y>>>0,c=c+E>>>0,f=f+S>>>0}return t.endian([u,d,c,f])};o._ff=function(e,t,n,i,r,a,o){var s=e+(t&n|~t&i)+(r>>>0)+o;return(s<<a|s>>>32-a)+t},o._gg=function(e,t,n,i,r,a,o){var s=e+(t&i|n&~i)+(r>>>0)+o;return(s<<a|s>>>32-a)+t},o._hh=function(e,t,n,i,r,a,o){var s=e+(t^n^i)+(r>>>0)+o;return(s<<a|s>>>32-a)+t},o._ii=function(e,t,n,i,r,a,o){var s=e+(n^(t|~i))+(r>>>0)+o;return(s<<a|s>>>32-a)+t},o._blocksize=16,o._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var i=t.wordsToBytes(o(e,n));return n&&n.asBytes?i:n&&n.asString?a.bytesToString(i):t.bytesToHex(i)}}()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=i(f),p=n(2),_=i(p),g=n(3),m=i(g),v=u.default.getLoger("PC-LaserPen"),y=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return m.default.isLaser=!1,e.laserPenInfo,e.laserBoardContent,e.laserBoardWidth=0,e.laserBoardHeight=0,e.scroolTop=0,e.scroolLeft=0,e.laserBoardTop=0,e.laserBoardLeft=0,e.laserGrou=[],e.init(),e.addEvent(),e}return o(t,e),s(t,[{key:"init",value:function(){this.laserBoardContent=(0,_.default)(".laserBoard")}},{key:"addEvent",value:function(){(0,_.default)(".laserBoard").on("mousemove",this._laserMoveHandler.bind(this)),h.default.on("cursor_update",this._laserUpdateHanlder.bind(this)),(0,_.default)(".laserPen").on("click",this._laserPenHandler.bind(this))}},{key:"setCanvasSize",value:function(e){this.laserBoardContent&&(this.laserBoardWidth=e.width,this.laserBoardHeight=e.height,this.laserBoardContent[0].width=this.laserBoardWidth,this.laserBoardContent[0].height=this.laserBoardHeight,this.laserBoardTop=this.laserBoardContent.offset().top-this.scroolTop,this.laserBoardLeft=this.laserBoardContent.offset().left-this.scroolLeft,this._startLaserDraw(this.laserreceiveData))}},{key:"_laserUpdateHanlder",value:function(e){if(0!==e.duration){m.default.userRole!=m.default.USER_NOTMAL&&m.default.userRole!=m.default.USER_INVISIBLE||((0,_.default)(".laserBoard").css("z-index","1"),(0,_.default)(".laserRed").show(),1==(0,_.default)(".laserBoard").css("z-index")&&1==m.default.isDraw&&(0,_.default)(".pencil").click(function(){(0,_.default)(".laserBoard").css("z-index","-1"),m.default.isDraw=!0,(0,_.default)(".canvasContent").css("cursor","url(images/tool/penciling.png),crosshair")}));var t=(1e3*e.duration,this),n=e.pointGroup;if(t.laserreceiveData=[],n&&n.length>0)for(var i=0;i<n.length;i++)t.laserreceiveData.push(n[i]);t._startLaserDraw(n)}else 0==e.duration&&((0,_.default)(".laserBoard").css("z-index","-1"),(0,_.default)(".laserRed").hide())}},{key:"_startLaserDraw",value:function(e){if(e&&e.length>0)for(var t=0;t<e.length;t++){var n=e[t];this._drawLaser(n)}}},{key:"_drawLaser",value:function(e){var t=e;if(t){var n=this.xyFromPer(t.w,t.h);(0,_.default)(".laserRed").css({left:n.x,top:n.y})}}},{key:"_laserPenHandler",value:function(){if(1==m.default.isDraw&&(m.default.isDraw=!1),(0,_.default)(".toolColor").css("display","none"),(0,_.default)(".laserBoard").css("z-index","1"),m.default.isLaser=!m.default.isLaser,m.default.isLaser)(0,_.default)(".laserBoard").css({cursor:"url(images/tool/pen.png),crosshair"});else{(0,_.default)(".laserBoard").css("cursor","default"),(0,_.default)(".canvasContent").css("cursor","default");var e={pointGroup:[],duration:0};h.default.api("sendInsertCursor",e)}this.laserPenInfo={action:"laserPen",isLaser:m.default.isLaser},this._laserPenChangeHandler(this.laserPenInfo)}},{key:"_laserPenChangeHandler",value:function(e){switch(e.action){case"laserPen":m.default.isLaser=e.isLaser}}},{key:"_laserMoveHandler",value:function(e){if(this.laserGrou=[],m.default.isLaser){var t=e.clientX-this.laserBoardLeft,n=e.clientY-this.laserBoardTop;this.laserGrou.push(this.xyToPer(Math.round(t),Math.round(n)));var i=this;i._sendLaser()}}},{key:"_sendLaser",value:function(){if(this.laserGrou.length>=1){var e={pointGroup:this.laserGrou,duration:3};h.default.api("sendInsertCursor",e),this.laserGrou=[]}}},{key:"xyToPer",value:function(e,t){var n={};return n.w=parseInt(e/this.laserBoardWidth*1e4)/100,n.h=parseInt(t/this.laserBoardWidth*1e4)/100,n}},{key:"xyFromPer",value:function(e,t){var n={};return n.x=Math.round(e*this.laserBoardWidth/100),n.y=Math.round(t*this.laserBoardWidth/100),n}}]),t}(c.default);y.prototype.LASER_PEN_CHANGE=y.LASER_PEN_CHANGE="laser_pen_change";var E=y;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"loger","D:/work/PCLive/src/ape/LaserPen.js"),__REACT_HOT_LOADER__.register(y,"LaserPen","D:/work/PCLive/src/ape/LaserPen.js"),__REACT_HOT_LOADER__.register(E,"default","D:/work/PCLive/src/ape/LaserPen.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=(i(f),n(2)),p=i(h),_=n(3),g=(i(_),u.default.getLoger("PC-UIMagnifyApe")),m=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.parentBox=null,e}return o(t,e),s(t,[{key:"init",value:function(e){if(!e)return void console.error("没有父级盒子");this.parentBox=e;var t=document.createElement("div");t.className="imagesLargerBox";var n=document.createElement("div");n.className="magnifyHeadline",t.appendChild(n);var i=document.createElement("a");i.innerHTML="&#xe638;",i.className="magnifyHeadlineA iconfont",i.setAttribute("href","javascript: void(0)"),n.appendChild(i);var r=document.createElement("div");r.className="magnifyImgBox",t.appendChild(r);var a=document.createElement("img");a.className="magnifyImg",a.setAttribute("src",""),r.appendChild(a),this.parentBox.append(t),(0,p.default)(".magnifyHeadlineA").on("click",this.hide.bind(this))}},{key:"show",value:function(e){(0,p.default)("#magnifyBox").show(),this._showImagesLarger(e)}},{key:"hide",value:function(){(0,p.default)("#magnifyBox").hide(),(0,p.default)(".magnifyImg").attr("src","")}},{key:"_showImagesLarger",value:function(e){(0,p.default)(".magnifyImg").attr("src",e)}}]),t}(c.default),v=new m;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(g,"loger","D:/work/PCLive/src/ape/UIMagnifyApe.js"),__REACT_HOT_LOADER__.register(m,"UIMagnifyApe","D:/work/PCLive/src/ape/UIMagnifyApe.js"),__REACT_HOT_LOADER__.register(v,"default","D:/work/PCLive/src/ape/UIMagnifyApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(7),u=i(l),d=n(1),c=i(d),f=n(2),h=i(f),p=n(4),_=i(p),g=n(6),m=i(g),v=n(3),y=i(v),E=n(34),S=i(E),T=c.default.getLoger("PC-UserList"),C=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.rosterList={},e.oneselfList={},e.silenceUsers={},e.showState={0:"./images/ico_state/ico_pc.png",1:"./images/ico_state/ico_app.png",2:"./images/ico_state/ico_app.png",3:"./images/ico_state/ico_h5.png"},e.isSilence=!1,e.addEvent(),e.init(),e.searchApe=new S.default,e}return o(t,e),s(t,[{key:"init",value:function(){(0,h.default)(".tabCon").on("click",".iconVideo",this._openVideoHandler.bind(this)),(0,h.default)(".tabCon").on("click",".iconAudio",this._openAudioHandler.bind(this)),(0,h.default)(".tabCon").on("click",".medioClose",this._mediaCloseHandler.bind(this)),(0,h.default)(".tabCon").on("click",".iconRaise",this._iconRaiseHandler.bind(this)),(0,h.default)("#raiseBtn").on("click",this._raiseBthHandler.bind(this)),(0,h.default)(".tabCon").on("click",".iconBanned",this._iconBannedHandler.bind(this)),(0,h.default)(".tabCon").on("click",".iconBanned1",this._iconRelieveBannedHandler.bind(this)),(0,h.default)("#bannedBtn").on("click",this._bannedBtnHandler.bind(this)),(0,h.default)(".arrowsLeft").on("click",this._hideRightHandler.bind(this)),(0,h.default)(".arrowsRight").on("click",this._showRightHandler.bind(this))}},{key:"addEvent",value:function(){_.default.on("class_join_success",this._classJoinSuccessHandler.bind(this)),_.default.on("class_update_status",this._classUpdateHandler.bind(this)),_.default.on("class_insert_roster",this._insertRosterHandler.bind(this)),_.default.on("class_delete_roster",this._deleteRosterHandler.bind(this)),_.default.on("class_update_roster",this._updateRosterHandler.bind(this))}},{key:"_classJoinSuccessHandler",value:function(e){this.oneselfList.nodeId=e.nodeId,y.default.maxMediaChannels=e.maxMediaChannels,2==y.default.maxMediaChannels&&(this._primaryEffect(),y.default.userRole==y.default.USER_HOST&&(0,h.default)("#controlBrush").show()),y.default.userRole==y.default.USER_HOST&&(0,h.default)("#raiseBtn").hide()}},{key:"_classUpdateHandler",value:function(e){e&&(this._allSilenceHandler(e),this.isSilence=e.silence,this.silenceUsers=e.silenceUsers,this._silenceHandler(e))}},{key:"_allSilenceHandler",value:function(e){e&&(1==e.silence?(this._addSilenceHandler(),(0,h.default)(".tabCon").off("click",".iconBanned1")):(this._removeSilenceHandler(),y.default.userRole!=y.default.USER_NOTMAL&&(0,h.default)(".tabCon").on("click",".iconBanned1",this._iconRelieveBannedHandler.bind(this))))}},{key:"_silenceHandler",value:function(e){if(e)for(var t in e.silenceUsers){var n=this._selectNodeIdOffUserId(t);
for(var i in n)this._addBannedHandler(n[i])}}},{key:"_addSilenceHandler",value:function(){y.default.userRole==y.default.USER_NOTMAL&&(this._silenceHanler(),y.default.isKeypress=!1),this._addSilence(),this._addAllSilence()}},{key:"_removeSilenceHandler",value:function(){this._relievesilenceHanler(),this._removeSilence(),this._removeAllSilence(),y.default.isKeypress=!0}},{key:"_updateSilenceHandler",value:function(e){if(this.isSilence)this._addSilenceHandler();else if(this.silenceUsers[e]){var t=this._selectNodeIdOffUserId(e);for(var n in t)this._addBannedHandler(t[n])}}},{key:"_selectNodeIdOffUserId",value:function(e){var t=[];for(var n in this.rosterList){var i=this.rosterList[n].nodeData;i.userId==e&&t.push(i.nodeId)}return t}},{key:"_addBannedHandler",value:function(e){y.default.nodeId==e&&(this._silenceHanler(),y.default.isKeypress=!1),this._addSilence(e)}},{key:"_removeBannedHandler",value:function(e){y.default.userId==e&&(this._relievesilenceHanler(),this._removeAllSilence(),y.default.isKeypress=!0,this._removeSilence(e))}},{key:"_insertRosterHandler",value:function(e){if(T.log("人员加入信息---->"),e){if(this.rosterList[e.nodeId]=e,y.default.rosterList=this.rosterList,this.rosterList[e.nodeId])if(y.default.nodeId!=e.nodeId){var t=this._creatDiv(e.nodeId,this.rosterList[e.nodeId].nodeData.name,this.rosterList[e.nodeId].nodeId);(0,h.default)("#curClassUserListCommon").append(t),"host"!=this.rosterList[e.nodeId].nodeData.userRole?(e.nodeData.handUpTime&&(this._addRaiseNum(e),(0,h.default)("#curClassUserListRaise").append((0,h.default)("#user_"+this.rosterList[e.nodeId].nodeId))),T.log("显示不是老师的信息",e.nodeData.selfSilence)):(0,h.default)("#curClassUserListTeacher").prepend((0,h.default)("#user_"+this.rosterList[e.nodeId].nodeId)),this._VideoStatus(e),this._audioStatus(e)}else{var n=this._creatDiv(e.nodeId,this.rosterList[e.nodeId].nodeData.name,this.rosterList[e.nodeId].nodeId);(0,h.default)("#curClassUserListTeacher").append(n),this._mediaUnclick(e),T.log("自己不需要显示在列表上")}this._isEquipmentH5(e),this._raiseNum(this.rosterList),this._updateSilenceHandler(e.nodeData.userId),(0,h.default)("#user_"+e.nodeId).find(".userAvatar").attr("src",this.showState[parseInt(e.nodeData.deviceType)])}"host"==e.nodeData.userRole&&((0,h.default)("#markDiv_"+e.nodeId).find(".iconRaise").html(""),y.default.curRosterHostInfo=e),y.default.userRole!=y.default.USER_HOST&&((0,h.default)(".markDiv").find("span,img").css("cursor","default"),(0,h.default)(".tabCon").off("click",".iconVideo"),(0,h.default)(".tabCon").off("click",".iconAudio"),(0,h.default)(".tabCon").off("click",".medioClose"),(0,h.default)(".tabCon").off("click",".iconRaise")),y.default.userRole==y.default.USER_NOTMAL&&((0,h.default)(".tabCon").off("click",".iconBanned"),(0,h.default)(".tabCon").off("click",".iconBanned1"),(0,h.default)("#bannedBtn").off("click").css("cursor","default")),"normal"==e.nodeData.userRole?(0,h.default)("#markDiv_"+e.nodeId).find(".iconBanned").show():(0,h.default)("#markDiv_"+e.nodeId).find(".bannedDiv_"+e.nodeId).remove(),y.default.userRole==y.default.USER_INVISIBLE&&"invisible"==e.nodeData.userRole&&(y.default.curRosterInvisibleNodeId=e.nodeId,(0,h.default)(".markDiv").find("span,img").css("cursor","pointer"),y.default.maxMediaChannels<2&&((0,h.default)("#markDiv_"+y.default.curRosterHostInfo.nodeId).find(".setUpInfo").show(),(0,h.default)("#markDiv_"+y.default.curRosterInvisibleNodeId).find(".setUpInfo").remove()),y.default.maxMediaChannels>=2&&((0,h.default)("#curClassUserListCommon .setUpInfo").show(),(0,h.default)("#markDiv_"+y.default.curRosterInvisibleNodeId).find(".setUpInfo").remove(),(0,h.default)("#curClassUserListRaise .setUpInfo").show())),y.default.userRole==y.default.USER_INVISIBLE&&"invisible"!==e.nodeData.userRole&&((0,h.default)("#curClassUserListTeacher .setUpInfo").show(),(0,h.default)("#markDiv_"+y.default.curRosterInvisibleNodeId).find(".setUpInfo").remove(),(0,h.default)(".markDiv").find("span,img").css("cursor","pointer"),y.default.maxMediaChannels>=2&&(0,h.default)("#curClassUserListCommon .setUpInfo").show()),this.showKickHandler(e)}},{key:"showKickHandler",value:function(e){e&&y.default.userRole==y.default.USER_INVISIBLE&&e.nodeData.userRole==y.default.USER_NOTMAL&&(0,h.default)("#kick_"+e.nodeId).show()}},{key:"_setKickHandler",value:function(e){var t=(0,h.default)(e.target),n=parseInt(t.attr("data"));T.log("点击需要踢出课堂的用户",n),n&&_.default.api("kickOutRosterFormNodeId",{nodeId:n})}},{key:"_deleteRosterHandler",value:function(e){if(T.log("人员离开---->",e),e){var t=this.rosterList[e.nodeId];t&&t.nodeData&&t.nodeData.handUpTime&&this._removeRaiseNum(e),delete this.rosterList[e.nodeId],y.default.rosterList=this.rosterList;var n=(0,h.default)(".userInfo");n.each(function(t,n){this.id==e.nodeId&&(0,h.default)(this).parent().remove()})}}},{key:"_updateRosterHandler",value:function(e){if(T.log("人员信息更新---->"),e){if(y.default.nodeId==e.nodeId)this._showRaiseNum(e),this._VideoStatus(e),this._audioStatus(e),this.rosterList[e.nodeId]=e,e.nodeData.handUpTime?(0,h.default)("#curClassUserListRaise").append((0,h.default)("#user_"+this.rosterList[e.nodeId].nodeId)):((0,h.default)("#raiseBtn").removeClass("active"),(0,h.default)("#curClassUserListTeacher").append((0,h.default)("#user_"+this.rosterList[e.nodeId].nodeId)));else{if(!this.rosterList[e.nodeId].nodeData.handUpTime&&e.nodeData.handUpTime){this._creatDiv(e.nodeId,this.rosterList[e.nodeId].nodeData.name,this.rosterList[e.nodeId].nodeId);(0,h.default)("#curClassUserListRaise").append((0,h.default)("#user_"+this.rosterList[e.nodeId].nodeId))}else this.rosterList[e.nodeId].nodeData.handUpTime&&!e.nodeData.handUpTime&&(0,h.default)("#curClassUserListCommon").append((0,h.default)("#user_"+this.rosterList[e.nodeId].nodeId));this._showRaiseNum(e),this._VideoStatus(e),this.rosterList[e.nodeId]=e}"host"==this.rosterList[e.nodeId].nodeData.userRole&&(0,h.default)("#curClassUserListTeacher").prepend((0,h.default)("#user_"+this.rosterList[e.nodeId].nodeId)),this._audioStatus(e),this._isEquipmentH5(e),this._raiseNum(this.rosterList),this.rosterList[e.nodeId]=e,y.default.rosterList=this.rosterList}this._updateSilenceHandler(e.nodeData.userId)}},{key:"_silenceHanler",value:function(){(0,h.default)("#btn_send").css("background","#9aa5ad").attr("disabled",!0),(0,h.default)("#txt_message").attr("placeholder",y.default.localConfig.gagContent),(0,h.default)("#fileImgInput").width(0),(0,h.default)(".fileImgBtn").css("cursor","default")}},{key:"_relievesilenceHanler",value:function(){(0,h.default)("#btn_send").css("background","#3598db").attr("disabled",!1),(0,h.default)("#txt_message").attr("placeholder",""),(0,h.default)("#fileImgInput").width("20px"),(0,h.default)(".fileImgBtn").css("cursor","pointer")}},{key:"_addSilence",value:function(e){e?(0,h.default)("#banned_"+e).addClass("iconBanned1").removeClass("iconBanned"):(0,h.default)(".iconBanned").addClass("iconBanned1").removeClass("iconBanned")}},{key:"_removeSilence",value:function(e){e?(0,h.default)("#banned_"+e).addClass("iconBanned").removeClass("iconBanned1"):(0,h.default)(".iconBanned1").addClass("iconBanned").removeClass("iconBanned1")}},{key:"_addAllSilence",value:function(){(0,h.default)("#bannedBtn").addClass("relieveBanned").removeClass("bannedBtn")}},{key:"_removeAllSilence",value:function(){(0,h.default)("#bannedBtn").addClass("bannedBtn").removeClass("relieveBanned")}},{key:"_VideoStatus",value:function(e){y.default.userRole==y.default.USER_HOST?e.nodeData.openCamera?((0,h.default)("#Video_"+e.nodeId).hide(),(0,h.default)("#audio_"+e.nodeId).hide(),(0,h.default)("#medio_"+e.nodeId).show()):((0,h.default)("#Video_"+e.nodeId).show().css("color","#b3b3b3"),(0,h.default)("#audio_"+e.nodeId).show().css("color","#b3b3b3"),(0,h.default)("#medio_"+e.nodeId).hide()):e.nodeData.openCamera?((0,h.default)("#Video_"+e.nodeId).css("color","#3498db"),(0,h.default)("#audio_"+e.nodeId).css("color","#3498db")):((0,h.default)("#Video_"+e.nodeId).css("color","#b3b3b3"),(0,h.default)("#audio_"+e.nodeId).css("color","#b3b3b3"))}},{key:"_audioStatus",value:function(e){y.default.userRole==y.default.USER_HOST?e.nodeData.openMicrophones?((0,h.default)("#Video_"+e.nodeId).hide(),(0,h.default)("#audio_"+e.nodeId).hide(),(0,h.default)("#medio_"+e.nodeId).show()):((0,h.default)("#Video_"+e.nodeId).show().css("color","#b3b3b3"),(0,h.default)("#audio_"+e.nodeId).show().css("color","#b3b3b3"),(0,h.default)("#medio_"+e.nodeId).hide()):e.nodeData.openMicrophones?(0,h.default)("#audio_"+e.nodeId).css("color","#3498db"):(0,h.default)("#audio_"+e.nodeId).css("color","#b3b3b3")}},{key:"_isEquipmentH5",value:function(e){e&&e.nodeData&&3==e.nodeData.deviceType&&((0,h.default)("#Video_"+e.nodeId).hide(),(0,h.default)("#audio_"+e.nodeId).hide())}},{key:"_mediaUnclick",value:function(e){(0,h.default)("#markDiv_"+e.nodeId).find("span,img").css("cursor","default"),(0,h.default)("#user_"+e.nodeId+" .nameDiv").css("color","#d95136"),(0,h.default)("#user_"+e.nodeId+" .iconVideo").addClass("iconVideo1").removeClass("iconVideo"),(0,h.default)("#user_"+e.nodeId+" .iconAudio").addClass("iconAudio1").removeClass("iconAudio"),(0,h.default)("#user_"+e.nodeId+" .medioClose").addClass("medioClose1").removeClass("medioClose")}},{key:"_addRaiseNum",value:function(e){(0,h.default)(".raiseDiv_"+e.nodeId).show(),(0,h.default)("#raiseBtn").attr("data",e.nodeId)}},{key:"_removeRaiseNum",value:function(e){(0,h.default)(".raiseDiv_"+e.nodeId).hide()}},{key:"_raiseNum",value:function(e){var t=0;for(var n in this.rosterList)e[n].nodeData.handUpTime&&t++;return 0==t?(0,h.default)(".raiseNum").html(""):(0,h.default)(".raiseNum").html("("+t+")"),t}},{key:"_showRaiseNum",value:function(e){e&&(e.nodeData.handUpTime?this.rosterList[e.nodeId].nodeData.handUpTime||(this.rosterList[e.nodeId].nodeData.handUpTime=e.nodeData.handUpTime,this._addRaiseNum(e)):this.rosterList[e.nodeId].nodeData.handUpTime&&(this.rosterList[e.nodeId].nodeData.handUpTime=0,this._removeRaiseNum(e)))}},{key:"_raiseBthHandler",value:function(){(0,h.default)(".raiseBtn").attr("data");(0,h.default)(".raiseBtn").is(".active")?((0,h.default)(".raiseBtn").removeClass("active"),_.default.api("changeHandUpStatus",{isHandUp:!1})):((0,h.default)(".raiseBtn").addClass("active"),_.default.api("changeHandUpStatus",{isHandUp:!0}))}},{key:"_iconBannedHandler",value:function(e){(0,h.default)(e.target).addClass("iconBanned1").removeClass("iconBanned");var t=e.target.parentNode.id.substr(8),n=parseInt((new Date).getTime()/1e3-y.default.serverTimeDistance),i=this.rosterList[t].nodeData.userId;_.default.api("controlSilenceStatus",{nodeId:t,userId:i,silence:{startTime:n,duration:5}})}},{key:"_iconRelieveBannedHandler",value:function(e){(0,h.default)(e.target).addClass("iconBanned").removeClass("iconBanned1");var t=e.target.parentNode.id.substr(8),n=(parseInt((new Date).getTime()/1e3-y.default.serverTimeDistance),this.rosterList[t].nodeData.userId);_.default.api("controlSilenceStatus",{nodeId:t,userId:n,silence:null})}},{key:"_bannedBtnHandler",value:function(e){(0,h.default)(e.target).hasClass("bannedBtn")?_.default.api("silenceClass",{silence:!0}):_.default.api("silenceClass",{silence:!1})}},{key:"_openVideoHandler",value:function(e){var t=_.default.api("getVideoPublishPath",{type:"flash"});if(0!=t.code)return T.warn("不能再打开设备->最多只能开启->",y.default.maxMediaChannels),void m.default.showError(m.default.TYPE_3,y.default.localConfig.cantOpenDevice);var n=(0,h.default)(e.target),i=n.attr("data");_.default.api("sendVideoBroadcastMsg",{actionType:1,toNodeId:parseInt(i),data:"0"})}},{key:"_openAudioHandler",value:function(e){var t=_.default.api("getAudioPublishPath",{type:"flash"});if(0!=t.code)return T.warn("不能再打开设备->最多只能开启->",y.default.maxMediaChannels),void m.default.showError(m.default.TYPE_3,y.default.localConfig.cantOpenDevice);var n=(0,h.default)(e.target),i=n.attr("data");_.default.api("sendAudioBroadcastMsg",{actionType:1,toNodeId:parseInt(i),data:"0"})}},{key:"_mediaCloseHandler",value:function(e){var t=(0,h.default)(e.target),n=t.attr("data");t.hide(),t.siblings(".iconAudio").show(),t.siblings(".iconVideo").show();var i=this.rosterList[n].nodeData;T.log("点击用户列表中的关闭按钮->",i),i.openCamera?_.default.api("sendVideoBroadcastMsg",{actionType:2,toNodeId:parseInt(n),data:"0"}):_.default.api("sendAudioBroadcastMsg",{actionType:2,toNodeId:parseInt(n),data:"0"})}},{key:"_iconRaiseHandler",value:function(e){var t=(0,h.default)(e.target).attr("data");this.rosterList[t]&&_.default.api("controlHandUpStatus",{isHandUp:!1,nodeId:parseInt(t)})}},{key:"_cancelRaise",value:function(e){(0,h.default)(".raiseDiv_"+e).hide(),(0,h.default)("#raiseBtn").attr("data")&&((0,h.default)("#raiseBtn").removeClass("active"),_.default.api("changeHandUpStatus",{isHandUp:!1}),this._removeRaiseNum(this.rosterList[e]))}},{key:"_setUpInfoHandler",value:function(e){var t=(0,h.default)(e.target).attr("data");T.log("点击设置音视频信息",this.rosterList[t])}},{key:"_primaryEffect",value:function(){(0,h.default)(".videoWindow").hide(),(0,h.default)(".discussAndUsers").css("top",0),(0,h.default)(".rightGap").show(),(0,h.default)(".right").on("mouseenter",this._showArrowsHandler.bind(this)),(0,h.default)(".right").on("mouseleave",this._hideArrowsHandler.bind(this))}},{key:"_showArrowsHandler",value:function(){var e=(0,h.default)(".right").width();"320"==e?this._rightShow():this._leftShow();var t=this._raiseNum(this.rosterList);t=t?t+y.default.localConfig.raiseNum:y.default.localConfig.clickView,(0,h.default)(".arrowsLeft").attr("title",y.default.localConfig.clickHideList),(0,h.default)(".arrowsRight").attr("title",t)}},{key:"_hideArrowsHandler",value:function(){var e=(0,h.default)(".right").width();"10"==e?this._leftShow():((0,h.default)(".arrowsLeft").hide(),(0,h.default)(".arrowsRight").hide())}},{key:"_leftShow",value:function(){(0,h.default)(".arrowsLeft").hide(),(0,h.default)(".arrowsRight").show()}},{key:"_rightShow",value:function(){(0,h.default)(".arrowsLeft").show(),(0,h.default)(".arrowsRight").hide()}},{key:"_hideRightHandler",value:function(){(0,h.default)(".right").width("10px"),this._leftShow(),this._emit(t.WINDOW_VIEW_CHANGE)}},{key:"_showRightHandler",value:function(){(0,h.default)(".right").width("320px"),this._rightShow(),this._emit(t.WINDOW_VIEW_CHANGE)}},{key:"_creatDiv",value:function(e,t,n){var i=document.createElement("div");i.id="user_"+e,i.className="userListInfo clear";var r=document.createElement("div");r.id="markDiv_"+e,r.className="markDiv clear",i.appendChild(r);var a=document.createElement("img");a.src="",a.className="userAvatar",i.appendChild(a);var o=document.createElement("div");o.className="userInfo",o.id=e,i.appendChild(o);var s=document.createElement("label");s.innerText=""+t,s.title=""+t,s.className="nameDiv",o.appendChild(s);var l=document.createElement("span");l.innerHTML="&#xe631;",l.className="iconfont setUpInfo",l.id="set_"+e,l.setAttribute("data",e),l.setAttribute("title",y.default.localConfig.setBtn),r.appendChild(l);var u=document.createElement("span");u.className="iconBanned bannedDiv_"+e,u.id="banned_"+e,u.setAttribute("title",y.default.localConfig.gag),r.appendChild(u);var d=document.createElement("span");if(d.innerHTML="&#xe690;",d.className="iconfont iconKick kick_"+e,d.setAttribute("data",e),d.setAttribute("title",y.default.localConfig.kickOutClass),d.id="kick_"+e,d.onclick=this._setKickHandler.bind(this),r.appendChild(d),y.default.maxMediaChannels>1){var c=document.createElement("span");c.innerHTML="&#xe651;",c.className="iconfont iconAudio",c.setAttribute("data",e),c.id="audio_"+e,r.appendChild(c);var f=document.createElement("span");f.innerHTML="&#xe64f;",f.className="iconfont iconVideo",f.setAttribute("data",e),f.id="Video_"+e,r.appendChild(f);var h=document.createElement("img");h.src="./images/hangup.gif",h.className="medioClose",h.setAttribute("data",e),h.id="medio_"+e,r.appendChild(h)}var p=document.createElement("span");return p.innerHTML="&#xe603;",p.className="iconfont iconRaise raiseDiv_"+e,p.setAttribute("data",e),r.appendChild(p),i}}]),t}(u.default);C.prototype.WINDOW_VIEW_CHANGE=C.WINDOW_VIEW_CHANGE="window_view_change";var R=C;t.default=R;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(T,"loger","D:/work/PCLive/src/ape/UserList.js"),__REACT_HOT_LOADER__.register(C,"UserList","D:/work/PCLive/src/ape/UserList.js"),__REACT_HOT_LOADER__.register(R,"default","D:/work/PCLive/src/ape/UserList.js"))})()},function(e,t,n){var i,r,a;(function(e){"use strict";var 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};!function(o,s){"object"==n(t)&&"object"==n(e)?e.exports=s():(r=[],i=s,a="function"==typeof i?i.apply(t,r):i,!(void 0!==a&&(e.exports=a)))}(void 0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(5)},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e),this.MAPS={}}return i(e,[{key:"on",value:function(e,t){if(e&&t){var n=this.MAPS[e];if(!n)return this.MAPS[e]=[t];n.push(t)}}},{key:"off",value:function(e,t){if(e){var n=this.MAPS[e];if(n){if(t)return n.splice(n.indexOf(t),1);n.length=0}}}},{key:"_emit",value:function(e,t){if(e){var n=this.MAPS["*"];n&&n.length&&n.forEach(function(n){n(e,t)});var i=this.MAPS[e];i&&i.length&&i.forEach(function(e){e(t)})}}}]),e}(),a=r;t.default=a,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"Emiter","D:/work/JsSeting/src/Emiter.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/JsSeting/src/Emiter.js"))}()},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){n(this,e),this.sdkInfo=t||"",this.id=this.initId()}return i(e,[{key:"initId",value:function(){if(!this.sdkInfo)return console.log("this.sdkInfo无效-->",this.sdkInfo),"";var e=Object.prototype.toString.call(this.sdkInfo);return"[object String]"===e?this.sdkInfo:"[object Object]"===e?this.sdkInfo.mid||"":""}},{key:"log",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.LOG,n)}},{key:"warn",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.WARN,n)}},{key:"error",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.ERROR,n)}},{key:"data",value:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this._log(e.DATA,n)}},{key:"_log",value:function(t,n){n=JSON.stringify(n);var i=this.id+" -> "+n;if(t>=e.logLevel)switch(t){case e.LOG:console.log(i);break;case e.WARN:console.warn(i);break;case e.ERROR:console.error(i);break;case e.DATA:console.log(i)}}}]),e}();r.LOG=0,r.WARN=1,r.ERROR=2,r.NO=1/0,r.logLevel=r.LOG,r.DATA=5;var a={getLoger:function(e){return new r(e)},setLogLevel:function(e){r.logLevel=e},LOG:r.LOG,WARN:r.WARN,ERROR:r.ERROR,NO:r.NO,DATA:r.DATA};t.default=a,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"Loger","D:/work/JsSeting/src/Loger.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/JsSeting/src/Loger.js"))}()},function(e,t,i){var r,a;!function(t,i){"object"==("undefined"==typeof e?"undefined":n(e))&&"object"==n(e.exports)?e.exports=t.document?i(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return i(e)}:i(t)}("undefined"!=typeof window?window:this,function(i,o){function s(e,t){t=t||re;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function l(e){var t=!!e&&"length"in e&&e.length,n=me.type(e);return"function"!==n&&!me.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function u(e,t,n){if(me.isFunction(t))return me.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return me.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ae.test(t))return me.filter(t,e,n);t=me.filter(t,e)}return me.grep(e,function(e){return ue.call(t,e)>-1!==n&&1===e.nodeType})}function d(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function c(e){var t={};return me.each(e.match(Le)||[],function(e,n){t[n]=!0}),t}function f(e){return e}function h(e){throw e}function p(e,t,n){var i;try{e&&me.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&me.isFunction(i=e.then)?i.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function _(){re.removeEventListener("DOMContentLoaded",_),i.removeEventListener("load",_),me.ready()}function g(){this.expando=me.expando+g.uid++}function m(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(je,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Fe.test(n)?JSON.parse(n):n)}catch(e){}Be.set(e,t,n)}else n=void 0;return n}function v(e,t,n,i){var r,a=1,o=20,s=i?function(){return i.cur()}:function(){return me.css(e,t,"")},l=s(),u=n&&n[3]||(me.cssNumber[t]?"":"px"),d=(me.cssNumber[t]||"px"!==u&&+l)&&Ve.exec(me.css(e,t));if(d&&d[3]!==u){u=u||d[3],n=n||[],d=+l||1;do a=a||".5",d/=a,me.style(e,t,d+u);while(a!==(a=s()/l)&&1!==a&&--o)}return n&&(d=+d||+l||0,r=n[1]?d+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=d,i.end=r)),r}function y(e){var t,n=e.ownerDocument,i=e.nodeName,r=Je[i];return r?r:(t=n.body.appendChild(n.createElement(i)),r=me.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Je[i]=r,r)}function E(e,t){for(var n,i,r=[],a=0,o=e.length;a<o;a++)i=e[a],i.style&&(n=i.style.display,t?("none"===n&&(r[a]=He.get(i,"display")||null,r[a]||(i.style.display="")),""===i.style.display&&We(i)&&(r[a]=y(i))):"none"!==n&&(r[a]="none",He.set(i,"display",n)));for(a=0;a<o;a++)null!=r[a]&&(e[a].style.display=r[a]);return e}function S(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&me.nodeName(e,t)?me.merge([e],n):n}function T(e,t){for(var n=0,i=e.length;n<i;n++)He.set(e[n],"globalEval",!t||He.get(t[n],"globalEval"))}function C(e,t,n,i,r){for(var a,o,s,l,u,d,c=t.createDocumentFragment(),f=[],h=0,p=e.length;h<p;h++)if(a=e[h],a||0===a)if("object"===me.type(a))me.merge(f,a.nodeType?[a]:a);else if(Ze.test(a)){for(o=o||c.appendChild(t.createElement("div")),s=(Ke.exec(a)||["",""])[1].toLowerCase(),l=Xe[s]||Xe._default,o.innerHTML=l[1]+me.htmlPrefilter(a)+l[2],d=l[0];d--;)o=o.lastChild;me.merge(f,o.childNodes),o=c.firstChild,o.textContent=""}else f.push(t.createTextNode(a));for(c.textContent="",h=0;a=f[h++];)if(i&&me.inArray(a,i)>-1)r&&r.push(a);else if(u=me.contains(a.ownerDocument,a),o=S(c.appendChild(a),"script"),u&&T(o),n)for(d=0;a=o[d++];)ze.test(a.type||"")&&n.push(a);return c}function R(){return!0}function b(){return!1}function w(){try{return re.activeElement}catch(e){}}function A(e,t,i,r,a,o){var s,l;if("object"==("undefined"==typeof t?"undefined":n(t))){"string"!=typeof i&&(r=r||i,i=void 0);for(l in t)A(e,l,i,r,t[l],o);return e}if(null==r&&null==a?(a=i,r=i=void 0):null==a&&("string"==typeof i?(a=r,r=void 0):(a=r,r=i,i=void 0)),a===!1)a=b;else if(!a)return e;return 1===o&&(s=a,a=function(e){return me().off(e),s.apply(this,arguments)},a.guid=s.guid||(s.guid=me.guid++)),e.each(function(){me.event.add(this,t,a,r,i)})}function I(e,t){return me.nodeName(e,"table")&&me.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function P(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function O(e){var t=ot.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function D(e,t){var n,i,r,a,o,s,l,u;if(1===t.nodeType){if(He.hasData(e)&&(a=He.access(e),o=He.set(t,a),u=a.events)){delete o.handle,o.events={};for(r in u)for(n=0,i=u[r].length;n<i;n++)me.event.add(t,r,u[r][n])}Be.hasData(e)&&(s=Be.access(e),l=me.extend({},s),Be.set(t,l))}}function k(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Qe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function L(e,t,n,i){t=se.apply([],t);var r,a,o,l,u,d,c=0,f=e.length,h=f-1,p=t[0],_=me.isFunction(p);if(_||f>1&&"string"==typeof p&&!_e.checkClone&&at.test(p))return e.each(function(r){var a=e.eq(r);_&&(t[0]=p.call(this,r,a.html())),L(a,t,n,i)});if(f&&(r=C(t,e[0].ownerDocument,!1,e,i),a=r.firstChild,1===r.childNodes.length&&(r=a),a||i)){for(o=me.map(S(r,"script"),P),l=o.length;c<f;c++)u=r,c!==h&&(u=me.clone(u,!0,!0),l&&me.merge(o,S(u,"script"))),n.call(e[c],u,c);if(l)for(d=o[o.length-1].ownerDocument,me.map(o,O),c=0;c<l;c++)u=o[c],ze.test(u.type||"")&&!He.access(u,"globalEval")&&me.contains(d,u)&&(u.src?me._evalUrl&&me._evalUrl(u.src):s(u.textContent.replace(st,""),d))}return e}function N(e,t,n){for(var i,r=t?me.filter(t,e):e,a=0;null!=(i=r[a]);a++)n||1!==i.nodeType||me.cleanData(S(i)),i.parentNode&&(n&&me.contains(i.ownerDocument,i)&&T(S(i,"script")),i.parentNode.removeChild(i));return e}function M(e,t,n){var i,r,a,o,s=e.style;return n=n||dt(e),n&&(o=n.getPropertyValue(t)||n[t],""!==o||me.contains(e.ownerDocument,e)||(o=me.style(e,t)),!_e.pixelMarginRight()&&ut.test(o)&&lt.test(t)&&(i=s.width,r=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=i,s.minWidth=r,s.maxWidth=a)),void 0!==o?o+"":o}function x(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function U(e){if(e in _t)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=pt.length;n--;)if(e=pt[n]+t,e in _t)return e}function H(e,t,n){var i=Ve.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function B(e,t,n,i,r){for(var a=n===(i?"border":"content")?4:"width"===t?1:0,o=0;a<4;a+=2)"margin"===n&&(o+=me.css(e,n+qe[a],!0,r)),i?("content"===n&&(o-=me.css(e,"padding"+qe[a],!0,r)),"margin"!==n&&(o-=me.css(e,"border"+qe[a]+"Width",!0,r))):(o+=me.css(e,"padding"+qe[a],!0,r),"padding"!==n&&(o+=me.css(e,"border"+qe[a]+"Width",!0,r)));return o}function F(e,t,n){var i,r=!0,a=dt(e),o="border-box"===me.css(e,"boxSizing",!1,a);if(e.getClientRects().length&&(i=e.getBoundingClientRect()[t]),i<=0||null==i){if(i=M(e,t,a),(i<0||null==i)&&(i=e.style[t]),ut.test(i))return i;r=o&&(_e.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+B(e,t,n||(o?"border":"content"),r,a)+"px"}function j(e,t,n,i,r){return new j.prototype.init(e,t,n,i,r)}function G(){mt&&(i.requestAnimationFrame(G),me.fx.tick())}function V(){return i.setTimeout(function(){gt=void 0}),gt=me.now()}function q(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=qe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function W(e,t,n){for(var i,r=(Q.tweeners[t]||[]).concat(Q.tweeners["*"]),a=0,o=r.length;a<o;a++)if(i=r[a].call(n,t,e))return i}function Y(e,t,n){var i,r,a,o,s,l,u,d,c="width"in t||"height"in t,f=this,h={},p=e.style,_=e.nodeType&&We(e),g=He.get(e,"fxshow");n.queue||(o=me._queueHooks(e,"fx"),null==o.unqueued&&(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,f.always(function(){f.always(function(){o.unqueued--,me.queue(e,"fx").length||o.empty.fire()})}));for(i in t)if(r=t[i],vt.test(r)){if(delete t[i],a=a||"toggle"===r,r===(_?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;_=!0}h[i]=g&&g[i]||me.style(e,i)}if(l=!me.isEmptyObject(t),l||!me.isEmptyObject(h)){c&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],u=g&&g.display,null==u&&(u=He.get(e,"display")),d=me.css(e,"display"),"none"===d&&(u?d=u:(E([e],!0),u=e.style.display||u,d=me.css(e,"display"),E([e]))),("inline"===d||"inline-block"===d&&null!=u)&&"none"===me.css(e,"float")&&(l||(f.done(function(){p.display=u}),null==u&&(d=p.display,u="none"===d?"":d)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1;for(i in h)l||(g?"hidden"in g&&(_=g.hidden):g=He.access(e,"fxshow",{display:u}),a&&(g.hidden=!_),_&&E([e],!0),f.done(function(){_||E([e]),He.remove(e,"fxshow");for(i in h)me.style(e,i,h[i])})),l=W(_?g[i]:0,i,f),i in g||(g[i]=l.start,_&&(l.end=l.start,l.start=0))}}function J(e,t){var n,i,r,a,o;for(n in e)if(i=me.camelCase(n),r=t[i],a=e[n],me.isArray(a)&&(r=a[1],a=e[n]=a[0]),n!==i&&(e[i]=a,delete e[n]),o=me.cssHooks[i],o&&"expand"in o){a=o.expand(a),delete e[i];for(n in a)n in e||(e[n]=a[n],t[n]=r)}else t[i]=r}function Q(e,t,n){var i,r,a=0,o=Q.prefilters.length,s=me.Deferred().always(function(){delete l.elem}),l=function t(){if(r)return!1;for(var n=gt||V(),i=Math.max(0,u.startTime+u.duration-n),a=i/u.duration||0,o=1-a,l=0,t=u.tweens.length;l<t;l++)u.tweens[l].run(o);return s.notifyWith(e,[u,o,i]),o<1&&t?i:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:me.extend({},t),opts:me.extend(!0,{specialEasing:{},easing:me.easing._default},n),originalProperties:t,originalOptions:n,startTime:gt||V(),duration:n.duration,tweens:[],createTween:function(t,n){var i=me.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),d=u.props;for(J(d,u.opts.specialEasing);a<o;a++)if(i=Q.prefilters[a].call(u,e,d,u.opts))return me.isFunction(i.stop)&&(me._queueHooks(u.elem,u.opts.queue).stop=me.proxy(i.stop,i)),i;return me.map(d,W,u),me.isFunction(u.opts.start)&&u.opts.start.call(e,u),me.fx.timer(me.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function K(e){return e.getAttribute&&e.getAttribute("class")||""}function z(e,t,i,r){var a;if(me.isArray(t))me.each(t,function(t,a){i||Dt.test(e)?r(e,a):z(e+"["+("object"==("undefined"==typeof a?"undefined":n(a))&&null!=a?t:"")+"]",a,i,r)});else if(i||"object"!==me.type(t))r(e,t);else for(a in t)z(e+"["+a+"]",t[a],i,r)}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,a=t.toLowerCase().match(Le)||[];if(me.isFunction(n))for(;i=a[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Z(e,t,n,i){function r(s){var l;return a[s]=!0,me.each(e[s]||[],function(e,s){var u=s(t,n,i);return"string"!=typeof u||o||a[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),r(u),!1)}),l}var a={},o=e===Vt;return r(t.dataTypes[0])||!a["*"]&&r("*")}function $(e,t){var n,i,r=me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&me.extend(!0,e,i),e}function ee(e,t,n){for(var i,r,a,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)a=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){a=r;break}o||(o=r)}a=a||o}if(a)return a!==l[0]&&l.unshift(a),n[a]}function te(e,t,n,i){var r,a,o,s,l,u={},d=e.dataTypes.slice();if(d[1])for(o in e.converters)u[o.toLowerCase()]=e.converters[o];for(a=d.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=a,a=d.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){
if(o=u[l+" "+a]||u["* "+a],!o)for(r in u)if(s=r.split(" "),s[1]===a&&(o=u[l+" "+s[0]]||u["* "+s[0]])){o===!0?o=u[r]:u[r]!==!0&&(a=s[0],d.unshift(s[1]));break}if(o!==!0)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+a}}}return{state:"success",data:t}}function ne(e){return me.isWindow(e)?e:9===e.nodeType&&e.defaultView}var ie=[],re=i.document,ae=Object.getPrototypeOf,oe=ie.slice,se=ie.concat,le=ie.push,ue=ie.indexOf,de={},ce=de.toString,fe=de.hasOwnProperty,he=fe.toString,pe=he.call(Object),_e={},ge="3.1.0",me=function e(t,n){return new e.fn.init(t,n)},ve=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ye=/^-ms-/,Ee=/-([a-z])/g,Se=function(e,t){return t.toUpperCase()};me.fn=me.prototype={jquery:ge,constructor:me,length:0,toArray:function(){return oe.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:oe.call(this)},pushStack:function(e){var t=me.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return me.each(this,e)},map:function(e){return this.pushStack(me.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(oe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:le,sort:ie.sort,splice:ie.splice},me.extend=me.fn.extend=function(){var e,t,i,r,a,o,s=arguments[0]||{},l=1,u=arguments.length,d=!1;for("boolean"==typeof s&&(d=s,s=arguments[l]||{},l++),"object"==("undefined"==typeof s?"undefined":n(s))||me.isFunction(s)||(s={}),l===u&&(s=this,l--);l<u;l++)if(null!=(e=arguments[l]))for(t in e)i=s[t],r=e[t],s!==r&&(d&&r&&(me.isPlainObject(r)||(a=me.isArray(r)))?(a?(a=!1,o=i&&me.isArray(i)?i:[]):o=i&&me.isPlainObject(i)?i:{},s[t]=me.extend(d,o,r)):void 0!==r&&(s[t]=r));return s},me.extend({expando:"jQuery"+(ge+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===me.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=me.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==ce.call(e)||(t=ae(e))&&(n=fe.call(t,"constructor")&&t.constructor,"function"!=typeof n||he.call(n)!==pe))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==("undefined"==typeof e?"undefined":n(e))||"function"==typeof e?de[ce.call(e)]||"object":"undefined"==typeof e?"undefined":n(e)},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(ye,"ms-").replace(Ee,Se)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,i=0;if(l(e))for(n=e.length;i<n&&t.call(e[i],i,e[i])!==!1;i++);else for(i in e)if(t.call(e[i],i,e[i])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ve,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(l(Object(e))?me.merge(n,"string"==typeof e?[e]:e):le.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:ue.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],a=0,o=e.length,s=!n;a<o;a++)i=!t(e[a],a),i!==s&&r.push(e[a]);return r},map:function(e,t,n){var i,r,a=0,o=[];if(l(e))for(i=e.length;a<i;a++)r=t(e[a],a,n),null!=r&&o.push(r);else for(a in e)r=t(e[a],a,n),null!=r&&o.push(r);return se.apply([],o)},guid:1,proxy:function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),me.isFunction(e))return i=oe.call(arguments,2),r=function(){return e.apply(t||this,i.concat(oe.call(arguments)))},r.guid=e.guid=e.guid||me.guid++,r},now:Date.now,support:_e}),"function"==typeof Symbol&&(me.fn[Symbol.iterator]=ie[Symbol.iterator]),me.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){de["[object "+t+"]"]=t.toLowerCase()});var Te=function(e){function t(e,t,n,i){var r,a,o,s,l,u,d,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!i&&((t?t.ownerDocument||t:j)!==L&&k(t),t=t||L,M)){if(11!==p&&(l=me.exec(e)))if(r=l[1]){if(9===p){if(!(o=t.getElementById(r)))return n;if(o.id===r)return n.push(o),n}else if(f&&(o=f.getElementById(r))&&B(t,o)&&o.id===r)return n.push(o),n}else{if(l[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&T.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(r)),n}if(T.qsa&&!Y[e+" "]&&(!x||!x.test(e))){if(1!==p)f=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(Se,Te):t.setAttribute("id",s=F),u=w(e),a=u.length;a--;)u[a]="#"+s+" "+h(u[a]);d=u.join(","),f=ve.test(e)&&c(t.parentNode)||t}if(d)try{return Z.apply(n,f.querySelectorAll(d)),n}catch(e){}finally{s===F&&t.removeAttribute("id")}}}return I(e.replace(se,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[F]=!0,e}function r(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),i=n.length;i--;)C.attrHandle[n[i]]=t}function o(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return function(t){return"label"in t&&t.disabled===e||"form"in t&&t.disabled===e||"form"in t&&t.disabled===!1&&(t.isDisabled===e||t.isDisabled!==!e&&("label"in t||!Re(t))!==e)}}function d(e){return i(function(t){return t=+t,i(function(n,i){for(var r,a=e([],n.length,t),o=a.length;o--;)n[r=a[o]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function h(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function p(e,t,n){var i=t.dir,r=t.next,a=r||i,o=n&&"parentNode"===a,s=V++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,l){var u,d,c,f=[G,s];if(l){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||o)if(c=t[F]||(t[F]={}),d=c[t.uniqueID]||(c[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[i]||t;else{if((u=d[a])&&u[0]===G&&u[1]===s)return f[2]=u[2];if(d[a]=f,f[2]=e(t,n,l))return!0}}}function _(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var r=0,a=n.length;r<a;r++)t(e,n[r],i);return i}function m(e,t,n,i,r){for(var a,o=[],s=0,l=e.length,u=null!=t;s<l;s++)(a=e[s])&&(n&&!n(a,i,r)||(o.push(a),u&&t.push(s)));return o}function v(e,t,n,r,a,o){return r&&!r[F]&&(r=v(r)),a&&!a[F]&&(a=v(a,o)),i(function(i,o,s,l){var u,d,c,f=[],h=[],p=o.length,_=i||g(t||"*",s.nodeType?[s]:s,[]),v=!e||!i&&t?_:m(_,f,e,s,l),y=n?a||(i?e:p||r)?[]:o:v;if(n&&n(v,y,s,l),r)for(u=m(y,h),r(u,[],s,l),d=u.length;d--;)(c=u[d])&&(y[h[d]]=!(v[h[d]]=c));if(i){if(a||e){if(a){for(u=[],d=y.length;d--;)(c=y[d])&&u.push(v[d]=c);a(null,y=[],u,l)}for(d=y.length;d--;)(c=y[d])&&(u=a?ee(i,c):f[d])>-1&&(i[u]=!(o[u]=c))}}else y=m(y===o?y.splice(p,y.length):y),a?a(null,o,y,l):Z.apply(o,y)})}function y(e){for(var t,n,i,r=e.length,a=C.relative[e[0].type],o=a||C.relative[" "],s=a?1:0,l=p(function(e){return e===t},o,!0),u=p(function(e){return ee(t,e)>-1},o,!0),d=[function(e,n,i){var r=!a&&(i||n!==P)||((t=n).nodeType?l(e,n,i):u(e,n,i));return t=null,r}];s<r;s++)if(n=C.relative[e[s].type])d=[p(_(d),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[F]){for(i=++s;i<r&&!C.relative[e[i].type];i++);return v(s>1&&_(d),s>1&&h(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<i&&y(e.slice(s,i)),i<r&&y(e=e.slice(i)),i<r&&h(e))}d.push(n)}return _(d)}function E(e,n){var r=n.length>0,a=e.length>0,o=function(i,o,s,l,u){var d,c,f,h=0,p="0",_=i&&[],g=[],v=P,y=i||a&&C.find.TAG("*",u),E=G+=null==v?1:Math.random()||.1,S=y.length;for(u&&(P=o===L||o||u);p!==S&&null!=(d=y[p]);p++){if(a&&d){for(c=0,o||d.ownerDocument===L||(k(d),s=!M);f=e[c++];)if(f(d,o||L,s)){l.push(d);break}u&&(G=E)}r&&((d=!f&&d)&&h--,i&&_.push(d))}if(h+=p,r&&p!==h){for(c=0;f=n[c++];)f(_,g,o,s);if(i){if(h>0)for(;p--;)_[p]||g[p]||(g[p]=z.call(l));g=m(g)}Z.apply(l,g),u&&!i&&g.length>0&&h+n.length>1&&t.uniqueSort(l)}return u&&(G=E,P=v),_};return r?i(o):o}var S,T,C,R,b,w,A,I,P,O,D,k,L,N,M,x,U,H,B,F="sizzle"+1*new Date,j=e.document,G=0,V=0,q=n(),W=n(),Y=n(),J=function(e,t){return e===t&&(D=!0),0},Q={}.hasOwnProperty,K=[],z=K.pop,X=K.push,Z=K.push,$=K.slice,ee=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",re="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",oe=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),de=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),ce=new RegExp(ae),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,_e=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,ye=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),Ee=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Se=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){k()},Re=p(function(e){return e.disabled===!0},{dir:"parentNode",next:"legend"});try{Z.apply(K=$.call(j.childNodes),j.childNodes),K[j.childNodes.length].nodeType}catch(e){Z={apply:K.length?function(e,t){X.apply(e,$.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}T=t.support={},b=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},k=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:j;return i!==L&&9===i.nodeType&&i.documentElement?(L=i,N=L.documentElement,M=!b(L),j!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),T.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=r(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=ge.test(L.getElementsByClassName),T.getById=r(function(e){return N.appendChild(e).id=F,!L.getElementsByName||!L.getElementsByName(F).length}),T.getById?(C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&M){var n=t.getElementById(e);return n?[n]:[]}},C.filter.ID=function(e){var t=e.replace(ye,Ee);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(ye,Ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[r++];)1===n.nodeType&&i.push(n);return i}return a},C.find.CLASS=T.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&M)return t.getElementsByClassName(e)},U=[],x=[],(T.qsa=ge.test(L.querySelectorAll))&&(r(function(e){N.appendChild(e).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&x.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||x.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+F+"-]").length||x.push("~="),e.querySelectorAll(":checked").length||x.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||x.push(".#.+[+~]")}),r(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&x.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&x.push(":enabled",":disabled"),N.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&x.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),x.push(",.*:")})),(T.matchesSelector=ge.test(H=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&r(function(e){T.disconnectedMatch=H.call(e,"*"),H.call(e,"[s!='']:x"),U.push("!=",ae)}),x=x.length&&new RegExp(x.join("|")),U=U.length&&new RegExp(U.join("|")),t=ge.test(N.compareDocumentPosition),B=t||ge.test(N.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},J=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===j&&B(j,e)?-1:t===L||t.ownerDocument===j&&B(j,t)?1:O?ee(O,e)-ee(O,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,i=0,r=e.parentNode,a=t.parentNode,s=[e],l=[t];if(!r||!a)return e===L?-1:t===L?1:r?-1:a?1:O?ee(O,e)-ee(O,t):0;if(r===a)return o(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?o(s[i],l[i]):s[i]===j?-1:l[i]===j?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&k(e),n=n.replace(de,"='$1']"),T.matchesSelector&&M&&!Y[n+" "]&&(!U||!U.test(n))&&(!x||!x.test(n)))try{var i=H.call(e,n);if(i||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&k(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&k(e);var n=C.attrHandle[t.toLowerCase()],i=n&&Q.call(C.attrHandle,t.toLowerCase())?n(e,t,!M):void 0;return void 0!==i?i:T.attributes||!M?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(Se,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(D=!T.detectDuplicates,O=!T.sortStable&&e.slice(0),e.sort(J),D){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return O=null,e},R=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=R(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=R(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,Ee),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,Ee),"~="===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]||t.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]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=w(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(ye,Ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var a=t.attr(r,e);return null==a?"!="===n:!n||(a+="","="===n?a===i:"!="===n?a!==i:"^="===n?i&&0===a.indexOf(i):"*="===n?i&&a.indexOf(i)>-1:"$="===n?i&&a.slice(-i.length)===i:"~="===n?(" "+a.replace(oe," ")+" ").indexOf(i)>-1:"|="===n&&(a===i||a.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,d,c,f,h,p,_=a!==o?"nextSibling":"previousSibling",g=t.parentNode,m=s&&t.nodeName.toLowerCase(),v=!l&&!s,y=!1;if(g){if(a){for(;_;){for(f=t;f=f[_];)if(s?f.nodeName.toLowerCase()===m:1===f.nodeType)return!1;p=_="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?g.firstChild:g.lastChild],o&&v){for(f=g,c=f[F]||(f[F]={}),d=c[f.uniqueID]||(c[f.uniqueID]={}),u=d[e]||[],h=u[0]===G&&u[1],y=h&&u[2],f=h&&g.childNodes[h];f=++h&&f&&f[_]||(y=h=0)||p.pop();)if(1===f.nodeType&&++y&&f===t){d[e]=[G,h,y];break}}else if(v&&(f=t,c=f[F]||(f[F]={}),d=c[f.uniqueID]||(c[f.uniqueID]={}),u=d[e]||[],h=u[0]===G&&u[1],y=h),y===!1)for(;(f=++h&&f&&f[_]||(y=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==m:1!==f.nodeType)||!++y||(v&&(c=f[F]||(f[F]={}),d=c[f.uniqueID]||(c[f.uniqueID]={}),d[e]=[G,y]),f!==t)););return y-=r,y===i||y%i===0&&y/i>=0}}},PSEUDO:function(e,n){var r,a=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[F]?a(n):a.length>1?(r=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=a(e,n),o=r.length;o--;)i=ee(e,r[o]),e[i]=!(t[i]=r[o])}):function(e){return a(e,0,r)}):a}},pseudos:{not:i(function(e){var t=[],n=[],r=A(e.replace(se,"$1"));return r[F]?i(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ye,Ee),function(t){return(t.textContent||t.innerText||R(t)).indexOf(e)>-1}}),lang:i(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,Ee).toLowerCase(),function(t){var n;do if(n=M?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===N},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:u(!1),disabled:u(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return _e.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:d(function(){return[0]}),last:d(function(e,t){return[t-1]}),eq:d(function(e,t,n){return[n<0?n+t:n]}),even:d(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:d(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:d(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:d(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},C.pseudos.nth=C.pseudos.eq;for(S in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[S]=s(S);for(S in{submit:!0,reset:!0})C.pseudos[S]=l(S);return f.prototype=C.filters=C.pseudos,C.setFilters=new f,w=t.tokenize=function(e,n){var i,r,a,o,s,l,u,d=W[e+" "];if(d)return n?0:d.slice(0);for(s=e,l=[],u=C.preFilter;s;){i&&!(r=le.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(a=[])),i=!1,(r=ue.exec(s))&&(i=r.shift(),a.push({value:i,type:r[0].replace(se," ")}),s=s.slice(i.length));for(o in C.filter)!(r=he[o].exec(s))||u[o]&&!(r=u[o](r))||(i=r.shift(),a.push({value:i,type:o,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):W(e,l).slice(0)},A=t.compile=function(e,t){var n,i=[],r=[],a=Y[e+" "];if(!a){for(t||(t=w(e)),n=t.length;n--;)a=y(t[n]),a[F]?i.push(a):r.push(a);a=Y(e,E(r,i)),a.selector=e}return a},I=t.select=function(e,t,n,i){var r,a,o,s,l,u="function"==typeof e&&e,d=!i&&w(e=u.selector||e);if(n=n||[],1===d.length){if(a=d[0]=d[0].slice(0),a.length>2&&"ID"===(o=a[0]).type&&T.getById&&9===t.nodeType&&M&&C.relative[a[1].type]){if(t=(C.find.ID(o.matches[0].replace(ye,Ee),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(r=he.needsContext.test(e)?0:a.length;r--&&(o=a[r],!C.relative[s=o.type]);)if((l=C.find[s])&&(i=l(o.matches[0].replace(ye,Ee),ve.test(a[0].type)&&c(t.parentNode)||t))){if(a.splice(r,1),e=i.length&&h(a),!e)return Z.apply(n,i),n;break}}return(u||A(e,d))(i,t,!M,n,!t||ve.test(e)&&c(t.parentNode)||t),n},T.sortStable=F.split("").sort(J).join("")===F,T.detectDuplicates=!!D,k(),T.sortDetached=r(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||a(te,function(e,t,n){var i;if(!n)return e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(i);me.find=Te,me.expr=Te.selectors,me.expr[":"]=me.expr.pseudos,me.uniqueSort=me.unique=Te.uniqueSort,me.text=Te.getText,me.isXMLDoc=Te.isXML,me.contains=Te.contains,me.escapeSelector=Te.escape;var Ce=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&me(e).is(n))break;i.push(e)}return i},Re=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},be=me.expr.match.needsContext,we=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ae=/^.[^:#\[\.,]*$/;me.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?me.find.matchesSelector(i,e)?[i]:[]:me.find.matches(e,me.grep(t,function(e){return 1===e.nodeType}))},me.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(me(e).filter(function(){for(t=0;t<i;t++)if(me.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)me.find(e,r[t],n);return i>1?me.uniqueSort(n):n},filter:function(e){return this.pushStack(u(this,e||[],!1))},not:function(e){return this.pushStack(u(this,e||[],!0))},is:function(e){return!!u(this,"string"==typeof e&&be.test(e)?me(e):e||[],!1).length}});var Ie,Pe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Oe=me.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||Ie,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Pe.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof me?t[0]:t,me.merge(this,me.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),we.test(i[1])&&me.isPlainObject(t))for(i in t)me.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=re.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):me.isFunction(e)?void 0!==n.ready?n.ready(e):e(me):me.makeArray(e,this)};Oe.prototype=me.fn,Ie=me(re);var De=/^(?:parents|prev(?:Until|All))/,ke={children:!0,contents:!0,next:!0,prev:!0};me.fn.extend({has:function(e){var t=me(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(me.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,a=[],o="string"!=typeof e&&me(e);if(!be.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&me.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?me.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?ue.call(me(e),this[0]):ue.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(me.uniqueSort(me.merge(this.get(),me(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),me.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Ce(e,"parentNode")},parentsUntil:function(e,t,n){return Ce(e,"parentNode",n)},next:function(e){return d(e,"nextSibling")},prev:function(e){return d(e,"previousSibling")},nextAll:function(e){return Ce(e,"nextSibling")},prevAll:function(e){return Ce(e,"previousSibling")},nextUntil:function(e,t,n){return Ce(e,"nextSibling",n)},prevUntil:function(e,t,n){return Ce(e,"previousSibling",n)},siblings:function(e){return Re((e.parentNode||{}).firstChild,e)},children:function(e){return Re(e.firstChild)},contents:function(e){return e.contentDocument||me.merge([],e.childNodes)}},function(e,t){me.fn[e]=function(n,i){var r=me.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=me.filter(i,r)),this.length>1&&(ke[e]||me.uniqueSort(r),De.test(e)&&r.reverse()),this.pushStack(r)}});var Le=/\S+/g;me.Callbacks=function(e){e="string"==typeof e?c(e):me.extend({},e);var t,n,i,r,a=[],o=[],s=-1,l=function(){for(r=e.once,i=t=!0;o.length;s=-1)for(n=o.shift();++s<a.length;)a[s].apply(n[0],n[1])===!1&&e.stopOnFalse&&(s=a.length,n=!1);e.memory||(n=!1),t=!1,r&&(a=n?[]:"")},u={add:function(){return a&&(n&&!t&&(s=a.length-1,o.push(n)),function t(n){me.each(n,function(n,i){me.isFunction(i)?e.unique&&u.has(i)||a.push(i):i&&i.length&&"string"!==me.type(i)&&t(i)})}(arguments),n&&!t&&l()),this},remove:function(){return me.each(arguments,function(e,t){for(var n;(n=me.inArray(t,a,n))>-1;)a.splice(n,1),n<=s&&s--}),this},has:function(e){return e?me.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return r=o=[],a=n="",this},disabled:function(){return!a},lock:function(){return r=o=[],n||t||(a=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},me.extend({Deferred:function(e){var t=[["notify","progress",me.Callbacks("memory"),me.Callbacks("memory"),2],["resolve","done",me.Callbacks("once memory"),me.Callbacks("once memory"),0,"resolved"],["reject","fail",me.Callbacks("once memory"),me.Callbacks("once memory"),1,"rejected"]],r="pending",a={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var e=arguments;return me.Deferred(function(n){me.each(t,function(t,i){var r=me.isFunction(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&me.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,r,a){function o(e,t,r,a){return function(){var l=this,u=arguments,d=function i(){var d,i;if(!(e<s)){if(d=r.apply(l,u),d===t.promise())throw new TypeError("Thenable self-resolution");i=d&&("object"==("undefined"==typeof d?"undefined":n(d))||"function"==typeof d)&&d.then,me.isFunction(i)?a?i.call(d,o(s,t,f,a),o(s,t,h,a)):(s++,i.call(d,o(s,t,f,a),o(s,t,h,a),o(s,t,f,t.notifyWith))):(r!==f&&(l=void 0,u=[d]),(a||t.resolveWith)(l,u))}},c=a?d:function(){try{d()}catch(n){me.Deferred.exceptionHook&&me.Deferred.exceptionHook(n,c.stackTrace),e+1>=s&&(r!==h&&(l=void 0,u=[n]),t.rejectWith(l,u))}};e?c():(me.Deferred.getStackHook&&(c.stackTrace=me.Deferred.getStackHook()),i.setTimeout(c))}}var s=0;return me.Deferred(function(n){t[0][3].add(o(0,n,me.isFunction(a)?a:f,n.notifyWith)),t[1][3].add(o(0,n,me.isFunction(e)?e:f)),t[2][3].add(o(0,n,me.isFunction(r)?r:h))}).promise()},promise:function(e){return null!=e?me.extend(e,a):a}},o={};return me.each(t,function(e,n){var i=n[2],s=n[5];a[n[1]]=i.add,s&&i.add(function(){r=s},t[3-e][2].disable,t[0][2].lock),i.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=i.fireWith}),a.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=oe.call(arguments),a=me.Deferred(),o=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?oe.call(arguments):n,--t||a.resolveWith(i,r)}};if(t<=1&&(p(e,a.done(o(n)).resolve,a.reject),"pending"===a.state()||me.isFunction(r[n]&&r[n].then)))return a.then();for(;n--;)p(r[n],o(n),a.reject);return a.promise()}});var Ne=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;me.Deferred.exceptionHook=function(e,t){i.console&&i.console.warn&&e&&Ne.test(e.name)&&i.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},me.readyException=function(e){i.setTimeout(function(){throw e})};var Me=me.Deferred();me.fn.ready=function(e){return Me.then(e).catch(function(e){me.readyException(e)}),this},me.extend({isReady:!1,readyWait:1,holdReady:function(e){e?me.readyWait++:me.ready(!0)},ready:function(e){(e===!0?--me.readyWait:me.isReady)||(me.isReady=!0,e!==!0&&--me.readyWait>0||Me.resolveWith(re,[me]))}}),me.ready.then=Me.then,"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll?i.setTimeout(me.ready):(re.addEventListener("DOMContentLoaded",_),i.addEventListener("load",_));var xe=function e(t,n,i,r,a,o,s){var l=0,u=t.length,d=null==i;if("object"===me.type(i)){a=!0;for(l in i)e(t,n,l,i[l],!0,o,s)}else if(void 0!==r&&(a=!0,me.isFunction(r)||(s=!0),d&&(s?(n.call(t,r),n=null):(d=n,n=function(e,t,n){return d.call(me(e),n)})),n))for(;l<u;l++)n(t[l],i,s?r:r.call(t[l],l,n(t[l],i)));return a?t:d?n.call(t):u?n(t[0],i):o},Ue=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};g.uid=1,g.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Ue(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[me.camelCase(t)]=n;else for(i in t)r[me.camelCase(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][me.camelCase(t)];
},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){me.isArray(t)?t=t.map(me.camelCase):(t=me.camelCase(t),t=t in i?[t]:t.match(Le)||[]),n=t.length;for(;n--;)delete i[t[n]]}(void 0===t||me.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!me.isEmptyObject(t)}};var He=new g,Be=new g,Fe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,je=/[A-Z]/g;me.extend({hasData:function(e){return Be.hasData(e)||He.hasData(e)},data:function(e,t,n){return Be.access(e,t,n)},removeData:function(e,t){Be.remove(e,t)},_data:function(e,t,n){return He.access(e,t,n)},_removeData:function(e,t){He.remove(e,t)}}),me.fn.extend({data:function(e,t){var i,r,a,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(a=Be.get(o),1===o.nodeType&&!He.get(o,"hasDataAttrs"))){for(i=s.length;i--;)s[i]&&(r=s[i].name,0===r.indexOf("data-")&&(r=me.camelCase(r.slice(5)),m(o,r,a[r])));He.set(o,"hasDataAttrs",!0)}return a}return"object"==("undefined"==typeof e?"undefined":n(e))?this.each(function(){Be.set(this,e)}):xe(this,function(t){var n;if(o&&void 0===t){if(n=Be.get(o,e),void 0!==n)return n;if(n=m(o,e),void 0!==n)return n}else this.each(function(){Be.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Be.remove(this,e)})}}),me.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=He.get(e,t),n&&(!i||me.isArray(n)?i=He.access(e,t,me.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=me.queue(e,t),i=n.length,r=n.shift(),a=me._queueHooks(e,t),o=function(){me.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete a.stop,r.call(e,o,a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return He.get(e,n)||He.access(e,n,{empty:me.Callbacks("once memory").add(function(){He.remove(e,[t+"queue",n])})})}}),me.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?me.queue(this[0],e):void 0===t?this:this.each(function(){var n=me.queue(this,e,t);me._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&me.dequeue(this,e)})},dequeue:function(e){return this.each(function(){me.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=me.Deferred(),a=this,o=this.length,s=function(){--i||r.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)n=He.get(a[o],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var Ge=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ve=new RegExp("^(?:([+-])=|)("+Ge+")([a-z%]*)$","i"),qe=["Top","Right","Bottom","Left"],We=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&me.contains(e.ownerDocument,e)&&"none"===me.css(e,"display")},Ye=function(e,t,n,i){var r,a,o={};for(a in t)o[a]=e.style[a],e.style[a]=t[a];r=n.apply(e,i||[]);for(a in t)e.style[a]=o[a];return r},Je={};me.fn.extend({show:function(){return E(this,!0)},hide:function(){return E(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){We(this)?me(this).show():me(this).hide()})}});var Qe=/^(?:checkbox|radio)$/i,Ke=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ze=/^$|\/(?:java|ecma)script/i,Xe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ze=/<|&#?\w+;/;!function(){var e=re.createDocumentFragment(),t=e.appendChild(re.createElement("div")),n=re.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),_e.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",_e.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var $e=re.documentElement,et=/^key/,tt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,nt=/^([^.]*)(?:\.(.+)|)/;me.event={global:{},add:function(e,t,n,i,r){var a,o,s,l,u,d,c,f,h,p,_,g=He.get(e);if(g)for(n.handler&&(a=n,n=a.handler,r=a.selector),r&&me.find.matchesSelector($e,r),n.guid||(n.guid=me.guid++),(l=g.events)||(l=g.events={}),(o=g.handle)||(o=g.handle=function(t){return"undefined"!=typeof me&&me.event.triggered!==t.type?me.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Le)||[""],u=t.length;u--;)s=nt.exec(t[u])||[],h=_=s[1],p=(s[2]||"").split(".").sort(),h&&(c=me.event.special[h]||{},h=(r?c.delegateType:c.bindType)||h,c=me.event.special[h]||{},d=me.extend({type:h,origType:_,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&me.expr.match.needsContext.test(r),namespace:p.join(".")},a),(f=l[h])||(f=l[h]=[],f.delegateCount=0,c.setup&&c.setup.call(e,i,p,o)!==!1||e.addEventListener&&e.addEventListener(h,o)),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,d):f.push(d),me.event.global[h]=!0)},remove:function(e,t,n,i,r){var a,o,s,l,u,d,c,f,h,p,_,g=He.hasData(e)&&He.get(e);if(g&&(l=g.events)){for(t=(t||"").match(Le)||[""],u=t.length;u--;)if(s=nt.exec(t[u])||[],h=_=s[1],p=(s[2]||"").split(".").sort(),h){for(c=me.event.special[h]||{},h=(i?c.delegateType:c.bindType)||h,f=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=f.length;a--;)d=f[a],!r&&_!==d.origType||n&&n.guid!==d.guid||s&&!s.test(d.namespace)||i&&i!==d.selector&&("**"!==i||!d.selector)||(f.splice(a,1),d.selector&&f.delegateCount--,c.remove&&c.remove.call(e,d));o&&!f.length&&(c.teardown&&c.teardown.call(e,p,g.handle)!==!1||me.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)me.event.remove(e,h+t[u],n,i,!0);me.isEmptyObject(l)&&He.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,a,o,s=me.event.fix(e),l=new Array(arguments.length),u=(He.get(this,"events")||{})[s.type]||[],d=me.event.special[s.type]||{};for(l[0]=s,t=1;t<arguments.length;t++)l[t]=arguments[t];if(s.delegateTarget=this,!d.preDispatch||d.preDispatch.call(this,s)!==!1){for(o=me.event.handlers.call(this,s,u),t=0;(r=o[t++])&&!s.isPropagationStopped();)for(s.currentTarget=r.elem,n=0;(a=r.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(a.namespace)||(s.handleObj=a,s.data=a.data,i=((me.event.special[a.origType]||{}).handle||a.handler).apply(r.elem,l),void 0!==i&&(s.result=i)===!1&&(s.preventDefault(),s.stopPropagation()));return d.postDispatch&&d.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,i,r,a,o=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(i=[],n=0;n<s;n++)a=t[n],r=a.selector+" ",void 0===i[r]&&(i[r]=a.needsContext?me(r,this).index(l)>-1:me.find(r,this,null,[l]).length),i[r]&&i.push(a);i.length&&o.push({elem:l,handlers:i})}return s<t.length&&o.push({elem:this,handlers:t.slice(s)}),o},addProp:function(e,t){Object.defineProperty(me.Event.prototype,e,{enumerable:!0,configurable:!0,get:me.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[me.expando]?e:new me.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==w()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===w()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&me.nodeName(this,"input"))return this.click(),!1},_default:function(e){return me.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},me.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},me.Event=function(e,t){return this instanceof me.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?R:b,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&me.extend(this,t),this.timeStamp=e&&e.timeStamp||me.now(),void(this[me.expando]=!0)):new me.Event(e,t)},me.Event.prototype={constructor:me.Event,isDefaultPrevented:b,isPropagationStopped:b,isImmediatePropagationStopped:b,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=R,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=R,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=R,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},me.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&et.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&tt.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},me.event.addProp),me.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){me.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,a=e.handleObj;return r&&(r===i||me.contains(i,r))||(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),me.fn.extend({on:function(e,t,n,i){return A(this,e,t,n,i)},one:function(e,t,n,i){return A(this,e,t,n,i,1)},off:function(e,t,i){var r,a;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,me(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==("undefined"==typeof e?"undefined":n(e))){for(a in e)this.off(a,t,e[a]);return this}return t!==!1&&"function"!=typeof t||(i=t,t=void 0),i===!1&&(i=b),this.each(function(){me.event.remove(this,e,i,t)})}});var it=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,rt=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,ot=/^true\/(.*)/,st=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;me.extend({htmlPrefilter:function(e){return e.replace(it,"<$1></$2>")},clone:function(e,t,n){var i,r,a,o,s=e.cloneNode(!0),l=me.contains(e.ownerDocument,e);if(!(_e.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||me.isXMLDoc(e)))for(o=S(s),a=S(e),i=0,r=a.length;i<r;i++)k(a[i],o[i]);if(t)if(n)for(a=a||S(e),o=o||S(s),i=0,r=a.length;i<r;i++)D(a[i],o[i]);else D(e,s);return o=S(s,"script"),o.length>0&&T(o,!l&&S(e,"script")),s},cleanData:function(e){for(var t,n,i,r=me.event.special,a=0;void 0!==(n=e[a]);a++)if(Ue(n)){if(t=n[He.expando]){if(t.events)for(i in t.events)r[i]?me.event.remove(n,i):me.removeEvent(n,i,t.handle);n[He.expando]=void 0}n[Be.expando]&&(n[Be.expando]=void 0)}}}),me.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return xe(this,function(e){return void 0===e?me.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return L(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=I(this,e);t.appendChild(e)}})},prepend:function(){return L(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=I(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return L(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return L(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(me.cleanData(S(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return me.clone(this,e,t)})},html:function(e){return xe(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!rt.test(e)&&!Xe[(Ke.exec(e)||["",""])[1].toLowerCase()]){e=me.htmlPrefilter(e);try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(me.cleanData(S(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return L(this,arguments,function(t){var n=this.parentNode;me.inArray(this,e)<0&&(me.cleanData(S(this)),n&&n.replaceChild(t,this))},e)}}),me.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){me.fn[e]=function(e){for(var n,i=[],r=me(e),a=r.length-1,o=0;o<=a;o++)n=o===a?this:this.clone(!0),me(r[o])[t](n),le.apply(i,n.get());return this.pushStack(i)}});var lt=/^margin/,ut=new RegExp("^("+Ge+")(?!px)[a-z%]+$","i"),dt=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=i),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",$e.appendChild(o);var e=i.getComputedStyle(s);t="1%"!==e.top,a="2px"===e.marginLeft,n="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,$e.removeChild(o),s=null}}var t,n,r,a,o=re.createElement("div"),s=re.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",_e.clearCloneStyle="content-box"===s.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(s),me.extend(_e,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),a}}))}();var ct=/^(none|table(?!-c[ea]).+)/,ft={position:"absolute",visibility:"hidden",display:"block"},ht={letterSpacing:"0",fontWeight:"400"},pt=["Webkit","Moz","ms"],_t=re.createElement("div").style;me.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=M(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,i,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,o,s,l=me.camelCase(t),u=e.style;return t=me.cssProps[l]||(me.cssProps[l]=U(l)||l),s=me.cssHooks[t]||me.cssHooks[l],void 0===i?s&&"get"in s&&void 0!==(a=s.get(e,!1,r))?a:u[t]:(o="undefined"==typeof i?"undefined":n(i),"string"===o&&(a=Ve.exec(i))&&a[1]&&(i=v(e,t,a),o="number"),void(null!=i&&i===i&&("number"===o&&(i+=a&&a[3]||(me.cssNumber[l]?"":"px")),_e.clearCloneStyle||""!==i||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(i=s.set(e,i,r))||(u[t]=i))))}},css:function(e,t,n,i){var r,a,o,s=me.camelCase(t);return t=me.cssProps[s]||(me.cssProps[s]=U(s)||s),o=me.cssHooks[t]||me.cssHooks[s],o&&"get"in o&&(r=o.get(e,!0,n)),void 0===r&&(r=M(e,t,i)),"normal"===r&&t in ht&&(r=ht[t]),""===n||n?(a=parseFloat(r),n===!0||isFinite(a)?a||0:r):r}}),me.each(["height","width"],function(e,t){me.cssHooks[t]={get:function(e,n,i){if(n)return!ct.test(me.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?F(e,t,i):Ye(e,ft,function(){return F(e,t,i)})},set:function(e,n,i){var r,a=i&&dt(e),o=i&&B(e,t,i,"border-box"===me.css(e,"boxSizing",!1,a),a);return o&&(r=Ve.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=me.css(e,t)),H(e,n,o)}}}),me.cssHooks.marginLeft=x(_e.reliableMarginLeft,function(e,t){if(t)return(parseFloat(M(e,"marginLeft"))||e.getBoundingClientRect().left-Ye(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),me.each({margin:"",padding:"",border:"Width"},function(e,t){me.cssHooks[e+t]={expand:function(n){for(var i=0,r={},a="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+qe[i]+t]=a[i]||a[i-2]||a[0];return r}},lt.test(e)||(me.cssHooks[e+t].set=H)}),me.fn.extend({css:function(e,t){return xe(this,function(e,t,n){var i,r,a={},o=0;if(me.isArray(t)){for(i=dt(e),r=t.length;o<r;o++)a[t[o]]=me.css(e,t[o],!1,i);return a}return void 0!==n?me.style(e,t,n):me.css(e,t)},e,t,arguments.length>1)}}),me.Tween=j,j.prototype={constructor:j,init:function(e,t,n,i,r,a){this.elem=e,this.prop=n,this.easing=r||me.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=a||(me.cssNumber[n]?"":"px")},cur:function(){var e=j.propHooks[this.prop];return e&&e.get?e.get(this):j.propHooks._default.get(this)},run:function(e){var t,n=j.propHooks[this.prop];return this.options.duration?this.pos=t=me.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):j.propHooks._default.set(this),this}},j.prototype.init.prototype=j.prototype,j.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=me.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){me.fx.step[e.prop]?me.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[me.cssProps[e.prop]]&&!me.cssHooks[e.prop]?e.elem[e.prop]=e.now:me.style(e.elem,e.prop,e.now+e.unit)}}},j.propHooks.scrollTop=j.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},me.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},me.fx=j.prototype.init,me.fx.step={};var gt,mt,vt=/^(?:toggle|show|hide)$/,yt=/queueHooks$/;me.Animation=me.extend(Q,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return v(n.elem,e,Ve.exec(t),n),n}]},tweener:function(e,t){me.isFunction(e)?(t=e,e=["*"]):e=e.match(Le);for(var n,i=0,r=e.length;i<r;i++)n=e[i],Q.tweeners[n]=Q.tweeners[n]||[],Q.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?Q.prefilters.unshift(e):Q.prefilters.push(e)}}),me.speed=function(e,t,i){var r=e&&"object"==("undefined"==typeof e?"undefined":n(e))?me.extend({},e):{complete:i||!i&&t||me.isFunction(e)&&e,duration:e,easing:i&&t||t&&!me.isFunction(t)&&t};return me.fx.off||re.hidden?r.duration=0:r.duration="number"==typeof r.duration?r.duration:r.duration in me.fx.speeds?me.fx.speeds[r.duration]:me.fx.speeds._default,null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){me.isFunction(r.old)&&r.old.call(this),r.queue&&me.dequeue(this,r.queue)},r},me.fn.extend({fadeTo:function(e,t,n,i){return this.filter(We).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=me.isEmptyObject(e),a=me.speed(t,n,i),o=function(){var t=Q(this,me.extend({},e),a);(r||He.get(this,"finish"))&&t.stop(!0)};return o.finish=o,r||a.queue===!1?this.each(o):this.queue(a.queue,o)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",a=me.timers,o=He.get(this);if(r)o[r]&&o[r].stop&&i(o[r]);else for(r in o)o[r]&&o[r].stop&&yt.test(r)&&i(o[r]);for(r=a.length;r--;)a[r].elem!==this||null!=e&&a[r].queue!==e||(a[r].anim.stop(n),t=!1,a.splice(r,1));!t&&n||me.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=He.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],a=me.timers,o=i?i.length:0;for(n.finish=!0,me.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<o;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),me.each(["toggle","show","hide"],function(e,t){var n=me.fn[t];me.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(q(t,!0),e,i,r)}}),me.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){me.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),me.timers=[],me.fx.tick=function(){var e,t=0,n=me.timers;for(gt=me.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||me.fx.stop(),gt=void 0},me.fx.timer=function(e){me.timers.push(e),e()?me.fx.start():me.timers.pop()},me.fx.interval=13,me.fx.start=function(){mt||(mt=i.requestAnimationFrame?i.requestAnimationFrame(G):i.setInterval(me.fx.tick,me.fx.interval))},me.fx.stop=function(){i.cancelAnimationFrame?i.cancelAnimationFrame(mt):i.clearInterval(mt),mt=null},me.fx.speeds={slow:600,fast:200,_default:400},me.fn.delay=function(e,t){return e=me.fx?me.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=i.setTimeout(t,e);n.stop=function(){i.clearTimeout(r)}})},function(){var e=re.createElement("input"),t=re.createElement("select"),n=t.appendChild(re.createElement("option"));e.type="checkbox",_e.checkOn=""!==e.value,_e.optSelected=n.selected,e=re.createElement("input"),e.value="t",e.type="radio",_e.radioValue="t"===e.value}();var Et,St=me.expr.attrHandle;me.fn.extend({attr:function(e,t){return xe(this,me.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){me.removeAttr(this,e)})}}),me.extend({attr:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return"undefined"==typeof e.getAttribute?me.prop(e,t,n):(1===a&&me.isXMLDoc(e)||(r=me.attrHooks[t.toLowerCase()]||(me.expr.match.bool.test(t)?Et:void 0)),void 0!==n?null===n?void me.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=me.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!_e.radioValue&&"radio"===t&&me.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(Le);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),Et={set:function(e,t,n){return t===!1?me.removeAttr(e,n):e.setAttribute(n,n),n}},me.each(me.expr.match.bool.source.match(/\w+/g),function(e,t){var n=St[t]||me.find.attr;St[t]=function(e,t,i){var r,a,o=t.toLowerCase();return i||(a=St[o],St[o]=r,r=null!=n(e,t,i)?o:null,St[o]=a),r}});var Tt=/^(?:input|select|textarea|button)$/i,Ct=/^(?:a|area)$/i;me.fn.extend({prop:function(e,t){return xe(this,me.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[me.propFix[e]||e]})}}),me.extend({prop:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&me.isXMLDoc(e)||(t=me.propFix[t]||t,r=me.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=me.find.attr(e,"tabindex");return t?parseInt(t,10):Tt.test(e.nodeName)||Ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_e.optSelected||(me.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),me.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){me.propFix[this.toLowerCase()]=this});var Rt=/[\t\r\n\f]/g;me.fn.extend({addClass:function(e){var t,n,i,r,a,o,s,l=0;if(me.isFunction(e))return this.each(function(t){me(this).addClass(e.call(this,t,K(this)))});if("string"==typeof e&&e)for(t=e.match(Le)||[];n=this[l++];)if(r=K(n),i=1===n.nodeType&&(" "+r+" ").replace(Rt," ")){for(o=0;a=t[o++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");s=me.trim(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,a,o,s,l=0;if(me.isFunction(e))return this.each(function(t){me(this).removeClass(e.call(this,t,K(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Le)||[];n=this[l++];)if(r=K(n),i=1===n.nodeType&&(" "+r+" ").replace(Rt," ")){for(o=0;a=t[o++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");s=me.trim(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var i="undefined"==typeof e?"undefined":n(e);return"boolean"==typeof t&&"string"===i?t?this.addClass(e):this.removeClass(e):me.isFunction(e)?this.each(function(n){me(this).toggleClass(e.call(this,n,K(this),t),t)}):this.each(function(){var t,n,r,a;if("string"===i)for(n=0,r=me(this),a=e.match(Le)||[];t=a[n++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==i||(t=K(this),t&&He.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":He.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+K(n)+" ").replace(Rt," ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g,wt=/[\x20\t\r\n\f]+/g;me.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=me.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,me(this).val()):e,null==r?r="":"number"==typeof r?r+="":me.isArray(r)&&(r=me.map(r,function(e){return null==e?"":e+""})),t=me.valHooks[this.type]||me.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=me.valHooks[r.type]||me.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(bt,""):null==n?"":n)):void 0}}),me.extend({valHooks:{option:{get:function(e){var t=me.find.attr(e,"value");return null!=t?t:me.trim(me.text(e)).replace(wt," ")}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,a="select-one"===e.type,o=a?null:[],s=a?r+1:i.length,l=r<0?s:a?r:0;l<s;l++)if(n=i[l],(n.selected||l===r)&&!n.disabled&&(!n.parentNode.disabled||!me.nodeName(n.parentNode,"optgroup"))){if(t=me(n).val(),a)return t;o.push(t)}return o},set:function(e,t){for(var n,i,r=e.options,a=me.makeArray(t),o=r.length;o--;)i=r[o],(i.selected=me.inArray(me.valHooks.option.get(i),a)>-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),me.each(["radio","checkbox"],function(){me.valHooks[this]={set:function(e,t){if(me.isArray(t))return e.checked=me.inArray(me(e).val(),t)>-1}},_e.checkOn||(me.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var At=/^(?:focusinfocus|focusoutblur)$/;me.extend(me.event,{trigger:function(e,t,r,a){var o,s,l,u,d,c,f,h=[r||re],p=fe.call(e,"type")?e.type:e,_=fe.call(e,"namespace")?e.namespace.split("."):[];if(s=l=r=r||re,3!==r.nodeType&&8!==r.nodeType&&!At.test(p+me.event.triggered)&&(p.indexOf(".")>-1&&(_=p.split("."),p=_.shift(),_.sort()),d=p.indexOf(":")<0&&"on"+p,e=e[me.expando]?e:new me.Event(p,"object"==("undefined"==typeof e?"undefined":n(e))&&e),e.isTrigger=a?2:3,e.namespace=_.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:me.makeArray(t,[e]),f=me.event.special[p]||{},a||!f.trigger||f.trigger.apply(r,t)!==!1)){if(!a&&!f.noBubble&&!me.isWindow(r)){for(u=f.delegateType||p,At.test(u+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),l=s;l===(r.ownerDocument||re)&&h.push(l.defaultView||l.parentWindow||i)}for(o=0;(s=h[o++])&&!e.isPropagationStopped();)e.type=o>1?u:f.bindType||p,c=(He.get(s,"events")||{})[e.type]&&He.get(s,"handle"),c&&c.apply(s,t),c=d&&s[d],c&&c.apply&&Ue(s)&&(e.result=c.apply(s,t),e.result===!1&&e.preventDefault());return e.type=p,a||e.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),t)!==!1||!Ue(r)||d&&me.isFunction(r[p])&&!me.isWindow(r)&&(l=r[d],l&&(r[d]=null),me.event.triggered=p,r[p](),me.event.triggered=void 0,l&&(r[d]=l)),e.result}},simulate:function(e,t,n){var i=me.extend(new me.Event,n,{type:e,isSimulated:!0});me.event.trigger(i,null,t)}}),me.fn.extend({trigger:function(e,t){return this.each(function(){me.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return me.event.trigger(e,t,n,!0)}}),me.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){me.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),me.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),_e.focusin="onfocusin"in i,_e.focusin||me.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){me.event.simulate(t,e.target,me.event.fix(e))};me.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=He.access(i,t);r||i.addEventListener(e,n,!0),He.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=He.access(i,t)-1;r?He.access(i,t,r):(i.removeEventListener(e,n,!0),He.remove(i,t))}}});var It=i.location,Pt=me.now(),Ot=/\?/;me.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||me.error("Invalid XML: "+e),t};var Dt=/\[\]$/,kt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;me.param=function(e,t){var n,i=[],r=function(e,t){var n=me.isFunction(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(me.isArray(e)||e.jquery&&!me.isPlainObject(e))me.each(e,function(){r(this.name,this.value)});else for(n in e)z(n,e[n],t,r);return i.join("&")},me.fn.extend({serialize:function(){return me.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=me.prop(this,"elements");return e?me.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!me(this).is(":disabled")&&Nt.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Qe.test(e))}).map(function(e,t){var n=me(this).val();return null==n?null:me.isArray(n)?me.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Mt=/%20/g,xt=/#.*$/,Ut=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ft=/^(?:GET|HEAD)$/,jt=/^\/\//,Gt={},Vt={},qt="*/".concat("*"),Wt=re.createElement("a");Wt.href=It.href,me.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:It.href,type:"GET",isLocal:Bt.test(It.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":me.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$($(e,me.ajaxSettings),t):$(me.ajaxSettings,e)},ajaxPrefilter:X(Gt),ajaxTransport:X(Vt),ajax:function(e,t){function r(e,t,n,r){var l,d,h,p,S,T=t;c||(c=!0,u&&i.clearTimeout(u),a=void 0,s=r||"",R.readyState=e>0?4:0,l=e>=200&&e<300||304===e,n&&(p=ee(_,R,n)),p=te(_,p,R,l),l?(_.ifModified&&(S=R.getResponseHeader("Last-Modified"),S&&(me.lastModified[o]=S),S=R.getResponseHeader("etag"),
S&&(me.etag[o]=S)),204===e||"HEAD"===_.type?T="nocontent":304===e?T="notmodified":(T=p.state,d=p.data,h=p.error,l=!h)):(h=T,!e&&T||(T="error",e<0&&(e=0))),R.status=e,R.statusText=(t||T)+"",l?v.resolveWith(g,[d,T,R]):v.rejectWith(g,[R,T,h]),R.statusCode(E),E=void 0,f&&m.trigger(l?"ajaxSuccess":"ajaxError",[R,_,l?d:h]),y.fireWith(g,[R,T]),f&&(m.trigger("ajaxComplete",[R,_]),--me.active||me.event.trigger("ajaxStop")))}"object"==("undefined"==typeof e?"undefined":n(e))&&(t=e,e=void 0),t=t||{};var a,o,s,l,u,d,c,f,h,p,_=me.ajaxSetup({},t),g=_.context||_,m=_.context&&(g.nodeType||g.jquery)?me(g):me.event,v=me.Deferred(),y=me.Callbacks("once memory"),E=_.statusCode||{},S={},T={},C="canceled",R={readyState:0,getResponseHeader:function(e){var t;if(c){if(!l)for(l={};t=Ht.exec(s);)l[t[1].toLowerCase()]=t[2];t=l[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,S[e]=t),this},overrideMimeType:function(e){return null==c&&(_.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)R.always(e[R.status]);else for(t in e)E[t]=[E[t],e[t]];return this},abort:function(e){var t=e||C;return a&&a.abort(t),r(0,t),this}};if(v.promise(R),_.url=((e||_.url||It.href)+"").replace(jt,It.protocol+"//"),_.type=t.method||t.type||_.method||_.type,_.dataTypes=(_.dataType||"*").toLowerCase().match(Le)||[""],null==_.crossDomain){d=re.createElement("a");try{d.href=_.url,d.href=d.href,_.crossDomain=Wt.protocol+"//"+Wt.host!=d.protocol+"//"+d.host}catch(e){_.crossDomain=!0}}if(_.data&&_.processData&&"string"!=typeof _.data&&(_.data=me.param(_.data,_.traditional)),Z(Gt,_,t,R),c)return R;f=me.event&&_.global,f&&0===me.active++&&me.event.trigger("ajaxStart"),_.type=_.type.toUpperCase(),_.hasContent=!Ft.test(_.type),o=_.url.replace(xt,""),_.hasContent?_.data&&_.processData&&0===(_.contentType||"").indexOf("application/x-www-form-urlencoded")&&(_.data=_.data.replace(Mt,"+")):(p=_.url.slice(o.length),_.data&&(o+=(Ot.test(o)?"&":"?")+_.data,delete _.data),_.cache===!1&&(o=o.replace(Ut,""),p=(Ot.test(o)?"&":"?")+"_="+Pt++ +p),_.url=o+p),_.ifModified&&(me.lastModified[o]&&R.setRequestHeader("If-Modified-Since",me.lastModified[o]),me.etag[o]&&R.setRequestHeader("If-None-Match",me.etag[o])),(_.data&&_.hasContent&&_.contentType!==!1||t.contentType)&&R.setRequestHeader("Content-Type",_.contentType),R.setRequestHeader("Accept",_.dataTypes[0]&&_.accepts[_.dataTypes[0]]?_.accepts[_.dataTypes[0]]+("*"!==_.dataTypes[0]?", "+qt+"; q=0.01":""):_.accepts["*"]);for(h in _.headers)R.setRequestHeader(h,_.headers[h]);if(_.beforeSend&&(_.beforeSend.call(g,R,_)===!1||c))return R.abort();if(C="abort",y.add(_.complete),R.done(_.success),R.fail(_.error),a=Z(Vt,_,t,R)){if(R.readyState=1,f&&m.trigger("ajaxSend",[R,_]),c)return R;_.async&&_.timeout>0&&(u=i.setTimeout(function(){R.abort("timeout")},_.timeout));try{c=!1,a.send(S,r)}catch(e){if(c)throw e;r(-1,e)}}else r(-1,"No Transport");return R},getJSON:function(e,t,n){return me.get(e,t,n,"json")},getScript:function(e,t){return me.get(e,void 0,t,"script")}}),me.each(["get","post"],function(e,t){me[t]=function(e,n,i,r){return me.isFunction(n)&&(r=r||i,i=n,n=void 0),me.ajax(me.extend({url:e,type:t,dataType:r,data:n,success:i},me.isPlainObject(e)&&e))}}),me._evalUrl=function(e){return me.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},me.fn.extend({wrapAll:function(e){var t;return this[0]&&(me.isFunction(e)&&(e=e.call(this[0])),t=me(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return me.isFunction(e)?this.each(function(t){me(this).wrapInner(e.call(this,t))}):this.each(function(){var t=me(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=me.isFunction(e);return this.each(function(n){me(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){me(this).replaceWith(this.childNodes)}),this}}),me.expr.pseudos.hidden=function(e){return!me.expr.pseudos.visible(e)},me.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},me.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Jt=me.ajaxSettings.xhr();_e.cors=!!Jt&&"withCredentials"in Jt,_e.ajax=Jt=!!Jt,me.ajaxTransport(function(e){var t,n;if(_e.cors||Jt&&!e.crossDomain)return{send:function(r,a){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)s.setRequestHeader(o,r[o]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a(Yt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&i.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),me.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),me.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return me.globalEval(e),e}}}),me.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),me.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=me("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),re.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Qt=[],Kt=/(=)\?(?=&|$)|\?\?/;me.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Qt.pop()||me.expando+"_"+Pt++;return this[e]=!0,e}}),me.ajaxPrefilter("json jsonp",function(e,t,n){var r,a,o,s=e.jsonp!==!1&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=me.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Kt,"$1"+r):e.jsonp!==!1&&(e.url+=(Ot.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||me.error(r+" was not called"),o[0]},e.dataTypes[0]="json",a=i[r],i[r]=function(){o=arguments},n.always(function(){void 0===a?me(i).removeProp(r):i[r]=a,e[r]&&(e.jsonpCallback=t.jsonpCallback,Qt.push(r)),o&&me.isFunction(a)&&a(o[0]),o=a=void 0}),"script"}),_e.createHTMLDocument=function(){var e=re.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),me.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,r,a;return t||(_e.createHTMLDocument?(t=re.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=re.location.href,t.head.appendChild(i)):t=re),r=we.exec(e),a=!n&&[],r?[t.createElement(r[1])]:(r=C([e],t,a),a&&a.length&&me(a).remove(),me.merge([],r.childNodes))},me.fn.load=function(e,t,i){var r,a,o,s=this,l=e.indexOf(" ");return l>-1&&(r=me.trim(e.slice(l)),e=e.slice(0,l)),me.isFunction(t)?(i=t,t=void 0):t&&"object"==("undefined"==typeof t?"undefined":n(t))&&(a="POST"),s.length>0&&me.ajax({url:e,type:a||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?me("<div>").append(me.parseHTML(e)).find(r):e)}).always(i&&function(e,t){s.each(function(){i.apply(this,o||[e.responseText,t,e])})}),this},me.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){me.fn[t]=function(e){return this.on(t,e)}}),me.expr.pseudos.animated=function(e){return me.grep(me.timers,function(t){return e===t.elem}).length},me.offset={setOffset:function(e,t,n){var i,r,a,o,s,l,u,d=me.css(e,"position"),c=me(e),f={};"static"===d&&(e.style.position="relative"),s=c.offset(),a=me.css(e,"top"),l=me.css(e,"left"),u=("absolute"===d||"fixed"===d)&&(a+l).indexOf("auto")>-1,u?(i=c.position(),o=i.top,r=i.left):(o=parseFloat(a)||0,r=parseFloat(l)||0),me.isFunction(t)&&(t=t.call(e,n,me.extend({},s))),null!=t.top&&(f.top=t.top-s.top+o),null!=t.left&&(f.left=t.left-s.left+r),"using"in t?t.using.call(e,f):c.css(f)}},me.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){me.offset.setOffset(this,e,t)});var t,n,i,r,a=this[0];return a?a.getClientRects().length?(i=a.getBoundingClientRect(),i.width||i.height?(r=a.ownerDocument,n=ne(r),t=r.documentElement,{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===me.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),me.nodeName(e[0],"html")||(i=e.offset()),i={top:i.top+me.css(e[0],"borderTopWidth",!0),left:i.left+me.css(e[0],"borderLeftWidth",!0)}),{top:t.top-i.top-me.css(n,"marginTop",!0),left:t.left-i.left-me.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===me.css(e,"position");)e=e.offsetParent;return e||$e})}}),me.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;me.fn[e]=function(i){return xe(this,function(e,i,r){var a=ne(e);return void 0===r?a?a[t]:e[i]:void(a?a.scrollTo(n?a.pageXOffset:r,n?r:a.pageYOffset):e[i]=r)},e,i,arguments.length)}}),me.each(["top","left"],function(e,t){me.cssHooks[t]=x(_e.pixelPosition,function(e,n){if(n)return n=M(e,t),ut.test(n)?me(e).position()[t]+"px":n})}),me.each({Height:"height",Width:"width"},function(e,t){me.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){me.fn[i]=function(r,a){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||a===!0?"margin":"border");return xe(this,function(t,n,r){var a;return me.isWindow(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===r?me.css(t,n,s):me.style(t,n,r,s)},t,o?r:void 0,o)}})}),me.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,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),me.parseJSON=JSON.parse,r=[],a=function(){return me}.apply(t,r),!(void 0!==a&&(e.exports=a));var zt=i.jQuery,Xt=i.$;return me.noConflict=function(e){return i.$===me&&(i.$=Xt),e&&i.jQuery===me&&(i.jQuery=zt),me},o||(i.jQuery=i.$=me),me})},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e)}return i(e,null,[{key:"unPackData",value:function(e){this.setUserInfo(e),this.setDeviceInfo(e),this.setSystemInfo(e)}},{key:"setDeviceInfo",value:function(e){var t=this.getDefaultDeviceInfo();e&&(t.cameras=e.cameras||[],t.microphones=e.microphones||[],t.curCamera=e.curCamera||"",t.curMicrophone=e.curMicrophone||"",t.micNoise=parseInt(e.micNoise)||0,t.micGain=parseInt(e.micGain)||0,t.autoGain=Boolean(e.autoGain)||!1,t.speakerVolume=parseInt(e.speakerVolume)||0,t.micCode=parseInt(e.micCode)||0,t.videoQuality=parseInt(e.videoQuality)||0,t.curVideoQuality=parseInt(e.curVideoQuality)||0,t.fps=parseInt(e.fps)||15,t.gop=parseInt(e.gop)||3),this.deviceInfo=t}},{key:"getDeviceInfo",value:function(e){return this.deviceInfo}},{key:"getDefaultDeviceInfo",value:function(){var e={};return e.cameras=[],e.microphones=[],e.curCamera="",e.curMicrophone="",e.micNoise=50,e.micGain=50,e.autoGain=!1,e.speakerVolume=50,e.micCode=0,e.videoQuality=0,e.curVideoQuality=0,e.fps=15,e.gop=3,e}},{key:"setUserInfo",value:function(e){var t=this.getDefaultUserInfo();e&&(t.nodeId=e.nodeId||0,t.userId=e.userId||"0",t.userName=e.name||"normal",t.userRole=e.userRole||"normal",t.userIp=e.userIp||"",t.classId=e.classId||0,t.msList=e.msList||[],t.ipPort=e.ipPort||{},t.msIpPort=e.msIpPort||"",t.country=e.country||"",t.province=e.province||"",t.city=e.city||"",t.isp=e.isp||""),this.userInfo=t}},{key:"getUserInfo",value:function(e){return this.userInfo}},{key:"getDefaultUserInfo",value:function(){var e={};return e.nodeId=0,e.userId="0",e.userName="normal",e.userRole="normal",e.userIp="",e.classId=0,e.msList=[],e.ipPort="",e.country="",e.province="",e.city="",e.isp="",e}},{key:"setSystemInfo",value:function(e){var t=this.getDefaultSystemInfo();e&&(t.deviceType=e.deviceType||"",t.versionDate=e.versionDate||"",t.sdkVersion=e.sdkVersion||"",t.os=e.os||"",t.explorer=e.explorer||"",t.explorerVersion=e.explorerVersion||"",t.language=e.language||"",t.systemVersion=e.systemVersion||"",t.avHardwareDisable=e.avHardwareDisable||"",t.manufacturer=e.manufacturer||"",t.localFileReadDisable=e.localFileReadDisable||"",t.maxLevelIDC=e.maxLevelIDC||"",t.screenResolution=e.screenResolution||""),this.systemInfo=t}},{key:"getSystemInfo",value:function(){return this.systemInfo}},{key:"getDefaultSystemInfo",value:function(){var e={};return e.deviceType="",e.versionDate="",e.version="",e.os="",e.explorer="",e.manufacturer="",e.playerType="",e.systemVersion="",e.avHardwareDisable="",e.isDebugger="",e.localFileReadDisable="",e.maxLevelIDC="",e.screenResolution="",e}},{key:"assign",value:function(e,t,n){var i={};return e&&(i.cameras=e.cameras||[],i.microphones=e.microphones||[],i.curCamera=e.curCamera||"",i.curMicrophone=e.curMicrophone||"",i.micGain=parseInt(e.micGain)||0,i.micNoise=parseInt(e.micNoise)||0,i.autoGain=Boolean(e.autoGain)||!1,i.speakerVolume=parseInt(e.speakerVolume)||0,i.micCode=parseInt(e.micCode)||0,i.videoQuality=parseInt(e.videoQuality)||0,i.curVideoQuality=parseInt(e.curVideoQuality)||0,i.fps=parseInt(e.fps)||15,i.gop=parseInt(e.gop)||3),t&&(i.nodeId=t.nodeId||0,i.userId=t.userId||"0",i.userName=t.userName||"normal",i.userRole=t.userRole||"normal",i.userIp=t.userIp||"",i.classId=t.classId||0,i.msList=t.msList||[],i.ipPort=t.ipPort||{},i.msIpPort=t.msIpPort||"",i.country=t.country||"",i.province=t.province||"",i.city=t.city||"",i.isp=t.isp||""),n&&(i.deviceType=n.deviceType||0,i.versionDate=n.versionDate||"",i.sdkVersion=n.sdkVersion||"",i.os=n.os||"",i.explorer=n.explorer||"",i.explorerVersion=n.explorerVersion||"",i.language=n.language||"",i.systemVersion=n.systemVersion||"",i.avHardwareDisable=n.avHardwareDisable||"",i.manufacturer=n.manufacturer||"",i.localFileReadDisable=n.localFileReadDisable||"",i.maxLevelIDC=n.maxLevelIDC||"",i.screenResolution=n.screenResolution||""),i}}]),e}();r.prototype.TYPE_0=r.TYPE_0=0,r.prototype.TYPE_1=r.TYPE_1=1,r.prototype.TYPE_2=r.TYPE_2=2,r.prototype.TYPE_3=r.TYPE_3=3,r.prototype.TYPE_5=r.TYPE_5=5,r.prototype.TYPE_9=r.TYPE_9=9,r.prototype.TYPE_10=r.TYPE_10=10,r.prototype.TYPE_11=r.TYPE_11=11,r.prototype.TYPE_12=r.TYPE_12=12,r.prototype.TYPE_13=r.TYPE_13=13,r.prototype.TYPE_14=r.TYPE_14=14,r.prototype.TYPE_15=r.TYPE_15=15,r.prototype.TYPE_16=r.TYPE_16=16,r.prototype.TYPE_17=r.TYPE_17=17,r.prototype.TYPE_18=r.TYPE_18=18,r.prototype.TYPE_20=r.TYPE_20=20,r.prototype.TYPE_21=r.TYPE_21=21,r.prototype.TYPE_22=r.TYPE_22=22,r.prototype.TYPE_24=r.TYPE_24=24,r.prototype.TYPE_25=r.TYPE_25=25,r.prototype.TYPE_30=r.TYPE_30=30,r.prototype.TYPE_40=r.TYPE_40=40,r.prototype.TYPE_41=r.TYPE_41=41,r.prototype.TYPE_42=r.TYPE_42=42,r.prototype.TYPE_50=r.TYPE_50=50,r.prototype.TYPE_51=r.TYPE_51=51,r.prototype.TYPE_52=r.TYPE_52=52,r.prototype.TYPE_60=r.TYPE_60=60,r.prototype.TYPE_61=r.TYPE_61=61,r.prototype.TYPE_62=r.TYPE_62=62,r.prototype.CHANGE_CAMERA=r.CHANGE_CAMERA="changeCamera",r.prototype.CHANGE_MICROPHONE=r.CHANGE_MICROPHONE="changeMicrophone",r.prototype.CHANGE_RESOLUTION=r.CHANGE_RESOLUTION="changeResolution",r.prototype.CHANGE_SPEAKER_VOLUME=r.CHANGE_SPEAKER_VOLUME="changeSpeakerVolume",r.prototype.CHANGE_MICROPHONE_GAIN=r.CHANGE_MICROPHONE_GAIN="changeMicrophoneGain",r.prototype.CHANGE_MICROPHONE_CODE=r.CHANGE_MICROPHONE_CODE="changeMicrophoneCode",r.prototype.CHANGE_MICROPHONE_NOISE=r.CHANGE_MICROPHONE_NOISE="changeMicrophoneNoise",r.prototype.CHANGE_MICROPHONE_AUTO_GAIN=r.CHANGE_MICROPHONE_AUTO_GAIN="changeMicrophoneAutoGain",r.prototype.CHANGE_MS_LIST=r.CHANGE_MS_LIST="changeMsList",r.prototype.CHANGE_CLASS_MODEL=r.CHANGE_CLASS_MODEL="changeClassModel",r.prototype.CHANGE_CAMERA_TEST=r.CHANGE_CAMERA_TEST="changeCameraTest",r.prototype.CHANGE_MICROPHONE_TEST=r.CHANGE_MICROPHONE_TEST="changeMicrophoneTest",r.prototype.CHANGE_MS_DETECTION=r.CHANGE_MS_DETECTION="changeMsDetection",r.prototype.CHANGE_SETING_CLOSE=r.CHANGE_SETING_CLOSE="changeSetingClose",r.prototype.CHANGE_SPEAKER_SCENE=r.CHANGE_SPEAKER_SCENE="changeSpeakerScene",r.prototype.CHANGE_SPEAKER_TEST=r.CHANGE_SPEAKER_TEST="changeSpeakerTest",r.prototype.CHANGE_SPEAKER_TEST_STOP=r.CHANGE_SPEAKER_TEST_STOP="changeSpeakerTestStop",r.userInfo={},r.deviceInfo={},r.systemInfo={},r.resolution={0:"160*120",1:"320*240",2:"640*480",3:"1280*720",4:"1920*1080",5:"1920*1080"},r.localConfig={};var a=r;t.default=a,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"ConfigSeting","D:/work/JsSeting/src/ConfigSeting.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/JsSeting/src/ConfigSeting.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(3),d=r(u),c=i(1),f=r(c),h=i(2),p=r(h),_=i(9),g=r(_),m=i(8),v=r(m),y=i(7),E=r(y),S=i(6),T=r(S),C=i(4),R=r(C),b=i(19),w=r(b),A=i(18),I=r(A);i(20);var P=p.default.getLoger("H5Seting"),O="v1.31.5.201708015",D=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return P.log("H5Seting:"+O),e.language="",e.zIndex=2100,e.isSelf=!0,e.actionType="",e.deviceInfo={},e.systemInfo={},e.userInfo={},e.setingUiBox=null,e.callback=null,e._localConfig(),e._headerUI=null,e._leftUI=null,e._containerUI=null,e.init=e._init.bind(e),e.showSeting=e._showSeting.bind(e),e.hideSeting=e._hideSeting.bind(e),e.updateTestMusicSourece=e._updateTestMusicSourece.bind(e),e.updateCameraImage=e._updateCameraImage.bind(e),e.updateMicrophoneActivityLevel=e._updateMicrophoneActivityLevel.bind(e),e.updateSpeakerTestActivityLevel=e._updateSpeakerTestActivityLevel.bind(e),e.updateMsDetection=e._updateMsDetection.bind(e),e.showSecurityPanelSeting=e._showSecurityPanelSeting.bind(e),e.updateData=e._updateData.bind(e),e.setUIStyle=e._setUIStyle.bind(e),e.setLanguage=e._setLanguage.bind(e),e._hideSeting(),e}return s(t,e),l(t,[{key:"_init",value:function(e,t,n){this.setingUiBox=e,this.zIndex=t,this.callback=n||function(){},null==this.setingUiBox&&(this.setingUiBox=Object.create("div"),this.setingUiBox.id="setingUiBox",document.body.appendChild(this.setingUiBox)),this.setingUiBox.innerHTML=T.default.SETING_UI,this._creatUI(),this._hideSeting(),this._setUIStyle(I.default)}},{key:"_setLanguage",value:function(e){console.warn("设置指定语言->",e),this.language=e||"",this._localConfig(),this._leftUI&&this._leftUI.localLanguage(),this._headerUI&&this._headerUI.localLanguage(),this._containerUI&&this._containerUI.localLanguage()}},{key:"_showSeting",value:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.isSelf=Boolean(n),this.actionType="",console.log("showSeting",e),R.default.unPackData(e),this.deviceInfo=R.default.deviceInfo,this.userInfo=R.default.userInfo,this.systemInfo=R.default.systemInfo,t.paramData=R.default.assign(this.deviceInfo,this.userInfo,this.systemInfo),this.setingUiBox&&(this.setingUiBox.style.display="block"),this._headerUI&&this._headerUI.showTitle(this.userInfo),this._leftUI&&this._leftUI.showBtn(this.isSelf),this._containerUI){var i=R.default.assign(this.deviceInfo,this.userInfo,this.systemInfo);this._containerUI.setData(i)}this._hideSecurityPanelSeting()}},{key:"_hideSeting",value:function(){this.setingUiBox&&(this.setingUiBox.style.display="none")}},{key:"_updateData",value:function(e){if(0==e.result)switch(e.type){case R.default.TYPE_16:console.warn("设置面板点击了测试MS速度->",e.data);break;case R.default.TYPE_17:console.warn("设置面板测试MS速度完成返回->",e.data);break;case R.default.TYPE_20:console.warn("摄像头麦克风权限没有开启->"),this.showSecurityPanelSeting();break;case R.default.TYPE_24:console.warn("摄像头获取失败->");break;case R.default.TYPE_25:console.warn("麦克风获取失败->");break;case R.default.TYPE_21:console.warn("返回音量检测->",e.data);break;case R.default.TYPE_42:this._updateCameraImage(e.msg);break;case R.default.TYPE_52:this._updateMicrophoneActivityLevel(e.msg);break;case R.default.TYPE_62:this._updateSpeakerTestActivityLevel(e.msg);break;default:console.log("default->",e.type)}else console.warn("设置面板收到更新数据-error->")}},{key:"_showSecurityPanelSeting",value:function(){P.warn("显示flash权限设置提示"),(0,d.default)("#setingErrorInfo_title").html(R.default.localConfig.CameraMicPrivacy),(0,d.default)("#setingErrorInfo_content").html(R.default.localConfig.allowOperationPrompt),(0,d.default)("#setingErrorBox").show()}},{key:"_hideSecurityPanelSeting",value:function(){(0,d.default)("#setingErrorBox").hide()}},{key:"_updateCameraImage",value:function(e){this._containerUI&&this._containerUI.updateCameraImage(e)}},{key:"_updateMicrophoneActivityLevel",value:function(e){this._containerUI&&this._containerUI.updateMicrophoneActivityLevel(e)}},{key:"_updateSpeakerTestActivityLevel",value:function(e){this._containerUI&&this._containerUI.updateSpeakerTestActivityLevel(e)}},{key:"_updateMsDetection",value:function(e){this._containerUI&&this._containerUI.updateMsDetection(e)}},{key:"_updateTestMusicSourece",value:function(e){this._containerUI&&this._containerUI.updateTestMusicSource(e)}},{key:"_localConfig",value:function(){var e=navigator.language||navigator.browserLanguage;e=e.toLocaleLowerCase(),P.log("language:",e),e="en-us"==e||"en-gb"==e?"en-us":"zh-cn",P.log("language-use:",e),this.language?(P.warn("使用指定的语言:"+this.language),R.default.localConfig=w.default[this.language]):R.default.localConfig=w.default[e],R.default.localConfig||(R.default.localConfig=w.default["zh-cn"])}},{key:"_setUIStyle",value:function(e){this.setHeaderStyle(e.header),this.setLeftStyle(e.left),this.setRightStyle(e.right)}},{key:"setHeaderStyle",value:function(e){}},{key:"setLeftStyle",value:function(e){(0,d.default)(".seting_left").css({background:e.background}),(0,d.default)(".setingBg").css({background:e.leftBtn.background,"border-left-color":e.leftBtn.borderLeftColor}),(0,d.default)(".setingText").css({color:e.leftBtn.color})}},{key:"setRightStyle",value:function(e){(0,d.default)(".setingContent").css({background:e.loudspeakerClass.background}),(0,d.default)(".setingInfoBox").css({background:e.loudspeakerClass.loudspeakerInfo.loudspeakerTit.background,border:e.loudspeakerClass.loudspeakerInfo.borderColor,color:e.loudspeakerClass.loudspeakerInfo.loudspeakerTit.color}),(0,d.default)(".setingInfoTit").css({background:e.loudspeakerClass.loudspeakerInfo.loudspeakerTit.background,color:e.loudspeakerClass.loudspeakerInfo.loudspeakerTit.color}),(0,d.default)(".media_hint_tit").css({background:e.loudspeakerClass.loudspeakerInfo.loudspeakerTit.background,color:e.loudspeakerClass.loudspeakerInfo.loudspeakerTit.color}),(0,d.default)(".setingInfo_border").css({border:e.loudspeakerClass.hintInfo.borderColor}),(0,d.default)(".media_hint").css({border:e.loudspeakerClass.hintInfo.borderColor,"border-top":e.loudspeakerClass.hintInfo.borderTopColor}),(0,d.default)(".soundSpeaker_device ").css({color:e.loudspeakerClass.loudspeakerInfo.color}),(0,d.default)(".soundSpeakerTest").css({background:e.loudspeakerClass.playOn.background,color:e.loudspeakerClass.playOn.color,"border-radius":e.loudspeakerClass.playOn.borderRadius,height:"35px","line-height":"35px"}),(0,d.default)(".soundSpeakerTestProgressBg").css({background:e.loudspeakerClass.hudsInfo.ProgressBg.background}),(0,d.default)(".soundSpeakerTestProgress").css({background:e.loudspeakerClass.hudsInfo.Progress.background}),(0,d.default)(".speakerProgressBg li").css({background:e.loudspeakerClass.hudsInfo.shadeList.background,width:e.loudspeakerClass.hudsInfo.shadeList.width,"margin-left":e.loudspeakerClass.hudsInfo.shadeList.marginLeft}),(0,d.default)("#MediaSettingMicBoxSpeakerSuccess").css({color:e.microphoneClass.reminder.color}),(0,d.default)(".media_facility").css({color:e.Classified.dropDown.color,background:e.Classified.dropDown.background,"border-color":e.Classified.dropDown.borderColor,"border-radius":e.Classified.dropDown.borderRadius}),(0,d.default)(".media_facility option").css({background:e.Classified.dropDown.childInfo.background})}},{key:"_creatUI",value:function(){this._headerUI=null,this._leftUI=null,this._containerUI=null,this._headerUI=new v.default,this._headerUI.on(v.default.EVENT_UPDATE,this._setingHeaderHandler.bind(this)),this._headerUI.addEvent(),this._leftUI=new g.default,this._leftUI.on(g.default.EVENT_UPDATE,this._setingLeftHandler.bind(this)),this._leftUI.addEvent(),this._containerUI=new E.default,this._containerUI.on(E.default.EVENT_UPDATE,this._setinContainerHandler.bind(this)),this._containerUI.addEvent()}},{key:"_setingHeaderHandler",value:function(e){P.log("监听头部事件消息->关闭",e),this.actionType=R.default.CHANGE_SETING_CLOSE,this.sendData(),this._hideSecurityPanelSeting(),this._hideSeting()}},{key:"_setingLeftHandler",value:function(e){switch(P.log("监听左侧栏的模块切换->",e),this._containerUI.hideContainer(),e.currentScene){case g.default.SCENE_SPEAKER:this._containerUI.showSoundSpeaker(),this._updateSpeakerTestActivityLevel(0),this.actionType=R.default.CHANGE_SPEAKER_SCENE,this.sendData();break;case g.default.SCENE_CAMERA:this.isSelf?(this._containerUI.showCamera(),this.actionType=R.default.CHANGE_CAMERA_TEST,this.sendData()):this._containerUI.showOtherCamera();break;case g.default.SCENE_MICROPHONE:this.isSelf?(this._containerUI.showMicrophone(),this._updateMicrophoneActivityLevel(0),this.actionType=R.default.CHANGE_MICROPHONE_TEST,this.sendData()):this._containerUI.showOtherMicrophone();break;case g.default.SCENE_SYSTEM:this._containerUI.showSystemInfo();break;case g.default.SCENE_NETWORK:this._containerUI.showNetWork();break;case g.default.SCENE_CLASSINFO:this._containerUI.showClassInfo()}}},{key:"_setinContainerHandler",value:function(e){if(P.log("监听各个模块的数据变更->",e),e){switch(this.actionType=e.actionType||"",t.paramData.actionType=this.actionType,this.actionType){case R.default.CHANGE_CAMERA:R.default.deviceInfo.curCamera=e.curCamera,t.paramData.curCamera=R.default.deviceInfo.curCamera;break;case R.default.CHANGE_RESOLUTION:R.default.deviceInfo.curVideoQuality=e.curVideoQuality,t.paramData.curVideoQuality=R.default.deviceInfo.curVideoQuality;break;case R.default.CHANGE_MICROPHONE:R.default.deviceInfo.curMicrophone=e.curMicrophone,t.paramData.curMicrophone=R.default.deviceInfo.curMicrophone;break;case R.default.CHANGE_MICROPHONE_CODE:R.default.deviceInfo.micCode=parseInt(e.micCode),t.paramData.micCode=R.default.deviceInfo.micCode;break;case R.default.CHANGE_MICROPHONE_GAIN:R.default.deviceInfo.micGain=parseInt(e.micGain),t.paramData.micGain=R.default.deviceInfo.micGain;break;case R.default.CHANGE_MICROPHONE_AUTO_GAIN:R.default.deviceInfo.autoGain=Boolean(e.autoGain)||!1,t.paramData.autoGain=R.default.deviceInfo.autoGain;break;case R.default.CHANGE_MICROPHONE_NOISE:R.default.deviceInfo.micNoise=parseInt(e.micNoise),t.paramData.micNoise=R.default.deviceInfo.micNoise;break;case R.default.CHANGE_SPEAKER_VOLUME:R.default.deviceInfo.speakerVolume=parseInt(e.speakerVolume),t.paramData.speakerVolume=R.default.deviceInfo.speakerVolume;break;case R.default.CHANGE_SPEAKER_TEST:break;case R.default.CHANGE_MS_DETECTION:R.default.userInfo.ipPort=e.ipPort||{},t.paramData.ipPort=R.default.userInfo.ipPort;break;case R.default.CHANGE_MS_LIST:R.default.userInfo.ipPort=e.ipPort||{},t.paramData.ipPort=R.default.userInfo.ipPort}this.sendData()}}},{key:"sendData",value:function(){this.callback({isSelf:this.isSelf,actionType:this.actionType,deviceInfo:R.default.getDeviceInfo(),userInfo:R.default.getUserInfo(),systemInfo:R.default.getSystemInfo(),paramData:t.paramData})}}]),t}(f.default);D.prototype.TYPE_0=D.TYPE_0=0,D.prototype.TYPE_1=D.TYPE_1=1,D.prototype.TYPE_2=D.TYPE_2=2,D.prototype.TYPE_3=D.TYPE_3=3,D.prototype.TYPE_5=D.TYPE_5=5,D.prototype.TYPE_9=D.TYPE_9=9,D.prototype.TYPE_10=D.TYPE_10=10,D.prototype.TYPE_11=D.TYPE_11=11,D.prototype.TYPE_12=D.TYPE_12=12,D.prototype.TYPE_13=D.TYPE_13=13,D.prototype.TYPE_14=D.TYPE_14=14,D.prototype.TYPE_15=D.TYPE_15=15,D.prototype.TYPE_16=D.TYPE_16=16,D.prototype.TYPE_17=D.TYPE_17=17,D.prototype.TYPE_18=D.TYPE_18=18,D.prototype.TYPE_20=D.TYPE_20=20,D.prototype.TYPE_21=D.TYPE_21=21,D.prototype.TYPE_22=D.TYPE_22=22,D.prototype.TYPE_24=D.TYPE_24=24,D.prototype.TYPE_25=D.TYPE_25=25,D.prototype.TYPE_30=D.TYPE_30=30,D.prototype.TYPE_40=D.TYPE_40=40,D.prototype.TYPE_41=D.TYPE_41=41,D.prototype.TYPE_42=D.TYPE_42=42,D.prototype.TYPE_50=D.TYPE_50=50,D.prototype.TYPE_51=D.TYPE_51=51,D.prototype.TYPE_52=D.TYPE_52=52,D.prototype.TYPE_60=D.TYPE_60=60,D.prototype.TYPE_61=D.TYPE_61=61,D.prototype.TYPE_62=D.TYPE_62=62,D.prototype.CHANGE_CAMERA=D.CHANGE_CAMERA="changeCamera",D.prototype.CHANGE_MICROPHONE=D.CHANGE_MICROPHONE="changeMicrophone",D.prototype.CHANGE_RESOLUTION=D.CHANGE_RESOLUTION="changeResolution",D.prototype.CHANGE_SPEAKER_VOLUME=D.CHANGE_SPEAKER_VOLUME="changeSpeakerVolume",D.prototype.CHANGE_MICROPHONE_GAIN=D.CHANGE_MICROPHONE_GAIN="changeMicrophoneGain",D.prototype.CHANGE_MICROPHONE_CODE=D.CHANGE_MICROPHONE_CODE="changeMicrophoneCode",D.prototype.CHANGE_MICROPHONE_NOISE=D.CHANGE_MICROPHONE_NOISE="changeMicrophoneNoise",D.prototype.CHANGE_MICROPHONE_AUTO_GAIN=D.CHANGE_MICROPHONE_AUTO_GAIN="changeMicrophoneAutoGain",D.prototype.CHANGE_MS_LIST=D.CHANGE_MS_LIST="changeMsList",D.prototype.CHANGE_CLASS_MODEL=D.CHANGE_CLASS_MODEL="changeClassModel",D.prototype.CHANGE_CAMERA_TEST=D.CHANGE_CAMERA_TEST="changeCameraTest",D.prototype.CHANGE_MICROPHONE_TEST=D.CHANGE_MICROPHONE_TEST="changeMicrophoneTest",D.prototype.CHANGE_MS_DETECTION=D.CHANGE_MS_DETECTION="changeMsDetection",D.prototype.CHANGE_SETING_CLOSE=D.CHANGE_SETING_CLOSE="changeSetingClose",D.prototype.CHANGE_SPEAKER_SCENE=D.CHANGE_SPEAKER_SCENE="changeSpeakerScene",D.prototype.CHANGE_SPEAKER_TEST=D.CHANGE_SPEAKER_TEST="changeSpeakerTest",D.prototype.CHANGE_SPEAKER_TEST_STOP=D.CHANGE_SPEAKER_TEST_STOP="changeSpeakerTestStop",
D.prototype.LANGUAGE_EN=D.LANGUAGE_EN="en-us",D.prototype.LANGUAGE_ZH=D.LANGUAGE_ZH="zh-cn",D.paramData={},e.exports=new D,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(P,"loger","D:/work/JsSeting/src/H5Seting.js"),__REACT_HOT_LOADER__.register(O,"version","D:/work/JsSeting/src/H5Seting.js"),__REACT_HOT_LOADER__.register(D,"SDK","D:/work/JsSeting/src/H5Seting.js"))}()},function(e,t){function n(){}Object.defineProperty(t,"__esModule",{value:!0}),n.SETING_UI='<div id="setingBox">\n    <div id="seting_mask" class="seting_mask"></div>\n    <div id="setingBox_info" class="setingBox_info">\n        <div class="setingHeadline" id="setingHeadlineBg">\n            <div class="setingHeadlineTitle" id="setingHeadlineTitle">设置</div>\n            <div id="seting_close" class="seting_close"></div>\n        </div>\n        <div id="setingContent" class="setingContent">\n\n            <div id="seting_left" class="seting_left">\n                <div id="seting_systemInfo" class="setingInfoBtn">\n                    <p class="setingBg" id="seting_systemInfo_bg"></p>\n                    <p class="setingText seting_systemInfo_text" id="seting_systemInfo_text">系统信息</p>\n                </div>\n                <div id="seting_soundspeaker" class="setingInfoBtn">\n                    <p class="setingBg" id="seting_soundspeaker_bg"></p>\n                    <p class="setingText seting_soundspeaker_text" id="seting_soundspeaker_text">扬声器</p>\n                </div>\n                <div id="seting_microphone" class="setingInfoBtn">\n                    <p class="setingBg" id="seting_microphone_bg"></p>\n                    <p class="setingText seting_microphone_text" id="seting_microphone_text">麦克风</p>\n                </div>\n                <div id="seting_camera" class="setingInfoBtn">\n                    <p class="setingBg" id="seting_camera_bg"></p>\n                    <p class="setingText seting_camera_text" id="seting_camera_text">摄像头</p>\n                </div>\n                <div id="seting_network" class="setingInfoBtn">\n                    <p class="setingBg" id="seting_network_bg"></p>\n                    <p class="setingText seting_network_text" id="seting_network_text">网络设置</p>\n                </div>\n                <div id="seting_classInfo" class="setingInfoBtn">\n                    <p class="setingBg" id="seting_classInfo_bg"></p>\n                    <p class="setingText seting_classInfo_text" id="seting_classInfo_text">课堂模式</p>\n                </div>\n            </div>\n            <div id="seting_right" class="seting_right">\n                <div id="content_systemInfo" class="setingInfoBox">\n                    <span id="MediaSettingSystemInfo" class="setingInfoTit">系统信息</span>\n                    <div class="setingInfo_system setingInfo_border">\n                        <div id="systemInfo_oneself" class="systemInfo_oneself">\n                            <p>userName:xuesheng</p>\n                            <p>roomId: 1119004174</p>\n                            <p>nodeId: 579109571</p>\n                            <p>userIP: 218.241.236.34</p>\n                        </div>\n                        <div id="systemInfo_config" class="systemInfo_config">\n                            <p>versionDate: 2016-7-27 10:30:00</p>\n                            <p>version: 3.7.5</p>\n                            <p>os: Windows 7</p>\n                            <p>explorer: chrome56.0.2924.87 language: zh-CN</p>\n                            <p>manufacturer: Google Pepper</p>\n                            <p>playerType: PlugIn</p>\n                            <p>version: WIN 26,0,0,126</p>\n                            <p>avHardwareDisable: false</p>\n                            <p>isDebugger: false</p>\n                            <p>localFileReadDisable: false</p>\n                            <p>maxLevelIDC: 5.1 screenDPI: 72</p>\n                            <p>screenResolution X: 1600 Y: 900</p>\n                        </div>\n                    </div>\n                </div>\n                <div id="content_soundspeaker" class="setingInfoBox">\n                    <span id="MediaSettingSpeakerBoxDeviceTitle" class="setingInfoTit">扬声器设备</span>\n                    <div class="setingInfo_border">\n                        <div class="camera_list camera_list1 seting_clear">\n                            <span id="MediaSettingDeviceSelectLabel" class="hint_tit">选择设备:</span>\n                            <a id="MediaSettingSpeakerBoxDeviceSelectHelp" class="soundSpeaker_device" href="###">切换声音输出设备</a>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="mediaSettingSoundspeakerVolumeLabel" class="hint_tit">音量调节:</span>\n                            <div class="setingProgressBox">\n                                <input id="soundSpeakerProgressBtn" type="range" class="range" min="0" max="100"\n                                       step="1" value="50"/>\n                                <p id="soundSpeakerProgressVal" class="setingVolume">0%</p>\n                            </div>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="MediaSettingSpeakerPlaySoudHint" class="hint_tit2">请点击“播放测试音”按钮试听</span>\n                        </div>\n                        <div class="camera_list camera_list4 seting_clear">\n                            <div id="MediaSettingSpeakerPlaySoudButton" class="soundSpeakerTest">播放测试音</div>\n                            <div class="playSoundSpeaker">\n                                <div id="soundSpeakerTestProgressBg" class="soundSpeakerTestProgressBg"></div>\n                                <div id="soundSpeakerTestProgress" class="soundSpeakerTestProgress"></div>\n                                <ul class="speakerProgressBg">\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                </ul>\n                            </div>\n                        </div>\n                    </div>\n                    <div id="soundSpeaker_hint" class="media_hint">\n                        <span id="MediaSettingSpeakerBoxHelpTitle" class="media_hint_tit media_hint_tit1">如果你未听到声音,可能存在以下问题:</span>\n                        <p id="MediaSettingSpeakerBoxHelp1" class="media_hint_info media_hint_info1">1.扬声器没接好或耳机未插好</p>\n                        <p id="MediaSettingSpeakerBoxHelp2" class="media_hint_info">2.扬声器未打开或者音量调节过小</p>\n                        <p id="MediaSettingSpeakerBoxHelp3" class="media_hint_info media_hint_info2">\n                            3.声卡可能有问题,尝试重启电脑</p>\n                    </div>\n                </div>\n                <div id="content_microphone" class="setingInfoBox">\n                    <span id="MediaSettingMicBoxDeviceTitle" class="setingInfoTit">麦克风设备</span>\n                    <div class="setingInfo_border">\n                        <div class="camera_list camera_list1 seting_clear">\n                            <span id="MediaSettingMicSelectLabel" class="hint_tit">选择设备:</span>\n                            <select name="setingMicrophoneFacility" id="setingMicrophoneFacility"\n                                    class="media_facility">\n                                <option value="">Internal Microphone</option>\n                            </select>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="MediaSettingMicCodeSelectLabel" class="hint_tit">选择模式:</span>\n                            <select name="setingMicrophonePattern" id="setingMicrophonePattern" class="media_facility">\n                                <option value="">回音消除增强模式</option>\n                                <option value="">视频流畅增强模式</option>\n                            </select>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="MediaSettingDeviceVolumeLabel" class="hint_tit">音量调节:</span>\n                            <div class="setingProgressBox">\n                                <input id="microphoneProgressBtn" type="range" class="range" min="0" max="100" step="1"\n                                       value="50"/>\n                                <span id="microphoneProgressVal" class="setingVolume">0%</span>\n                            </div>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="MediaSettingDeviceMicNoiseLabel" class="hint_tit">噪音消除:</span>\n                            <div class="setingProgressBox">\n                                <input id="microphoneNoiseProgressBtn" type="range" class="range" min="0" max="100" step="1"\n                                       value="50"/>\n                                <span id="microphoneNoiseProgressVal" class="setingVolume">0%</span>\n                            </div>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <form action="" method="get">\n                                <span id="MediaSettingDeviceMicAutoGainTitle">自动调整音量:</span>\n                                <input name="autoGainSeting" id="autoGainSetingYes" type="radio" value="yes" /><label id="MediaSettingDeviceMicAutoGainYes">是 </label>\n                                <input name="autoGainSeting" id="autoGainSetingNo" type="radio" value="no" /><label id="MediaSettingDeviceMicAutoGainNo">否 </label>\n                            </form>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="MediaSettingMicBoxSpeakerOutHint" class="MediaSettingMicBoxSpeakerOutHint">请你对着麦克风讲话,以便开始检测</span>\n                            <div class="microphone_volume">\n                                <div id="microphoneProgressBg" class="soundSpeakerTestProgressBg"></div>\n                                <div id="microphoneProgress" class="soundSpeakerTestProgress"></div>\n                                <ul class="speakerProgressBg">\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                </ul>\n                            </div>\n                        </div>\n                        <div id="MediaSettingMicBoxSpeakerSuccess" class="camera_list">\n                            系统成功检测到声音输入,你可以正常语音\n                        </div>\n                    </div>\n                    <div id="microphone_hint" class="media_hint">\n                        <span id="MediaSettingMicBoxHelpTitle" class="media_hint_tit">听不到声音?</span>\n                        <p id="MediaSettingMicBoxHelp1" class="media_hint_info media_hint_info1">1.扬声器或耳机没接好</p>\n                        <p id="MediaSettingMicBoxHelp2" class="media_hint_info">2.麦克风未打开或音量调节过小</p>\n                        <p id="MediaSettingMicBoxHelp3" class="media_hint_info media_hint_info2">3.声卡可能有问题,尝试重启电脑</p>\n                    </div>\n                </div>\n                <div id="content_camera" class="setingInfoBox">\n                    <span id="MediaSettingCameraBoxDeviceTitle" class="setingInfoTit">摄像头</span>\n                    <div class="setingInfo_border">\n                        <div class="camera_list camera_list1 seting_clear">\n                            <span id="MediaSettingMediaSelectLabel" class="hint_tit hint_tit1">选择设备:</span>\n                            <select name="setingCameraFacility" id="setingCameraFacility" class="media_facility">\n                                <option value="">Internal Microphone</option>\n                            </select>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="MediaSettingCamResolutionLabel" class="hint_tit hint_tit1">选择分辨率:</span>\n                            <select name="setingCameraResolution" id="setingCameraResolution"\n                                    class="media_facility media_facility1">\n                                <option value="">160*120</option>\n                                <option value="">240*180</option>\n                            </select>\n                        </div>\n                        <div class="camera_list camera_list2 seting_clear">\n                            <span id="MediaSettingCameraBoxPreview" class="hint_tit hint_tit1">预览视频:</span>\n                            <div id="camera_video" class="camera_video">\n                                <img src="" alt="" id="camera_img" class="camera_img">\n                            </div>\n                        </div>\n                    </div>\n                    <div id="camera_hint" class="media_hint">\n                        <span id="MediaSettingCameraBoxHelpTitle" class="media_hint_tit">看不到视频?</span>\n                        <p id="MediaSettingCameraBoxHelp1" class="media_hint_info media_hint_info1">1.外置摄像头未接好</p>\n                        <p id="MediaSettingCameraBoxHelp2" class="media_hint_info">2.摄像头设备被其他软件占用</p>\n                        <p id="MediaSettingCameraBoxHelp3" class="media_hint_info media_hint_info2">\n                            3.摄像头驱动可能有问题,尝试重启电脑</p>\n                    </div>\n                </div>\n                <div id="content_network" class="setingInfoBox">\n                    <span id="MediaSettingNetWork" class="setingInfoTit">网络设置</span>\n                    <div class="setingInfo_border">\n                        <div class="camera_list camera_list1 seting_clear">\n                            <span id="netWorkUserName" class="hint_tit">用户名称:</span>\n                            <span id="setingInfoUserName" class="setingInfo_userName">xuesheng</span>\n                        </div>\n                        <div class="camera_list camera_list2 seting_clear">\n                            <span id="networkSelect" class="hint_tit">选择网络:</span>\n                            <select name="setingNetworkFacility" id="setingNetworkFacility" class="media_facility">\n                                <option value="">Internal Microphone</option>\n                            </select>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="userNetworkStatus" class="hint_tit">网络状态:</span>\n                            <div id="networkChecking" class="network_state">正在检测...</div>\n                        </div>\n                        <div class="setingAll_list3 seting_clear">\n                            <span id="userBWStatus" class="hint_tit">网络测速:</span>\n                            <div class="network_velocity">\n                                <span id="bandwidthInfo" class="network_info">bandwidth:0 Kbps</span>\n                                <span id="delayInfo" class="network_info">delay:501 ms</span>\n                                <span id="networkDetection" class="network_detection">检测</span>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div id="content_classInfo" class="setingInfoBox">\n                    <span id="mediaSettingClassModeButton" class="setingInfoTit">课堂模式</span>\n                    <div class="setingInfo_border">\n                        <div class="camera_list camera_list3 seting_clear">\n                            <span id="mediaSettingChatMode" class="hint_tit3">聊天模式</span>\n                            <select name="setingclassModel" id="setingclassModel" class="media_facility">\n                                <option value="">自由聊天模式</option>\n                                <option value="">自由聊天模式</option>\n                            </select>\n                        </div>\n                    </div>\n                    <div id="pattern_hint" class="media_hint">\n                        <span id="mediaSettingClassModeHelpTitle" class="media_hint_tit">提示</span>\n                        <p id="mediaSettingClassModeBoxHelp1" class="media_hint_info media_hint_info1">\n                            1.主讲人模式:普通与会者无法控制开启自己的麦克风</p>\n                        <p id="mediaSettingClassModeBoxHelp2" class="media_hint_info">2.自由模式:普通与会者无法看到其他人的聊天信息</p>\n                        <p id="mediaSettingClassModeBoxHelp3" class="media_hint_info">3.主讲人聊天模式:普通与会者无法看到其他人的聊天信息</p>\n                        <p id="mediaSettingClassModeBoxHelp4" class="media_hint_info media_hint_info2">\n                            4.自由聊天模式:普通与会者能看到其他人的公开聊天信息</p>\n                    </div>\n                </div>\n                <div id="contentOther_microphone" class="setingInfoBox">\n                    <span id="mediaSettingMicBoxDevice" class="setingInfoTit">麦克风设备</span>\n                    <div class="setingInfo_border">\n                        <div class="camera_list camera_list5 seting_clear">\n                            <span id="microphoneUserName" class="hint_tit hint_tit1">用户名称:</span>\n                            <span id="setingOtherMicrophoneName" class="setingInfo_userName">base</span>\n                        </div>\n                        <div class="camera_list camera_list6 seting_clear">\n                            <span id="MediaSettingOhterMicStatus" class="hint_tit1">麦克风的状态:</span>\n                            <span id="setingOtherMicrophoneState" class="setingInfo_userName">正常</span>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="MediaSettingCameraCodeSelectLabel"\n                                  class="hint_tit">选择模式&nbsp;&nbsp;&nbsp;&nbsp;</span>\n                            <select name="setingOtherPattern" id="setingOtherPattern" class="media_facility">\n                                <option value="">回音消除增强模式</option>\n                                <option value="">视频流畅增强模式</option>\n                            </select>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="mediaSettingCameraSelectLabel"\n                                  class="hint_tit">选择设备&nbsp;&nbsp;&nbsp;&nbsp;</span>\n                            <select name="setingOtherMicrophone" id="setingOtherMicrophone" class="media_facility">\n                                <option value="">Internal Microphone</option>\n                            </select>\n                        </div>\n                        <div class="camera_list camera_list6 seting_clear">\n                            <span id="mediaSettingCameraBoxDeviceVolume" class="hint_tit hint_tit1">麦克风音量:</span>\n                            <div class="setingProgressBox setingProgressBox1">\n                                <input id="otherMicrophoneProgressBtn" type="range" class="range range1" min="0"\n                                       max="100" step="1" value="50"/>\n                                <span id="otherMicrophoneProgressVal" class="setingVolume">0%</span>\n                            </div>\n                        </div>\n                        <div class="camera_list camera_list6 seting_clear">\n                            <span id="mediaSettingOhterSpeakerVolumeLabel" class="hint_tit hint_tit1">扬声器音量:</span>\n                            <div class="setingProgressBox setingProgressBox1">\n                                <input id="otherSoundSpeakerProgressBtn" type="range" class="range range1" min="0"\n                                       max="100" step="1" value="50"/>\n                                <span id="otherSoundSpeakerProgressVal" class="setingVolume">0%</span>\n                            </div>\n                        </div>\n                    </div>\n                    <div class="media_hint media_hint1">\n                        <span id="MediaSettingOtherMicBoxHelpTitle"\n                              class="media_hint_tit media_hint_tit2">听不到对方声音?</span>\n                        <p id="MediaSettingOhterMicBoxHelp1" class="media_hint_info media_hint_info3">1.对方的耳机没接好</p>\n                        <p id="MediaSettingOhterMicBoxHelp2" class="media_hint_info">2.对方的电脑不支持正在使用的耳机</p>\n                        <p id="MediaSettingOhterMicBoxHelp3" class="media_hint_info">3.对方的浏览器获取麦克风不正确,请换一个浏览器试试</p>\n                        <p id="MediaSettingOhterMicBoxHelp4" class="media_hint_info media_hint_info2">4.对方的浏览器可能被静音</p>\n                    </div>\n                </div>\n                <div id="contentOther_camera" class="setingInfoBox">\n                    <span id="vipkidOpenCamra" class="setingInfoTit">摄像头</span>\n                    <div class="setingInfo_border">\n                        <div class="camera_list camera_list1 seting_clear">\n                            <span id="cameraUserName" class="hint_tit">用户名称:</span>\n                            <span id="setingOtherCameraName" class="setingInfo_userName">base</span>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="mediaSettingOhterCamStatus">摄像头的状态:</span>\n                            <span id="MediaSettingOhterCamMicOK" class="setingInfo_userName">正常</span>\n                        </div>\n                        <div class="camera_list seting_clear">\n                            <span id="mediaSettingOtherSelectLabel" class="hint_tit">选择设备:</span>\n                            <select name="setingOtherCamera" id="setingOtherCamera" class="media_facility">\n                                <option value="">Internal Microphone</option>\n                            </select>\n                        </div>\n                        <div class="camera_list camera_list4 seting_clear">\n                            <span id="MediaSettingOtherCamResolutionLabel" class="hint_tit">选择分辨率:</span>\n                            <select name="setingOtherCameraResolution" id="setingOtherCameraResolution"\n                                    class="media_facility">\n                                <option value="">160*120</option>\n                                <option value="">240*180</option>\n                            </select>\n                        </div>\n                    </div>\n                    <div class="media_hint">\n                        <span id="MediaSettingOtherCameraBoxHelpTitle"\n                              class="media_hint_tit media_hint_tit2">看不到对方的视频?</span>\n                        <p id="MediaSettingOtherCameraBoxHelp1" class="media_hint_info media_hint_info1">\n                            1.对方的外置摄像头未接好</p>\n                        <p id="MediaSettingOtherCameraBoxHelp2" class="media_hint_info">2.对方的摄像头设备被其他软件占用</p>\n                        <p id="MediaSettingOtherCameraBoxHelp3" class="media_hint_info">3.对方的电脑不支持正在使用的摄像头</p>\n                        <p id="MediaSettingOtherCameraBoxHelp4" class="media_hint_info media_hint_info2">4.对方的网络不太好</p>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n    <div id="setingErrorBox" class="setingErrorBox">\n        <div id="setingErrorInfo" class="setingErrorInfo">\n            <p class="setingErrorInfo_title" id="setingErrorInfo_title">摄像头麦克风隐私权限</p>\n            <p class="setingErrorInfo_content" id="setingErrorInfo_content">\n                网络教室需要您的许可才能使用摄像头和麦克风,请选择"允许"或"allow",并勾选"记住"或"remember",否则将无法正常上课。</p>\n        </div>\n\n        <div id="setingErrorBoxImage" class="setingErrorBoxImage"></div>\n    </div>\n</div>\n';var i=n;t.default=i,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"SetingUI","D:/work/JsSeting/src/SetingUI.js"),__REACT_HOT_LOADER__.register(i,"default","D:/work/JsSeting/src/SetingUI.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(15),g=r(_),m=i(10),v=r(m),y=i(13),E=r(y),S=i(11),T=r(S),C=i(17),R=r(C),b=i(16),w=r(b),A=i(14),I=r(A),P=i(12),O=r(P),D=f.default.getLoger("SetingContainer"),k=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._mSoundSpeaker=null,e._mCamera=null,e._mMicrophone=null,e._mCameraOther=null,e._mMicrophoneOther=null,e._mSystemInfo=null,e._mNetwork=null,e._mClassInfo=null,e.init(),e}return s(t,e),l(t,[{key:"init",value:function(){var e=this;this._mSoundSpeaker=new g.default,this._mSoundSpeaker.on("*",function(t,n){return e._emit(t,n)}),this._mCamera=new v.default,this._mCamera.on("*",function(t,n){return e._emit(t,n)}),this._mMicrophone=new E.default,this._mMicrophone.on("*",function(t,n){return e._emit(t,n)}),this._mCameraOther=new T.default,this._mCameraOther.on("*",function(t,n){return e._emit(t,n)}),this._mMicrophoneOther=new R.default,this._mMicrophoneOther.on("*",function(t,n){return e._emit(t,n)}),this._mSystemInfo=new w.default,this._mSystemInfo.on("*",function(t,n){return e._emit(t,n)}),this._mNetwork=new I.default,this._mNetwork.on("*",function(t,n){return e._emit(t,n)}),this._mClassInfo=new O.default,this._mClassInfo.on("*",function(t,n){return e._emit(t,n)})}},{key:"addEvent",value:function(){this.hideContainer()}},{key:"localLanguage",value:function(){this._mSoundSpeaker.localLanguage(),this._mCamera.localLanguage(),this._mMicrophone.localLanguage(),this._mCameraOther.localLanguage(),this._mMicrophoneOther.localLanguage(),this._mSystemInfo.localLanguage(),this._mNetwork.localLanguage(),this._mClassInfo.localLanguage()}},{key:"setData",value:function(e){this._mSoundSpeaker.setData(e),this._mCamera.setData(e),this._mMicrophone.setData(e),this._mCameraOther.setData(e),this._mMicrophoneOther.setData(e),this._mSystemInfo.setData(e),this._mNetwork.setData(e),this._mClassInfo.setData(e)}},{key:"hideContainer",value:function(){(0,p.default)("#content_soundspeaker").hide(),(0,p.default)("#content_microphone").hide(),(0,p.default)("#content_camera").hide(),(0,p.default)("#content_systemInfo").hide(),(0,p.default)("#content_network").hide(),(0,p.default)("#content_classInfo").hide(),(0,p.default)("#contentOther_microphone").hide(),(0,p.default)("#contentOther_camera").hide()}},{key:"showSoundSpeaker",value:function(){this._mSoundSpeaker&&this._mSoundSpeaker.showPlayBtn(),(0,p.default)("#content_soundspeaker").show()}},{key:"showMicrophone",value:function(){(0,p.default)("#content_microphone").show()}},{key:"showCamera",value:function(){(0,p.default)("#content_camera").show()}},{key:"showSystemInfo",value:function(){(0,p.default)("#content_systemInfo").show()}},{key:"showNetWork",value:function(){(0,p.default)("#content_network").show()}},{key:"showClassInfo",value:function(){(0,p.default)("#content_classInfo").show()}},{key:"showOtherMicrophone",value:function(){(0,p.default)("#contentOther_microphone").show()}},{key:"showOtherCamera",value:function(){(0,p.default)("#contentOther_camera").show()}},{key:"updateCameraImage",value:function(e){this._mCamera&&this._mCamera._updateCameraImage(e)}},{key:"updateMicrophoneActivityLevel",value:function(e){this._mMicrophone&&this._mMicrophone._updateMicrophoneActivityLevel(e)}},{key:"updateSpeakerTestActivityLevel",value:function(e){this._mSoundSpeaker&&this._mSoundSpeaker._updateSpeakerTestActivityLevel(e)}},{key:"updateTestMusicSource",value:function(e){this._mSoundSpeaker&&this._mSoundSpeaker._updateTestMusicSource(e)}},{key:"updateMsDetection",value:function(e){this._mNetwork&&this._mNetwork._updateMsDetection(e)}}]),t}(d.default);k.prototype.EVENT_UPDATE=k.EVENT_UPDATE="event_update";var L=k;t.default=L,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(D,"loger","D:/work/JsSeting/src/component/SetingContainer.js"),__REACT_HOT_LOADER__.register(k,"SetingContainer","D:/work/JsSeting/src/component/SetingContainer.js"),__REACT_HOT_LOADER__.register(L,"default","D:/work/JsSeting/src/component/SetingContainer.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(4),g=r(_),m=f.default.getLoger("SetingHeader"),v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.localLanguage(),e}return s(t,e),l(t,[{key:"localLanguage",value:function(){(0,p.default)("#setingHeadlineTitle").html(g.default.localConfig.Settings)}},{key:"showTitle",value:function(e){e&&e.userName&&(0,p.default)("#setingHeadlineTitle").html(g.default.localConfig.Settings+"-"+e.userName)}},{key:"addEvent",value:function(){(0,p.default)("#seting_close").on("click",this._closeHandler.bind(this))}},{key:"_closeHandler",value:function(e){m.log(e.currentTarget.id),this._emit(t.EVENT_UPDATE)}}]),t}(d.default);v.prototype.EVENT_UPDATE=v.EVENT_UPDATE="event_update";
var y=v;t.default=y,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/JsSeting/src/component/SetingHeader.js"),__REACT_HOT_LOADER__.register(v,"SetingHeader","D:/work/JsSeting/src/component/SetingHeader.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/JsSeting/src/component/SetingHeader.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(4),g=r(_),m=f.default.getLoger("SetingLeft"),v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.isSelf=!0,e.localLanguage(),e}return s(t,e),l(t,[{key:"localLanguage",value:function(){(0,p.default)("#seting_systemInfo_text").html(g.default.localConfig.MediaSettingSystemInfo),(0,p.default)("#seting_soundspeaker_text").html(g.default.localConfig.MediaSettingSpeakerButton),(0,p.default)("#seting_microphone_text").html(g.default.localConfig.MediaSettingMicButton),(0,p.default)("#seting_camera_text").html(g.default.localConfig.MediaSettingCameraButton),(0,p.default)("#seting_network_text").html(g.default.localConfig.MediaSettingNetWork),(0,p.default)("#seting_classInfo_text").html(g.default.localConfig.MediaSettingClassMode)}},{key:"showBtn",value:function(e){this.isSelf=Boolean(e),this.hideAllBtn(),this.deActiveAllBtn(),this.isSelf?(t.currentScene=t.SCENE_SPEAKER,(0,p.default)("#seting_soundspeaker").show(),(0,p.default)("#seting_microphone").show(),(0,p.default)("#seting_camera").show()):(t.currentScene=t.SCENE_SYSTEM,(0,p.default)("#seting_systemInfo").show(),(0,p.default)("#seting_microphone").show(),(0,p.default)("#seting_camera").show(),(0,p.default)("#seting_network").show()),this.showSceneActive(t.currentScene)}},{key:"addEvent",value:function(){(0,p.default)("#seting_systemInfo").on("click",this._changeSceneBtnHandler.bind(this)),(0,p.default)("#seting_soundspeaker").on("click",this._changeSceneBtnHandler.bind(this)),(0,p.default)("#seting_microphone").on("click",this._changeSceneBtnHandler.bind(this)),(0,p.default)("#seting_camera").on("click",this._changeSceneBtnHandler.bind(this)),(0,p.default)("#seting_network").on("click",this._changeSceneBtnHandler.bind(this)),(0,p.default)("#seting_classInfo").on("click",this._changeSceneBtnHandler.bind(this)),this.deActiveAllBtn()}},{key:"_changeSceneBtnHandler",value:function(e){return t.currentScene==e.currentTarget.id?void m.log("模块已经显示->不需要切换"):(t.currentScene=e.currentTarget.id,this.deActiveAllBtn(),void this.showSceneActive(t.currentScene))}},{key:"showSceneActive",value:function(e){(0,p.default)("#"+e+"_bg").show(),this._emit(t.EVENT_UPDATE,{currentScene:t.currentScene})}},{key:"deActiveAllBtn",value:function(){(0,p.default)("#seting_systemInfo_bg").hide(),(0,p.default)("#seting_soundspeaker_bg").hide(),(0,p.default)("#seting_microphone_bg").hide(),(0,p.default)("#seting_camera_bg").hide(),(0,p.default)("#seting_network_bg").hide(),(0,p.default)("#seting_classInfo_bg").hide()}},{key:"hideAllBtn",value:function(){(0,p.default)("#seting_systemInfo").hide(),(0,p.default)("#seting_soundspeaker").hide(),(0,p.default)("#seting_microphone").hide(),(0,p.default)("#seting_camera").hide(),(0,p.default)("#seting_network").hide(),(0,p.default)("#seting_classInfo").hide()}}]),t}(d.default);v.prototype.SCENE_SPEAKER=v.SCENE_SPEAKER="seting_soundspeaker",v.prototype.SCENE_MICROPHONE=v.SCENE_MICROPHONE="seting_microphone",v.prototype.SCENE_CAMERA=v.SCENE_CAMERA="seting_camera",v.prototype.SCENE_SYSTEM=v.SCENE_SYSTEM="seting_systemInfo",v.prototype.SCENE_NETWORK=v.SCENE_NETWORK="seting_network",v.prototype.SCENE_CLASSINFO=v.SCENE_CLASSINFO="seting_classInfo",v.prototype.EVENT_UPDATE=v.EVENT_UPDATE="event_update";var y=v;t.default=y,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/JsSeting/src/component/SetingLeft.js"),__REACT_HOT_LOADER__.register(v,"SetingLeft","D:/work/JsSeting/src/component/SetingLeft.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/JsSeting/src/component/SetingLeft.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(4),g=r(_),m=f.default.getLoger("MCamera"),v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.videoQuality=0,e.curVideoQuality=0,e.cameras=[],e.curCamera="",e.addEvent(),e.localLanguage(),e}return s(t,e),l(t,[{key:"localLanguage",value:function(){(0,p.default)("#MediaSettingCameraBoxDeviceTitle").html(g.default.localConfig.MediaSettingCameraButton),(0,p.default)("#MediaSettingMediaSelectLabel").html(g.default.localConfig.MediaSettingDeviceSelectLabel),(0,p.default)("#MediaSettingCamResolutionLabel").html(g.default.localConfig.MediaSettingCamResolutionLabel),(0,p.default)("#MediaSettingCameraBoxPreview").html(g.default.localConfig.MediaSettingCameraBoxPreview),(0,p.default)("#MediaSettingCameraBoxHelpTitle").html(g.default.localConfig.MediaSettingCameraBoxHelpTitle),(0,p.default)("#MediaSettingCameraBoxHelp1").html(g.default.localConfig.MediaSettingCameraBoxHelp1),(0,p.default)("#MediaSettingCameraBoxHelp2").html(g.default.localConfig.MediaSettingCameraBoxHelp2),(0,p.default)("#MediaSettingCameraBoxHelp3").html(g.default.localConfig.MediaSettingCameraBoxHelp3)}},{key:"addEvent",value:function(){(0,p.default)("#setingCameraResolution").on("change",this._onCameraResolutionChangeHandler.bind(this)),(0,p.default)("#setingCameraFacility").on("change",this._onCameraChangeHandler.bind(this))}},{key:"setData",value:function(e){this.videoQuality=e.videoQuality,this.curVideoQuality=e.curVideoQuality,this.curVideoQuality>this.videoQuality&&(this.curVideoQuality=this.videoQuality),this.cameras=e.cameras,this.curCamera=e.curCamera,this.cameras.length>0&&(this.curCamera||(this.curCamera=this.cameras[0])),this._updateResolutionList(),this._updateCameraList(),this._updateCameraImage()}},{key:"_updateDate",value:function(){}},{key:"_updateResolutionList",value:function(e){console.log("更新分辨率列表数据",this.videoQuality),(0,p.default)("#setingCameraResolution").empty();for(var t=0;t<=this.videoQuality;t++){var n="<option value="+t+">"+g.default.resolution[t]+"</option>";(0,p.default)("#setingCameraResolution").append(n)}(0,p.default)("#setingCameraResolution").val(this.curVideoQuality)}},{key:"_updateCameraList",value:function(e){(0,p.default)("#setingCameraFacility").empty();for(var t=0;t<this.cameras.length;t++){var n="<option value="+t+">"+this.cameras[t]+"</option>";(0,p.default)("#setingCameraFacility").append(n)}var i=this.cameras.indexOf(this.curCamera);i<0&&(i=0),(0,p.default)("#setingCameraFacility").val(i)}},{key:"_updateCameraImage",value:function(e){var t="";e&&(t=e.imageBase64Str||""),t?(0,p.default)("#camera_img").attr("src","data:image/jpg;base64,"+t):(0,p.default)("#camera_img").attr("src","")}},{key:"_onCameraResolutionChangeHandler",value:function(e){this.currentResolution=(0,p.default)("#setingCameraResolution")[0].selectedIndex,m.log("切换分辨率->",this.currentResolution),this.curVideoQuality=this.currentResolution,this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_RESOLUTION,curVideoQuality:this.curVideoQuality})}},{key:"_onCameraChangeHandler",value:function(e){var n=(0,p.default)("#setingCameraFacility")[0].selectedIndex;this.curCamera=this.cameras[n],m.log("切换摄像头->",this.curCamera),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_CAMERA,curCamera:this.curCamera})}}]),t}(d.default);v.prototype.EVENT_UPDATE=v.EVENT_UPDATE="event_update";var y=v;t.default=y,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/JsSeting/src/component/containerModule/MCamera.js"),__REACT_HOT_LOADER__.register(v,"MCamera","D:/work/JsSeting/src/component/containerModule/MCamera.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/JsSeting/src/component/containerModule/MCamera.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(4),g=r(_),m=f.default.getLoger("MCameraOther"),v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.videoQuality=0,e.curVideoQuality=0,e.cameras=[],e.curCamera="",e.addEvent(),e.localLanguage(),e}return s(t,e),l(t,[{key:"localLanguage",value:function(){(0,p.default)("#vipkidOpenCamra").html(g.default.localConfig.MediaSettingCameraButton),(0,p.default)("#cameraUserName").html(g.default.localConfig.UserName),(0,p.default)("#mediaSettingOhterCamStatus").html(g.default.localConfig.MediaSettingOhterCamStatus),(0,p.default)("#mediaSettingOtherSelectLabel").html(g.default.localConfig.MediaSettingDeviceSelectLabel),(0,p.default)("#MediaSettingOtherCamResolutionLabel").html(g.default.localConfig.MediaSettingCamResolutionLabel),(0,p.default)("#MediaSettingOtherCameraBoxHelpTitle").html(g.default.localConfig.MediaSettingOtherCameraBoxHelpTitle),(0,p.default)("#MediaSettingOtherCameraBoxHelp1").html(g.default.localConfig.MediaSettingOtherCameraBoxHelp1),(0,p.default)("#MediaSettingOtherCameraBoxHelp2").html(g.default.localConfig.MediaSettingOtherCameraBoxHelp2),(0,p.default)("#MediaSettingOtherCameraBoxHelp3").html(g.default.localConfig.MediaSettingOtherCameraBoxHelp3),(0,p.default)("#MediaSettingOtherCameraBoxHelp4").html(g.default.localConfig.MediaSettingOtherCameraBoxHelp4)}},{key:"addEvent",value:function(){(0,p.default)("#setingOtherCameraName").html(""),(0,p.default)("#MediaSettingOhterCamMicOK").html(""),(0,p.default)("#setingOtherCameraResolution").on("change",this._onCameraResolutionChangeHandler.bind(this)),(0,p.default)("#setingOtherCamera").on("change",this._onCameraChangeHandler.bind(this))}},{key:"setData",value:function(e){this.videoQuality=e.videoQuality,this.curVideoQuality=e.curVideoQuality,this.cameras=e.cameras,this.curCamera=e.curCamera,(0,p.default)("#setingOtherCameraName").html(e.userName),this.cameras.length>0?(0,p.default)("#MediaSettingOhterCamMicOK").html(g.default.localConfig.MediaSettingOhterCamMicOK):(0,p.default)("#MediaSettingOhterCamMicOK").html(g.default.localConfig.MediaSettingOhterCamMicOK),this._updateResolutionList(),this._updateCameraList()}},{key:"_updateDate",value:function(){this._emit(MCamera.EVENT_UPDATE)}},{key:"_updateResolutionList",value:function(e){(0,p.default)("#setingOtherCameraResolution").empty();for(var t=0;t<=this.videoQuality;t++){var n="<option value="+t+">"+g.default.resolution[t]+"</option>";(0,p.default)("#setingOtherCameraResolution").append(n)}(0,p.default)("#setingOtherCameraResolution").val(this.curVideoQuality)}},{key:"_updateCameraList",value:function(e){(0,p.default)("#setingOtherCamera").empty();for(var t=0;t<this.cameras.length;t++){var n="<option value="+t+">"+this.cameras[t]+"</option>";(0,p.default)("#setingOtherCamera").append(n)}var i=this.cameras.indexOf(this.curCamera);i<0&&(i=0),(0,p.default)("#setingOtherCamera").val(i)}},{key:"_onCameraResolutionChangeHandler",value:function(e){this.currentResolution=(0,p.default)("#setingOtherCameraResolution")[0].selectedIndex,m.log("切换分辨率2->",this.currentResolution),this.curVideoQuality=this.currentResolution,this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_RESOLUTION,curVideoQuality:this.curVideoQuality})}},{key:"_onCameraChangeHandler",value:function(e){var n=(0,p.default)("#setingOtherCamera")[0].selectedIndex;this.curCamera=this.cameras[n],m.log("切换摄像头2->",this.curCamera),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_CAMERA,curCamera:this.curCamera})}}]),t}(d.default);v.prototype.EVENT_UPDATE=v.EVENT_UPDATE="event_update";var y=v;t.default=y,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/JsSeting/src/component/containerModule/MCameraOther.js"),__REACT_HOT_LOADER__.register(v,"MCameraOther","D:/work/JsSeting/src/component/containerModule/MCameraOther.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/JsSeting/src/component/containerModule/MCameraOther.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(4),g=r(_),m=f.default.getLoger("MClassInfo"),v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.classModelList=["主讲人模式","自由模式","主讲人聊天模式","自由聊天模式"],e.classModel=0,e.addEvent(),e.localLanguage(),e}return s(t,e),l(t,[{key:"localLanguage",value:function(){}},{key:"addEvent",value:function(){(0,p.default)("#setingclassModel").on("change",this._onClassModelChangeHandler.bind(this))}},{key:"setData",value:function(e){this._updateClassModelList()}},{key:"_updateDate",value:function(){}},{key:"_updateClassModelList",value:function(e){(0,p.default)("#setingclassModel").empty();for(var t=0;t<this.classModelList.length;t++){var n="<option value="+t+">"+this.classModelList[t]+"</option>";(0,p.default)("#setingclassModel").append(n)}}},{key:"_onClassModelChangeHandler",value:function(e){var n=(0,p.default)("#setingclassModel")[0].selectedIndex;this.classModel=this.classModelList[n],m.log("切换课堂模式->",this.classModel),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_CLASS_MODEL,ipPort:this.ipPort})}}]),t}(d.default);v.prototype.EVENT_UPDATE=v.EVENT_UPDATE="event_update";var y=v;t.default=y,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/JsSeting/src/component/containerModule/MClassInfo.js"),__REACT_HOT_LOADER__.register(v,"MClassInfo","D:/work/JsSeting/src/component/containerModule/MClassInfo.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/JsSeting/src/component/containerModule/MClassInfo.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(4),g=r(_),m=f.default.getLoger("MMicrophone"),v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.micCodes=[],e.microphones=[],e.curMicrophone="",e.micCode=0,e.micGain=50,e.micNoise=50,e.autoGain=!1,e.activityLevel=0,e.addEvent(),e.localLanguage(),e}return s(t,e),l(t,[{key:"localLanguage",value:function(){this.micCodes=[g.default.localConfig.EchoCancellationEnhancementMode,g.default.localConfig.VideoStreamingEnhancementMode],(0,p.default)("#MediaSettingMicBoxDeviceTitle").html(g.default.localConfig.MediaSettingMicBoxDeviceTitle),(0,p.default)("#MediaSettingMicSelectLabel").html(g.default.localConfig.MediaSettingDeviceSelectLabel),(0,p.default)("#MediaSettingMicCodeSelectLabel").html(g.default.localConfig.MediaSettingMicCodeSelectLabel),(0,p.default)("#MediaSettingDeviceVolumeLabel").html(g.default.localConfig.MediaSettingDeviceVolumeLabel),(0,p.default)("#MediaSettingDeviceMicNoiseLabel").html(g.default.localConfig.MediaSettingDeviceMicNoiseLabel),(0,p.default)("#MediaSettingMicBoxSpeakerOutHint").html(g.default.localConfig.MediaSettingMicBoxSpeakerOutHint),(0,p.default)("#MediaSettingMicBoxSpeakerSuccess").html(g.default.localConfig.MediaSettingMicBoxSpeakerSuccess),(0,p.default)("#MediaSettingDeviceMicAutoGainTitle").html(g.default.localConfig.MediaSettingDeviceMicAutoGainTitle),(0,p.default)("#MediaSettingDeviceMicAutoGainYes").html(g.default.localConfig.MediaSettingDeviceMicAutoGainYes),(0,p.default)("#MediaSettingDeviceMicAutoGainNo").html(g.default.localConfig.MediaSettingDeviceMicAutoGainNo)}},{key:"addEvent",value:function(){(0,p.default)("#MediaSettingMicBoxSpeakerSuccess").hide(),(0,p.default)("#microphone_hint").hide(),(0,p.default)("#setingMicrophoneFacility").on("change",this._onMicrophoneChangeHandler.bind(this)),(0,p.default)("#setingMicrophonePattern").on("change",this._onMicCodeChangeHandler.bind(this)),(0,p.default)("#microphoneProgressBtn").on("change",this._onProgressChangeHandler.bind(this)),(0,p.default)("#microphoneNoiseProgressBtn").on("change",this._onProgressMicNoiseChangeHandler.bind(this)),(0,p.default)("#autoGainSetingYes").on("change",this._onAutoGainChangeHandler.bind(this)),(0,p.default)("#autoGainSetingNo").on("change",this._onAutoGainChangeHandler.bind(this))}},{key:"setData",value:function(e){this.microphones=e.microphones,this.curMicrophone=e.curMicrophone,this.micCode=e.micCode,this.micGain=e.micGain,this.micNoise=e.micNoise,this.autoGain=Boolean(e.autoGain),(0,p.default)("#microphoneProgressBtn").val(this.micGain),(0,p.default)("#microphoneNoiseProgressBtn").val(this.micNoise),this._updateMicGain(),this._updateMicNoise(),this._updateMicAutoGain(),this._updateMicrophoneList(),this._updateMicCodeList(),this._updateMicrophoneActivityLevel({activityLevel:this.activityLevel})}},{key:"_updateDate",value:function(){}},{key:"_updateMicrophoneActivityLevel",value:function(e){e?this.activityLevel=e.activityLevel:this.activityLevel=0,(0,p.default)("#microphoneProgress").width(this.activityLevel+"%"),this.activityLevel>0&&(0,p.default)("#MediaSettingMicBoxSpeakerSuccess").show()}},{key:"_updateMicGain",value:function(e){(0,p.default)("#microphoneProgressVal").html(this.micGain+"%")}},{key:"_updateMicNoise",value:function(e){(0,p.default)("#microphoneNoiseProgressVal").html(this.micNoise+"%")}},{key:"_updateMicAutoGain",value:function(e){m.log("_updateMicAutoGain",this.autoGain),(0,p.default)("#autoGainSetingYes").removeAttr("checked"),(0,p.default)("#autoGainSetingNo").removeAttr("checked"),1==this.autoGain||"true"==this.autoGain?((0,p.default)("#autoGainSetingYes").attr("checked",!0),(0,p.default)("#autoGainSetingNo").attr("checked",!1)):((0,p.default)("#autoGainSetingYes").attr("checked",!1),(0,p.default)("#autoGainSetingNo").attr("checked",!0))}},{key:"_updateMicrophoneList",value:function(e){(0,p.default)("#setingMicrophoneFacility").empty();for(var t=0;t<this.microphones.length;t++){var n="<option value="+t+">"+this.microphones[t]+"</option>";(0,p.default)("#setingMicrophoneFacility").append(n)}var i=this.microphones.indexOf(this.curMicrophone);i<0&&(i=0),(0,p.default)("#setingMicrophoneFacility").val(i)}},{key:"_updateMicCodeList",value:function(e){(0,p.default)("#setingMicrophonePattern").empty();for(var t=0;t<this.micCodes.length;t++){var n="<option value="+t+">"+this.micCodes[t]+"</option>";(0,p.default)("#setingMicrophonePattern").append(n)}var i=this.micCodes.indexOf(this.micCode);i<0&&(i=0),(0,p.default)("#setingMicrophonePattern").val(i)}},{key:"_onProgressChangeHandler",value:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.micGain=(0,p.default)("#microphoneProgressBtn").val(),m.log("麦克风音量大小发生改变->"+this.micGain),this._updateMicGain(),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_MICROPHONE_GAIN,micGain:this.micGain})}},{key:"_onProgressMicNoiseChangeHandler",value:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.micNoise=(0,p.default)("#microphoneNoiseProgressBtn").val(),m.log("麦克风降噪分贝大小发生改变->"+this.micNoise),this._updateMicNoise(),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_MICROPHONE_NOISE,micNoise:this.micNoise})}},{key:"_onAutoGainChangeHandler",value:function(e){if(e){switch(e.currentTarget.id){case"autoGainSetingYes":this.autoGain=!0;break;case"autoGainSetingNo":this.autoGain=!1}m.log("自动调整音量发送改变->",this.autoGain),this._updateMicAutoGain(),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_MICROPHONE_AUTO_GAIN,autoGain:this.autoGain})}}},{key:"_onMicrophoneChangeHandler",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,(0,p.default)("#setingMicrophoneFacility")[0].selectedIndex);this.curMicrophone=this.microphones[e],m.log("麦克风切换设备->",this.curMicrophone),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_MICROPHONE,curMicrophone:this.curMicrophone})}},{key:"_onMicCodeChangeHandler",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,(0,p.default)("#setingMicrophonePattern")[0].selectedIndex);this.micCode=e,m.log("麦克风切换模式->",this.micCode),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_MICROPHONE_CODE,micCode:this.micCode})}}]),t}(d.default);v.prototype.EVENT_UPDATE=v.EVENT_UPDATE="event_update";var y=v;t.default=y,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/JsSeting/src/component/containerModule/MMicrophone.js"),__REACT_HOT_LOADER__.register(v,"MMicrophone","D:/work/JsSeting/src/component/containerModule/MMicrophone.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/JsSeting/src/component/containerModule/MMicrophone.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(4),g=r(_),m=f.default.getLoger("MNetwork"),v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.msList=[],e.ipPort=null,e.msIpPort="",e.addEvent(),e.localLanguage(),e}return s(t,e),l(t,[{key:"localLanguage",value:function(){(0,p.default)("#MediaSettingNetWork").html(g.default.localConfig.MediaSettingNetWork),(0,p.default)("#netWorkUserName").html(g.default.localConfig.UserName),(0,p.default)("#networkSelect").html(g.default.localConfig.NetworkSelect),(0,p.default)("#userNetworkStatus").html(g.default.localConfig.UserNetworkStatus),(0,p.default)("#userBWStatus").html(g.default.localConfig.UserBWStatus),(0,p.default)("#networkDetection").html(g.default.localConfig.monitor)}},{key:"addEvent",value:function(){(0,p.default)("#setingInfoUserName").html(""),(0,p.default)("#networkChecking").html(""),(0,p.default)("#bandwidthInfo").html(""),(0,p.default)("#delayInfo").html(""),(0,p.default)("#setingNetworkFacility").on("change",this._onMsListChangeHandler.bind(this)),(0,p.default)("#networkDetection").on("click",this._onDetectionHandler.bind(this))}},{key:"setData",value:function(e){(0,p.default)("#setingInfoUserName").html(e.userName),this.msList=e.msList||[],this.ipPort=e.ipPort,this.msIpPort=e.msIpPort||"",this.msList.length>0&&(this.ipPort||(this.ipPort=this.msList[0])),this.msList.length>0?this.ipPort=e.ipPort||this.msList[0]:this.ipPort=e.ipPort||"",this._updateMsList()}},{key:"_updateDate",value:function(){}},{key:"_updateMsDetection",value:function(e){if(this.clearMsDetectionInfo(),e){m.log("更新网速测试返回值",e);var t=e.playKbps||0,n=e.playDelayMs||0;(0,p.default)("#bandwidthInfo").html("bandwidth:"+t+" Kbps"),(0,p.default)("#delayInfo").html("delay:"+n+" ms"),1==e.isSuccess?(0,p.default)("#networkChecking").html(g.default.localConfig.netWorkSuccessfulDetection):(0,p.default)("#networkChecking").html(g.default.localConfig.netWorkTestFailed)}}},{key:"clearMsDetectionInfo",value:function(){(0,p.default)("#bandwidthInfo").html(""),(0,p.default)("#delayInfo").html(""),(0,p.default)("#networkChecking").html("")}},{key:"_updateMsList",value:function(e){(0,p.default)("#setingNetworkFacility").empty();for(var t=-1,n=0;n<this.msList.length;n++){var i=this.msList[n];if(i){var r=i.name||"",a=i.ip;i.port&&(a=i.ip+":"+i.port),a==this.msIpPort&&(t=n),r||(r=this.transformAddr(a));var o="<option value="+n+">"+r+"</option>";(0,p.default)("#setingNetworkFacility").append(o)}}t<0&&(t=0),this.ipPort=this.msList[t],(0,p.default)("#setingNetworkFacility").val(t)}},{key:"transformAddr",value:function(e){var t=e.split(".");return t[1]="*",t.join(".")}},{key:"tranIp",value:function(e,t){var n=e;return n}},{key:"_onMsListChangeHandler",value:function(e){var n=(0,p.default)("#setingNetworkFacility")[0].selectedIndex;this.ipPort=this.msList[n],m.log("切换服务器列表->",this.ipPort),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_MS_LIST,ipPort:this.ipPort})}},{key:"_onDetectionHandler",value:function(e){m.log("开始测速",this.ipPort),this.clearMsDetectionInfo(),(0,p.default)("#networkChecking").html(g.default.localConfig.netWorkChecking),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_MS_DETECTION,ipPort:this.ipPort})}}]),t}(d.default);v.prototype.EVENT_UPDATE=v.EVENT_UPDATE="event_update";var y=v;t.default=y,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/JsSeting/src/component/containerModule/MNetwork.js"),__REACT_HOT_LOADER__.register(v,"MNetwork","D:/work/JsSeting/src/component/containerModule/MNetwork.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/JsSeting/src/component/containerModule/MNetwork.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(4),g=r(_),m=f.default.getLoger("MSoundSpeaker"),v="sound.mp3",y=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.isPlayTest=!1,e.activityLevel=0,e.speakerVolume=50,e.musicUrl=v,e.helpUrl="http://www.3mang.com/help_web/",e.addEvent(),e.localLanguage(),e}return s(t,e),l(t,[{key:"localLanguage",value:function(){(0,p.default)("#MediaSettingSpeakerBoxDeviceTitle").html(g.default.localConfig.MediaSettingSpeakerBoxDeviceTitle),(0,p.default)("#MediaSettingSpeakerPlaySoudButton").html(g.default.localConfig.MediaSettingSpeakerPlaySoudButton),(0,p.default)("#MediaSettingDeviceSelectLabel").html(g.default.localConfig.MediaSettingDeviceSelectLabel),(0,p.default)("#mediaSettingSoundspeakerVolumeLabel").html(g.default.localConfig.MediaSettingDeviceVolumeLabel),(0,p.default)("#MediaSettingSpeakerPlaySoudHint").html(g.default.localConfig.MediaSettingSpeakerPlaySoudHint),(0,p.default)("#MediaSettingSpeakerBoxHelpTitle").html(g.default.localConfig.MediaSettingSpeakerBoxHelpTitle),(0,p.default)("#MediaSettingSpeakerBoxHelp1").html(g.default.localConfig.MediaSettingSpeakerBoxHelp1),
(0,p.default)("#MediaSettingSpeakerBoxHelp2").html(g.default.localConfig.MediaSettingSpeakerBoxHelp2),(0,p.default)("#MediaSettingSpeakerBoxHelp3").html(g.default.localConfig.MediaSettingSpeakerBoxHelp3),(0,p.default)("#MediaSettingSpeakerBoxDeviceSelectHelp").html(g.default.localConfig.MediaSettingSpeakerBoxDeviceSelectHelp)}},{key:"addEvent",value:function(){(0,p.default)("#MediaSettingSpeakerPlaySoudButton").on("click",this._onClickPlayMusicHandler.bind(this)),(0,p.default)("#soundSpeakerProgressBtn").on("change",this._onProgressChangeHandler.bind(this)),(0,p.default)("#MediaSettingSpeakerBoxDeviceSelectHelp").attr("href",this.helpUrl),(0,p.default)("#MediaSettingSpeakerBoxDeviceSelectHelp").attr("target","_blank")}},{key:"showPlayBtn",value:function(){this.isPlayTest=!1,(0,p.default)("#MediaSettingSpeakerPlaySoudButton").html(g.default.localConfig.MediaSettingSpeakerPlaySoudButton)}},{key:"setData",value:function(e){this.speakerVolume=e.speakerVolume,(0,p.default)("#soundSpeakerProgressBtn").val(this.speakerVolume),this._updateSpeakerVolume(),this._updateSpeakerTestActivityLevel({activityLevel:this.activityLevel})}},{key:"_updateDate",value:function(){this._emit(t.EVENT_UPDATE)}},{key:"_updateSpeakerVolume",value:function(e){(0,p.default)("#soundSpeakerProgressVal").html(this.speakerVolume+"%")}},{key:"_updateSpeakerTestActivityLevel",value:function(e){e?this.activityLevel=e.activityLevel:this.activityLevel=0,(0,p.default)("#soundSpeakerTestProgress").width(this.activityLevel+"%")}},{key:"_updateTestMusicSource",value:function(e){this.musicUrl=e||v}},{key:"_onClickPlayMusicHandler",value:function(e){m.log("播放测试音->",this.isPlayTest),this.isPlayTest?(this.isPlayTest=!1,(0,p.default)("#MediaSettingSpeakerPlaySoudButton").html(g.default.localConfig.MediaSettingSpeakerPlaySoudButton),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_SPEAKER_TEST_STOP,musicUrl:this.musicUrl}),this._updateSpeakerTestActivityLevel({activityLevel:0})):(this.isPlayTest=!0,(0,p.default)("#MediaSettingSpeakerPlaySoudButton").html(g.default.localConfig.MediaSettingSpeakerStopSoudButton),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_SPEAKER_TEST,musicUrl:this.musicUrl}))}},{key:"_onProgressChangeHandler",value:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.speakerVolume=(0,p.default)("#soundSpeakerProgressBtn").val(),m.log("扬声器音量大小发生改变->"+this.speakerVolume),this._updateSpeakerVolume(),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_SPEAKER_VOLUME,speakerVolume:this.speakerVolume})}}]),t}(d.default);y.prototype.EVENT_UPDATE=y.EVENT_UPDATE="event_update";var E=y;t.default=E,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/JsSeting/src/component/containerModule/MSoundSpeaker.js"),__REACT_HOT_LOADER__.register(v,"MUSIC_URL","D:/work/JsSeting/src/component/containerModule/MSoundSpeaker.js"),__REACT_HOT_LOADER__.register(y,"MSoundSpeaker","D:/work/JsSeting/src/component/containerModule/MSoundSpeaker.js"),__REACT_HOT_LOADER__.register(E,"default","D:/work/JsSeting/src/component/containerModule/MSoundSpeaker.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(4),g=r(_),m=f.default.getLoger("MSystemInfo"),v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.addEvent(),e.localLanguage(),e}return s(t,e),l(t,[{key:"localLanguage",value:function(){(0,p.default)("#MediaSettingSystemInfo").html(g.default.localConfig.MediaSettingSystemInfo)}},{key:"addEvent",value:function(){}},{key:"setData",value:function(e){m.log("setData",e),(0,p.default)("#systemInfo_oneself").empty();var t="<p><span class='systemInfoText'>userName: </span>"+e.userName+"</p>",n="<p><span class='systemInfoText'>classId: </span>"+e.classId+"</p>",i="<p><span class='systemInfoText'>nodeId: </span>"+e.nodeId+"</p>",r="<p><span class='systemInfoText'>userIP: </span>"+e.userIp+"</p>",a="<p><span class='systemInfoText'>country: </span>"+e.country+"</p>",o="<p><span class='systemInfoText'>province: </span>"+e.province+"</p>",s="<p><span class='systemInfoText'>city: </span>"+e.city+"</p>",l="<p><span class='systemInfoText'>isp: </span>"+e.isp+"</p>";(0,p.default)("#systemInfo_oneself").append(t),(0,p.default)("#systemInfo_oneself").append(n),(0,p.default)("#systemInfo_oneself").append(i),(0,p.default)("#systemInfo_oneself").append(r),(0,p.default)("#systemInfo_oneself").append(a),(0,p.default)("#systemInfo_oneself").append(o),(0,p.default)("#systemInfo_oneself").append(s),(0,p.default)("#systemInfo_oneself").append(l),(0,p.default)("#systemInfo_config").empty();var u="<p><span class='systemInfoText'>platform: </span>"+this.getPlatFrom(e.deviceType)+"</p>",d="<p><span class='systemInfoText'>version: </span>"+(e.sdkVersion||"")+"</p>",c="<p><span class='systemInfoText'>os: </span>"+(e.os||"")+"</p>",f="<p><span class='systemInfoText'>explorer: </span>"+(e.explorer||"")+"</p>",h="<p><span class='systemInfoText'>explorerVersion: </span>"+(e.explorerVersion||"")+"</p>",_="<p><span class='systemInfoText'>language: </span>"+(e.language||"")+"</p>";(0,p.default)("#systemInfo_config").append(d),(0,p.default)("#systemInfo_config").append(u),(0,p.default)("#systemInfo_config").append(c),(0,p.default)("#systemInfo_config").append(f),(0,p.default)("#systemInfo_config").append(h),(0,p.default)("#systemInfo_config").append(_)}},{key:"getPlatFrom",value:function(e){switch(e){case 0:return"PC";case 1:return"IOS";case 2:return"Android";case 3:return"h5";default:return"未知"}}},{key:"_updateDate",value:function(){this._emit(t.EVENT_UPDATE)}}]),t}(d.default);v.prototype.EVENT_UPDATE=v.EVENT_UPDATE="event_update";var y=v;t.default=y,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/JsSeting/src/component/containerModule/MSystemInfo.js"),__REACT_HOT_LOADER__.register(v,"MSystemInfo","D:/work/JsSeting/src/component/containerModule/MSystemInfo.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/JsSeting/src/component/containerModule/MSystemInfo.js"))}()},function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"==typeof t?"undefined":n(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":n(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=i(1),d=r(u),c=i(2),f=r(c),h=i(3),p=r(h),_=i(4),g=r(_),m=f.default.getLoger("MMicrophoneOther"),v=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.speakerVolume=50,e.micCodes=[],e.microphones=[],e.curMicrophone="",e.micCode=0,e.micGain=50,e.addEvent(),e.localLanguage(),e}return s(t,e),l(t,[{key:"localLanguage",value:function(){this.micCodes=[g.default.localConfig.EchoCancellationEnhancementMode,g.default.localConfig.VideoStreamingEnhancementMode],(0,p.default)("#mediaSettingMicBoxDevice").html(g.default.localConfig.MediaSettingMicBoxDeviceTitle),(0,p.default)("#microphoneUserName").html(g.default.localConfig.UserName),(0,p.default)("#MediaSettingOhterMicStatus").html(g.default.localConfig.MediaSettingOhterMicStatus),(0,p.default)("#MediaSettingCameraCodeSelectLabel").html(g.default.localConfig.MediaSettingMicCodeSelectLabel),(0,p.default)("#mediaSettingCameraSelectLabel").html(g.default.localConfig.MediaSettingDeviceSelectLabel),(0,p.default)("#mediaSettingCameraBoxDeviceVolume").html(g.default.localConfig.MediaSettingOhterMicVolumeLabel),(0,p.default)("#mediaSettingOhterSpeakerVolumeLabel").html(g.default.localConfig.MediaSettingOhterSpeakerVolumeLabel),(0,p.default)("#MediaSettingOtherMicBoxHelpTitle").html(g.default.localConfig.MediaSettingOtherMicBoxHelpTitle),(0,p.default)("#MediaSettingOhterMicBoxHelp1").html(g.default.localConfig.MediaSettingOhterMicBoxHelp1),(0,p.default)("#MediaSettingOhterMicBoxHelp2").html(g.default.localConfig.MediaSettingOhterMicBoxHelp2),(0,p.default)("#MediaSettingOhterMicBoxHelp3").html(g.default.localConfig.MediaSettingOhterMicBoxHelp3),(0,p.default)("#MediaSettingOhterMicBoxHelp4").html(g.default.localConfig.MediaSettingOhterMicBoxHelp4)}},{key:"addEvent",value:function(){(0,p.default)("#setingOtherMicrophoneName").html(""),(0,p.default)("#setingOtherMicrophoneState").html(""),(0,p.default)("#setingOtherMicrophone").on("change",this._onMicrophoneChangeHandler.bind(this)),(0,p.default)("#setingOtherPattern").on("change",this._onMicCodeChangeHandler.bind(this)),(0,p.default)("#otherSoundSpeakerProgressBtn").on("change",this._onSpeakerProgressChangeHandler.bind(this)),(0,p.default)("#otherMicrophoneProgressBtn").on("change",this._onMicProgressChangeHandler.bind(this))}},{key:"setData",value:function(e){this.speakerVolume=e.speakerVolume,this.microphones=e.microphones,this.curMicrophone=e.curMicrophone,this.micCode=e.micCode,this.micGain=e.micGain,(0,p.default)("#otherSoundSpeakerProgressBtn").val(this.speakerVolume),(0,p.default)("#otherMicrophoneProgressBtn").val(this.micGain),(0,p.default)("#setingOtherMicrophoneName").html(e.userName),this.microphones.length>0?(0,p.default)("#setingOtherMicrophoneState").html(g.default.localConfig.MediaSettingOhterCamMicOK):(0,p.default)("#setingOtherMicrophoneState").html(g.default.localConfig.MediaSettingOhterCamMicNull),this._updateSpeakerVolume(),this._updateMicGain(),this._updateMicrophoneList(),this._updateMicCodeList()}},{key:"_updateDate",value:function(){this._emit(t.EVENT_UPDATE)}},{key:"_updateSpeakerVolume",value:function(e){(0,p.default)("#otherSoundSpeakerProgressVal").html(this.speakerVolume+"%")}},{key:"_updateMicGain",value:function(e){(0,p.default)("#otherMicrophoneProgressVal").html(this.micGain+"%")}},{key:"_updateMicrophoneList",value:function(e){(0,p.default)("#setingOtherMicrophone").empty();for(var t=0;t<this.microphones.length;t++){var n="<option value="+t+">"+this.microphones[t]+"</option>";(0,p.default)("#setingOtherMicrophone").append(n)}}},{key:"_updateMicCodeList",value:function(e){(0,p.default)("#setingOtherPattern").empty();for(var t=0;t<this.micCodes.length;t++){var n="<option value="+t+">"+this.micCodes[t]+"</option>";(0,p.default)("#setingOtherPattern").append(n)}}},{key:"_onSpeakerProgressChangeHandler",value:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.speakerVolume=(0,p.default)("#otherSoundSpeakerProgressBtn").val(),m.log("扬声器音量大小发生改变->"+this.speakerVolume),this._updateSpeakerVolume(),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_SPEAKER_VOLUME,speakerVolume:this.speakerVolume})}},{key:"_onMicProgressChangeHandler",value:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.micGain=(0,p.default)("#otherMicrophoneProgressBtn").val(),m.log("麦克风音量大小发生改变->"+this.micGain),this._updateMicGain(),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_MICROPHONE_GAIN,micGain:this.micGain})}},{key:"_onMicrophoneChangeHandler",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,(0,p.default)("#setingOtherMicrophone")[0].selectedIndex);this.curMicrophone=this.microphones[e],m.log("麦克风切换设备2->",this.curMicrophone),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_MICROPHONE,curMicrophone:this.curMicrophone})}},{key:"_onMicCodeChangeHandler",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,(0,p.default)("#setingOtherPattern")[0].selectedIndex);this.micCode=e,m.log("麦克风切换模式2->",this.micCode),this._emit(t.EVENT_UPDATE,{actionType:g.default.CHANGE_MICROPHONE_CODE,micCode:this.micCode})}}]),t}(d.default);v.prototype.EVENT_UPDATE=v.EVENT_UPDATE="event_update";var y=v;t.default=y,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/JsSeting/src/component/containerModule/MicrophoneOther.js"),__REACT_HOT_LOADER__.register(v,"MMicrophoneOther","D:/work/JsSeting/src/component/containerModule/MicrophoneOther.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/JsSeting/src/component/containerModule/MicrophoneOther.js"))}()},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={header:{background:"#000",color:"#fff"},left:{background:"#f8f8f8",color:"#000",leftBtn:{background:"#fff",color:"#000",borderLeftColor:"#3b3b3b"}},right:{loudspeakerClass:{background:"#fff",loudspeakerInfo:{background:"#fff",color:"#2c96de",borderColor:"1px solid #dfdada",loudspeakerTit:{background:"#fff",color:"#000"}},playOn:{background:"#f1b555",color:"#fff",borderRadius:"0px",height:"30px",lineHeight:"30px"},hudsInfo:{ProgressBg:{background:"#d9d9d9"},Progress:{background:"#4c4c4c"},shadeList:{width:"5px","margin-left":"5px",background:"#fff"}},hintInfo:{background:"#fff",color:"#000","border-color":"#dfdada",noticeTit:{background:"#fff",color:"#f1b555"}}},microphoneClass:{reminder:{color:"#000"}},Classified:{dropDown:{color:"#000",background:"#fff",borderColor:"1px solid #3b3b3b",borderRadius:"0px",childInfo:{background:"transparent"}}}}},i=n;t.default=i,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"StyleDate","D:/work/JsSeting/src/cssDate/StyleDate.js"),__REACT_HOT_LOADER__.register(i,"default","D:/work/JsSeting/src/cssDate/StyleDate.js"))}()},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={"zh-cn":{Settings:"设置",MediaSettingSystemInfo:"系统信息",MediaSettingSpeakerButton:"扬声器",MediaSettingMicButton:"麦克风",MediaSettingCameraButton:"摄像头",MediaSettingNetWork:"网络设置",MediaSettingClassMode:"课堂模式",MediaSettingSpeakerBoxDeviceTitle:"扬声器设备",MediaSettingDeviceSelectLabel:"选 择 设 备 :",MediaSettingSpeakerBoxDeviceSelectHelp:"切换声音输出设备",MediaSettingDeviceVolumeLabel:"音量调节:",MediaSettingDeviceMicNoiseLabel:"噪音消除:",MediaSettingDeviceMicAutoGainTitle:"自动调整音量:",MediaSettingDeviceMicAutoGainYes:"是 ",MediaSettingDeviceMicAutoGainNo:"否 ",MediaSettingSpeakerPlaySoudHint:"请点击“播放测试音”按钮试听",MediaSettingSpeakerPlaySoudButton:"播放测试音",MediaSettingSpeakerStopSoudButton:"停止播放",MediaSettingSpeakerBoxHelpTitle:"如果你未听到声音,可能存在以下问题:",MediaSettingSpeakerBoxHelp1:"1.扬声器没安好或耳机未插好",MediaSettingSpeakerBoxHelp2:"2.扬声器未打开或者音量调节过小",MediaSettingSpeakerBoxHelp3:"3.声卡可能有问题,尝试重启电脑",MediaSettingMicBoxDeviceTitle:"麦克风设备",MediaSettingMicCodeSelectLabel:"选 择 模 式 :",MediaSettingMicBoxSpeakerOutHint:"请你对着麦克风讲话,以便开始检测",MediaSettingMicBoxSpeakerSuccess:"系统成功检测到声音输入,你可以正常语音",MediaSettingCamResolutionLabel:"选择分辨率:",MediaSettingCameraBoxPreview:"预 览 视 频 :",MediaSettingCameraBoxHelpTitle:"看不到视频?",MediaSettingCameraBoxHelp1:"1.外置摄像头未接好",MediaSettingCameraBoxHelp2:"2.摄像头设备被其他软件占用",MediaSettingCameraBoxHelp3:"3.摄像头驱动可能有问题,尝试重启电脑",UserName:"用户名称:",NetworkSelect:"选择网络:",UserNetworkStatus:"网络状态:",NetworkChecking:"正在检测...",UserBWStatus:"网络测速:",monitor:"检测",ChatMode:"聊天模式",MediaSettingClassModeHelpTitle:"提示",MediaSettingClassModeBoxHelp1:"1.主讲人模式:普通与会者无法控制开启自己的麦克风",MediaSettingClassModeBoxHelp2:"2.自由模式:普通与会者可以开启自己的麦克风",MediaSettingClassModeBoxHelp3:"3.主讲人聊天模式:普通与会者无法看到其他人的聊天信息",MediaSettingClassModeBoxHelp4:"4.自由聊天模式:普通与会者能看到其他人的公开聊天信息",MediaSettingOhterMicStatus:"麦克风的状态:",MediaSettingOhterMicVolumeLabel:"麦克风音量:",MediaSettingOhterSpeakerVolumeLabel:"扬声器音量:",MediaSettingOtherMicBoxHelpTitle:"听不对方的声音?",MediaSettingOhterMicBoxHelp1:"1.对方的耳机没接好",MediaSettingOhterMicBoxHelp2:"2.对方的电脑不支持正在使用的耳机",MediaSettingOhterMicBoxHelp3:"3.对方的浏览器获取麦克风不正确,请换一个浏览器试试",MediaSettingOhterMicBoxHelp4:"4.对方的浏览器可能被静音",MediaSettingOhterCamStatus:"摄像头的状态:",MediaSettingOtherCameraBoxHelpTitle:"看不到对方的视频?",MediaSettingOtherCameraBoxHelp1:"1.对方的外置摄像头未接好",MediaSettingOtherCameraBoxHelp2:"2.对方的摄像头设备被其他软件占用",MediaSettingOtherCameraBoxHelp3:"3.对方的电脑不支持正在使用的摄像头",MediaSettingOtherCameraBoxHelp4:"4.对方的网络不太好",MediaSettingMicBoxHelpTitle:"听不到声音?",MediaSettingMicBoxHelp1:"1.扬声器或耳机没接好",MediaSettingMicBoxHelp2:"2.麦克风未打开或音量调节过小",MediaSettingMicBoxHelp3:"3.声卡可能有问题,尝试重启电脑",MediaSettingOhterCamMicMute:"被拒绝",MediaSettingOhterCamMicNull:"故障或没有设备",MediaSettingOhterCamMicOccupied:"被占用",MediaSettingOhterCamMicOK:"正常",CameraMicPrivacy:"摄像头麦克风隐私权限",allowOperationPrompt:'网络教室需要您的许可才能使用摄像头和麦克风,请选择"允许"或"allow",并勾选"记住"或"remember",否则将无法正常上课。',netWorkChecking:"检测中...",netWorkSuccessfulDetection:"检测成功",netWorkTestFailed:"检测失败",EchoCancellationEnhancementMode:"回音消除增强模式",VideoStreamingEnhancementMode:"视频流畅增强模式"},"en-us":{Settings:"Settings",MediaSettingSystemInfo:"SystemInfo",MediaSettingSpeakerButton:"Speaker",MediaSettingMicButton:"Microphone",MediaSettingCameraButton:"Camera",MediaSettingNetWork:"NetWork",MediaSettingClassMode:"Class Mode",MediaSettingSpeakerBoxDeviceTitle:"Speaker Device",MediaSettingDeviceSelectLabel:"Select  Device:",MediaSettingSpeakerBoxDeviceSelectHelp:"Select speaker device",MediaSettingDeviceVolumeLabel:"Volume:",MediaSettingDeviceMicNoiseLabel:"micNoise:",MediaSettingDeviceMicAutoGainTitle:"autoGain:",MediaSettingDeviceMicAutoGainYes:"Yes ",MediaSettingDeviceMicAutoGainNo:"No ",MediaSettingSpeakerPlaySoudHint:"Please click “Play music” button for test",MediaSettingSpeakerPlaySoudButton:"Play music",MediaSettingSpeakerStopSoudButton:"Stop music",MediaSettingSpeakerBoxHelpTitle:"If you hear nothing, may be:",MediaSettingSpeakerBoxHelp1:"1.Speaker or headphones is not good",MediaSettingSpeakerBoxHelp2:"2.Speaker is closed or volume is too low",MediaSettingSpeakerBoxHelp3:"3.Speaker may have a problem, try to restart the computer",MediaSettingMicBoxDeviceTitle:"Microphone",MediaSettingMicCodeSelectLabel:"Select MicType:",MediaSettingMicBoxSpeakerOutHint:"Please speak to your microphone",MediaSettingMicBoxSpeakerSuccess:"System successfully detected voice, you can go on",MediaSettingCamResolutionLabel:"Resolution:",MediaSettingCameraBoxPreview:"Preview:",MediaSettingCameraBoxHelpTitle:"Can not see yourself?",MediaSettingCameraBoxHelp1:"1.USB camera not connected",MediaSettingCameraBoxHelp2:"2.Camera occupied by other software",MediaSettingCameraBoxHelp3:"3.Camera may have a problem, try to restart the computer",UserName:"UserName:",NetworkSelect:"Select network:",UserNetworkStatus:"network:",NetworkChecking:"checking...",UserBWStatus:"netBW:",monitor:"monitor",ChatMode:"Chat mode",MediaSettingClassModeHelpTitle:"Help",MediaSettingClassModeBoxHelp1:"1.Host mode:Students can not open self microphone",MediaSettingClassModeBoxHelp2:"2.Free mode:Students can open self microphone",MediaSettingClassModeBoxHelp3:"3.Host mode:Students can not see other's chat message",MediaSettingClassModeBoxHelp4:"4.Free mode:Students can see other's chat message",MediaSettingOhterMicStatus:"Mic Status:",MediaSettingOhterMicVolumeLabel:"Micphone:",MediaSettingOhterSpeakerVolumeLabel:"Speaker:",MediaSettingOtherMicBoxHelpTitle:"Can not hear the other person's sound?",MediaSettingOhterMicBoxHelp1:"1.headphones is't connected",MediaSettingOhterMicBoxHelp2:"2.headphones is not supported",MediaSettingOhterMicBoxHelp3:"3.microphone is incorrect,please try to change another browser",MediaSettingOhterMicBoxHelp4:"4.browser may be silent",MediaSettingOhterCamStatus:"Camera Status:",MediaSettingOtherCameraBoxHelpTitle:"Can not see the video?",MediaSettingOtherCameraBoxHelp1:"1.The other person's USB camera not connected",MediaSettingOtherCameraBoxHelp2:"2.The other person's camera occupied by other software",MediaSettingOtherCameraBoxHelp3:"3.The other person's camera is not supported",MediaSettingOtherCameraBoxHelp4:"4.The other person's network is not very good",MediaSettingMicBoxHelpTitle:"=No sound?",MediaSettingMicBoxHelp1:"1.Speakers or headphones is't connected",MediaSettingMicBoxHelp2:"2.Microphone is not open or volume is too low",MediaSettingMicBoxHelp3:"3.Speaker may have a problem, try to restart the computer",MediaSettingOhterCamMicMute:"Mute",MediaSettingOhterCamMicNull:"Null",MediaSettingOhterCamMicOccupied:"Occupied",MediaSettingOhterCamMicOK:"ok",CameraMicPrivacy:"Camera microphone privacy rights",allowOperationPrompt:'Please click the "allow" button when you see this dialogue.',netWorkChecking:"checking...",netWorkSuccessfulDetection:"Successful detection",netWorkTestFailed:"Test failed",EchoCancellationEnhancementMode:"Echo cancellation enhancement mode",VideoStreamingEnhancementMode:"Video streaming enhancement mode"}},i=n;t.default=i,function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"SetingLocale","D:/work/JsSeting/src/local/SetingLocale.js"),__REACT_HOT_LOADER__.register(i,"default","D:/work/JsSeting/src/local/SetingLocale.js"))}()},function(e,t,n){var i=n(23);"string"==typeof i&&(i=[[e.id,i,""]]),n(25)(i,{}),i.locals&&(e.exports=i.locals)},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjNBM0VBQTM5NTRDNzExRTdBN0M4RDdCQzA0N0M4REJFIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjNBM0VBQTNBNTRDNzExRTdBN0M4RDdCQzA0N0M4REJFIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6M0EzRUFBMzc1NEM3MTFFN0E3QzhEN0JDMDQ3QzhEQkUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6M0EzRUFBMzg1NEM3MTFFN0E3QzhEN0JDMDQ3QzhEQkUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7V3aAmAAABBElEQVR42mLcvHnzJwYGhtk+Pj7FDHjAli1blIDUHiYgMR2Ii4ACOXgUCwOpu0DMywQ0uRzISAbiyUCJGiyKxYDUGyC+AVQryvj//3+YRBGQ6gXiXKDEFKiYCJB6DcSPgWJyIDG4BqgCkE1zgDgdiFcA8UcgvgVUrA5Tg6IBqikaSC2EKj4NVOyBLM+E7maggqVAihmIhYB4M7o8upNgbt4LxGugIZgPNGQShgagYgkg9RyIbwIVaEDFUkBxBMT1QLEmuAYkkx8BJeTR/FQApPphNjGbmJhoAzkPoCaroLtZTU3txK1btx4BmTOANB/I0xuA+CHMGdgAUG4+kAJFahFAgAEAm0xvPxcXLg4AAAAASUVORK5CYII="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaoAAAEiCAMAAACfsmZxAAAC+lBMVEX2+fv////u7u5Amd2byewouVTMzM1mZmYAAAB9fX2ys7NtseQ0NDTAwcH/AgLb3N1LTEyur7CYmZq8vb5FRUbU19jf4OFsbW7Y2dt0dXZTVFTDxce4urvy9vehoqO2t7hZWlpfYGA7Ozu+v8Hv8vRQUFCIiYpwcXFcXV37+/ibnZ7q7O7z9PCVlpdBQUE3NzdpaWrIy8yCg4Sjpabb///b3uDR1NWFhofj5uiQkZLn6uxiYmPg4uR/gIHs8PHGyMmSlJWnqKn39/WNjo+foKCrrK3m6Om2/////9t4eXlXV1dmZmf//7aztbbvzYZ6envi5ObN0NICAgLR0dKLjI2qqqvu7une2tL/25D/tmZmtv/o5uAAgACQ3f+QZpA1NYft7OfDw8RkZGRfqu79vLvN7++lpqfHpzgoKSn6cXG2ZmbAojntq19mZrY3AADOzs7+gIBokd06kNtHdNNlAACAss3p9MYAADgNDQ2U26y2kZCPj9mDrcOQkLYAX6rZj4+Gzu//2dy30uBVgeCRh1f/Pz/n8Pn/7+//0cvw8KrU3/j/5OT/n58LZZPbkDqq7u41hszP2+Te2+EAAGS2ZgC42PkAZrbWjGOFp+s6gebe8eVimLVBwWj+Tk4cHByRtv47aMLNhjVRot/C6dFz0ZD/tpAAOpD+Hh4AZtGv27M3AGP/Xl7/Ly+rXwCQOgBpqcvbtr9qnbjBsGOzu/uCu4FPxnRrtWetlEG1ZTmGNQCUu9k3jLgodqU7cY5byX0OW2qzn2KKPV06nToANYclN2JiAGLZ+N2/579gYKr/j4+CNzeQZg+LwOlyp8OE1Z/JxIlmZtR4rMduor9ijJFmOpASMj0tLzAAmevE89jR48q12o9hADb6LCzv39+O2dno0spmtraYuJhmZpBGYmp3y2X5Ozs2ADYSiRJgNgDb25CQZmZpZ2VMhE/Prztmz/+2ttvykpLjb29to2xbiWKwNDSyoc3VwZjmqJGqX19kZACGXwA3NwA6tvfPT0+a2mZWAAAuiElEQVR42uzRQQ0AIAwAsSXsh3+/YOOS1kLnEDHnLgH3V+0QsKoqVGWoylCVoSpDVYaqDFUZqjJUZajKUJWhKkNVhqqMxx4dkAAAAAAI+v+6HYFeUNWGqg1VG6o2VG2o2lC1oWpD1Uas1klv2kAYgOH3RAWaqIMxGDBhcUhAQWAWOaxhEaFSQFFBaX9Ac+i1///Wb2wI0FbdlEeamSOO38wH/5vqkt/K8Pca/NHoH57ocoSoVv/ygRsjfmE04l9U05yb8Deyb5rqQ/oUorwAVhUOGmuMZJyjfo6D0imYnwNK9pTVmlcJjXjvZTHcJWJe409S+uyzrS7QQbh5xMgnkj1VhVKO5BGw0/DNz3IQpIGJ3+AgXWpmOZfxOJPxj9FOsPeJ0EBdvmWqO79+5ANXa8S6GEI0bGBF7msULlIuRCdYIR0d8NnwZOnPBqCTsop7gNNEWC+E0t4Q0E9EYvlzjZ9SFa6nmccw1UXbmwNd6yxV0c4LP2+oIEzV69V6hu71gJshW+1pMcAoqiZk1BSjmssrrzYvpO8ifIyo6GgOShF/f0JFv3o81NNLHutC1Y03S5Xn1dQHnBIJnvStYcPQcZTj9DZ4waUgfn1CN7GOqYwopweBJvJJw7J2G6o8MByq4XDYId83LPiiLFlOpDR5PqrdPj/zY6qsHYPKQlKN9UMV0Qpahgr3S4o5RDmF8IL3binnum7NNfQIYWez6yIQHxLJtsuzQFUJFdJuHUi2ysJecRHx9ufkPqL2J1SeCA2wHtmLqXlVDFTVeLtUaWC4BazAh8KGOxXoewuCViGcJ3a208pc+a2W37KJ33LUbVJLlgwd7jcWVISS5VcELDxNUo/AusBtQbxpwnZSdlE4D0ASnKbrlhPyMjucqN0CdftAma1jLz7fLu9V1qok4C4HV+84u1XnqXa5XCXXc52mEaZKbdxWV/5b+o5sDQiA5ur9cVZFqTYIZwW7kBcdPw9ASXXRBwIVHFNRYhC9B5F8u1TDJW6lUGDgTX3Iz97nrH63YZcy62E0iu1JvlCNF8FJQf92cdQ3qfrxeHykA9mTJpWSseg1GoFuNGJ1XHWhiX+ZwviCnUWUWncqPUS7iHHlTaGcIJSIdPap3u8tbG0O2h8/3a5S83dWF7gog3PDxZPwzZY1qQJRTpndiwYgbu3OCFNthrHk9dXVlS1LN3j2i4i0ItRZrVZ1WcdUtZCKDmBycqtGYaoP9hN8HCKpTkyn04GaGm+XCr37mPx2zXxoUpXbj2sWVWL+9RAIxkKNx8/qM+SfIfzhoG7mIWDWmYqRxhyzGajL1wEoqShmNUwrS0k1fOCQKpHHeLcomKu3tDimsnJdoWdRqoPAPwzAyDRR/va8i9+TUjekxsvlUsnSaSjqtfDXhopSBW67b9gjKKkho+vtNtXebreSik75ZQc7f59qPl/W5S87pPr5Z8WkVTjwolSUWhPXrr6milUq7aBtqHAfvF2qxMaG/tzeSipRvgI+9P18+wuhWhOWThf8AcbKSwALPSPUl6Eut0r2JEJtNhuzPFl1IKulVBdJlc33X29VNZcCxsnYbGYDp6m6iPwPqZzmPlWynBN5+CQvobul/llSbeCDB5hUD4+nA9CkKl+5NRqTdEcneqx7kqplvoCNBmKpOrgtDvTpAMxUImp/mlQcHFLRd156vKbK7AptBke8XSraTRh594SprBtI3/jxLZbKz0cvL2P/5aVoZ+vEyoi73Ljjpp6SXx9UEqaZc1CTh+vvBkasFqaqjruD4NmLMXpxiN8LuyO901BPQMyma+TD/fLXqT62OaRygE6eZhNx2cmFqeSTW7JMKit+lmpVrhcc276utx+7+varm5NUTAt2K4Bql5ALBc1esv2dfXvpTd0IwDD8rahAE8Vgg7HBXIyNkRHGgLiYOwIiAUIBJfkBh0W2/f+7zngAm7htWpVTNWqeNvbRaCATvcJ2mzM117im0h6p3eLxIppqm2eHLXgqjqZCecuVccdUPV3S8KQrfipR1bqz7eQIqr6y8KtaeBLNRwPCy8QD1ZVqO+uZVJcNm9g4WlzN4l5iVMONXWg0FURMHUcBFUPcpjcioQXEa0Ap76dKMiX/+PupJjXjmmorUyrmVSCmTNBlqUaUTr+aaWDeDt+rctu9AgNcaghkaKr8TunaO+RND5nnM4mfgFqu5tUG4QtgPL4/AzXW+xdNlkoVgTQhL5FUosaId00lv9MIcU+tsFRbXSpXh7LJIa+LyKtdaGj0SSZ06wBVxMVrClxFoXSFcSx6GEIbAEiNQdm4XgCBqbCCWgFikQvgngqnGu+2BwSfquFw2GKp8rJg1wGaCrkjEjKAThpoq+H/rhqgqKBGKb+w4wroeA/WrOt61mb7AIyLnNLnZ6TkXA2vqVCqBmlweoHfqxIJkkgkR4mEw1JJMaDmeWXAvk014u6ZKnlCl4gq9jWWKquBkvdjqicA6WHrtX9y0qg3q2AKviY/AfiFFm3SL51+xcHwe5atamBGifkSBSHG/pgKpUKWnnM8VeH2sYIJUomSYiCUKkfRVM0yewFP1SnV+x44d/HxXgVbQ3yd3gG1F5YKmaUkxtR2q4yLInmHr0eOHx7W26eslATwonZw9qsJJEfwGaSL/g4oNVBQ0DGCVOKUueunyowBB1UETp0mmCexK+9BsVSmYLU7jwBSgnoAO/ua/MRSiYA0xXEELPxUCcWJ7+tL6Qgm64CmwmKn5UddJxGkYpwjS2VsrMhjBcMf1hXiAaFU7pziF0BkBZ4K1RrJgnNmkVQps6ICu/xCBkv1Lq3QMWcurA64FbFPahLUtIGbVJprsUp9IyXlcdHfnFMdStNcE0n2bWaktd6BGHnTT5VplF3unqn4CYAxbeJppQi6+xSkGgKvHQAp89ErdcMXQCaaitH2MiGrLJj2kqViGhPknV68zZ6aeaon0gUeJNMaBqlCXJuWcn45gjcyw48VPFVue05VEUiVLy6nI5IKLfIKpB3p4KeCJu6ejWwNj1IDVH6kJ4G9WuMxeCoiUc01cqCyrv5LDxeF5vicquegqmSbe1Be+4c5dFCNA1iP9EZZHDL3vVdxP8RcRwCs1RGA7PoEYPo4tpLoudsuUCV2r8qRKmcEqdLj+QTQsuLKJZZYVJrqcobBJoO9WViv141mBRgjbrP/GddCcmkvZAHAhNhAJFWqsLZJnkUAlZY3bUm5pCpW7BOSJfp48tz3U1U2TjI7IaXXtx/T3eScapx/6JDpYGZP8KbvN53jpiZVeyxVsuTmHjPVNtBaIrY0yesQjN3c5a6pdnVKXgPdvKeaXtqTpOfGe/EpuyiZLQAxsn546LsDsscRnEFWO/i9R9sWyiLwEOvNrfulKoEby661x5m8nzECoKmmW4frgRGtdOKW5qfyaCovJWwrgKfXJvsh/2wpcfiSVcorApfHiucW0htFfs0AOL4B0VT7crlcxVW/PbG1S6o3JT4D3ul7rsBS7f3HC0yTk1ob5cPls14rleaAWcvNlR6dVirAmAssFUQMa3SqrzZ6H+JsHD9eU/VB9ddISZY9A5PutH+ZYCsn4bMVy6p2pycE1rWK0dTYVMBPNRudlONP/n2Vdj1xQ/xnaRrCBvh7DvjIGP6d3+MZuGGMv38L/D/wnerL+E71ZXyn+jK+U30Z36m+jO9UX8Z3qi/jO9WX8Z3qy/hO9WV8p/oyvlN9GX851RBnBv5Q+q9u4ND8f6PSMQOIxXBHQ3xiAKb+yTr/gVjs30mVtUCtM9AP8A0cIH8xRViR5MF8voFjt44JRURVyBOgd/CX7OZglrIGX1Iy/mTdXFcBULkAU7MBVOVP1vkPSPa/kwq1OZDWcZOqrbZ9pA6UU+XGZdPIO7jIBo5gGmctENtuIsOfpbqdnpFWAB5IDtx2/mfr5i+dsu8qnxFQRzIEtV2COThZJxtZJx++dyr+rndM9SupwN6s1/qaSkMbOJoGsQyq3AEgd+QOmCeV1RmPNDC3Gzgu0/Jnm45/4sN/I1UwfUY95OjBfKOHGIA3Il9F1n196aM0wdmQgOo/p5NXMMgTGUTWyYfvnYq/6x1TodGD6nle06N6WX/HBfBqDdOnJahNYpMENSi9gpnIACIbOPg0TTlz+Sl4NabTj6m0KSKu07Fkf+WcfvHjHhjrheJZYhtZd/DSlnabSs+l45TADn2gqTWN6Dr5cODp9lZ4iI6PQQ2vqcbRGVP+rvdKxSW2uLkAMimBLMD0K32RLW37Cs5SgMgGDj7tatnAzbAtEFJrhVOJKiFCAnguA3iXMkBWSt++S53U2XqIAcaSgf4aTLIUXXf4peFUKdICo+bgU+g/kXVehqXCvLkEigLRqwCklUeIhY5OhBkQjFdr9E/mMVYjzZWf6t0hTic840Ea7MgLf9d7peqx7Vyx9YdUw+KGtBV9897Cma3Ly/5kY7mjkkriiGzguLCYKuw+EBNxVfsxyJZOoVR7Mn/szkkCCTIFrNIaWAgIRFJNpC66RASzKEfXzf0YjUZAN8sR4JEEqT5fp16YzGzkyWJ6VD1Aaqyme7KSH9PlHRCMV0tKtyWctrNDlWRYqk26uyT50IwHsuzkXkDdMdV67WZ2DPGPfqoh+WU1fEtmCpaLs5zb91JKMp+K97pdqR/ZwHEh0RvLooo3BZhMcGNNtCCVGQe1MTEkIqDbG2DTjqSaBqnkGdBW4Oucouvm0q2WCoi66iOA1VaDVJ+uU1f9qXMACQJIMoAdq7Em4fEqGQAL0mFLLAKSCupUC2bQVN5PeAIsukY6ndbT6dKMnoEX3YoPAWzW+KDRPu+zyE2jGzjOpDqwqGJWpg3SCAzz9oQcrqky/LFuT+ooV5HbxhxAEhFIixQRr0dQOZJFuwBg5UbXfeGnKoMZVpEXDJqqQZns0MWfr1NfAjiQCkPGkBoA2qr/rQ+h8SofygJwCoBUBdVwghk01fGnpPKfm4DSDBpyuuAUh690T8TumbrJ1fZ4KurjBo5Qqul0UcVTE9UNApum2y+EUj2QLqgY6SG1hefBOaaJgcCRb8G7HjUApRUgNsdAyoqsO5qKyyOS6k/WqRf8BqbvBdLKvzEBaJFDMM6HYrQIILFUNqhCMzTjgQx+VqqO4v/Ix1I3O3DoGLVZ00MeIdtiONUfXAAFqgoILT2Dq5UzBh5CqbKXT5WBI3kqtaDY7y4+qAgIPVbgVQalPANzJbLuSKqr4AL46Tp5qi6ZgbtJFYxHUjX85ZnBjJ+Yqqfv/R85b12fAKMXwCPJnFM9VqIbOG4vLGhLC+CIM0UGkAqlgtQG9VwDIO0d4G2nrPBBww2napNdyXSIQ0Qs45F1/26qgzoIpfp8nTwVdO/3UgXjkVQyKGHCZvzsVKmmx9q4y3LBTzV3qZLLZHAlb3BOdWxGNnCEGS97bEwA+iM4j+SMZDuc6o00upkU+QEg3ngGuo6ZxUXeBFWXkuFUj9Xkj/RAwySBeD+y7nCqxSVVS0I41efr5KlsUhgM8v1IqvN4NJXyOs4+k2ww4zZV3rxPqoemJBZyYMREDn6qFrNZs2MdZ0ZcqF9SicIfbOAY5BavskDU9+fTaY6DjjNNJmSTc2gqh6ZyOgCSAiEqK4W9kwCgmriqxkFNtghS3di+R9Z9lVM3ZVGFz3ZvUn2+Tocntx1CtsmbVM4hNM5TOcG9qk2ImQu/8sEZhH+cu6TKk0RMkL1C533RWdmpxrGVMBG9ABoFs5QGVXTsTuE0+YMNHENTSeUfMd6djBd9vnBxVZ/io7qBP1DLA9Pf2Lm33USBAIzj3xUbzWwKCPWAUrRoTU3xlKotldqgJGvT6CbdB2gv9v0fYecARVe37umGOr8EaBovxvwzOAkZLrqj3VSTXOsmfDTcnXF3EGuRGe5IcUpdkDxPtbGBNDgwzsSdC+a3/+923vlEu/pfUmEO4OlqPKBfbTAet9x2+2FPKlTmEBatVmu4s4Fjd1UPpefc46/w3RR9ZxTXabhIjae5lX67O24kXs7Z4B6+U5oCniqfcv9pnH/9dT7so0X3Dh+JeyefAn80MlVmyFSZIVNlhkyVGTJVZshUmSFTZYZMlRkyVWbIVJkhU2WGTJUZ/yvVKQ6I8J4A0r+mGm2Dey2AcVigMARgkc/YS0veWkrwC0UlfoW81UNi+Rmxzhgwhwkcs0OpvtQ5Y8kvc5hkyeQwGgLdJNWoofUZBag0U0XgZDnYSjV2NukA8l2dp9KJjcRG+NcxzDp9vb7DDhwzkeqQWWUNwVRBDWkqlaXqtFiqqlfmyBPwlbn58pUDcFsfjiyKsJMCS7B9cUVe6ObzGrvupoqaulkHTAe4lqkOpbot19vXrUmSSqmkqWqeFYa6en8G4I5OgNighTcBrCJF2KmKmO1DyD1vWF3upsIIpuH7vkcPmepAqgcv7JDguTtzRar+Mk0F/TEMP09O2jMMvSskLuYQ3E8nP/9WadpWKrt/nxgN0lQlDpxZDwLTCQI5q95PVXhUC6CpYJaNxW6q4IkvKyblSvErb8NVCq6AsFH9KZVvb6ZSFK03EJaWokAgHldE3/OuaKr12nTWa5nqvVRWvaG/bbrQjN6Epnqpp6n4sqKv97yBCWsA1MgWAxiW96aqhwworQyhbu1ZVgQzmkqlezkMeshU76RC2AHVaQX8sgBNVXj8KVXp+Z5nbW7unUvVVIbwc/A2q2YMT+U1he6+VKCp1opYVtwqOGaHUsGspwCW6lt5M9UlCcdlwSiXT8E86rXeJAmlIIoikxQiZusGKGhhPOfCX6WyGYefccQOp2qMEkSkunneSGUbYWjFmpYVxRudaiRJVTVAFQeACWA31QNHxOXXqT4RmepwKsROeaoLVKZpqjnphyGQy23eACsziFST78BqDGBhBHghpX2pipcM4efe3lQaLbiqOrkzHLc/S8Wcqzn/FBRLhTOwVHhtpalWS8SpSgRovADX3jmAZ39vqvzbouNpb6ob7x4r23TQPuo59VupajGRatTQMFaVJBVEqslTkqp2sVyzVNcALBVnBlBqX6EWlZTKFTpR5NtRFNl+xKWpaqV1+AVwOfLZFYCiOjqvhKCp3F7xBUfscCpiJAhfr+ksT7d6rlV1UktSoVqwwkcAT6o/AdUu2/b8dYryFHgmaqOrOr0V6Re629bprGo2XxX6x5YGYJcWZCFWgNB9HLE/uQE2ANPTwAyxdpb+HG+pSo5T7AO1yiW46Dtdiy/gTgvASf8kADPVsY9IJbjbwPQRp0KEI8ZT/dOLwCYTbFjjr7iQ5FPgD0OmygyZKjNkqh/sl79r20AUxyNh3KNLp5SA/4KSru0f4CGjKPgP6HD1JhwMRt7UgysGG4pUQqm2oLXgpV5qaCnFLi2lkD8g0DHkHyjpj6Xf08OxhHFw4iE++X2Mn+707nnQh3cnWwOrsgZWZQ2syhpYlTWwKmtgVdbAqqyBVVkDq7IGVmUNlqm6W0rKqepOGSmpKrd8sCprYFXWwKrWwEvc4BciDQ2+zOdZ1eqqhjFdg7Gkgfe0WXjWLSFEXLyJ2TzZVTRdwnsVjPEDtDiDVd1Mlffxc3SlKpouU4WBPzlBvIL+N3QSq1pb1VCmEpdUTM8loohdb3ouQuxTAjGvCskQQmdLZkl8TyiZNagfUiWWHEUueB5dKGNJopSI3RysalVV/S9R9rjfRl5LIvZPFQboMHN3OOuFSTPzgcUwYUrOFGKuqyiJ+stKLKEdsvsCUoOsdS8Ujiu/YIpVrawqjV1jhC5+iGiEYe4LEOe7Cs66CiHMZsF3lTurKEmeqJLKwO+f5sbLVxj6YvK3uP+xqpVV9TsCTJqLqjAunlXvjkzLZXYkqVpM+iF+iCrnqqLqs8obRe9+pqtY1U1U0WPFUzdbX6e4AZ4pxLwNHEJdlRqbMalaSLr902nkUuVc1Z84GKOKu2o9VThCSFgquv8kopDLXiu+dsSnjnSHpglJ1WLShUmqpAwwvr0PQ8ldtVl/gclfEa8FtzAsUyEWXwFZ1e2o8tFN14RVXUPVweNG1XYau/e3QNWjxn7dsZ36w4O90qu6t+uUgyd7ZVd1aG9L9Y6TJDkeOMSDw7Krqjq2Mmgno9Eo0ZX6fjavsqoNpddu9xyQ6Nf1OqvaYHbaeuBUdNvZ0XpQc5wtUiUcARwidxX4bCIDrZNEa93raf2jVtsyVaRIzNhsVf/ZO7cQJaIwjndolx2SZSGCLLrRPSToMhDd74yBEFkPzsAYQQ+xlKFGpouIFREGQrir3WiF2th6CEmipbALdIGCCio2CqILBPVQTwVRD33/cxy1sq0o2bHxX535nDlnnL7ffN/55szC5vdwJdihYNBvX2UhVBIroSr9ATVOzoywmoqkuoJAtcE6qEADTEq2oIaNSaOqaw8YESnSoWEWQsWkciM4Gf/MimofGO1p8mOze461EqDExW2ouNe0CZAdQlQlqM0G17VYqawQ+U60AhEzd1Sxsagn2MVsNnhwzRwrFetSOfPVCSrm2B3Mkvz2NdMWWQsV8AhTqLjXtAmQORz7EgcPHhw2bc4iZiVU9agVy+kXakxrmbmCNVCZXg673e6A8e9Q7WsyhxL/GSquf4oqMdQsSjRQDYQKB8yipgaqX6KyNQ2+bA1Uv4HKFOVG00CoXB3U9OnUlHdAyQDjysmMdWrsl3LdUJjK++3vYpCnmxo17bymMPF5o8xUftI2xuVMiG/2+BmEjth4Zd7XuCTaliW+wOhuOVT44fWUQv/3s2TAnq/AsVk4FMYZBd7jfmUHDsvsO2Gf4cUeHWRxRijA/e65mBD0N9NpMzZ07ZSETsn8SOwZDUTfnRgYuihTP121nZU413YFF5YWF5puGy9YojvIWwvVNu4PbjvfvpSLex/KzOPTGJf6wCeFCvIAqOC5Nz6JVOji7o/IYIeg8t75LIWOyuATCu+gRof3b+us83kHvrgv/Pa2dL2LqTTY5pWJAK5J4E7j0p5cJN4i8CL8NCnA40rnZIuicj195r2ACEMocd8F4J+bUXjfwJLr7f1CRra3V2Fk9xdRqSkFwWLc/pDGXC+jmRf+mFKMjihZziiZewsdSZt3Zwe+IxBTIld1ESaEAKHGkqciLUpMIUAq7XgBVEb4txgxjs1mxVJR5czAq8738DbcwCedOOWiK9sw3ahS6nRXBapFQWXGfZ3+slw/QZpxXwEqIhCR25UenUZURNXmx1EW2R178lrnqPbOz9OdATOp0fxH/WgcfbNKfHkCDuloNVc0ys7tuLIjpeD2Kdw0okoljO24xqRkSLMOKo8vdIn82hl6qbi2xREegManHjiV3+xbjakHqOz9jH14x/GI2NK5ndHpJMVe8CtHBRLJB76UAih0NA0+QPV4vleOvL3VgXF0JK1SKCelUxiD1Bt7HCWkuTeUFlnP9SeFIirKpVKao+JzKSoea5UVagB+bVdgGpP9t6jkNhFVP6CK9yLCuA04rrxIdZ7b5TuetSHOjARIxSFHdU+PPelWCx2UIVEyqOlMOM+cSL6fMAyEU3tfTeyGhXGgj6IFF8pREdA7Es1w1kLVZ8MN/zzP8RhzFzwLYzy/lwNw1Q8JMN5v7ydaZVSsrwALkWJElSvfp/fpcTqDQMVEAnyOG6DIf/9u2g3GqBazSHIA5GqJvn05XyY87ZiyPP44Doqy4hRP0h6qNqxVrHu6k6K4K6MSscaNCEpvDTmtsqx4J1IfMevtv/+ujEqdiCRJRAxUztvkaTxoEQoRDjgTmcYDHKqGmyVUOx9u1dpbYEZj50LPvG/OKG3UOSfTqB49jupQjEXr8QWs9VyF51LnR59IV6pUquGoYUleWUMC1cCK0ESCIVoPxox3nhVjk8Y014mNC6UCOJJU3kE8z6Xg+ldnFFXScGs47zzYBhSuPMpFPhrJDqgg6ovY4tc36KiOhE9e5joZPvIPUDUWlmqEakn4WHOFjoWXNFCZE1UJVBnWrQYqE6I6crm5ik4uqSEqrIjWswYJ1ePm6jq/pIaoUOc9LC2zBsRUn2b1osFBteR88090siaoBJ5HPqweiTK9jVfsSY1l6ibUBgcVst9PdLdGUUW1dVzG2wRCFVNcN85ppddBdaJBQRVuHkCna4Wq/PDrurGXFlzrbf6qJSrHApKjSknRPKC+m67mVTnz0kl/hQovP4CKL9rWjWqGasH61qLWL/ju0MmqhI5VT4HT3CsrPi1cyzej3Av+FJUqkdJioQdrO2/8rM5UI1RjtxOjpdtJS8nYPvbXQXX+RMmsXLhY5h5VOXaNezE2xyf8cVSBUJQxLLR1U9breebdmWcsmaqbqapGqBybWlvtk4U92d7auqkyDd6tSmpsGVW43He8ezrflnjNck8dMmS1e7ihub+NKqMXUeXuaOL1fDerK9UE1djZrbMdFeDoY0VcHatKip0ofyh1HbNrCrVgM9LYNYJQjT6+ZcsW9xZo3O++WpQCfME0pKMK5OrUWF3pKztnEtpEFAbgeXFrrZmaaMaoGZdG49Kmi0ujcanYGFyhjgoqLgSCGEGbg2AURCqmKbVeCipoDWKLRRo8SOxFFMyhIhSPRUVRD253Qbz5/+/lNXaa0SZmdLT9Ds4kHqbk4//f//735umiqtEckIeoC5gbf5r/OvoIqlJnwLmRqQJjqbJFYKwCgYpVEFYq1rHG0m+rWosJT50Q1/J7VKKmkxDS98NHgbIDTHFcyjKBM31AGFNVCFUYQ5KgAuzJ2pOq0wTpGDpYebcpU+o9xYuq529dOL1sigKVoFwJeC2RpWOqCqEKtdSxG+/u4uLdXp4T12qpwoGKkGun76vqiipFicSVqsqF85RFxZ7VWxWrXF1dDWV6rfDbqmLBDOQfQQdVu9JB5SiiOAREMu/KoupRX0c6/WFZqFJlQSVxzHsRD1aSVXhrBVUyAqroNWdVLW2hqDiUaKithRgeHVTVmdlIFWeq4qxkN9cNU9UBia8LOrSEyHBRqWLIygauCoKJqZqs/MjsXFTFgj0iIxHlJERKd4/Rw0sHVWYzvViL0lj5typVkPew7uuAy6MJGqpsyhGmisJU1UyjKFZ6sY1cVUuoGyX1tAVjqmzY1pNAW6EmYmD0U1XMVRXzb9UVYBe6uk9DayidAsen2Iapgn/zGataMO3daNOy0dR2A//fwInwj6pSz6s6OqFGl8kz7YbtvLigSoCoyp+7qhiI6A7/PGqawhB1IWJU9BurariqGjqzMtdl61Y8ozlQRUemQlFmZlQdiTuZqmUbclYVAlFPyS+JPYXIekqMiY4VYBkzVcYrwKw9wPt9MqjTGKrksogto8qt2FBVwyylOkdVseiIBcRChg0sHVRJ6S6SdwaamuFNz6ukXy5XqftKOyuxqEBVtJ2+ToHK3KPEYQacm6pYQrwRIyOlKSFGY8SA6NGtMPPpbo3DUcOnxWZZY7lea3tF6ZaI4ma3VUfnWCy7I9PhtlKp3JljWdEiij25/PZNUTFhxFJQjx5gKe0iqfq1pRrblTSDaqoy3SkwHFWRSCRehlOoGdhq11Y1rr9ZrQpMhUluwOTLgJWgHqpkuuih/iLXvRW1KEqblRuGqWq+Ba5ujW8eouqrKLYRFdd6U6lU7zWiSbhArmIhmGP3BI2rChvpgXLVR913LKGr/nFU1g+q3qRNSbgqvZFQ7hxg3CFaYMWYbw70S5K0kTCiIiVqXFW4mBiQeEjZA7DQqP8+QCarhMq6PKjqPct+5t2bduyYs9pEgBcf0VMqmfr4ghCtAxF6xATJB/vqerfb7TLzRMoI8cdkTjvAJxlBFaY8c8BeCtgCZpr9VK66sps6LfwurVwWVRUWXxHA7tnZ3tBg32MlQApNfawgpw+kCJD9QIRYIq+a3eRy1trb2xs9dvgQFAe5SADYfngy/brkmfO4cerqQQOogo4CyGLU+IUsdGUfpwrA5Vsoq6QVVEH6CxDA5SyfuM7ntbnrYKA6gCSpsmvaByK05DVcWXw2TH6rnKtZUHGeUlX3Hh7nQbX38Jl7RZdaDaEKsqBUCkjlQnY6h78J8lwoDONRVgmo6hFDOAWW6u1LoM9fb3L4CHkCye9JsoIqe0K0D0QIizdIzvgcDSwP1vsJiQ7WM21h+rLclc8YVfRFyWMvb8Ju37kGUfXr96tUIbVeKBDNJUzVa1E0UVXu9kb4jSplJ1OVJEAvU6V5IEIsn8rC51xAkHa3pFIFnPv29jjBBwXvFb19/An20N9e8W+oAjq70qF1v6tTKBitNKiaJ08KiyGqyuRqJxBVFtMOC3xitV/FAYBoHogAQEjmrcru8mNcDhIk7KQKpopsxxft+85uPvuPRJVOsLFqPJYVr8QgqAJ8lnLibJR3uSQMJ1pUJMFULyGaByLgaNWdx1jVLhCypIGOVRdFTjfdiZ0uK/bTd3wf3D11oejKqFZF51a3WmmxDvmPqTK59tj97YF6OjZUpMBVCir2VAXRPBABySMDbnTtqV27yubwSDTvZYIKOYfP4bw4tAKPzhrFqlpLaPITUNVj8T2qQkxWmO546gilAuIK6AVTmgciIFH4iXPFb3Ut3+N22Qkl2C0CiRaiUrUPomq0q6LJrz/drfgihlAVw489BM6dZDL5hAA/PRAhLIZJzmzcBW0RE+HAjigqCseq2ysg8+GD9t6kjwT2j1pV/Wz2q1KVL6jKQPxPqprTyW9M1UhVeevMw7EJusMXQcZUjVhVqTkbgv6Mx2GKwcoKrsrvGySX/kDIWNssdFFVKqjRW5X6zxhaAUr1zjQWHxk5UdFQuziNokpiubOgqnBexRtLMqXc6Rs8xDlz4vI+jTpMFA21x+KvqLLNwl+SIyBVHlyNn1pQVdit4KoIYLLIVBUuFe3j/aO911s1Vo6wW2Ek/oCqmmGqygfmwd6JNIoAzFYa8DIws6CqsAfIVZmIaaCSq8q8dE8P3mPtdTUhg+0y012Vd2Dp8ARYG1/Dbxuoqup5O5cOUjBVsFz1Oq3KGZEGinxcVdMKrmrvh3cn2HKfCuysG2vfku6qBoocKlXINHmoqoijcTHwnb17j3EZDgA4Pv1jZmFV1W5zy4aZjTFs2GHDZhsjM6wlIREb5haPIYh4nVyELDmP8cf+EBISRBDxCMmZnEQkJB5BCOIZ/IXEI/GfxO/Xbu3Wrud1jcZ879Lr6bV/3Ee73/Xa3kE4Gd5pVMgJ3ccSFbleowl1Yal2gRMG7IlT9onrcM8SdwNcEqGo5KZyaDTcXiWMp/LPsqpgTZbOfXLZIt2xZOkAiAEpSMWfoIUVns9nqHbNFe9Uyhr/yU41GF5fK6SK9e/fH4wtZrIBqtGzZKJCMrq3/LBCTMX92YfVqHikfqCLspKXaiw47LgoIZXaijepVNj6JiZAZUs1yUT17KmuFVIRe9nKVE82LWdesgBV7QPgSt0xRY3U5aQy2AbDw996MBUfABmq/uwBUK+iD44HVN1ATXBCdCIVsghezUJ6h5aaVBqsH10HqZonS1G1KvD6WrmoqPUam8qgWT9C1SEVG62SjQr5BL7pQZIr0qXimUvt55g/FaB5uQYMNARSrV2UllxUpoPgxiobM/qTpuKT6QAIUrf++vjghhKl5DsAjrVp1oPB34+pRjX5ZKXq0vqL9xfsOKFIqWBCLip4DLSppKkmlqmsB+Xdq5irXA/8/I7VelJ3UnGvUyDU91dO11qapg7Dmth5b295qYYMgne36TI/GtDx9wyfUNjYLzgDlJ2B/BUq/ay4Cp3VcxzINivEUPWFHWSm4zuViqn5mO7YJ7WwQTXuBWZ3KbWSSqCgCPJ3qGJaMGmYOAY0GCyBVCG+zqVCmJ7BO+wzSFVqIVTmWPllTY1I9ruL/jR5qLKoMEAlf9JUsEVvmedWSFIt4p5b8edUvkQP2ARirNKpxCmACkFeZHRQ4+MiEdWiVuikg0+D6QSqxqQpOQHWYDURiqYagNaIVEklPxXfs5VvdbCnBzKgTyuZDpzUMYQ3ANFPU0V8PlJi0VhLQ4PVAsMbJuAJJVP9dvJTQa2Pmac6YU8zH+eQpRAx1eM3b94cr/JQT0iaAkPTtajG4klrTFsKn2Ai/lP9EhVtqqq5mdurMt+am60VYdafoFLj5nCgl7+PuwZVsgeuxbDBXq+XojEMb9D6/lP9CpWpsaWyRhP3WkVaW05XRtaiunDhQiXVjPDQXqHB3qiDMouofJYeGIbZHUy9gBWe/E/1K1SW/NrK8haOCsXbLl26VGx/8OBBexHMoThPFelhxfEZYirDUDdFdYva+/gpEVUWB1J+hx0Ud4zzYFgPjNsXu/5RdUIVY6ja2spUMZ7K1Hap+GB492E9Y9RDYIWaOCrSlE2AUfer8+c/f/58/jzBeRDeaHS4fnjKNkZPCqnwWDhs7qeHu9U4Y79u4bAljJYWUV3+qK71QaXN3wWtbWlpWwtn8lqeytJWfD1ixLCBRvv22INiEbVwVHgCBZm0n9/DJgbMhtIGE/Z+fR2OqTb3QOPERiEVTdO9Ut53sGjKSNNhupJqkOAdTsSJvw78U6o+qLD8LRCg2nQGzuQxjsoQa9vfMjY/zD3NvX37uJ1FQ4yjMmVRA9OrL1++vCIIC1HeYK/evXu7XFF/t6g/LaAyQappbqMd5J8WpekATzWoZuC3m4PAXf5wdtfcQdLVCVU4fw9068zl+2fgTD7MU2nXFnfeb8F6xRobXrcXiwYtR2VRM1AEQYS/TCRGj9aWqKDV8FTKaLSnjHF/spqqAQsEAno9FY/H3d2GU4GAJxApLRooYQD+Eu6RtZCq+dH8sxrQ1ZF1TEXnz4D27z/Dlqc5KgJbu3Pnzvb2168ftO8EERhHpR0BnbJXQBfZydl55Q1OiI9zOHq6+gIrQxUVGabT6TF6u3vgwLg+ak6nzThSpgpKNWVzcPqqYHDXwmAwtzGYux6sVd1Q7a+skioMqfiIME81gQDdWcJ3tmLYjVJTe7pcfe1+sooKsWDpdHoiewCEUma0gmqI4A10Ct7IuE1zFVscLGyFVNPvQyrxV46rD6pAflNl+QBHNZpuqVo0mi5RzbtykWkpB7V0yVeeCmTqanO5pnpmVFORYSzt8YQmUdRQj8djNlsRjmqIRLnr7MfC+RXw8PcEfiquTqh64dV5OKpRYwKwMd26eZmZwdzPVXeWfoAtqaB6wVPBUKqPyxgbEeGpYIkARgMiJo8Zi3RMNR3osO0ZUtg6pHB7I5CTk0opSVGxERRFSfwSJG2zxQWna78yO9TSEhN4X3p2nvC8w4jR2sFaFOWpYIYAHTaPGTNpYihtxiMIT4XMFr0xLVtII7DC1mV7chuR3HWk1lfWEVUEDwEqD1aDCk/ZQCm8iurFxaWCrgjtYagvEcd4DxiJe8AAMBqlaHXlDuedXbvc9dnL9sCZwrYts3Mb4ee16tcJVPDxlgppewdUBM4WEVOhCbYqqnnbBFIX74io2GYMHcpTsVhRGB1BqqgW1Cx3bfeCBYe2gLnC6QXLNAsX5K4vqNUvUiniNanDxFSSqYdIX3MHT0Js2CYoK7XBEFpF1ZjN+mHpLFFFNa9G01fs2w0/LtMcnle4yc7tmVerf54q4ZSScqoRSarEWOm1nD9cRMZiIVggliwvSoCJe84f5fjXqXwoIhFKolJSQwjptQy/tcgHJtbuf5T1X6dCDKRT4huLsM/yEedMOCXWcqKGjjbYwVoK+X2VMoNUMDKBNiKCGtGEAX5IzHCKL5AkExGptbKGDjcovdZ/qh9SwSIooRZEoL7y/3fxBZKkU2otMtLhBqXX+k/1nT06JgAQBoAgNqME/w7BQef7JhZyqtqjKkNVhqqM1apB72bV75mjKmOy6maqMlRlqMpQlaEqQ1WGqgxVGaoyVGWoylCVoSpDVYaqDFUZqjJUZajKUJWhKkNVhqoMVRmqMlRlqMpQ9W3IgNGoGjIAFFWLuEfBEACLgFE1CoYIGI2qIQMA/gMTWYqL0GEAAAAASUVORK5CYII=";
},function(e,t,n){t=e.exports=n(24)(),t.push([e.id,"html{font-family:\\\\5FAE\\8F6F\\96C5\\9ED1,Arial,Helvetica;-webkit-font-smoothing:antialiased}a{color:#333;text-decoration:none}li,ul{list-style:none}.seting_clear{clear:both;overflow:hidden;zoom:1;float:none}body,dd,div,dl,dt,h1,h2,h3,h4,h5,h6,input,li,p,select,ul{padding:0;margin:0}.seting_mask{width:100%;height:100%;position:absolute;left:0;top:0;background:rgba(0,0,0,.7)}.setingErrorBox{position:absolute;background-color:#fff;border:1px solid #ccc;left:0;right:0;top:35px;bottom:0;margin:auto;width:498px;height:393px;display:none}.setingErrorInfo{position:relative;left:10px;top:10px}.setingErrorInfo_title{color:#ea0b02}.setingErrorBoxImage{position:relative;width:426px;top:20px;margin:auto;height:290px;color:#fff;background-image:url("+n(22)+");background-size:100%}.setingBox_info{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;width:500px;height:430px;font-size:14px}.setingBox_info .setingHeadline{height:35px;line-height:35px;background:#3b3b3b}.setingBox_info .setingHeadline .setingHeadlineTitle{position:absolute;left:15px;color:#fff}.setingBox_info .setingHeadline .seting_close{position:absolute;top:14px;right:15px;cursor:pointer;width:14px;height:14px;color:#fff;background-image:url("+n(21)+");background-size:100%}.setingContent{width:100%;height:395px;background:#fff}.seting_left{width:130px;height:395px;background:#f8f8f8;float:left}.seting_right{width:368px;height:395px;float:left}.setingInfoBtn{height:42px;margin-top:15px;text-align:center;line-height:42px;cursor:pointer;position:relative}.setingText{width:100%}.setingBg,.setingText{height:100%;position:absolute;left:0;top:0}.setingBg{width:126px;border-left:4px solid #fff;background:#fff;display:none}.setingInfoBtnActive,.setingInfoElectBtn{background:#fff;border-left:4px solid #3b3b3b}.setingInfoElectBtn{height:50px;margin-top:20px;text-align:center;line-height:50px}.setingInfoBox{width:100%;height:393px;background:#fff;float:left;position:relative;border:1px solid #ccc}.setingInfoTit{width:130px;text-align:center;background:#fff;position:absolute;left:55px;top:18px}.setingInfo_border{border:1px solid #dfdada;margin:25px 30px 0;font-size:12px}.hint_tit{float:left;line-height:35px;width:inherit}.hint_tit1{line-height:30px}.hint_tit2,.hint_tit3{line-height:35px}.hint_tit3{float:left;width:65px}.media_hint{border:1px solid #dfdada;margin:30px 35px 0;font-size:12px;position:relative}.media_hint1{margin-top:23px}.media_hint_tit{position:absolute;left:30px;top:-12px;color:#f1b555;background:#fff;text-align:center}.media_hint_tit,.media_hint_tit1{width:inherit;padding:0 5px}.media_hint_tit2{width:inherit}.media_hint_info1{margin-top:15px}.media_hint_info2{margin-bottom:5px}.media_hint_info3{margin-top:8px}.media_hint_info{line-height:20px;padding:0 25px}.systemInfo_oneself{padding:20px 0 30px 20px}.systemInfo_config{padding-left:20px;padding-bottom:10px}.soundSpeaker_device{color:#2c96de;text-decoration:underline}.soundSpeakerTest{width:110px;height:30px;line-height:30px;text-align:center;color:#fff;background:#f1b555;cursor:pointer;float:left}.media_facility{border:1px solid #3b3b3b;width:160px;height:26px;float:left;line-height:26px;cursor:default;margin-top:5px}.media_facility1{width:145px}.media_facility2{width:160px}.microphone_volume{height:35px;padding-bottom:10px}.microphone_info{line-height:26px;padding-bottom:5px}.camera_list{padding-left:20px;line-height:35px}.camera_list1{margin-top:20px}.camera_list2{padding-bottom:10px}.camera_list3{padding-top:50px;padding-bottom:30px}.camera_list4{padding-bottom:10px}.camera_list5{margin-top:16px}.camera_list5,.camera_list6{line-height:30px}.camera_video{width:80px;height:60px;float:left;margin-top:5px}.camera_img{width:100%;height:100%}.setingInfo_userName{line-height:32px}.network_velocity{float:left;width:60%;position:relative}.network_info{float:left;height:35px;width:100%;line-height:35px}.setingAll_list3{padding-left:20px}.network_detection{color:#fff;background:#ff755a;border-radius:8px;display:inline-block;padding:2px 5px;text-align:center;position:absolute;top:5px;right:-54px;cursor:pointer;min-width:25px}.classroom_list{padding:50px 0 30px 5px}.classroom_list>span{float:left;padding:0 5px 0 30px;height:35px;line-height:35px}.choice_classroom{width:60%;float:left}.setingProgressBox{width:205px;height:32px;line-height:32px;float:left;position:relative}.setingProgressBox1{width:210px}.setingVolume{width:35px;text-align:center;display:inline-block}.playSoundSpeaker{position:relative;width:140px;height:20px;float:left;margin:5px 0 0 20px}.soundSpeakerTestProgressBg{width:140px;height:20px;float:left;background:#d9d9d9}.soundSpeakerTestProgress{width:50%;height:20px;position:absolute;background:#4c4c4c;left:0;top:0}.speakerProgressBg{position:absolute;left:0;top:0;width:145px;height:20px}.speakerProgressBg li{width:5px;height:20px;float:left;background:#fff;margin-left:5px}.microphone_volume{width:145px;height:20px;position:relative}.setingProgressBox .range{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:160px;height:6px;background:#9e9e9e;border-radius:10px}.setingProgressBox .range1{width:170px}.setingProgressBox input[type=range]{-webkit-appearance:none;border-radius:10px;height:6px}.setingProgressBox input[type=range]::-webkit-slider-runnable-track{height:6px;background:#9e9e9e;border-radius:10px}.setingProgressBox input[type=range]:focus{outline:none}.setingProgressBox input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:12px;width:12px;margin-top:-5px;background:#9e9e9e;border:2px solid #4c4c4c;border-radius:50%;transform:translateY(2px)}.setingProgressBox input[type=range]::-moz-range-thumb{height:8px;width:8px;background:#9e9e9e;border:2px solid #4c4c4c;border-radius:50%}.setingProgressBox input[type=range]::-moz-range-track{height:6px;background:#9e9e9e;border-radius:10px}.setingProgressBox input[type=range]::-moz-range-progress{background:linear-gradient(#4c4c4c,#4c4c4c) no-repeat;height:6px;border-radius:10px}.setingProgressBox input[type=range]::-ms-track{height:12px;border-radius:10px;border-color:transparent;color:transparent;background:transparent}.setingProgressBox input[type=range]::-ms-thumb{height:8px;width:8px;border-radius:50%;background:#9e9e9e;border:2px solid #4c4c4c}.setingProgressBox input[type=range]::-ms-fill-lower{height:8px;border-radius:10px;background:linear-gradient(#4c4c4c,#4c4c4c) no-repeat}.setingProgressBox input[type=range]::-ms-fill-upper{height:8px;border-radius:10px;background:#9e9e9e}.setingProgressBox input[type=range]:focus::-ms-fill-lower{background:linear-gradient(#4c4c4c,#4c4c4c) no-repeat}.setingProgressBox input[type=range]:focus::-ms-fill-upper{background:#9e9e9e}.systemInfoText{font-weight:700}#MediaSettingDeviceMicAutoGainNo{position:relative;left:50px}#MediaSettingDeviceMicAutoGainYes{position:relative;left:6px}#autoGainSetingNo{position:relative;left:44px}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;r<this.length;r++){var a=this[r][0];"number"==typeof a&&(i[a]=!0)}for(r=0;r<t.length;r++){var o=t[r];"number"==typeof o[0]&&i[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},function(e,t,n){function i(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=h[i.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](i.parts[a]);for(;a<i.parts.length;a++)r.parts.push(u(i.parts[a],t))}else{for(var o=[],a=0;a<i.parts.length;a++)o.push(u(i.parts[a],t));h[i.id]={id:i.id,refs:1,parts:o}}}}function r(e){for(var t=[],n={},i=0;i<e.length;i++){var r=e[i],a=r[0],o=r[1],s=r[2],l=r[3],u={css:o,media:s,sourceMap:l};n[a]?n[a].parts.push(u):t.push(n[a]={id:a,parts:[u]})}return t}function a(e,t){var n=g(),i=y[y.length-1];if("top"===e.insertAt)i?i.nextSibling?n.insertBefore(t,i.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function o(e){e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",a(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",a(e,t),t}function u(e,t){var n,i,r;if(t.singleton){var a=v++;n=m||(m=s(t)),i=d.bind(null,n,a,!1),r=d.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),i=f.bind(null,n),r=function(){o(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),i=c.bind(null,n),r=function(){o(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}function d(e,t,n,i){var r=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=E(t,r);else{var a=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function c(e,t){var n=t.css,i=t.media;if(i&&e.setAttribute("media",i),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,i=t.sourceMap;i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var r=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(r),a&&URL.revokeObjectURL(a)}var h={},p=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},_=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=p(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,v=0,y=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=_()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=r(e);return i(n,t),function(e){for(var a=[],o=0;o<n.length;o++){var s=n[o],l=h[s.id];l.refs--,a.push(l)}if(e){var u=r(e);i(u,t)}for(var o=0;o<a.length;o++){var l=a[o];if(0===l.refs){for(var d=0;d<l.parts.length;d++)l.parts[d]();delete h[l.id]}}}};var E=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()}])});(function(){"undefined"==typeof __REACT_HOT_LOADER__})()}).call(t,n(10)(e))},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){n(this,e),this.timer=0,this.delay=1e3,this.counter=0,this.callBackDelay=1,this.callBackFun=null,this.isStart=!1}return i(e,[{key:"addTimerCallBack",value:function(e,t){this.callBackFun=e,this.callBackDelay=t}},{key:"startTimer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.isStart||(this.isStart=!0,e&&parseInt(e)>0?this.counter=e:this.counter=0,console.log("startTimer",this.counter),this.timerClear(),this.timerStart())}},{key:"stopTimer",value:function(){this.isStart&&(console.log("stopTimer",this.counter),this.isStart=!1,this.timerClear())}},{key:"updateCounter",value:function(){this.counter++,null!=this.callBackFun&&this.counter%this.callBackDelay==0&&this.callBackFun()}},{key:"timerStart",value:function(){this.timer=setInterval(this.updateCounter.bind(this),this.delay)}},{key:"timerClear",value:function(){clearInterval(this.timer)}}]),e}(),a=r;t.default=a;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"TimerCounterTool","D:/work/PCLive/src/libs/TimerCounterTool.js"),__REACT_HOT_LOADER__.register(a,"default","D:/work/PCLive/src/libs/TimerCounterTool.js"))})()},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=n},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=i(f),p=n(3),_=i(p),g=n(2),m=i(g),v=u.default.getLoger("PC-AnswerApe"),y='<li class="themeTrendsLi">\n                             <input type="text" class="themeVal" value="输入答案" maxlength="26">\n                             <span>&times;</span>\n                           </li>',E='<li class="themeTrendsLi">\n                             <p></p>\n                             <span>&times;</span>\n                           </li>',S='<li class="resultValueList">\n                        <input type="radio" name="result" value="{value}" data-val="{index}">{value}\n                    </li>',T='<li class="resultList">\n                              <b>{ele}</b>\n                              <span>{_ratio}%</span>\n                              <p class="staticPlan"></p>\n                              <p class="dynamicPlan dynamicPlan{index}"></p>\n                         </li>',C=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._questionObject={},e._isErrer=!1,e._showPage=!1,e._maxLen=6,e._minLen=2,e._minLen1=1,e._countNum=0,e._brevity=[],e.timerList=[0,30,60,120,180,300],e.isCancel=!1,e.isHide=!1,e.addEvent(),e.init(),e}return o(t,e),s(t,[{key:"init",value:function(){(0,m.default)(".slelctShow").on("click",this._slelctShowHandler.bind(this)),(0,m.default)(".answer").on("click",this._answerHandler.bind(this)),(0,m.default)(".themeHeadline .iconfont").on("click",this._closeAnswerHandler.bind(this)),(0,m.default)(".themeUl").on("click","li",this._answerLiHandler.bind(this)),(0,m.default)(".themeList").on("mouseenter",this._mouseenterAnswer.bind(this)),(0,m.default)(".themeList").on("mouseleave",this._mouseleaveAnswer.bind(this)),(0,m.default)(".themeTrendsUl").on("mouseenter","li",this._mouseenterAddOff.bind(this)),(0,m.default)(".themeTrendsUl").on("mouseleave","li",this._mouseleaveAddOff.bind(this)),(0,m.default)(".themeTrendsUl").on("focus",".themeVal",this._answerFocus.bind(this)),(0,m.default)(".themeTrendsUl").on("blur",".themeVal",this._answerBlur.bind(this)),(0,m.default)(".themeTrendsUl").on("click","span",this._answerListRemove.bind(this)),(0,m.default)(".themeAdd").on("click",this._answerAdd.bind(this)),(0,m.default)(".dynamicRight").on("click",this._answerSubmit.bind(this)),(0,m.default)(".inputErrerA").on("click",this._inputErrerClone.bind(this)),(0,m.default)(".resultConceal").on("click",this._resultConcealClone.bind(this)),(0,m.default)(".resultHeadline .iconfont").on("click",this._resultConcealClone.bind(this)),(0,m.default)(".resultTermination").on("click",this._resultTermination.bind(this)),(0,m.default)(".referBtn").on("click",this._referBtnClone.bind(this)),(0,m.default)(".abandonBtn").on("click",this._abandonBtnClone.bind(this)),(0,m.default)(".resultListUl").on("mouseenter","p",this._mouseenterResult.bind(this)),(0,m.default)(".resultListUl").on("mouseleave","p",this._mouseleaveResult.bind(this)),(0,m.default)("body").on("click",function(e){(0,m.default)(".layerBox").hide(),(0,m.default)(e.target).is(".themeShow")||(0,m.default)(".themeUl").hide()}),this._renderDom(),this._setDefault()}},{key:"addEvent",value:function(){h.default.on("update_answer_question",this.upDateAnswerQuestion.bind(this)),h.default.on("stop_answer_question",this.stopAnswerQuestion.bind(this)),h.default.on("start_answer_question",this.startAnswerQuestion.bind(this)),h.default.on("update_question_time",this.updateQuestionTime.bind(this))}},{key:"timerCounterUptate",value:function(e){(0,m.default)("#answerCountDown").html(this._newTime(e))}},{key:"_newTime",value:function(e){var t=0,n=0;t=Math.floor(e/60)<10?"0"+Math.floor(e/60):Math.floor(e/60),n=Math.floor(e-60*t)<10?"0"+Math.floor(e-60*t):Math.floor(e-60*t);var i=_.default.localConfig.answerCountdown;return i+=t>0?t+" : ":"00 : ",i+=n>0?n:"00"}},{key:"upDateAnswerQuestion",value:function(e){100!=e.type&&_.default.userRole==_.default.USER_HOST&&(this._questionObject=e,this._showPage=!0,v.log("更新显示答题结果"),this.isHide||this._showResultBox(),this._resultDom(e))}},{key:"stopAnswerQuestion",value:function(e){100!=e.type&&(v.log("答题结束",e),this._questionObject=null,this._hideAnswerStudentBox(),this._hideResultBox(),this._showPage=!1,this.isCancel=!1,this.isHide=!1)}},{key:"startAnswerQuestion",value:function(e){100!=e.type&&_.default.userRole==_.default.USER_NOTMAL&&(this._questionObject=e,v.log("收到答题消息",e),1e5==e.timeLimit?(0,m.default)(".countdown").css("opacity",0):(0,m.default)(".countdown").css("opacity",1),this.isCancel||this._showAnswerStudentBox(),this._answerStudent(e))}},{key:"updateQuestionTime",value:function(e){100!=e.type&&this.timerCounterUptate(e.timestamp)}},{key:"_setDefault",value:function(){(0,m.default)(".themeTrendsUl .themeVal").val(_.default.localConfig.inputAnswer)}},{key:"_renderDom",value:function(){var e=["A","B","C","D","E","F"],t=(0,m.default)("#themeTrendsUlA li p"),n=(0,m.default)("#themeTrendsUlB li p");(0,m.default)("#themeTrendsUlC li input");m.default.each(t,function(t,n){(0,m.default)(n).text(e[t])}),m.default.each(n,function(e,t){(0,m.default)(t).text(e+1)})}},{key:"_resultDom",value:function(e){var t=this;e&&!function(){(0,m.default)(".resultListUl").html("");var n=e.totalUser,i="",r=t;(0,m.default)(".attendNum").text(n);var a=0;m.default.each(e.options,function(t,n){a=e.answers[t].percent,i=r._format(T,{ele:n,_ratio:a,index:t}),(0,m.default)(".resultListUl").append(i),(0,m.default)(".resultListUl").find(".dynamicPlan"+t).css("width",a+"%")})}()}},{key:"_answerHandler",value:function(){this._showTimerList(),(0,m.default)(".themeShow").html((0,m.default)(".themeUl").find("li").eq(0).html()).attr("data-val",(0,m.default)(".themeUl li").eq(0).attr("data-val")),this._showAnswerAllBox(),this._showPage?(0,m.default)(".resultBox").fadeIn(800):(0,m.default)(".themeBox").fadeIn(800)}},{key:"_closeAnswerHandler",value:function(){this.isHide=!0,this._hideAnswerAllBox()}},{key:"_slelctShowHandler",value:function(){(0,m.default)(".themeUl").is(":hidden")?(0,m.default)(".themeUl").show():(0,m.default)(".themeUl").hide()}},{key:"_answerLiHandler",value:function(e){var t=(0,m.default)(e.target),n=t.index();this._judgeDddClass((0,m.default)(".themeUl li"),n),(0,m.default)(".themeShow").html(t.html()).attr("data-val",t.data("val")),(0,m.default)(".themeUl").hide()}},{key:"_judgeDddClass",value:function(e,t){e.eq(t).addClass("active").siblings().removeClass("active")}},{key:"_mouseenterAnswer",value:function(e){(0,m.default)(e.target).find(".dynamicRight").show()}},{key:"_mouseleaveAnswer",value:function(e){(0,m.default)(".dynamicRight").hide()}},{key:"_mouseenterAddOff",value:function(e){(0,m.default)(e.target).next().show()}},{key:"_mouseleaveAddOff",value:function(){(0,m.default)(".themeList span").hide()}},{key:"_answerFocus",value:function(e){var t=(0,m.default)(e.target);t.val()===_.default.localConfig.inputAnswer&&t.val("")}},{key:"_answerBlur",value:function(e){var t=(0,m.default)(e.target);""===t.val()&&t.val(_.default.localConfig.inputAnswer)}},{key:"_answerSubmit",value:function(e){var t=(0,m.default)(e.target).prev().children(),n=t.find("p"),i=t.find("input"),r=(0,m.default)(e.target).parent().data("type"),a=this,o=[];m.default.each(n,function(e,t){var n=(0,m.default)(t).text();o.push(n)});var s=[];if(m.default.each(i,function(e,t){var n=(0,m.default)(t).val(),i=/(^\s*)|(\s*$)/g;n===_.default.localConfig.inputAnswer||""==n.replace(i,"")?(s.push(n),a._isErrer=!0,a._inputErrerOpen()):o.push(n)}),s.length>0)this._inputErrerOpen();else{this._resultBounced();var l=parseInt((0,m.default)(".themeShow").attr("data-val")),u={};u.type=parseInt(r)||1,u.content="答题",u.timeLimit=l,u.correct=[],u.options=o||[],u.answer=[],h.default.api("creatQuestion",u)}}},{key:"_resultBounced",value:function(){this._showPage=!0,(0,m.default)(".themeBox").hide(),(0,m.default)(".resultBox").show()}},{key:"_inputErrerOpen",value:function(){this._isErrer&&(0,m.default)(".inputErrerBox").show()}},{key:"_inputErrerClone",value:function(){(0,m.default)(".inputErrerBox").hide()}},{key:"_inputAdd",value:function(e,t){this._countNum++,e.before(y),(0,m.default)(".themeTrendsLi").attr("value",_.default.localConfig.inputAnswer),this._countNum===this._maxLen&&(this._countNum=6,t.hide())}},{key:"_textAdd",value:function(e,t){this._countNum++,e.before(E),this._renderDom(),this._countNum===this._maxLen&&(this._countNum=6,t.hide())}},{key:"_inputDomPos",value:function(){var e=(0,m.default)("#themeTrendsUlC").children(".themeTrendsLi"),t=((0,m.default)("#themeTrendsUlC li"),e.length),n=(0,m.default)(".dynamicRight1");t>3?n.css("top","33px"):n.css("top","12px")}},{key:"_answerAdd",value:function(e){var t=(0,m.default)("#themeTrendsUlA"),n=(0,m.default)("#themeTrendsUlB"),i=(0,m.default)("#themeTrendsUlC"),r=(0,m.default)(e.target).prev().children().is("input"),a=(0,m.default)(e.target).parent().children().first().text(),o=(0,m.default)(e.target),s=((0,m.default)(e.target).parent().children(".themeTrendsLi").length,(0,m.default)(e.target).siblings().length);this._countNum=s,i&&r?this._inputAdd(o,(0,m.default)(e.target)):!t&&!n||"A×"!==a&&"1×"!==a||this._textAdd(o,(0,m.default)(e.target)),this._inputDomPos()}},{key:"_removeList",value:function(e,t,n){e===t?e=t:(e--,n.remove(),this._renderDom())}},{key:"_answerListRemove",value:function(e){var t=((0,m.default)(e.target).parents("ul").children().find(".themeAdd").is(":hidden"),(0,m.default)(e.target).prev().is("p")),n=(0,m.default)(e.target).parent().siblings().length,i=(0,m.default)(e.target).parents("ul").children(".themeAdd");i.is(":hidden")&&i.show(),this._countNum=n;var r=(0,m.default)(e.target).parent();t?this._removeList(this._countNum,this._minLen,r):this._removeList(this._countNum,this._minLen1,r),this._inputDomPos()}},{key:"_resultConcealClone",value:function(){this.isHide=!0,(0,m.default)(".resultBox").hide(),(0,m.default)(".answerAllBox").hide()}},{key:"_resultTermination",value:function(){this._clearAnswer(),this._hideResultBox(),this._stopAnswer()}},{key:"_clearAnswer",value:function(){this._showPage=!1,(0,m.default)("#minute,#second").text("00"),this._resultConcealClone(),this._revocation(),this._setDefault(),this._judgeDddClass((0,m.default)(".themeUl li"),0),this.isCancel=!1,this.isHide=!1,(0,m.default)(".dynamicRight1").css("top","12px"),(0,m.default)("#themeAdd").show(),(0,m.default)(".dynamicPlan").css("width",0),(0,m.default)(".resultList span").html("0%"),(0,m.default)(".resultList").empty()}},{key:"_stopAnswer",value:function(){var e={};e.itemIdx=this._questionObject.itemIdx,e.questionId=this._questionObject.questionId,h.default.api("stopQuestion",e),this._questionObject=null}},{key:"_revocation",value:function(){(0,m.default)(".themeShow").html(_.default.localConfig.nothing);var e=(0,m.default)("#themeTrendsUlA .themeTrendsLi").length,t=(0,m.default)("#themeTrendsUlB .themeTrendsLi").length,n=(0,m.default)("#themeTrendsUlC .themeTrendsLi").length,i=void 0,r=void 0,a=void 0;this._recoverfunc(n,i,"C",3),this._recoverfunc(t,a,"B",4),this._recoverfunc(e,r,"A",4)}},{key:"_recoverfunc",value:function(e,t,n,i){e<i?(t=i-e,this._addfunc(n,t)):(t=e-i,this._removefunc(n,t))}},{key:"_addfunc",value:function(e,t){for(var n=0;n<t;n++)(0,m.default)("#themeTrendsUl"+e).prepend((0,m.default)("#themeTrendsUl"+e).children().first().clone(!0));this._renderDom()}},{key:"_removefunc",value:function(e,t){for(var n=0;n<t;n++)(0,m.default)("#themeTrendsUl"+e).children().first().remove();this._renderDom()}},{key:"_answerStudent",value:function(e){this._answerStudentShow();var t=(0,m.default)(".resultValueUl");t.html("");var n=e.options,i="",r=this;m.default.each(n,function(e,t){i+=r._format(S,{value:t,index:e})}),t.append(i);var a=t.find("li").length;(0,m.default)(".resultValueList").width(100/a+"%")}},{key:"_answerStudentShow",value:function(){(0,m.default)(".answerStudentBox").show()}},{key:"_referBtnClone",value:function(){var e=(0,m.default)(".resultValueList input:checked").attr("data-val");if(e){var t={};t.itemIdx=this._questionObject.itemIdx,t.questionId=this._questionObject.questionId,t.answer=[],t.answer.push(parseInt(e)),h.default.api("sendAnswer",t),v.log("学生端提交信息",t),this._abandonBtnClone()}}},{key:"_mouseenterResult",value:function(e){var t=this._questionObject,n=((0,m.default)(e.target).siblings("b").text(),(0,m.default)(".layerBox")),i=(0,m.default)(".resultContent").offset().left,r=(0,m.default)(".resultContent").offset().top,a=e.pageX-i,o=e.pageY-r-n.outerHeight(),s="";n.show().css({left:a,top:o}).html("");var l=(0,m.default)(e.target).parent().index(),u=t.answers[l].userNames.toString(),d=/\,/g;u&&u.length>0&&(u=u.replace(d,"、"),s="<span>"+u+"</span>"),s?n.html(s):n.hide()}},{key:"_mouseleaveResult",value:function(){(0,m.default)(".layerBox").hide()}},{key:"_abandonBtnClone",value:function(){this.isCancel=!0,this._hideAnswerStudentBox(),(0,m.default)(".themeAdd").show(),(0,m.default)(".resultValueList").remove()}},{key:"_showTimerList",value:function(){var e=(0,m.default)(".themeUl"),t=void 0;e.html(""),m.default.each(this.timerList,function(n,i){t=0==i?'<li data-val="100000" data-ind="'+n+'" class="active">'+_.default.localConfig.nothing+"</li>":i/60<1?'<li data-val="'+i+'" data-ind="'+n+'">'+i+_.default.localConfig.second+"</li>":'<li data-val="'+i+'" data-ind="'+n+'">'+i/60+_.default.localConfig.minute+"</li>",e.append(t)})}},{key:"_format",value:function(e,t){return e.replace(/\{(\w+)\}/g,function(e,n,i){return t[n]})}},{key:"_showAnswerAllBox",value:function(){(0,m.default)(".answerAllBox").show()}},{key:"_hideAnswerAllBox",value:function(){(0,m.default)(".answerAllBox").hide()}},{key:"_showResultBox",value:function(){(0,m.default)(".answerAllBox").show(),(0,m.default)(".resultBox").show(),(0,m.default)(".themeBox").hide()}},{key:"_hideResultBox",value:function(){(0,m.default)(".answerAllBox").hide(),(0,m.default)(".themeBox").hide(),(0,m.default)(".resultBox").hide(),(0,m.default)(".answerStudentBox").hide()}},{key:"_showAnswerStudentBox",value:function(){(0,m.default)(".answerAllBox").show(),(0,m.default)(".themeBox").hide(),(0,m.default)(".answerStudentBox").show()}},{key:"_hideAnswerStudentBox",value:function(){(0,m.default)(".answerAllBox").hide(),(0,m.default)(".answerStudentBox").hide()}}]),t}(c.default),R=C;t.default=R;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"loger","D:/work/PCLive/src/ape/AnswerApe.js"),__REACT_HOT_LOADER__.register(y,"newAnswerInput","D:/work/PCLive/src/ape/AnswerApe.js"),__REACT_HOT_LOADER__.register(E,"newAnswerP","D:/work/PCLive/src/ape/AnswerApe.js"),__REACT_HOT_LOADER__.register(S,"newList","D:/work/PCLive/src/ape/AnswerApe.js"),__REACT_HOT_LOADER__.register(T,"newResultList","D:/work/PCLive/src/ape/AnswerApe.js"),__REACT_HOT_LOADER__.register(C,"AnswerApe","D:/work/PCLive/src/ape/AnswerApe.js"),__REACT_HOT_LOADER__.register(R,"default","D:/work/PCLive/src/ape/AnswerApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(5),u=i(l),d=n(1),c=i(d),f=n(4),h=i(f),p=n(2),_=i(p),g=n(21),m=i(g),v=n(15),y=i(v),E=n(22),S=i(E),T=n(14),C=i(T),R=n(3),b=i(R),w=c.default.getLoger("PC-Chat"),A=void 0,I='<div class="message_client">\n    <div class="teaNameBox" >\n    <span class="teaName">{name}</span>\n</div>\n<div style="margin-left: 20px">\n    <div class="message triangle-isosceles leftmsg">{message}</div>\n    </div>\n    </div>',P='<div class="message_client">\n                                    <div  class="stuNameBox">\n                                         <span class="stuName">{name}</span>\n                                    </div>\n                                    <div style="margin-right: 15px">\n                                         <div class="message stutriangle-isosceles rightmsg">{message}</div>\n                                    </div>\n                             </div>',O=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.chatFace,e.userList,e.addEvent(),e.init(),e}return o(t,e),s(t,[{key:"init",value:function(){this.chatFace=new m.default,this.userList=new y.default,this.chatImg=new S.default,this.chatImg.callback=this._sendImgMessageHandler.bind(this),this.userList.on(y.default.WINDOW_VIEW_CHANGE,this.onWindowViewChange.bind(this)),(0,_.default)("#txt_message")[0].value="",(0,_.default)("#btn_send").on("click",this._sendMessageHandler.bind(this));var e=this;(0,_.default)("#txt_message").on("keydown",function(t){var n=t.which;b.default.isKeypress&&13==n&&e._sendMessageHandler()}),(0,_.default)(".left").on("contextmenu",this._preventDefault.bind(this)),(0,_.default)(".header").on("contextmenu",this._preventDefault.bind(this)),(0,_.default)(".middle").on("contextmenu",this._preventDefault.bind(this)),(0,_.default)(".tabTitle").on("contextmenu",this._preventDefault.bind(this)),(0,_.default)(".transmitBox").on("contextmenu",this._preventDefault.bind(this)),(0,_.default)(".fold").on("contextmenu",this._preventDefault.bind(this)),(0,_.default)(".rightGap").on("contextmenu",this._preventDefault.bind(this)),(0,_.default)(".leftGap").on("contextmenu",this._preventDefault.bind(this)),(0,_.default)(".curClassUserList").on("contextmenu",this._preventDefault.bind(this))}},{key:"onWindowViewChange",value:function(){this._emit(y.default.WINDOW_VIEW_CHANGE)}},{key:"addEvent",value:function(){h.default.on("chat_receive_message",this._chatReceiveHandler.bind(this)),h.default.on("class_join_success",this._classJoinSuccess)}},{key:"clear",value:function(){(0,_.default)("#panel_message").empty()}},{key:"_preventDefault",
value:function(e){e.preventDefault()}},{key:"_classJoinSuccess",value:function(e){A=e}},{key:"_chatReceiveHandler",value:function(e){return e&&e.fromNodeId==b.default.nodeId?void w.log("自己发送的聊天消息不需要再显示",e):(w.log("显示聊天消息",e),void this._showChatMessage(e))}},{key:"_showChatMessage",value:function(e){if(!e)return void w.warn("聊天信息无效->",e);w.log("上传图片成功是显示图片",e);e.message;1==e.msgType?this.showChatImg(e):this.showChatMessage(e)}},{key:"showChatImg",value:function(e){var t=e.fromNodeId!==A.nodeId?I:P,n='<img class="chatImg" src='+e.message+">",i=this._format(t,{name:e.fromName,message:n});(0,_.default)("#panel_message").append(i),(0,_.default)("#panel_message")[0].scrollTop=(0,_.default)("#panel_message")[0].scrollHeight,(0,_.default)(".chatImg").on("load",this._onLoadImage.bind(this)),(0,_.default)(".chatImg").on("click",this._expandChatImg.bind(this))}},{key:"showChatMessage",value:function(e){var t=e.fromNodeId!==A.nodeId?I:P,n=(e.message+"").replace(/\[img:([^\[:\]]*)\]/gi,function(e,t,n){return'<img src="images/face/'+t+'.png"/>'}),i=this._format(t,{name:e.fromName,message:n});(0,_.default)("#panel_message").append(i),(0,_.default)("#panel_message")[0].scrollTop=(0,_.default)("#panel_message")[0].scrollHeight}},{key:"_onLoadImage",value:function(){(0,_.default)("#panel_message")[0].scrollTop=(0,_.default)("#panel_message")[0].scrollHeight}},{key:"_expandChatImg",value:function(e){C.default.show(e.target.currentSrc)}},{key:"_sendMessageHandler",value:function(){var e=(0,_.default)("#txt_message")[0].value;if(e){var t=/^\s*$/;if(t.test(e))w.log("全是空格");else{var n=0;h.default.api("sendChatMsg",{msgType:n,message:e,to:0}),(0,_.default)("#txt_message")[0].value="";var i={};i.fromNodeId=b.default.nodeId,i.toNodeId=0,i.msgType=n,i.message=e,i.fromName=b.default.userName,i.fromRole=b.default.userRole,this._showChatMessage(i)}}else w.log("发送消息内容不能为空");(0,_.default)("#txt_message").focus()}},{key:"_sendImgMessageHandler",value:function(e){if(e){var t=e.fileName||"";if(t){var n=/^\s*$/;if(n.test(t))w.log("全是空格");else{var i=t.lastIndexOf("."),r=t.substr(i+1);if(r&&(r=r.toLowerCase()),"jpg"==r||"png"==r||"gif"==r||"jpeg"==r||"bmp"==r){var a=1,o=e.url||"";h.default.api("sendChatMsg",{msgType:a,message:o,to:0});var s={};s.fromNodeId=b.default.nodeId,s.toNodeId=0,s.msgType=a,s.message=o,s.fromName=b.default.userName,s.fromRole=b.default.userRole,this._showChatMessage(s)}}}else w.log("发送消息内容不能为空")}}},{key:"_format",value:function(e,t){return e.replace(/\{(\w+)\}/g,function(e,n,i){return t[n]})}}]),t}(u.default),D=O;t.default=D;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(w,"loger","D:/work/PCLive/src/ape/ChatApe.js"),__REACT_HOT_LOADER__.register(A,"classCurInfo","D:/work/PCLive/src/ape/ChatApe.js"),__REACT_HOT_LOADER__.register(I,"tpl_message_teacher","D:/work/PCLive/src/ape/ChatApe.js"),__REACT_HOT_LOADER__.register(P,"tpl_message_student","D:/work/PCLive/src/ape/ChatApe.js"),__REACT_HOT_LOADER__.register(O,"Chat","D:/work/PCLive/src/ape/ChatApe.js"),__REACT_HOT_LOADER__.register(D,"default","D:/work/PCLive/src/ape/ChatApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(7),u=i(l),d=n(1),c=i(d),f=n(2),h=i(f),p=c.default.getLoger("PC-ChatFace"),_=0,g=4,m=(0,h.default)("#inner-slide"),v=(0,h.default)("#tiplist"),y=v.children("li"),E=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.addEvent(),e.init(),e}return o(t,e),s(t,[{key:"init",value:function(){var e=this;(0,h.default)(".face").on("click",e._showHide.bind(this)),(0,h.default)(".swiper-slide").on("click","li",function(e){(0,h.default)("#txt_message").val((0,h.default)("#txt_message").val()+"[img:"+(0,h.default)(this).find("img").attr("data-type")+"]");var t=document.getElementById("facelist");t.style.display="none"}),y.bind("click",function(){_=(0,h.default)(this).index(),m.stop().animate({left:320*-_},500),e._changeTip()}),this._changeTab(),(0,h.default)("#txt_message").on("focus",e._hideFace.bind(this)),(0,h.default)("#panel_message").on("click",e._hideFace.bind(this)),(0,h.default)(".middle").on("click",e._hideFace.bind(this)),(0,h.default)(".left").on("click",e._hideFace.bind(this)),(0,h.default)(".header").on("click",e._hideFace.bind(this)),(0,h.default)(".videoWindow").on("click",e._hideFace.bind(this)),(0,h.default)(".userListTitle").on("click",e._hideFace.bind(this))}},{key:"addEvent",value:function(){}},{key:"_showHide",value:function(){var e=document.getElementById("facelist");this._showHideFace(e)}},{key:"_showHideFace",value:function(e){"none"==e.style.display?e.style.display="block":e.style.display="none"}},{key:"_hideFace",value:function(){var e=document.getElementById("facelist");"block"==e.style.display&&(e.style.display="none")}},{key:"_faceSelected",value:function(){(0,h.default)("#txt_message").val((0,h.default)("#txt_message").val()+"[img:"+(0,h.default)(this).find("img").attr("data-type")+"]");var e=document.getElementById("facelist");e.style.display="none"}},{key:"_changeTip",value:function(){var e=_;e>=g?e=0:null,y.each(function(t,n){t===e?(0,h.default)(this).addClass("bg"):(0,h.default)(this).removeClass("bg")})}},{key:"_changeTab",value:function(){(0,h.default)(document).ready(function(){(0,h.default)(".tabTitle li").click(function(){(0,h.default)(".tabTitle li").eq((0,h.default)(this).index()).addClass("select").siblings().removeClass("select"),(0,h.default)(".tabCon").hide().eq((0,h.default)(this).index()).show()}),(0,h.default)(".userListTitle").click(function(){(0,h.default)(".userListTitle").css("borderBottom","1px solid #3498db"),(0,h.default)(".discussTitle").css("borderBottom","1px solid #666")}),(0,h.default)(".discussTitle").click(function(){(0,h.default)(".userListTitle").css("borderBottom","1px solid #666"),(0,h.default)(".discussTitle").css("borderBottom","1px solid #3498db"),(0,h.default)("#panel_message")[0].scrollTop=(0,h.default)("#panel_message")[0].scrollHeight})})}}]),t}(u.default);E.prototype.CHAT_FACE_CHANGE=E.CHAT_FACE_CHANGE="chat_face_change";var S=E;t.default=S;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(p,"loger","D:/work/PCLive/src/ape/ChatFace.js"),__REACT_HOT_LOADER__.register(_,"step","D:/work/PCLive/src/ape/ChatFace.js"),__REACT_HOT_LOADER__.register(g,"count","D:/work/PCLive/src/ape/ChatFace.js"),__REACT_HOT_LOADER__.register(m,"$inner","D:/work/PCLive/src/ape/ChatFace.js"),__REACT_HOT_LOADER__.register(v,"$tip","D:/work/PCLive/src/ape/ChatFace.js"),__REACT_HOT_LOADER__.register(y,"$tipList","D:/work/PCLive/src/ape/ChatFace.js"),__REACT_HOT_LOADER__.register(E,"ChatFace","D:/work/PCLive/src/ape/ChatFace.js"),__REACT_HOT_LOADER__.register(S,"default","D:/work/PCLive/src/ape/ChatFace.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(7),u=i(l),d=n(1),c=i(d),f=n(2),h=i(f),p=n(3),_=i(p),g=n(8),m=i(g),v=n(6),y=i(v),E=n(12),S=i(E),T=c.default.getLoger("PC-ChatImg"),C=void 0,R=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.callback=null,e.init(),e}return o(t,e),s(t,[{key:"init",value:function(){(0,h.default)("#fileImgInput").on("change",this._uploadFile.bind(this))}},{key:"_uploadFile",value:function(e){if(C=document.getElementById("fileImgInput").files[0],!C)return void T.log("没有选择文件");var t=C.name;t.split(".")[1];T.log("文件名:"+C.name+"->文件类型:"+C.type);var n=C.name.toLowerCase();if(n.lastIndexOf(".jpg")<0&&n.lastIndexOf(".jpeg")<0&&n.lastIndexOf(".png")<0&&n.lastIndexOf(".gif")<0&&n.lastIndexOf(".bmp")<0)return void y.default.showError(y.default.TYPE_3,_.default.localConfig.layoutImg);if(C.size>5242880)return void y.default.showError(y.default.TYPE_3,_.default.localConfig.chatError);if(!_.default.DOCServerIP)return T.warn("截图服务器地址无效,无法上传文件!"),void y.default.showError(y.default.TYPE_3,_.default.localConfig.serverError);m.default.disEnabledDocBar(),m.default.disEnabledMediaBar();var i=_.default.creatTimestamp(),r=(0,S.default)(_.default.siteId+""+i),a=new FormData;a.append("fileToUpload",C),a.append("filename",escape(C.name)),a.append("size",C.size),a.append("siteId",_.default.siteId),a.append("timestamp",String(i)),a.append("authId",r),a.append("classId",String(_.default.classId));var o=_.default.DOCServerIP;_.default.DOCServerPort&&(o=o+":"+_.default.DOCServerPort);var s=_.default.locationProtocol+o+"/DocSharing/imageUpload";h.default.ajax({type:"POST",url:s,processData:!1,contentType:!1,data:a,xhr:function e(){var e=h.default.ajaxSettings.xhr();if(e.upload)return e.upload.addEventListener("progress",function(e){var t=e.loaded,n=e.total;Math.floor(100*t/n)},!1),e},success:function(e){m.default.enabledDocBar(),m.default.enabledMediaBar(),this._uploadFileSuccess(e),(0,h.default)("#fileImgInput").val("")}.bind(this),error:function(e){m.default.enabledDocBar(),m.default.enabledMediaBar(),T.warn(name+"->上传文件失败",e),y.default.showError(y.default.TYPE_3,name+"->"+_.default.localConfig.serverError),(0,h.default)("#fileImgInput").val("")}})}},{key:"_uploadFileSuccess",value:function(e){if(T.log("服务器返回的截图信息->",e),e&&0==e.code){if(!e)return void T.warn("上传文件返回的数据中数组没有数据",e.list);var t={};t.fileName=C.name,t.url=e.url,this.callback&&this.callback(t)}else T.warn("截图上传失败->",e.code),y.default.showError(y.default.TYPE_3,"截图上传失败->code:"+e.code)}}]),t}(u.default),b=R;t.default=b;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(T,"loger","D:/work/PCLive/src/ape/ChatImg.js"),__REACT_HOT_LOADER__.register(C,"fileItem","D:/work/PCLive/src/ape/ChatImg.js"),__REACT_HOT_LOADER__.register(R,"ChatImg","D:/work/PCLive/src/ape/ChatImg.js"),__REACT_HOT_LOADER__.register(b,"default","D:/work/PCLive/src/ape/ChatImg.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=i(f),p=n(3),_=i(p),g=n(2),m=i(g),v=n(9),y=(i(v),n(6)),E=i(y),S=u.default.getLoger("PC-ClassApe"),T=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.isExit=!1,e.curClassStuNum=0,e._isEndClass=!1,e._isExitClass=!1,e._isNetwork=!1,e.addEvent(),e.init(),e._setClassStatus(),e._showPageInfo(),e}return o(t,e),s(t,[{key:"init",value:function(){(0,m.default)("#pcVersion").text("v2.58.3.20170823"),(0,m.default)(".header").hide(),(0,m.default)(".loginBg ").show(),(0,m.default)(".initParamsOut ").show(),this._hideInitUI(),this._hideLoginUI(),(0,m.default)(".startClass").on("click",this._startClassHandler.bind(this)),(0,m.default)(".pauseClass").on("click",this._pasueClassHandler.bind(this)),(0,m.default)(".closeClass").on("click",this._closeClassHandler.bind(this)),(0,m.default)(".help").on("click",this._helpHandler.bind(this)),(0,m.default)(".exit").on("click",this._exitClassHandler.bind(this)),(0,m.default)(".exitClassA").on("click",this._exitClassPopupHandler.bind(this)),(0,m.default)(".helpHeadline .iconfont").on("click",this._closeHelpHandler.bind(this)),(0,m.default)(".ensureTeaBtn").show(),(0,m.default)(".ensureStuBtn").show(),(0,m.default)(".ensureTeaBtn").on("click",this._stuInitHandler.bind(this)),(0,m.default)(".ensureStuBtn").on("click",this._teacherInitHandler.bind(this)),(0,m.default)(".btnLoginLi").on("click",this._loginHandler.bind(this));var e=this;(0,m.default)(".passWordInput").on("keydown",function(t){var n=t.which;13==n&&e._loginHandler()})}},{key:"addEvent",value:function(){h.default.on("error_event",this._classErrorHandler.bind(this)),h.default.on("class_init_success",this._classInitSuccessHandler.bind(this)),h.default.on("class_get_info_success",this._classGetInfoSuccessHandler.bind(this)),h.default.on("class_join_success",this._classJoinSuccessHandler.bind(this)),h.default.on("class_update_status",this._classUpdateHandler.bind(this)),h.default.on("class_insert_roster",this._classInsertRosterHandler.bind(this)),h.default.on("class_delete_roster",this._classDeleteRosterHandler.bind(this)),h.default.on("class_update_timer",this._classUpdateTimerHandler.bind(this)),h.default.on("class_exit",this._classExitHandler.bind(this))}},{key:"_showPageInfo",value:function(){(0,m.default)("#memberNum").text(_.default.localConfig.memberNum),(0,m.default)(".exitText").text(_.default.localConfig.exitBtn),(0,m.default)(".settingText").text(_.default.localConfig.setBtn),(0,m.default)(".helpText").text(_.default.localConfig.helpBtn),(0,m.default)("#endClassroom").text(_.default.localConfig.endClassroom),(0,m.default)("#pauseClassroom").text(_.default.localConfig.pauseClassroom),(0,m.default)("#startClassroom").text(_.default.localConfig.startClassroom),(0,m.default)(".btnPublishVideo").attr("title",_.default.localConfig.openVideo),(0,m.default)(".btnPublishAudio").attr("title",_.default.localConfig.openAudio),(0,m.default)(".btnOpenVideo").attr("title",_.default.localConfig.openVideo),(0,m.default)(".btnOpenAudio").attr("title",_.default.localConfig.openAudio),(0,m.default)(".btnStopPublishVideo").attr("title",_.default.localConfig.closeVideo),(0,m.default)(".btnStopPublishAudio").attr("title",_.default.localConfig.closeAudio),(0,m.default)(".btnStopPublishMedia").attr("title",_.default.localConfig.closeMedia),(0,m.default)("#showColor").attr("title",_.default.localConfig.showColor),(0,m.default)("#controlBrush").attr("title",_.default.localConfig.controlBrush),(0,m.default)(".pencil").attr("title",_.default.localConfig.pencil),(0,m.default)(".rescind").attr("title",_.default.localConfig.rescind),(0,m.default)(".clearContent").attr("title",_.default.localConfig.delete),(0,m.default)("#pptNextStep").attr("title",_.default.localConfig.downAnimated),(0,m.default)("#pptPrevStep").attr("title",_.default.localConfig.onAnimated),(0,m.default)("#fitHeight").attr("title",_.default.localConfig.adaptiveHigh),(0,m.default)("#fitWidth").attr("title",_.default.localConfig.adaptiveWidth),(0,m.default)("#fitNormal").attr("title",_.default.localConfig.showAll),(0,m.default)("#raiseBtn").attr("title",_.default.localConfig.raiseBtn),(0,m.default)(".userNameInput").attr("placeholder",_.default.localConfig.enterUserName),(0,m.default)(".passWordInput").attr("placeholder",_.default.localConfig.enterPassword),(0,m.default)(".classId").attr("placeholder",_.default.localConfig.enterClass),(0,m.default)(".userId").attr("placeholder",_.default.localConfig.enterId),(0,m.default)("#member").text(_.default.localConfig.member),(0,m.default)("#discuss").text(_.default.localConfig.discuss),(0,m.default)("#btn_send").text(_.default.localConfig.sendMsg),(0,m.default)("#docListTitle").text(_.default.localConfig.documentList),(0,m.default)("#mediaListTitle").text(_.default.localConfig.mediaShareList),(0,m.default)(".helpHeadlineTitle").text(_.default.localConfig.help),(0,m.default)(".setHeadlineTitle").text(_.default.localConfig.setUp),(0,m.default)("#camera").text(_.default.localConfig.camera),(0,m.default)("#microphone").text(_.default.localConfig.microphone),(0,m.default)("#volume").text(_.default.localConfig.volume),(0,m.default)(".setSave").text(_.default.localConfig.preserve),(0,m.default)(".setCancel").text(_.default.localConfig.cancel),(0,m.default)(".endClassHeadlineTitle").text(_.default.localConfig.endClassroom),(0,m.default)(".endClassText").text(_.default.localConfig.endClassroomCont),(0,m.default)(".exitClassHeadlineTitle").text(_.default.localConfig.exitBtn),(0,m.default)(".exitClassText").text(_.default.localConfig.exitCont),(0,m.default)("#btnLogin").text(_.default.localConfig.register),(0,m.default)(".ensureTeaBtn").text(_.default.localConfig.teacher),(0,m.default)(".ensureStuBtn").text(_.default.localConfig.student),(0,m.default)("#opening").html(_.default.localConfig.opening),(0,m.default)("#download").html(_.default.localConfig.downloadVersion),(0,m.default)("#downloading").html(_.default.localConfig.downloading),(0,m.default)("#stopShare").html(_.default.localConfig.stopSharing),(0,m.default)(".themeHeadlineTitle,.resultHeadlineTitle,.studentHeadline,.answerText").html(_.default.localConfig.answerSheet),(0,m.default)(".signHeadlineTitle,.signStudentHeadlineTitle,.signText").html(_.default.localConfig.rollCall),(0,m.default)("#docListOut").attr("title",_.default.localConfig.selectFile),(0,m.default)("#screenSharingOut").attr("title",_.default.localConfig.screenSharing),(0,m.default)("#mediaUpLoadOut").attr("title",_.default.localConfig.updateMediaFile),(0,m.default)("#mediaListOut").attr("title",_.default.localConfig.selectMediaFile),(0,m.default)("#uploadAudio").attr("title",_.default.localConfig.uploadAudio),(0,m.default)(".laserPen").attr("title",_.default.localConfig.laserPen),(0,m.default)(".sponsorSign").html(_.default.localConfig.startName),(0,m.default)(".attendance").html(_.default.localConfig.attendance),(0,m.default)(".turnResultBtn").html(_.default.localConfig.terminationRollCall),(0,m.default)(".turnStudentBtn").html(_.default.localConfig.signIn),(0,m.default)(".themeTit").html(_.default.localConfig.cardType),(0,m.default)(".gotIt").html(_.default.localConfig.gotIt),(0,m.default)(".understand").html(_.default.localConfig.understand),(0,m.default)(".yes").html(_.default.localConfig.yes),(0,m.default)(".wrong").html(_.default.localConfig.wrong),(0,m.default)(".yup").html(_.default.localConfig.yup),(0,m.default)(".nothing").html(_.default.localConfig.nothing),(0,m.default)(".answerTime").html(_.default.localConfig.answerTime),(0,m.default)(".dynamicRight").html(_.default.localConfig.release),(0,m.default)(".enterAnswer").html(_.default.localConfig.enterAnswer),(0,m.default)(".answerResult").html(_.default.localConfig.answerResult),(0,m.default)(".share").html(_.default.localConfig.share),(0,m.default)(".participation").html(_.default.localConfig.participation),(0,m.default)(".resultConceal").html(_.default.localConfig.hideCount),(0,m.default)(".resultTermination").html(_.default.localConfig.termination),(0,m.default)(".referBtn").html(_.default.localConfig.submitMsg),(0,m.default)(".abandonBtn").html(_.default.localConfig.giveUp),(0,m.default)(".mediaFileContentTxt").html(_.default.localConfig.listedFiles),(0,m.default)(".mediaFileContentMenuLableTxt").html(_.default.localConfig.upload),(0,m.default)("#musicListTitle").html(_.default.localConfig.audioFilelist),(0,m.default)(".inputCount").html(_.default.localConfig.answerIsNotEmpty),(0,m.default)(".downloadCancel").html(_.default.localConfig.cancel),(0,m.default)("#showForm").attr("title",_.default.localConfig.selectShape),(0,m.default)("#curveBrush").attr("title",_.default.localConfig.curveStyle),(0,m.default)("#straightBrush").attr("title",_.default.localConfig.justStyle),(0,m.default)("#circleBrush").attr("title",_.default.localConfig.circleStyle),(0,m.default)("#squareBrush").attr("title",_.default.localConfig.squareStyle),(0,m.default)("#choiceConfirm").html(_.default.localConfig.confirm),(0,m.default)("#choiceCancel").html(_.default.localConfig.cancel),(0,m.default)("#nowLiveVersion").html(_.default.localConfig.nowLiveVersion),(0,m.default)("#nowPlaybackVersion").html(_.default.localConfig.nowPlaybackVersion),(0,m.default)("#browserAreaSettings").html(_.default.localConfig.browserAreaSettings),(0,m.default)(".speed360Recommend").html(_.default.localConfig.speed360Recommend),(0,m.default)(".speed360").html(_.default.localConfig.speed360),(0,m.default)(".security360").html(_.default.localConfig.security360),(0,m.default)(".security360Only").html(_.default.localConfig.security360Only),(0,m.default)(".sogouExplorer").html(_.default.localConfig.sogouExplorer),(0,m.default)("#flashVersionsLow").html(_.default.localConfig.flashVersionsLow),(0,m.default)("#flashDownload").html(_.default.localConfig.download),(0,m.default)("#flashRetry").html(_.default.localConfig.retry),(0,m.default)(".flashForbiddenMsg").html(_.default.localConfig.flashForbiddenMsg),(0,m.default)("#flashMsgContent").html(_.default.localConfig.flashMsgContent),(0,m.default)("#flashDetailSteps").html(_.default.localConfig.flashDetailSteps),(0,m.default)("#flashUpdataVersions").html(_.default.localConfig.flashUpdataVersions)}},{key:"_showInitClassInuptBox",value:function(){this._showInitUI(),(0,m.default)(".classId ").val(_.default.classId),(0,m.default)(".userId ").val(_.default.userId),(0,m.default)(".initParamsOut ").show()}},{key:"_showJoinClassInputBox",value:function(){(0,m.default)(".userNameInput ").val(_.default.userName),(0,m.default)(".loginBg ").show(),this._showLoginUI(),_.default.passwordRequired?(0,m.default)(".passWordInput ").val(_.default.password):((0,m.default)(".passWordLi ").hide(),S.log("ClassDataProxy.passwordRequired",_.default.passwordRequired))}},{key:"startClassRun",value:function(){this._initClass()}},{key:"_initClass",value:function(){S.log("initClass",_.default.getInitClassData()),S.log("是否是录制回放->",_.default.isRecordPlayBack),(0,m.default)(".initParams .errorTip").text(_.default.localConfig.initClass),(0,m.default)(".initParams .errorTip").show(),this._hideInitUI(),(0,m.default)(".classId ").val(_.default.classId),(0,m.default)(".userId ").val(_.default.userId),_.default.isRecordPlayBack?((0,m.default)("#mainContentBox ").css("top","2px"),h.default.api("initRecordPlayback",_.default.getInitClassData())):h.default.api("init",_.default.getInitClassData())}},{key:"_joinClass",value:function(){S.log("joinClass",_.default.getJoinClassData()),this._hideLoginUI(),(0,m.default)(".btnLoginLi ").hide(),(0,m.default)(".initParamsOut ").hide(),(0,m.default)(".userNameInput ").val(_.default.userName),(0,m.default)(".passWordInput ").val(_.default.password),(0,m.default)(".loginContent .errorTip").text(_.default.localConfig.initClass),h.default.api("joinClass",_.default.getJoinClassData())}},{key:"_setClassStatus",value:function(){return _.default.userRole==_.default.USER_HOST&&(1==_.default.classStatus?((0,m.default)(".startClass").hide(),(0,m.default)(".pauseClass").show()):((0,m.default)(".startClass").show(),(0,m.default)(".pauseClass").hide())),_.default.isRecordPlayBack?((0,m.default)(".classStatus").text(_.default.localConfig.playback),(0,m.default)(".classStatus").css("color","#d95136"),(0,m.default)(".classStatusIcon").html("&#xe609;"),void(0,m.default)(".classStatusIcon").css("color","#d95136")):void(1==_.default.classStatus?((0,m.default)(".classStatus").text(_.default.localConfig.liveBroadcast),(0,m.default)(".classStatus").css("color","#d95136"),(0,m.default)(".classStatusIcon").html("&#xe609;"),(0,m.default)(".classStatusIcon").css("color","#d95136")):2==_.default.classStatus?((0,m.default)(".classStatus").text(_.default.localConfig.rest),(0,m.default)(".classStatusIcon").html("&#xe60a;"),(0,m.default)(".classStatusIcon").css("color","#ccc"),(0,m.default)(".classStatus").css("color","#ccc")):((0,m.default)(".classStatus").text(_.default.localConfig.notStart),(0,m.default)(".classStatusIcon").html("&#xe62b;"),(0,m.default)(".classStatusIcon").css("color","#ccc"),(0,m.default)(".classStatus").css("color","#ccc")))}},{key:"_hideInitUI",value:function(){S.log("_hideInitUI"),(0,m.default)(".initParamsClassId ").hide(),(0,m.default)(".initParamsUserId ").hide(),(0,m.default)(".initParamsRoleBtn ").hide(),(0,m.default)(".initParamsBox").css("background","")}},{key:"_showInitUI",value:function(){S.log("_showInitUI"),(0,m.default)(".initParamsClassId ").show(),(0,m.default)(".initParamsUserId ").show(),(0,m.default)(".initParamsRoleBtn ").show(),(0,m.default)(".initParams .errorTip").show(),(0,m.default)(".initParamsBox").css("background","#484646")}},{key:"_hideLoginUI",value:function(){(0,m.default)(".btnLoginLi ").hide(),(0,m.default)(".userNameLi ").hide(),(0,m.default)(".passWordLi ").hide(),(0,m.default)(".loginContentBox").css("background","")}},{key:"_showLoginUI",value:function(){(0,m.default)(".btnLoginLi ").show(),(0,m.default)(".userNameLi ").show(),(0,m.default)(".passWordLi ").show(),(0,m.default)(".loginContentBox").css("background","#484646")}},{key:"_classErrorHandler",value:function(e){switch(S.warn("_classErrorHandler",e),e.code){case 100:case 101:case 102:case 103:case 105:case 106:case 107:case 301:this._showInitClassInuptBox(),(0,m.default)(".initParams .errorTip").text(""+e.reson);break;case 200:case 201:case 202:case 203:case 204:case 205:case 207:this._showJoinClassInputBox(),(0,m.default)(".loginContent .errorTip").text(""+e.reson);break;case 206:this._showJoinClassInputBox(),(0,m.default)(".loginContent .errorTip").text(_.default.localConfig.correctPassword);break;case 300:case 301:S.warn(e);break;case 910:E.default.showWarnError(""+e.reson),(0,m.default)(".initParams .errorTip").text(""+e.reson);break;case 911:E.default.showWarnError(""+e.reson),(0,m.default)(".initParams .errorTip").text(""+e.reson);break;case 2e4:if(this.isExit)return;E.default.showWarnError(_.default.localConfig.disconnected),this._emit(t.CLASS_STOP_MEDIA_PUBLISH)}}},{key:"_classInitSuccessHandler",value:function(e){S.log("课堂初始化成功",(new Date).getTime(),e),(0,m.default)(".initParamsOut ").hide(),_.default.siteId=e.siteId,_.default.classType=e.classType,_.default.userName=e.userName,_.default.userRole=e.userRole,_.default.passwordRequired=e.passwordRequired,this._joinClass()}},{key:"_classGetInfoSuccessHandler",value:function(e){S.log("获取课堂信息完成",(new Date).getTime(),e)}},{key:"_classJoinSuccessHandler",value:function(e){S.log("加入课堂成功",(new Date).getTime(),e),(0,m.default)(".initParamsOut ").hide(),(0,m.default)(".loginBg ").hide(),this._isNetwork=!0,_.default.maxAudioChannels=e.maxAudioChannels,_.default.maxVideoChannels=e.maxVideoChannels,_.default.nodeId=e.nodeId,_.default.classTimestamp=e.classTimestamp||0,_.default.recordPlaybackMaxTime=e.recordPlaybackMaxTime||0,_.default.classType=e.classType||1,_.default.className=e.className||_.default.localConfig.unknown,_.default.siteId=e.siteId||_.default.localConfig.unknown,_.default.userRole=e.userRole,_.default.classStatus=e.classStatus,_.default.DOCServerIP=e.DOCServerIP||"",_.default.DOCServerPort=e.DOCServerPort||"",_.default.serverTimeDistance=e.serverAndLoacTimeDistanc,_.default.serverTimeDistance||(_.default.serverTimeDistance=0),_.default.ssTunnelAppURL=e.ssTunnelAppURL||"",_.default.currentSceneTableId=e.currentSceneTableId||_.default.SCENE_DOC,(0,m.default)(".header").show(),(0,m.default)(".pauseClass").hide(),(0,m.default)(".content ").show(),(0,m.default)(".classTheme").hide(),_.default.classTimestamp>0?(0,m.default)(".classTimestampText").text(_.default.timestampToDateTimeFull(_.default.classTimestamp)):(0,m.default)(".classTimestampText").text(""),document.title=_.default.className||"",this._setClassStatus(),_.default.userRole==_.default.USER_HOST?(0,m.default)(".laserRed").hide():_.default.userRole==_.default.USER_INVISIBLE?((0,m.default)(".setting").hide(),(0,m.default)(".foldDrawToolOut").hide(),(0,m.default)(".drawTool").remove(),(0,m.default)("#controlBrush").hide(),(0,m.default)(".raiseBtn").hide(),(0,m.default)(".answer").hide(),(0,m.default)(".sign").hide(),(0,m.default)(".startClass").hide(),(0,m.default)(".pauseClass").hide(),(0,m.default)(".closeClass").hide(),(0,m.default)(".left").hide()):(S.log("隐藏控制按钮"),(0,m.default)(".startClass").hide(),(0,m.default)(".pauseClass").hide(),(0,m.default)(".closeClass").hide(),(0,m.default)(".left").hide(),(0,m.default)(".answer").hide(),(0,m.default)(".sign").hide()),_.default.isRecordPlayBack&&((0,m.default)(".exit").hide(),(0,m.default)(".startClass").hide(),(0,m.default)(".pauseClass").hide(),(0,m.default)(".closeClass").hide(),(0,m.default)(".left").hide(),(0,m.default)(".curClassUserNum").hide(),(0,m.default)(".classTimestampText").hide(),(0,m.default)(".setting").hide(),(0,m.default)(".userListTitle").hide(),(0,m.default)("#raiseBtn").hide()),this._setClassStatus(),2==_.default.maxMediaChannels&&_.default.userRole==_.default.USER_NOTMAL?((0,m.default)(".foldDrawToolOut").show(),(0,m.default)(".foldDrawTool").show(),(0,m.default)(".drawTool").show(),(0,m.default)(".drawTool").css("height","160px"),(0,m.default)(".clearContent").hide(),(0,m.default)(".laserPen").hide(),(0,m.default)("#controlBrush").hide()):2!==_.default.maxMediaChannels&&_.default.userRole==_.default.USER_NOTMAL&&((0,m.default)(".foldDrawToolOut").hide(),(0,m.default)(".foldDrawTool").hide(),(0,m.default)(".drawTool").hide(),(0,m.default)(".clearContent").hide(),(0,m.default)(".laserPen").hide(),(0,m.default)("#controlBrush").hide())}},{key:"_classUpdateHandler",value:function(e){S.log("课堂状态发送改变->",e),_.default.classStatus=e.classStatus,_.default.classStartTime=e.classStartTime,_.default.classStopTime=e.classStopTime,_.default.classBeginTime=e.classBeginTime,_.default.classEndTime=e.classEndTime,_.default.currentSceneTableId=e.currentSceneTableId||_.default.SCENE_DOC,this._setClassStatus()}},{key:"_classInsertRosterHandler",value:function(e){this.curClassStuNum++,(0,m.default)(".curClassUserNumTotal").html(this.curClassStuNum)}},{key:"_classDeleteRosterHandler",value:function(e){this.curClassStuNum--,this.curClassStuNum<0&&(this.curClassStuNum=0),(0,m.default)(".curClassUserNumTotal").html(this.curClassStuNum)}},{key:"_classUpdateTimerHandler",value:function(e){_.default.classTimestamp=e.classTimestamp,_.default.isRecordPlayBack||(0,m.default)(".classTimestampText").text(_.default.timestampToDateTimeFull(_.default.classTimestamp))}},{key:"_classExitHandler",value:function(){S.log("_classExitHandler"),this.isExit=!0,_.default.classStatus=0,(0,m.default)(".classStatus").text(_.default.localConfig.notStart),
(0,m.default)(".box").hide(),(0,m.default)(".answerAllBox").hide(),(0,m.default)(".signAllBox").hide(),(0,m.default)(".setBox").hide(),E.default.showError(E.default.TYPE_3,_.default.localConfig.quitClass),(0,m.default)("#h5Music").attr("src",""),(0,m.default)("#h5MediaShare").attr("src","")}},{key:"_startClassHandler",value:function(){setTimeout(function(){h.default.api("sendStartClass")},200)}},{key:"_pasueClassHandler",value:function(){setTimeout(function(){h.default.api("sendPauseClass")},200)}},{key:"_closeClassHandler",value:function(){var e=this;E.default.showError(E.default.TYPE_20,_.default.localConfig.endClassroomCont,function(t){1==t?(S.warn("确定结束课堂",t),e._closeClassEnsureHandler()):S.warn("取消结束课堂",t),E.default.hide()})}},{key:"_closeClassEnsureHandler",value:function(){this.isExit=!0,h.default.api("sendCloseClass")}},{key:"_closeClassCancelHandler",value:function(){E.default.hide()}},{key:"_exitClassHandler",value:function(){var e=this;E.default.showError(E.default.TYPE_20,_.default.localConfig.exitCont,function(t){1==t?(S.warn("确定退出课堂",t),e._exitClassEnsureHandler()):S.warn("取消退出课堂",t),E.default.hide()})}},{key:"_exitClassPopupHandler",value:function(){E.default.hide()}},{key:"_exitClassEnsureHandler",value:function(){this.isExit=!0,h.default.api("leaveClass"),this._classExitHandler()}},{key:"_exitClassCancelHandler",value:function(){E.default.hide()}},{key:"_helpHandler",value:function(){(0,m.default)(".helpBox").show(),(0,m.default)(".masker").show()}},{key:"_closeHelpHandler",value:function(){(0,m.default)(".helpBox").hide(),(0,m.default)(".masker").hide()}},{key:"_stuInitHandler",value:function(){_.default.userRole=_.default.USER_NOTMAL,_.default.classId=parseInt((0,m.default)(".classId ")[0].value),_.default.userId=(0,m.default)(".userId ")[0].value,this._initClass()}},{key:"_teacherInitHandler",value:function(){_.default.userRole=_.default.USER_HOST,_.default.classId=parseInt((0,m.default)(".classId ")[0].value),_.default.userId=(0,m.default)(".userId ")[0].value,this._initClass()}},{key:"_loginHandler",value:function(){var e=(0,m.default)(".userNameInput").val(),t=(0,m.default)(".passWordInput").val(),n=(0,m.default)(".errorTip");return t&&(0,m.default)(".loginSpinner").show(),e?_.default.passwordRequired&&!t?(n.html("请输入密码").addClass("showErr"),!1):(_.default.userName=(0,m.default)(".userNameInput ")[0].value||"",_.default.password=(0,m.default)(".passWordInput ")[0].value,void this._joinClass()):(n.html("请输入用户名").addClass("showErr"),!1)}}]),t}(c.default);T.prototype.CLASS_STOP_MEDIA_PUBLISH=T.CLASS_STOP_MEDIA_PUBLISH="class_stop_media_publish";var C=T;t.default=C;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(S,"loger","D:/work/PCLive/src/ape/ClassApe.js"),__REACT_HOT_LOADER__.register(T,"ClassApe","D:/work/PCLive/src/ape/ClassApe.js"),__REACT_HOT_LOADER__.register(C,"default","D:/work/PCLive/src/ape/ClassApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var 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},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(1),d=i(u),c=n(5),f=i(c),h=n(4),p=i(h),_=n(2),g=i(_),m=n(3),v=i(m),y=n(26),E=i(y),S=n(8),T=i(S),C=n(6),R=i(C),b=d.default.getLoger("PC-DocApe"),w=0,A=1,I=2,P=720,O=540,D=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.showDocDefaultDelay=0,e._docShowType=w,e.lastV=0,e.lastH=0,e.curV=0,e.curH=0,e._docList={},e._currentDocId=0,e._currentPageNum=1,e._pageNum=1,e.currentImagePath="",e.resizeDelay,e.dynamicPPT,e.addEvent(),e.init(),e}return o(t,e),l(t,[{key:"init",value:function(){this.dynamicPPT=new E.default,(0,g.default)(window).on("resize",this.onWindowResize.bind(this)),(0,g.default)(".docBox").on("scroll",this._changeDocScroll.bind(this)),(0,g.default)(".docView").hide(),(0,g.default)(".docView").on("load",this._onLoadImage.bind(this)),(0,g.default)(".docView").on("error",this._onLoadImageError.bind(this)),(0,g.default)("#docFileBtn").on("change",this._uploadFile.bind(this)),(0,g.default)("#docListOut").on("click",this._openDocListHandler.bind(this)),(0,g.default)("#closeDocList").on("click",this._closeDocListHandler.bind(this)),(0,g.default)(".nextPage").on("click",this._nextHandler.bind(this)),(0,g.default)(".prevPage").on("click",this._prevHandler.bind(this)),(0,g.default)("#totalPageNum").text(this._pageNum),(0,g.default)("#currentPageNum").text(this._currentPageNum),(0,g.default)(".fitHeight").on("click",this._fitInHandler.bind(this)),(0,g.default)(".fitWidth").on("click",this._fitInHandler.bind(this)),(0,g.default)(".fitNormal").on("click",this._fitInHandler.bind(this)),(0,g.default)(".fitNormal").css("color","#3498db"),(0,g.default)(".nextPage").hide(),(0,g.default)(".prevPage").hide(),this.hideFitGroup(),this._hidePageInfo(),this.onWindowResize(),T.default.showBottomDocControlBar(),(0,g.default)(".turn").on("click",this._particularPage.bind(this));var e=this;(0,g.default)("#pageNo").on("keydown",function(t){var n=t.which;13==n&&e._particularPage()}),v.default.userRole==v.default.USER_HOST&&((0,g.default)(document).keydown(function(t){37==t.keyCode&&e._prevHandler()}),(0,g.default)(document).keydown(function(t){39==t.keyCode&&e._nextHandler()}))}},{key:"addEvent",value:function(){p.default.on("class_join_success",this._classJoinSuccessHandler.bind(this)),p.default.on("document_update",this._docUpdateHanlder.bind(this)),p.default.on("document_delete",this._docDeleteHanlder.bind(this))}},{key:"_classJoinSuccessHandler",value:function(e){(e.userRole==v.default.USER_NOTMAL||v.default.isRecordPlayBack)&&((0,g.default)("#docUploadOut").hide(),(0,g.default)("#file").hide(),(0,g.default)("#docListOut").hide(),(0,g.default)(".nextPage").hide(),(0,g.default)(".prevPage").hide(),this.hideFitGroup()),this.onWindowResize()}},{key:"clear",value:function(){b.log("clear"),this._docList={},this._currentDocId=0,this._currentPageNum=1,this._pageNum=1,this.currentImagePath="",v.default.currentPageNum=this._currentPageNum,v.default.currentDocId=this._currentDocId,this._hideDocView(),this.dynamicPPT.updataPPT(null)}},{key:"stop",value:function(){b.log("stop"),this._docList={},this._currentDocId=0,this._currentPageNum=1,this._pageNum=1,this.currentImagePath="",v.default.currentPageNum=this._currentPageNum,v.default.currentDocId=this._currentDocId,this._hideDocView(),this.dynamicPPT.updataPPT(null)}},{key:"onWindowResize",value:function(){clearTimeout(this.resizeDelay);var e=this;this.resizeDelay=setTimeout(function(){clearTimeout(e.resizeDelay),e._fitInDocView(e._docShowType)},400)}},{key:"_changeDocScroll",value:function(e){var t=this;clearTimeout(this.scrollCompleteTimer),v.default.userRole==v.default.USER_HOST&&(this.scrollCompleteTimer=setTimeout(function(){t._updateCurrentDocScroll()},400))}},{key:"_updateCurrentDocScroll",value:function(){if(v.default.userRole==v.default.USER_HOST){var e=(0,g.default)(".docBox").prop("scrollWidth")-(0,g.default)(".docBox").width(),t=(0,g.default)(".docBox").prop("scrollHeight")-(0,g.default)(".docBox").height(),n=parseInt((0,g.default)(".docBox").scrollTop()),i=parseInt((0,g.default)(".docBox").scrollLeft());if(this.curV=parseInt(n/t*1e3)||0,this.curH=parseInt(i/e*1e3)||0,Math.abs(this.curH-this.lastH)<20&&Math.abs(this.curV-this.lastV)<20)return this.lastV=this.curV,void(this.lastH=this.curH);this.lastV=this.curV,this.lastH=this.curH,this._currentDocId>0&&this._sendDocumentCommand2sdk()}}},{key:"_setCurrentDocScroll",value:function(e){if(v.default.userRole!=v.default.USER_HOST){this.curV=parseInt(e.curV),this.curH=parseInt(e.curH);var t=(0,g.default)(".docBox").prop("scrollWidth")-(0,g.default)(".docBox").width(),n=(0,g.default)(".docBox").prop("scrollHeight")-(0,g.default)(".docBox").height(),i=parseInt(this.curV*n*.001),r=parseInt(this.curH*t*.001);(0,g.default)(".docBox").scrollTop(i),(0,g.default)(".docBox").scrollLeft(r)}}},{key:"_docUpdateHanlder",value:function(e){null!=e&&(this._setCurrentDocScroll(e),1==e.visible&&(clearTimeout(this.showDocDefaultDelay),this._currentDocId=e.itemIdx,this._currentPageNum=e.curPageNo,this._pageNum=e.pageNum,v.default.isRecordPlayBack?this._docShowType=w:this._docShowType=e.showType||w,this._changeDocShowBtns(this._docShowType),v.default.currentPageNum=this._currentPageNum,v.default.currentDocId=this._currentDocId,this._pageNum<=1?this._hidePageInfo():this._showPageInfo(),this._showDocView(e)),this._updateDocListData(e,"add"))}},{key:"_docDeleteHanlder",value:function(e){b.log("_docDeleteHanlder",e),this._updateDocListData(e,"delete")}},{key:"_updateDocListData",value:function(e,n){if("add"==n&&e)this._docList[e.itemIdx]=e;else if(b.log("删除文档数据",e.itemIdx),delete this._docList[e.itemIdx],this._currentDocId==e.itemIdx){this._currentDocId=0,this._currentPageNum=1,this._pageNum=1,v.default.currentPageNum=this._currentPageNum,v.default.currentDocId=this._currentDocId,this._hideDocView(),this.dynamicPPT.pptData&&this.dynamicPPT.pptData.itemIdx==e.itemIdx&&this.dynamicPPT.updataPPT(null),this._docShowType=w,(0,g.default)(".docView").width("0"),(0,g.default)(".docView").height("0");var i=(0,g.default)(".docBox")[0].clientWidth,r=(0,g.default)(".docBox")[0].clientHeight;(0,g.default)(".docGroup").width(i),(0,g.default)(".docGroup").height(r),(0,g.default)(".docGroup").css("left","0px"),(0,g.default)(".docGroup").css("top","0px"),this._hidePageInfo(),this.hideFitGroup(),this._hideOverflow(),this._emit(t.DOC_IMAGE_LOAD,{width:i,height:r}),this.onWindowResize()}this._updateDocListView(),this._currentDocId>0&&this._pageNum>1&&v.default.userRole==v.default.USER_HOST?((0,g.default)(".nextPage").show(),(0,g.default)(".prevPage").show()):((0,g.default)(".nextPage").hide(),(0,g.default)(".prevPage").hide()),(0,g.default)("#totalPageNum").text(this._pageNum),(0,g.default)("#currentPageNum").text(this._currentPageNum)}},{key:"_updateFitGroup",value:function(){0==this._currentDocId||this._pageNum<1||v.default.userRole==v.default.USER_NOTMAL||v.default.userRole==v.default.USER_INVISIBLE?this.hideFitGroup():this._currentDocId>0&&v.default.userRole==v.default.USER_HOST&&this.showFitGroup()}},{key:"hideFitGroup",value:function(){(0,g.default)(".fitHeight").hide(),(0,g.default)(".fitWidth").hide(),(0,g.default)(".fitNormal").hide(),(0,g.default)(".turn").hide(),(0,g.default)(".pageNo").hide()}},{key:"showFitGroup",value:function(){(0,g.default)(".fitHeight").show(),(0,g.default)(".fitWidth").show(),(0,g.default)(".fitNormal").show()}},{key:"_updateDocListView",value:function(){(0,g.default)("#docFileContent").empty(),console.log("this._docList",this._docList);for(var e in this._docList)if(this._docList[e].docId){var t=this._creatListItemDiv(e,this._docList[e].fileName,this._docList[e].itemIdx);(0,g.default)("#docFileContent").append(t)}}},{key:"_hideOverflow",value:function(){(0,g.default)(".docBox")[0].style.overflow=""}},{key:"_showOverflow",value:function(e){this._hideOverflow(),e&&"y"==e?((0,g.default)(".docBox")[0].style.overflowY="scroll",(0,g.default)(".docBox")[0].style.overflowX="hidden"):((0,g.default)(".docBox")[0].style.overflowX="scroll",(0,g.default)(".docBox")[0].style.overflowY="hidden")}},{key:"_hidePageInfo",value:function(){(0,g.default)(".total-page").hide(),(0,g.default)(".cur-page").hide(),(0,g.default)(".bias").hide(),(0,g.default)(".pageNo").hide(),(0,g.default)(".turn").hide()}},{key:"_showPageInfo",value:function(){(0,g.default)(".total-page").show(),(0,g.default)(".cur-page").show(),(0,g.default)(".bias").show(),(0,g.default)(".pageNo").show(),(0,g.default)(".turn").show()}},{key:"_showDocView",value:function(e){if("zip"==e.fileType)this.dynamicPPT.updataPPT(e),this._hideDocView(),this.onWindowResize(),this.hideFitGroup(),v.default.userRole==v.default.USER_HOST&&((0,g.default)(".turn").show(),(0,g.default)(".pageNo").show());else{this.dynamicPPT.updataPPT(null),this.currentImagePath="",this._hideDocView(),this._updateFitGroup();var t=e.images||[];if(t&&t.length>0){var n=t[this._currentPageNum-1];if(n){if(this.currentImagePath=n,(0,g.default)(".docView").attr("src",n),e.curPageNo>0&&e.curPageNo<e.pageNum-1){if(e.curPageNo>=3){var i=[e.images[e.curPageNo-3],e.images[e.curPageNo-2],e.images[e.curPageNo],e.images[e.curPageNo+1]];this._preloadimages(i)}else if(e.curPageNo<3&&e.curPageNo>=1){var r=[e.images[e.curPageNo-1],e.images[e.curPageNo]];this._preloadimages(r)}}else if(e.curPageNo>0&&e.pageNum<=3){var a=e.images;this._preloadimages(a)}(0,g.default)(".docView").attr("alt",e.fileName||""),(0,g.default)(".docView").show()}}}}},{key:"_preloadimages",value:function(e){for(var t=[],e="object"!=("undefined"==typeof e?"undefined":s(e))?[e]:e,n=0;n<e.length;n++)t[n]=new Image,t[n].src=e[n],t[n].complete||t[n].width?b.log("该图片已经存在于缓存之中,不会再去重新下载"):(b.log("图片不存在缓存之中"),t[n].onload=function(){b.log("图片下载成功!")})}},{key:"_hideDocView",value:function(e){(0,g.default)(".docView").removeAttr("width"),(0,g.default)(".docView").removeAttr("height"),(0,g.default)(".docView").attr("src",""),(0,g.default)(".docView").width("0"),(0,g.default)(".docView").height("0"),(0,g.default)(".docView").hide(),this.currentImagePath="",this._hideOverflow(),this._pageNum<=1?this._hidePageInfo():this._showPageInfo()}},{key:"_openDocListHandler",value:function(){this._emit(t.SCENE_DOC_CHANGE,v.default.SCENE_DOC),T.default.enabledBottomBar(),T.default.enabledLeftBar(),T.default.showBottomDocControlBar(),(0,g.default)("#docModalList").show(),(0,g.default)(".masker").show()}},{key:"_closeDocListHandler",value:function(){(0,g.default)("#docModalList").hide(),(0,g.default)(".masker").hide()}},{key:"_nextHandler",value:function(){if(b.log("下一页",this.dynamicPPT.isNextAnimationComplete()),this.dynamicPPT&&!this.dynamicPPT.isNextAnimationComplete())this.dynamicPPT.pptNextAnimationHandler();else if(this._currentDocId>0&&this._currentPageNum<this._pageNum){var e={itemIdx:this._currentDocId,curPageNo:this._currentPageNum+1};p.default.api("sendDocumentSwitchPage",e)}}},{key:"_prevHandler",value:function(){if(b.log("上一页",this.dynamicPPT.isPrevAnimationComplete()),this.dynamicPPT&&!this.dynamicPPT.isPrevAnimationComplete())this.dynamicPPT.pptPrevAnimationHandler();else if(this._currentDocId>0&&this._currentPageNum>1){var e={itemIdx:this._currentDocId,curPageNo:this._currentPageNum-1};p.default.api("sendDocumentSwitchPage",e)}}},{key:"stopAndHide",value:function(){this._closeDocListHandler(),this._docShowType!=w&&(this._docShowType=w,this._changeDocShowBtns(this._docShowType),this._fitInDocView(this._docShowType),this._currentDocId>0&&this._sendDocumentCommand2sdk())}},{key:"_fitInHandler",value:function(e){switch(e.target.id){case"fitWidth":if(this._docShowType==A)return;this._docShowType=A,this._changeDocShowBtns(this._docShowType);break;case"fitHeight":if(this._docShowType==I)return;this._docShowType=I,this._changeDocShowBtns(this._docShowType);break;case"fitNormal":if(this._docShowType==w)return;this._docShowType=w,this._changeDocShowBtns(this._docShowType)}this._fitInDocView(this._docShowType),this._currentDocId>0&&this._sendDocumentCommand2sdk()}},{key:"_sendDocumentCommand2sdk",value:function(){p.default.api("sendDocumentCommand",{itemIdx:this._currentDocId,showType:this._docShowType,curV:this.curV,curH:this.curH,scale:100})}},{key:"_changeDocShowBtns",value:function(e){switch(e){case A:(0,g.default)(".fitWidth").css("color","#3498db"),(0,g.default)(".fitHeight").css("color","#ccc"),(0,g.default)(".fitNormal").css("color","#ccc");break;case I:(0,g.default)(".fitHeight").css("color","#3498db"),(0,g.default)(".fitWidth").css("color","#ccc"),(0,g.default)(".fitNormal").css("color","#ccc");break;default:(0,g.default)(".fitNormal").css("color","#3498db"),(0,g.default)(".fitHeight").css("color","#ccc"),(0,g.default)(".fitWidth").css("color","#ccc")}}},{key:"_fitInDocView",value:function(e){var n=(0,g.default)(".docView")[0];if(n&&this.currentImagePath)(0,g.default)(".docView").attr("src",this.currentImagePath),(0,g.default)(".docView").show();else{var i=(0,g.default)(".docBox")[0].clientWidth,r=(0,g.default)(".docBox")[0].clientHeight,a=P,o=O,s=void 0;if(this._docShowType==A?(s=v.default.getFitInWidth(i,r,a,o),this._showOverflow("y")):this._docShowType==I?(s=v.default.getFitInHeight(i,r,a,o),this._showOverflow("x")):(s=v.default.getFitInFull(i,r,a,o),this._hideOverflow()),s){var l=(0,g.default)(".docView");if(l.width(s.w),l.height(s.h),(0,g.default)(".docGroup").width(s.w),(0,g.default)(".docGroup").height(s.h),(0,g.default)(".docGroup").css("left","0"),(0,g.default)(".docGroup").css("top","0"),s.w<i){var u=.5*(i-s.w);(0,g.default)(".docGroup").css("left",""+u+"px")}if(s.h<r){var d=.5*(r-s.h);(0,g.default)(".docGroup").css("top",""+d+"px")}this._emit(t.DOC_IMAGE_LOAD,{width:s.w,height:s.h}),this.dynamicPPT.setPPTSize({width:s.w,height:s.h})}else b.warn("文档适配失败")}}},{key:"_onLoadImage",value:function(e){var n=e.currentTarget.naturalWidth,i=e.currentTarget.naturalHeight,r=(0,g.default)(".docBox")[0].clientWidth,a=(0,g.default)(".docBox")[0].clientHeight,o=void 0;if(this._docShowType==A?(o=v.default.getFitInWidth(r,a,n,i),this._showOverflow("y")):this._docShowType==I?(o=v.default.getFitInHeight(r,a,n,i),this._showOverflow("x")):(o=v.default.getFitInFull(r,a,n,i),this._hideOverflow()),o){var s=(0,g.default)(".docView");if(s.width(o.w),s.height(o.h),(0,g.default)(".docGroup").width(o.w),(0,g.default)(".docGroup").height(o.h),(0,g.default)(".docGroup").css("left","0"),(0,g.default)(".docGroup").css("top","0"),o.w<r){var l=.5*(r-o.w);(0,g.default)(".docGroup").css("left",""+l+"px")}if(o.h<a){var u=.5*(a-o.h);(0,g.default)(".docGroup").css("top",""+u+"px")}this._emit(t.DOC_IMAGE_LOAD,{width:o.w,height:o.h}),this.dynamicPPT.setPPTSize({width:o.w,height:o.h})}else b.warn("文档适配失败")}},{key:"_onLoadImageError",value:function(e){!v.default.isRecordPlayBack&&this.currentImagePath&&b.warn("文档加载失败->",e.currentTarget.alt,this.currentImagePath)}},{key:"_uploadFile",value:function(e){var t=document.getElementById("docFileBtn").files[0];if(!t)return void b.log("没有选择文件");this._closeDocListHandler();var n=t.name;if(n&&(n=n.toLowerCase()),n.lastIndexOf(".zip")>=0)this._uploadPPT(t,e);else{if(b.log("文件名:"+t.name+"->文件类型:"+t.type),t.size>52428800)return void R.default.showError(R.default.TYPE_3,v.default.localConfig.fileError);var i=t.name;if(i&&(i=i.toLowerCase()),i.lastIndexOf(".jpg")<0&&i.lastIndexOf(".png")<0&&i.lastIndexOf(".pdf")<0&&i.lastIndexOf(".doc")<0&&i.lastIndexOf(".ppt")<0&&i.lastIndexOf(".xls")<0)return void R.default.showError(R.default.TYPE_3,v.default.localConfig.layoutCont);if(!v.default.DOCServerIP)return b.warn("文档服务器地址无效,无法上传文件!"),void R.default.showError(R.default.TYPE_3,v.default.localConfig.serverError);T.default.showLoadingMask(),T.default.disEnabledDocBar(),T.default.disEnabledMediaBar();var r=new FormData;r.append("fileToUpload",t),r.append("siteID",v.default.siteId),r.append("convertTools","msoffice"),r.append("meetingid",String(v.default.classId)),r.append("timestamp",String(v.default.creatTimestamp())),r.append("createUserName",String(v.default.userName)),r.append("createUserID",String(v.default.nodeId)),r.append("modifyDate",v.default.creatTimestampStr());var a=v.default.DOCServerIP;v.default.DOCServerPort&&(a=a+":"+v.default.DOCServerPort);var o=v.default.locationProtocol+a+"/DocSharing/fileUploadJson";g.default.ajax({type:"POST",url:o,processData:!1,contentType:!1,data:r,xhr:function e(){var e=g.default.ajaxSettings.xhr();if(e.upload)return e.upload.addEventListener("progress",function(e){var t=e.loaded,n=e.total,i=Math.floor(100*t/n);T.default.updataLoadingMaskProgress(i)},!1),e},success:function(e){T.default.hideLoadingMask(),T.default.enabledDocBar(),T.default.enabledMediaBar(),this._uploadFileSuccess(e),(0,g.default)("#docFileBtn").val("")}.bind(this),error:function(e){T.default.hideLoadingMask(),T.default.enabledDocBar(),T.default.enabledMediaBar(),b.warn(name+"->上传文件失败",e),R.default.showError(R.default.TYPE_3,name+"->"+v.default.localConfig.uploaDocumentErr),(0,g.default)("#docFileBtn").val("")}})}}},{key:"_uploadPPT",value:function(e,t){if(b.log("文件名:"+e.name+"->文件类型:"+e.type),e.size>52428800)return void R.default.showError(R.default.TYPE_3,v.default.localConfig.fileError);var n=e.name.toLowerCase();if(n.lastIndexOf(".zip")<0)return void R.default.showError(R.default.TYPE_3,v.default.localConfig.fileFormatError);if(!v.default.DOCServerIP)return b.warn("文档服务器地址无效,无法上传文件!"),void R.default.showError(R.default.TYPE_3,v.default.localConfig.serverError);T.default.showLoadingMask(),T.default.disEnabledDocBar(),T.default.disEnabledMediaBar();var i=new FormData;i.append("fileToUpload",e),i.append("classId",String(v.default.classId)),i.append("siteID",v.default.siteId),i.append("createUserID",String(v.default.nodeId)),i.append("createUserName",String(v.default.userName));var r=v.default.DOCServerIP;v.default.DOCServerPort&&(r=r+":"+v.default.DOCServerPort);var a=v.default.locationProtocol+r+"/DocSharing/zipUpload";g.default.ajax({type:"POST",url:a,processData:!1,contentType:!1,data:i,xhr:function e(){var e=g.default.ajaxSettings.xhr();if(e.upload)return e.upload.addEventListener("progress",function(e){var t=e.loaded,n=e.total,i=Math.floor(100*t/n);T.default.updataLoadingMaskProgress(i)},!1),e},success:function(e){T.default.hideLoadingMask(),T.default.enabledDocBar(),T.default.enabledMediaBar(),this._uploadpptSuccess(e),(0,g.default)("#docFileBtn").val("")}.bind(this),error:function(e){T.default.hideLoadingMask(),T.default.enabledDocBar(),T.default.enabledMediaBar(),b.warn(name+"->上传文件失败",e),R.default.showError(R.default.TYPE_3,name+""+v.default.localConfig.uploaDocumentErr),(0,g.default)("#docFileBtn").val("")}})}},{key:"_uploadpptSuccess",value:function(e){if(b.log("服务器返回的zip信息->",e),e.docId){console.log("msg",e),(0,g.default)("#frame").attr("src",e.filePath);var t={};t.pageNum=e.imgSize,t.fileName=e.fileName,t.fileType=e.fileType,t.relativeUrl=e.relativeLocation;var n=e.filePath+"l";n=n.replace(".htmll",".html"),t.url=n,t.docId=e.docId,t.visible=!1,b.log("同步上传的文档消息给sdk",t),p.default.api("sendDocumentUpload",t)}else b.warn("服务器返回的zip文件信息->不能同步-->docId无效",e.docId),R.default.showError(R.default.TYPE_3,name+""+v.default.localConfig.uploaDocumentErr)}},{key:"_uploadFileSuccess",value:function(e){if(b.log("服务器返回的文档信息->",e),e.docId&&0==e.flag){var t={};t.pageNum=e.imgSize,t.fileName=e.fileName,t.fileType=e.fileType,t.relativeUrl=e.relativeLocation,t.url=e.filePath,t.docId=e.docId,t.visible=!1,t.dynamicTS=e.dynamicTransferStatic,p.default.api("sendDocumentUpload",t)}else b.warn("服务器返回的文件信息->不能同步-->docId无效",e.docId),R.default.showError(R.default.TYPE_3,v.default.localConfig.uploaDocumentErr)}},{key:"_switchDcoBtnHandler",value:function(e){b.log("_switchDcoBtnHandler---->",e.target.id),this._switchDcoHandler(e.target.id)}},{key:"_switchDcoHandler",value:function(e){b.log("_switchDcoHandler---->",e);var t=this._docList[e];if(t){var n={itemIdx:parseInt(e),visible:!0};p.default.api("sendDocumentSwitchDoc",n),this._closeDocListHandler()}else b.log("_switchDcoHandler---->文档不存在")}},{key:"_deleteDcoHandler",value:function(e){b.log("_deleteDcoHandler---->",e.target.id);var t=this._docList[parseInt(e.target.id)];if(t){var n={itemIdx:t.itemIdx,docId:t.docId,classId:v.default.classId};p.default.api("sendDocumentDelete",n)}else b.log("_deleteDcoHandler---->文档不存在")}},{key:"_getDocFullAddress",value:function(e){b.log("获取文档显示地址---->",e);var t={itemIdx:e.itemIdx,url:e.url},n=p.default.api("getDocFullAddress",t);return b.log("获取文档显示地址-->返回->",n),0==n.code?n.docFullAddress.images:[]}},{key:"_particularPage",value:function(){var e=(0,g.default)("#pageNo");if(e&&e.val()){var t=parseInt(e.val());if(t){t>this._pageNum&&(t=this._pageNum),t<=0&&(t=1),e.val(t);var n={itemIdx:this._currentDocId,curPageNo:t};p.default.api("sendDocumentSwitchPage",n),(0,g.default)("#pageNo")[0].value="",(0,g.default)("#pageNo").blur()}}}},{key:"_creatListItemDiv",value:function(e,t,n){var i=document.createElement("div");i.id="doc_"+e;var r=document.createElement("label");r.innerHTML="&#xe639;",r.className="iconfont",i.appendChild(r);var a=document.createElement("label");a.innerText=""+t,a.title=""+t,a.onclick=this._switchDcoBtnHandler.bind(this),a.id=e,i.appendChild(a);var o=document.createElement("label");return o.type="button",o.id=e,o.innerHTML="&#xe673;",o.className="iconfont",o.onclick=this._deleteDcoHandler.bind(this),i.appendChild(o),i}}]),t}(f.default);D.prototype.DOC_IMAGE_LOAD=D.DOC_IMAGE_LOAD="doc_image_load",D.prototype.SCENE_DOC_CHANGE=D.SCENE_DOC_CHANGE="scene_doc_change";var k=D;t.default=k;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"loger","D:/work/PCLive/src/ape/DocApe.js"),__REACT_HOT_LOADER__.register(w,"DOC_SHOW_FULL","D:/work/PCLive/src/ape/DocApe.js"),__REACT_HOT_LOADER__.register(A,"DOC_SHOW_WIDTH","D:/work/PCLive/src/ape/DocApe.js"),__REACT_HOT_LOADER__.register(I,"DOC_SHOW_HEIGHT","D:/work/PCLive/src/ape/DocApe.js"),__REACT_HOT_LOADER__.register(P,"PPT_WIDTH","D:/work/PCLive/src/ape/DocApe.js"),__REACT_HOT_LOADER__.register(O,"PPT_HEIGHT","D:/work/PCLive/src/ape/DocApe.js"),__REACT_HOT_LOADER__.register(D,"DocApe","D:/work/PCLive/src/ape/DocApe.js"),__REACT_HOT_LOADER__.register(k,"default","D:/work/PCLive/src/ape/DocApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(7),u=i(l),d=n(1),c=i(d),f=n(2),h=i(f),p=n(4),_=i(p),g=n(3),m=i(g),v=c.default.getLoger("PC-DrawTool"),y=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.isShow=!1,m.default.isDraw=!1,e.addEvent(),e.init(),e}return o(t,e),s(t,[{key:"init",value:function(){(0,h.default)(".foldDrawTool").on("click",this._controlDrawToolVisible.bind(this)),(0,h.default)(".toolColor").on("mouseleave",this._showColorNone.bind(this)),(0,h.default)(".showColor").on("mouseenter",this._showColorBlock.bind(this)),(0,h.default)(".toolForm").on("mouseleave",this._showFormNone.bind(this)),(0,h.default)("#showForm").on("mouseenter",this._showFormBlock.bind(this)),(0,h.default)("#showForm").on("click",this._showFormBlock.bind(this)),(0,h.default)("#curveBrush").on("click",this._formHandler.bind(this)),(0,h.default)("#straightBrush").on("click",this._formHandler.bind(this)),(0,h.default)("#squareBrush").on("click",this._formHandler.bind(this)),(0,h.default)("#circleBrush").on("click",this._formHandler.bind(this)),(0,h.default)("#customBrush").on("click",this._formHandler.bind(this)),(0,h.default)(".showColor").on("click",this._showColorBlock.bind(this)),(0,h.default)(".redColor").on("click",this._colorHandler.bind(this)),(0,h.default)(".blueColor").on("click",this._colorHandler.bind(this)),(0,h.default)(".purpleColor").on("click",this._colorHandler.bind(this)),(0,h.default)(".yellowColor").on("click",this._colorHandler.bind(this)),(0,h.default)(".pencil").on("click",this._pencilHandler.bind(this)),(0,h.default)(".rescind").on("click",this._rescindHandler.bind(this)),(0,h.default)(".clearContent").on("click",this._clearHandler.bind(this)),(0,h.default)(".left").on("click",this._hideColorTool.bind(this)),(0,h.default)(".header").on("click",this._hideColorTool.bind(this)),(0,h.default)(".right").on("click",this._hideColorTool.bind(this)),(0,h.default)(".docBox").on("click",this._hideColorTool.bind(this)),(0,h.default)("#controlBrush").on("click",this._controlBrushHandler.bind(this))}},{key:"addEvent",value:function(){_.default.on("class_join_success",this._classJoinSuccessHandler.bind(this)),_.default.on("class_insert_roster",this._insertRosterHandler.bind(this)),_.default.on("class_update_status",this._classUpdateHandler.bind(this))}},{key:"_classJoinSuccessHandler",value:function(e){e.userRole==m.default.USER_NOTMAL?this.isShow=!0:((0,h.default)(".foldDrawTool").show(),(0,h.default)(".drawTool").show(),this.isShow=!0)}},{key:"_insertRosterHandler",value:function(e){e&&m.default.userRole==m.default.USER_NOTMAL&&(m.default.isEnableDraw||this._hideBrushSwitch())}},{key:"_classUpdateHandler",value:function(e){e&&(m.default.isEnableDraw=e.isEnableDraw||!1,this._checkBrushSwitch())}},{key:"_checkBrushSwitch",value:function(){this._brushSwitchHandler()}},{key:"_controlBrushHandler",value:function(e){1==m.default.isEnableDraw?(m.default.isEnableDraw=!1,_.default.api("changeDrawStatus",{isEnableDraw:!1})):(m.default.isEnableDraw=!0,_.default.api("changeDrawStatus",{isEnableDraw:!0}))}},{key:"_brushSwitchHandler",value:function(){1==m.default.isEnableDraw?(m.default.userRole==m.default.USER_NOTMAL&&this._showBrushSwitch(),m.default.userRole==m.default.USER_HOST&&(0,h.default)(".controlBrush").addClass("controlBrushClick")):(m.default.userRole==m.default.USER_NOTMAL&&(this._hideBrushSwitch(),m.default.isDraw=!1),m.default.userRole==m.default.USER_HOST&&(0,h.default)(".controlBrush").removeClass("controlBrushClick"))}},{key:"_showBrushSwitch",value:function(){(0,h.default)(".foldDrawToolOut").show(),(0,h.default)(".foldDrawTool").show(),(0,h.default)(".drawTool").show(),(0,h.default)(".drawTool").css("height","160px")}},{key:"_hideBrushSwitch",value:function(){(0,h.default)(".foldDrawToolOut").hide(),(0,h.default)(".foldDrawTool").hide(),(0,h.default)(".drawTool").hide()}},{key:"_pencilHandler",value:function(){if(1==m.default.isLaser){m.default.isLaser=!1;var e={pointGroup:[],duration:0};_.default.api("sendInsertCursor",e),(0,h.default)(".canvasContent").css("cursor","default")}(0,h.default)(".laserBoard").css("z-index","-1"),(0,h.default)(".toolColor").css("display","none"),m.default.isDraw=!m.default.isDraw,this._emit(t.DRAW_TOOL_CHANGE,{action:"pencil",isDraw:m.default.isDraw}),m.default.isDraw?(0,h.default)(".canvasContent").css({cursor:"url(images/tool/penciling.png),crosshair"}):(0,h.default)(".canvasContent").css("cursor","default")}},{key:"_rescindHandler",value:function(){(0,h.default)(".toolColor").css("display","none"),this._emit(t.DRAW_TOOL_CHANGE,{action:"rescind"})}},{key:"_clearHandler",value:function(){(0,h.default)(".toolColor").css("display","none"),this._emit(t.DRAW_TOOL_CHANGE,{action:"clear"})}},{key:"_colorHandler",value:function(e){(0,h.default)(".toolColor").css("display","none"),
v.log(e.target.id,e.target.title);var n=e.target.title;this._emit(t.DRAW_TOOL_CHANGE,{action:"changeColor",color:n});var i=document.getElementById("showColor");switch(e.target.id){case"redColor":i.style.background='url("images/colorRed.png") no-repeat',(0,h.default)(".showColor").unbind("click"),this._showColorNone(),this._showFormNone();break;case"blueColor":i.style.background='url("images/colorBlue.png") no-repeat',(0,h.default)(".showColor").unbind("click"),this._showColorNone(),this._showFormNone();break;case"purpleColor":i.style.background='url("images/colorPurple.png") no-repeat',(0,h.default)(".showColor").unbind("click"),this._showColorNone(),this._showFormNone();break;case"yellowColor":i.style.background='url("images/colorYellow.png") no-repeat',(0,h.default)(".showColor").unbind("click"),this._showColorNone(),this._showFormNone()}}},{key:"_formHandler",value:function(){(0,h.default)(".toolForm").css("display","none"),(0,h.default)("#showForm").unbind("click"),v.log("点击隐藏形状工具列表")}},{key:"_showColorBlock",value:function(){(0,h.default)(".toolColor").css("display","block"),(0,h.default)(".toolColor").css("z-index",0),(0,h.default)(".toolForm").css("display","none"),(0,h.default)(".toolForm").css("z-index",0)}},{key:"_showColorNone",value:function(){(0,h.default)(".toolColor").css("display","none"),(0,h.default)(".toolColor").css("z-index",0)}},{key:"_showFormBlock",value:function(){(0,h.default)(".toolForm").css("display","block"),(0,h.default)(".toolForm").css("z-index",2),(0,h.default)(".toolColor").css("display","none"),(0,h.default)(".toolColor").css("z-index",0)}},{key:"_showFormNone",value:function(){(0,h.default)(".toolForm").css("display","none"),(0,h.default)(".toolForm").css("z-index",0)}},{key:"_controlDrawToolVisible",value:function(){this.isShow?((0,h.default)(".drawTool").hide(),(0,h.default)(".arrowTop").hide(),(0,h.default)(".arrowBottom").show()):((0,h.default)(".drawTool").show(),(0,h.default)(".arrowTop").show(),(0,h.default)(".arrowBottom").hide()),this.isShow=!this.isShow}},{key:"_hideColorTool",value:function(){(0,h.default)(".toolColor").css("display","none"),(0,h.default)(".toolForm").css("display","none")}}]),t}(u.default);y.prototype.DRAW_TOOL_CHANGE=y.DRAW_TOOL_CHANGE="draw_tool_change";var E=y;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"loger","D:/work/PCLive/src/ape/DrawTool.js"),__REACT_HOT_LOADER__.register(y,"DrawTool","D:/work/PCLive/src/ape/DrawTool.js"),__REACT_HOT_LOADER__.register(E,"default","D:/work/PCLive/src/ape/DrawTool.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(7),u=i(l),d=n(1),c=i(d),f=n(2),h=i(f),p=n(4),_=i(p),g=n(3),m=(i(g),c.default.getLoger("PC-DynamicPPT"));window.ispringPresentationConnector={},window.pptPlayer;var v=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.currentAnimationStep=1,e.animationStepCount=1,e.currenSlideIndex=0,e.pptiframeSrc="",e.pptData=null,e.changePageTimer=0,e.addEvent(),e}return o(t,e),s(t,[{key:"addEvent",value:function(){(0,h.default)("#framePPT").on("load",this._onLoadPPT.bind(this)),(0,h.default)("#framePPT").on("error",this._onLoadPPTError.bind(this)),(0,h.default)(".pptNextStep").hide(),(0,h.default)(".pptPrevStep").hide(),(0,h.default)(".pptNextStep").on("click",this.pptNextAnimationHandler.bind(this)),(0,h.default)(".pptPrevStep").on("click",this.pptPrevAnimationHandler.bind(this))}},{key:"updataPPT",value:function(e){if(console.log("更新ppt数据",e),e)if(this.pptData=e,1==e.visible){this.showPPT();var t=e.html||"",n=encodeURI(window.location.href),i=n.indexOf("localhost:");if(i<0&&(i=n.indexOf("127.0.0.1")),i>=0&&(t="./ppt0516/index.html",m.warn("使用本地的动态ppt测试",t)),!t)return void m.warn("ppt地址转换失败");this.pptiframeSrc==t?this.changePage():this._loadIframSrc(t)}else this.hidePPT();else this.pptData=null,this.hidePPT(),this.clearPPT()}},{key:"showPPT",value:function(){(0,h.default)("#framePPT").show()}},{key:"hidePPT",value:function(){(0,h.default)("#framePPT").hide(),(0,h.default)(".pptPrevStep").hide(),(0,h.default)(".pptNextStep").hide(),(0,h.default)("#framePPT").attr("src","")}},{key:"setPPTSize",value:function(e){}},{key:"clearPPT",value:function(){clearTimeout(this.changePageTimer),this.pptData=null,this.pptiframeSrc="",this.currentAnimationStep=1,this.animationStepCount=1,this.currenSlideIndex=0,window.ispringPresentationConnector={},window.pptPlayer=null}},{key:"_loadIframSrc",value:function(e){var t=!0,n=this;window.ispringPresentationConnector.register=function(e){window.pptPlayer=e,console.log("ispringPresentationConnector"),window.pptPlayer.view().playbackController().slideChangeEvent().addHandler(function(e){console.log("动态ppt当前index: "+e),n.currenSlideIndex=e,n.animationStepCount=window.pptPlayer.view().playbackController().currentSlide().animationSteps().count(),t&&(t=!1,n.changePage(1e3))}),window.pptPlayer.view().playbackController().stepChangeEvent().addHandler(function(e){n.currentAnimationStep=e+1||1,n.animationStepCount=window.pptPlayer.view().playbackController().currentSlide().animationSteps().count(),console.log("动态ppt当前 step: "+e," this.currentAnimationStep:"+n.currentAnimationStep)}),window.pptPlayer.view().playbackController().clock.tickEvent().addHandler(function(e){var t=e.timestamp();window.console.log("Tick. Slide:",t.slideIndex(),"; step: ",t.stepIndex(),"; timeOffset: ",t.timeOffset())})},this.pptiframeSrc=e,console.log("pptiframeSrc",this.pptiframeSrc),(0,h.default)("#framePPT").attr("src",this.pptiframeSrc)}},{key:"changePage",value:function(e){var t=this;return console.log("切换PPT页码---->",this.pptData),this.pptData&&window.pptPlayer?void(this.pptData.curPageNo!=this.currenSlideIndex+1?(clearTimeout(this.changePageTimer),e?!function(){var n=t;t.changePageTimer=setTimeout(function(){console.log(e,"延迟切换PPT页码---->",n.pptData.curPageNo),this.currentAnimationStep=1,this.animationStepCount=1,window.pptPlayer.view().playbackController().gotoSlide(n.pptData.curPageNo-1,!1),setTimeout(function(){for(var e=n.pptData.animationStep,t=0;t<e-1;t++)window.pptPlayer.view().playbackController().gotoNextStep()},1e3)},e)}():(console.log("切换PPT页码---->",this.pptData.curPageNo),this.currentAnimationStep=1,this.animationStepCount=1,window.pptPlayer.view().playbackController().gotoSlide(this.pptData.curPageNo-1,!1))):this._changeAnimationStep()):void console.warn("切换PPT页码-->_data数据不存在")}},{key:"_changeAnimationStep",value:function(){if(console.log("切换动画步数---->",this.currentAnimationStep,"-->",this.pptData.animationStep),!this.pptData||!window.pptPlayer)return void console.warn("切换PPT动画步骤-->_data数据不存在");if(this.animationStepCount<2)return void console.log("当前页码的动画步数为->"+this.animationStepCount);if(this.pptData.animationStep>this.currentAnimationStep){console.log("切换动画步数---->下一步");for(var e=this.currentAnimationStep;e<this.pptData.animationStep;e++)try{window.pptPlayer.view().playbackController().gotoNextStep()}catch(e){console.warn("切换动画步数---->下一步-失败",e)}}else if(this.pptData.animationStep<this.currentAnimationStep){console.log("切换动画步数---->上一步"),window.pptPlayer.view().playbackController().gotoPreviousStep();for(var t=this.pptData.animationStep;t<this.currentAnimationStep;t++)try{window.pptPlayer.view().playbackController().gotoPreviousStep()}catch(e){console.warn("切换动画步数---->上一步-失败",e)}}else console.log("切换动画步数---->完成")}},{key:"_onLoadPPT",value:function(e){console.log("ppt加载完成---->")}},{key:"_onLoadPPTError",value:function(e){console.warn("ppt加载失败---->",e)}},{key:"isNextAnimationComplete",value:function(){return this.animationStepCount>1&&this.animationStepCount!=this.currentAnimationStep?(this.currentAnimationStep=this.pptData.animationStep,console.warn("还有动画需要操作-.不能翻页"),!1):(console.warn("没有动画需要操作-.可以翻页"),!0)}},{key:"isPrevAnimationComplete",value:function(){return this.animationStepCount>1&&this.currentAnimationStep>2?(console.warn("还有动画需要操作-.不能翻页"),!1):(console.warn("没有动画需要操作-.可以翻页"),!0)}},{key:"pptNextAnimationHandler",value:function(){return this.pptData&&window.pptPlayer?void _.default.api("sendDocumentSwitchAnimation",{step:1}):void console.warn("下一步动画---->数据无效")}},{key:"pptPrevAnimationHandler",value:function(){return this.pptData&&window.pptPlayer?void _.default.api("sendDocumentSwitchAnimation",{step:-1}):void console.warn("下一步动画---->数据无效")}}]),t}(u.default);v.prototype.SET_PPT_CHANGE=v.SET_PPT_CHANGE="set_ppt_change";var y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/PCLive/src/ape/DynamicPPT.js"),__REACT_HOT_LOADER__.register(v,"DynamicPPT","D:/work/PCLive/src/ape/DynamicPPT.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/PCLive/src/ape/DynamicPPT.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(2),h=i(f),p=n(3),_=(i(p),n(17)),g=i(_),m=u.default.getLoger("PC-MediaControlBarApe"),v=66,y=90,E=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.playStatus="",e.isShowVolumeBar=!1,e.isProgressMouseDown=!1,e.isProVolMouseDown=!1,e.isOpenUpdateStatusInfo=!1,e.video=null,e.controlCallback=null,e.totalTime=0,e.duration=0,e.mediaVolume=60,e.seekPercent=0,e.seekTime=0,e.updateCounter=0,e.updateStatusDelay=5,e.timerCounter=new g.default,e.timerCounter.addTimerCallBack(e.timerCounterUptate.bind(e),1),e.init(),e.addEvent(),e.onWindowResize(),e}return o(t,e),s(t,[{key:"init",value:function(){this.stop(),this.updatePlayProgressBar(),this.updaterVolumeProgressBar()}},{key:"addEvent",value:function(){(0,h.default)(window).on("resize",this.onWindowResize.bind(this)),(0,h.default)("#mediaShareVolumePlay").on("click",this._openVolumeControl.bind(this)),(0,h.default)("#mediaShareVoice_btn").on("mousedown",this._changeVolume.bind(this)),(0,h.default)("#mediaShareProgressPause").on("click",this._clickPause.bind(this)),(0,h.default)("#mediaShareProgressPlay").on("click",this._clickPlay.bind(this)),(0,h.default)("#mediaShareProgress_btn").on("mousedown",this._changeProgressBar.bind(this)),(0,h.default)("#mediaShareProgress_bg").on("mousedown",this._clickProgressBarBg.bind(this)),(0,h.default)("#mediaShareProgress_color").on("mousedown",this._clickProgressBarBg.bind(this))}},{key:"startTimerCounter",value:function(){m.log("开启计时器"),this.updateCounter=0,this.stopTimerCounter(),this.timerCounter&&this.timerCounter.startTimer()}},{key:"stopTimerCounter",value:function(){m.log("停止计时器"),this.updateCounter=0,this.timerCounter&&this.timerCounter.stopTimer()}},{key:"timerCounterUptate",value:function(){this.video&&!this.isProgressMouseDown&&(this.totalTime=this.video.duration||this.duration,this.seekTime=this.video.currentTime||0,this.seekPercent=parseInt(this.seekTime/this.totalTime*100),this.updatePlayProgressBar()),this.seekTime>=this.totalTime&&1!=this.seekTime&&(this.totalTime>0&&this.sendCallBack(t.STOP),this.stopTimerCounter(),this.stop()),this.updateCounter++,this.updateCounter>=this.updateStatusDelay&&(this.updateCounter=0,m.warn("定时同步更新媒体共享的状态"),this.sendCallBack(this.playStatus))}},{key:"play",value:function(e){m.log("play"),this.playStatus=t.PLAY,this.showPauseUI(),this.showBox(),this.startTimerCounter()}},{key:"pause",value:function(){m.log("pause"),this.playStatus=t.PAUSE,this.showPlayUI(),this.showBox(),this.stopTimerCounter()}},{key:"stop",value:function(){m.log("stop"),this.seekPercent=0,this.seekTime=0,this.totalTime=0,this.playStatus=t.STOP,this._hideMediaSharePlayProgressVoiceBox(),this.updatePlayProgressBar(),this.showPlayUI(),this.hideBox(),this.stopTimerCounter()}},{key:"seek",value:function(e){m.log("seek"),this.showBox(),this.seekTime=e||0,this.seekPercent=parseInt(this.seekTime/this.totalTime*100),this.updateVideoProgress(),this._hideMediaSharePlayProgressVoiceBox()}},{key:"changeVolume",value:function(e){m.log("changeVolume"),this.showBox(),this.mediaVolume=e||0,this.updaterVolumeProgressBar()}},{key:"showPlayUI",value:function(){(0,h.default)("#mediaShareProgressPause").hide(),(0,h.default)("#mediaShareProgressPlay").show()}},{key:"showPauseUI",value:function(){(0,h.default)("#mediaShareProgressPause").show(),(0,h.default)("#mediaShareProgressPlay").hide()}},{key:"showBox",value:function(){(0,h.default)("#h5MediaShareControls").show()}},{key:"hideBox",value:function(){(0,h.default)("#h5MediaShareControls").hide()}},{key:"_clickPlay",value:function(){m.log("播放按钮点击===>"),this.updateCounter=0,this.playStatus=t.PLAY,this._hideMediaSharePlayProgressVoiceBox(),this.showPauseUI(),this.startTimerCounter(),this.sendCallBack(t.PLAY)}},{key:"_clickPause",value:function(){m.log("暂停播放按钮点击===>"),this.updateCounter=0,this.playStatus=t.PAUSE,this._hideMediaSharePlayProgressVoiceBox(),this.showPlayUI(),this.stopTimerCounter(),this.sendCallBack(t.PAUSE)}},{key:"_openVolumeControl",value:function(){1==this.isShowVolumeBar?this._hideMediaSharePlayProgressVoiceBox():this._showMediaSharePlayProgressVoiceBox()}},{key:"_changeVolume",value:function(e){return this.updateCounter=0,this.isProVolMouseDown=!0,document.onmousemove=this._mouseMoveMediaVoiceHandler.bind(this),document.onmouseup=this._mouseUpMediaVoiceHandler.bind(this),!1}},{key:"_mouseMoveMediaVoiceHandler",value:function(e){var t=this._moveVolMethod(e);this.mediaVolume=t,this.updaterVolumeProgressBar()}},{key:"_mouseUpMediaVoiceHandler",value:function(e){this.isProVolMouseDown&&(this.playStatus==t.PLAY?this.sendCallBack(t.PLAY):this.playStatus==t.PAUSE?this.sendCallBack(t.PAUSE):this.sendCallBack(t.STOP)),this.isProVolMouseDown=!1,document.onmousemove=null,document.onmouseup=null}},{key:"_moveVolMethod",value:function(e){var t=(e||window.event).clientY,n=(0,h.default)("#mediaShareVoice_bg"),i=n.offset().top,r=n.innerHeight(),a=parseInt(t-i);a<0&&(a=0),a>r&&(a=r);var o=Math.floor(100*a/r);return o=100-o}},{key:"updaterVolumeProgressBar",value:function(){var e=(0,h.default)("#mediaShareVoice_color"),t=(0,h.default)("#mediaShareVoice_btn"),n=this.mediaVolume/100;this.video&&(this.video.volume=n),t.css("top",100-this.mediaVolume+"%"),e.css("height",this.mediaVolume+"%")}},{key:"_showMediaSharePlayProgressVoiceBox",value:function(){this.isShowVolumeBar=!0,(0,h.default)(".mediaSharePlayProgressVoiceBox").show()}},{key:"_hideMediaSharePlayProgressVoiceBox",value:function(){this.isShowVolumeBar=!1,(0,h.default)(".mediaSharePlayProgressVoiceBox").hide()}},{key:"_changeProgressBar",value:function(e){return this._hideMediaSharePlayProgressVoiceBox(),this.isProgressMouseDown=!0,document.onmousemove=this._mouseMoveMediaProgressHandler.bind(this),document.onmouseup=this._mouseUpMediaaHandler.bind(this),!1}},{key:"_clickProgressBarBg",value:function(e){this.isProgressMouseDown=!0;var t=this._moveMethod(e);this.seekPercent=t,this.updatePlayProgressBar(),this._mouseUpMediaaHandler(e)}},{key:"_mouseMoveMediaProgressHandler",value:function(e){var t=this._moveMethod(e);this.seekPercent=t,this.updatePlayProgressBar()}},{key:"updatePlayProgressBar",value:function(){var e=(0,h.default)("#mediaShareProgress_color"),t=(0,h.default)("#mediaShareProgress_btn");t.css("left",this.seekPercent+"%"),e.css("width",this.seekPercent+"%");var n=this.timerCounterLayOut(this.seekTime),i=this.timerCounterLayOut(this.totalTime);(0,h.default)("#mediaShareTimestamp").html(n+"/"+i)}},{key:"updateVideoProgress",value:function(){if(this.video)try{this.video.currentTime=this.seekTime}catch(e){m.warn("无法设置video的currentTime")}}},{key:"_mouseUpMediaaHandler",value:function(e){this.isProgressMouseDown&&(this.seekTime=parseInt(this.seekPercent*this.totalTime*.01),this.playStatus==t.PLAY?this.sendCallBack(t.PLAY):this.playStatus==t.PAUSE?this.sendCallBack(t.PAUSE):this.sendCallBack(t.STOP),this.updateVideoProgress()),this.isProgressMouseDown=!1,document.onmousemove=null,document.onmouseup=null}},{key:"_moveMethod",value:function(e){var t=(e||window.event).clientX,n=(0,h.default)("#mediaShareProgress_bg"),i=n.offset().left,r=n.innerWidth(),a=parseInt(t-i);a<0&&(a=0),a>r&&(a=r);var o=Math.floor(100*a/r);return o}},{key:"timerCounterLayOut",value:function(e){var t=0,n=0;t=Math.floor(e/60),n=Math.floor(e-60*t);var i=(t<10?"0":"")+t;return i+=(n<10?":0":":")+n}},{key:"onWindowResize",value:function(){var e=(0,h.default)(".h5MediaShareControls").width();(0,h.default)(".mediaSharePlayProgressBox").width(e-v-y+"px")}},{key:"sendCallBack",value:function(e,t){this.isOpenUpdateStatusInfo&&this.controlCallback&&this.controlCallback({action:e,data:{seek:this.seekTime,mediaVolume:this.mediaVolume}})}}]),t}(c.default);E.prototype.STOP=E.STOP="stop",E.prototype.PLAY=E.PLAY="play",E.prototype.PAUSE=E.PAUSE="pause",E.prototype.SEEK=E.SEEK="seek",E.prototype.CHANGE_VOLUME=E.CHANGE_VOLUME="change_volume";var S=E;t.default=S;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/PCLive/src/ape/MediaControlBarApe.js"),__REACT_HOT_LOADER__.register(v,"SOUND_BTN_WIDTH","D:/work/PCLive/src/ape/MediaControlBarApe.js"),__REACT_HOT_LOADER__.register(y,"TIME_TEXT_WIDTH","D:/work/PCLive/src/ape/MediaControlBarApe.js"),__REACT_HOT_LOADER__.register(E,"MediaControlBarApe","D:/work/PCLive/src/ape/MediaControlBarApe.js"),__REACT_HOT_LOADER__.register(S,"default","D:/work/PCLive/src/ape/MediaControlBarApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=i(f),p=n(9),_=i(p),g=n(2),m=i(g),v=n(3),y=i(v),E=n(11),S=i(E),T=n(16),C=i(T),R=n(6),b=i(R),w=u.default.getLoger("PC-MediaManagerApe"),A="medioBox",I="h5VideoBox",P="flashViewDivVertical",O="media1v1BoxView_flash_content",D="flashViewDivHorizontal",k="./FlashVideoPlayer.swf",L=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.publishTimer=0,e.smallVideoW=160,e.smallVideoH=120,e.smallVideoW_H5=174,e.smallVideoH_H5=130,e.h5HlsPlayerList=[],e.flashPlayerList=[],e.flashPlayerMain,e.minFlashViewWidth=800,e.minH5ViewWidth=800,e.creatH5Seting(),_.default.getLocalStore(),e.addEvent(),e.hideBottomVideoViewBox(),e.hideInvisibleSpeakerUI(),e.init(),e}return o(t,e),s(t,[{key:"addEvent",value:function(){(0,m.default)(window).on("resize",this.onWindowResize.bind(this)),h.default.on("error_event",this._classErrorHandler.bind(this)),h.default.on("class_join_success",this._classJoinSuccessHandler.bind(this)),h.default.on("class_get_info_success",this._classGetInfoSuccessHandler.bind(this)),h.default.on("media_stop_publish",this._mediaStopPublishHandler.bind(this)),h.default.on("video_broadcast",this._videoBroadcastHandler.bind(this)),h.default.on("video_play",this._videoPlayHandler.bind(this)),h.default.on("video_stop",this._videoStopHandler.bind(this)),h.default.on("audio_broadcast",this._audioBroadcastHandler.bind(this)),h.default.on("audio_play",this._audioPlayHandler.bind(this)),h.default.on("audio_stop",this._audioStopHandler.bind(this)),h.default.on("class_insert_roster",this._classInsertRosterHandler.bind(this)),h.default.on("class_update_roster",this._updateRosterHandler.bind(this)),(0,m.default)(".tabCon").on("click",".setUpInfo",this._settingTheirHandler.bind(this)),(0,m.default)("#nextStep").on("click",this._clickNextStepHandler.bind(this)),(0,m.default)("#prevStep").on("click",this._clickPrevStepHandler.bind(this)),(0,m.default)("#invisible_speakBtnOpen").on("click",this._clickInvisiblePublishVideo.bind(this)),(0,m.default)("#invisible_speakBtnClose").on("click",this._clickInvisibleStopPublishVideo.bind(this))}},{key:"init",value:function(){(0,m.default)(".setting").on("click",this._settingHandler.bind(this)),this.flashPlayerList=[],this.h5HlsPlayerList=[],y.default.isRecordPlayBack?this.creatH5HlsPlayerListView():this.creatFlashPlayerListView()}},{key:"creatH5HlsPlayerListView",value:function(){switch(y.default.maxMediaChannels){case 1:this.creatRightMainH5Player();break;case 2:this.creatMiddleMainH5Player();break;default:this.creatRightMainH5Player(),this.creatBottomH5Player()}}},{key:"creatFlashPlayerListView",value:function(){switch(w.log("创建flash播放器列表",y.default.maxMediaChannels),y.default.maxMediaChannels){case 1:this.creatRightMainFlash();break;case 2:y.default.userRole==y.default.USER_INVISIBLE&&this.showInvisibleSpeakerUI(),this.creatMiddleMainFlash();break;default:this.creatRightMainFlash(),this.creatBottomFlash()}}},{key:"creatRightMainFlash",value:function(){var e=document.createElement("div");e.id=P;var t=!1;y.default.userRole==y.default.USER_HOST&&(t=!0),(0,m.default)("#videoDivBox").append(e);var n=new _.default;n.init({swfUrl:k,divName:P,mediaId:0,layoutType:_.default.LAYOUT_V,type:_.default.VIDEO,callBack:this._flashPlayerCallback.bind(this),playersDataList:[{mediaType:_.default.VIDEO,width:320,height:240,showFullBtn:!1,showPublishBtn:t,level:1}],videoImage:"images/waiting.png",audioImage:"images/waitingAudio.png",audioBtnImage:"images/audioBtnImage.png",videoBtnImage:"images/videoBtnImage.png",stopPublishImage:"images/stopPublishImage.png",backgroundColor:3487030}),this.flashPlayerList.push(n),this.flashPlayerMain=n,this.flashPlayerMain.isMainFlash=!0}},{key:"creatMiddleMainFlash",value:function(){this.showMiddleFlashVideoViewBox();var e=document.createElement("div");e.id=O;var t=!1;y.default.userRole==y.default.USER_HOST&&(t=!0),(0,m.default)("#media1v1BoxView_flash").append(e);var n=new _.default;n.layoutGapV=10,n.myUserRole=y.default.userRole,n.init({swfUrl:k,divName:O,mediaId:0,layoutType:_.default.LAYOUT_V,type:_.default.VIDEO,callBack:this._flashPlayerCallback.bind(this),playersDataList:[{mediaType:_.default.VIDEO,width:320,height:240,showFullBtn:!1,showPublishBtn:t,level:1,usePermission:"host"},{mediaType:_.default.VIDEO,width:320,height:240,showFullBtn:!1,showPublishBtn:!1,level:0,usePermission:"normal"},{mediaType:_.default.AUDIO,width:1,height:1,showFullBtn:!1,showPublishBtn:!1,showUserName:!1,level:0,usePermission:"invisible"}],videoImage:"images/waiting.png",audioImage:"images/waitingAudio.png",audioBtnImage:"images/audioBtnImage.png",videoBtnImage:"images/videoBtnImage.png",stopPublishImage:"images/stopPublishImage.png",backgroundColor:3487030}),this.flashPlayerList.push(n),this.flashPlayerMain=n,this.flashPlayerMain.isMainFlash=!0,w.log("创建中部1V1播放器列表",y.default.maxMediaChannels)}},{key:"creatBottomFlash",value:function(){w.log("创建底部flash播放器列表",y.default.maxMediaChannels);var e=document.createElement("div");e.id=D,(0,m.default)("#botFlashVideoBox").append(e),this.showBottomFlashVideoViewBox();for(var t=[],n=1;n<y.default.maxMediaChannels;n++)t.push({mediaType:_.default.VIDEO,width:this.smallVideoW,height:this.smallVideoH,showFullBtn:!1,showPublishBtn:!1,level:0});var i=new _.default;i.topGap=6,i.leftGap=10,i.layoutGapH=10,i.init({swfUrl:k,divName:D,mediaId:0,autoShowLayout:!0,layoutType:_.default.LAYOUT_H,type:_.default.VIDEO,playersDataList:t,callBack:this._flashPlayerCallback.bind(this),videoImage:"images/waiting.png",audioImage:"images/waitingAudio.png",audioBtnImage:"images/audioBtnImage.png",videoBtnImage:"images/videoBtnImage.png",stopPublishImage:"images/stopPublishImage.png",backgroundColor:2500134}),this.flashPlayerList.push(i)}},{key:"creatRightMainH5Player",value:function(){var e=new S.default(document.getElementById("replayVideo"));e.divName="replayVideo",(0,m.default)("#"+e.divName)[0].poster="images/waiting.png",this.h5HlsPlayerList.push(e)}},{key:"creatMiddleMainH5Player",value:function(){if(y.default.maxMediaChannels>1){this.showMiddleH5VideoViewBox();var e=new S.default(document.getElementById("media1v1BoxView_top_video"));e.divName="media1v1BoxView_top_video",(0,m.default)("#"+e.divName)[0].poster="images/waiting.png",this.h5HlsPlayerList.push(e);var t=new S.default(document.getElementById("media1v1BoxView_bottom_video"));t.divName="media1v1BoxView_bottom_video",(0,m.default)("#"+t.divName)[0].poster="images/waiting.png",this.h5HlsPlayerList.push(t),console.log("h5HlsPlayerList->",this.h5HlsPlayerList)}}},{key:"creatBottomH5Player",value:function(){if(y.default.maxMediaChannels>1){this.showBottomH5VideoViewBox();for(var e=1;e<y.default.maxMediaChannels;e++){var t="botH5VideoSingleBox_"+e,n=new S.default(document.getElementById(t));n.divName=t,(0,m.default)("#"+t).show(),(0,m.default)("#"+t).css("width",this.smallVideoW_H5+"px"),(0,m.default)("#"+t).css("height",this.smallVideoH_H5+"px"),(0,m.default)("#"+t)[0].poster="images/waiting.png",this.h5HlsPlayerList.push(n)}}}},{key:"showBottomFlashVideoViewBox",value:function(){(0,m.default)("#botVideoWindow").show(),(0,m.default)("#botFlashVideoBox").show(),(0,m.default)("#nextStep").show(),(0,m.default)("#prevStep").show(),this.updateLeftWarpBottomVideoView(),this.updateLeftWarpTop()}},{key:"showMiddleFlashVideoViewBox",value:function(){(0,m.default)("#media1v1BoxView").show(),(0,m.default)("#media1v1BoxView_flash").show(),(0,m.default)("#media1v1BoxView_h5").hide()}},{key:"showMiddleH5VideoViewBox",value:function(){(0,m.default)("#media1v1BoxView").show(),(0,m.default)("#media1v1BoxView_flash").hide(),(0,m.default)("#media1v1BoxView_h5").show()}},{key:"showBottomH5VideoViewBox",value:function(){(0,m.default)("#botVideoWindow").show(),(0,m.default)("#nextStep").show(),(0,m.default)("#prevStep").show(),(0,m.default)("#botH5VideoBox").show(),y.default.isRecordPlayBack&&(this.minH5ViewWidth=(this.smallVideoW_H5+10)*(y.default.maxMediaChannels-1),(0,m.default)("#botH5VideoBox").css("min-width",this.minH5ViewWidth+"px")),this.updateLeftWarpTop(),this.updateLeftWarpBottomVideoView()}},{key:"hideBottomVideoViewBox",value:function(){(0,m.default)(".leftWarp_top").height("100%"),(0,m.default)("#botVideoWindow").hide(),(0,m.default)("#nextStep").hide(),(0,m.default)("#prevStep").hide(),(0,m.default)("#botFlashVideoBox").hide(),(0,m.default)("#botH5VideoBox").hide()}},{key:"updateLeftWarpBottomVideoView",value:function(){this.minFlashViewWidth=(this.smallVideoW+10)*(y.default.maxMediaChannels-1),this.minH5ViewWidth=(this.smallVideoW_H5+10)*(y.default.maxMediaChannels-1),(0,m.default)("#botFlashVideoBox").css("min-width",this.minFlashViewWidth+"px"),y.default.isRecordPlayBack&&(0,m.default)("#botH5VideoBox").css("min-width",this.minH5ViewWidth+"px")}},{key:"updateLeftWarpTop",value:function(){var e=document.documentElement.clientHeight||document.body.clientHeight,t=2;y.default.maxMediaChannels>2&&(t=(0,m.default)(".botVideoWindow").height()),y.default.isRecordPlayBack?(0,m.default)(".leftWarp_top").height(e-t-7+"px"):(0,m.default)(".leftWarp_top").height(e-t-(0,m.default)(".header").height()-7+"px"),(0,m.default)("#botH5VideoBox").width()<this.minH5ViewWidth||(0,m.default)("#botFlashVideoBox").width()<this.minFlashViewWidth?y.default.maxMediaChannels>2&&((0,m.default)("#nextStep").show(),(0,m.default)("#prevStep").show()):((0,m.default)("#nextStep").hide(),(0,m.default)("#prevStep").hide())}},{key:"showInvisibleSpeakerUI",value:function(){(0,m.default)("#invisible_speak").show(),(0,m.default)("#invisible_speakBtnClose").hide(),(0,m.default)("#invisible_speakBtnOpen").show(),this.updateInvisibleSpeakerVollume(0)}},{key:"hideInvisibleSpeakerUI",value:function(){(0,m.default)("#invisible_speak").hide(),(0,m.default)("#invisible_speakBtnClose").hide(),(0,m.default)("#invisible_speakBtnOpen").hide(),this.updateInvisibleSpeakerVollume(0)}},{key:"updateInvisibleSpeakerVollume",value:function(e){var t=parseInt(e)+"%";(0,m.default)("#invisible_speakVolumePlan").css("width",t)}},{key:"onWindowResize",value:function(){this.updateLeftWarpTop()}},{key:"_flashPlayerCallback",value:function(e){if(e)switch(e.type){case _.default.TYPE_16:w.log("收到测速的消息",e),h.default.api("sendVideoBroadcastMsg",{actionType:4,toNodeId:y.default.curUserInfoTeaOrStu.nodeId,data:e.msg});break;case _.default.TYPE_17:w.log("收到测速完成的消息",e),h.default.api("sendVideoBroadcastMsg",{actionType:5,toNodeId:y.default.curRosterInvisibleNodeId,data:e});break;case _.default.TYPE_21:e&&e.data&&this.updateInvisibleSpeakerVollume(e.data.volumeLevel);break;case _.default.TYPE_24:b.default.showWarnError(y.default.localConfig.cameraAccessFailed);break;case _.default.TYPE_25:b.default.showWarnError(y.default.localConfig.microphoneAccessFailed);break;case _.default.TYPE_26:b.default.showWarnError(y.default.localConfig.noCamera);break;case _.default.TYPE_27:b.default.showWarnError(y.default.localConfig.cameraOccupied);break;case _.default.TYPE_28:b.default.showWarnError(y.default.localConfig.noMicrophone);break;case _.default.TYPE_29:b.default.showWarnError(y.default.localConfig.microphoneOccupied);break;case _.default.TYPE_30:var t=y.default.getBrowserInfo();t&&"firefox"==t.explorer?b.default.showError(b.default.TYPE_8,""):b.default.showError(b.default.TYPE_9,"");break;case _.default.TYPE_105:b.default.showError(b.default.TYPE_3,y.default.localConfig.noFreePlayer);break;case _.default.TYPE_106:b.default.showError(b.default.TYPE_3,y.default.localConfig.cantOpenDevice)}}},{key:"_mediaStopPublishHandler",value:function(){w.log("停止当前的所有推流->"),this.stopAllPublishMedia()}},{key:"_videoBroadcastHandler",value:function(e){if(w.log("收到视频控制消息->",e),e){if(e.toNodeId!=y.default.nodeId)return void w.log("收到视频控制消息->不需要处理",e);switch(e.actionType){case 1:var t=this.getFlashPlayer(y.default.userRole);t&&t.dispatchClickPublish({mediaType:_.default.VIDEO,userId:y.default.userId,userName:y.default.userName,nodeId:y.default.nodeId,userRole:y.default.userRole});break;case 2:
var t=this.getFlashPlayer(y.default.userRole);t&&t.dispatchClickStopPublish({mediaType:_.default.VIDEO,userId:y.default.userId,userName:y.default.userName,nodeId:y.default.nodeId,userRole:y.default.userRole});break;case 3:if(y.default.nodeId==e.data.nodeId)if(w.log("收到监听监课的设置面板更新====>",e.data),e.data.actionType==C.default.CHANGE_MS_LIST){h.default.api("switchMediaServer",e.data.ipPort);var t=this.getFlashPlayer(y.default.userRole);t&&t.changeMsAndRePublish({mediaType:_.default.VIDEO,userId:y.default.userId,userName:y.default.userName,nodeId:y.default.nodeId,userRole:y.default.userRole})}else _.default.flashSettingChangeSelf(e.data);break;case 4:y.default.curRosterInvisibleNodeId=e.fromNodeId,w.log("收到测速信息====>",e,e.fromNodeId,y.default.curRosterInvisibleNodeId),this.flashPlayerMain&&this.flashPlayerMain.flashTestMsBW(e);break;case 5:w.log("收到测速返回结果信息====>",e),this.flashPlayerMain&&this.flashPlayerMain.flashShowMsTestBWcallBack(e)}}}},{key:"_audioBroadcastHandler",value:function(e){if(w.log("收到音频控制消息->",e),e){if(e.toNodeId!=y.default.nodeId)return void w.log("收到音频控制消息->不需要处理",e);switch(e.actionType){case 1:var t=this.getFlashPlayer(y.default.userRole);t&&t.dispatchClickPublish({mediaType:_.default.AUDIO,userId:y.default.userId,userName:y.default.userName,nodeId:y.default.nodeId,userRole:y.default.userRole});break;case 2:var t=this.getFlashPlayer(y.default.userRole);t&&t.dispatchClickStopPublish({mediaType:_.default.AUDIO,userId:y.default.userId,userName:y.default.userName,nodeId:y.default.nodeId,userRole:y.default.userRole})}}}},{key:"_videoPlayHandler",value:function(e){var t=this.getUserDeviceType(e.fromNodeId);if(y.default.isRecordPlayBack){(0,m.default)("#replayVideo")[0].poster="images/waiting.png";var n=parseInt(e.seek);n<1&&(n=1),w.log("录制回放->播放视频->",e.replay,n),this.playHLSMedia({replay:e.replay,modeType:S.default.MODE_VOD,seek:n,mediaId:e.mediaId,mediaType:_.default.VIDEO,nodeId:e.fromNodeId,userRole:e.userRole,deviceType:t,optionJsonData:e.optionJsonData})}else w.log("播放视频->",e.rtmpUrl),this.playMedia({rtmpUrl:e.rtmpUrl,mediaId:e.mediaId,mediaType:_.default.VIDEO,nodeId:e.fromNodeId,userRole:e.userRole,userName:e.userName,deviceType:t,optionJsonData:e.optionJsonData})}},{key:"_videoStopHandler",value:function(e){y.default.isRecordPlayBack?(w.log("录制回放->停止播放视频->",e),this.stopHLSMedia({replay:e.replay,modeType:S.default.MODE_VOD,seek:e.seek,mediaId:e.mediaId,mediaType:_.default.VIDEO,nodeId:e.fromNodeId,userRole:e.userRole})):(w.log("停止播放视频->",e),this.stopMedia({mediaId:e.mediaId,mediaType:_.default.VIDEO,nodeId:e.fromNodeId,userRole:e.userRole}))}},{key:"_flashPlayerMainCallback",value:function(e){w.log("_flashPlayerMainCallback->")}},{key:"_audioPlayHandler",value:function(e){var t=this.getUserDeviceType(e.fromNodeId);if(y.default.isRecordPlayBack){(0,m.default)("#replayVideo")[0].poster="images/waitingAudio.png";var n=parseInt(e.seek);n<1&&(n=1),w.log("录制回放->播放视频->",e.replay,n),this.playHLSMedia({replay:e.replay,modeType:S.default.MODE_VOD,seek:n,mediaId:e.mediaId,mediaType:_.default.AUDIO,nodeId:e.fromNodeId,userRole:e.userRole,deviceType:t,optionJsonData:e.optionJsonData})}else w.log("播放音频->",e),this.playMedia({rtmpUrl:e.rtmpUrl,mediaId:e.mediaId,mediaType:_.default.AUDIO,nodeId:e.fromNodeId,userRole:e.userRole,userName:e.userName,deviceType:t,optionJsonData:e.optionJsonData})}},{key:"_audioStopHandler",value:function(e){w.log("停止播放音频->",e),y.default.isRecordPlayBack?(this.stopHLSMedia({replay:e.replay,modeType:S.default.MODE_VOD,seek:e.seek,mediaId:e.mediaId,mediaType:_.default.AUDIO,nodeId:e.fromNodeId,userRole:e.userRole}),(0,m.default)("#replayVideo")[0].poster="images/waiting.png"):this.stopMedia({mediaId:e.mediaId,mediaType:_.default.AUDIO,nodeId:e.fromNodeId,userRole:e.userRole})}},{key:"getUserDeviceType",value:function(e){var t=0,n=y.default.rosterList[e];return n&&n.nodeData&&(t=n.nodeData.deviceType||0),t}},{key:"_classInsertRosterHandler",value:function(e){e&&(e.nodeData.userRole==y.default.USER_HOST&&(y.default.curRosterHostInfo=e),this.updateInvisibleMediaUI(e))}},{key:"_updateRosterHandler",value:function(e){e&&(e.nodeData.userRole==y.default.USER_HOST&&(y.default.curRosterHostInfo=e),this.updateInvisibleMediaUI(e))}},{key:"updateInvisibleMediaUI",value:function(e){e&&e.nodeData.userRole==y.default.USER_INVISIBLE&&2==y.default.maxMediaChannels&&(e.nodeData.openCamera||e.nodeData.openMicrophones?((0,m.default)("#invisible_speakBtnClose").show(),(0,m.default)("#invisible_speakBtnOpen").hide()):this.showInvisibleSpeakerUI())}},{key:"_classErrorHandler",value:function(e){switch(e.code){case 2e4:y.default.userRole==y.default.USER_HOST?this.stopAllPublishMedia({nodeId:y.default.nodeId,userRole:y.default.userRole,mediaType:_.default.VIDEO}):this._videoStopHandler({mediaId:0})}}},{key:"_classGetInfoSuccessHandler",value:function(e){y.default.maxAudioChannels=e.maxAudioChannels||0,y.default.maxVideoChannels=e.maxVideoChannels||0,y.default.maxMediaChannels=e.maxMediaChannels||0}},{key:"_classJoinSuccessHandler",value:function(e){y.default.fps=e.fps||15,y.default.gop=e.gop||3,y.default.videoQuality=parseInt(e.videoQuality),y.default.userRole==y.default.USER_HOST?this.stopAllPublishMedia({nodeId:y.default.nodeId,userRole:y.default.userRole,mediaType:_.default.VIDEO}):this._videoStopHandler({mediaId:0}),(0,m.default)(".videoControl").show(),y.default.userRole==y.default.USER_HOST&&(0,m.default)(".curUserName").text(y.default.userName),y.default.isRecordPlayBack?((0,m.default)(".videoDivBox").hide(),(0,m.default)(".replayVideo").show()):((0,m.default)(".videoDivBox").show(),(0,m.default)("#replayVideo").hide(),_.default.setMediaVideoConfig(y.default.fps,y.default.gop,y.default.videoQuality))}},{key:"playHLSMedia",value:function(e){if(!e)return void w.warn("playHLSMedia->参数错误--->",e);var t=this.getfreeH5Player(e.userRole);t?(e.mediaType==_.default.AUDIO?((0,m.default)("#"+t.divName)[0].poster="images/waitingAudio.png",t.IS_VIDEO=!1):((0,m.default)("#"+t.divName)[0].poster="images/waiting.png",t.IS_VIDEO=!0),w.log("playHLSMedia->开始HLS播放",e),t.rtmpURL=e.replay,t.nodeId=e.nodeId,t.mediaId=e.mediaId,t.play(e.replay,S.default.MODE_VOD,e.seek)):w.log("playHLSMedia->没有找到对应的播放器")}},{key:"stopHLSMedia",value:function(e){if(!e)return void w.warn("stopHLSMedia->参数错误",e);var t=this.getH5PlayerForNodeId(e.nodeId);t?((0,m.default)("#"+t.divName)[0].poster="images/waiting.png",t.rtmpURL="",t.nodeId=0,t.mediaId=0,t.stop()):w.log("stopHLSMedia->没有找到对应的播放器",e)}},{key:"getH5PlayerForNodeId",value:function(e){if(!e)return w.warn("根据nodeId查找正在使用的播放器->没有播放器->_nodeId",e),null;w.warn("根据nodeId查找正在使用的播放器->_nodeId",e);for(var t=null,n=0;n<this.h5HlsPlayerList.length;n++)if(t=this.h5HlsPlayerList[n],t&&t.nodeId==e)return t;return null}},{key:"getfreeH5Player",value:function(e){if(!this.h5HlsPlayerList||this.h5HlsPlayerList.length<1)return w.warn("getfreeH5Player->没有播放器"),null;if(w.warn("获取空闲的HLS播放器->_userRole:"+e),y.default.maxMediaChannels<2)return this.h5HlsPlayerList[0];if(e==y.default.USER_HOST)return console.warn("获取空闲的HLS播放器->返回老师播放器:"+this.h5HlsPlayerList[0]),this.h5HlsPlayerList[0];for(var t=void 0,n=1;n<this.h5HlsPlayerList.length;n++)if(t=this.h5HlsPlayerList[n],t&&!t.rtmpURL)return t;return t}},{key:"playMedia",value:function(e){if(!e)return void w.warn("playMedia->参数错误--->",e);var t=this.getFlashPlayer(e.userRole);console.log("player",t),t?t.playMedia(e):w.log("playMedia->没有找到对应的播放器")}},{key:"stopMedia",value:function(e){if(!e)return void w.warn("stopMedia->参数错误",e);for(var t=null,n=0;n<this.flashPlayerList.length;n++)t=this.flashPlayerList[n],t.stopFlashPlay(e)}},{key:"stopAllPublishMedia",value:function(){clearTimeout(this.publishTimer);var e=this.getFlashPlayer(y.default.userRole);e&&e.dispatchClickStopPublish({mediaType:_.default.VIDEO,userId:y.default.userId,userName:y.default.userName,nodeId:y.default.nodeId,userRole:y.default.userRole})}},{key:"getFlashPlayer",value:function(e){return!this.flashPlayerList||this.flashPlayerList.length<1?(w.warn("getFlashPlayer->没有播放器"),null):y.default.maxMediaChannels<3?this.flashPlayerList[0]:e==y.default.USER_HOST?this.flashPlayerList[0]:this.flashPlayerList[1]}},{key:"creatH5Seting",value:function(){w.log("初始化H5设置面板");var e=(0,m.default)("#H5settingBox")[0];C.default.init(e,222,this.setingEventCallback.bind(this))}},{key:"setingEventCallback",value:function(e){console.log("H5设置面板返回->",e);if(e)if(e.isSelf)switch(e.actionType){case C.default.CHANGE_CAMERA_TEST:console.log("打开摄像头->"),this.flashPlayerMain&&(this.flashPlayerMain.closeMicrophone(),this.flashPlayerMain.closeSpeakerTest(),this.flashPlayerMain.openCamera());break;case C.default.CHANGE_MICROPHONE_TEST:console.log("打开麦克风->"),this.flashPlayerMain&&(this.flashPlayerMain.closeSpeakerTest(),this.flashPlayerMain.closeCamera(),this.flashPlayerMain.openMicrophone());break;case C.default.CHANGE_SPEAKER_TEST_STOP:console.log("停止麦克风测试音->"),this.flashPlayerMain&&this.flashPlayerMain.closeSpeakerTest();break;case C.default.CHANGE_SPEAKER_TEST:this.flashPlayerMain&&(this.flashPlayerMain.closeMicrophone(),this.flashPlayerMain.closeCamera(),this.flashPlayerMain.openSpeakerTest("sound.mp3"));break;case C.default.CHANGE_SPEAKER_SCENE:this.flashPlayerMain&&(this.flashPlayerMain.closeMicrophone(),this.flashPlayerMain.closeSpeakerTest(),this.flashPlayerMain.closeCamera());break;case C.default.CHANGE_SETING_CLOSE:this.flashPlayerMain&&(this.flashPlayerMain.closeMicrophone(),this.flashPlayerMain.closeSpeakerTest(),this.flashPlayerMain.closeCamera());break;case C.default.CHANGE_CAMERA:case C.default.CHANGE_MICROPHONE:case C.default.CHANGE_MICROPHONE_CODE:case C.default.CHANGE_MICROPHONE_GAIN:case C.default.CHANGE_MICROPHONE_NOISE:case C.default.CHANGE_MICROPHONE_AUTO_GAIN:case C.default.CHANGE_RESOLUTION:case C.default.CHANGE_SPEAKER_VOLUME:_.default.flashSettingChangeSelf(e.paramData)}else switch(e.actionType){case C.default.CHANGE_CAMERA:case C.default.CHANGE_MICROPHONE:case C.default.CHANGE_MICROPHONE_CODE:case C.default.CHANGE_MICROPHONE_GAIN:case C.default.CHANGE_MICROPHONE_NOISE:case C.default.CHANGE_MICROPHONE_AUTO_GAIN:case C.default.CHANGE_RESOLUTION:case C.default.CHANGE_SPEAKER_VOLUME:case C.default.CHANGE_MS_LIST:this.sendSetingDataToNodeId(e.paramData,3);break;case C.default.CHANGE_MS_DETECTION:w.log("发送MS网速测试->"),this.sendSetingDataToNodeId(e.paramData,4)}}},{key:"sendSetingDataToNodeId",value:function(e,t){w.log("发送别人的设置面板数据",e),h.default.api("sendVideoBroadcastMsg",{actionType:t,toNodeId:e.nodeId,data:e})}},{key:"_settingHandler",value:function(){C.default.showSeting(y.default.rosterList[y.default.nodeId].nodeData)}},{key:"_settingTheirHandler",value:function(e){var t=(0,m.default)(e.target).attr("data");y.default.curUserInfoTeaOrStu=y.default.rosterList[t];var n=y.default.rosterList[t].nodeData;n.className=y.default.className,n.classId=y.default.classId,C.default.showSeting(n,!1)}},{key:"_clickNextStepHandler",value:function(e){var t=(0,m.default)("#botVideoWindow").scrollLeft();(0,m.default)("#botVideoWindow").width();(0,m.default)("#botVideoWindow").scrollLeft(t+160)}},{key:"_clickPrevStepHandler",value:function(e){var t=(0,m.default)("#botVideoWindow").scrollLeft();(0,m.default)("#botVideoWindow").width();(0,m.default)("#botVideoWindow").scrollLeft(t-160)}},{key:"_clickInvisiblePublishVideo",value:function(){if(w.log("监课点击音频推流"),y.default.userRole==y.default.USER_INVISIBLE){var e=this.getFlashPlayer(y.default.userRole);e&&e.dispatchClickPublish({mediaType:_.default.AUDIO,userId:y.default.userId,userName:y.default.userName,nodeId:y.default.nodeId,userRole:y.default.userRole})}}},{key:"_clickInvisibleStopPublishVideo",value:function(){if(w.log("监课点击停止音频推流"),y.default.userRole==y.default.USER_INVISIBLE){var e=this.getFlashPlayer(y.default.userRole);e&&e.dispatchClickStopPublish({mediaType:_.default.AUDIO,userId:y.default.userId,userName:y.default.userName,nodeId:y.default.nodeId,userRole:y.default.userRole}),this.updateInvisibleSpeakerVollume(0)}}},{key:"clear",value:function(){w.log("clear");try{if(this.h5HlsPlayerList)for(var e=0;e<this.h5HlsPlayerList.length;e++){var t=this.h5HlsPlayerList[e];t&&((0,m.default)("#"+t.divName)[0].poster="images/waiting.png",t.rtmpURL="",t.mediaId=0,t.nodeId=0,t.stop())}}catch(e){w.warn("clear",e.message)}}},{key:"play",value:function(){w.log("play");try{if(this.h5HlsPlayerList)for(var e=0;e<this.h5HlsPlayerList.length;e++){var t=this.h5HlsPlayerList[e];t&&t.resume()}}catch(e){w.warn("clear",e.message)}}},{key:"pause",value:function(){w.log("pause");try{if(this.h5HlsPlayerList)for(var e=0;e<this.h5HlsPlayerList.length;e++){var t=this.h5HlsPlayerList[e];t&&t.pause()}}catch(e){w.warn("clear",e.message)}}},{key:"stop",value:function(){w.log("stop");try{if(this.h5HlsPlayerList)for(var e=0;e<this.h5HlsPlayerList.length;e++){var t=this.h5HlsPlayerList[e];t&&((0,m.default)("#"+t.divName)[0].poster="images/waiting.png",t.rtmpURL="",t.mediaId=0,t.nodeId=0,t.stop())}}catch(e){w.warn("clear",e.message)}}}]),t}(c.default);L.prototype.FLASH_LOADED=L.FLASH_LOADED="flash_loaded";var N=L;t.default=N;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(w,"loger","D:/work/PCLive/src/ape/MediaManagerApe.js"),__REACT_HOT_LOADER__.register(A,"FLASH_MEDIA_BOX","D:/work/PCLive/src/ape/MediaManagerApe.js"),__REACT_HOT_LOADER__.register(I,"H5_MEDIA_BOX","D:/work/PCLive/src/ape/MediaManagerApe.js"),__REACT_HOT_LOADER__.register(P,"FLASH_VIEW_DIV_VERTICAL_RIGHT","D:/work/PCLive/src/ape/MediaManagerApe.js"),__REACT_HOT_LOADER__.register(O,"FLASH_VIEW_DIV_VERTICAL_MIDDLE","D:/work/PCLive/src/ape/MediaManagerApe.js"),__REACT_HOT_LOADER__.register(D,"FLASH_VIEW_DIV_HORIZONTAL","D:/work/PCLive/src/ape/MediaManagerApe.js"),__REACT_HOT_LOADER__.register(k,"FLASH_PATH","D:/work/PCLive/src/ape/MediaManagerApe.js"),__REACT_HOT_LOADER__.register(L,"MediaManagerApe","D:/work/PCLive/src/ape/MediaManagerApe.js"),__REACT_HOT_LOADER__.register(N,"default","D:/work/PCLive/src/ape/MediaManagerApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=i(f),p=n(2),_=i(p),g=n(3),m=i(g),v=n(9),y=(i(v),n(11)),E=i(y),S=n(12),T=i(S),C=n(8),R=i(C),b=n(6),w=i(b),A=n(27),I=i(A),P=u.default.getLoger("PC-MediaShareApe"),O=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.h5HLSplayer=null,e.currPlayMediaId=0,e.mediaShareFileList={},e.controlBar=new I.default,e.controlBar.controlCallback=e._controlCallback.bind(e),e.addEvent(),e._hideMediaShareBox(),e}return o(t,e),s(t,[{key:"init",value:function(){(0,_.default)(window).on("resize",this.onWindowResize.bind(this)),(0,_.default)("#mediaFileBtn").on("change",this._uploadFile.bind(this)),(0,_.default)("#mediaListOut").on("click",this._openListHandler.bind(this)),(0,_.default)("#closeMediaList").on("click",this._closeListHandler.bind(this))}},{key:"addEvent",value:function(){h.default.on("class_get_info_success",this._classGetInfoSuccessHandler.bind(this)),h.default.on("media_stop_publish",this._mediaStopPublishHandler.bind(this)),h.default.on("class_join_success",this._classJoinSuccessHandler.bind(this)),h.default.on("media_shared_update",this._onMediaShareUpdateHanlder.bind(this)),h.default.on("media_shared_delete",this._onMediaShareDeleteHanlder.bind(this))}},{key:"creatHLSPlayer",value:function(){P.log("媒体共享录制回放->创建h5播放器"),(0,_.default)(".h5MediaShareBox").show();var e=document.getElementById("h5MediaShare");this.h5HLSplayer=new E.default(e),this.h5HLSplayer.divName="h5MediaShare",this.h5HLSplayer.isMobile=!0,this.h5HLSplayer.status=t.STOP,(0,_.default)("#h5MediaShare")[0].poster="",this.controlBar.video=e}},{key:"_classGetInfoSuccessHandler",value:function(e){this.init(),this.creatHLSPlayer()}},{key:"_mediaStopPublishHandler",value:function(){m.default.userRole==m.default.USER_HOST&&(P.log("停止当前的所有媒体共享->"),this.currPlayMediaId>0&&this._stopMeidaShare(this.currPlayMediaId))}},{key:"_controlCallback",value:function(e){if(m.default.userRole!=m.default.USER_HOST||m.default.isRecordPlayBack)return void P.log("媒体共享播放器监听控制->录制回放和不是老师不处理");if(P.log("媒体共享播放器监听控制->",e),e)switch(e.action){case I.default.STOP:this.h5HLSplayer&&this.h5HLSplayer.mediaId>0&&this._updateMeidaShare(this.h5HLSplayer.mediaId,0,e.data.seek,e.data.mediaVolume);break;case I.default.PLAY:this.h5HLSplayer&&this.h5HLSplayer.mediaId>0&&this._updateMeidaShare(this.h5HLSplayer.mediaId,1,e.data.seek,e.data.mediaVolume);break;case I.default.PAUSE:this.h5HLSplayer&&this.h5HLSplayer.mediaId>0&&this._updateMeidaShare(this.h5HLSplayer.mediaId,2,e.data.seek,e.data.mediaVolume)}}},{key:"_classJoinSuccessHandler",value:function(e){e.userRole!=m.default.USER_HOST||m.default.isRecordPlayBack?((0,_.default)("#mediaUpLoadOut").hide(),(0,_.default)("#mediaFile").hide(),(0,_.default)("#mediaListOut").hide(),(0,_.default)("#mediaShareBoxMask").show()):(this.controlBar&&(this.controlBar.isOpenUpdateStatusInfo=!0),(0,_.default)("#mediaShareBoxMask").hide()),this.onWindowResize()}},{key:"onWindowResize",value:function(){}},{key:"_onMediaShareUpdateHanlder",value:function(e){if(P.log("媒体模块收到SDK数据",e),null!=e)switch(this._updateListData(e,"add"),e.status){case 0:this._tryStopMediaHandler(e.itemIdx);break;case 1:this._playMediaHandler(e.itemIdx);break;case 2:this._tryPauseMediaHandler(e)}}},{key:"_onMediaShareDeleteHanlder",value:function(e){P.log("_onMediaShareDeleteHanlder",e),this._updateListData(e,"delete")}},{key:"_updateListData",value:function(e,n){"add"==n&&e?this.mediaShareFileList[e.itemIdx]=e:(P.log("删除媒体数据",e.itemIdx),delete this.mediaShareFileList[e.itemIdx],this.h5HLSplayer&&this.h5HLSplayer.mediaId==e.itemIdx&&(R.default.enabledBottomBar(),R.default.enabledLeftBar(),R.default.showBottomDocControlBar(),this.currPlayMediaId=0,this.h5HLSplayer.rtmpURL="",this.h5HLSplayer.mediaId=0,this.h5HLSplayer.nodeId=0,this.h5HLSplayer.status=t.STOP,this.h5HLSplayer.stop(),this.h5HLSplayer.pause(),this.h5HLSplayer.video&&(this.h5HLSplayer.video.src=""),this.controlBar.stop(),this._hideMediaShareBox())),this._updateDocListView()}},{key:"_updateDocListView",value:function(){(0,_.default)("#mediaFileContent").empty();for(var e in this.mediaShareFileList)if(this.mediaShareFileList[e].fileId){var t=this._creatListItemDiv(e,this.mediaShareFileList[e].fileName,this.mediaShareFileList[e].itemIdx);(0,_.default)("#mediaFileContent").append(t)}}},{key:"_showMediaShareBox",value:function(e){P.log("显示媒体区域"),(0,_.default)("#mediaShareGroup").show(),(0,_.default)("#mediaShareGroup").css("z-index",4),this.controlBar&&this.controlBar.onWindowResize()}},{key:"_hideMediaShareBox",value:function(e){P.log("隐藏媒体区域"),(0,_.default)("#mediaShareGroup").hide(),(0,_.default)("#mediaShareGroup").css("z-index",-7)}},{key:"stopAndHide",value:function(){P.log("停止并且隐藏-.stopAndHide"),this._stopMeidaShare(this.currPlayMediaId),this.controlBar&&this.controlBar.stop(),this.currPlayMediaId=0,this._hideMediaShareBox(),this._closeListHandler()}},{key:"_openListHandler",value:function(){this._emit(t.SCENE_MEDIA_SHARE_CHANGE,m.default.SCENE_MEDIA_SHARE),R.default.disEnabledBottomBar(),R.default.hideBottomDocControlBar(),(0,_.default)("#mediaShareModal").show(),(0,_.default)(".masker").show()}},{key:"_closeListHandler",value:function(){(0,_.default)("#mediaShareModal").hide(),(0,_.default)(".masker").hide()}},{key:"_uploadFile",value:function(e){var t=document.getElementById("mediaFileBtn").files[0];if(!t)return void P.log("没有选择文件");this._closeListHandler(),console.log("fileItem.type=====",t);var n=t.name;n.split(".")[1];if(P.log("文件名:"+t.name+"->文件类型:"+t.type),t.size>73400320)return void w.default.showError(w.default.TYPE_3,m.default.localConfig.fileError);var i=t.name.toLowerCase();if(i.lastIndexOf(".mp4")<0)return void w.default.showError(w.default.TYPE_3,m.default.localConfig.mediaLayoutCont);if(!m.default.DOCServerIP)return P.warn("媒体服务器地址无效,无法上传文件!"),void w.default.showError(w.default.TYPE_3,m.default.localConfig.serverError);R.default.showLoadingMask(),R.default.disEnabledDocBar(),R.default.disEnabledMediaBar();var r=m.default.creatTimestamp(),a=(0,T.default)(m.default.siteId+""+r),o=new FormData;o.append("fileToUpload",t),o.append("siteID",m.default.siteId),o.append("createUserName",String(m.default.userName)),o.append("createUserID",String(m.default.nodeId)),o.append("timestamp",String(r)),o.append("authId",a),o.append("classId",String(m.default.classId));var s=m.default.DOCServerIP;m.default.DOCServerPort&&(s=s+":"+m.default.DOCServerPort);var l=m.default.locationProtocol+s+"/DocSharing/sharedMediaUpload";_.default.ajax({type:"POST",url:l,processData:!1,contentType:!1,data:o,xhr:function e(){var e=_.default.ajaxSettings.xhr();if(e.upload)return e.upload.addEventListener("progress",function(e){var t=e.loaded,n=e.total,i=Math.floor(100*t/n);R.default.updataLoadingMaskProgress(i)},!1),e},success:function(e){R.default.hideLoadingMask(),R.default.enabledDocBar(),R.default.enabledMediaBar(),this._uploadFileSuccess(e),(0,_.default)("#mediaFileBtn").val("")}.bind(this),error:function(e){R.default.hideLoadingMask(),R.default.enabledDocBar(),R.default.enabledMediaBar(),P.warn(name+"->上传文件失败",e),w.default.showError(w.default.TYPE_3,name+"->"+m.default.localConfig.uploaDocumentErr),(0,_.default)("#mediaFileBtn").val("")}})}},{key:"_uploadFileSuccess",value:function(e){if(P.log("服务器返回的媒体信息->",e),e&&0==e.code){if(!e.list||e.list.length<1)return void P.warn("上传文件返回的数据中数组没有数据",e.list);var t=e.list[0];if(t&&t.id){var n={};n.fileId=t.id,n.fileName=t.name,n.url=t.url,n.duration=parseInt(t.duration)||0,h.default.api("mediaSharedUpload",n)}else P.warn("服务器返回的文件信息->不能同步-->id无效",e.id),w.default.showError(w.default.TYPE_3,m.default.localConfig.uploaDocumentErr)}else P.warn("文档上传失败->",e.code),w.default.showError(w.default.TYPE_3,"文档上传失败->code:"+e.code)}},{key:"_clickListToSwitchBtnHandler",value:function(e){var t=parseInt(e.target.id),n=this.mediaShareFileList[t];this._stopMeidaShare(this.currPlayMediaId),this.currPlayMediaId=0,P.log("点击列表中切换媒体->播放列表中的媒体文件->",n),this._playMeidaShare(n.itemIdx),this._closeListHandler()}},{key:"_playMediaHandler",value:function(e){var n=this.mediaShareFileList[e];if(n&&(this._showMediaShareBox(),this.h5HLSplayer)){if(m.default.currentSceneTableId!=m.default.SCENE_MEDIA_SHARE)return P.log("录制回放->但是当前没有切换到媒体模块->currentSceneTableId->"+m.default.currentSceneTableId),void this._tryStopMediaHandler(n.itemIdx);if(R.default.disEnabledBottomBar(),R.default.hideBottomDocControlBar(),this.currPlayMediaId=n.itemIdx,1==n.status){var i=n.seek||1;if(P.log("收到媒体共享播放->seek->"+i),this.h5HLSplayer.status==t.PLAY&&this.h5HLSplayer.rtmpURL==n.url){var r=Math.abs(i-this.controlBar.seekTime),a=Math.abs(this.controlBar.mediaVolume-n.mediaVolume);return P.warn("当前正在播放->seekTime:"+this.controlBar.seekTime,"seek:"+i,"seekDistance:"+r),P.warn("当前正在播放->当前音量:"+this.controlBar.mediaVolume,"新的音量值:"+n.mediaVolume),r<3&&0==a?void P.warn("不需要seek"):(this.h5HLSplayer.seek(i),this.h5HLSplayer.status=t.PLAY,this.controlBar.duration=n.duration||0,this.controlBar.seek(i),void this.controlBar.changeVolume(n.mediaVolume))}this.h5HLSplayer.rtmpURL=n.url,this.h5HLSplayer.nodeId=n.fromNodeId,this.h5HLSplayer.mediaId=n.itemIdx,this.h5HLSplayer.play(n.url,E.default.MODE_VOD,i),this.h5HLSplayer.seek(i),this.h5HLSplayer.status=t.PLAY,this.controlBar.duration=n.duration||0,this.controlBar.play(i),this.controlBar.changeVolume(n.mediaVolume)}}}},{key:"_tryPauseMediaHandler",value:function(e){if(e){P.log("_tryPauseMediaHandler",e);var n=this.mediaShareFileList[e.itemIdx];if(n&&(this._showMediaShareBox(),this.h5HLSplayer)){if(m.default.currentSceneTableId!=m.default.SCENE_MEDIA_SHARE)return P.log("录制回放->但是当前没有切换到媒体模块->currentSceneTableId->"+m.default.currentSceneTableId),void this._tryStopMediaHandler(n.itemIdx);if(R.default.disEnabledBottomBar(),R.default.hideBottomDocControlBar(),this.currPlayMediaId=n.itemIdx,2==n.status){var i=n.seek||1;P.log("收到媒体共享暂停->seek->"+i),this.h5HLSplayer.rtmpURL=n.url,this.h5HLSplayer.nodeId=n.fromNodeId,this.h5HLSplayer.mediaId=n.itemIdx,this.h5HLSplayer.pause(),this.h5HLSplayer.status=t.PAUSE,this.controlBar.pause(),this.controlBar.duration=n.duration||0,this.controlBar.changeVolume(n.mediaVolume)}}}}},{key:"_tryStopMediaHandler",value:function(e){P.log("媒体数据有更新,尝试停止"),this.h5HLSplayer&&this.h5HLSplayer.mediaId==e&&(R.default.enabledBottomBar(),R.default.showBottomDocControlBar(),this.currPlayMediaId=0,this.h5HLSplayer.rtmpURL="",this.h5HLSplayer.mediaId=0,this.h5HLSplayer.nodeId=0,this.h5HLSplayer.stop(),this.h5HLSplayer.pause(),this.h5HLSplayer.status=t.STOP,this.h5HLSplayer.video&&(this.h5HLSplayer.video.src=""),this.controlBar.stop(),this._hideMediaShareBox())}},{key:"_deleteListItemHandler",value:function(e){P.log("删除媒体鼠标事件->",e.target.id);var t=this.mediaShareFileList[parseInt(e.target.id)];if(t){var n={itemIdx:t.itemIdx,fileId:t.fileId,classId:m.default.classId};h.default.api("mediaSharedDelete",n)}else P.log("删除媒体鼠标事件---->媒体不存在")}},{key:"_stopMeidaShare",value:function(e){P.log("调用SDK停止媒体共享->",t);var t=parseInt(e);if(t>0){h.default.api("mediaSharedStop",{itemIdx:parseInt(t),status:0})}}},{key:"_playMeidaShare",value:function(e){P.log("调用SDK开始媒体共享");var t=parseInt(e);if(t>0){h.default.api("mediaSharedPlay",{itemIdx:parseInt(e),status:1,seek:0,mediaVolume:30})}}},{key:"_updateMeidaShare",value:function(e,t,n,i){if(P.log("调用SDK -更新媒体共享状态->",e,t,n,i),m.default.userRole==m.default.USER_HOST&&!m.default.isRecordPlayBack){h.default.api("mediaSharedUpdate",{itemIdx:parseInt(e),status:parseInt(t),seek:parseInt(n),mediaVolume:parseInt(i)})}}},{key:"_creatListItemDiv",value:function(e,t,n){var i=document.createElement("div");i.id="doc_"+e;var r=document.createElement("label");r.innerHTML="&#xe674;",r.className="iconfont",i.appendChild(r);var a=document.createElement("label");a.innerText=""+t,a.title=""+t,a.onclick=this._clickListToSwitchBtnHandler.bind(this),a.id=e,i.appendChild(a);var o=document.createElement("label");return o.type="button",o.id=e,o.innerHTML="&#xe673;",o.className="iconfont",o.onclick=this._deleteListItemHandler.bind(this),i.appendChild(o),i}},{key:"clear",value:function(){P.log("clear"),this.mediaShareFileList={},this._hideMediaShareBox();try{this.h5HLSplayer&&(this.h5HLSplayer.rtmpURL="",this.h5HLSplayer.mediaId=0,this.h5HLSplayer.nodeId=0,this.h5HLSplayer.stop(),this.h5HLSplayer.pause(),this.h5HLSplayer.status=t.STOP,this.h5HLSplayer.video&&(this.h5HLSplayer.video.src="")),this._hideMediaShareBox()}catch(e){P.warn("clear",e.message)}}},{key:"play",value:function(){P.log("play");try{this.h5HLSplayer&&m.default.currentSceneTableId==m.default.SCENE_MEDIA_SHARE&&(this.h5HLSplayer.resume(),this.h5HLSplayer.status=t.PLAY)}catch(e){P.warn("clear",e.message)}}},{key:"pause",value:function(){P.log("pause");try{this.h5HLSplayer&&(this.h5HLSplayer.pause(),this.h5HLSplayer.status=t.PAUSE)}catch(e){P.warn("clear",e.message)}}},{key:"stop",value:function(){P.log("stop"),this.mediaShareFileList={},this._hideMediaShareBox();try{this.h5HLSplayer&&(this.currPlayMediaId=0,this.h5HLSplayer.rtmpURL="",this.h5HLSplayer.mediaId=0,this.h5HLSplayer.nodeId=0,this.h5HLSplayer.stop(),this.h5HLSplayer.pause(),this.h5HLSplayer.status=t.STOP,this.h5HLSplayer.video&&(this.h5HLSplayer.video.src="")),this._hideMediaShareBox()}catch(e){P.warn("clear",e.message)}}}]),t}(c.default);O.prototype.STOP=O.STOP=0,O.prototype.PLAY=O.PLAY=1,O.prototype.PAUSE=O.PAUSE=2,O.prototype.SCENE_MEDIA_SHARE_CHANGE=O.SCENE_MEDIA_SHARE_CHANGE="scene_media_share_change";var D=O;t.default=D;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(P,"loger","D:/work/PCLive/src/ape/MediaShareApe.js"),__REACT_HOT_LOADER__.register(O,"MediaShareApe","D:/work/PCLive/src/ape/MediaShareApe.js"),__REACT_HOT_LOADER__.register(D,"default","D:/work/PCLive/src/ape/MediaShareApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(2),h=i(f),p=n(3),_=(i(p),n(17)),g=i(_),m=u.default.getLoger("PC-MusicControlBarApe"),v=void 0,y=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.playStatus="",e.isShowVolumeBar=!1,e.isProgressMouseDown=!1,e.isProVolMouseDown=!1,e.isOpenUpdateStatusInfo=!1,e.audio=null,e.controlCallback=null,e.totalTime=0,e.musicVolume=60,e.seekPercent=0,e.seekTime=0,e.updateCounter=0,e.updateStatusDelay=5,e.timerCounter=new g.default,e.timerCounter.addTimerCallBack(e.timerCounterUptate.bind(e),1),e.init(),e.addEvent(),e}return o(t,e),s(t,[{key:"init",value:function(){this.stop(),this.updatePlayProgressBar(),this.updaterVolumeProgressBar()}},{key:"addEvent",value:function(){(0,h.default)("#musicShareVolumePlay").on("click",this._openVolumeControl.bind(this)),(0,h.default)("#musicShareVoice_btn").on("mousedown",this._changeVolume.bind(this)),(0,h.default)("#musicShareVoice_bg").on("mousedown",this._musicProVolBg.bind(this)),(0,h.default)("#musicShareVoice_color").on("mousedown",this._musicProVolBg.bind(this)),(0,h.default)("#musicShareProgressPause").on("click",this._clickPause.bind(this)),(0,h.default)("#musicShareProgressPlay").on("click",this._clickPlay.bind(this)),(0,h.default)("#musicShareProgress_btn").on("mousedown",this._changeProgressBar.bind(this)),(0,h.default)("#musicShareVolumePlay").on("click",this._clickSilenceMusicHandler.bind(this)),(0,h.default)("#musicShareVolumePause").on("click",this._clickCancelSilenceMusicHandler.bind(this)),(0,h.default)("#closeMusicClose").on("mousedown",this._closeMusicCloseHandler.bind(this)),(0,h.default)("#musicShareGroup").on("mousedown",this._mouseDownHandler.bind(this)),(0,h.default)("#musicShareProgress_bg").on("mousedown",this._clickProgressBarBg.bind(this)),(0,h.default)("#musicShareProgress_color").on("mousedown",this._clickProgressBarBg.bind(this))}},{key:"startTimerCounter",value:function(){m.log("开启计时器"),this.updateCounter=0,this.stopTimerCounter(),this.timerCounter&&this.timerCounter.startTimer()}},{key:"stopTimerCounter",value:function(){m.log("停止计时器"),this.updateCounter=0,this.timerCounter&&this.timerCounter.stopTimer()}},{key:"timerCounterUptate",value:function(){if(this.audio&&!this.isProgressMouseDown){this.totalTime=this.audio.duration||0,
this.seekTime=this.audio.currentTime||0,this.seekPercent=parseInt(this.seekTime/this.totalTime*100);var e=this.totalTime,n=this.seekTime,i=this.timerCounterLayOut(e),r=this.timerCounterLayOut(n);(0,h.default)("#musicPresentTime").html(r),(0,h.default)("#musicSumTime").html(i),this.updatePlayProgressBar()}this.seekTime>=this.totalTime&&1!=this.seekTime&&(this.totalTime>0&&this.sendCallBack(t.STOP),this.stopTimerCounter(),this.stop()),this.updateCounter++,this.updateCounter>=this.updateStatusDelay&&(this.updateCounter=0,m.warn("定时同步更新媒体共享的状态"),this.sendCallBack(this.playStatus))}},{key:"timerCounterLayOut",value:function(e){var t=0,n=0;t=Math.floor(e/60),n=Math.floor(e-60*t);var i=(t<10?"0":"")+t;return i+=(n<10?":0":":")+n}},{key:"play",value:function(e){m.log("play"),this.playStatus=t.PLAY,this.showPauseUI(),this.showBox(),this.startTimerCounter()}},{key:"pause",value:function(){m.log("pause"),this.playStatus=t.PAUSE,this.showPlayUI(),this.showBox(),this.stopTimerCounter()}},{key:"stop",value:function(){m.log("stop"),this.seekPercent=0,this.seekTime=0,this.totalTime=0,this.playStatus=t.STOP,this._hideMusicSharePlayProgressVoiceBox(),this.updatePlayProgressBar(),this.showPlayUI(),this.hideBox(),this.stopTimerCounter()}},{key:"seek",value:function(e){m.log("seek"),this.showBox(),this.seekTime=e||0,this.seekPercent=parseInt(this.seekTime/this.totalTime*100),this.updateVideoProgress(),this._hideMusicSharePlayProgressVoiceBox()}},{key:"changeVolume",value:function(e){m.log("changeVolume"),this.showBox(),this.musicVolume=e||0,this.updaterVolumeProgressBar()}},{key:"showPlayUI",value:function(){(0,h.default)("#musicShareProgressPause").hide(),(0,h.default)("#musicShareProgressPlay").show()}},{key:"showPauseUI",value:function(){(0,h.default)("#musicShareProgressPause").show(),(0,h.default)("#musicShareProgressPlay").hide()}},{key:"showBox",value:function(){(0,h.default)("#h5MusicShareControls").show()}},{key:"hideBox",value:function(){(0,h.default)("#h5MusicShareControls").hide()}},{key:"_musicVoiceOpenHandler",value:function(){(0,h.default)("#musicShareVolumePlay").show(),(0,h.default)("#musicShareVolumePause").hide()}},{key:"_musicVoiceCloseHandler",value:function(){(0,h.default)("#musicShareVolumePause").show(),(0,h.default)("#musicShareVolumePlay").hide(),(0,h.default)("#musicPlayPercentage").html("0%"),(0,h.default)("#musicShareVoice_btn").css("left",0),(0,h.default)("#musicShareVoice_color").css("width",0)}},{key:"_clickPlay",value:function(){m.log("播放按钮点击===>"),this.updateCounter=0,this.playStatus=t.PLAY,this.showPauseUI(),this.startTimerCounter(),this.sendCallBack(t.PLAY)}},{key:"_clickPause",value:function(){m.log("暂停播放按钮点击===>"),this.updateCounter=0,this.playStatus=t.PAUSE,this.showPlayUI(),this.stopTimerCounter(),this.sendCallBack(t.PAUSE)}},{key:"_clickSilenceMusicHandler",value:function(){m.log("静音按钮点击===>"),v=document.getElementById("h5Music").volume,document.getElementById("h5Music").volume=0,this.updateCounter=0,this.musicVolume=0,this.playStatus==t.PLAY?this.sendCallBack(t.PLAY):this.playStatus==t.PAUSE?this.sendCallBack(t.PAUSE):this.sendCallBack(t.STOP),this.updateVideoProgress(),this._musicVoiceCloseHandler()}},{key:"_clickCancelSilenceMusicHandler",value:function(){m.log("取消静音按钮点击===>"),this._musicVoiceOpenHandler()}},{key:"_closeMusicCloseHandler",value:function(){(0,h.default)("#musicShareGroup").hide(),this.sendCallBack(t.STOP),this.stopTimerCounter(),this.stop()}},{key:"_mouseDownHandler",value:function(e){this.pointGrou={};var t=document.getElementById("musicShareGroup"),n=(e||window.event).clientX,i=(e||window.event).clientY,r=n-t.offsetLeft,a=i-t.offsetTop;this.pointGroux=Math.round(r),this.pointGrouy=Math.round(a),document.onmousemove=this._mouseMoveHandler.bind(this),document.onmouseup=this._mouseUpHandler.bind(this)}},{key:"_mouseMoveHandler",value:function(e){var t=document.getElementById("musicShareGroup"),n=(0,h.default)(".docBox")[0],i=(e||window.event).clientX,r=(e||window.event).clientY,a=i-this.pointGroux,o=r-this.pointGrouy;document.documentElement.clientWidth||document.body.clientWidth,document.documentElement.clientHeight||document.body.clientHeight;return a<0?a=0:a>n.offsetWidth-t.offsetWidth&&(a=n.offsetWidth-t.offsetWidth),o<0?o=0:o>n.offsetHeight-t.offsetHeight&&(o=n.offsetHeight-t.offsetHeight),(0,h.default)("#musicShareGroup").css({left:a+"px",top:o+"px"}),!1}},{key:"_mouseUpHandler",value:function(e){document.onmousemove=null,document.onmouseup=null}},{key:"_openVolumeControl",value:function(){1==this.isShowVolumeBar?this._hideMusicSharePlayProgressVoiceBox():this._showMusicSharePlayProgressVoiceBox()}},{key:"_changeVolume",value:function(e){return this.updateCounter=0,this.isProVolMouseDown=!0,document.onmousemove=this._mouseMoveMusicVoiceHandler.bind(this),document.onmouseup=this._mouseUpMusicVoiceHandler.bind(this),!1}},{key:"_mouseMoveMusicVoiceHandler",value:function(e){var t=this._moveMethod(e);this.musicVolume=t,this.updaterVolumeProgressBar()}},{key:"_musicProVolBg",value:function(e){this.isProgressMouseDown=!0;var t=this._moveMethod(e);this.musicVolume=t,this.musicVolume>0&&this._musicVoiceOpenHandler(),this.updaterVolumeProgressBar(),this._mouseUpMusicVoiceHandler(e)}},{key:"_mouseUpMusicVoiceHandler",value:function(e){if(this.isProVolMouseDown){this.playStatus==t.PLAY?this.sendCallBack(t.PLAY):this.playStatus==t.PAUSE?this.sendCallBack(t.PAUSE):this.sendCallBack(t.STOP);var n=this._moveMethod(e);0==n&&this._musicVoiceCloseHandler(),n>0&&this._musicVoiceOpenHandler()}this.isProVolMouseDown=!1,document.onmousemove=null,document.onmouseup=null}},{key:"updaterVolumeProgressBar",value:function(){var e=(0,h.default)("#musicShareVoice_color"),t=(0,h.default)("#musicShareVoice_btn"),n=(0,h.default)("#musicPlayPercentage"),i=this.musicVolume/100;this.audio&&(this.audio.volume=i),t.css("left",this.musicVolume+"%"),e.css("width",this.musicVolume+"%"),n.html(this.musicVolume+"%")}},{key:"_showMusicSharePlayProgressVoiceBox",value:function(){this.isShowVolumeBar=!0,(0,h.default)(".musicSharePlayProgressVoiceBox").show()}},{key:"_hideMusicSharePlayProgressVoiceBox",value:function(){this.isShowVolumeBar=!1,(0,h.default)(".musicSharePlayProgressVoiceBox").hide()}},{key:"_changeProgressBar",value:function(e){return this._hideMusicSharePlayProgressVoiceBox(),this.isProgressMouseDown=!0,document.onmousemove=this._mouseMoveMusicProgressHandler.bind(this),document.onmouseup=this._mouseUpMusicaHandler.bind(this),!1}},{key:"_mouseMoveMusicProgressHandler",value:function(e){var t=this._moveMethod(e);this.seekPercent=t,this.updatePlayProgressBar()}},{key:"_clickProgressBarBg",value:function(e){this.isProgressMouseDown=!0;var t=this._moveMethod(e);this.seekPercent=t,this.updatePlayProgressBar(),this._mouseUpMusicaHandler(e)}},{key:"updatePlayProgressBar",value:function(){var e=(0,h.default)("#musicShareProgress_color"),t=(0,h.default)("#musicShareProgress_btn");t.css("left",this.seekPercent+"%"),e.css("width",this.seekPercent+"%")}},{key:"updateVideoProgress",value:function(){try{this.audio.currentTime=this.seekTime}catch(e){m.warn("无法设置audio的currentTime")}}},{key:"_mouseUpMusicaHandler",value:function(e){this.isProgressMouseDown&&(this.seekTime=parseInt(this.seekPercent*this.totalTime*.01),this.playStatus==t.PLAY?this.sendCallBack(t.PLAY):this.playStatus==t.PAUSE?this.sendCallBack(t.PAUSE):this.sendCallBack(t.STOP),this.updateVideoProgress()),this.isProgressMouseDown=!1,document.onmousemove=null,document.onmouseup=null}},{key:"_moveMethod",value:function(e){var t=(e||window.event).clientX,n=(0,h.default)("#musicShareProgress_bg"),i=n.offset().left,r=n.innerWidth(),a=parseInt(t-i);a<0&&(a=0),a>r&&(a=r);var o=Math.floor(100*a/r);return o}},{key:"sendCallBack",value:function(e,t){this.isOpenUpdateStatusInfo&&this.controlCallback&&this.controlCallback({action:e,data:{seek:this.seekTime,musicVolume:this.musicVolume}})}}]),t}(c.default);y.prototype.STOP=y.STOP="stop",y.prototype.PLAY=y.PLAY="play",y.prototype.PAUSE=y.PAUSE="pause",y.prototype.SEEK=y.SEEK="seek",y.prototype.CHANGE_VOLUME=y.CHANGE_VOLUME="change_volume";var E=y;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/PCLive/src/ape/MusicControlBarApe.js"),__REACT_HOT_LOADER__.register(v,"curMusicVolOn","D:/work/PCLive/src/ape/MusicControlBarApe.js"),__REACT_HOT_LOADER__.register(y,"MusicControlBarApe","D:/work/PCLive/src/ape/MusicControlBarApe.js"),__REACT_HOT_LOADER__.register(E,"default","D:/work/PCLive/src/ape/MusicControlBarApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=i(f),p=n(2),_=i(p),g=n(3),m=i(g),v=n(9),y=(i(v),n(11)),E=i(y),S=n(12),T=i(S),C=n(8),R=i(C),b=n(6),w=i(b),A=n(30),I=i(A),P=u.default.getLoger("PC-MusicShareApeTwo"),O=void 0,D=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.h5MusicPlayer=null,e.currPlayMusicId=0,e.musicShareFileList={},e.controlBar=new I.default,e.controlBar.controlCallback=e._controlCallback.bind(e),e.addEvent(),e._hideMusicShareBox(),e}return o(t,e),s(t,[{key:"init",value:function(){(0,_.default)("#musicFileBtn").on("change",this._uploadFile.bind(this)),(0,_.default)("#musicUploadOut").on("click",this._openListHandler.bind(this)),(0,_.default)("#closeMusicList").on("click",this._closeListHandler.bind(this))}},{key:"addEvent",value:function(){h.default.on("class_get_info_success",this._classGetInfoSuccessHandler.bind(this)),h.default.on("music_stop_publish",this._musicStopPublishHandler.bind(this)),h.default.on("class_join_success",this._classJoinSuccessHandler.bind(this)),h.default.on("music_shared_update",this._onMusicShareUpdateHanlder.bind(this)),h.default.on("music_shared_delete",this._onMusicShareDeleteHanlder.bind(this))}},{key:"creatHLSPlayer",value:function(){P.log("伴音共享录制回放->创建h5播放器"),(0,_.default)(".h5MusicBox").show();var e=document.getElementById("h5Music");this.h5MusicPlayer=new E.default(e),this.h5MusicPlayer.divName="h5Music",this.h5MusicPlayer.isMobile=!0,this.h5MusicPlayer.status=t.STOP,(0,_.default)("#h5Music")[0].poster="",this.controlBar.audio=e}},{key:"_classGetInfoSuccessHandler",value:function(e){this.init(),this.creatHLSPlayer()}},{key:"_musicStopPublishHandler",value:function(){m.default.userRole==m.default.USER_HOST&&(P.log("停止当前的所有伴音共享->"),this.currPlayMusicId>0&&this._stopMeidaShare(this.currPlayMusicId))}},{key:"_controlCallback",value:function(e){if(m.default.userRole!=m.default.USER_HOST||m.default.isRecordPlayBack)return void P.log("伴音共享播放器监听控制->录制回放和不是老师不处理");if(P.log("伴音共享播放器监听控制->",e),e)switch(e.action){case I.default.STOP:this.h5MusicPlayer&&this.h5MusicPlayer.musicId>0&&this._updateMeidaShare(this.h5MusicPlayer.musicId,0,e.data.seek,e.data.musicVolume);break;case I.default.PLAY:this.h5MusicPlayer&&this.h5MusicPlayer.musicId>0&&this._updateMeidaShare(this.h5MusicPlayer.musicId,1,e.data.seek,e.data.musicVolume);break;case I.default.PAUSE:this.h5MusicPlayer&&this.h5MusicPlayer.musicId>0&&this._updateMeidaShare(this.h5MusicPlayer.musicId,2,e.data.seek,e.data.musicVolume)}}},{key:"_classJoinSuccessHandler",value:function(e){e.userRole!=m.default.USER_HOST||m.default.isRecordPlayBack?((0,_.default)("#musicUpLoadOut").hide(),(0,_.default)("#musicFile").hide(),(0,_.default)("#musicListOut").hide(),(0,_.default)("#musicShareBoxMask").show()):(this.controlBar&&(this.controlBar.isOpenUpdateStatusInfo=!0),(0,_.default)("#musicShareBoxMask").hide())}},{key:"_onMusicShareUpdateHanlder",value:function(e){if(P.log("伴音模块收到SDK数据",e),null!=e)switch(this._updateListData(e,"add"),e.status){case 0:P.log("停止伴音"),this._tryStopMusicHandler(e.itemIdx);break;case 1:P.log("播放伴音"),this._playMusicHandler(e.itemIdx);break;case 2:P.log("暂停伴音"),this._tryPauseMusicHandler(e);break;case 4:P.log("静音"),this._offMusicHandler(e)}}},{key:"_onMusicShareDeleteHanlder",value:function(e){P.log("_onMusicShareDeleteHanlder",e),this._updateListData(e,"delete")}},{key:"_updateListData",value:function(e,n){"add"==n&&e?this.musicShareFileList[e.itemIdx]=e:(P.log("删除伴音数据",e.itemIdx),delete this.musicShareFileList[e.itemIdx],this.h5MusicPlayer&&this.h5MusicPlayer.musicId==e.itemIdx&&(R.default.enabledBottomBar(),R.default.enabledLeftBar(),R.default.showBottomDocControlBar(),this.currPlayMusicId=0,this.h5MusicPlayer.rtmpURL="",this.h5MusicPlayer.musicId=0,this.h5MusicPlayer.nodeId=0,this.h5MusicPlayer.status=t.STOP,this.h5MusicPlayer.stop(),this.h5MusicPlayer.pause(),(0,_.default)("#h5Music").attr("src",""),this.controlBar.stop(),this._hideMusicShareBox())),this._updateDocListView()}},{key:"_updateDocListView",value:function(){(0,_.default)("#musicFileContent").empty();for(var e in this.musicShareFileList)if(this.musicShareFileList[e].fileId){var t=this._creatListItemDiv(e,this.musicShareFileList[e].fileName,this.musicShareFileList[e].itemIdx);(0,_.default)("#musicFileContent").append(t)}}},{key:"_showMusicShareBox",value:function(e){(0,_.default)("#musicShareGroup").show()}},{key:"_hideMusicShareBox",value:function(e){(0,_.default)("#musicShareGroup").hide()}},{key:"stopAndHide",value:function(){P.log("伴音模块-停止并且隐藏-.stopAndHide"),this._stopMeidaShare(this.currPlayMusicId),this.controlBar&&this.controlBar.stop(),this.currPlayMusicId=0,this._hideMusicShareBox(),this._closeListHandler()}},{key:"_openListHandler",value:function(){this._emit(t.SCENE_MUSIC_SHARE_CHANGE,m.default.SCENE_MUSIC_SHARE),(0,_.default)("#musicShareModal").show(),(0,_.default)(".masker").show()}},{key:"_closeListHandler",value:function(){(0,_.default)("#musicShareModal").hide(),(0,_.default)(".masker").hide()}},{key:"_uploadFile",value:function(e){if(O=document.getElementById("musicFileBtn").files[0],!O)return void P.log("没有选择文件");this._closeListHandler(),P.log("fileItem.type=====",O);var t=O.name;t.split(".")[1];if(P.log("文件名:"+O.name+"->文件类型:"+O.type),O.size>104857600)return void w.default.showError(w.default.TYPE_3,m.default.localConfig.fileError);var n=O.name.toLowerCase();if(n.lastIndexOf(".mp3")<0)return void w.default.showError(w.default.TYPE_3,m.default.localConfig.musicLayoutCont);if(!m.default.DOCServerIP)return P.warn("伴音服务器地址无效,无法上传文件!"),void w.default.showError(w.default.TYPE_3,m.default.localConfig.serverError);R.default.showLoadingMask(),R.default.disEnabledDocBar(),R.default.disEnabledMusicBar();var i=m.default.creatTimestamp(),r=(0,T.default)(m.default.siteId+""+i),a=new FormData;a.append("fileToUpload",O),a.append("filename",escape(O.name)),a.append("size",O.size),a.append("siteId",m.default.siteId),a.append("createUserName",String(m.default.userName)),a.append("createUserID",String(m.default.nodeId)),a.append("timestamp",String(i)),a.append("authId",r),a.append("classId",String(m.default.classId));var o=m.default.DOCServerIP;m.default.DOCServerPort&&(o=o+":"+m.default.DOCServerPort);var s=m.default.locationProtocol+o+"/DocSharing/mediaupload";_.default.ajax({type:"POST",url:s,processData:!1,contentType:!1,data:a,xhr:function e(){var e=_.default.ajaxSettings.xhr();if(e.upload)return e.upload.addEventListener("progress",function(e){var t=e.loaded,n=e.total,i=Math.floor(100*t/n);R.default.updataLoadingMaskProgress(i)},!1),e},success:function(e){R.default.hideLoadingMask(),R.default.enabledDocBar(),R.default.enabledMusicBar(),this._uploadFileSuccess(e),(0,_.default)("#musicFileBtn").val("")}.bind(this),error:function(e){R.default.hideLoadingMask(),R.default.enabledDocBar(),R.default.enabledMusicBar(),P.warn(name+"->上传文件失败",e),w.default.showError(w.default.TYPE_3,name+"->"+m.default.localConfig.uploaDocumentErr),(0,_.default)("#musicFileBtn").val("")}})}},{key:"_uploadFileSuccess",value:function(e){if(P.log("服务器返回的伴音信息->",e),e&&0==e.code){if(!e.list||e.list.length<1)return void P.warn("上传文件返回的数据中数组没有数据",e.list);var t=e.list[0];if(t&&t.id){var n={};n.fileId=t.id,n.fileName=O.name,n.url=t.url,n.duration=parseInt(t.duration)||0,h.default.api("musicSharedUpload",n)}else P.warn("服务器返回的文件信息->不能同步-->id无效",e.id),w.default.showError(w.default.TYPE_3,m.default.localConfig.uploaDocumentErr)}else P.warn("音频上传失败->",e.code),w.default.showError(w.default.TYPE_3,"音频上传失败->code:"+e.code)}},{key:"_clickListToSwitchBtnHandler",value:function(e){var t=parseInt(e.target.id),n=this.musicShareFileList[t];this._stopMeidaShare(this.currPlayMusicId),this.currPlayMusicId=0,P.log("点击列表中切换伴音->播放列表中的伴音文件->",n),this._playMeidaShare(n.itemIdx),this._closeListHandler(),m.default.userRole!=m.default.USER_HOST&&this._hideMusicShareBox()}},{key:"_playMusicHandler",value:function(e){var n=this.musicShareFileList[e];if(n&&(m.default.userRole==m.default.USER_HOST&&this._showMusicShareBox(),P.log("_playMusicHandler",n),this.h5MusicPlayer)){if(P.log(m.default.currentSceneTableId,m.default.SCENE_DOC),m.default.currentSceneTableId!=m.default.SCENE_DOC)return P.log("_playMusicHandler录制回放->但是当前没有切换到伴音模块->currentSceneTableId->"+m.default.currentSceneTableId),void this._tryStopMusicHandler(n.itemIdx);if(this.currPlayMusicId=n.itemIdx,1==n.status){var i=n.seek||1;if(P.log("收到伴音共享播放->seek->"+i),this.h5MusicPlayer.status==t.PLAY&&this.h5MusicPlayer.rtmpURL==n.url){var r=Math.abs(i-this.controlBar.seekTime),a=Math.abs(this.controlBar.musicVolume-n.musicVolume);return P.warn("当前正在播放->seekTime:"+this.controlBar.seekTime,"seek:"+i,"seekDistance:"+r),P.warn("当前正在播放->当前音量:"+this.controlBar.musicVolume,"新的音量值:"+n.musicVolume),r<3&&0==a?void P.warn("不需要seek"):(this.h5MusicPlayer.seek(i),this.h5MusicPlayer.status=t.PLAY,this.controlBar.seek(i),void this.controlBar.changeVolume(n.musicVolume))}this.h5MusicPlayer.rtmpURL=n.url,this.h5MusicPlayer.nodeId=n.fromNodeId,this.h5MusicPlayer.musicId=n.itemIdx,this.h5MusicPlayer.play(n.url,E.default.MODE_VOD,i),this.h5MusicPlayer.status=t.PLAY,this.h5MusicPlayer.seek(i),this.controlBar.play(i),this.controlBar.changeVolume(n.musicVolume),(0,_.default)(".musicShareName").html(n.fileName)}}}},{key:"_tryPauseMusicHandler",value:function(e){if(e){P.log("_tryPauseMusicHandler",e);var n=this.musicShareFileList[e.itemIdx];if(n&&(m.default.userRole==m.default.USER_HOST&&this._showMusicShareBox(),this.h5MusicPlayer)){if(m.default.currentSceneTableId!=m.default.SCENE_DOC)return P.log("_tryPauseMusicHandler录制回放->但是当前没有切换到伴音模块->currentSceneTableId->"+m.default.currentSceneTableId),void this._tryStopMusicHandler(n.itemIdx);if(this.currPlayMusicId=n.itemIdx,2==n.status){var i=n.seek||1;P.log("录制回放->收到伴音共享播放->seek->"+i),this.h5MusicPlayer.rtmpURL=n.url,this.h5MusicPlayer.nodeId=n.fromNodeId,this.h5MusicPlayer.musicId=n.itemIdx,this.h5MusicPlayer.play(n.url,E.default.MODE_VOD,i),this.h5MusicPlayer.pause(),this.h5MusicPlayer.status=t.PAUSE,this.controlBar.pause(),this.controlBar.changeVolume(n.musicVolume)}}}}},{key:"_offMusicHandler",value:function(e){e&&(P.log("_offMusicHandler",e),document.getElementById("h5Music").volume=0)}},{key:"_tryStopMusicHandler",value:function(e){P.log("伴音数据有更新,尝试停止===="),this.h5MusicPlayer&&this.h5MusicPlayer.musicId==e&&(this.currPlayMusicId=0,this.h5MusicPlayer.rtmpURL="",this.h5MusicPlayer.musicId=0,this.h5MusicPlayer.nodeId=0,this.h5MusicPlayer.pause(),this.h5MusicPlayer.status=t.STOP,(0,_.default)("#h5Music").attr("src",""),this.controlBar.stop(),this._hideMusicShareBox())}},{key:"_deleteDcoHandler",value:function(e){P.log("删除伴音鼠标事件->",e.target.id);var t=this.musicShareFileList[parseInt(e.target.id)];if(t){var n={itemIdx:t.itemIdx,fileId:t.fileId,classId:m.default.classId};h.default.api("musicSharedDelete",n)}else P.log("删除伴音鼠标事件---->伴音不存在")}},{key:"_stopMeidaShare",value:function(e){P.log("调用SDK停止伴音共享->",t);var t=parseInt(e);if(t>0){h.default.api("musicSharedStop",{itemIdx:parseInt(t),status:0})}}},{key:"_playMeidaShare",value:function(e){P.log("调用SDK开始伴音共享");var t=parseInt(e);if(t>0){h.default.api("musicSharedPlay",{itemIdx:parseInt(e),status:1,seek:1,musicVolume:30})}}},{key:"_updateMeidaShare",value:function(e,t,n,i){if(P.log("调用SDK -更新伴音共享状态->",e,t,n,i),m.default.userRole==m.default.USER_HOST&&!m.default.isRecordPlayBack){h.default.api("musicSharedUpdate",{itemIdx:parseInt(e),status:parseInt(t),seek:parseInt(n),musicVolume:parseInt(i)})}}},{key:"_creatListItemDiv",value:function(e,t,n){var i=document.createElement("div");i.id="doc_"+e;var r=document.createElement("label");r.innerHTML="&#xe674;",r.className="iconfont",i.appendChild(r);var a=document.createElement("label");a.innerText=""+t,a.title=""+t,a.onclick=this._clickListToSwitchBtnHandler.bind(this),a.id=e,i.appendChild(a);var o=document.createElement("label");return o.type="button",o.id=e,o.innerHTML="&#xe673;",o.className="iconfont",o.onclick=this._deleteDcoHandler.bind(this),i.appendChild(o),i}},{key:"clear",value:function(){P.log("clear"),this.musicShareFileList={},this._hideMusicShareBox();try{this.h5MusicPlayer&&(this.h5MusicPlayer.rtmpURL="",this.h5MusicPlayer.musicId=0,this.h5MusicPlayer.nodeId=0,this.h5MusicPlayer.stop(),this.h5MusicPlayer.pause(),this.h5MusicPlayer.status=t.STOP,this.h5MusicPlayer.audio&&(this.h5MusicPlayer.audio.src="")),this._hideMusicShareBox()}catch(e){P.warn("clear",e.message)}}},{key:"play",value:function(){P.log("play");try{this.h5MusicPlayer&&m.default.currentSceneTableId==m.default.SCENE_DOC&&(this.h5MusicPlayer.resume(),this.h5MusicPlayer.status=t.PLAY)}catch(e){P.warn("clear",e.message)}}},{key:"pause",value:function(){P.log("pause");try{this.h5MusicPlayer&&(this.h5MusicPlayer.pause(),this.h5MusicPlayer.status=t.PAUSE)}catch(e){P.warn("clear",e.message)}}},{key:"stop",value:function(){P.log("伴音-stop"),this.musicShareFileList={},this._hideMusicShareBox();try{this.h5MusicPlayer&&(this.currPlayMusicId=0,this.h5MusicPlayer.rtmpURL="",this.h5MusicPlayer.musicId=0,this.h5MusicPlayer.nodeId=0,this.h5MusicPlayer.stop(),this.h5MusicPlayer.pause(),this.h5MusicPlayer.status=t.STOP,this.h5MusicPlayer.audio&&(this.h5MusicPlayer.audio.src="")),this._hideMusicShareBox()}catch(e){P.warn("clear",e.message)}}},{key:"timerCounterUptate",value:function(e){var t=0,n=0;t=Math.floor(e/60),n=Math.floor(e-60*t);var i=(t<10?"0":"")+t;return i+=(n<10?":0":":")+n}}]),t}(c.default);D.prototype.STOP=D.STOP=0,D.prototype.PLAY=D.PLAY=1,D.prototype.PAUSE=D.PAUSE=2,D.prototype.SCENE_MUSIC_SHARE_CHANGE=D.SCENE_MUSIC_SHARE_CHANGE="scene_music_share_change";var k=D;t.default=k;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(P,"loger","D:/work/PCLive/src/ape/MusicShareApeTwo.js"),__REACT_HOT_LOADER__.register(O,"fileItem","D:/work/PCLive/src/ape/MusicShareApeTwo.js"),__REACT_HOT_LOADER__.register(D,"MusicShareApeTwo","D:/work/PCLive/src/ape/MusicShareApeTwo.js"),__REACT_HOT_LOADER__.register(k,"default","D:/work/PCLive/src/ape/MusicShareApeTwo.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=i(f),p=n(3),_=i(p),g=n(2),m=i(g),v=u.default.getLoger("PC-RecordRePlayApe"),y=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.addEvent(),e.init(),e}return o(t,e),s(t,[{key:"init",value:function(){v.log("RecordRePlayApe-init"),(0,m.default)(".recordPlayControl").on("mouseenter",this._mouseenterRecordRePlayHandler.bind(this)),(0,m.default)(".recordPlayControl").on("mouseleave",this._mouseleaveRecordRePlayHandler.bind(this))}},{key:"addEvent",value:function(){h.default.on("class_join_success",this._classJoinSuccessHandler.bind(this)),h.default.on("class_update_status",this._classUpdateHandler.bind(this)),h.default.on("record_playback_update",this._recordPlaybackHandler.bind(this)),h.default.on("class_update_timer",this._classUpdateTimerHandler.bind(this))}},{key:"_mouseenterRecordRePlayHandler",value:function(){(0,m.default)(".controlBarOut").css("opacity",1)}},{key:"_mouseleaveRecordRePlayHandler",value:function(){(0,m.default)(".controlBarOut").css("opacity",0)}},{key:"_classErrorHandler",value:function(e){}},{key:"_classJoinSuccessHandler",value:function(e){if(_.default.isRecordPlayBack){v.log("录制回放加入成功->创建控制界面",e);var t='<div class="recordBackground" style="position: absolute;top: 0;left:0; z-index: 550;  background-color: #111312;opacity: 0.02; width: 100%;height:100%"></div>',n='<div class="controlBarOut" style="z-index: 552">\n            <div class="controlBarOpacity"></div>\n            <div class="controlBarInner" >\n                    <input class="btn_recordPlay" type="button"  >\n                    <input class="btn_recordPause" type="button"  >\n                    <input class="btn_recordClose" type="button"  >\n                    <input class="replayProgressBar"  type="range" min="0" max="1000" value="0">\n                    <input class="classTimestamp" type="text" value="0/0" disabled="disabled">\n            </div>\n\n          </div>';(0,m.default)(".recordPlayControl").append(t),(0,m.default)(".recordPlayControl").append(n);var i=_.default.timestampToDateTimeFull(0),r=_.default.timestampToDateTimeFull(_.default.recordPlaybackMaxTime);(0,m.default)(".classTimestamp")[0].value=i+" / "+r,(0,m.default)(".btn_recordPlay").on("click",this._recordPlayHandler.bind(this)),(0,m.default)(".btn_recordPause").on("click",this._recordPauseHandler.bind(this)),(0,m.default)(".btn_recordClose").on("click",this._recordCloseHandler.bind(this)),(0,m.default)(".replayProgressBar").on("click",this._recordSeekHandler.bind(this)),(0,m.default)(".btn_recordPlay").show(),(0,m.default)(".btn_recordPause").hide(),(0,m.default)(".btn_recordClose").hide(),this._recordPlayHandler()}}},{key:"_classUpdateHandler",value:function(e){}},{key:"_recordPlaybackHandler",value:function(e){switch(e.status){case 4:this._emit(t.RECORD_REPLAY_SEEK),_.default.classTimestamp=0,(0,m.default)(".replayProgressBar")[0].value=0;var n=_.default.timestampToDateTimeFull(_.default.classTimestamp),i=_.default.timestampToDateTimeFull(_.default.recordPlaybackMaxTime);(0,m.default)(".classTimestamp")[0].value=n+" / "+i,this._recordPlayHandler(),setTimeout(function(){h.default.api("pauseRecordPlayback"),(0,m.default)(".btn_recordPlay").show(),(0,m.default)(".btn_recordPause").hide(),(0,m.default)(".btn_recordClose").show();var e=_.default.timestampToDateTimeFull(0),t=_.default.timestampToDateTimeFull(_.default.recordPlaybackMaxTime);(0,m.default)(".classTimestamp")[0].value=e+" / "+t},100)}}},{key:"_classUpdateTimerHandler",value:function(e){if(_.default.isRecordPlayBack){var t=e.classTimestamp/_.default.recordPlaybackMaxTime*1e3;(0,m.default)(".replayProgressBar")[0].value=t;var n=_.default.timestampToDateTimeFull(e.classTimestamp),i=_.default.timestampToDateTimeFull(_.default.recordPlaybackMaxTime);(0,m.default)(".classTimestamp")[0].value=n+" / "+i}}},{key:"_classExitHandler",value:function(e){v.log(e)}},{key:"_recordPlayHandler",value:function(){v.log("_recordPlayHandler"),(0,m.default)(".btn_recordPlay").hide(),(0,m.default)(".btn_recordPause").show(),(0,m.default)(".btn_recordClose").show(),this._emit(t.RECORD_REPLAY_PLAY),h.default.api("startRecordPlayback")}},{key:"_recordPauseHandler",value:function(){v.log("_recordPauseHandler"),(0,m.default)(".btn_recordPlay").show(),(0,m.default)(".btn_recordPause").hide(),(0,m.default)(".btn_recordClose").show(),this._emit(t.RECORD_REPLAY_PAUSE),h.default.api("pauseRecordPlayback")}},{key:"_recordCloseHandler",value:function(){v.log("_recordCloseHandler"),(0,m.default)(".btn_recordPlay").show(),(0,m.default)(".btn_recordPause").hide(),(0,m.default)(".btn_recordClose").hide(),this._emit(t.RECORD_REPLAY_STOP),_.default.classTimestamp=0,(0,m.default)(".replayProgressBar")[0].value=0;var e=_.default.timestampToDateTimeFull(_.default.classTimestamp),n=_.default.timestampToDateTimeFull(_.default.recordPlaybackMaxTime);(0,m.default)(".classTimestamp")[0].value=e+" / "+n,h.default.api("stopRecordPlayback")}},{key:"_recordSeekHandler",value:function(){v.log("_recordSeekHandler"),this._emit(t.RECORD_REPLAY_SEEK);var e=(0,m.default)(".replayProgressBar")[0].value;e=e/1e3*_.default.recordPlaybackMaxTime,v.log("onProgressBarChange->",e,"秒"),h.default.api("seekRecordPlayback",{time:parseInt(e)}),(0,m.default)(".btn_recordPlay").hide(),(0,m.default)(".btn_recordPause").show(),(0,m.default)(".btn_recordClose").show()}}]),t}(c.default);y.prototype.RECORD_REPLAY_PLAY=y.RECORD_REPLAY_PLAY="record_RePlay_play",y.prototype.RECORD_REPLAY_SEEK=y.RECORD_REPLAY_SEEK="record_RePlay_seek",y.prototype.RECORD_REPLAY_PAUSE=y.RECORD_REPLAY_PAUSE="record_RePlay_pause",y.prototype.RECORD_REPLAY_STOP=y.RECORD_REPLAY_STOP="record_RePlay_stop";var E=y;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"loger","D:/work/PCLive/src/ape/RecordRePlayApe.js"),__REACT_HOT_LOADER__.register(y,"RecordRePlayApe","D:/work/PCLive/src/ape/RecordRePlayApe.js"),__REACT_HOT_LOADER__.register(E,"default","D:/work/PCLive/src/ape/RecordRePlayApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=i(f),p=n(2),_=i(p),g=n(3),m=i(g),v=n(9),y=i(v),E=n(11),S=i(E),T=n(8),C=i(T),R=n(6),b=(i(R),u.default.getLoger("PC-ScreenShareApe")),w="./FlashVideoPlayer.swf",A=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._isEndShare=!1,e.isLoading=!1,e.isOpenScreenShare=!1,e.screenFlashPlayer,e.h5ShareView,e.addEvent(),e.isOpenScreenShare=!1,C.default.enabledLeftBar(),C.default.enabledBottomBar(),C.default.showBottomDocControlBar(),
e}return o(t,e),s(t,[{key:"init",value:function(){(0,_.default)("#screenSharingOut").on("click",this._openScreenSharingHandler.bind(this)),(0,_.default)("#stopShare").on("click",this._closeScreenSharingHandler.bind(this)),(0,_.default)(".downloadCancel").on("click",this._closeScreenSharingHandler.bind(this)),(0,_.default)("#download").on("click",this._downloading.bind(this))}},{key:"addEvent",value:function(){h.default.on("class_get_info_success",this._classGetInfoSuccessHandler.bind(this)),h.default.on("media_stop_publish",this._mediaStopPublishHandler.bind(this)),h.default.on("screen_share_play",this._screenSharePlayHandler.bind(this)),h.default.on("screen_share_stop",this._screenShareStopHandler.bind(this)),h.default.on("publish_screen_share_success",this._publishScreenSuccessHandler.bind(this)),h.default.on("publish_screen_share_faile",this._publishScreenFailedHandler.bind(this)),h.default.on("publish_screen_share_disconnect",this._screenShareConnectedHandler.bind(this)),h.default.on("publish_screen_share_connected",this._screenShareDisconnectedHandler.bind(this))}},{key:"_openScreenSharingHandler",value:function(){this._showScreenShareBox(),C.default.disEnabledLeftBar(),C.default.disEnabledBottomBar(),C.default.hideBottomDocControlBar(),this._startOpenScreenShare(),this._emit(t.SCENE_SCREEN_SHARE_CHANGE,m.default.SCENE_SCREEN_SHARE)}},{key:"_onClickStopShareHandler",value:function(){b.log("点击终止共享"),this.isLoading=!1,this._showPopBox()}},{key:"_closeScreenSharingHandler",value:function(){this.isLoading=!1,this._hidePopBox(),this._hideScreenShareBox(),this._stopScreenShare(),this.isOpenScreenShare=!1,C.default.enabledLeftBar(),C.default.enabledBottomBar(),C.default.showBottomDocControlBar()}},{key:"_closeSharingHandler",value:function(){console.log("在已经共享的过程中点击停止共享"),this._showPopBox()}},{key:"_downloading",value:function(){this.isLoading=!0,this._showLoadingShareTool(),window.location.href=m.default.ssTunnelAppURL}},{key:"_mediaStopPublishHandler",value:function(){this.isLoading=!1,m.default.userRole==m.default.USER_HOST&&(b.log("停止当前的所有推流->"),this._stopScreenShare(),this.isOpenScreenShare=!1,C.default.enabledLeftBar(),C.default.enabledBottomBar(),C.default.showBottomDocControlBar()),this._hideScreenShareBox()}},{key:"_classGetInfoSuccessHandler",value:function(e){this.init(),console.log("_classGetInfoSuccessHandler"),e&&e.userRole!=m.default.USER_HOST?((0,_.default)(".sharingMsgBox").hide(),m.default.isRecordPlayBack?(b.log("屏幕共享录制回放->创建h5播放器"),(0,_.default)(".h5ScreenShareBox").show(),this.h5ShareView=new S.default(document.getElementById("h5ScreenShare")),this.h5ShareView.divName="h5ScreenShare",(0,_.default)("#h5ScreenShare")[0].poster=""):(b.log("屏幕共享->创建flash播放器"),(0,_.default)(".screenMediaShareBox").show(),this.creatFlashPlayer())):b.log("屏幕共享不需要创建播放器->")}},{key:"creatFlashPlayer",value:function(){this.screenFlashPlayer=new y.default,this.screenFlashPlayer.leftGap=0,this.screenFlashPlayer.topGap=0,this.screenFlashPlayer.init({swfUrl:w,divName:"screenMediaShare",mediaId:0,layoutType:y.default.LAYOUT_V,type:y.default.SCREEN_SHARE,callBack:this._mediaPlayerCallback.bind(this),playersDataList:[{mediaType:y.default.SCREEN_SHARE,autoScale:!0,width:320,height:240,showFullBtn:!0,showPublishBtn:!1,showUserName:!1,level:1}],videoImage:"",audioImage:"",audioBtnImage:"",videoBtnImage:"",stopPublishImage:"",backgroundColor:3487030})}},{key:"_mediaPlayerCallback",value:function(e){b.log("屏幕共享播放器监听返回->",e)}},{key:"_screenSharePlayHandler",value:function(e){if(m.default.userRole==m.default.USER_HOST)return void b.log("收到屏幕共享播放->老师不需要播放");if(this._showScreenShareBox(),C.default.disEnabledLeftBar(),C.default.disEnabledBottomBar(),C.default.hideBottomDocControlBar(),m.default.isRecordPlayBack){var t=parseInt(e.seek);t<1&&(t=1),this.h5ShareView?(b.log("收到屏幕共享播放->seek->"+t),this.h5ShareView.rtmpURL=e.replay,this.h5ShareView.nodeId=e.nodeId,this.h5ShareView.mediaId=e.mediaId,this.h5ShareView.IS_VIDEO=!1,this.h5ShareView.play(e.replay,S.default.MODE_VOD,t)):b.log("收到屏幕共享播放->HLS播放器不存在->")}else this.playMedia({rtmpUrl:e.rtmpUrl,mediaId:e.mediaId,mediaType:y.default.SCREEN_SHARE,nodeId:e.fromNodeId,userRole:e.userRole,userName:e.userName,showFullBtn:!0,screenWidth:e.screenWidth||0,screenHeight:e.screenHeight||0})}},{key:"playMedia",value:function(e){return e?void(this.screenFlashPlayer?this.screenFlashPlayer.playMedia(e):b.log("playMedia->没有找到对应的播放器")):void b.warn("playMedia->参数错误--->",e)}},{key:"stopMedia",value:function(e){return e?void(this.screenFlashPlayer?this.screenFlashPlayer.stopFlashPlay(e):b.log("stopMedia->没有找到对应的播放器")):void b.warn("stopMedia->参数错误",e)}},{key:"_screenShareStopHandler",value:function(e){return this.isLoading=!1,m.default.userRole==m.default.USER_HOST?void b.log("收到屏幕共享停止->老师不需停止"):(b.log("收到屏幕共享停止"),m.default.isRecordPlayBack?this.h5ShareView&&(this.h5ShareView.rtmpURL="",this.h5ShareView.nodeId=0,this.h5ShareView.mediaId=0,this.h5ShareView.stop()):this.stopMedia({mediaId:e.mediaId,mediaType:y.default.SCREEN_SHARE,nodeId:e.fromNodeId,userRole:e.userRole}),this._hideScreenShareBox(),C.default.enabledLeftBar(),C.default.enabledBottomBar(),void C.default.showBottomDocControlBar())}},{key:"_publishScreenSuccessHandler",value:function(e){return m.default.userRole!=m.default.USER_HOST?void b.log("屏幕共享流发布成->学生不需操作"):(b.log("屏幕共享流发布成"),this.isOpenScreenShare=!0,C.default.disEnabledLeftBar(),C.default.disEnabledBottomBar(),C.default.hideBottomDocControlBar(),this._showStopShareBtn(),void this._emit(t.SCENE_SCREEN_SHARE_CHANGE,m.default.SCENE_SCREEN_SHARE))}},{key:"_publishScreenFailedHandler",value:function(e){return m.default.userRole!=m.default.USER_HOST?void b.log("屏幕共享流发布失败->学生不需操作"):(b.log("屏幕共享流发布失败->关闭共享界面"),this.isOpenScreenShare=!1,this.isLoading=!1,this._hideScreenShareBox(),C.default.enabledLeftBar(),C.default.enabledBottomBar(),void C.default.showBottomDocControlBar())}},{key:"_screenShareConnectedHandler",value:function(e){return m.default.userRole!=m.default.USER_HOST?void b.log("屏幕共享服务器没有连接->学生不需操作"):(b.log("屏幕共享服务器没有连接"),this.isLoading||this._showLoadShareTool(),this.isOpenScreenShare&&this._stopScreenShare(),void(this.isOpenScreenShare=!1))}},{key:"_screenShareDisconnectedHandler",value:function(e){return m.default.userRole!=m.default.USER_HOST?void b.log("获取屏幕共享服务器已经连接->学生不需操作"):(b.log("获取屏幕共享服务器已经连接"),void this._showLoadingShareTool())}},{key:"_startOpenScreenShare",value:function(){b.log("调用SDK打开共享");h.default.api("publishScreenShare",{type:"flash"})}},{key:"_stopScreenShare",value:function(){if(b.log("调用SDK停止共享"),m.default.userRole!=m.default.USER_HOST)return void b.log("调用SDK停止共享->学生不需操作");if(this.isOpenScreenShare){this.isOpenScreenShare=!1;h.default.api("stopPublishScreenShare")}this.isOpenScreenShare=!1}},{key:"_showScreenShareBox",value:function(){(0,_.default)(".screenSharingGroup").show(),(0,_.default)(".screenSharingGroup").css("z-index",501),(0,_.default)("#screenSharingOut").addClass("active")}},{key:"_hideScreenShareBox",value:function(){(0,_.default)(".screenSharingGroup").css("z-index",-6),(0,_.default)("#screenSharingOut").removeClass("active")}},{key:"_showPopBox",value:function(){b.log("点击停止共享时的弹出确认框"),(0,_.default)(".endShareBox").show(),(0,_.default)(".masker").show()}},{key:"_hidePopBox",value:function(){(0,_.default)(".endShareBox").hide(),(0,_.default)(".masker").hide()}},{key:"_showLoadShareTool",value:function(){(0,_.default)("#download").show(),(0,_.default)(".downloadCancel").show(),(0,_.default)("#opening").hide(),(0,_.default)("#downloading").hide(),(0,_.default)("#stopShare").hide(),(0,_.default)(".sharingMsgBox").addClass("sharingMsgBox1"),(0,_.default)(".shareBackdrop").hide()}},{key:"_showLoadingShareTool",value:function(){(0,_.default)("#download").hide(),(0,_.default)("#opening").hide(),(0,_.default)("#downloading").show(),(0,_.default)(".downloadCancel").show(),(0,_.default)("#stopShare").hide(),(0,_.default)(".sharingMsgBox").addClass("sharingMsgBox1"),(0,_.default)(".shareBackdrop").hide()}},{key:"_showStopShareBtn",value:function(){(0,_.default)("#download").hide(),(0,_.default)("#opening").hide(),(0,_.default)("#downloading").hide(),(0,_.default)("#stopShare").show(),(0,_.default)(".downloadCancel").hide(),(0,_.default)(".sharingMsgBox").removeClass("sharingMsgBox1"),(0,_.default)(".shareBackdrop").show()}},{key:"stopAndHide",value:function(){this._closeScreenSharingHandler()}},{key:"clear",value:function(){b.log("clear");try{this.h5ShareView&&(this.h5ShareView.rtmpURL="",this.h5ShareView.mediaId=0,this.h5ShareView.nodeId=0,this.h5ShareView.stop()),this._hideScreenShareBox()}catch(e){b.warn("clear",e.message)}}},{key:"play",value:function(){b.log("play");try{this.h5ShareView&&this.h5ShareView.resume()}catch(e){b.warn("clear",e.message)}}},{key:"pause",value:function(){b.log("pause");try{this.h5ShareView&&this.h5ShareView.pause()}catch(e){b.warn("clear",e.message)}}},{key:"stop",value:function(){b.log("stop");try{this.h5ShareView&&(this.h5ShareView.rtmpURL="",this.h5ShareView.mediaId=0,this.h5ShareView.nodeId=0,this.h5ShareView.stop()),this._hideScreenShareBox()}catch(e){b.warn("clear",e.message)}}}]),t}(c.default);A.prototype.SCENE_SCREEN_SHARE_CHANGE=A.SCENE_SCREEN_SHARE_CHANGE="scene_screen_share_change";var I=A;t.default=I;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"loger","D:/work/PCLive/src/ape/ScreenShareApe.js"),__REACT_HOT_LOADER__.register(w,"FLASH_PATH","D:/work/PCLive/src/ape/ScreenShareApe.js"),__REACT_HOT_LOADER__.register(A,"ScreenShareApe","D:/work/PCLive/src/ape/ScreenShareApe.js"),__REACT_HOT_LOADER__.register(I,"default","D:/work/PCLive/src/ape/ScreenShareApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=(i(f),n(3)),p=i(h),_=n(2),g=i(_),m=u.default.getLoger("PC-SearchApe"),v=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.init(),e.isShowRoster=!1,e}return o(t,e),s(t,[{key:"init",value:function(){(0,g.default)("#searchName").on("keyup",this._showSelectRosterChange.bind(this)),(0,g.default)("#rosterIcon").on("click",this._showSelectBox.bind(this)),(0,g.default)("#clearInput").on("click",this._clearInputInfo.bind(this))}},{key:"_showSelectRosterChange",value:function(){var e=(0,g.default)("#searchName").val();""!=g.default.trim(e)?(0,g.default)(".nameDiv").each(function(){var t=(0,g.default)(this).attr("title");t.indexOf(e)!=-1?(0,g.default)(this).parent().parent().show():(0,g.default)(this).parent().parent().hide()}):(0,g.default)(".userListInfo").show()}},{key:"_showSelectBox",value:function(){p.default.userRole!=p.default.USER_HOST&&p.default.userRole!=p.default.USER_INVISIBLE||(this.isShowRoster?((0,g.default)("#searchBox").hide(),this.isShowRoster=!1,(0,g.default)(".curClassUserList").css("top","0px"),this._clearInputInfo()):((0,g.default)("#searchBox").show(),(0,g.default)("#searchName").focus(),this.isShowRoster=!0,(0,g.default)(".curClassUserList").css("top","42px")))}},{key:"_clearInputInfo",value:function(){(0,g.default)("#searchName").val(""),this._showSelectRosterChange()}}]),t}(c.default),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(m,"loger","D:/work/PCLive/src/ape/SearchApe.js"),__REACT_HOT_LOADER__.register(v,"SearchApe","D:/work/PCLive/src/ape/SearchApe.js"),__REACT_HOT_LOADER__.register(y,"default","D:/work/PCLive/src/ape/SearchApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=i(f),p=n(3),_=i(p),g=n(2),m=i(g),v=u.default.getLoger("PC-SignApe"),y='<li class="turnListItem">\n                        <p class="turnListItemName">{_userName}</p>\n                        <p class="turnListItemTime">{time}</p>\n                   </li>',E=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._showPage=!1,e._questionObject={},e.timerList=[0,5,10,15,30],e.isCancel=!1,e.isHide=!1,e.addEvent(),e.init(),e}return o(t,e),s(t,[{key:"init",value:function(){(0,m.default)(".sign").on("click",this._signShow.bind(this)),(0,m.default)(".signHeadline .iconfont").on("click",this._closeSignHandler.bind(this)),(0,m.default)(".signStudentHeadlineA").on("click",this._closeSignStudentHandler.bind(this)),(0,m.default)("#signShowBox").on("click",this._signShowHandler.bind(this)),(0,m.default)(".signUl").on("click","li",this._signLiHandler.bind(this)),(0,m.default)(".sponsorSign").on("click",this._sponsorSubmit.bind(this)),(0,m.default)(".turnResultBtn").on("click",this._turnResultBtnClone.bind(this)),(0,m.default)(".turnStudentBtn").on("click",this._turnStudentBtnRefer.bind(this)),(0,m.default)("body").on("click",function(e){(0,m.default)(e.target).is(".signShow")||(0,m.default)(".signUl").hide()})}},{key:"addEvent",value:function(){h.default.on("start_answer_question",this.startAnswerQuestion.bind(this)),h.default.on("update_answer_question",this.upDateAnswerQuestion.bind(this)),h.default.on("stop_answer_question",this.stopAnswerQuestion.bind(this)),h.default.on("update_question_time",this.updateQuestionTime.bind(this))}},{key:"startAnswerQuestion",value:function(e){console.log("startAnswerQuestion",e,_.default.userRole),100==e.type&&_.default.userRole==_.default.USER_NOTMAL&&(this._questionObject=e,1e5==e.timeLimit?(0,m.default)(".signCountdown").css("opacity",0):(0,m.default)(".signCountdown").css("opacity",1),this.isCancel||((0,m.default)("#signCountdown").html(_.default.localConfig.namingTheCountdown),this._showSignStudent()))}},{key:"upDateAnswerQuestion",value:function(e){100==e.type&&_.default.userRole==_.default.USER_HOST&&(this._questionObject=e,this.isHide||this._showSignResult(),this._messageAdd(e))}},{key:"stopAnswerQuestion",value:function(e){console.log("stopAnswerQuestion",e),100==e.type&&(this._closeSignStudentHandler(),this.isCancel=!1,this.isHide=!1)}},{key:"updateQuestionTime",value:function(e){100==e.type&&(0,m.default)("#signCountdown").html(this._newTime(e.timestamp))}},{key:"_newTime",value:function(e){var t=0,n=0;t=Math.floor(e/60)<10?"0"+Math.floor(e/60):Math.floor(e/60),n=Math.floor(e-60*t)<10?"0"+Math.floor(e-60*t):Math.floor(e-60*t);var i=_.default.localConfig.namingTheCountdown;return i+=t>0?t+" : ":"00 : ",i+=n>0?n:"00"}},{key:"_messageAdd",value:function(e){var t=(0,m.default)(".turnList");t.empty(),v.log("学生端信息查询",e);for(var n=0,i=e.list.length;n<i;n++){var r=this._format(y,{_userName:e.list[n].userName,time:_.default.timestampToDateTimeSign(parseInt(e.list[n].time))});t.append(r),(0,m.default)(".turnLen").html(e.totalUser)}}},{key:"_showTimerList",value:function(){var e=(0,m.default)(".signUl"),t=void 0;e.html(""),m.default.each(this.timerList,function(n,i){t=0==i?'<li data-val="100000" data-ind="'+n+'" class="active">'+_.default.localConfig.nothing+"</li>":i/60<1?'<li data-val="'+i+'" data-ind="'+n+'">'+i+_.default.localConfig.second+"</li>":'<li data-val="'+i+'" data-ind="'+n+'">'+i/60+_.default.localConfig.minute+"</li>",e.append(t)})}},{key:"_signShow",value:function(){this._showTimerList(),(0,m.default)(".signShow").html((0,m.default)(".signUl").find("li").eq(0).html()).attr("data-val",(0,m.default)(".signUl li").eq(0).attr("data-val")),(0,m.default)(".signAllBox").show(),(0,m.default)(".signBox").fadeIn(800),this._showPage?(0,m.default)(".signContentB").show():(0,m.default)(".signContentA").show()}},{key:"_closeSignHandler",value:function(){this.isHide=!0,(0,m.default)(".signAllBox").hide(),(0,m.default)(".signBox").hide()}},{key:"_closeSignStudentHandler",value:function(){this.isCancel=!0,(0,m.default)(".signAllBox").hide(),(0,m.default)(".signStudentBox").hide()}},{key:"_signShowHandler",value:function(){(0,m.default)(".signUl").is(":hidden")?(0,m.default)(".signUl").show():(0,m.default)(".signUl").hide()}},{key:"_signLiHandler",value:function(e){var t=(0,m.default)(e.target),n=t.index();this._judgeDddClass((0,m.default)(".signUl li"),n),(0,m.default)(".signShow").html(t.html()).attr("data-val",t.data("val")),(0,m.default)(".signUl").hide()}},{key:"_judgeDddClass",value:function(e,t){e.eq(t).addClass("active").siblings().removeClass("active")}},{key:"_sponsorSubmit",value:function(){this.isHide=!1;var e=parseInt((0,m.default)(".signShow").attr("data-val")),t={type:parseInt(100),content:"点名",timeLimit:e,correct:[],options:["A"]};h.default.api("creatQuestion",t)}},{key:"_turnResultBtnClone",value:function(){this._clearSign(),this._stopSign(),this._hideSignResult()}},{key:"_stopSign",value:function(){h.default.api("stopQuestion",{itemIdx:parseInt(this._questionObject.itemIdx),questionId:parseInt(this._questionObject.questionId)}),this._questionObject=null}},{key:"_clearSign",value:function(){this._showPage=!1,this.isCancel=!1,this.isHide=!1,(0,m.default)(".turnLen").html(0),this._revocation(),this._judgeDddClass((0,m.default)(".signUl li"),0)}},{key:"_turnStudentBtnRefer",value:function(){if("normal"==_.default.userRole){var e={};e.itemIdx=this._questionObject.itemIdx,e.questionId=this._questionObject.questionId,e.answer=[0],h.default.api("sendAnswer",e),this._hideSignStudent()}}},{key:"_revocation",value:function(){(0,m.default)(".signShow").html(_.default.localConfig.nothing),(0,m.default)(".turnListItem").remove()}},{key:"_format",value:function(e,t){return e.replace(/\{(\w+)\}/g,function(e,n,i){return t[n]})}},{key:"_showSignStudent",value:function(){(0,m.default)(".signAllBox").show(),(0,m.default)(".signStudentBox").show()}},{key:"_hideSignStudent",value:function(){(0,m.default)(".signAllBox").hide(),(0,m.default)(".signStudentBox").hide()}},{key:"_showSignResult",value:function(){this._showPage=!0,(0,m.default)(".signAllBox").show(),(0,m.default)(".signBox").show(),(0,m.default)(".signContentA").hide(),(0,m.default)(".signContentB").show()}},{key:"_hideSignResult",value:function(){(0,m.default)(".signAllBox").hide(),(0,m.default)(".signBox").hide(),(0,m.default)(".signContentB").hide()}}]),t}(c.default),S=E;t.default=S;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"loger","D:/work/PCLive/src/ape/SignApe.js"),__REACT_HOT_LOADER__.register(y,"newList","D:/work/PCLive/src/ape/SignApe.js"),__REACT_HOT_LOADER__.register(E,"SignApe","D:/work/PCLive/src/ape/SignApe.js"),__REACT_HOT_LOADER__.register(S,"default","D:/work/PCLive/src/ape/SignApe.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),u=i(l),d=n(5),c=i(d),f=n(4),h=i(f),p=n(25),_=i(p),g=n(13),m=(i(g),n(2)),v=i(m),y=n(3),E=i(y),S=u.default.getLoger("PC-WhiteBoardApe"),T=function(e){function t(){r(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.color="#b8242a",E.default.isDraw=!1,e.drawTool,e.thickness=2,e.isMouseDown=!1,e.canvasContent,e.context,e.canvasWidth=0,e.canvasHeight=0,e.scroolTop=0,e.scroolLeft=0,e.canvasTop=0,e.canvasLeft=0,e.pointGrou=[],e.prevX=0,e.prevY=0,e.receiveData=[],e.addEvent(),e.init(),e}return o(t,e),s(t,[{key:"init",value:function(){this.drawTool=new _.default,this.drawTool.on(_.default.DRAW_TOOL_CHANGE,this._drawToolChnageHandler.bind(this)),this.canvasContent=(0,v.default)(".canvasContent"),this.canvasWidth=(0,v.default)(".docBox")[0].clientWidth,this.canvasHeight=(0,v.default)(".docBox")[0].clientHeight,this.canvasContent[0].width=this.canvasWidth,this.canvasContent[0].height=this.canvasHeight,this.context=this.canvasContent[0].getContext("2d"),this.canvasContent.on("mousedown",this._mouseDownHandler.bind(this)),this.canvasContent.on("mousemove",this._mouseMoveHandler.bind(this)),document.addEventListener("mouseup",this._mouseUpHandler.bind(this),!1),document.addEventListener("mouseout",this._mouseOutHandler.bind(this),!1)}},{key:"addEvent",value:function(){h.default.on("whiteboard_annotation_update",this._whiteboradUpdateHanlder.bind(this)),h.default.on("class_join_success",this._classJoinSuccessHandler.bind(this))}},{key:"setCanvasSize",value:function(e){this.canvasContent&&(this.canvasWidth=e.width,this.canvasHeight=e.height,this.canvasContent[0].width=this.canvasWidth,this.canvasContent[0].height=this.canvasHeight,this._clearCanvas(),this._startDraw(this.receiveData))}},{key:"clear",value:function(){this.pointGrou=[],this.receiveData=[],this._clearCanvas()}},{key:"_whiteboradUpdateHanlder",value:function(e){E.default.userRole==E.default.USER_NOTMAL&&(0,v.default)(".laserBoard").css("z-index","-1"),S.log("更新的白板标注->是否清除:",e.isFresh,"数量->",e.annotaionItems.length);var t=e.annotaionItems;if(e.isFresh){if(this.receiveData=[],this._clearCanvas(),t&&t.length>0)for(var n=0;n<t.length;n++)this.receiveData.push(t[n]);this._startDraw(t)}else{var i=[],r=E.default.nodeId;if(t&&t.length>0)for(var a=0;a<t.length;a++)this.receiveData.push(t[a]),t[a].initiator!=r&&i.push(t[a]);this._startDraw(i)}}},{key:"_classJoinSuccessHandler",value:function(e){(e.userRole==E.default.USER_NOTMAL||E.default.isRecordPlayBack)&&(this.color="#0071bc",(0,v.default)("#showColor").css("background",'url("images/colorBlue.png") no-repeat'))}},{key:"_startDraw",value:function(e){if(e&&e.length>0)for(var t=0;t<e.length;t++){var n=e[t];n&&n.parentId==E.default.currentDocId&&n.curPageNo==E.default.currentPageNum&&this._drawDataToCanvas(n)}}},{key:"_clearCanvas",value:function(){this.context&&this.context.clearRect(0,0,this.canvasWidth,this.canvasHeight)}},{key:"_drawDataToCanvas",value:function(e){if(e)switch(e.type){case 0:this._drawLine(e);break;default:S.log("_drawDataToCanvas->未知类型不处理",e.type)}}},{key:"_drawLine",value:function(e){var t=e.pointGroup;if(t&&t.length>1){this.context.beginPath(),this.context.lineWidth=parseInt(e.thickness)||2,this.context.strokeStyle=e.color||"#b8242a";var n=this.xyFromPer(t[0].w,t[0].h),i=t.length;this.context.moveTo(n.x,n.y);for(var r=null,a=1;a<i;a++)r=t[a],n=this.xyFromPer(r.w,r.h),this.context.lineTo(n.x,n.y);this.context.stroke()}}},{key:"_drawToolChnageHandler",value:function(e){switch(S.log("_drawToolChnageHandler",e.color),e.action){case"pencil":E.default.isDraw=e.isDraw;break;case"changeColor":this.color=e.color;break;case"rescind":h.default.api("sendGotoPrev");break;case"clear":h.default.api("sendDeleteCurPageAnnotation")}}},{key:"_mouseDownHandler",value:function(e){this.pointGrou=[],E.default.isDraw&&(this.isMouseDown=!0,this.scroolTop=(0,v.default)(window).scrollTop(),this.scroolLeft=(0,v.default)(window).scrollLeft(),this.canvasTop=this.canvasContent.offset().top-this.scroolTop,this.canvasLeft=this.canvasContent.offset().left-this.scroolLeft,this.prevX=e.clientX-this.canvasLeft,this.prevY=e.clientY-this.canvasTop,this.pointGrou.push(this.xyToPer(Math.round(this.prevX),Math.round(this.prevY))))}},{key:"_mouseMoveHandler",value:function(e){if(E.default.isDraw&&this.isMouseDown){var t=e.clientX-this.canvasLeft,n=e.clientY-this.canvasTop;if(this.prevX==t&&this.prevY==n)return;this.context.beginPath(),this.context.moveTo(this.prevX,this.prevY),this.context.lineTo(t,n),this.context.strokeStyle=this.color,this.context.lineWidth=this.thickness,this.context.lineCap="round",this.context.lineJoin="round",this.context.stroke(),this.prevX=t,this.prevY=n,this.pointGrou.push(this.xyToPer(Math.round(t),Math.round(n)))}}},{key:"_mouseUpHandler",value:function(e){E.default.isDraw&&this.isMouseDown&&(S.log("_mouseUpHandler"),this.isMouseDown=!1,this._sendDrawLine()),this.pointGrou=[]}},{key:"_mouseOutHandler",value:function(e){E.default.isDraw&&this.isMouseDown&&(S.log("_mouseOutHandler"),this.isMouseDown=!1,this._sendDrawLine()),this.pointGrou=[]}},{key:"_sendDrawLine",value:function(){if(this.pointGrou.length>1){var e={type:0,pointGroup:this.pointGrou,color:this.color,thickness:this.thickness};console.log("发送标注数据->",e),h.default.api("sendInsertAnnotaion",e),this.pointGrou=[]}}},{key:"xyToPer",value:function(e,t){var n={};return n.w=parseInt(e/this.canvasWidth*1e4)/100,n.h=parseInt(t/this.canvasWidth*1e4)/100,n}},{key:"xyFromPer",value:function(e,t){var n={};return n.x=Math.round(e*this.canvasWidth/100),n.y=Math.round(t*this.canvasWidth/100),n}}]),t}(c.default),C=T;t.default=C;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(S,"loger","D:/work/PCLive/src/ape/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(T,"WhiteBoardApe","D:/work/PCLive/src/ape/WhiteBoardApe.js"),__REACT_HOT_LOADER__.register(C,"default","D:/work/PCLive/src/ape/WhiteBoardApe.js"))})()},function(e,t,n){var i,r,a;(function(e){"use strict";var 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};!function(o,s){"object"==n(t)&&"object"==n(e)?e.exports=s():(r=[],i=s,a="function"==typeof i?i.apply(t,r):i,!(void 0!==a&&(e.exports=a)))}(void 0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(2)},function(e,t){var i=!0,r={disableLog:function(e){return"boolean"!=typeof e?new Error("Argument type: "+("undefined"==typeof e?"undefined":n(e))+". Please use a boolean."):(i=e,e?"adapter.js logging disabled":"adapter.js logging enabled")},log:function(){if("object"==("undefined"==typeof window?"undefined":n(window))){if(i)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}},extractVersion:function(e,t,n){var i=e.match(t);return i&&i.length>=n&&parseInt(i[n],10)},detectBrowser:function(){var e={};if(e.browser=null,e.version=null,"undefined"==typeof window||!window.navigator)return e.browser="Not a browser.",e;if(navigator.mozGetUserMedia)e.browser="firefox",e.version=this.extractVersion(navigator.userAgent,/Firefox\/(\d+)\./,1);else if(navigator.webkitGetUserMedia)if(window.webkitRTCPeerConnection)e.browser="chrome",e.version=this.extractVersion(navigator.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!navigator.userAgent.match(/Version\/(\d+).(\d+)/))return e.browser="Unsupported webkit-based browser with GUM support but no WebRTC support.",e;e.browser="safari",e.version=this.extractVersion(navigator.userAgent,/AppleWebKit\/(\d+)\./,1)}else if(navigator.mediaDevices&&navigator.userAgent.match(/Edge\/(\d+).(\d+)$/))e.browser="edge",e.version=this.extractVersion(navigator.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!navigator.mediaDevices||!navigator.userAgent.match(/AppleWebKit\/(\d+)\./))return e.browser="Not a supported browser.",e;e.browser="safari",e.version=this.extractVersion(navigator.userAgent,/AppleWebKit\/(\d+)\./,1)}return e},shimCreateObjectURL:function(){if("object"==("undefined"==typeof window?"undefined":n(window))&&window.HTMLMediaElement&&"srcObject"in window.HTMLMediaElement.prototype){var e=URL.createObjectURL.bind(URL),t=URL.revokeObjectURL.bind(URL),i=new Map,r=0;URL.createObjectURL=function(t){if("getTracks"in t){var n="polyblob:"+ ++r;return i.set(n,t),console.log("URL.createObjectURL(stream) is deprecated! Use elem.srcObject = stream instead!"),n}return e(t)},URL.revokeObjectURL=function(e){t(e),i.delete(e)};var a=Object.getOwnPropertyDescriptor(window.HTMLMediaElement.prototype,"src");Object.defineProperty(window.HTMLMediaElement.prototype,"src",{get:function(){return a.get.apply(this)},set:function(e){return this.srcObject=i.get(e)||null,a.set.apply(this,[e])}});var o=HTMLMediaElement.prototype.setAttribute;HTMLMediaElement.prototype.setAttribute=function(){return 2===arguments.length&&"src"===(""+arguments[0]).toLowerCase()&&(this.srcObject=i.get(arguments[1])||null),o.apply(this,arguments)}}}};e.exports={log:r.log,disableLog:r.disableLog,browserDetails:r.detectBrowser(),extractVersion:r.extractVersion,shimCreateObjectURL:r.shimCreateObjectURL,detectBrowser:r.detectBrowser.bind(r)}},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}var r=n(4),a=i(r),o=n(3),s=i(o);n(6);var l=a.default.createInstance({name:"xdy",version:"1.0",size:104857600,storeName:"XDY",description:"A XDY LOCAL STOREAGE."});e.exports={get:function(e,t){l.getItem(e,t)},set:function(e,t,n){l.setItem(e,t,n)},getDevices:function(e){function t(){s.default.load(function(){e(null,{cameras:s.default.videoInputDevices,camEnabled:s.default.isWebsiteHasWebcamPermissions,microphones:s.default.audioInputDevices,micEnabled:s.default.isWebsiteHasMicrophonePermissions,speakers:s.default.audioOutputDevices})})}navigator.getUserMedia({video:!0,audio:!0},function(e){e&&e.getTracks().forEach(function(t){t.stop(),e.removeTrack(t)}),t()},function(){t()})}}},function(e,t,i){var r,a;(function(i,o){!function(){function s(){var e,t,n,i=(y.appVersion,y.userAgent),r=y.appName,a=""+parseFloat(y.appVersion),o=parseInt(y.appVersion,10);if(T){r="Opera";try{a=y.userAgent.split("OPR/")[1].split(" ")[0],o=a.split(".")[0]}catch(e){a="0.0.0.0",o=0}}else w?(t=i.indexOf("MSIE"),r="IE",a=i.substring(t+5)):b?(t=i.indexOf("Chrome"),r="Chrome",a=i.substring(t+7)):R?(t=i.indexOf("Safari"),r="Safari",a=i.substring(t+7),(t=i.indexOf("Version"))!==-1&&(a=i.substring(t+8))):C?(t=i.indexOf("Firefox"),r="Firefox",a=i.substring(t+8)):(e=i.lastIndexOf(" ")+1)<(t=i.lastIndexOf("/"))&&(r=i.substring(e,t),a=i.substring(t+1),r.toLowerCase()===r.toUpperCase()&&(r=y.appName));return S&&(r="Edge",a=parseInt(y.userAgent.match(/Edge\/(\d+).(\d+)$/)[2],10).toString()),
(n=a.indexOf(";"))!==-1&&(a=a.substring(0,n)),(n=a.indexOf(" "))!==-1&&(a=a.substring(0,n)),o=parseInt(""+a,10),isNaN(o)&&(a=""+parseFloat(y.appVersion),o=parseInt(y.appVersion,10)),{fullVersion:a,version:o,name:r,isPrivateBrowsing:!1}}function l(e,t){var n=0,i=50,r=!1,a=window.setInterval(function(){e()&&(window.clearInterval(a),t(r)),n++>i&&(window.clearInterval(a),r=!0,t(r))},10)}function u(e){var t=e.toLowerCase();if(0===t.indexOf("msie")&&0===t.indexOf("trident"))return!1;var n=/(?:msie|rv:)\s?([\d\.]+)/.exec(t);return!!(n&&parseInt(n[1],10)>=10)}function d(e){var t;try{if(window.webkitRequestFileSystem)window.webkitRequestFileSystem(window.TEMPORARY,1,function(){t=!1},function(e){t=!0});else if(window.indexedDB&&/Firefox/.test(window.navigator.userAgent)){var n;try{n=window.indexedDB.open("test"),n.onerror=function(){return!0}}catch(e){t=!0}"undefined"==typeof t&&l(function(){return"done"===n.readyState},function(e){e||(t=!n.result)})}else if(u(window.navigator.userAgent)){t=!1;try{window.indexedDB||(t=!0)}catch(e){t=!0}}else if(window.localStorage&&/Safari/.test(window.navigator.userAgent)){try{window.localStorage.setItem("test",1)}catch(e){t=!0}"undefined"==typeof t&&(t=!1,window.localStorage.removeItem("test"))}}catch(e){t=!1}l(function(){return"undefined"!=typeof t},function(n){e(t)})}function c(){var e="-",t=y.appVersion,n=y.userAgent,i=e,r=[{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 3.11",r:/Win16/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}];for(var a in r){var o=r[a];if(o.r.test(n)){i=o.s;break}}var s=e;switch(/Windows/.test(i)&&(/Windows (.*)/.test(i)&&(s=/Windows (.*)/.exec(i)[1]),i="Windows"),i){case"Mac OS X":/Mac OS X (10[\.\_\d]+)/.test(n)&&(s=/Mac OS X (10[\.\_\d]+)/.exec(n)[1]);break;case"Android":/Android ([\.\_\d]+)/.test(n)&&(s=/Android ([\.\_\d]+)/.exec(n)[1]);break;case"iOS":/OS (\d+)_(\d+)_?(\d+)?/.test(n)&&(s=/OS (\d+)_(\d+)_?(\d+)?/.exec(t),s=s[1]+"."+s[2]+"."+(0|s[3]))}return{osName:i,osVersion:s}}function f(e){e=(e||y.userAgent).toLowerCase();var t=e.match(/android\s([0-9\.]*)/);return!!t&&t[1]}function h(e){V.isWebRTCSupported&&(V.isORTCSupported||p(function(t){e(t.match(/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/)?"Local: "+t:"Public: "+t)}))}function p(e){function t(t){var i=/([0-9]{1,3}(\.[0-9]{1,3}){3})/,r=i.exec(t);if(!r)return void console.warn("Could not match IP address in",t);var a=r[1];void 0===n[a]&&e(a),n[a]=!0}var n={},i=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection,r=!!window.webkitRTCPeerConnection;if(!i){var a=document.getElementById("iframe");if(!a)throw"NOTE: you need to have an iframe in the page right above the script tag.";var o=a.contentWindow;i=o.RTCPeerConnection||o.mozRTCPeerConnection||o.webkitRTCPeerConnection,r=!!o.webkitRTCPeerConnection}if(i){var s,l={optional:[{RtpDataChannels:!0}]};r&&(s={iceServers:[{urls:"stun:stun.services.mozilla.com"}]},"undefined"!=typeof V&&V.browser.isFirefox&&V.browser.version<=38&&(s[0]={url:s[0].urls}));var u=new i(s,l);u.onicecandidate=function(e){e.candidate&&t(e.candidate.candidate)},u.createDataChannel(""),u.createOffer(function(e){u.setLocalDescription(e,function(){},function(){})},function(){}),setTimeout(function(){var e=u.localDescription.sdp.split("\n");e.forEach(function(e){0===e.indexOf("a=candidate:")&&t(e)})},1e3)}}function _(e){if(!U)return void(e&&e());if(!y.enumerateDevices&&window.MediaStreamTrack&&window.MediaStreamTrack.getSources&&(y.enumerateDevices=window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack)),!y.enumerateDevices&&y.enumerateDevices&&(y.enumerateDevices=y.enumerateDevices.bind(y)),!y.enumerateDevices)return void(e&&e());L=[],N=[],M=[],x=[],j=!1,G=!1;var t={};y.enumerateDevices(function(n){n.forEach(function(e){var n={};for(var i in e)try{"function"!=typeof e[i]&&(n[i]=e[i])}catch(e){}t[n.deviceId]||("audio"===n.kind&&(n.kind="audioinput"),"video"===n.kind&&(n.kind="videoinput"),n.deviceId||(n.deviceId=n.id),n.id||(n.id=n.deviceId),n.label?("videoinput"!==n.kind||G||(G=!0),"audioinput"!==n.kind||j||(j=!0)):(n.label="Please invoke getUserMedia once.","https:"!==location.protocol&&document.domain.search&&document.domain.search(/localhost|127.0./g)===-1&&(n.label="HTTPs is required to get label of this "+n.kind+" device.")),"audioinput"===n.kind&&(H=!0,N.indexOf(n)===-1&&N.push(n)),"audiooutput"===n.kind&&(B=!0,M.indexOf(n)===-1&&M.push(n)),"videoinput"===n.kind&&(F=!0,x.indexOf(n)===-1&&x.push(n)),L.push(n),t[n.deviceId]=n)}),"undefined"!=typeof V&&(V.MediaDevices=L,V.hasMicrophone=H,V.hasSpeakers=B,V.hasWebcam=F,V.isWebsiteHasWebcamPermissions=G,V.isWebsiteHasMicrophonePermissions=j,V.audioInputDevices=N,V.audioOutputDevices=M,V.videoInputDevices=x),e&&e()})}var g="Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45",m="object"==("undefined"==typeof i?"undefined":n(i))&&"object"==n(i.versions)&&i.versions.node;if(m){var v=i.versions.node.toString().replace("v","");g="Nodejs/"+v+" (NodeOS) AppleWebKit/"+v+" (KHTML, like Gecko) Nodejs/"+v+" Nodejs/"+v}!function(e){"undefined"==typeof window&&("undefined"==typeof window&&"undefined"!=typeof o?(o.navigator={userAgent:g,getUserMedia:function(){}},e.window=o):"undefined"==typeof window,"undefined"==typeof document&&(e.document={},document.createElement=document.captureStream=document.mozCaptureStream=function(){return{}}),"undefined"==typeof location&&(e.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(e.screen={width:0,height:0}))}("undefined"!=typeof o?o:window);var y=window.navigator;"undefined"!=typeof y?("undefined"!=typeof y.webkitGetUserMedia&&(y.getUserMedia=y.webkitGetUserMedia),"undefined"!=typeof y.mozGetUserMedia&&(y.getUserMedia=y.mozGetUserMedia)):y={getUserMedia:function(){},userAgent:g};var E=!!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(y.userAgent||""),S=!(y.userAgent.indexOf("Edge")===-1||!y.msSaveOrOpenBlob&&!y.msSaveBlob),T=!!window.opera||y.userAgent.indexOf(" OPR/")>=0,C="undefined"!=typeof window.InstallTrigger,R=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,b=!!window.chrome&&!T,w=!!document.documentMode&&!S,A={Android:function(){return y.userAgent.match(/Android/i)},BlackBerry:function(){return y.userAgent.match(/BlackBerry|BB10/i)},iOS:function(){return y.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return y.userAgent.match(/Opera Mini/i)},Windows:function(){return y.userAgent.match(/IEMobile/i)},any:function(){return A.Android()||A.BlackBerry()||A.iOS()||A.Opera()||A.Windows()},getOsName:function(){var e="Unknown OS";return A.Android()&&(e="Android"),A.BlackBerry()&&(e="BlackBerry"),A.iOS()&&(e="iOS"),A.Opera()&&(e="Opera Mini"),A.Windows()&&(e="Windows"),e}},I="Unknown OS",P="Unknown OS Version",O=c();O&&O.osName&&"-"!=O.osName?(I=O.osName,P=O.osVersion):A.any()&&(I=A.getOsName(),"Android"==I&&(P=f()));var m="object"==("undefined"==typeof i?"undefined":n(i))&&"object"==n(i.versions)&&i.versions.node;"Unknown OS"===I&&m&&(I="Nodejs",P=i.versions.node.toString().replace("v",""));var D=!1,k=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach(function(e){!D&&e in document.createElement("canvas")&&(D=!0),!k&&e in document.createElement("video")&&(k=!0)});var L=[],N=[],M=[],x=[];y.mediaDevices&&y.mediaDevices.enumerateDevices&&(y.enumerateDevices=function(e){y.mediaDevices.enumerateDevices().then(e).catch(function(){e([])})});var U=!1;"undefined"!=typeof MediaStreamTrack&&"getSources"in MediaStreamTrack?U=!0:y.mediaDevices&&y.mediaDevices.enumerateDevices&&(U=!0);var H=!1,B=!1,F=!1,j=!1,G=!1;_();var V=window.DetectRTC||{};V.browser=s(),d(function(e){V.browser.isPrivateBrowsing=!!e}),V.browser["is"+V.browser.name]=!0,V.osName=I,V.osVersion=P;var q=("object"==("undefined"==typeof i?"undefined":n(i))&&"object"==n(i.versions)&&i.versions["node-webkit"],!1);["RTCPeerConnection","webkitRTCPeerConnection","mozRTCPeerConnection","RTCIceGatherer"].forEach(function(e){q||e in window&&(q=!0)}),V.isWebRTCSupported=q,V.isORTCSupported="undefined"!=typeof RTCIceGatherer;var W=!1;V.browser.isChrome&&V.browser.version>=35?W=!0:V.browser.isFirefox&&V.browser.version>=34&&(W=!0),"https:"!==location.protocol&&(W=!1),V.isScreenCapturingSupported=W;var Y={isSupported:!1,isCreateMediaStreamSourceSupported:!1};["AudioContext","webkitAudioContext","mozAudioContext","msAudioContext"].forEach(function(e){Y.isSupported||e in window&&(Y.isSupported=!0,window[e]&&"createMediaStreamSource"in window[e].prototype&&(Y.isCreateMediaStreamSourceSupported=!0))}),V.isAudioContextSupported=Y.isSupported,V.isCreateMediaStreamSourceSupported=Y.isCreateMediaStreamSourceSupported;var J=!1;V.browser.isChrome&&V.browser.version>31&&(J=!0),V.isRtpDataChannelsSupported=J;var Q=!1;V.browser.isFirefox&&V.browser.version>28?Q=!0:V.browser.isChrome&&V.browser.version>25?Q=!0:V.browser.isOpera&&V.browser.version>=11&&(Q=!0),V.isSctpDataChannelsSupported=Q,V.isMobileDevice=E;var K=!1;y.getUserMedia?K=!0:y.mediaDevices&&y.mediaDevices.getUserMedia&&(K=!0),V.browser.isChrome&&V.browser.version>=46&&"https:"!==location.protocol&&(K="Requires HTTPs"),"Nodejs"===V.osName&&(K=!1),V.isGetUserMediaSupported=K;var z="";if(screen.width){var X=screen.width?screen.width:"",Z=screen.height?screen.height:"";z+=""+X+" x "+Z}V.displayResolution=z,V.isCanvasSupportsStreamCapturing=D,V.isVideoSupportsStreamCapturing=k,"Chrome"==V.browser.name&&V.browser.version>=53&&(V.isCanvasSupportsStreamCapturing||(V.isCanvasSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features"),V.isVideoSupportsStreamCapturing||(V.isVideoSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features")),V.DetectLocalIPAddress=h,V.isWebSocketsSupported="WebSocket"in window&&2===window.WebSocket.CLOSING,V.isWebSocketsBlocked=!V.isWebSocketsSupported,"Nodejs"===V.osName&&(V.isWebSocketsSupported=!0,V.isWebSocketsBlocked=!1),V.checkWebSocketsSupport=function(e){e=e||function(){};try{var t=new WebSocket("wss://echo.websocket.org:443/");t.onopen=function(){V.isWebSocketsBlocked=!1,e(),t.close(),t=null},t.onerror=function(){V.isWebSocketsBlocked=!0,e()}}catch(t){V.isWebSocketsBlocked=!0,e()}},V.load=function(e){e=e||function(){},_(e)},V.MediaDevices=L,V.hasMicrophone=H,V.hasSpeakers=B,V.hasWebcam=F,V.isWebsiteHasWebcamPermissions=G,V.isWebsiteHasMicrophonePermissions=j,V.audioInputDevices=N,V.audioOutputDevices=M,V.videoInputDevices=x;var $=!1;"setSinkId"in document.createElement("video")&&($=!0),V.isSetSinkIdSupported=$;var ee=!1;V.browser.isFirefox&&"undefined"!=typeof mozRTCPeerConnection?"getSenders"in mozRTCPeerConnection.prototype&&(ee=!0):V.browser.isChrome&&"undefined"!=typeof webkitRTCPeerConnection&&"getSenders"in webkitRTCPeerConnection.prototype&&(ee=!0),V.isRTPSenderReplaceTracksSupported=ee;var te=!1;V.browser.isFirefox&&V.browser.version>38&&(te=!0),V.isRemoteStreamProcessingSupported=te;var ne=!1;"undefined"!=typeof MediaStreamTrack&&"applyConstraints"in MediaStreamTrack.prototype&&(ne=!0),V.isApplyConstraintsSupported=ne;var ie=!1;V.browser.isFirefox&&V.browser.version>=43&&(ie=!0),V.isMultiMonitorScreenCapturingSupported=ie,V.isPromisesSupported=!!("Promise"in window),"undefined"==typeof V&&(window.DetectRTC={});var re=window.MediaStream;"undefined"==typeof re&&"undefined"!=typeof webkitMediaStream&&(re=webkitMediaStream),"undefined"!=typeof re?V.MediaStream=Object.keys(re.prototype):V.MediaStream=!1,"undefined"!=typeof MediaStreamTrack?V.MediaStreamTrack=Object.keys(MediaStreamTrack.prototype):V.MediaStreamTrack=!1;var ae=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;"undefined"!=typeof ae?V.RTCPeerConnection=Object.keys(ae.prototype):V.RTCPeerConnection=!1,window.DetectRTC=V,e.exports=V,r=[],a=function(){return V}.apply(t,r),!(void 0!==a&&(e.exports=a))}()}).call(t,i(15),function(){return this}())},function(e,t,i){var r,r;(function(t){!function(t){e.exports=t()}(function(){return function e(t,n,i){function a(s,l){if(!n[s]){if(!t[s]){var u="function"==typeof r&&r;if(!l&&u)return r(s,!0);if(o)return o(s,!0);var d=new Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return a(n?n:e)},c,c.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof r&&r,s=0;s<i.length;s++)a(i[s]);return a}({1:[function(e,n,i){(function(e){function t(){d=!0;for(var e,t,n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}d=!1}function i(e){1!==c.push(e)||d||r()}var r,a=e.MutationObserver||e.WebKitMutationObserver;if(a){var o=0,s=new a(t),l=e.document.createTextNode("");s.observe(l,{characterData:!0}),r=function(){l.data=o=++o%2}}else if(e.setImmediate||"undefined"==typeof e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var n=e.document.createElement("script");n.onreadystatechange=function(){t(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},e.document.documentElement.appendChild(n)}:function(){setTimeout(t,0)};else{var u=new e.MessageChannel;u.port1.onmessage=t,r=function(){u.port2.postMessage(0)}}var d,c=[];n.exports=i}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,i){function r(){}function a(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=y,this.queue=[],this.outcome=void 0,e!==r&&u(this,e)}function o(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function s(e,t,n){_(function(){var i;try{i=t(n)}catch(t){return g.reject(e,t)}i===e?g.reject(e,new TypeError("Cannot resolve promise with itself")):g.resolve(e,i)})}function l(e){var t=e&&e.then;if(e&&"object"==("undefined"==typeof e?"undefined":n(e))&&"function"==typeof t)return function(){t.apply(e,arguments)}}function u(e,t){function n(t){a||(a=!0,g.reject(e,t))}function i(t){a||(a=!0,g.resolve(e,t))}function r(){t(i,n)}var a=!1,o=d(r);"error"===o.status&&n(o.value)}function d(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}function c(e){return e instanceof this?e:g.resolve(new this(r),e)}function f(e){var t=new this(r);return g.reject(t,e)}function h(e){function t(e,t){function r(e){o[t]=e,++s!==i||a||(a=!0,g.resolve(u,o))}n.resolve(e).then(r,function(e){a||(a=!0,g.reject(u,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,a=!1;if(!i)return this.resolve([]);for(var o=new Array(i),s=0,l=-1,u=new this(r);++l<i;)t(e[l],l);return u}function p(e){function t(e){n.resolve(e).then(function(e){a||(a=!0,g.resolve(s,e))},function(e){a||(a=!0,g.reject(s,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,a=!1;if(!i)return this.resolve([]);for(var o=-1,s=new this(r);++o<i;)t(e[o]);return s}var _=e(1),g={},m=["REJECTED"],v=["FULFILLED"],y=["PENDING"];t.exports=i=a,a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){if("function"!=typeof e&&this.state===v||"function"!=typeof t&&this.state===m)return this;var n=new this.constructor(r);if(this.state!==y){var i=this.state===v?e:t;s(n,i,this.outcome)}else this.queue.push(new o(n,e,t));return n},o.prototype.callFulfilled=function(e){g.resolve(this.promise,e)},o.prototype.otherCallFulfilled=function(e){s(this.promise,this.onFulfilled,e)},o.prototype.callRejected=function(e){g.reject(this.promise,e)},o.prototype.otherCallRejected=function(e){s(this.promise,this.onRejected,e)},g.resolve=function(e,t){var n=d(l,t);if("error"===n.status)return g.reject(e,n.value);var i=n.value;if(i)u(e,i);else{e.state=v,e.outcome=t;for(var r=-1,a=e.queue.length;++r<a;)e.queue[r].callFulfilled(t)}return e},g.reject=function(e,t){e.state=m,e.outcome=t;for(var n=-1,i=e.queue.length;++n<i;)e.queue[n].callRejected(t);return e},i.resolve=c,i.reject=f,i.all=h,i.race=p},{1:1}],3:[function(e,n,i){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,i){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){}}function o(){try{if(!se)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&fetch.toString().indexOf("[native code")!==-1;return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}function s(){return"function"==typeof openDatabase}function l(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&localStorage.setItem}catch(e){return!1}}function u(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(a){if("TypeError"!==a.name)throw a;for(var n="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder,i=new n,r=0;r<e.length;r+=1)i.append(e[r]);return i.getBlob(t.type)}}function d(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function c(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function f(e){for(var t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n),r=0;r<t;r++)i[r]=e.charCodeAt(r);return n}function h(e){return new de(function(t){var n=e.transaction(ce,"readwrite"),i=u([""]);n.objectStore(ce).put(i,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1})}function p(e){return"boolean"==typeof le?de.resolve(le):h(e).then(function(e){return le=e})}function _(e){var t=ue[e.name],n={};n.promise=new de(function(e){n.resolve=e}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function g(e){var t=ue[e.name],n=t.deferredOperations.pop();n&&n.resolve()}function m(e,t){return new de(function(n,i){if(e.db){if(!t)return n(e.db);_(e),e.db.close()}var r=[e.name];t&&r.push(e.version);var a=se.open.apply(se,r);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(ce)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),i(a.error)},a.onsuccess=function(){n(a.result),g(e)}})}function v(e){return m(e,!1)}function y(e){return m(e,!0)}function E(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),i=e.version<e.db.version,r=e.version>e.db.version;if(i&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),r||n){if(n){var a=e.db.version+1;a>e.version&&(e.version=a)}return!0}return!1}function S(e){return new de(function(t,n){var i=new FileReader;i.onerror=n,i.onloadend=function(n){var i=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:i,type:e.type})},i.readAsBinaryString(e)})}function T(e){var t=f(atob(e.data));return u([t],{type:e.type})}function C(e){return e&&e.__local_forage_encoded_blob}function R(e){var t=this,n=t._initReady().then(function(){var e=ue[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return c(n,e,e),n}function b(e){function t(){return de.resolve()}var n=this,i={db:null};if(e)for(var r in e)i[r]=e[r];ue||(ue={});var a=ue[i.name];a||(a={forages:[],db:null,dbReady:null,deferredOperations:[]},ue[i.name]=a),a.forages.push(n),n._initReady||(n._initReady=n.ready,n.ready=R);for(var o=[],s=0;s<a.forages.length;s++){var l=a.forages[s];l!==n&&o.push(l._initReady().catch(t))}var u=a.forages.slice(0);return de.all(o).then(function(){return i.db=a.db,v(i)}).then(function(e){return i.db=e,E(i,n._defaultConfig.version)?y(i):e}).then(function(e){i.db=a.db=e,n._dbInfo=i;for(var t=0;t<u.length;t++){var r=u[t];r!==n&&(r._dbInfo.db=i.db,r._dbInfo.version=i.version)}})}function w(e,t){var n=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var i=new de(function(t,i){n.ready().then(function(){var r=n._dbInfo,a=r.db.transaction(r.storeName,"readonly").objectStore(r.storeName),o=a.get(e);o.onsuccess=function(){var e=o.result;void 0===e&&(e=null),C(e)&&(e=T(e)),t(e)},o.onerror=function(){i(o.error)}}).catch(i)});return d(i,t),i}function A(e,t){var n=this,i=new de(function(t,i){n.ready().then(function(){var r=n._dbInfo,a=r.db.transaction(r.storeName,"readonly").objectStore(r.storeName),o=a.openCursor(),s=1;o.onsuccess=function(){var n=o.result;if(n){var i=n.value;C(i)&&(i=T(i));var r=e(i,n.key,s++);void 0!==r?t(r):n.continue()}else t()},o.onerror=function(){i(o.error)}}).catch(i)});return d(i,t),i}function I(e,t,n){var i=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var r=new de(function(n,r){var a;i.ready().then(function(){return a=i._dbInfo,"[object Blob]"===fe.call(t)?p(a.db).then(function(e){return e?t:S(t)}):t}).then(function(t){var i=a.db.transaction(a.storeName,"readwrite"),o=i.objectStore(a.storeName),s=o.put(t,e);null===t&&(t=void 0),i.oncomplete=function(){void 0===t&&(t=null),n(t)},i.onabort=i.onerror=function(){var e=s.error?s.error:s.transaction.error;r(e)}}).catch(r)});return d(r,n),r}function P(e,t){var n=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var i=new de(function(t,i){n.ready().then(function(){var r=n._dbInfo,a=r.db.transaction(r.storeName,"readwrite"),o=a.objectStore(r.storeName),s=o.delete(e);a.oncomplete=function(){t()},a.onerror=function(){i(s.error)},a.onabort=function(){var e=s.error?s.error:s.transaction.error;i(e)}}).catch(i)});return d(i,t),i}function O(e){var t=this,n=new de(function(e,n){t.ready().then(function(){var i=t._dbInfo,r=i.db.transaction(i.storeName,"readwrite"),a=r.objectStore(i.storeName),o=a.clear();r.oncomplete=function(){e()},r.onabort=r.onerror=function(){var e=o.error?o.error:o.transaction.error;n(e)}}).catch(n)});return d(n,e),n}function D(e){var t=this,n=new de(function(e,n){t.ready().then(function(){var i=t._dbInfo,r=i.db.transaction(i.storeName,"readonly").objectStore(i.storeName),a=r.count();a.onsuccess=function(){e(a.result)},a.onerror=function(){n(a.error)}}).catch(n)});return d(n,e),n}function k(e,t){var n=this,i=new de(function(t,i){return e<0?void t(null):void n.ready().then(function(){var r=n._dbInfo,a=r.db.transaction(r.storeName,"readonly").objectStore(r.storeName),o=!1,s=a.openCursor();s.onsuccess=function(){var n=s.result;return n?void(0===e?t(n.key):o?t(n.key):(o=!0,n.advance(e))):void t(null)},s.onerror=function(){i(s.error)}}).catch(i)});return d(i,t),i}function L(e){var t=this,n=new de(function(e,n){t.ready().then(function(){var i=t._dbInfo,r=i.db.transaction(i.storeName,"readonly").objectStore(i.storeName),a=r.openCursor(),o=[];a.onsuccess=function(){var t=a.result;return t?(o.push(t.key),void t.continue()):void e(o)},a.onerror=function(){n(a.error)}}).catch(n)});return d(n,e),n}function N(e){var t,n,i,r,a,o=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var u=new ArrayBuffer(o),d=new Uint8Array(u);for(t=0;t<s;t+=4)n=pe.indexOf(e[t]),i=pe.indexOf(e[t+1]),r=pe.indexOf(e[t+2]),a=pe.indexOf(e[t+3]),d[l++]=n<<2|i>>4,d[l++]=(15&i)<<4|r>>2,d[l++]=(3&r)<<6|63&a;return u}function M(e){var t,n=new Uint8Array(e),i="";for(t=0;t<n.length;t+=3)i+=pe[n[t]>>2],i+=pe[(3&n[t])<<4|n[t+1]>>4],i+=pe[(15&n[t+1])<<2|n[t+2]>>6],i+=pe[63&n[t+2]];return n.length%3===2?i=i.substring(0,i.length-1)+"=":n.length%3===1&&(i=i.substring(0,i.length-2)+"=="),i}function x(e,t){var n="";if(e&&(n=De.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===De.call(e.buffer))){var i,r=me;e instanceof ArrayBuffer?(i=e,r+=ye):(i=e.buffer,"[object Int8Array]"===n?r+=Se:"[object Uint8Array]"===n?r+=Te:"[object Uint8ClampedArray]"===n?r+=Ce:"[object Int16Array]"===n?r+=Re:"[object Uint16Array]"===n?r+=we:"[object Int32Array]"===n?r+=be:"[object Uint32Array]"===n?r+=Ae:"[object Float32Array]"===n?r+=Ie:"[object Float64Array]"===n?r+=Pe:t(new Error("Failed to get type for BinaryArray"))),t(r+M(i))}else if("[object Blob]"===n){var a=new FileReader;a.onload=function(){var n=_e+e.type+"~"+M(this.result);t(me+Ee+n)},a.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}}function U(e){if(e.substring(0,ve)!==me)return JSON.parse(e);var t,n=e.substring(Oe),i=e.substring(ve,Oe);if(i===Ee&&ge.test(n)){var r=n.match(ge);t=r[1],n=n.substring(r[0].length)}var a=N(n);switch(i){case ye:return a;case Ee:return u([a],{type:t});case Se:return new Int8Array(a);case Te:return new Uint8Array(a);case Ce:return new Uint8ClampedArray(a);case Re:return new Int16Array(a);case we:return new Uint16Array(a);case be:return new Int32Array(a);case Ae:return new Uint32Array(a);case Ie:return new Float32Array(a);case Pe:return new Float64Array(a);default:throw new Error("Unkown type: "+i)}}function H(e){var t=this,n={db:null};if(e)for(var i in e)n[i]="string"!=typeof e[i]?e[i].toString():e[i];var r=new de(function(e,i){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return i(e)}n.db.transaction(function(r){r.executeSql("CREATE TABLE IF NOT EXISTS "+n.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){t._dbInfo=n,e()},function(e,t){i(t)})})});return n.serializer=ke,r}function B(e,t){var n=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var i=new de(function(t,i){n.ready().then(function(){var r=n._dbInfo;r.db.transaction(function(n){n.executeSql("SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[e],function(e,n){var i=n.rows.length?n.rows.item(0).value:null;i&&(i=r.serializer.deserialize(i)),t(i)},function(e,t){i(t)})})}).catch(i)});return d(i,t),i}function F(e,t){var n=this,i=new de(function(t,i){n.ready().then(function(){var r=n._dbInfo;r.db.transaction(function(n){n.executeSql("SELECT * FROM "+r.storeName,[],function(n,i){for(var a=i.rows,o=a.length,s=0;s<o;s++){var l=a.item(s),u=l.value;if(u&&(u=r.serializer.deserialize(u)),u=e(u,l.key,s+1),void 0!==u)return void t(u)}t()},function(e,t){i(t)})})}).catch(i)});return d(i,t),i}function j(e,t,n,i){var r=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var a=new de(function(a,o){r.ready().then(function(){void 0===t&&(t=null);var s=t,l=r._dbInfo;l.serializer.serialize(t,function(t,u){u?o(u):l.db.transaction(function(n){n.executeSql("INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],function(){a(s)},function(e,t){o(t)})},function(t){if(t.code===t.QUOTA_ERR){if(i>0)return void a(j.apply(r,[e,s,n,i-1]));o(t)}})})}).catch(o)});return d(a,n),a}function G(e,t,n){return j.apply(this,[e,t,n,1])}function V(e,t){var n=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var i=new de(function(t,i){n.ready().then(function(){var r=n._dbInfo;r.db.transaction(function(n){n.executeSql("DELETE FROM "+r.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){i(t)})})}).catch(i)});return d(i,t),i}function q(e){var t=this,n=new de(function(e,n){t.ready().then(function(){var i=t._dbInfo;i.db.transaction(function(t){t.executeSql("DELETE FROM "+i.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return d(n,e),n}function W(e){var t=this,n=new de(function(e,n){t.ready().then(function(){var i=t._dbInfo;i.db.transaction(function(t){t.executeSql("SELECT COUNT(key) as c FROM "+i.storeName,[],function(t,n){var i=n.rows.item(0).c;e(i)},function(e,t){n(t)})})}).catch(n)});return d(n,e),n}function Y(e,t){var n=this,i=new de(function(t,i){n.ready().then(function(){var r=n._dbInfo;r.db.transaction(function(n){n.executeSql("SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var i=n.rows.length?n.rows.item(0).key:null;t(i)},function(e,t){i(t)})})}).catch(i)});return d(i,t),i}function J(e){var t=this,n=new de(function(e,n){t.ready().then(function(){var i=t._dbInfo;i.db.transaction(function(t){t.executeSql("SELECT key FROM "+i.storeName,[],function(t,n){for(var i=[],r=0;r<n.rows.length;r++)i.push(n.rows.item(r).key);e(i)},function(e,t){n(t)})})}).catch(n)});return d(n,e),n}function Q(e){var t=this,n={};if(e)for(var i in e)n[i]=e[i];return n.keyPrefix=n.name+"/",n.storeName!==t._defaultConfig.storeName&&(n.keyPrefix+=n.storeName+"/"),t._dbInfo=n,n.serializer=ke,de.resolve()}function K(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var i=localStorage.key(n);0===i.indexOf(e)&&localStorage.removeItem(i)}});return d(n,e),n}function z(e,t){var n=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var i=n.ready().then(function(){var t=n._dbInfo,i=localStorage.getItem(t.keyPrefix+e);return i&&(i=t.serializer.deserialize(i)),i});return d(i,t),i}function X(e,t){var n=this,i=n.ready().then(function(){for(var t=n._dbInfo,i=t.keyPrefix,r=i.length,a=localStorage.length,o=1,s=0;s<a;s++){var l=localStorage.key(s);if(0===l.indexOf(i)){var u=localStorage.getItem(l);if(u&&(u=t.serializer.deserialize(u)),u=e(u,l.substring(r),o++),void 0!==u)return u}}});return d(i,t),i}function Z(e,t){var n=this,i=n.ready().then(function(){var t,i=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(i.keyPrefix.length)),t});return d(i,t),i}function $(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,i=[],r=0;r<n;r++)0===localStorage.key(r).indexOf(e.keyPrefix)&&i.push(localStorage.key(r).substring(e.keyPrefix.length));return i});return d(n,e),n}function ee(e){var t=this,n=t.keys().then(function(e){return e.length});return d(n,e),n}function te(e,t){var n=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var i=n.ready().then(function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return d(i,t),i}function ne(e,t,n){var i=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),
e=String(e));var r=i.ready().then(function(){void 0===t&&(t=null);var n=t;return new de(function(r,a){var o=i._dbInfo;o.serializer.serialize(t,function(t,i){if(i)a(i);else try{localStorage.setItem(o.keyPrefix+e,t),r(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||a(e),a(e)}})})});return d(r,n),r}function ie(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}function re(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(je(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}function ae(e){for(var t in xe)if(xe.hasOwnProperty(t)&&xe[t]===e)return!0;return!1}var oe="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":n(e)},se=a();"undefined"==typeof Promise&&e(3);var le,ue,de=Promise,ce="local-forage-detect-blob-support",fe=Object.prototype.toString,he={_driver:"asyncStorage",_initStorage:b,iterate:A,getItem:w,setItem:I,removeItem:P,clear:O,length:D,key:k,keys:L},pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_e="~~local_forage_type~",ge=/^~~local_forage_type~([^~]+)~/,me="__lfsc__:",ve=me.length,ye="arbf",Ee="blob",Se="si08",Te="ui08",Ce="uic8",Re="si16",be="si32",we="ur16",Ae="ui32",Ie="fl32",Pe="fl64",Oe=ve+ye.length,De=Object.prototype.toString,ke={serialize:x,deserialize:U,stringToBuffer:N,bufferToString:M},Le={_driver:"webSQLStorage",_initStorage:H,iterate:F,getItem:B,setItem:G,removeItem:V,clear:q,length:W,key:Y,keys:J},Ne={_driver:"localStorageWrapper",_initStorage:Q,iterate:X,getItem:z,setItem:ne,removeItem:te,clear:K,length:ee,key:Z,keys:$},Me={},xe={INDEXEDDB:"asyncStorage",LOCALSTORAGE:"localStorageWrapper",WEBSQL:"webSQLStorage"},Ue=[xe.INDEXEDDB,xe.WEBSQL,xe.LOCALSTORAGE],He=["clear","getItem","iterate","key","keys","length","removeItem","setItem"],Be={description:"",driver:Ue.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},Fe={};Fe[xe.INDEXEDDB]=o(),Fe[xe.WEBSQL]=s(),Fe[xe.LOCALSTORAGE]=l();var je=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Ge=function(){function e(t){r(this,e),this.INDEXEDDB=xe.INDEXEDDB,this.LOCALSTORAGE=xe.LOCALSTORAGE,this.WEBSQL=xe.WEBSQL,this._defaultConfig=re({},Be),this._config=re({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if("object"===("undefined"==typeof e?"undefined":oe(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e&&e.driver)||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var i=new de(function(t,n){try{var i=e._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),a=new Error("Custom driver name already in use: "+e._driver);if(!e._driver)return void n(r);if(ae(e._driver))return void n(a);for(var o=He.concat("_initStorage"),s=0;s<o.length;s++){var l=o[s];if(!l||!e[l]||"function"!=typeof e[l])return void n(r)}var u=de.resolve(!0);"_support"in e&&(u=e._support&&"function"==typeof e._support?e._support():de.resolve(!!e._support)),u.then(function(n){Fe[i]=n,Me[i]=e,t()},n)}catch(e){n(e)}});return c(i,t,n),i},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var i=this,r=de.resolve().then(function(){if(!ae(e)){if(Me[e])return Me[e];throw new Error("Driver not found.")}switch(e){case i.INDEXEDDB:return he;case i.LOCALSTORAGE:return Ne;case i.WEBSQL:return Le}});return c(r,t,n),r},e.prototype.getSerializer=function(e){var t=de.resolve(ke);return c(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return c(n,e,e),n},e.prototype.setDriver=function(e,t,n){function i(){o._config.driver=o.driver()}function r(e){return o._extend(e),i(),o._ready=o._initStorage(o._config),o._ready}function a(e){return function(){function t(){for(;n<e.length;){var a=e[n];return n++,o._dbInfo=null,o._ready=null,o.getDriver(a).then(r).catch(t)}i();var s=new Error("No available storage method found.");return o._driverSet=de.reject(s),o._driverSet}var n=0;return t()}}var o=this;je(e)||(e=[e]);var s=this._getSupportedDrivers(e),l=null!==this._driverSet?this._driverSet.catch(function(){return de.resolve()}):de.resolve();return this._driverSet=l.then(function(){var e=s[0];return o._dbInfo=null,o._ready=null,o.getDriver(e).then(function(e){o._driver=e._driver,i(),o._wrapLibraryMethodsWithReady(),o._initDriver=a(s)})}).catch(function(){i();var e=new Error("No available storage method found.");return o._driverSet=de.reject(e),o._driverSet}),c(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!Fe[e]},e.prototype._extend=function(e){re(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var r=e[n];this.supports(r)&&t.push(r)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0;e<He.length;e++)ie(this,He[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),Ve=new Ge;t.exports=Ve},{3:3}]},{},[4])(4)})}).call(t,function(){return this}())},function(e,t){var n={};n.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},n.localCName=n.generateIdentifier(),n.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},n.splitSections=function(e){var t=e.split("\nm=");return t.map(function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"})},n.matchPrefix=function(e,t){return n.splitLines(e).filter(function(e){return 0===e.indexOf(t)})},n.parseCandidate=function(e){var t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");for(var n={foundation:t[0],component:t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],port:parseInt(t[5],10),type:t[7]},i=8;i<t.length;i+=2)switch(t[i]){case"raddr":n.relatedAddress=t[i+1];break;case"rport":n.relatedPort=parseInt(t[i+1],10);break;case"tcptype":n.tcpType=t[i+1];break;default:n[t[i]]=t[i+1]}return n},n.writeCandidate=function(e){var t=[];t.push(e.foundation),t.push(e.component),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.ip),t.push(e.port);var n=e.type;return t.push("typ"),t.push(n),"host"!==n&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),"candidate:"+t.join(" ")},n.parseIceOptions=function(e){return e.substr(14).split(" ")},n.parseRtpMap=function(e){var t=e.substr(9).split(" "),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.numChannels=3===t.length?parseInt(t[2],10):1,n},n.writeRtpMap=function(e){var t=e.payloadType;return void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType),"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==e.numChannels?"/"+e.numChannels:"")+"\r\n"},n.parseExtmap=function(e){var t=e.substr(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},n.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},n.parseFmtp=function(e){for(var t,n={},i=e.substr(e.indexOf(" ")+1).split(";"),r=0;r<i.length;r++)t=i[r].trim().split("="),n[t[0].trim()]=t[1];return n},n.writeFmtp=function(e){var t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){var i=[];Object.keys(e.parameters).forEach(function(t){i.push(t+"="+e.parameters[t])}),t+="a=fmtp:"+n+" "+i.join(";")+"\r\n"}return t},n.parseRtcpFb=function(e){var t=e.substr(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},n.writeRtcpFb=function(e){var t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(function(e){t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},n.parseSsrcMedia=function(e){var t=e.indexOf(" "),n={ssrc:parseInt(e.substr(7,t-7),10)},i=e.indexOf(":",t);return i>-1?(n.attribute=e.substr(t+1,i-t-1),n.value=e.substr(i+1)):n.attribute=e.substr(t+1),n},n.getMid=function(e){var t=n.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)},n.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},n.getDtlsParameters=function(e,t){var i=n.matchPrefix(e+t,"a=fingerprint:");return{role:"auto",fingerprints:i.map(n.parseFingerprint)}},n.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},n.getIceParameters=function(e,t){var i=n.splitLines(e);i=i.concat(n.splitLines(t));var r={usernameFragment:i.filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:i.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)};return r},n.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},n.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},i=n.splitLines(e),r=i[0].split(" "),a=3;a<r.length;a++){var o=r[a],s=n.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(s){var l=n.parseRtpMap(s),u=n.matchPrefix(e,"a=fmtp:"+o+" ");switch(l.parameters=u.length?n.parseFmtp(u[0]):{},l.rtcpFeedback=n.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(n.parseRtcpFb),t.codecs.push(l),l.name.toUpperCase()){case"RED":case"ULPFEC":t.fecMechanisms.push(l.name.toUpperCase())}}}return n.matchPrefix(e,"a=extmap:").forEach(function(e){t.headerExtensions.push(n.parseExtmap(e))}),t},n.writeRtpDescription=function(e,t){var i="";i+="m="+e+" ",i+=t.codecs.length>0?"9":"0",i+=" UDP/TLS/RTP/SAVPF ",i+=t.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",i+="c=IN IP4 0.0.0.0\r\n",i+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(function(e){i+=n.writeRtpMap(e),i+=n.writeFmtp(e),i+=n.writeRtcpFb(e)});var r=0;return t.codecs.forEach(function(e){e.maxptime>r&&(r=e.maxptime)}),r>0&&(i+="a=maxptime:"+r+"\r\n"),i+="a=rtcp-mux\r\n",t.headerExtensions.forEach(function(e){i+=n.writeExtmap(e)}),i},n.parseRtpEncodingParameters=function(e){var t,i=[],r=n.parseRtpParameters(e),a=r.fecMechanisms.indexOf("RED")!==-1,o=r.fecMechanisms.indexOf("ULPFEC")!==-1,s=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),l=s.length>0&&s[0].ssrc,u=n.matchPrefix(e,"a=ssrc-group:FID").map(function(e){var t=e.split(" ");return t.shift(),t.map(function(e){return parseInt(e,10)})});u.length>0&&u[0].length>1&&u[0][0]===l&&(t=u[0][1]),r.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var n={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10),rtx:{ssrc:t}};i.push(n),a&&(n=JSON.parse(JSON.stringify(n)),n.fec={ssrc:t,mechanism:o?"red+ulpfec":"red"},i.push(n))}}),0===i.length&&l&&i.push({ssrc:l});var d=n.matchPrefix(e,"b=");return d.length&&(0===d[0].indexOf("b=TIAS:")?d=parseInt(d[0].substr(7),10):0===d[0].indexOf("b=AS:")&&(d=parseInt(d[0].substr(5),10)),i.forEach(function(e){e.maxBitrate=d})),i},n.parseRtcpParameters=function(e){var t={},i=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];i&&(t.cname=i.value,t.ssrc=i.ssrc);var r=n.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=r.length>0,t.compound=0===r.length;var a=n.matchPrefix(e,"a=rtcp-mux");return t.mux=a.length>0,t},n.parseMsid=function(e){var t,i=n.matchPrefix(e,"a=msid:");if(1===i.length)return t=i[0].substr(7).split(" "),{stream:t[0],track:t[1]};var r=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});return r.length>0?(t=r[0].value.split(" "),{stream:t[0],track:t[1]}):void 0},n.writeSessionBoilerplate=function(){return"v=0\r\no=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},n.writeMediaSection=function(e,t,i,r){var a=n.writeRtpDescription(e.kind,t);if(a+=n.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=n.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===i?"actpass":"active"),a+="a=mid:"+e.mid+"\r\n",a+=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 o="msid:"+r.id+" "+e.rtpSender.track.id+"\r\n";a+="a="+o,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+o,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+o,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+n.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+n.localCName+"\r\n"),a},n.getDirection=function(e,t){for(var i=n.splitLines(e),r=0;r<i.length;r++)switch(i[r]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return i[r].substr(2)}return t?n.getDirection(t):"sendrecv"},n.getKind=function(e){var t=n.splitLines(e),i=t[0].split(" ");return i[0].substr(2)},n.isRejected=function(e){return"0"===e.split(" ",2)[1]},e.exports=n},function(e,t,n){!function(){var t=n(1),i=t.log,r=t.browserDetails;e.exports.browserDetails=r,e.exports.extractVersion=t.extractVersion,e.exports.disableLog=t.disableLog;var a=n(7)||null,o=n(9)||null,s=n(12)||null,l=n(14)||null;switch(r.browser){case"chrome":if(!a||!a.shimPeerConnection)return void i("Chrome shim is not included in this adapter release.");i("adapter.js shimming chrome."),e.exports.browserShim=a,a.shimGetUserMedia(),a.shimMediaStream(),t.shimCreateObjectURL(),a.shimSourceObject(),a.shimPeerConnection(),a.shimOnTrack(),a.shimGetSendersWithDtmf();break;case"firefox":if(!s||!s.shimPeerConnection)return void i("Firefox shim is not included in this adapter release.");i("adapter.js shimming firefox."),e.exports.browserShim=s,s.shimGetUserMedia(),t.shimCreateObjectURL(),s.shimSourceObject(),s.shimPeerConnection(),s.shimOnTrack();break;case"edge":if(!o||!o.shimPeerConnection)return void i("MS edge shim is not included in this adapter release.");i("adapter.js shimming edge."),e.exports.browserShim=o,o.shimGetUserMedia(),t.shimCreateObjectURL(),o.shimPeerConnection(),o.shimReplaceTrack();break;case"safari":if(!l)return void i("Safari shim is not included in this adapter release.");i("adapter.js shimming safari."),e.exports.browserShim=l,l.shimCallbacksAPI(),l.shimAddStream(),l.shimOnAddStream(),l.shimGetUserMedia();break;default:i("Unsupported browser!")}}()},function(e,t,i){var r=i(1).log,a=i(1).browserDetails,o={shimMediaStream:function(){window.MediaStream=window.MediaStream||window.webkitMediaStream},shimOnTrack:function(){"object"!=("undefined"==typeof window?"undefined":n(window))||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){var t=this;this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.addEventListener("addtrack",function(n){var i;i=RTCPeerConnection.prototype.getReceivers?t.getReceivers().find(function(e){return e.track.id===n.track.id}):{track:n.track};var r=new Event("track");r.track=n.track,r.receiver=i,r.streams=[e.stream],t.dispatchEvent(r)}),e.stream.getTracks().forEach(function(n){var i;i=RTCPeerConnection.prototype.getReceivers?t.getReceivers().find(function(e){return e.track.id===n.id}):{track:n};var r=new Event("track");r.track=n,r.receiver=i,r.streams=[e.stream],this.dispatchEvent(r)}.bind(this))}.bind(this))}})},shimGetSendersWithDtmf:function(){if("object"==("undefined"==typeof window?"undefined":n(window))&&window.RTCPeerConnection&&!("getSenders"in RTCPeerConnection.prototype)&&"createDTMFSender"in RTCPeerConnection.prototype){RTCPeerConnection.prototype.getSenders=function(){return this._senders||[]};var e=RTCPeerConnection.prototype.addStream,t=RTCPeerConnection.prototype.removeStream;RTCPeerConnection.prototype.addTrack||(RTCPeerConnection.prototype.addTrack=function(e,t){var n=this;if("closed"===n.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(t){return t===e}))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");n._senders=n._senders||[];var r=n._senders.find(function(t){return t.track===e});if(r)throw new DOMException("Track already exists.","InvalidAccessError");n._streams=n._streams||{};var a=n._streams[t.id];if(a)a.addTrack(e),n.removeStream(a),n.addStream(a);else{var o=new MediaStream([e]);n._streams[t.id]=o,n.addStream(o)}var s={track:e,get dtmf(){return void 0===this._dtmf&&("audio"===e.kind?this._dtmf=n.createDTMFSender(e):this._dtmf=null),this._dtmf}};return n._senders.push(s),s}),RTCPeerConnection.prototype.addStream=function(t){var n=this;n._senders=n._senders||[],e.apply(n,[t]),t.getTracks().forEach(function(e){n._senders.push({track:e,get dtmf(){return void 0===this._dtmf&&("audio"===e.kind?this._dtmf=n.createDTMFSender(e):this._dtmf=null),this._dtmf}})})},RTCPeerConnection.prototype.removeStream=function(e){var n=this;n._senders=n._senders||[],t.apply(n,[e]),e.getTracks().forEach(function(e){var t=n._senders.find(function(t){return t.track===e});t&&n._senders.splice(n._senders.indexOf(t),1)})}}},shimSourceObject:function(){"object"==("undefined"==typeof window?"undefined":n(window))&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this._srcObject},set:function(e){var t=this;return this._srcObject=e,this.src&&URL.revokeObjectURL(this.src),e?(this.src=URL.createObjectURL(e),e.addEventListener("addtrack",function(){t.src&&URL.revokeObjectURL(t.src),t.src=URL.createObjectURL(e)}),void e.addEventListener("removetrack",function(){t.src&&URL.revokeObjectURL(t.src),t.src=URL.createObjectURL(e)})):void(this.src="")}}))},shimPeerConnection:function(){if(window.RTCPeerConnection){var e=RTCPeerConnection;window.RTCPeerConnection=function(t,n){if(t&&t.iceServers){for(var i=[],r=0;r<t.iceServers.length;r++){var a=t.iceServers[r];!a.hasOwnProperty("urls")&&a.hasOwnProperty("url")?(console.warn("RTCIceServer.url is deprecated! Use urls instead."),a=JSON.parse(JSON.stringify(a)),a.urls=a.url,i.push(a)):i.push(t.iceServers[r])}t.iceServers=i}return new e(t,n)},window.RTCPeerConnection.prototype=e.prototype,Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return e.generateCertificate}})}else window.RTCPeerConnection=function(e,t){return r("PeerConnection"),e&&e.iceTransportPolicy&&(e.iceTransports=e.iceTransportPolicy),new webkitRTCPeerConnection(e,t)},window.RTCPeerConnection.prototype=webkitRTCPeerConnection.prototype,webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return webkitRTCPeerConnection.generateCertificate}});var t=RTCPeerConnection.prototype.getStats;RTCPeerConnection.prototype.getStats=function(e,n,i){var r=this,a=arguments;if(arguments.length>0&&"function"==typeof e)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof arguments[0]))return t.apply(this,[]);var o=function(e){var t={},n=e.result();return n.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},s=function(e){return new Map(Object.keys(e).map(function(t){return[t,e[t]]}))};if(arguments.length>=2){var l=function(e){a[1](s(o(e)))};return t.apply(this,[l,arguments[0]])}return new Promise(function(e,n){t.apply(r,[function(t){e(s(o(t)))},n])}).then(n,i)},a.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=RTCPeerConnection.prototype[e];RTCPeerConnection.prototype[e]=function(){var e=arguments,n=this,i=new Promise(function(i,r){t.apply(n,[e[0],i,r])});return e.length<2?i:i.then(function(){e[1].apply(null,[])},function(t){e.length>=3&&e[2].apply(null,[t])})}}),a.version<52&&["createOffer","createAnswer"].forEach(function(e){var t=RTCPeerConnection.prototype[e];RTCPeerConnection.prototype[e]=function(){var e=this;if(arguments.length<1||1===arguments.length&&"object"==n(arguments[0])){var i=1===arguments.length?arguments[0]:void 0;return new Promise(function(n,r){t.apply(e,[n,r,i])})}return t.apply(this,arguments)}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=RTCPeerConnection.prototype[e];RTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?RTCIceCandidate:RTCSessionDescription)(arguments[0]),t.apply(this,arguments)}});var i=RTCPeerConnection.prototype.addIceCandidate;RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?i.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}};e.exports={shimMediaStream:o.shimMediaStream,shimOnTrack:o.shimOnTrack,shimGetSendersWithDtmf:o.shimGetSendersWithDtmf,shimSourceObject:o.shimSourceObject,shimPeerConnection:o.shimPeerConnection,shimGetUserMedia:i(8)}},function(e,t,i){var r=i(1).log,a=i(1).browserDetails;e.exports=function(){var e=function(e){if("object"!=("undefined"==typeof e?"undefined":n(e))||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach(function(i){if("require"!==i&&"advanced"!==i&&"mediaSource"!==i){var r="object"==n(e[i])?e[i]:{ideal:e[i]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var a=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 o={};"number"==typeof r.ideal?(o[a("min",i)]=r.ideal,t.optional.push(o),o={},o[a("max",i)]=r.ideal,t.optional.push(o)):(o[a("",i)]=r.ideal,t.optional.push(o))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[a("",i)]=r.exact):["min","max"].forEach(function(e){void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[a(e,i)]=r[e])})}}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},t=function(t,i){if(t=JSON.parse(JSON.stringify(t)),t&&t.audio&&(t.audio=e(t.audio)),t&&"object"==n(t.video)){var o=t.video.facingMode;o=o&&("object"==("undefined"==typeof o?"undefined":n(o))?o:{ideal:o});var s=a.version<61;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!navigator.mediaDevices.getSupportedConstraints||!navigator.mediaDevices.getSupportedConstraints().facingMode||s)){delete t.video.facingMode;var l;if("environment"===o.exact||"environment"===o.ideal?l=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(l=["front"]),l)return navigator.mediaDevices.enumerateDevices().then(function(n){n=n.filter(function(e){return"videoinput"===e.kind});var a=n.find(function(e){return l.some(function(t){return e.label.toLowerCase().indexOf(t)!==-1})});return!a&&n.length&&l.indexOf("back")!==-1&&(a=n[n.length-1]),a&&(t.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),t.video=e(t.video),r("chrome: "+JSON.stringify(t)),i(t)})}t.video=e(t.video)}return r("chrome: "+JSON.stringify(t)),i(t)},i=function(e){return{name:{ConstraintNotSatisfiedError:"OverconstrainedError",PermissionDeniedError:"NotAllowedError",TrackStartError:"NotReadableError"}[e.name]||e.name,message:e.message,constraint:e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},o=function(e,n,r){t(e,function(e){navigator.webkitGetUserMedia(e,n,function(e){r(i(e))})})};navigator.getUserMedia=o;var s=function(e){return new Promise(function(t,n){navigator.getUserMedia(e,t,n)})};if(navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:s,enumerateDevices:function(){return new Promise(function(e){var t={audio:"audioinput",video:"videoinput"};return MediaStreamTrack.getSources(function(n){e(n.map(function(e){return{label:e.label,kind:t[e.kind],deviceId:e.id,groupId:""}}))})})},getSupportedConstraints:function(){return{deviceId:!0,echoCancellation:!0,facingMode:!0,frameRate:!0,height:!0,width:!0}}}),navigator.mediaDevices.getUserMedia){var l=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(e){return t(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(i(e))})})}}else navigator.mediaDevices.getUserMedia=function(e){return s(e)};"undefined"==typeof navigator.mediaDevices.addEventListener&&(navigator.mediaDevices.addEventListener=function(){r("Dummy mediaDevices.addEventListener called.")}),"undefined"==typeof navigator.mediaDevices.removeEventListener&&(navigator.mediaDevices.removeEventListener=function(){r("Dummy mediaDevices.removeEventListener called.")})}},function(e,t,n){var i=n(1).browserDetails,r=n(11);e.exports={shimGetUserMedia:n(10),shimPeerConnection:function(){if(window.RTCIceGatherer&&(window.RTCIceCandidate||(window.RTCIceCandidate=function(e){return e}),window.RTCSessionDescription||(window.RTCSessionDescription=function(e){return e}),i.version<15025)){var e=Object.getOwnPropertyDescriptor(MediaStreamTrack.prototype,"enabled");Object.defineProperty(MediaStreamTrack.prototype,"enabled",{set:function(t){e.set.call(this,t);var n=new Event("enabled");n.enabled=t,this.dispatchEvent(n)}})}window.RTCPeerConnection=r(i.version)},shimReplaceTrack:function(){!window.RTCRtpSender||"replaceTrack"in RTCRtpSender.prototype||(RTCRtpSender.prototype.replaceTrack=RTCRtpSender.prototype.setTrack)}}},function(e,t){e.exports=function(){var e=function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString:function(){return this.name}}},t=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(n){return t(n).catch(function(t){return Promise.reject(e(t))})}}},function(e,t,n){function i(e){var t=e.filter(function(e){return"audio"===e.kind}),n=e.filter(function(e){return"video"===e.kind});for(e=[];t.length||n.length;)t.length&&e.push(t.shift()),n.length&&e.push(n.shift());return e}function r(e,t){var n=!1;return e=JSON.parse(JSON.stringify(e)),e.filter(function(e){if(e&&(e.urls||e.url)){var i=e.urls||e.url;e.url&&!e.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var r="string"==typeof i;return r&&(i=[i]),i=i.filter(function(e){var i=0===e.indexOf("turn:")&&e.indexOf("transport=udp")!==-1&&e.indexOf("turn:[")===-1&&!n;return i?(n=!0,!0):0===e.indexOf("stun:")&&t>=14393}),delete e.url,e.urls=r?i[0]:i,!!i.length}return!1})}function a(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]},i=function(e,t){e=parseInt(e,10);for(var n=0;n<t.length;n++)if(t[n].payloadType===e||t[n].preferredPayloadType===e)return t[n]},r=function(e,t,n,r){var a=i(e.parameters.apt,n),o=i(t.parameters.apt,r);return a&&o&&a.name.toLowerCase()===o.name.toLowerCase()};return e.codecs.forEach(function(i){for(var a=0;a<t.codecs.length;a++){var o=t.codecs[a];if(i.name.toLowerCase()===o.name.toLowerCase()&&i.clockRate===o.clockRate){if("rtx"===i.name.toLowerCase()&&i.parameters&&o.parameters.apt&&!r(i,o,e.codecs,t.codecs))continue;o=JSON.parse(JSON.stringify(o)),o.numChannels=Math.min(i.numChannels,o.numChannels),n.codecs.push(o),o.rtcpFeedback=o.rtcpFeedback.filter(function(e){for(var t=0;t<i.rtcpFeedback.length;t++)if(i.rtcpFeedback[t].type===e.type&&i.rtcpFeedback[t].parameter===e.parameter)return!0;return!1});break}}}),e.headerExtensions.forEach(function(e){for(var i=0;i<t.headerExtensions.length;i++){var r=t.headerExtensions[i];if(e.uri===r.uri){n.headerExtensions.push(r);break}}}),n}function o(e,t,n){return{offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[t][e].indexOf(n)!==-1}var s=n(5);e.exports=function(e){var t=function(t){var n=this,i=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){n[e]=i[e].bind(i)}),this.needNegotiation=!1,this.onicecandidate=null,this.onaddstream=null,this.ontrack=null,this.onremovestream=null,this.onsignalingstatechange=null,this.oniceconnectionstatechange=null,this.onicegatheringstatechange=null,this.onnegotiationneeded=null,this.ondatachannel=null,this.canTrickleIceCandidates=null,this.localStreams=[],this.remoteStreams=[],this.getLocalStreams=function(){return n.localStreams},this.getRemoteStreams=function(){return n.remoteStreams},this.localDescription=new RTCSessionDescription({type:"",sdp:""}),this.remoteDescription=new RTCSessionDescription({type:"",sdp:""}),this.signalingState="stable",this.iceConnectionState="new",this.iceGatheringState="new",this.iceOptions={gatherPolicy:"all",iceServers:[]},t&&t.iceTransportPolicy)switch(t.iceTransportPolicy){case"all":case"relay":this.iceOptions.gatherPolicy=t.iceTransportPolicy}this.usingBundle=t&&"max-bundle"===t.bundlePolicy,t&&t.iceServers&&(this.iceOptions.iceServers=r(t.iceServers,e)),this._config=t||{},this.transceivers=[],this._localIceCandidatesBuffer=[]};return t.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this.dispatchEvent(e),null!==this.onicegatheringstatechange&&this.onicegatheringstatechange(e)},t.prototype._emitBufferedCandidates=function(){var e=this,t=s.splitSections(e.localDescription.sdp);this._localIceCandidatesBuffer.forEach(function(n){var i=!n.candidate||0===Object.keys(n.candidate).length;if(i)for(var r=1;r<t.length;r++)t[r].indexOf("\r\na=end-of-candidates\r\n")===-1&&(t[r]+="a=end-of-candidates\r\n");else t[n.candidate.sdpMLineIndex+1]+="a="+n.candidate.candidate+"\r\n";if(e.localDescription.sdp=t.join(""),e.dispatchEvent(n),null!==e.onicecandidate&&e.onicecandidate(n),!n.candidate&&"complete"!==e.iceGatheringState){var a=e.transceivers.every(function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state});a&&"complete"!==e.iceGatheringStateChange&&(e.iceGatheringState="complete",e._emitGatheringStateChange())}}),this._localIceCandidatesBuffer=[]},t.prototype.getConfiguration=function(){return this._config},t.prototype._createTransceiver=function(e){var t=this.transceivers.length>0,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,wantReceive:!0};if(this.usingBundle&&t)n.iceTransport=this.transceivers[0].iceTransport,n.dtlsTransport=this.transceivers[0].dtlsTransport;else{var i=this._createIceAndDtlsTransports();n.iceTransport=i.iceTransport,n.dtlsTransport=i.dtlsTransport}return this.transceivers.push(n),n},t.prototype.addTrack=function(e,t){for(var n,i=0;i<this.transceivers.length;i++)this.transceivers[i].track||this.transceivers[i].kind!==e.kind||(n=this.transceivers[i]);return n||(n=this._createTransceiver(e.kind)),n.track=e,n.stream=t,n.rtpSender=new RTCRtpSender(e,n.dtlsTransport),this._maybeFireNegotiationNeeded(),n.rtpSender},t.prototype.addStream=function(t){var n=this;if(e>=15025)this.localStreams.push(t),t.getTracks().forEach(function(e){n.addTrack(e,t)});else{var i=t.clone();t.getTracks().forEach(function(e,t){var n=i.getTracks()[t];e.addEventListener("enabled",function(e){n.enabled=e.enabled})}),i.getTracks().forEach(function(e){n.addTrack(e,i)}),this.localStreams.push(i)}this._maybeFireNegotiationNeeded()},t.prototype.removeStream=function(e){var t=this.localStreams.indexOf(e);t>-1&&(this.localStreams.splice(t,1),this._maybeFireNegotiationNeeded())},t.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},t.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},t.prototype._createIceGatherer=function(e,t){var n=this,i=new RTCIceGatherer(n.iceOptions);return i.onlocalcandidate=function(r){var a=new Event("icecandidate");a.candidate={sdpMid:e,sdpMLineIndex:t};var o=r.candidate,l=!o||0===Object.keys(o).length;l?void 0===i.state&&(i.state="completed"):(o.component=1,a.candidate.candidate=s.writeCandidate(o));var u=s.splitSections(n.localDescription.sdp);l?u[a.candidate.sdpMLineIndex+1]+="a=end-of-candidates\r\n":u[a.candidate.sdpMLineIndex+1]+="a="+a.candidate.candidate+"\r\n",n.localDescription.sdp=u.join("");var d=n._pendingOffer?n._pendingOffer:n.transceivers,c=d.every(function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state});switch(n.iceGatheringState){case"new":l||n._localIceCandidatesBuffer.push(a),l&&c&&n._localIceCandidatesBuffer.push(new Event("icecandidate"));break;case"gathering":n._emitBufferedCandidates(),l||(n.dispatchEvent(a),null!==n.onicecandidate&&n.onicecandidate(a)),c&&(n.dispatchEvent(new Event("icecandidate")),null!==n.onicecandidate&&n.onicecandidate(new Event("icecandidate")),n.iceGatheringState="complete",n._emitGatheringStateChange());break;case"complete":}},i},t.prototype._createIceAndDtlsTransports=function(){var e=this,t=new RTCIceTransport(null);t.onicestatechange=function(){e._updateConnectionState()};var n=new RTCDtlsTransport(t);return n.ondtlsstatechange=function(){e._updateConnectionState()},n.onerror=function(){Object.defineProperty(n,"state",{value:"failed",writable:!0}),e._updateConnectionState()},{iceTransport:t,dtlsTransport:n}},t.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 i=this.transceivers[e].dtlsTransport;i&&(delete i.ondtlssttatechange,delete i.onerror,delete this.transceivers[e].dtlsTransport)},t.prototype._transceive=function(t,n,i){var r=a(t.localCapabilities,t.remoteCapabilities);n&&t.rtpSender&&(r.encodings=t.sendEncodingParameters,r.rtcp={cname:s.localCName,compound:t.rtcpParameters.compound},t.recvEncodingParameters.length&&(r.rtcp.ssrc=t.recvEncodingParameters[0].ssrc),t.rtpSender.send(r)),i&&t.rtpReceiver&&("video"===t.kind&&t.recvEncodingParameters&&e<15019&&t.recvEncodingParameters.forEach(function(e){delete e.rtx}),r.encodings=t.recvEncodingParameters,r.rtcp={cname:t.rtcpParameters.cname,compound:t.rtcpParameters.compound},t.sendEncodingParameters.length&&(r.rtcp.ssrc=t.sendEncodingParameters[0].ssrc),t.rtpReceiver.receive(r))},t.prototype.setLocalDescription=function(e){var t=this;if(!o("setLocalDescription",e.type,this.signalingState)){var n=new Error("Can not set local "+e.type+" in state "+this.signalingState);return n.name="InvalidStateError",arguments.length>2&&"function"==typeof arguments[2]&&window.setTimeout(arguments[2],0,n),Promise.reject(n)}var i,r;if("offer"===e.type)this._pendingOffer&&(i=s.splitSections(e.sdp),r=i.shift(),i.forEach(function(e,n){var i=s.parseRtpParameters(e);t._pendingOffer[n].localCapabilities=i}),this.transceivers=this._pendingOffer,delete this._pendingOffer);else if("answer"===e.type){i=s.splitSections(t.remoteDescription.sdp),r=i.shift();var l=s.matchPrefix(r,"a=ice-lite").length>0;i.forEach(function(e,n){var i=t.transceivers[n],o=i.iceGatherer,u=i.iceTransport,d=i.dtlsTransport,c=i.localCapabilities,f=i.remoteCapabilities,h=s.isRejected(e);if(!h&&!i.isDatachannel){var p=s.getIceParameters(e,r),_=s.getDtlsParameters(e,r);l&&(_.role="server"),t.usingBundle&&0!==n||(u.start(o,p,l?"controlling":"controlled"),d.start(_));var g=a(c,f);t._transceive(i,g.codecs.length>0,!1)}})}switch(this.localDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-local-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}var u=arguments.length>1&&"function"==typeof arguments[1];if(u){var d=arguments[1];window.setTimeout(function(){d(),"new"===t.iceGatheringState&&(t.iceGatheringState="gathering",t._emitGatheringStateChange()),t._emitBufferedCandidates()},0)}var c=Promise.resolve();return c.then(function(){u||("new"===t.iceGatheringState&&(t.iceGatheringState="gathering",t._emitGatheringStateChange()),window.setTimeout(t._emitBufferedCandidates.bind(t),500))}),c},t.prototype.setRemoteDescription=function(t){var n=this;if(!o("setRemoteDescription",t.type,this.signalingState)){var i=new Error("Can not set remote "+t.type+" in state "+this.signalingState);return i.name="InvalidStateError",arguments.length>2&&"function"==typeof arguments[2]&&window.setTimeout(arguments[2],0,i),Promise.reject(i)}var r={},a=[],l=s.splitSections(t.sdp),u=l.shift(),d=s.matchPrefix(u,"a=ice-lite").length>0,c=s.matchPrefix(u,"a=group:BUNDLE ").length>0;this.usingBundle=c;var f=s.matchPrefix(u,"a=ice-options:")[0];switch(f?this.canTrickleIceCandidates=f.substr(14).split(" ").indexOf("trickle")>=0:this.canTrickleIceCandidates=!1,l.forEach(function(i,o){var l=s.splitLines(i),f=s.getKind(i),h=s.isRejected(i),p=l[0].substr(2).split(" ")[2],_=s.getDirection(i,u),g=s.parseMsid(i),m=s.getMid(i)||s.generateIdentifier();if("application"===f&&"DTLS/SCTP"===p)return void(n.transceivers[o]={mid:m,isDatachannel:!0});var v,y,E,S,T,C,R,b,w,A,I,P=s.parseRtpParameters(i);h||(A=s.getIceParameters(i,u),I=s.getDtlsParameters(i,u),I.role="client"),R=s.parseRtpEncodingParameters(i);var O=s.parseRtcpParameters(i),D=s.matchPrefix(i,"a=end-of-candidates",u).length>0,k=s.matchPrefix(i,"a=candidate:").map(function(e){return s.parseCandidate(e)}).filter(function(e){return"1"===e.component||1===e.component});"offer"!==t.type||h?"answer"!==t.type||h||(c&&o>0&&(n._disposeIceAndDtlsTransports(o),n.transceivers[o].iceGatherer=n.transceivers[0].iceGatherer,n.transceivers[o].iceTransport=n.transceivers[0].iceTransport,n.transceivers[o].dtlsTransport=n.transceivers[0].dtlsTransport,n.transceivers[o].rtpSender&&n.transceivers[o].rtpSender.setTransport(n.transceivers[0].dtlsTransport),n.transceivers[o].rtpReceiver&&n.transceivers[o].rtpReceiver.setTransport(n.transceivers[0].dtlsTransport)),v=n.transceivers[o],y=v.iceGatherer,E=v.iceTransport,S=v.dtlsTransport,T=v.rtpReceiver,C=v.sendEncodingParameters,b=v.localCapabilities,n.transceivers[o].recvEncodingParameters=R,n.transceivers[o].remoteCapabilities=P,n.transceivers[o].rtcpParameters=O,(d||D)&&k.length&&E.setRemoteCandidates(k),c&&0!==o||(E.start(y,A,"controlling"),S.start(I)),n._transceive(v,"sendrecv"===_||"recvonly"===_,"sendrecv"===_||"sendonly"===_),!T||"sendrecv"!==_&&"sendonly"!==_?delete v.rtpReceiver:(w=T.track,g?(r[g.stream]||(r[g.stream]=new MediaStream),r[g.stream].addTrack(w),a.push([w,T,r[g.stream]])):(r.default||(r.default=new MediaStream),r.default.addTrack(w),a.push([w,T,r.default])))):(v=n.transceivers[o]||n._createTransceiver(f),v.mid=m,v.iceGatherer||(v.iceGatherer=c&&o>0?n.transceivers[0].iceGatherer:n._createIceGatherer(m,o)),!D||c&&0!==o||v.iceTransport.setRemoteCandidates(k),b=RTCRtpReceiver.getCapabilities(f),e<15019&&(b.codecs=b.codecs.filter(function(e){return"rtx"!==e.name})),C=[{ssrc:1001*(2*o+2)}],"sendrecv"!==_&&"sendonly"!==_||(T=new RTCRtpReceiver(v.dtlsTransport,f),w=T.track,g?(r[g.stream]||(r[g.stream]=new MediaStream,Object.defineProperty(r[g.stream],"id",{get:function(){return g.stream}})),Object.defineProperty(w,"id",{get:function(){return g.track}}),r[g.stream].addTrack(w),a.push([w,T,r[g.stream]])):(r.default||(r.default=new MediaStream),r.default.addTrack(w),a.push([w,T,r.default]))),v.localCapabilities=b,v.remoteCapabilities=P,v.rtpReceiver=T,v.rtcpParameters=O,v.sendEncodingParameters=C,v.recvEncodingParameters=R,n._transceive(n.transceivers[o],!1,"sendrecv"===_||"sendonly"===_))}),this.remoteDescription={type:t.type,sdp:t.sdp},t.type){case"offer":this._updateSignalingState("have-remote-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+t.type+'"')}return Object.keys(r).forEach(function(e){var t=r[e];if(t.getTracks().length){n.remoteStreams.push(t);var i=new Event("addstream");i.stream=t,n.dispatchEvent(i),null!==n.onaddstream&&window.setTimeout(function(){n.onaddstream(i)},0),a.forEach(function(e){var i=e[0],r=e[1];if(t.id===e[2].id){var a=new Event("track");a.track=i,a.receiver=r,a.streams=[t],n.dispatchEvent(a),null!==n.ontrack&&window.setTimeout(function(){n.ontrack(a)},0)}})}}),window.setTimeout(function(){n&&n.transceivers&&n.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),arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},t.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._updateSignalingState("closed")},t.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this.dispatchEvent(t),null!==this.onsignalingstatechange&&this.onsignalingstatechange(t)},t.prototype._maybeFireNegotiationNeeded=function(){var e=this;"stable"===this.signalingState&&this.needNegotiation!==!0&&(this.needNegotiation=!0,window.setTimeout(function(){if(e.needNegotiation!==!1){e.needNegotiation=!1;var t=new Event("negotiationneeded");e.dispatchEvent(t),null!==e.onnegotiationneeded&&e.onnegotiationneeded(t)}},0))},t.prototype._updateConnectionState=function(){var e,t=this,n={new:0,closed:0,connecting:0,checking:0,connected:0,completed:0,failed:0};if(this.transceivers.forEach(function(e){n[e.iceTransport.state]++,n[e.dtlsTransport.state]++}),n.connected+=n.completed,e="new",n.failed>0?e="failed":n.connecting>0||n.checking>0?e="connecting":n.disconnected>0?e="disconnected":n.new>0?e="new":(n.connected>0||n.completed>0)&&(e="connected"),e!==t.iceConnectionState){t.iceConnectionState=e;var i=new Event("iceconnectionstatechange");this.dispatchEvent(i),null!==this.oniceconnectionstatechange&&this.oniceconnectionstatechange(i)}},t.prototype.createOffer=function(){var t=this;if(this._pendingOffer)throw new Error("createOffer called while there is a pending offer.");var n;1===arguments.length&&"function"!=typeof arguments[0]?n=arguments[0]:3===arguments.length&&(n=arguments[2]);var r=this.transceivers.filter(function(e){return"audio"===e.kind}).length,a=this.transceivers.filter(function(e){return"video"===e.kind}).length;if(n){if(n.mandatory||n.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==n.offerToReceiveAudio&&(r=n.offerToReceiveAudio===!0?1:n.offerToReceiveAudio===!1?0:n.offerToReceiveAudio),void 0!==n.offerToReceiveVideo&&(a=n.offerToReceiveVideo===!0?1:n.offerToReceiveVideo===!1?0:n.offerToReceiveVideo)}for(this.transceivers.forEach(function(e){"audio"===e.kind?(r--,r<0&&(e.wantReceive=!1)):"video"===e.kind&&(a--,a<0&&(e.wantReceive=!1))});r>0||a>0;)r>0&&(this._createTransceiver("audio"),r--),a>0&&(this._createTransceiver("video"),a--);var o=i(this.transceivers),l=s.writeSessionBoilerplate();o.forEach(function(n,i){var r=n.track,a=n.kind,l=s.generateIdentifier();n.mid=l,n.iceGatherer||(n.iceGatherer=t.usingBundle&&i>0?o[0].iceGatherer:t._createIceGatherer(l,i));var u=RTCRtpSender.getCapabilities(a);e<15019&&(u.codecs=u.codecs.filter(function(e){return"rtx"!==e.name})),u.codecs.forEach(function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1")});var d=[{ssrc:1001*(2*i+1)}];r&&e>=15019&&"video"===a&&(d[0].rtx={ssrc:1001*(2*i+1)+1}),n.wantReceive&&(n.rtpReceiver=new RTCRtpReceiver(n.dtlsTransport,a)),n.localCapabilities=u,n.sendEncodingParameters=d}),"max-compat"!==this._config.bundlePolicy&&(l+="a=group:BUNDLE "+o.map(function(e){return e.mid}).join(" ")+"\r\n"),l+="a=ice-options:trickle\r\n",o.forEach(function(e,t){l+=s.writeMediaSection(e,e.localCapabilities,"offer",e.stream),l+="a=rtcp-rsize\r\n"}),this._pendingOffer=o;var u=new RTCSessionDescription({type:"offer",sdp:l});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,u),Promise.resolve(u)},t.prototype.createAnswer=function(){var t=s.writeSessionBoilerplate();this.usingBundle&&(t+="a=group:BUNDLE "+this.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),this.transceivers.forEach(function(n,i){if(n.isDatachannel)return void(t+="m=application 0 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=mid:"+n.mid+"\r\n");if(n.stream){var r;"audio"===n.kind?r=n.stream.getAudioTracks()[0]:"video"===n.kind&&(r=n.stream.getVideoTracks()[0]),r&&e>=15019&&"video"===n.kind&&(n.sendEncodingParameters[0].rtx={ssrc:1001*(2*i+2)+1})}var o=a(n.localCapabilities,n.remoteCapabilities),l=o.codecs.filter(function(e){return"rtx"===e.name.toLowerCase()}).length;!l&&n.sendEncodingParameters[0].rtx&&delete n.sendEncodingParameters[0].rtx,t+=s.writeMediaSection(n,o,"answer",n.stream),n.rtcpParameters&&n.rtcpParameters.reducedSize&&(t+="a=rtcp-rsize\r\n")});var n=new RTCSessionDescription({type:"answer",sdp:t});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,n),Promise.resolve(n)},t.prototype.addIceCandidate=function(e){if(e){var t=e.sdpMLineIndex;if(e.sdpMid)for(var n=0;n<this.transceivers.length;n++)if(this.transceivers[n].mid===e.sdpMid){t=n;break}var i=this.transceivers[t];if(i){var r=Object.keys(e.candidate).length>0?s.parseCandidate(e.candidate):{};if("tcp"===r.protocol&&(0===r.port||9===r.port))return Promise.resolve();if(r.component&&"1"!==r.component&&1!==r.component)return Promise.resolve();i.iceTransport.addRemoteCandidate(r);var a=s.splitSections(this.remoteDescription.sdp);a[t+1]+=(r.type?e.candidate.trim():"a=end-of-candidates")+"\r\n",this.remoteDescription.sdp=a.join("")}}else for(var o=0;o<this.transceivers.length;o++)if(this.transceivers[o].iceTransport.addRemoteCandidate({}),this.usingBundle)return Promise.resolve();return arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},t.prototype.getStats=function(){var e=[];this.transceivers.forEach(function(t){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(n){t[n]&&e.push(t[n].getStats())})});var t=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1],n=function(e){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};return new Promise(function(i){var r=new Map;Promise.all(e).then(function(e){e.forEach(function(e){Object.keys(e).forEach(function(t){e[t].type=n(e[t]),r.set(t,e[t])})}),t&&window.setTimeout(t,0,r),i(r)})})},t}},function(e,t,i){var r=i(1).browserDetails,a={shimOnTrack:function(){"object"!=("undefined"==typeof window?"undefined":n(window))||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.getTracks().forEach(function(t){var n=new Event("track");n.track=t,n.receiver={track:t},n.streams=[e.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==("undefined"==typeof window?"undefined":n(window))&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}}))},shimPeerConnection:function(){if("object"==("undefined"==typeof window?"undefined":n(window))&&(window.RTCPeerConnection||window.mozRTCPeerConnection)){window.RTCPeerConnection||(window.RTCPeerConnection=function(e,t){if(r.version<38&&e&&e.iceServers){for(var n=[],i=0;i<e.iceServers.length;i++){var a=e.iceServers[i];if(a.hasOwnProperty("urls"))for(var o=0;o<a.urls.length;o++){var s={url:a.urls[o]};0===a.urls[o].indexOf("turn")&&(s.username=a.username,s.credential=a.credential),n.push(s)}else n.push(e.iceServers[i])}e.iceServers=n}return new mozRTCPeerConnection(e,t)},window.RTCPeerConnection.prototype=mozRTCPeerConnection.prototype,mozRTCPeerConnection.generateCertificate&&Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return mozRTCPeerConnection.generateCertificate}}),window.RTCSessionDescription=mozRTCSessionDescription,window.RTCIceCandidate=mozRTCIceCandidate),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=RTCPeerConnection.prototype[e];RTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?RTCIceCandidate:RTCSessionDescription)(arguments[0]),t.apply(this,arguments)}});var e=RTCPeerConnection.prototype.addIceCandidate;RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?e.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())};var t=function e(t){var e=new Map;return Object.keys(t).forEach(function(n){e.set(n,t[n]),e[n]=t[n]}),e},i={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},a=RTCPeerConnection.prototype.getStats;RTCPeerConnection.prototype.getStats=function(e,n,o){return a.apply(this,[e||null]).then(function(e){if(r.version<48&&(e=t(e)),r.version<53&&!n)try{e.forEach(function(e){e.type=i[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach(function(t,n){e.set(n,Object.assign({},t,{type:i[t.type]||t.type}))})}return e}).then(n,o)}}}};e.exports={shimOnTrack:a.shimOnTrack,shimSourceObject:a.shimSourceObject,shimPeerConnection:a.shimPeerConnection,shimGetUserMedia:i(13)}},function(e,t,i){var r=i(1).log,a=i(1).browserDetails;e.exports=function(){var e=function(e){return{name:{InternalError:"NotReadableError",NotSupportedError:"TypeError",PermissionDeniedError:"NotAllowedError",SecurityError:"NotAllowedError"}[e.name]||e.name,message:{"The operation is insecure.":"The request is not allowed by the user agent or the platform in the current context."}[e.message]||e.message,constraint:e.constraint,toString:function(){return this.name+(this.message&&": ")+this.message}}},t=function(t,i,o){var s=function(e){if("object"!=("undefined"==typeof e?"undefined":n(e))||e.require)return e;var t=[];return Object.keys(e).forEach(function(i){if("require"!==i&&"advanced"!==i&&"mediaSource"!==i){var r=e[i]="object"==n(e[i])?e[i]:{ideal:e[i]};if(void 0===r.min&&void 0===r.max&&void 0===r.exact||t.push(i),void 0!==r.exact&&("number"==typeof r.exact?r.min=r.max=r.exact:e[i]=r.exact,delete r.exact),void 0!==r.ideal){e.advanced=e.advanced||[];var a={};"number"==typeof r.ideal?a[i]={min:r.ideal,max:r.ideal}:a[i]=r.ideal,e.advanced.push(a),delete r.ideal,Object.keys(r).length||delete e[i]}}}),t.length&&(e.require=t),e};return t=JSON.parse(JSON.stringify(t)),a.version<38&&(r("spec: "+JSON.stringify(t)),t.audio&&(t.audio=s(t.audio)),t.video&&(t.video=s(t.video)),r("ff37: "+JSON.stringify(t))),navigator.mozGetUserMedia(t,i,function(t){o(e(t))})},i=function(e){return new Promise(function(n,i){t(e,n,i)})};if(navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:i,addEventListener:function(){},removeEventListener:function(){}}),navigator.mediaDevices.enumerateDevices=navigator.mediaDevices.enumerateDevices||function(){return new Promise(function(e){var t=[{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}];e(t)})},a.version<41){var o=navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);navigator.mediaDevices.enumerateDevices=function(){return o().then(void 0,function(e){if("NotFoundError"===e.name)return[];throw e})}}if(a.version<49){var s=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(t){return s(t).then(function(e){if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(function(e){e.stop()}),new DOMException("The object can not be found here.","NotFoundError");return e},function(t){return Promise.reject(e(t))})}}navigator.getUserMedia=function(e,n,i){return a.version<44?t(e,n,i):(console.warn("navigator.getUserMedia has been replaced by navigator.mediaDevices.getUserMedia"),void navigator.mediaDevices.getUserMedia(e).then(n,i))}}},function(e,t){var i={shimAddStream:function(){"object"!=("undefined"==typeof window?"undefined":n(window))||!window.RTCPeerConnection||"addStream"in window.RTCPeerConnection.prototype||(RTCPeerConnection.prototype.addStream=function(e){var t=this;e.getTracks().forEach(function(n){t.addTrack(n,e)})})},shimOnAddStream:function(){"object"!=("undefined"==typeof window?"undefined":n(window))||!window.RTCPeerConnection||"onaddstream"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(e){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){var t=e.streams[0];if(this._streams||(this._streams=[]),!(this._streams.indexOf(t)>=0)){this._streams.push(t);var n=new Event("addstream");n.stream=e.streams[0],this.dispatchEvent(n)}}.bind(this))}})},shimCallbacksAPI:function(){if("object"==("undefined"==typeof window?"undefined":n(window))&&window.RTCPeerConnection){var e=RTCPeerConnection.prototype,t=e.createOffer,i=e.createAnswer,r=e.setLocalDescription,a=e.setRemoteDescription,o=e.addIceCandidate;e.createOffer=function(e,n){var i=arguments.length>=2?arguments[2]:arguments[0],r=t.apply(this,[i]);return n?(r.then(e,n),Promise.resolve()):r},e.createAnswer=function(e,t){var n=arguments.length>=2?arguments[2]:arguments[0],r=i.apply(this,[n]);return t?(r.then(e,t),Promise.resolve()):r};var s=function(e,t,n){var i=r.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i};e.setLocalDescription=s,s=function(e,t,n){var i=a.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i},e.setRemoteDescription=s,s=function(e,t,n){var i=o.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i},e.addIceCandidate=s}},shimGetUserMedia:function(){navigator.getUserMedia||(navigator.webkitGetUserMedia?navigator.getUserMedia=navigator.webkitGetUserMedia.bind(navigator):navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&(navigator.getUserMedia=function(e,t,n){navigator.mediaDevices.getUserMedia(e).then(t,n)}.bind(navigator)))}};e.exports={shimCallbacksAPI:i.shimCallbacksAPI,shimAddStream:i.shimAddStream,shimOnAddStream:i.shimOnAddStream,shimGetUserMedia:i.shimGetUserMedia}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function r(e){if(d===setTimeout)return setTimeout(e,0);if((d===n||!d)&&setTimeout)return d=setTimeout,setTimeout(e,0);try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}function a(e){if(c===clearTimeout)return clearTimeout(e);if((c===i||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{return c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}function o(){_&&h&&(_=!1,h.length?p=h.concat(p):g=-1,p.length&&s())}function s(){if(!_){var e=r(o);_=!0;for(var t=p.length;t;){for(h=p,p=[];++g<t;)h&&h[g].run();g=-1,t=p.length}h=null,_=!1,a(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var d,c,f=e.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:n}catch(e){d=n}try{c="function"==typeof clearTimeout?clearTimeout:i}catch(e){c=i}}();var h,p=[],_=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new l(e,t)),1!==p.length||_||r(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}}])});(function(){"undefined"==typeof __REACT_HOT_LOADER__})()}).call(t,n(10)(e))},function(e,t,n){var i,r,a;(function(e){"use strict";var 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};!function(o,s){"object"==n(t)&&"object"==n(e)?e.exports=s():(r=[],i=s,a="function"==typeof i?i.apply(t,r):i,!(void 0!==a&&(e.exports=a)))}(void 0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(2)},function(e,t){var i="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":n(e)};e.exports=function(){function e(){if(!Y&&document.getElementsByTagName("body")[0]){try{var e,t=v("span");t.style.display="none",e=B.getElementsByTagName("body")[0].appendChild(t),e.parentNode.removeChild(e),e=null,t=null}catch(e){return}Y=!0;for(var n=G.length,i=0;i<n;i++)G[i]()}}function t(e){Y?e():G[G.length]=e}function n(e){if(i(H.addEventListener)!==D)H.addEventListener("load",e,!1);else if(i(B.addEventListener)!==D)B.addEventListener("load",e,!1);else if(i(H.attachEvent)!==D)E(H,"onload",e);else if("function"==typeof H.onload){var t=H.onload;H.onload=function(){t(),e()}}else H.onload=e}function r(){var e=B.getElementsByTagName("body")[0],t=v(k);t.setAttribute("style","visibility: hidden;"),t.setAttribute("type",M);var n=e.appendChild(t);if(n){var r=0;!function o(){if(i(n.GetVariable)!==D)try{var s=n.GetVariable("$version");s&&(s=s.split(" ")[1].split(","),z.pv=[y(s[0]),y(s[1]),y(s[2])])}catch(e){z.pv=[8,0,0]}else if(r<10)return r++,void setTimeout(o,10);e.removeChild(t),n=null,a()}()}else a()}function a(){var e=V.length;if(e>0)for(var t=0;t<e;t++){var n=V[t].id,r=V[t].callbackFn,a={success:!1,id:n};if(z.pv[0]>0){var d=m(n);if(d)if(!S(V[t].swfVersion)||z.wk&&z.wk<312)if(V[t].expressInstall&&s()){var c={};c.data=V[t].expressInstall,c.width=d.getAttribute("width")||"0",c.height=d.getAttribute("height")||"0",d.getAttribute("class")&&(c.styleclass=d.getAttribute("class")),d.getAttribute("align")&&(c.align=d.getAttribute("align"));for(var f={},h=d.getElementsByTagName("param"),p=h.length,_=0;_<p;_++)"movie"!==h[_].getAttribute("name").toLowerCase()&&(f[h[_].getAttribute("name")]=h[_].getAttribute("value"));l(c,f,n,r)}else u(d),r&&r(a);else C(n,!0),r&&(a.success=!0,a.ref=o(n),a.id=n,r(a))}else if(C(n,!0),r){var g=o(n);g&&i(g.SetVariable)!==D&&(a.success=!0,a.ref=g,a.id=g.id),r(a)}}}function o(e){var t=null,n=m(e);return n&&"OBJECT"===n.nodeName.toUpperCase()&&(t=i(n.SetVariable)!==D?n:n.getElementsByTagName(k)[0]||n),t}function s(){return!J&&S("6.0.65")&&(z.win||z.mac)&&!(z.wk&&z.wk<312)}function l(e,t,n,r){var a=m(n);if(n=g(n),J=!0,A=r||null,I={success:!1,id:n},a){"OBJECT"===a.nodeName.toUpperCase()?(b=d(a),w=null):(b=a,w=n),e.id=x,(i(e.width)===D||!/%$/.test(e.width)&&y(e.width)<310)&&(e.width="310"),(i(e.height)===D||!/%$/.test(e.height)&&y(e.height)<137)&&(e.height="137");var o=z.ie?"ActiveX":"PlugIn",s="MMredirectURL="+encodeURIComponent(H.location.toString().replace(/&/g,"%26"))+"&MMplayerType="+o+"&MMdoctitle="+encodeURIComponent(B.title.slice(0,47)+" - Flash Player Installation");if(i(t.flashvars)!==D?t.flashvars+="&"+s:t.flashvars=s,z.ie&&4!=a.readyState){var l=v("div");n+="SWFObjectNew",l.setAttribute("id",n),a.parentNode.insertBefore(l,a),a.style.display="none",p(a)}f(e,t,n)}}function u(e){if(z.ie&&4!=e.readyState){e.style.display="none";var t=v("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(d(e),t),p(e)}else e.parentNode.replaceChild(d(e),e)}function d(e){var t=v("div");if(z.win&&z.ie)t.innerHTML=e.innerHTML;else{var n=e.getElementsByTagName(k)[0];if(n){var i=n.childNodes;if(i)for(var r=i.length,a=0;a<r;a++)1==i[a].nodeType&&"PARAM"===i[a].nodeName||8==i[a].nodeType||t.appendChild(i[a].cloneNode(!0))}}return t}function c(e,t){var n=v("div");return n.innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'><param name='movie' value='"+e+"'>"+t+"</object>",n.firstChild}function f(e,t,n){var r,a=m(n);if(n=g(n),z.wk&&z.wk<312)return r;if(a){var o,s,l,u=v(z.ie?"div":k);i(e.id)===D&&(e.id=n);for(l in t)t.hasOwnProperty(l)&&"movie"!==l.toLowerCase()&&h(u,l,t[l]);z.ie&&(u=c(e.data,u.innerHTML));for(o in e)e.hasOwnProperty(o)&&(s=o.toLowerCase(),"styleclass"===s?u.setAttribute("class",e[o]):"classid"!==s&&"data"!==s&&u.setAttribute(o,e[o]));z.ie?q[q.length]=e.id:(u.setAttribute("type",M),u.setAttribute("data",e.data)),a.parentNode.replaceChild(u,a),r=u}return r}function h(e,t,n){var i=v("param");i.setAttribute("name",t),i.setAttribute("value",n),e.appendChild(i)}function p(e){var t=m(e);t&&"OBJECT"===t.nodeName.toUpperCase()&&(z.ie?(t.style.display="none",function e(){if(4==t.readyState){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}else setTimeout(e,10)}()):t.parentNode.removeChild(t))}function _(e){return e&&e.nodeType&&1===e.nodeType}function g(e){return _(e)?e.id:e}function m(e){if(_(e))return e;var t=null;try{t=B.getElementById(e)}catch(e){}return t}function v(e){return B.createElement(e)}function y(e){return parseInt(e,10);
}function E(e,t,n){e.attachEvent(t,n),W[W.length]=[e,t,n]}function S(e){e+="";var t=z.pv,n=e.split(".");return n[0]=y(n[0]),n[1]=y(n[1])||0,n[2]=y(n[2])||0,t[0]>n[0]||t[0]==n[0]&&t[1]>n[1]||t[0]==n[0]&&t[1]==n[1]&&t[2]>=n[2]}function T(e,t,n,r){var a=B.getElementsByTagName("head")[0];if(a){var o="string"==typeof n?n:"screen";if(r&&(P=null,O=null),!P||O!=o){var s=v("style");s.setAttribute("type","text/css"),s.setAttribute("media",o),P=a.appendChild(s),z.ie&&i(B.styleSheets)!==D&&B.styleSheets.length>0&&(P=B.styleSheets[B.styleSheets.length-1]),O=o}P&&(i(P.addRule)!==D?P.addRule(e,t):i(B.createTextNode)!==D&&P.appendChild(B.createTextNode(e+" {"+t+"}")))}}function C(e,t){if(Q){var n=t?"visible":"hidden",i=m(e);Y&&i?i.style.visibility=n:"string"==typeof e&&T("#"+e,"visibility:"+n)}}function R(e){var t=/[\\\"<>\.;]/,n=null!==t.exec(e);return n&&("undefined"==typeof encodeURIComponent?"undefined":i(encodeURIComponent))!==D?encodeURIComponent(e):e}var b,w,A,I,P,O,D="undefined",k="object",L="Shockwave Flash",N="ShockwaveFlash.ShockwaveFlash",M="application/x-shockwave-flash",x="SWFObjectExprInst",U="onreadystatechange",H=window,B=document,F=navigator,j=!1,G=[],V=[],q=[],W=[],Y=!1,J=!1,Q=!0,K=!1,z=function(){var e=i(B.getElementById)!==D&&i(B.getElementsByTagName)!==D&&i(B.createElement)!==D,t=F.userAgent.toLowerCase(),n=F.platform.toLowerCase(),r=n?/win/.test(n):/win/.test(t),a=n?/mac/.test(n):/mac/.test(t),o=!!/webkit/.test(t)&&parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),s="Microsoft Internet Explorer"===F.appName,l=[0,0,0],u=null;if(i(F.plugins)!==D&&i(F.plugins[L])===k)u=F.plugins[L].description,u&&i(F.mimeTypes)!==D&&F.mimeTypes[M]&&F.mimeTypes[M].enabledPlugin&&(j=!0,s=!1,u=u.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),l[0]=y(u.replace(/^(.*)\..*$/,"$1")),l[1]=y(u.replace(/^.*\.(.*)\s.*$/,"$1")),l[2]=/[a-zA-Z]/.test(u)?y(u.replace(/^.*[a-zA-Z]+(.*)$/,"$1")):0);else if(i(H.ActiveXObject)!==D)try{var d=new ActiveXObject(N);d&&(u=d.GetVariable("$version"),u&&(s=!0,u=u.split(" ")[1].split(","),l=[y(u[0]),y(u[1]),y(u[2])]))}catch(e){}return{w3:e,pv:l,wk:o,ie:s,win:r,mac:a}}();return function(){z.w3&&((i(B.readyState)!==D&&("complete"===B.readyState||"interactive"===B.readyState)||i(B.readyState)===D&&(B.getElementsByTagName("body")[0]||B.body))&&e(),Y||(i(B.addEventListener)!==D&&B.addEventListener("DOMContentLoaded",e,!1),z.ie&&(B.attachEvent(U,function t(){"complete"===B.readyState&&(B.detachEvent(U,t),e())}),H==top&&!function t(){if(!Y){try{B.documentElement.doScroll("left")}catch(e){return void setTimeout(t,0)}e()}}()),z.wk&&!function t(){if(!Y)return/loaded|complete/.test(B.readyState)?void e():void setTimeout(t,0)}()))}(),G[0]=function(){j?r():a()},function(){z.ie&&window.attachEvent("onunload",function(){for(var e=W.length,t=0;t<e;t++)W[t][0].detachEvent(W[t][1],W[t][2]);for(var n=q.length,i=0;i<n;i++)p(q[i]);for(var r in z)z[r]=null;z=null;for(var a in swfobject)swfobject[a]=null;swfobject=null})}(),{registerObject:function(e,t,n,i){if(z.w3&&e&&t){var r={};r.id=e,r.swfVersion=t,r.expressInstall=n,r.callbackFn=i,V[V.length]=r,C(e,!1)}else i&&i({success:!1,id:e})},getObjectById:function(e){if(z.w3)return o(e)},embedSWF:function(e,n,r,a,o,u,d,c,h,p){var _=g(n),m={success:!1,id:_};z.w3&&!(z.wk&&z.wk<312)&&e&&n&&r&&a&&o?(C(_,!1),t(function(){r+="",a+="";var t={};if(h&&("undefined"==typeof h?"undefined":i(h))===k)for(var g in h)t[g]=h[g];t.data=e,t.width=r,t.height=a;var v={};if(c&&("undefined"==typeof c?"undefined":i(c))===k)for(var y in c)v[y]=c[y];if(d&&("undefined"==typeof d?"undefined":i(d))===k)for(var E in d)if(d.hasOwnProperty(E)){var T=K?encodeURIComponent(E):E,R=K?encodeURIComponent(d[E]):d[E];i(v.flashvars)!==D?v.flashvars+="&"+T+"="+R:v.flashvars=T+"="+R}if(console.log("flash播放器版本检查->",S(o),"ua.pv->",z.pv),S(o)){var b=f(t,v,n);t.id==_&&C(_,!0),m.success=!0,m.ref=b,m.id=b.id}else{if(u&&s())return console.log(" show Adobe Express Install"),t.data=u,void l(t,v,n,p);console.log(" show fallback content"),C(_,!0)}console.log("创建flash流程完成",m),p&&p(m)})):p&&(console.log("creatFlashFailed->ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr",z,e,n,r,a,o),p(m))},switchOffAutoHideShow:function(){Q=!1},enableUriEncoding:function(e){K=("undefined"==typeof e?"undefined":i(e))===D||e},ua:z,getFlashPlayerVersion:function(){return{major:z.pv[0],minor:z.pv[1],release:z.pv[2]}},hasFlashPlayerVersion:S,createSWF:function(e,t,n){return z.w3?f(e,t,n):void 0},showExpressInstall:function(e,t,n,i){z.w3&&s()&&l(e,t,n,i)},removeSWF:function(e){z.w3&&p(e)},createCSS:function(e,t,n,i){z.w3&&T(e,t,n,i)},addDomLoadEvent:t,addLoadEvent:n,getQueryParamValue:function(e){var t=B.location.search||B.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),!e)return R(t);for(var n=t.split("&"),i=0;i<n.length;i++)if(n[i].substring(0,n[i].indexOf("="))==e)return R(n[i].substring(n[i].indexOf("=")+1))}return""},expressInstallCallback:function(){if(J){var e=m(x);e&&b&&(e.parentNode.replaceChild(b,e),w&&(C(w,!0),z.ie&&(b.style.display="block")),A&&A(I)),J=!1}},version:"2.3"}}(),function(){"undefined"==typeof __REACT_HOT_LOADER__}()},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}var r=n(1),a=i(r);e.exports=function(e,t,n,i,r,o,s){var l="_flashReady"+Date.now(),u=l+10,d=u+10;window[l]=function(e){r&&r(null,a.default.getObjectById(t),e)},window[u]=function(e){o&&o(e)},window[d]=function(e){s&&s(e)},a.default.embedSWF(e,t,n,i,"11.4.0","expressInstall.swf",{flashReady:l,msgCallback:u,logCallback:d},{wmode:"opaque",allowScriptAccess:"always",allowFullScreen:"true"},{},function(e){e.success||(console.warn("flash嵌入到页面失败->",e),r("flash create errors:"))})},function(){"undefined"==typeof __REACT_HOT_LOADER__}()}])});(function(){"undefined"==typeof __REACT_HOT_LOADER__})()}).call(t,n(10)(e))},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={"zh-cn":{title:"直播互动课堂",exitBtn:"退出",exitCont:"确定要退出当前课堂吗?",setBtn:"设置",helpBtn:"帮助",endClassroom:"结束课堂",endClassroomCont:"确定要结束当前课堂吗?",pauseClassroom:"暂停上课",startClassroom:"开始上课",openVideo:"开启视频",openAudio:"开启音频",closeVideo:"挂断视频",closeAudio:"挂断音频",closeMedia:"挂断",member:"成员",memberNum:"成员人数",discuss:"讨论",sendMsg:"发送",showColor:"选择颜色",controlBrush:"控制学生画笔",pencil:"铅笔",rescind:"撤销上一步",delete:"删除",downAnimated:"下一步动画",onAnimated:"上一步动画",adaptiveHigh:"自适应高",adaptiveWidth:"自适应宽",showAll:"显示全部",raiseBtn:"举手",documentList:"文档列表",listedFiles:"文件列表",mediaShareList:"媒体文件列表",help:"帮助",setUp:"设置",camera:"摄像头",microphone:"麦克风",volume:"音量",preserve:"保存",confirm:"确定",cancel:"取消",enterUserName:"请输入用户名",enterPassword:"请输入密码",register:"登录",enterClass:"请输入课堂号",enterId:"请输入userId",teacher:"老师",student:"学生",invisible:"监课",liveBroadcast:"直播中",rest:"休息中",layoutCont:"选择的文件格式不支持!请选择其它格式(*.jpg;*.png;*.pdf;*.docx;*.pptx;*.xlsx)",layoutImg:"选择的文件格式不支持!请选择其它格式(*.jpg;*.png;*.pdf;*.gif;*.bmp;)",mediaLayoutCont:"选择的文件格式不支持!请选择其它格式(*.mp4)",musicLayoutCont:"选择的文件格式不支持!请选择其它格式(*.mp3)",loaded:"已加载:",fileLoadingErr:"文档加载失败!",uploadFileFailed:"上传文件失败!",uploadFileFailedEncryption:"上传失败,文档加密或受保护.请尝试将文档复制到新文件并重命名之后再上传",uploaDocumentErr:"文件上传失败!",fileName:"文件名",fileError:"文件太大不能上传!不能超过50MB",chatError:"文件太大不能上传!不能超过5MB",fileFormatError:"选择的文件格式不支持!",serverError:"文档服务器地址无效,无法上传文件!",notStart:"未开始",quitClass:"已经退出课堂",initClass:"正在初始化课堂....",joinClass:"正在加入课堂....",correctPassword:"请输入正确密码",disconnected:"已经断开连接",unknown:"未知",default:"默认",opening:"正在开启",downloadVersion:"请先下载最新版插件",downloading:"正在下载中...",stopSharing:"终止共享",answerSheet:"答题卡",rollCall:"点名",selectFile:"选择文档",screenSharing:"屏幕共享",updateMediaFile:"上传媒体文件",selectMediaFile:"选择媒体文件",uploadAudio:"上传音频",laserPen:"激光笔",upload:"上 传",audioFilelist:"音频文件列表",clickView:"点击查看成员",clickHideList:"点击隐藏列表",raiseNum:"人举手",nothing:"无",second:"秒",minute:"分钟",namingTheCountdown:"点名倒计时:",startName:"发起点名",attendance:"出勤人数",terminationRollCall:"终止点名",signIn:"签到",cardType:"卡片类型:",inputAnswer:"输入答案",gotIt:"听明白了",understand:"没听明白",yes:"对",wrong:"错",yup:"是",answerTime:"答题计时:",answerCountdown:"答题倒计时:   ",release:"发布",enterAnswer:"填空题需要输入答案才能进行发布进行正确率统计",answerResult:"答题结果:",share:"共有",participation:"人参与",hideCount:"隐藏",termination:"终止",submitMsg:"提交",giveUp:"放弃",answerIsNotEmpty:"填空题答案不能为空",selectShape:"选择形状",curveStyle:"曲线",justStyle:"直线",circleStyle:"圆形",squareStyle:"方形",customStyle:"自定义",cameraAccessFailed:"摄像头获取失败",microphoneAccessFailed:"麦克风获取失败",pleaseOpenFlash:"flash插件被禁用,请在浏览器设置中开启允许flash运行",playback:"回放中",noFreePlayer:"推流-没有空闲的播放器使用",cantOpenDevice:"不能再打开更多设备",kickOutClass:"踢出课堂",gag:"禁言",gagContent:"你已经被禁言,暂时不能发言",cameraOccupied:"摄像头被占用或推流失败",microphoneOccupied:"麦克风被占用或推流失败",noCamera:"没有摄像头",noMicrophone:"没有麦克风",flashMsgContent:"您的flash可能被禁用或版本过低,请下载后重试",flashDetailSteps:"查看设置详细步骤",flashUpdataVersions:"下载最新版本",nowLiveVersion:"现支持直播的浏览器版本:",speed360:"360极速",speed360Recommend:"360极速(推荐下载)",security360:"360安全",sogouExplorer:"搜狗高速",nowPlaybackVersion:"现支持录制回放浏览器版本:",security360Only:"360安全(仅9.1版本支持)",browserAreaSettings:"根据您的浏览器区设置:",flashForbiddenMsg:"您的flash可能被禁用,请开启后重试!",flashVersionsLow:"您的flash版本过低,请",download:"下载",retry:"后重试"},"en-us":{title:"Live interactive classroom",exitBtn:"Sign out",exitCont:"Are you sure you want to quit the current classroom?",setBtn:"Set up",helpBtn:"Help",endClassroom:"End class",endClassroomCont:"Are you sure you want to end the current class?",pauseClassroom:"Suspend class",startClassroom:"Class begins",openVideo:"Open video",openAudio:"Open audio",closeVideo:"Video off",closeAudio:"Disconnect audio",closeMedia:"Hang up",member:"Member",memberNum:"Membership",discuss:"Discuss",sendMsg:"Send",showColor:"Select color",controlBrush:"Control student brush",pencil:"Pencil",rescind:"Undo the previous step",delete:"Delete",downAnimated:"Next animation",onAnimated:"Previous animation",adaptiveHigh:"Adaptive high",adaptiveWidth:"Adaptive width",showAll:"Show all",raiseBtn:"Raise",documentList:"Document list",listedFiles:"listed files",mediaShareList:"Media list",help:"Help",setUp:"Set up",camera:"Camera",microphone:"Microphone",volume:"Volume",preserve:"Preservation",confirm:"Determine",cancel:"Cancel",enterUserName:"Enter one user name",enterPassword:"Please input a password",register:"Sign in",enterClass:"Please enter class number",enterId:"Please enter userId",teacher:"Teacher",student:"Student",invisible:"Supervise a class",liveBroadcast:"Live broadcast",rest:"Rest",layoutCont:"The selected file format is not supported! Please select another format(*.jpg;*.png;*.pdf;*.docx;*.pptx;*.xlsx)",layoutImg:"The selected file format is not supported! Please select another format(*.jpg;*.png;*.pdf;*.gif;*.bmp;)",mediaLayoutCont:"The selected file format is not supported! Please select another format(*.mp4)",musicLayoutCont:"The selected file format is not supported! Please select another format(*.mp3)",InvalidAddress:"The file server address is invalid!",loaded:"Loaded:",fileLoadingErr:"Document loading failed!",uploadFileFailed:"Upload file failed!",uploadFileFailedEncryption:"Upload failed,document encrypted or protected.Please try to copy the document to the new file and rename it before uploading it",uploaDocumentErr:"Failed to upload !",fileName:"File name",fileError:"The file is too large to upload! No more than 50MB",chatError:"The file is too large to upload! No more than 5MB",fileFormatError:"The selected file format is not supported!",serverError:"the file server address is invalid!",notStart:"not start",quitClass:"quit class",initClass:"Initializing class....",joinClass:"Joining classroom....",correctPassword:"Please enter the correct password",disconnected:"Disconnected",unknown:"Unknown",default:"Default",playback:"Playback",opening:"Opening",downloadVersion:"Download Plug-in",downloading:"Downloading...",stopSharing:"Stop sharing",answerSheet:"Answer sheet",rollCall:"Roll call",selectFile:"Select file",screenSharing:"Screen sharing",updateMediaFile:"Upload media files",selectMediaFile:"Select media file",uploadAudio:"Upload audio",laserPen:"laser pen",upload:"upload",audioFilelist:"Audio file list",clickView:"Click to view members",clickHideList:"Click hidden list",raiseNum:"hands up",nothing:"nothing",second:"second",minute:"minute",namingTheCountdown:"Naming the countdown",startName:"Start name",attendance:"Attendance",terminationRollCall:"Termination of roll call",signIn:"sign in",cardType:"Card type:",inputAnswer:"Input answer",gotIt:"Got it",understand:"I don't understand",yes:"Yes",wrong:"Wrong",yup:"yup",answerTime:"Answer time:",answerCountdown:"Answer countdown:   ",release:"Release",enterAnswer:"Fill in the blanks,you need to enter the answer in order to publish the correct rate statistics",answerResult:"Answer result:",share:"Share",participation:"individual participation",hideCount:"hide",termination:"termination",submitMsg:"submit",giveUp:"give up",answerIsNotEmpty:"Fill in the blanks. The answer is not empty",selectShape:"Select Shape",curveStyle:"curve",justStyle:"straight line",circleStyle:"circle",squareStyle:"side",customStyle:"custom",cameraAccessFailed:"Camera access failed",microphoneAccessFailed:"Microphone access failed",pleaseOpenFlash:"The flash plug-in is disabled. Please open in browser settings to allow flash to run",noFreePlayer:"Publish->No free player to use",cantOpenDevice:"Can't open the more devices",kickOutClass:"Kick out of class",gag:"Gag",gagContent:"You have been banned, temporarily unable to speak!",cameraOccupied:"The camera has been used or pushed to fail",microphoneOccupied:"The microphone has been used or pushed to fail",noCamera:"No camera",noMicrophone:"No microphone",flashMsgContent:"Your flash may be disabled or the version is too low. Please try again after downloading",flashDetailSteps:"settings",flashUpdataVersions:"Download",nowLiveVersion:"Live browser version is supported now:",speed360:"360 speed",speed360Recommend:"360 speed (recommended)",security360:"360 security",sogouExplorer:"Sogou Explorer",nowPlaybackVersion:"Support for recording playback browser version now:",security360Only:"360 security (only version 9.1)",browserAreaSettings:"Depending on your browser area settings:",flashForbiddenMsg:"Your flash may be disabled. Please open and try again!",flashVersionsLow:"Your version of flash is too low, please",download:"download",retry:"Retry"}},i=n;t.default=i;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"localConfig","D:/work/PCLive/src/local/localConfig.js"),__REACT_HOT_LOADER__.register(i,"default","D:/work/PCLive/src/local/localConfig.js"))})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(2),s=i(o),l=n(45),u=(i(l),n(4)),d=i(u),c=n(3),f=i(c),h=n(1),p=i(h),_=n(23),g=i(_),m=n(20),v=i(m),y=n(28),E=i(y),S=n(24),T=i(S),C=n(36),R=i(C),b=n(13),w=i(b),A=n(32),I=i(A),P=n(15),O=i(P),D=n(33),k=i(D),L=n(48),N=(i(L),n(29)),M=i(N),x=n(31),U=i(x),H=n(19),B=i(H),F=n(35),j=i(F),G=n(39),V=i(G),q=n(14),W=i(q),Y=n(6),J=i(Y),Q=p.default.getLoger("PCLive"),K=void 0,z=void 0,X=void 0,Z=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,ie=void 0,re=void 0,ae=void 0,oe=void 0,se=function(){function e(){r(this,e);var t=location.protocol;"https:"==t?f.default.locationProtocol="https://":f.default.locationProtocol="http://",this._localConfig(),this.getURLParams(),this.init(),this.addEvent()}return a(e,[{key:"getURLParams",value:function(){var e=this._parseUrlParams();if(Q.log("urlParams",e),e){f.default.classId=parseInt(e.classId)||0;var t=e.userName||"";f.default.userName=decodeURI(t),f.default.userId=e.userId||t,f.default.userRole=e.userRole||"normal",f.default.isRecordPlayBack=Boolean(e.playRecord),f.default.autoLogin=e.m||0,f.default.maxMediaChannels=parseInt(e.channels)||0,f.default.userRole=e.userRole,f.default.userRole!=f.default.USER_HOST&&f.default.userRole!=f.default.USER_INVISIBLE&&(f.default.userRole=f.default.USER_NOTMAL);var n=e.portalIP||"",i=e.portalPort||"";i&&(n=n+":"+i),f.default.portal=n||""}}},{key:"_parseUrlParams",value:function(){var e=encodeURI(location.search),t={},n=void 0;if(e.indexOf("?")!=-1){var i=e.substr(1);n=i.split("&");for(var r=0;r<n.length;r++)t[n[r].split("=")[0]]=unescape(n[r].split("=")[1])}return t}},{key:"init",value:function(){Q.log("init"),W.default.init((0,s.default)("#magnifyBox")),K=new g.default,K.on(g.default.CLASS_STOP_MEDIA_PUBLISH,this._onClassStopMediaPublishHandler.bind(this)),ae=new B.default,oe=new j.default,z=new v.default,z.on(O.default.WINDOW_VIEW_CHANGE,this.onWindowViewChange.bind(this)),Z=new T.default,Z.on(T.default.DOC_IMAGE_LOAD,this._docImageLoadHandler.bind(this)),Z.on(T.default.SCENE_DOC_CHANGE,this._onSceneChangeHandler.bind(this)),$=new R.default,ee=new w.default,te=new I.default,te.on(I.default.RECORD_REPLAY_PLAY,this._onRecordReplayPlayHandler.bind(this)),te.on(I.default.RECORD_REPLAY_SEEK,this._onRecordReplaySeekHandler.bind(this)),te.on(I.default.RECORD_REPLAY_PAUSE,this._onRecordReplayPauseHandler.bind(this)),te.on(I.default.RECORD_REPLAY_STOP,this._onRecordReplayStopHandler.bind(this)),ne=new k.default,ne.on(k.default.SCENE_SCREEN_SHARE_CHANGE,this._onSceneChangeHandler.bind(this)),ie=new M.default,ie.on(M.default.SCENE_MEDIA_SHARE_CHANGE,this._onSceneChangeHandler.bind(this)),re=new U.default,re.on(U.default.SCENE_MUSIC_SHARE_CHANGE,this._onSceneChangeHandler.bind(this)),X=new E.default,X.on(E.default.FLASH_LOADED,this._onFlashLoaded.bind(this)),this._onFlashLoaded()}},{key:"_onSceneChangeHandler",value:function(e){switch(e){case f.default.SCENE_MEDIA_SHARE:ne&&ne.stopAndHide(),Z&&Z.stopAndHide(),re&&re.stopAndHide(),f.default.isRecordPlayBack||f.default.userRole!=f.default.USER_HOST||d.default.api("sceneTableChange",{currentSceneTableId:f.default.SCENE_MEDIA_SHARE});break;case f.default.SCENE_MUSIC_SHARE:ie&&ie.stopAndHide(),ne&&ne.stopAndHide(),f.default.isRecordPlayBack||f.default.userRole!=f.default.USER_HOST||d.default.api("sceneTableChange",{currentSceneTableId:f.default.SCENE_DOC});break;case f.default.SCENE_SCREEN_SHARE:ie&&ie.stopAndHide(),re&&re.stopAndHide(),Z&&Z.stopAndHide(),f.default.isRecordPlayBack||f.default.userRole!=f.default.USER_HOST||d.default.api("sceneTableChange",{currentSceneTableId:f.default.SCENE_SCREEN_SHARE});break;case f.default.SCENE_DOC:ie&&ie.stopAndHide(),ne&&ne.stopAndHide(),f.default.isRecordPlayBack||f.default.userRole!=f.default.USER_HOST||d.default.api("sceneTableChange",{currentSceneTableId:f.default.SCENE_DOC})}}},{key:"onWindowViewChange",value:function(){Z&&Z.onWindowResize()}},{key:"addEvent",value:function(){}},{key:"_onFlashLoaded",value:function(){Q.log("资源加载完成"),this.startClassRun()}},{key:"startClassRun",value:function(){Q.log("开启启动加入课堂的流程"),K&&K.startClassRun()}},{key:"_onClassStopMediaPublishHandler",value:function(e){X&&X.stopAllPublishMedia(),ne&&ne.stopAndHide()}},{key:"_docImageLoadHandler",value:function(e){$&&$.setCanvasSize(e),ee&&ee.setCanvasSize(e)}},{key:"_onRecordReplayPlayHandler",value:function(){X&&X.play(),ne&&ne.play(),ie&&ie.play(),re&&re.play()}},{key:"_onRecordReplayPauseHandler",value:function(){X&&X.pause(),ne&&ne.pause(),ie&&ie.pause(),re&&re.pause()}},{key:"_onRecordReplaySeekHandler",value:function(){K&&K.clear(),z&&z.clear(),X&&X.clear(),Z&&Z.clear(),$&&$.clear(),ne&&ne.clear(),ie&&ie.clear(),re&&re.clear()}},{key:"_onRecordReplayStopHandler",value:function(){X&&X.stop(),Z&&Z.stop(),ne&&ne.stop(),ie&&ie.stop(),re&&re.stop()}},{key:"_localConfig",value:function(){var e=navigator.language||navigator.browserLanguage;e=e.toLocaleLowerCase(),Q.log("language:",e),"en-us"==e||"en-gb"==e?(e="en-us",J.default.language="en_us"):e="zh-cn",Q.log("language-use:",e),f.default.localConfig=V.default[e],f.default.localConfig||(f.default.localConfig=V.default["zh-cn"])}}]),e}();e.exports=new se;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Q,"loger","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(K,"_classApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(z,"_chatApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(X,"_mediaManagerApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(Z,"_docApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register($,"_whiteBoardApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(ee,"_laserPen","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(te,"_recordReplayApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(ne,"_screenShareApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(ie,"_mediaShareApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(re,"_musicShareApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(ae,"_answerApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(oe,"_signApe","D:/work/PCLive/src/main.js"),__REACT_HOT_LOADER__.register(se,"Main","D:/work/PCLive/src/main.js"))})()},function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,i,r){t=t||"&",i=i||"=";var a={};if("string"!=typeof e||0===e.length)return a;var o=/\+/g;e=e.split(t);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var u=0;u<l;++u){var d,c,f,h,p=e[u].replace(o,"%20"),_=p.indexOf(i);_>=0?(d=p.substr(0,_),c=p.substr(_+1)):(d=p,c=""),f=decodeURIComponent(d),h=decodeURIComponent(c),n(a,f)?Array.isArray(a[f])?a[f].push(h):a[f]=[a[f],h]:a[f]=h}return a}},function(e,t){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,i,r){return t=t||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(r){var a=encodeURIComponent(n(r))+i;return Array.isArray(e[r])?e[r].map(function(e){return a+encodeURIComponent(n(e))}).join(t):a+encodeURIComponent(n(e[r]))}).join(t):r?encodeURIComponent(n(r))+i+encodeURIComponent(n(e)):""}},function(e,t,n){"use strict";t.decode=t.parse=n(41),t.encode=t.stringify=n(42)},function(e,t,n){var i;(function(e,r){!function(a){function o(e){throw RangeError(k[e])}function s(e,t){for(var n=e.length,i=[];n--;)i[n]=t(e[n]);return i}function l(e,t){var n=e.split("@"),i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(D,".");var r=e.split("."),a=s(r,t).join(".");return i+a}function u(e){for(var t,n,i=[],r=0,a=e.length;r<a;)t=e.charCodeAt(r++),t>=55296&&t<=56319&&r<a?(n=e.charCodeAt(r++),56320==(64512&n)?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),r--)):i.push(t);return i}function d(e){return s(e,function(e){var t="";return e>65535&&(e-=65536,t+=M(e>>>10&1023|55296),e=56320|1023&e),t+=M(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:S}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var i=0;for(e=n?N(e/b):e>>1,e+=N(e/t);e>L*C>>1;i+=S)e=N(e/L);return N(i+(L+1)*e/(e+R))}function p(e){var t,n,i,r,a,s,l,u,f,p,_=[],g=e.length,m=0,v=A,y=w;for(n=e.lastIndexOf(I),n<0&&(n=0),i=0;i<n;++i)e.charCodeAt(i)>=128&&o("not-basic"),_.push(e.charCodeAt(i));for(r=n>0?n+1:0;r<g;){for(a=m,s=1,l=S;r>=g&&o("invalid-input"),u=c(e.charCodeAt(r++)),(u>=S||u>N((E-m)/s))&&o("overflow"),m+=u*s,f=l<=y?T:l>=y+C?C:l-y,!(u<f);l+=S)p=S-f,s>N(E/p)&&o("overflow"),s*=p;t=_.length+1,y=h(m-a,t,0==a),N(m/t)>E-v&&o("overflow"),v+=N(m/t),m%=t,_.splice(m++,0,v)}return d(_)}function _(e){var t,n,i,r,a,s,l,d,c,p,_,g,m,v,y,R=[];for(e=u(e),g=e.length,t=A,n=0,a=w,s=0;s<g;++s)_=e[s],_<128&&R.push(M(_));for(i=r=R.length,r&&R.push(I);i<g;){for(l=E,s=0;s<g;++s)_=e[s],_>=t&&_<l&&(l=_);for(m=i+1,l-t>N((E-n)/m)&&o("overflow"),n+=(l-t)*m,t=l,s=0;s<g;++s)if(_=e[s],_<t&&++n>E&&o("overflow"),_==t){for(d=n,c=S;p=c<=a?T:c>=a+C?C:c-a,!(d<p);c+=S)y=d-p,v=S-p,R.push(M(f(p+y%v,0))),d=N(y/v);R.push(M(f(d,0))),a=h(n,m,i==r),n=0,++i}++n,++t}return R.join("")}function g(e){return l(e,function(e){return P.test(e)?p(e.slice(4).toLowerCase()):e})}function m(e){return l(e,function(e){return O.test(e)?"xn--"+_(e):e})}var v=("object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof r&&r);v.global!==v&&v.window!==v&&v.self!==v||(a=v);var y,E=2147483647,S=36,T=1,C=26,R=38,b=700,w=72,A=128,I="-",P=/^xn--/,O=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=S-T,N=Math.floor,M=String.fromCharCode;y={version:"1.3.2",ucs2:{decode:u,encode:d},decode:p,encode:_,toASCII:m,toUnicode:g},i=function(){return y}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))}(this)}).call(t,n(10)(e),function(){return this}())},function(e,t,n){function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function r(e,t,n){if(e&&u(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}function a(e){return l(e)&&(e=r(e)),e instanceof i?e.format():i.prototype.format.call(e)}function o(e,t){return r(e,!1,!0).resolve(t)}function s(e,t){return e?r(e,!1,!0).resolveObject(t):t}function l(e){return"string"==typeof e}function u(e){return"object"==typeof e&&null!==e}function d(e){return null===e}function c(e){return null==e}var f=n(44);t.parse=r,t.resolve=o,t.resolveObject=s,t.format=a,t.Url=i;var h=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,_=["<",">",'"',"`"," ","\r","\n","\t"],g=["{","}","|","\\","^","`"].concat(_),m=["'"].concat(g),v=["%","/","?",";","#"].concat(m),y=["/","?","#"],E=255,S=/^[a-z0-9A-Z_-]{0,63}$/,T=/^([a-z0-9A-Z_-]{0,63})(.*)$/,C={javascript:!0,"javascript:":!0},R={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=n(43);i.prototype.parse=function(e,t,n){if(!l(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e;i=i.trim();var r=h.exec(i);if(r){r=r[0];var a=r.toLowerCase();this.protocol=a,i=i.substr(r.length)}if(n||r||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var o="//"===i.substr(0,2);!o||r&&R[r]||(i=i.substr(2),this.slashes=!0)}if(!R[r]&&(o||r&&!b[r])){for(var s=-1,u=0;u<y.length;u++){var d=i.indexOf(y[u]);d!==-1&&(s===-1||d<s)&&(s=d)}var c,p;p=s===-1?i.lastIndexOf("@"):i.lastIndexOf("@",s),p!==-1&&(c=i.slice(0,p),i=i.slice(p+1),this.auth=decodeURIComponent(c)),s=-1;for(var u=0;u<v.length;u++){var d=i.indexOf(v[u]);d!==-1&&(s===-1||d<s)&&(s=d)}s===-1&&(s=i.length),this.host=i.slice(0,s),i=i.slice(s),this.parseHost(),this.hostname=this.hostname||"";var _="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!_)for(var g=this.hostname.split(/\./),u=0,A=g.length;u<A;u++){var I=g[u];if(I&&!I.match(S)){for(var P="",O=0,D=I.length;O<D;O++)P+=I.charCodeAt(O)>127?"x":I[O];if(!P.match(S)){var k=g.slice(0,u),L=g.slice(u+1),N=I.match(T);N&&(k.push(N[1]),L.unshift(N[2])),L.length&&(i="/"+L.join(".")+i),this.hostname=k.join(".");break}}}if(this.hostname.length>E?this.hostname="":this.hostname=this.hostname.toLowerCase(),!_){for(var M=this.hostname.split("."),x=[],u=0;u<M.length;++u){var U=M[u];x.push(U.match(/[^A-Za-z0-9_-]/)?"xn--"+f.encode(U):U)}this.hostname=x.join(".")}var H=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+H,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!C[a])for(var u=0,A=m.length;u<A;u++){var F=m[u],j=encodeURIComponent(F);j===F&&(j=escape(F)),i=i.split(F).join(j)}var G=i.indexOf("#");G!==-1&&(this.hash=i.substr(G),i=i.slice(0,G));var V=i.indexOf("?");if(V!==-1?(this.search=i.substr(V),this.query=i.substr(V+1),t&&(this.query=w.parse(this.query)),i=i.slice(0,V)):t&&(this.search="",this.query={}),i&&(this.pathname=i),b[a]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var H=this.pathname||"",U=this.search||"";this.path=H+U}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",i=this.hash||"",r=!1,a="";this.host?r=e+this.host:this.hostname&&(r=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&u(this.query)&&Object.keys(this.query).length&&(a=w.stringify(this.query));var o=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||b[t])&&r!==!1?(r="//"+(r||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):r||(r=""),i&&"#"!==i.charAt(0)&&(i="#"+i),o&&"?"!==o.charAt(0)&&(o="?"+o),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace("#","%23"),t+r+n+o+i},i.prototype.resolve=function(e){return this.resolveObject(r(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(l(e)){var t=new i;t.parse(e,!1,!0),e=t}var n=new i;if(Object.keys(this).forEach(function(e){n[e]=this[e]},this),n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(n[t]=e[t])}),b[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n;if(e.protocol&&e.protocol!==n.protocol){if(!b[e.protocol])return Object.keys(e).forEach(function(t){n[t]=e[t]}),n.href=n.format(),n;if(n.protocol=e.protocol,e.host||R[e.protocol])n.pathname=e.pathname;else{for(var r=(e.pathname||"").split("/");r.length&&!(e.host=r.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==r[0]&&r.unshift(""),r.length<2&&r.unshift(""),n.pathname=r.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var a=n.pathname||"",o=n.search||"";n.path=a+o}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var s=n.pathname&&"/"===n.pathname.charAt(0),u=e.host||e.pathname&&"/"===e.pathname.charAt(0),f=u||s||n.host&&e.pathname,h=f,p=n.pathname&&n.pathname.split("/")||[],r=e.pathname&&e.pathname.split("/")||[],_=n.protocol&&!b[n.protocol];if(_&&(n.hostname="",n.port=null,n.host&&(""===p[0]?p[0]=n.host:p.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===r[0]?r[0]=e.host:r.unshift(e.host)),e.host=null),f=f&&(""===r[0]||""===p[0])),u)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,p=r;else if(r.length)p||(p=[]),p.pop(),p=p.concat(r),n.search=e.search,n.query=e.query;else if(!c(e.search)){if(_){n.hostname=n.host=p.shift();var g=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");g&&(n.auth=g.shift(),n.host=n.hostname=g.shift())}return n.search=e.search,n.query=e.query,d(n.pathname)&&d(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!p.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var m=p.slice(-1)[0],v=(n.host||e.host)&&("."===m||".."===m)||""===m,y=0,E=p.length;E>=0;E--)m=p[E],"."==m?p.splice(E,1):".."===m?(p.splice(E,1),y++):y&&(p.splice(E,1),y--);if(!f&&!h)for(;y--;y)p.unshift("..");!f||""===p[0]||p[0]&&"/"===p[0].charAt(0)||p.unshift(""),v&&"/"!==p.join("/").substr(-1)&&p.push("");var S=""===p[0]||p[0]&&"/"===p[0].charAt(0);if(_){n.hostname=n.host=S?"":p.length?p.shift():"";var g=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");g&&(n.auth=g.shift(),n.host=n.hostname=g.shift())}return f=f||n.host&&p.length,f&&!S&&p.unshift(""),p.length?n.pathname=p.join("/"):(n.pathname=null,n.path=null),d(n.pathname)&&d(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),
n},i.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,i=0;n<e.length;n++,i+=8)t[i>>>5]|=e[n]<<24-i%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],i=0;i<e.length;i+=3)for(var r=e[i]<<16|e[i+1]<<8|e[i+2],a=0;a<4;a++)8*i+6*a<=8*e.length?n.push(t.charAt(r>>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],i=0,r=0;i<e.length;r=++i%4)0!=r&&n.push((t.indexOf(e.charAt(i-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(i))>>>6-2*r);return n}};e.exports=n}()},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}e.exports=function(e){return null!=e&&(n(e)||i(e)||!!e._isBuffer)}},function(e,t){"use strict";var n=Math.max(document.documentElement.clientWidth,window.innerWidth||0),i={mobile:768,tablet:992,medium:1200},r=navigator.userAgent,a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i;e.exports={isMobileUA:function(){return a.test(r)},isIOS:function(){return/iphone|ipad|ipod/i.test(r)},isAndroid:function(){return/android/i.test(r)},isWechat:function(){return/micromessenger/i.test(r)},isWechatAndroid:function(){return isWechat()&&isAndroid()},isWechatIOS:function(){return isWechat()&&isIOS()},isMobileView:function(){return n<i.mobile},isTabletView:function(){return n<i.tablet&&n>=i.mobile},isMediumView:function(){return n<i.medium&&n>=i.tablet},isLargeView:function(){return n>=i.medium},isRetina:function(){return window.devicePixelRatio>=2},isHighResolution:function(){return window.devicePixelRatio>=1.5}}}])});