/*! * sdk.js v1.15.3 * 2019-1-11 10:08:05 * (c) 2017 mudu.tv * 杭州雅顾科技有限公司 版权所有 * */ !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(1),n(2);n(12)},function(e,t,n){var r,i;!function(o,a){"use strict";r=a,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i))}(this,function(){var e,t,n=Array,r=n.prototype,i=Object,o=i.prototype,a=Function,s=a.prototype,u=String,c=u.prototype,l=Number,f=l.prototype,h=r.slice,p=r.splice,d=r.push,v=r.unshift,y=r.concat,g=r.join,m=s.call,_=s.apply,b=Math.max,w=Math.min,S=o.toString,k="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,T=Function.prototype.toString,E=/^\s*class /,O=function(e){try{var t=T.call(e),n=t.replace(/\/\/.*\n/g,""),r=n.replace(/\/\*[.\s\S]*\*\//g,""),i=r.replace(/\n/gm," ").replace(/ {2}/g," ");return E.test(i)}catch(o){return!1}},x=function(e){try{return!O(e)&&(T.call(e),!0)}catch(t){return!1}},P="[object Function]",C="[object GeneratorFunction]",e=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(k)return x(e);if(O(e))return!1;var t=S.call(e);return t===P||t===C},M=RegExp.prototype.exec,A=function(e){try{return M.call(e),!0}catch(t){return!1}},I="[object RegExp]";t=function(e){return"object"==typeof e&&(k?A(e):S.call(e)===I)};var j,B=String.prototype.valueOf,R=function(e){try{return B.call(e),!0}catch(t){return!1}},D="[object String]";j=function(e){return"string"==typeof e||"object"==typeof e&&(k?R(e):S.call(e)===D)};var U=i.defineProperty&&function(){try{var e={};i.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}(),F=function(e){var t;return t=U?function(e,t,n,r){!r&&t in e||i.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)},function(n,r,i){for(var o in r)e.call(r,o)&&t(n,o,r[o],i)}}(o.hasOwnProperty),L=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},N=l.isNaN||function(e){return e!==e},W={ToInteger:function(e){var t=+e;return N(t)?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,r,i;if(L(t))return t;if(r=t.valueOf,e(r)&&(n=r.call(t),L(n)))return n;if(i=t.toString,e(i)&&(n=i.call(t),L(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return i(e)},ToUint32:function(e){return e>>>0}},G=function(){};F(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,o=h.call(arguments,1),s=function(){if(this instanceof r){var e=_.call(n,this,y.call(o,h.call(arguments)));return i(e)===e?e:this}return _.call(n,t,y.call(o,h.call(arguments)))},u=b(0,n.length-o.length),c=[],l=0;l1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++o1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var u=0;u1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var u=0;u1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;a1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;a=2)o=arguments[1];else for(;;){if(a in r){o=r[a++];break}if(++a>=i)throw new TypeError("reduce of empty array with no initial value")}for(;a=2)o=arguments[1];else for(;;){if(a in r){o=r[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(a<0)return o;do a in r&&(o=t(o,r[a],a,n));while(a--);return o}},!oe);var ae=r.indexOf&&[0,1].indexOf(1,2)!==-1;F(r,{indexOf:function(e){var t=ne&&j(this)?X(this,""):W.ToObject(this),n=W.ToUint32(t.length);if(0===n)return-1;var r=0;for(arguments.length>1&&(r=W.ToInteger(arguments[1])),r=r>=0?r:b(0,n+r);r1&&(r=w(r,W.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}},se);var ue=function(){var e=[1,2],t=e.splice();return 2===e.length&&Z(t)&&0===t.length}();F(r,{splice:function(e,t){return 0===arguments.length?[]:p.apply(this,arguments)}},!ue);var ce=function(){var e={};return r.splice.call(e,0,0,1),1===e.length}();F(r,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=b(W.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=q(arguments),n.length<2?K(n,this.length-e):n[1]=W.ToInteger(t)),p.apply(this,n)}},!ce);var le=function(){var e=new n(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),fe=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();F(r,{splice:function(e,t){for(var n,r=W.ToObject(this),i=[],o=W.ToUint32(r.length),a=W.ToInteger(e),s=a<0?b(o+a,0):w(a,o),c=w(b(W.ToInteger(t),0),o-s),l=0;lv;)delete r[l-1],l-=1}else if(p>c)for(l=o-c;l>s;)n=u(l+c-1),f=u(l+p-1),z(r,n)?r[f]=r[n]:delete r[f],l-=1;l=s;for(var y=0;y=0&&!Z(t)&&e(t.callee)},je=Ae(arguments)?Ae:Ie;F(i,{keys:function(t){var n=e(t),r=je(t),i=null!==t&&"object"==typeof t,o=i&&j(t);if(!i&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=[],s=ke&&n;if(o&&Te||r)for(var c=0;c11?e+1:e},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=qe(this);return e<0&&t>11?0:t},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=qe(this),n=Ve(this);if(e<0&&t>11){if(12===t)return n;var r=rt(0,e+1);return r-n+1}return n},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this);return e<0&&Xe(this)>11?e+1:e},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this),t=Xe(this);return e<0&&t>11?0:t},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this),t=Xe(this),n=Ye(this);if(e<0&&t>11){if(12===t)return n;var r=rt(0,e+1);return r-n+1}return n}},Le),F(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ke(this),t=Ye(this),n=Xe(this),r=Je(this),i=$e(this),o=Qe(this),a=Ze(this);return tt[e]+", "+(t<10?"0"+t:t)+" "+nt[n]+" "+r+" "+(i<10?"0"+i:i)+":"+(o<10?"0"+o:o)+":"+(a<10?"0"+a:a)+" GMT"}},Le||Ge),F(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear();return tt[e]+" "+nt[n]+" "+(t<10?"0"+t:t)+" "+r}},Le||Ue),(Le||Fe)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear(),i=this.getHours(),o=this.getMinutes(),a=this.getSeconds(),s=this.getTimezoneOffset(),u=Math.floor(Math.abs(s)/60),c=Math.floor(Math.abs(s)%60);return tt[e]+" "+nt[n]+" "+(t<10?"0"+t:t)+" "+r+" "+(i<10?"0"+i:i)+":"+(o<10?"0"+o:o)+":"+(a<10?"0"+a:a)+" GMT"+(s>0?"-":"+")+(u<10?"0"+u:u)+(c<10?"0"+c:c)},U&&i.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var it=-621987552e5,ot="-000001",at=Date.prototype.toISOString&&new Date(it).toISOString().indexOf(ot)===-1,st=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date((-1)).toISOString(),ut=m.bind(Date.prototype.getTime);F(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(ut(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var e=Je(this),t=Xe(this);e+=Math.floor(t/12),t=(t%12+12)%12;var n=[t+1,Ye(this),$e(this),Qe(this),Ze(this)];e=(e<0?"-":e>9999?"+":"")+J("00000"+Math.abs(e),0<=e&&e<=9999?-4:-6);for(var r=0;r=7&&c>pt){var d=Math.floor(c/pt)*pt,v=Math.floor(d/1e3);h+=v,p-=1e3*v}l=1===f&&u(n)===n?new e(t.parse(n)):f>=7?new e(n,r,i,o,a,h,p):f>=6?new e(n,r,i,o,a,h):f>=5?new e(n,r,i,o,a):f>=4?new e(n,r,i,o):f>=3?new e(n,r,i):f>=2?new e(n,r):f>=1?new e(n instanceof e?+n:n):new e}else l=e.apply(this,arguments);return L(l)||F(l,{constructor:t},!0),l},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],i=function(e,t){var n=t>1?1:0;return r[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},o=function(t){var n=0,r=t;if(dt&&r>pt){var i=Math.floor(r/pt)*pt,o=Math.floor(i/1e3);n+=o,r-=1e3*o}return l(new e(1970,0,1,0,0,n,r))};for(var a in e)z(e,a)&&(t[a]=e[a]);F(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,F(t.prototype,{constructor:t},!0);var s=function(t){var r=n.exec(t);if(r){var a,s=l(r[1]),u=l(r[2]||1)-1,c=l(r[3]||1)-1,f=l(r[4]||0),h=l(r[5]||0),p=l(r[6]||0),d=Math.floor(1e3*l(r[7]||0)),v=Boolean(r[4]&&!r[8]),y="-"===r[9]?1:-1,g=l(r[10]||0),m=l(r[11]||0),_=h>0||p>0||d>0;return f<(_?24:25)&&h<60&&p<60&&d<1e3&&u>-1&&u<12&&g<24&&m<60&&c>-1&&c=0;)n+=yt.data[t],yt.data[t]=Math.floor(n/e),n=n%e*yt.base},numToString:function(){for(var e=yt.size,t="";--e>=0;)if(""!==t||0===e||0!==yt.data[e]){var n=u(yt.data[e]);""===t?t=n:t+=J("0000000",0,7-n.length)+n}return t},pow:function Dt(e,t,n){return 0===t?n:t%2===1?Dt(e,t-1,n*e):Dt(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},gt=function(e){var t,n,r,i,o,a,s,c;if(t=l(e),t=N(t)?0:Math.floor(t),t<0||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=l(this),N(n))return"NaN";if(n<=-1e21||n>=1e21)return u(n);if(r="",n<0&&(r="-",n=-n),i="0",n>1e-21)if(o=yt.log(n*yt.pow(2,69,1))-69,a=o<0?n*yt.pow(2,-o,1):n/yt.pow(2,o,1),a*=4503599627370496,o=52-o,o>0){for(yt.multiply(0,a),s=t;s>=7;)yt.multiply(1e7,0),s-=7;for(yt.multiply(yt.pow(10,s,1),0),s=o-1;s>=23;)yt.divide(1<<23),s-=23;yt.divide(1<0?(c=i.length,i=c<=t?r+J("0.0000000000000000000",0,t-c+2)+i:r+J(i,0,c-t)+"."+J(i,c-t)):i=r+i,i};F(f,{toFixed:gt},vt);var mt=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),_t=f.toPrecision;F(f,{toPrecision:function(e){return"undefined"==typeof e?_t.call(this):_t.call(this,e)}},mt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],n=Math.pow(2,32)-1;c.split=function(r,i){var o=String(this);if("undefined"==typeof r&&0===i)return[];if(!t(r))return X(this,r,i);var a,s,u,c,l=[],f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),h=0,p=new RegExp(r.source,f+"g");e||(a=new RegExp("^"+p.source+"$(?!\\s)",f));var v="undefined"==typeof i?n:W.ToUint32(i);for(s=p.exec(o);s&&(u=s.index+s[0].length,!(u>h&&(K(l,J(o,h,s.index)),!e&&s.length>1&&s[0].replace(a,function(){for(var e=1;e1&&s.index=v)));)p.lastIndex===s.index&&p.lastIndex++,s=p.exec(o);return h===o.length?!c&&p.test("")||K(l,""):K(l,J(o,h)),l.length>v?q(l,0,v):l}}():"0".split(void 0,0).length&&(c.split=function(e,t){return"undefined"==typeof e&&0===t?[]:X(this,e,t)});var bt=c.replace,wt=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){K(e,n)}),1===e.length&&"undefined"==typeof e[0]}();wt||(c.replace=function(n,r){var i=e(r),o=t(n)&&/\)[*?]/.test(n.source);if(i&&o){var a=function(e){var t=arguments.length,i=n.lastIndex;n.lastIndex=0;var o=n.exec(e)||[];return n.lastIndex=i,K(o,arguments[t-2],arguments[t-1]),r.apply(this,o)};return bt.call(this,n,a)}return bt.call(this,n,r)});var St=c.substr,kt="".substr&&"b"!=="0b".substr(-1);F(c,{substr:function(e,t){var n=e;return e<0&&(n=b(this.length+e,0)),St.call(this,n,t)}},kt);var Tt="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff",Et="​",Ot="["+Tt+"]",xt=new RegExp("^"+Ot+Ot+"*"),Pt=new RegExp(Ot+Ot+"*$"),Ct=c.trim&&(Tt.trim()||!Et.trim());F(c,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return u(this).replace(xt,"").replace(Pt,"")}},Ct);var Mt=m.bind(String.prototype.trim),At=c.lastIndexOf&&"abcあい".lastIndexOf("あい",2)!==-1;F(c,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=u(this),n=u(e),r=arguments.length>1?l(arguments[1]):NaN,i=N(r)?1/0:W.ToInteger(r),o=w(b(i,0),t.length),a=n.length,s=o+a;s>0;){s=b(0,s-a);var c=Y(J(t,s,o+a),n);if(c!==-1)return s+c}return-1}},At);var It=c.lastIndexOf;if(F(c,{lastIndexOf:function(e){return It.apply(this,arguments)}},1!==c.lastIndexOf.length),8===parseInt(Tt+"08")&&22===parseInt(Tt+"0x16")||(parseInt=function(e){var t=/^[\-+]?0[xX]/;return function(n,r){var i=Mt(String(n)),o=l(r)||(t.test(i)?16:10);return e(i,o)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(e){return function(t){var n=Mt(String(t)),r=e(n);return 0===r&&"-"===J(n,0,1)?-0:r}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var jt=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=u(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=u(t)),e?t?e+": "+t:e:t};Error.prototype.toString=jt}if(U){var Bt=function(e,t){if($(e,t)){var n=Object.getOwnPropertyDescriptor(e,t);n.configurable&&(n.enumerable=!1,Object.defineProperty(e,t,n))}};Bt(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Bt(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var Rt=function(){var e="/"+this.source+"/";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),e};RegExp.prototype.toString=Rt}})},function(e,t,n){var r,i;!function(o,a){"use strict";r=a,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i))}(this,function(){var e,t,n,r,i=Function.call,o=Object.prototype,a=i.bind(o.hasOwnProperty),s=i.bind(o.propertyIsEnumerable),u=i.bind(o.toString),c=a(o,"__defineGetter__");c&&(e=i.bind(o.__defineGetter__),t=i.bind(o.__defineSetter__),n=i.bind(o.__lookupGetter__),r=i.bind(o.__lookupSetter__));var l=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){var t=e.__proto__;return t||null===t?t:"[object Function]"===u(e.constructor)?e.constructor.prototype:e instanceof Object?o:null});var f=function(e){try{return e.sentinel=0,0===Object.getOwnPropertyDescriptor(e,"sentinel").value}catch(t){return!1}};if(Object.defineProperty){var h=f({}),p="undefined"==typeof document||f(document.createElement("div"));if(!p||!h)var d=Object.getOwnPropertyDescriptor}if(!Object.getOwnPropertyDescriptor||d){var v="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(l(e))throw new TypeError(v+e);if(d)try{return d.call(Object,e,t)}catch(i){}var u;if(!a(e,t))return u;if(u={enumerable:s(e,t),configurable:!0},c){var f=e.__proto__,h=e!==o;h&&(e.__proto__=o);var p=n(e,t),y=r(e,t);if(h&&(e.__proto__=f),p||y)return p&&(u.get=p),y&&(u.set=y),u}return u.value=e[t],u.writable=!0,u}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var y,g=!({__proto__:null}instanceof Object),m=function(){if(!document.domain)return!1;try{return!!new ActiveXObject("htmlfile")}catch(e){return!1}},_=function(){var e,t;t=new ActiveXObject("htmlfile");var n="script";return t.write("<"+n+">"),t.close(),e=t.parentWindow.Object.prototype,t=null,e},b=function(){var e,t=document.createElement("iframe"),n=document.body||document.documentElement;return t.style.display="none",n.appendChild(t),t.src="javascript:",e=t.contentWindow.Object.prototype,n.removeChild(t),t=null,e};y=g||"undefined"==typeof document?function(){return{__proto__:null}}:function(){var e=m()?_():b();delete e.constructor,delete e.hasOwnProperty,delete e.propertyIsEnumerable,delete e.isPrototypeOf,delete e.toLocaleString,delete e.toString,delete e.valueOf;var t=function(){};return t.prototype=e,y=function(){return new t},new t},Object.create=function(e,t){var n,r=function(){};if(null===e)n=y();else{if(null!==e&&l(e))throw new TypeError("Object prototype may only be an Object or null");r.prototype=e,n=new r,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}var w=function(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){return!1}};if(Object.defineProperty){var S=w({}),k="undefined"==typeof document||w(document.createElement("div"));if(!S||!k)var T=Object.defineProperty,E=Object.defineProperties}if(!Object.defineProperty||T){var O="Property description must be an object: ",x="Object.defineProperty called on non-object: ",P="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(i,a,s){if(l(i))throw new TypeError(x+i);if(l(s))throw new TypeError(O+s);if(T)try{return T.call(Object,i,a,s)}catch(u){}if("value"in s)if(c&&(n(i,a)||r(i,a))){var f=i.__proto__;i.__proto__=o,delete i[a],i[a]=s.value,i.__proto__=f}else i[a]=s.value;else{var h="get"in s,p="set"in s;if(!c&&(h||p))throw new TypeError(P);h&&e(i,a,s.get),p&&t(i,a,s.set)}return i}}Object.defineProperties&&!E||(Object.defineProperties=function(e,t){if(E)try{return E.call(Object,e,t)}catch(n){}return Object.keys(t).forEach(function(n){"__proto__"!==n&&Object.defineProperty(e,n,t[n])}),e}),Object.seal||(Object.seal=function(e){if(Object(e)!==e)throw new TypeError("Object.seal can only be called on Objects.");return e}),Object.freeze||(Object.freeze=function(e){if(Object(e)!==e)throw new TypeError("Object.freeze can only be called on Objects.");return e});try{Object.freeze(function(){})}catch(C){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){if(Object(e)!==e)throw new TypeError("Object.preventExtensions can only be called on Objects.");return e}),Object.isSealed||(Object.isSealed=function(e){if(Object(e)!==e)throw new TypeError("Object.isSealed can only be called on Objects.");return!1}),Object.isFrozen||(Object.isFrozen=function(e){if(Object(e)!==e)throw new TypeError("Object.isFrozen can only be called on Objects.");return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)!==e)throw new TypeError("Object.isExtensible can only be called on Objects.");for(var t="";a(e,t);)t+="?";e[t]=!0;var n=a(e,t);return delete e[t],n})})},,,,,,,,,,function(e,t,n){n(1),n(2);n(13),n(16),n(20),window.NAT_SERVERS=["wss://msg-ws.myun.tv:443"],n(138),"undefined"==typeof window.Mudu&&(window.Mudu=_scope.Entry)},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Utils=n(14)}).call(t,function(){return this}())},function(e,t,n){var r=(n(1),n(2),n(15));t.SetCookie=function(e,t){var n=30,r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),document.cookie="muduapi_"+e+"="+encodeURIComponent(t)+";expires="+r.toGMTString()+";path=/"},t.GetCookie=function(e){var t=document.cookie.match(new RegExp("(^| )muduapi_"+e+"=([^;]*)(;|$)"));return null!=t?decodeURIComponent(t[2]):null},t.DelCookie=function(e){var n=new Date;n.setTime(n.getTime()-1);var r=t.GetCookie(e);null!=r&&(document.cookie="muduapi_"+e+"="+r+";expires="+n.toGMTString())},t.GetRandomNum=function(e,t){var n=e-t,r=Math.random();return t+Math.round(r*n)},t.Guid=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()+e()},t.GetAbsoluteUrl=function(e){var t=e.url,n=e.domain,r=e.https,i=e.http;return r=r||!1,i=i||!1,n=n||"",0===t.indexOf("//")||0===t.indexOf("http")?t:i?"http://"+n+t:r?"https://"+n+t:"//"+n+t},t.GetPrimarySocialLoginType=function(e){var n=t.GetSocialLoginTypeByEnvor();return n||e},t.GetSocialLoginTypeByEnvor=function(){return r.isWechat()?"weixin":r.isQQ()?"qq":"weibo"},t.addEventListener=function(e,t,n){window.addEventListener?e.addEventListener(t,n):window.attachEvent&&e.attachEvent(t,n)}},function(e,t,n){n(1),n(2);t.isWindowsWechat=function(){return/windowswechat/i.test(navigator.userAgent)},t.isWechat=function(){return/micromessenger/i.test(navigator.userAgent)},t.isMobile=function(){return/(mobile|android|iphone|symbianos|ipad|ipod|windows phone)/i.test(navigator.userAgent)},t.isMobileWechat=function(){return t.isWechat()&&t.isMobile()},t.isQQ=function(){var e=navigator.userAgent;return/sq/i.test(e)&&/qq/i.test(e)&&!t.isWechat()},t.isDingding=function(){return/dingtalk/i.test(navigator.userAgent)}},function(e,t,n){(function(t){e.exports=t.JSON=n(17)}).call(t,function(){return this}())},function(e,t,n){var r;(function(e,i){(function(){function o(e,t){function n(e){if(n[e]!==y)return n[e];var o;if("bug-string-char-index"==e)o="a"!="a"[0];else if("json"==e)o=n("json-stringify")&&n("json-parse");else{var a,s='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var c=t.stringify,l="function"==typeof c&&_;if(l){(a=function(){return 1}).toJSON=a;try{l="0"===c(0)&&"0"===c(new r)&&'""'==c(new i)&&c(m)===y&&c(y)===y&&c()===y&&"1"===c(a)&&"[1]"==c([a])&&"[null]"==c([y])&&"null"==c(null)&&"[null,null,null]"==c([y,m,null])&&c({a:[a,!0,!1,null,"\0\b\n\f\r\t"]})==s&&"1"===c(null,a)&&"[\n 1,\n 2\n]"==c([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==c(new u((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==c(new u(864e13))&&'"-000001-01-01T00:00:00.000Z"'==c(new u((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==c(new u((-1)))}catch(f){l=!1}}o=l}if("json-parse"==e){var h=t.parse;if("function"==typeof h)try{if(0===h("0")&&!h(!1)){a=h(s);var p=5==a.a.length&&1===a.a[0];if(p){try{p=!h('"\t"')}catch(f){}if(p)try{p=1!==h("01")}catch(f){}if(p)try{p=1!==h("1.")}catch(f){}}}}catch(f){p=!1}o=p}}return n[e]=!!o}e||(e=c.Object()),t||(t=c.Object());var r=e.Number||c.Number,i=e.String||c.String,a=e.Object||c.Object,u=e.Date||c.Date,l=e.SyntaxError||c.SyntaxError,f=e.TypeError||c.TypeError,h=e.Math||c.Math,p=e.JSON||c.JSON;"object"==typeof p&&p&&(t.stringify=p.stringify,t.parse=p.parse);var d,v,y,g=a.prototype,m=g.toString,_=new u((-0xc782b5b800cec));try{_=_.getUTCFullYear()==-109252&&0===_.getUTCMonth()&&1===_.getUTCDate()&&10==_.getUTCHours()&&37==_.getUTCMinutes()&&6==_.getUTCSeconds()&&708==_.getUTCMilliseconds()}catch(b){}if(!n("json")){var w="[object Function]",S="[object Date]",k="[object Number]",T="[object String]",E="[object Array]",O="[object Boolean]",x=n("bug-string-char-index");if(!_)var P=h.floor,C=[0,31,59,90,120,151,181,212,243,273,304,334],M=function(e,t){return C[t]+365*(e-1970)+P((e-1969+(t=+(t>1)))/4)-P((e-1901+t)/100)+P((e-1601+t)/400)};if((d=g.hasOwnProperty)||(d=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=m?d=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t, n}:(t=n.constructor,d=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,d.call(this,e)}),v=function(e,t){var n,r,i,o=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(i in r)d.call(r,i)&&o++;return n=r=null,o?v=2==o?function(e,t){var n,r={},i=m.call(e)==w;for(n in e)i&&"prototype"==n||d.call(r,n)||!(r[n]=1)||!d.call(e,n)||t(n)}:function(e,t){var n,r,i=m.call(e)==w;for(n in e)i&&"prototype"==n||!d.call(e,n)||(r="constructor"===n)||t(n);(r||d.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(e,t){var n,i,o=m.call(e)==w,a=!o&&"function"!=typeof e.constructor&&s[typeof e.hasOwnProperty]&&e.hasOwnProperty||d;for(n in e)o&&"prototype"==n||!a.call(e,n)||t(n);for(i=r.length;n=r[--i];a.call(e,n)&&t(n));}),v(e,t)},!n("json-stringify")){var A={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},I="000000",j=function(e,t){return(I+(t||0)).slice(-e)},B="\\u00",R=function(e){for(var t='"',n=0,r=e.length,i=!x||r>10,o=i&&(x?e.split(""):e);n-1/0&&s<1/0){if(M){for(h=P(s/864e5),c=P(h/365.2425)+1970-1;M(c+1,0)<=h;c++);for(l=P((h-M(c,0))/30.42);M(c,l+1)<=h;l++);h=1+h-M(c,l),p=(s%864e5+864e5)%864e5,g=P(p/36e5)%24,_=P(p/6e4)%60,b=P(p/1e3)%60,w=p%1e3}else c=s.getUTCFullYear(),l=s.getUTCMonth(),h=s.getUTCDate(),g=s.getUTCHours(),_=s.getUTCMinutes(),b=s.getUTCSeconds(),w=s.getUTCMilliseconds();s=(c<=0||c>=1e4?(c<0?"-":"+")+j(6,c<0?-c:c):j(4,c))+"-"+j(2,l+1)+"-"+j(2,h)+"T"+j(2,g)+":"+j(2,_)+":"+j(2,b)+"."+j(3,w)+"Z"}else s=null;if(n&&(s=n.call(t,e,s)),null===s)return"null";if(u=m.call(s),u==O)return""+s;if(u==k)return s>-1/0&&s<1/0?""+s:"null";if(u==T)return R(""+s);if("object"==typeof s){for(I=a.length;I--;)if(a[I]===s)throw f();if(a.push(s),x=[],B=o,o+=i,u==E){for(A=0,I=s.length;A0)for(r="",n>10&&(n=10);r.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||W();e+=L("0x"+o.slice(t,U));break;default:W()}else{if(34==i)break;for(i=o.charCodeAt(U),t=U;i>=32&&92!=i&&34!=i;)i=o.charCodeAt(++U);e+=o.slice(t,U)}if(34==o.charCodeAt(U))return U++,e;W();default:if(t=U,45==i&&(r=!0,i=o.charCodeAt(++U)),i>=48&&i<=57){for(48==i&&(i=o.charCodeAt(U+1),i>=48&&i<=57)&&W(),r=!1;U=48&&i<=57);U++);if(46==o.charCodeAt(U)){for(n=++U;n=48&&i<=57);n++);n==U&&W(),U=n}if(i=o.charCodeAt(U),101==i||69==i){for(i=o.charCodeAt(++U),43!=i&&45!=i||U++,n=U;n=48&&i<=57);n++);n==U&&W(),U=n}return+o.slice(t,U)}if(r&&W(),"true"==o.slice(U,U+4))return U+=4,!0;if("false"==o.slice(U,U+5))return U+=5,!1;if("null"==o.slice(U,U+4))return U+=4,null;W()}return"$"},z=function(e){var t,n;if("$"==e&&W(),"string"==typeof e){if("@"==(x?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=G(),"]"!=e;n||(n=!0))n&&(","==e?(e=G(),"]"==e&&W()):W()),","==e&&W(),t.push(z(e));return t}if("{"==e){for(t={};e=G(),"}"!=e;n||(n=!0))n&&(","==e?(e=G(),"}"==e&&W()):W()),","!=e&&"string"==typeof e&&"@"==(x?e.charAt(0):e[0])&&":"==G()||W(),t[e.slice(1)]=z(G());return t}W()}return e},H=function(e,t,n){var r=q(e,t,n);r===y?delete e[t]:e[t]=r},q=function(e,t,n){var r,i=e[t];if("object"==typeof i&&i)if(m.call(i)==E)for(r=i.length;r--;)H(i,r,n);else v(i,function(e){H(i,e,n)});return n.call(e,t,i)};t.parse=function(e,t){var n,r;return U=0,F=""+e,n=z(G()),"$"!=G()&&W(),U=F=null,t&&m.call(t)==w?q((r={},r[""]=n,r),"",t):n}}}return t.runInContext=o,t}var a=n(19),s={"function":!0,object:!0},u=s[typeof t]&&t&&!t.nodeType&&t,c=s[typeof window]&&window||this,l=u&&s[typeof e]&&e&&!e.nodeType&&"object"==typeof i&&i;if(!l||l.global!==l&&l.window!==l&&l.self!==l||(c=l),u&&!a)o(c,u);else{var f=c.JSON,h=c.JSON3,p=!1,d=o(c,c.JSON3={noConflict:function(){return p||(p=!0,c.JSON=f,c.JSON3=h,f=h=null),d}});c.JSON={parse:d.parse,stringify:d.stringify}}a&&(r=function(){return d}.call(t,n,t,e),!(void 0!==r&&(e.exports=r)))}).call(this)}).call(t,n(18)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Entry=n(21)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}n(1),n(2);n(22),n(24),n(71),n(73),n(75),n(77),n(82),n(119),n(121),n(123),n(125),n(127),n(129),n(131),n(133),n(135);var i=n(137),o=r(i);e.exports={MsgBus:_scope.MsgBus,Player:_scope.Player,DB:_scope.DB,Utils:_scope.Utils,GetVersion:function(){return o["default"]},Init:function(e,t){"undefined"==typeof _scope.Entry&&(_scope.Entry={}),_scope.Feature.EventBus(_scope.Entry),_scope.MsgBus.OnMultiOnce(["Room.Init.Over","PPT.Inited.Over","User.Init.Over"],function(){_scope.MsgBus.Pub("Room.User.Over"),"function"==typeof t&&t()});var n=new _scope.User({}),r=new _scope.Room({id:e}),i=new _scope.LuckyDraw,o=new _scope.Barrage,a=new _scope.Redpack;_scope.MsgBus.Pub("SendObj.User",n),_scope.MsgBus.Pub("SendObj.LuckyDraw",i),_scope.MsgBus.Pub("SendObj.Barrage",o),_scope.MsgBus.Pub("SendObj.Room",r),_scope.MsgBus.Pub("SendObj.Redpack",a),r.Init(),_scope.Entry.Room=r},Destroy:function(){_scope.MsgBus.UnSubAll("SendObj.User"),_scope.MsgBus.UnSubAll("Room.Init.Over"),_scope.MsgBus.UnSubAll("SendObj.LuckyDraw"),_scope.MsgBus.UnSubAll("SendObj.Barrage"),_scope.MsgBus.UnSubAll("SendObj.Room"),_scope.MsgBus.UnSubAll("SendObj.Redpack"),_scope.MsgBus.Pub("Destroy")}}},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.MsgBus=n(23)}).call(t,function(){return this}())},function(e,t,n){var r=(n(1),n(2),{}),i={};i.Sub=function(e,t){if("function"!=typeof t)return void console.log("cant sub topic ,because cb is not a function(topic,data)");"undefined"==typeof r[e]&&(r[e]={});var n=_scope.Utils.Guid();return r[e][n]=t,{id:n,topic:e}},i.On=function(e,t){return i.Sub.call(this,e,t)},i.OnMultiOnce=function(e,t){var n=this,r=0;if(e instanceof Array){var o=e.length;e.map(function(e){var a=i.Sub.call(n,e,function(){r++,i.UnSub(a),r==o&&"function"==typeof t&&t()})})}},i.Pub=function(e,t){if(window.MUDUDEBUG&&console.log&&console.log("mudubus log ",e,t),"undefined"!=typeof r[e])for(var n in r[e])r[e][n](t,e)},i.UnSub=function(e){"undefined"!=typeof r[e.topic]&&"undefined"!=typeof r[e.topic][e.id]&&delete r[e.topic][e.id]},i.UnSubAll=function(e){delete r[e]},e.exports=i},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Player=n(25)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(26)),o=r(i),a=n(63),s=r(a),u=n(64),c=r(u),l=n(65),f=r(l),h=n(69),p=n(70);e.exports=function(){function e(t){var n=this;(0,c["default"])(this,e),_scope.Feature.EventBus(this),this.id=t.containerId;var r=this._getUserInArrearsCode();return r?void this.dealArrearsThings(r):(this.version=t.version,this.x5Layer=t.x5Layer||!1,this.x5Inline=t.x5Inline||!1,t.src&&!t.file&&(t.file=t.src),this.param=t,this.timer=new _scope.Timer("User.WatchTime",(0,s["default"])({},this.param,{timegap:6e4})),this.player=null,this.init(),_scope.MsgBus.Pub("timer.stop",function(e){return e.param.containerId==n.param.containerId&&e!=n.timer}),void this._listenBrowserEvent())}return(0,f["default"])(e,[{key:"_getUserInArrearsCode",value:function(){return _scope.DB.Get("User.Arrears.Status")}},{key:"dealArrearsThings",value:function(e){var t=document.getElementById(this.id);t.innerHTML="因管理员调试(代码"+e+"),节目暂时无法观看,请稍候"}},{key:"_listenBrowserEvent",value:function(){var e=this,t=function(){e.timer.task&&e.timer.start()};_scope.Utils.addEventListener(window,"beforeunload",t),_scope.Utils.addEventListener(window,"pagehide",t),_scope.Utils.addEventListener(window,"pageshow",t),_scope.Utils.addEventListener(document,"visibilitychange",t),_scope.Utils.addEventListener(window,"unload",t)}},{key:"play",value:function(){this.timer.start(),this.player.play(),_scope.MsgBus.Pub("Player.Play",this)}},{key:"stop",value:function(){var e=this.player.getState(),t="playing"===e||"buffering"===e;this.timer.stop(),t&&this.player.stop(),_scope.MsgBus.Pub("Player.Stoped",this)}},{key:"pause",value:function(){this.timer.stop(),this.player.pause(),_scope.MsgBus.Pub("Player.Paused",this)}},{key:"setPlayerSize",value:function(e,t){return this.player.resize(e,t)}},{key:"remove",value:function(){this.timer.stop(),this.pptTimer.stop(),this.player.remove()}},{key:"init",value:function(){this.player=h(this.id);var e=this,t=this.x5Layer,n=this.x5Inline,r=(0,o["default"])({preload:"none",plugin:{x5:{inline:t,layer:n}}},this.param);delete r.image,delete r.x5Layer,delete r.x5Inline,delete r.version;var i=(0,o["default"])(r,{autostart:this.param.autoplay||this.param.autostart,playlist:[{isLive:this.param.isLive,file:this.param.src,image:this.param.image}]});this.delegatesMethod(),this.player.setup(i).then(function(){_scope.MsgBus.Pub("Player.Ready",e),e.pptTimer=new _scope.Timer("Player.pptTimer",{player:e.player,timegap:1e3,getPosition:function(){return e.player.getPosition()},getPlayFile:function(){var t=e.player.getPlaylistItem(0);return t&&t.file}}),e.pptTimer.start()},function(e){_scope.MsgBus.Pub("Player.SetupError",e)}),e.player.on("play",function(){e.timer.start(),_scope.MsgBus.Pub("Player.Play",e)}),e.player.on("buffer",function(){_scope.MsgBus.Pub("Player.Waiting",e)}),e.player.on("pause",function(){e.timer.stop(),_scope.MsgBus.Pub("Player.Stoped",e)}),e.player.on("complete",function(){e.timer.stop(),_scope.MsgBus.Pub("Player.Ended",e)})}},{key:"delegatesMethod",value:function(){p(this,"player").method("seek").method("on").method("getPlaylist").method("getPlaylistItem").method("load").method("getState").method("getPosition").method("getMute").method("setMute").method("setVolume").method("getFullscreen").method("getHeight").method("getWidth").method("resize").method("switchQuality").method("getControls").method("setControls").method("playAd")}}]),e}()},function(e,t,n){e.exports={"default":n(27),__esModule:!0}},function(e,t,n){n(28),e.exports=n(31).Object.assign},function(e,t,n){var r=n(29);r(r.S+r.F,"Object",{assign:n(44)})},function(e,t,n){var r=n(30),i=n(31),o=n(32),a=n(34),s="prototype",u=function(e,t,n){var c,l,f,h=e&u.F,p=e&u.G,d=e&u.S,v=e&u.P,y=e&u.B,g=e&u.W,m=p?i:i[t]||(i[t]={}),_=m[s],b=p?r:d?r[t]:(r[t]||{})[s];p&&(n=t);for(c in n)l=!h&&b&&void 0!==b[c],l&&c in m||(f=l?b[c]:n[c],m[c]=p&&"function"!=typeof b[c]?n[c]:y&&l?o(f,r):g&&b[c]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[s]=e[s],t}(f):v&&"function"==typeof f?o(Function.call,f):f,v&&((m.virtual||(m.virtual={}))[c]=f,e&u.R&&_&&!_[c]&&a(_,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(33);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(35),i=n(43);e.exports=n(39)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(36),i=n(38),o=n(42),a=Object.defineProperty;t.f=n(39)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(37);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(39)&&!n(40)(function(){return 7!=Object.defineProperty(n(41)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports=!n(40)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var r=n(37),i=n(30).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(37);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(45),i=n(60),o=n(61),a=n(62),s=n(49),u=Object.assign;e.exports=!u||n(40)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=a(e),u=arguments.length,c=1,l=i.f,f=o.f;u>c;)for(var h,p=s(arguments[c++]),d=l?r(p).concat(l(p)):r(p),v=d.length,y=0;v>y;)f.call(p,h=d[y++])&&(n[h]=p[h]);return n}:u},function(e,t,n){var r=n(46),i=n(59);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(47),i=n(48),o=n(52)(!1),a=n(56)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(49),i=n(51);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(50);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(48),i=n(53),o=n(55);e.exports=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if(s=u[l++],s!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){var r=n(54),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(54),i=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(57)("keys"),i=n(58);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(30),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(51);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(26),o=r(i);t["default"]=o["default"]||function(e){for(var t=1;t="5.0.2-12")}function w(e,t){var n,r,i,o;return e.chrome?n=t.indexOf("Chrome")!==-1?t.substring(t.indexOf("Chrome")+7):t.substring(t.indexOf("CriOS")+6):e.safari?n=t.substring(t.indexOf("Version")+8):e.firefox?n=t.substring(t.indexOf("Firefox")+8):e.edge?n=t.substring(t.indexOf("Edge")+5):e.ie&&(t.indexOf("rv:")!==-1?n=t.substring(t.indexOf("rv:")+3):t.indexOf("MSIE")!==-1&&(n=t.substring(t.indexOf("MSIE")+5))),n&&((o=n.indexOf(";"))!==-1&&(n=n.substring(0,o)),(o=n.indexOf(" "))!==-1&&(n=n.substring(0,o)),(o=n.indexOf(")"))!==-1&&(n=n.substring(0,o)),r=parseInt(n,10),i=parseInt(n.split(".")[1],10)),{version:n,major:r,minor:i}}function S(e,t){if(e&&e.length>t)return e[t]}function k(e,t){var n,r,i;if(e.windows)switch(n=S(/Windows(?: NT|)? ([._\d]+)/.exec(t),1)){case"6.1":n="7.0";break;case"6.2":n="8.0";break;case"6.3":n="8.1"}else e.android?n=S(/Android ([._\d]+)/.exec(t),1):e.iOS?n=S(/OS ([._\d]+)/.exec(t),1):e.mac&&(n=S(/Mac OS X (10[._\d]+)/.exec(t),1));if(n){r=parseInt(n,10);var o=n.split(/[._]/);o&&(i=parseInt(o[1],10))}return{version:n,major:r,minor:i}}function T(e,t,n){if(e+="",t-=e.length,t<=0)return e;if(n||0===n||(n=" "),n+=""," "===n&&t<10)return qt[t]+e;for(var r="";;){if(1&t&&(r+=n),t>>=1,!t)break;n+=n}return r+e}function E(e,t){for(var n=[],r=[],i=0;i=0||(r.push(e[i]),n.push(o))}return r}function O(e,t){var n=Object.prototype.toString.call(t);return"[object ".concat(e.toLowerCase(),"]")===n.toLowerCase()}function x(e){return O("number",e)?e<=0?0:e<=1?100*e+"%":e+"px":e}function P(){}function C(e){var t=[];for(var n in e)t.push(n);return t}function M(e){var t={connection:"",stream:""};if(!e)return t;var n,r=e.search(/&(?!\w+=)/);return r!==-1?n=r:(r=n=e.lastIndexOf("/"),0===r&&(r=n=e.length)),t.connection=e.substring(0,r),t.stream=e.substring(n+1,e.length),t}function A(e){var t=function(e){return e<10?"0"+e:""+e},n=Math.floor(e/3600),r=Math.floor((e-3600*n)/60),i=Math.floor(e-3600*n-60*r);return(n>0?[n,r,i]:[r,i]).map(t).join(":")}function I(e){var t=0,n=0;do t+=e.offsetTop||0,n+=e.offsetLeft||0,e=e.offsetParent;while(e);return{top:t,left:n}}function j(e){return window.getComputedStyle?window.getComputedStyle(e):e.currentStyle?e.currentStyle:{}}function B(e){var t=H(e);if(t.left)return t.left;var n=e.offsetLeft,r=e.offsetParent,i=document.body.scrollLeft+document.documentElement.scrollLeft;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;null!==r&&r!==e;)n+=r.offsetLeft,r=r.offsetParent;else for(;null!==r;)n+=r.offsetLeft,r=r.offsetParent;return n-i}function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r=0}function o(){a=E(a,function(e){return e}),e.className=a.join(" ")}var a=e.className.split(" ").filter(function(e){return""!==e.replace(" ","")});return{add:t,remove:n,toggle:r,contains:i}}function F(e){var t=document.createElement("div");return t.innerHTML=e,t.firstChild}function L(e){function t(t){t=t||"YYYY-MM-DD HH:mm:ss.SSS";var n=e.getFullYear(),r=Ht(e.getMonth()+1,2,"0"),i=Ht(e.getDate(),2,0),o=Ht(e.getHours(),2,0),a=Ht(e.getMinutes(),2,0),s=Ht(e.getSeconds(),2,0),u=Ht(e.getMilliseconds(),3,0),c=t.replace("YYYY",n).replace("MM",r).replace("DD",i).replace("HH",o).replace("mm",a).replace("ss",s).replace("SSS",u);return c}return e=e||new Date,{format:t}}function N(e){e=e||new Date;var t=e.getFullYear(),n=Ht(e.getMonth()+1,2,"0"),r=Ht(e.getDate(),2,0),i=Ht(e.getHours(),2,0),o=Ht(e.getMinutes(),2,0),a=Ht(e.getSeconds(),2,0),s=1e6*e.getMilliseconds(),u=-e.getTimezoneOffset(),c=Math.abs(e.getTimezoneOffset()),l=Ht(Math.floor(c/60),2,0),f=Ht(Math.floor(c%60),2,0),h=u<0?"-":"+",p="".concat(t,"-").concat(n,"-").concat(r),d=0===s?"":".".concat(s),v="".concat(i,":").concat(o,":").concat(a).concat(d),y=0===u?"":"".concat(h).concat(l,":").concat(f),g="".concat(v).concat(y),m="".concat(p,"T").concat(g);return m}function W(){var e=L().format("HHmmss"),t=J(3);return e+t}function G(){var e=L().format("MMDDHHmmss"),t=J(5);return e+t}function z(e){var t=C(e),n=t.map(function(t){var n="string"!=typeof e[t]?V(e[t]):e[t];return"".concat(t,"=").concat(encodeURIComponent(n))});return n.join("&")}function H(e){var t={width:e.offsetWidth,height:e.offsetHeight},n=e.getBoundingClientRect(),r={};return C(n).forEach(function(e){r[e]=n[e]}),a({},t,r)}function q(e){var t='
'+''.concat(e,"")+"
";return t}function V(t){var n=[];return JSON.stringify(t,function(t,r){if("object"===e(r)&&null!==r){if(n.indexOf(r)!==-1)return;n.push(r)}return r})}function J(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t="ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=t.toLowerCase(),r="0123456789",i=t+n+r,o="",a=0;at&&(e=t),e+Math.floor(Math.random()*n)}function Y(){return{width:window.screen.width,height:window.screen.height}}function K(e,t){"auto"===e&&(e=Tt());var n=e.split("-")[0],r=C(t),i=r.filter(function(t){return t===e})[0];return i||(i=r.filter(function(e){return 0===e.indexOf(n)})[0]),i||"en"}function $(e,t){var n=a({},e,t);O("array",t.playbackRates)&&(n.playbackRates=t.playbackRates.filter(function(e){return e>0}).map(function(e){return+e})),n.playlist=t.playlist,n.providerOrder=(O("array",t.providerOrder)?t.providerOrder:e.providerOrder).slice();var r=O("object",t.skin)?t.skin:{};n.skin=a({},e.skin,r);var i=O("object",t.logo)?t.logo:{};n.logo=a({},e.logo,i),n.localization=a({},e.localization),C(t.localization||{}).forEach(function(r){O("object",t.localization[r])&&(n.localization[r]=a({},n.localization.en,e.localization[r]||{},t.localization[r]))});var o=O("object",t.videoAttributes)?t.videoAttributes:{};n.videoAttributes=a({},e.videoAttributes,o);var s=O("array",t.contextMenus)?t.contextMenus:[];if(n.contextMenus=d(e.contextMenus).concat(d(s)),O("object",t.plugin)){var u=e.plugin||{};for(var c in t.plugin){var l=u[c]||{},f=t.plugin[c]||{};u[c]=a({},l,f)}n.plugin=u}if(O("object",t.provider)){var h=e.provider||{};for(var p in t.provider){var v=h[p]||{},y=t.provider[p]||{};h[p]=a({},v,y)}n.provider=h}return n}function Q(e){if(O("array",e)){var t=[];if(e.forEach(function(e){var n={};ee(n,e,["isLive","image","description","title","mediaid","defaultPlay","highlights"]),O("string",e.file)&&""!==e.file?(n.sources=[{file:e.file,type:e.type,mineType:e.mineType}],ee(n.sources[0],e,["type"]),t.push(n)):O("array",e.sources)&&O("object",e.sources[0])&&O("string",e.sources[0].file)&&""!==e.sources[0].file&&(n.sources=[],e.sources.forEach(function(e){if(O("string",e.file)&&""!==e.file){var t={file:e.file};ee(t,e,["type","mineType","label","defaultPlay"]),n.sources.push(t)}}),t.push(n))}),O("array",t)&&O("object",t[0])&&O("array",t[0].sources)&&O("object",t[0].sources[0])&&O("string",t[0].sources[0].file)&&""!==t[0].sources[0].file)return t}}function Z(e){var t=["type","mineType","isLive","file","image","description","title","playlist"],n={};for(var r in e)t.indexOf(r)<0&&void 0!==e&&(n[r]=e[r]);if(O("array",e.playlist))n.playlist=Q(e.playlist);else if(O("string",e.file)&&e.file){var i={};ee(i,e,["isLive","image","description"]);var o={file:e.file,type:e.type,mineType:e.mineType,label:"default"};i.sources=[o],n.playlist=[i]}return n}function ee(e,t,n){n.forEach(function(n){O("undefined",t[n])||(e[n]=t[n])})}function te(){return rn}function ne(e){rn=$(rn,Z(e))}function re(){var e=this,t=this._container,n=this.dom;U(t).add(Jr);var r=this._config.skin,i=new yi(r.url,(!0));i.load().then(function(){U(t).remove(Jr),e.trigger(Oi)});var o=oe(this._status.localization);t.innerHTML=o,U(t).add(pi),U(t).add(Ir),U(t).add(Xr),U(t).add("".concat(Hr,"-").concat(r.name)),Pt()&&U(t).add(qr),n.container=t,n.aspect=t.querySelector(".".concat(gn)),n.fullscreen=t.querySelector(".".concat(ui)),n.caption=t.querySelector(".".concat(ai)),n.video=t.querySelector("video"),n.videoWrap=t.querySelector(".".concat(_n)),n.controllerWrap=t.querySelector(".".concat(Pn)),n.controller=t.querySelector(".".concat(In)),n.controllerMask=t.querySelector(".".concat(Cn)),n.controllerBlank=t.querySelector(".".concat(Mn)),n.controllerRightIcons=t.querySelector(".".concat(fr)),n.leftPlayBtn=t.querySelector(".".concat(ci)),n.volumeWrap=t.querySelector(".".concat(Fn)),n.volumeButton=t.querySelector(".".concat(li)),n.volumeBar=t.querySelector(".".concat(Wn)),n.volumeBarWrap=t.querySelector(".".concat(Nn)),n.volumeBarWrapWrap=t.querySelector(".".concat(Ln)),n.playedBar=t.querySelector(".".concat(or)),n.loadedBar=t.querySelector(".".concat(ir)),n.playedBarWrap=t.querySelector(".".concat(Vn)),n.barPopup=t.querySelector(".".concat(Xn)),n.barImg=t.querySelector(".".concat(Kn)),n.barTime=n.playedBarTime=t.querySelector(".".concat(tr)),n.barText=t.querySelector(".".concat(Qn)),n.barTextTime=t.querySelector(".".concat(Zn)),n.barTextText=t.querySelector(".".concat(er)),n.ptime=t.querySelector(".".concat(Hn)),n.dtime=t.querySelector(".".concat(qn)),n.logoWrap=t.querySelector(".".concat(Sn)),n.logoImg=t.querySelector(".".concat(Sn," img")),n.logoLink=t.querySelector(".".concat(wn)),n.bezel=t.querySelector(".".concat(ii)),n.background=t.querySelector(".".concat(wr)),n.title=t.querySelector(".".concat(kn)),n.settingBtn=t.querySelector(".".concat(si)),n.errorWrap=t.querySelector(".".concat(_r)),n.errorText=t.querySelector(".".concat(mr)),n.highlight=t.querySelector(".".concat(ar)),n.flashTip=t.querySelector(".".concat(vr)),n.flash=t.querySelector(".".concat(dr)),n.notice=t.querySelector(".".concat(Pr)),n.switchQuality=t.querySelector(".".concat(Un)),n.bigPlayBtn=t.querySelector(".".concat(An)),this.trigger(mi)}function ie(){this._container.innerHTML="",U(this._container).remove(/mudu-.*/),U(this._container).remove("mudu")}function oe(e){var t=""+'
')+'
')+'
')+'
')+'
')+'
')+'')+'')+"
"+'
')+'')+"
"+'
')+'
')+'
')+'
')+'
')+'')+"
"+'
')+"
"+'
')+'
')+'
')+'"+'
')+'"+'
')+'
')+'
')+'')+"
"+'')+'')+" / "+'')+""+'')+'')+"Live
"+'
')+'')+'')+'')+'')+"
"+'
')+'
')+'
')+'
')+'
')+'
')+"
"+'
')+'
')+'')+'')+"
"+'
')+'
')+'
')+'')+"
"+'
')+"
"+'
')+'
')+'
')+'
There is some error:
')+"
"+'"+'
');return t}function ae(e,t){return this instanceof ae?(this.proto=e,void(this.target=t)):new ae(e,t)}function se(e){e[go.requestFullscreen]()}function ue(){document[go.exitFullscreen]()}function ce(){return Boolean(document[go.fullscreenEnabled])}function le(e){R(document,go.fullscreenchange,e)}function fe(e){D(document,go.fullscreenchange,e)}function he(){return document[go.fullscreenElement]}function pe(){R(document,"mouseover",function(e){var t=e.target||e.srcElement;ge(t)&&bo.trigger("mouseover",e,t)}),R(document,"mouseout",function(e){var t=e.target||e.srcElement;ge(t)&&bo.trigger("mouseout",e,t)}),R(document,"click",function(e){var t=e.target||e.srcElement;return de()?void ye():void(ge(t)&&bo.trigger("click",e,t))})}function de(){return wo.filter(function(e){return e.isShow()}).length>0}function ve(e){return wo.filter(function(t){return t.isShow()&&t.getConfig()["class"]===e}).length>0}function ye(){wo.forEach(function(e){return e.hide()})}function ge(e){return e&&""===e.getAttribute("mudu-tooltip")}function me(t){function n(){var e=document.createElement("div");return f.container.appendChild(e),e.setAttribute("class",f["class"]),R(e,"click",function(e){e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0}),e.style.cssText="position: absolute; top: 0; left: ".concat(_o,"; opacity: 0; visibility: hidden;"),e}function r(){return h&&h.style.left!==_o}function i(){var e=wo.indexOf(g);e<0||(bo.off("mouseover",p),bo.off("mouseout",d),bo.off("click",v),h.parentElement.removeChild(h),t&&t.removeAttribute("mudu-tooltip"),wo.splice(e,1))}function o(t){"string"==typeof t&&(h.innerHTML=t),"object"===e(t)&&(h.innerHTML="",h.appendChild(t))}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.left,r=e.top;if(u(),void 0===n&&void 0===r&&"top"===f.placement){var i=H(f.container),o=H(h),a=H(t),s=f.distance;n=a.left+a.width/2-o.width/2-i.left,r=a.top-o.height-s-i.top,n+o.width>i.right&&(n=i.right-o.width),n<0&&(n=i.left)}h.style.left=n+"px",h.style.top=r+"px",h.style.visibility="visible",h.style.opacity=1}function u(){var e=H(f.container),t=f.getMaxHeight(e);h.style.maxHeight=x(t)}function c(){return h}function l(){h&&(h.style.left=_o,h.style.opacity=0,h.style.visibility="hidden")}var f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t="string"==typeof t&&t?document.querySelector(t):t,f=a({},mo,f),t&&t.setAttribute("mudu-tooltip","");var h=n();o(f.content);var p=bo.on("mouseover",function(e,n){n===t&&"hover"===f.trigger&&s()}),d=bo.on("mouseout",function(e,n){n===t&&"hover"===f.trigger&&l()}),v=bo.on("click",function(e,n){n===t&&"click"===f.trigger&&s()}),y=function(){return a({},f)},g={hide:l,isShow:r,destroy:i,getTooltipContainer:c,updateContent:o,show:s,getConfig:y};return wo.push(g),g}function _e(e,t){if(ko[e])return void console.warn("provider [".concat(e,"] is existed, so it will not be register twice, you can change a name and retry"));var n=t.isHTML5(),r=t.isFlash();if(!n&&!r)throw new TypeError("registerProvider(name, Provider): Provider should extends HTML5Provider or FlashProvider");ko.push({name:e,html5:n,flash:r,Provider:t}),ne({provider:o({},e,t.defaultOptions)})}function be(){return ko}function we(e){for(var t=0;t=0&&(a+=n-o),r>=0&&e.html5&&(s+=n-r),i>=0&&e.flash&&(s+=n-i);var u=Math.max(a,s);return a>0&&s>0&&(u+=.5),{p:e,name:e.name,w:u}});return o.sort(function(e,t){return t.w-e.w}),o.map(function(e){return e.p})}function Te(e){var t=e.type,n=e.mineType,r=e.url,i=e.isLive,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=Se(),s=a.filter(function(e){var o=e.Provider,a=o.canPlayType&&o.canPlayType(t,i),s=o.canPlayMineType&&o.canPlayMineType(n,i),u=o.canPlaySource&&o.canPlaySource(r,i);return!!(a||s||u)}),u=ke(s,o);return u[0]}function Ee(){for(var e,t=0;t1&&void 0!==arguments[1]?arguments[1]:0,n=this._config.playlist,r=!!n[e];if(!r)return r;for(var i=0;i=e}function Ie(e,t,n){var r,i=document.getElementById(n);if(jo&&jo<312)return r;if(i){var o,a,s,u=Io?document.createElement("div"):document.createElement("object");"undefined"==typeof e.id&&(e.id=n);for(s in t)t.hasOwnProperty(s)&&"movie"!==s.toLowerCase()&&Be(u,s,t[s]);Io&&(u=je(e.data,u.innerHTML));for(o in e)e.hasOwnProperty(o)&&(a=o.toLowerCase(),"styleclass"===a?u.setAttribute("class",e[o]):"classid"!==a&&"data"!==a&&u.setAttribute(o,e[o]));Io?Mo[Mo.length]=e.id:(u.setAttribute("type",Co),u.setAttribute("data",e.data)),i.parentNode.replaceChild(u,i),r=u}return r}function je(e,t){var n=document.createElement("div");return n.innerHTML=""+t+"",n.firstChild}function Be(e,t,n){var r=document.createElement("param");r.setAttribute("name",t),r.setAttribute("value",n),e.appendChild(r)}function Re(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"muduPlayer";return this instanceof Re?void(this.storeKey=e):new Re(e)}function De(){var e=this;try{Ue.call(this)}catch(t){console.error("destroy provider",t)}console.log("initProvider");var n=Ee.call(this),r=n.file,i=n.type,o=n.mineType,s=n.isLive,u=n.absoluteFile,c=n.image,l=Te({type:i,mineType:o,url:r,isLive:s},this._config.providerOrder);if(!l){var t="File type not supported";return this.trigger(Ji,{message:t,fatal:!0,errorId:W()}),Promise.reject(new TypeError(t))}var f=new l.Provider(this,this._config.provider[l.name]);this._provider=a({},l,{instance:f});var h=this;return f.loadFiles().then(function(){var e=f.getMediaElement();if(!e){var t=f.createMediaElement();if(!t)throw new Error(Uo.Error.NotAllowedError);h.dom.videoWrap.insertBefore(t,h.dom.background)}}).then(function(){return console.log("instance setup"),f.setup({isLive:s,file:r,absoluteFile:u,type:i,mineType:o})}).then(function(){console.log("provider setup 成功 "),e.trigger(wi,{isLive:s,file:r,absoluteFile:u,type:i,mineType:o,image:c})})["catch"](function(t){throw console.error("provider setup 错误",t),e.trigger(Ji,{error:t,message:t.message,column:t.columnNumber,fileName:t.fileName,lineNumber:t.lineNumber,name:t.name,stack:t.stack,errorId:W()}),t})}function Ue(){console.log("destroyProvider");var e=this._provider&&this._provider.instance;e&&(this._provider=null,e.remove(),this.trigger(Si))}function Fe(e,t){return t={exports:{}},e(t,t.exports),t.exports}function Le(e){var t=ca.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}function Ne(){for(var e={},t=0;t0&&(l=setTimeout(function(){if(!c){c=!0,s.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}},e.timeout)),s.setRequestHeader)for(u in d)d.hasOwnProperty(u)&&s.setRequestHeader(u,d[u]);else if(e.headers&&!Ge(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(s.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(s),s.send(p||null),s}function Ve(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(n){}return null}function Je(){}function Xe(e,t){var n=N(),r=C(t),i={time:n};r.forEach(function(e){i[e]=V(t[e])});try{Aa({url:e+"?time="+decodeURIComponent(n),method:"POST",body:V(i),headers:{"Content-Type":"application/json"}},P)}catch(o){}}function Ye(e,t){var n=z(a({},t,{time:N()}));Aa("".concat(e,"?").concat(n),P)}function Ke(){this.model.fullscreen=new So(this),this.model.video=new Lo(this),this.model.progress=new Wo(this),this.model.controls=new Go(this),this.model.volume=new zo(this),this.model.playlist=new Ho(this),this.model.hotkeys=new Vo(this),this.model.resize=new Jo(this),this.model.stretch=new Xo(this),this.model.logo=new Yo(this),this.model.focus=new Ko(this),this.model.bezel=new $o(this),this.model.background=new Qo(this),this.model.dom=new Zo(this),this.model.title=new ea(this),this.model.contextMenu=new ta(this),this.model.error=new ra(this),this.model.progressPopup=new na(this),this.model.notice=new ia(this),this.model.qualitySwitch=new oa(this),this.model.perf=new ja(this),this.model.textTrack=new Ba(this),this.model.subtitle=new Ra(this),this.model.myunSync=new Fa(this),this.model.orientation=new Na(this),this.trigger(_i)}function $e(){for(var e in this.model)this.model[e].remove()}function Qe(){var e=this;this.timer={},this.timer.loading=new Bo({type:"loading",gap:200}),this.timer.raf=new Bo({type:"raf",isRaf:!0});var t=0,n=0,r=!1;this.timer.loading.on("tick",function(i){var o=i.isStop;if(!o){n=e.model.progress.getPosition();var a=e.model.video.getState(),s="playing"===a||"buffering"===a;!r&&n===t&&s&&(r=!0,e.trigger("internal_buffer",!0)),r&&n>t&&s&&(r=!1,e.trigger("internal_buffer",!1)),t=n}});var i=-1;this.timer.raf.on("tick",function(t){var n=t.isStop;if(!n){var r=e.model.resize.getWidth(),o=U(e.dom.container).contains(Kr);r<350?!o&&U(e.dom.container).add(Kr):o&&U(e.dom.container).remove(Kr),i!==r&&(e.model.subtitle._setSubtitleSize(r),e.model.subtitle._updateSubtitleStyle()),i=r;var a=+j(e.dom.container).fontSize.replace(/[^\d]+/,"");e._status.containerFontSize=a<16?16:a}}),this.timer.raf.start()}function Ze(){this.timer.loading.stop(),this.timer.raf.stop()}function et(e,t){return Wa[e]?void console.warn("provider [".concat(e,"] is existed, so it will not be register twice, you can change a name and retry")):(Wa[e]={name:e,Plugin:t},void ne({plugin:o({},e,t.defaultOptions)}))}function tt(){return Wa}function nt(e){return Wa[e]||null}function rt(){var e=tt();for(var t in e){var n=e[t];n.Plugin.isSupported()&&(this.plugin[t]=new n.Plugin(this,this._config.plugin[t]))}this.trigger(bi)}function it(){if(this.plugin)for(var e in this.plugin)this.plugin[e]&&this.plugin[e].remove()}function ot(){var e=function(e){function t(){return n(this,t),f(this,u(t).apply(this,arguments))}return s(t,e),i(t,[{key:"loadInternal",value:function(){var e,t=this.context;e=this.loader=new window.XMLHttpRequest;var n=this.stats;n.tfirst=0,n.loaded=0;var r=this.xhrSetup,i="https:"===window.location.protocol?t.url.replace(/^http:/,"https:"):t.url;try{if(r)try{r(e,i)}catch(o){e.open("GET",i,!0),r(e,i)}e.readyState||e.open("GET",i,!0)}catch(o){return void this.callbacks.onError({code:e.status,text:o.message},t,e)}t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()}}]),t}(window.Hls.DefaultConfig.loader);return{XHRLoader:e}}function at(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function st(e,t){var n,r,i,o,a,s,u=!1;t||(t={}),n=t.debug||!1;try{i=Ka(),o=document.createRange(),a=document.getSelection(),s=document.createElement("span"),s.textContent=e,s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",document.body.appendChild(s), o.selectNode(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");u=!0}catch(l){n&&console.error("unable to copy using execCommand: ",l),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData("text",e),u=!0}catch(l){n&&console.error("unable to copy using clipboardData: ",l),n&&console.error("falling back to prompt"),r=at("message"in t?t.message:$a),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return u}function ut(e){var t=document.getElementById(e);if(!t)throw new Error("muduPlayer(container): container should be an id of a div in the body, but not found");if(ts[e]&&ts[e]._status)return ts[e];es++;var n=new Ga(e);return ts[e]=n,n._status.index=es,n}var ct=navigator.userAgent,lt=function(e){return null!==ct.match(e)},ft=m(/gecko\//i),ht=m(/trident\/.+rv:\s*11/i),pt=m(/iP(hone|od)/i),dt=m(/iPad/i),vt=m(/Macintosh/i),yt=m(/FBAV/i),gt=function(){return lt(/\sEdge\/\d+/i)},mt=function(){return lt(/msie/i)},_t=function(){return lt(/\s(?:(?:Headless)?Chrome|CriOS)\//i)&&!gt()&&!lt(/UCBrowser/i)},bt=function(){return gt()||ht()||mt()},wt=function(){return lt(/safari/i)&&!lt(/(?:Chrome|CriOS|chromium|android|phantom)/i)},St=function(){return lt(/iP(hone|ad|od)/i)},kt=function(){return window.location.href.indexOf("playerdebug")>=0},Tt=function(){return navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage},Et=function(){return!(lt(/chrome\/[123456789]/i)&&!lt(/chrome\/18/i)&&!ft())&&xt()},Ot=function(){var e=ct.toLowerCase();return!!/webkit/.test(e)&&parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1"))},xt=function(){return lt(/Android/i)&&!lt(/Windows Phone/i)},Pt=function(){return St()||xt()||lt(/Windows Phone/i)},Ct=function(){return lt("Windows")>-1},Mt=function(){try{return window.self!==window.top}catch(e){return!0}},At=function(){return It()||jt()},It=function(){var e=ct,t=/tbs\/(\d+) /gi.exec(e);return!!xt(e)&&(!!t&&(t[1]||"")>"036849")},jt=function(){var e=ct,t=/MQQBrowser\/([\d+.]+) /gi.exec(e);return!!xt(e)&&(!!t&&+(t[1]||"")>=7.1)},Bt=function(){if(xt())return 0;var e,t=navigator.plugins;if(t&&(e=t["Shockwave Flash"],e&&e.description))return parseFloat(e.description.replace(/\D+(\d+\.?\d*).*/,"$1"));if("undefined"!=typeof window.ActiveXObject){try{if(e=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return parseFloat(e.GetVariable("$version").split(" ")[1].replace(/\s*,\s*/,"."))}catch(n){return 0}return e}return 0},Rt=navigator.userAgent,Dt={chrome:_t(),edge:gt(),firefox:ft(),ie:bt(),msie:mt(),safari:wt()};Dt.version=w(Dt,Rt);var Ut={android:xt(),iOS:St(),mobile:Pt(),mac:vt(),iPad:dt(),iPhone:pt(),windows:Ct()};Ut.version=k(Ut,Rt);var Ft={flashInstalled:_(),flashSupported:b(),flashVersion:Bt(),iframe:Mt()},Lt={browser:Dt,os:Ut,others:Ft},Nt=Dt.version,Wt=Ut.version,Gt=function(){return JSON.parse(JSON.stringify(Lt))},zt=Object.freeze({browserVersion:Nt,osVersion:Wt,getEnvor:Gt,isFlashInstalled:_,isFlashSupported:b,isFF:ft,isIETrident:ht,isIPod:pt,isIPad:dt,isOSX:vt,isFacebook:yt,isEdge:gt,isMSIE:mt,isChrome:_t,isIE:bt,isSafari:wt,isIOS:St,isDebugMode:kt,getLanguage:Tt,isAndroidNative:Et,getWebkitVersion:Ot,isAndroid:xt,isMobile:Pt,isWindows:Ct,isIframe:Mt,isX5Layer:At,isWxLayer:It,isQQLayer:jt,flashVersion:Bt}),Ht=T,qt=[""," "," "," "," "," "," "," "," "," "],Vt=function(){return!0},Jt=function(){return!1},Xt=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)}}(),Yt=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCanelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(e){window.clearTimeout(e)}}(),Kt=0,$t=function(){function e(){n(this,e),this._listeners={}}return i(e,[{key:"on",value:function(e,t){var n=++Kt;return this._listeners[e]=this._listeners[e]||[],this._listeners[e].push({id:n,listener:t,once:!1}),n}},{key:"once",value:function(e,t){var n=++Kt;return this._listeners[e]=this._listeners[e]||[],this._listeners[e].push({id:n,listener:t,once:!0}),n}},{key:"off",value:function(e,t){this._listeners[e]=this._listeners[e]||[];for(var n=0;n1?t-1:0),r=1;r=0;o--){var a=this._listeners[e][o];try{a.listener.apply(a,n)}catch(s){throw console.error(s),s}a.once&&i.splice(o,1)}this._listeners[e]=i,"all"!==e&&this.trigger.apply(this,["all",e].concat(n))}},{key:"clear",value:function(){this._listeners={}}}]),e}(),Qt={Pause:"暂停",Speed:"速度",Normal:"正常",Settings:"设置","Full screen":"全屏","Exit full screen":"退出全屏","You can try":"你可以尝试","Switch to Flash":"切换到Flash","Switch to HTML5":"切换到HTML5",Reload:"重新加载","Unknown Error":"未知错误","Network Error":"网络错误","Media Error":"编解码错误",Mute:"静音",Unmute:"取消静音",Quality:"画质",Live:"直播",Autoplay:"自动播放",Captions:"字幕","Copy debug info":"复制排错日志","Upload debug info":"上传排错日志"},Zt={Pause:"暫停",Speed:"速度",Normal:"正常",Settings:"設置","Full screen":"全螢幕","Exit full screen":"結束全螢幕","You can try":"妳可以嘗試","Switch to Flash":"切換到Flash","Switch to HTML5":"切換到HTML5",Reload:"重新加載","Unknown Error":"未知錯誤","Network Error":"網路錯誤","Media Error":"編解碼錯誤",Mute:"靜音",Unmute:"解除靜音",Quality:"畫質",Live:"直播",Autoplay:"自動播放",Captions:"字幕","Copy debug info":"複製偵錯資訊","Upload debug info":"上傳偵錯資訊"},en={};for(var tn in Qt)en[tn]=tn;var nn={"zh-CN":Qt,"zh-TW":Zt,en:en},rn={mute:!1,autoplay:!1,repeat:!1,playbackRateControls:!1,playbackRates:[.25,.75,1,1.25],controls:!0,aspectratio:"",height:270,width:480,displaytitle:!0,displaydescription:!0,stretching:"contain",qualityLabels:"",preload:"none",playlist:[],skin:{name:"default",url:"/topic/minisiteStatic/ebg/js/vendor/mudu/mudu-player.css"},logo:{file:"",hide:!1,link:"",marginw:"3%",marginh:"6%",width:"15%",height:"10%",opacity:1,position:"top-right"},providerOrder:["html5","hlsjs"],plugin:{},provider:{flvjs:{"flv.js":{fixAudioTimestampGap:!1}}},fileCdnPath:"https://static.mudu.tv/mudu-player/0.21.0/assets",videoAttributes:{"webkit-playsinline":"true",playsinline:"","x-webkit-airplay":"allow"},contextMenus:[{key:"version",text:"Mudu-player v0.21.0",link:"http://mudu.tv/?source=mudu-player"}],errorLogUrl:"https://svc.mudu.tv/kafka_producer/api/send_msg",perfLogUrl:"",renderError:null,language:"auto",localization:nn,showSubtitle:!0,myunSyncTextTrackLabel:"ppt_sync",uniqId:"",enableErrorRetry:!1,errorMaxRetry:10,errorMaxRetryTimeout:15e3,errorRetryDelay:3e3},on="mudu-icon-play",an="mudu-icon-pause",sn="mudu-icon-volume-up",un="mudu-icon-volume-down",cn="mudu-icon-volume-off",ln="mudu-icon-fullscreen",fn="mudu-icon-fullscreen-off",hn="mudu-icon-setting",pn="mudu-icon-load",dn="mudu-icon-check",vn="mudu-icon-error",yn=/mudu-icon-[\w-]+/,gn="mudu-aspect",mn="mudu-mask",_n="mudu-video-wrap",bn="mudu-video",wn="mudu-logo-link",Sn="mudu-logo",kn="mudu-video-title",Tn="mudu-video-danmaku",En="mudu-subtitle",On="mudu-subtitle-item",xn="mudu-bezel",Pn="mudu-controller-wrap",Cn="mudu-controller-mask",Mn="mudu-controller-blank",An="mudu-big-play-btn",In="mudu-controller",jn="mudu-icons",Bn="mudu-icons-left",Rn="mudu-icon",Dn="mudu-switch-text",Un="mudu-switch-quality",Fn="mudu-volume",Ln="mudu-volume-bar-wrap",Nn="mudu-volume-bar",Wn="mudu-volume-bar-inner",Gn="mudu-thumb",zn="mudu-time",Hn="mudu-ptime",qn="mudu-dtime",Vn="mudu-bar-wrap",Jn="mudu-bar-preview",Xn="mudu-bar-popup",Yn="mudu-bar-popup-text",Kn="mudu-bar-img",$n="mudu-bar-text-wrap",Qn="mudu-bar-text",Zn="mudu-bar-text-time",er="mudu-bar-text-text",tr="mudu-bar-time",nr="mudu-bar-time-wrap",rr="mudu-bar",ir="mudu-loaded",or="mudu-played",ar="mudu-highlight",sr="mudu-dot",ur="mudu-panel",cr="mudu-live-badge",lr="mudu-live-dot",fr="mudu-icons-right",hr="mudu-bezel-transition",pr="hidden",dr="mudu-flash",vr="mudu-flash-tip",yr="mudu-flash-tip-inner",gr="mudu-error-icon",mr="mudu-error-text",_r="mudu-error-wrap",br="mudu-error-inner",wr="mudu-background",Sr="mudu-menuitem",kr="mudu-menuitem-label",Tr="mudu-contextmenu-panel",Er="mudu-panel-menu",Or="mudu-menuitem-label",xr="mudu-quality-panel",Pr="mudu-notice",Cr="mudu-live",Mr="mudu-playback",Ar="mudu-x5-layer",Ir="mudu",jr="mudu-fullscreen",Br="mudu-aspect-mode",Rr="mudu-normal-mode",Dr="mudu-hide-controller",Ur="mudu-hide-time",Fr="mudu-state-idle",Lr="mudu-state-error",Nr="mudu-stretch",Wr="mudu-provider-flash",Gr="mudu-provider-html5",zr="mudu-provider-ready",Hr="mudu-skin",qr="mudu-mobile",Vr="mudu-flash-disabled",Jr="mudu-hide-everything",Xr="mudu-hide-setting",Yr="mudu-flag-dragging",Kr="mudu-flag-small-player",$r="mudu-source-single",Qr="mudu-source-multi",Zr=/mudu-state-\w+/,ei=/mudu-stretch-\w+/,ti=/mudu-provider-\w+/,ni=/mudu-source-\w+/,ri="mudu-fakefullscreen-icon",ii="mudu-bezel-icon",oi="mudu-loading-icon",ai="mudu-caption-icon",si="mudu-setting-icon",ui="mudu-fullscreen-icon",ci="mudu-play-icon",li="mudu-volume-icon",fi="mudu-hide",hi="mudu-active",pi="mudu-reset",di={},vi={NEW:0,LOADING:1,ERROR:2,COMPLETE:3},yi=function(e){function t(e){var r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n(this,t),r=f(this,u(t).call(this)),r.url=e,r.isStyle=i,r.status=vi.NEW,r}return s(t,e),i(t,[{key:"getElement",value:function(){if(this.isStyle){var e=document.createElement("link");return e.type="text/css",e.rel="stylesheet",e.href=this.url,e}var t=document.createElement("script");return t.src=this.url,t}},{key:"getStatus",value:function(){return this.status}},{key:"load",value:function(){var e=this;this.status!==vi.NEW&&Promise.reject(new Error("loader.load can only call once"));var t=di[this.url];if(t&&t.isStyle===this.isStyle){var n=t.loader.getStatus();if(n===vi.COMPLETE)return setTimeout(function(){e.trigger("done")},0),Promise.resolve()}var r=document.getElementsByTagName("head")[0]||document.documentElement,i=this.getElement(),o=this;return new Promise(function(e,t){var n=!1;i.onload=i.onreadystatechange=function(t){n||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(i.onload=i.onreadystatechange=null),n=!0,setTimeout(function(){o.trigger("done"),o.status=vi.COMPLETE,e()},0)},i.onerror=function(e){o.trigger("error"),t(e)},r.insertBefore(i,r.firstChild),o.status=vi.LOADING,di[o.url]={isStyle:o.isStyle,loader:o}})}}]),t}($t),gi="internal_option_merged",mi="internal_dom_inited",_i="internal_model_inited",bi="internal_plugin_inited",wi="internal_provider_inited",Si="internal_provider_removed",ki="internal_plugin_init",Ti="internal_status_formated",Ei="internal_key_down",Oi="internal_style_loaded",xi="contextMenuClick",Pi="play",Ci="pause",Mi="controls",Ai="controlsVisible",Ii="fullscreen",ji="complete",Bi="playlistComplete",Ri="playlist",Di="playlistItem",Ui="time",Fi="duration",Li="resize",Ni="idle",Wi="beforePlay",Gi="mute",zi="volume",Hi="canSeek",qi="seek",Vi="seeked",Ji="error",Xi="textTrackChange",Yi="textTrackAdd",Ki="textTrackCueChange",$i="ended",Qi="bufferchange",Zi="timeupdate",eo="duration",to="stageclick",no="stagedoubleclick",ro="play",io="pause",oo="mute",ao="volume",so="seeked",uo="seek",co="error",lo="loadeddata",fo="waiting",ho="texttrackadd",po="texttrackchange",vo="cuechange";ae.prototype.method=function(e){var t=this.proto,n=this.target;return t[e]=function(){return kt()&&console.log("[delegates]: (".concat(t.constructor.name," | ").concat(n.constructor.name,").").concat(e," --"),V([].slice.call(arguments))),"model"===n.TAG&&this.trigger("delegate-model",{fn:e,args:[].slice.call(arguments)}),n[e].apply(n,arguments)},this};var yo=function(){function e(t){n(this,e),this.player=t,this.lang=t._status.localization,this.m_player_events=[],this.m_dom_events=[],this.m_provider_events=[],this.m_removed=!1,this.TAG="model"}return i(e,[{key:"provider",value:function(){return this.player._provider&&this.player._provider.instance}},{key:"remove",value:function(){var e=this;this.m_removed=!0,this.m_player_events.forEach(function(t){return e.player.off(t.evt,t.fn)}),this.m_dom_events.forEach(function(e){return D(e.ele,e.evt,e.fn)}),this.m_provider_events.forEach(function(t){e.provider()&&e.provider().off(t.evt,t.fn)})}},{key:"onPlayer",value:function(e,t){this.player.on(e,t),this.m_player_events.push({evt:e,fn:t})}},{key:"oncePlayer",value:function(e,t){this.player.once(e,t),this.m_player_events.push({evt:e,fn:t})}},{key:"onDom",value:function(e,t,n){R(e,t,n),e===this.player.dom.container&&this.m_dom_events.push({ele:e,evt:t,fn:n})}},{key:"onProvider",value:function(e,t){this.provider()&&(this.provider().on(e,t),this.m_provider_events.push({evt:e,fn:t}))}},{key:"onceProvider",value:function(e,t){this.provider()&&(this.provider().once(e,t),this.m_provider_events.push({evt:e,fn:t}))}}]),e}(),go=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,r=t.length,i={};n0&&void 0!==arguments[0])||arguments[0],t=this.player.dom.container,n=this.isFullscreen,r=this.player.dom.container.querySelector(".".concat(bn));ce()?e?!n&&se(t):n&&ue():Pt()&&r.webkitSupportsFullscreen?e?r.webkitEnterFullScreen():r.webkitExitFullScreen():(this.isFullscreen=e,this.onAfterFullScreen())}}]),t}(yo),ko=[],To=function(e){var t=document.createElement("a");return t.setAttribute("href",e),t.href},Eo=function(e){var t=/^https?:.+(\.(\w+))\??(?![.\w\/])/,n=e.match(t),r=/^([a-zA-Z]+):.*/,i=e.match(r);return n?n[2]:i?i[1]:""},Oo=function(e){var t={aac:"audio/mp4",mp4:"video/mp4",f4v:"video/mp4",m4v:"video/mp4",mov:"video/mp4",mp3:"audio/mpeg",mpeg:"audio/mpeg",ogv:"video/ogg",ogg:"video/ogg",oga:"video/ogg",vorbis:"video/ogg",webm:"video/webm",f4a:"video/aac",m3u8:"application/vnd.apple.mpegurl",m3u:"application/vnd.apple.mpegurl",hls:"application/vnd.apple.mpegurl",flv:"video/x-flv",rtmp:"rtmp/flv",dash:"application/dash+xml",mpd:"application/dash+xml"};return t[e]||""},xo=function(){return new Error("method should be override")},Po=function(e){function t(e,r){var i;return n(this,t),i=f(this,u(t).call(this)),i.player=e,i.option=r,i.p_player_events=[],i.p_dom_events=[],i.p_self_events=[],i.TAG="Provider",i}return s(t,e),i(t,[{key:"loadFiles",value:function(){return Promise.resolve()}},{key:"getMediaElement",value:function(){}},{key:"createMediaElement",value:function(){}},{key:"setup",value:function(){return Promise.reject(xo())}},{key:"remove",value:function(){var e=this;this.p_player_events.forEach(function(t){return e.player.off(t.evt,t.fn)}),this.p_dom_events.forEach(function(e){return D(e.ele,e.evt,e.fn)}),this.p_self_events.forEach(function(t){return e.off(t.evt,t.fn)})}},{key:"getVolume",value:function(){}},{key:"setVolume",value:function(){}},{key:"getMute",value:function(){}},{key:"setMute",value:function(){}},{key:"getWidth",value:function(){return-1}},{key:"getHeight",value:function(){return-1}},{key:"getMetrics",value:function(){return{}}},{key:"getBuffer",value:function(){return[]}},{key:"getCurrentTime",value:function(){}},{key:"getDuration",value:function(){}},{key:"setStretching",value:function(){}},{key:"getStretching",value:function(){}},{key:"getMetadata",value:function(){}},{key:"play",value:function(){}},{key:"pause",value:function(){}},{key:"seek",value:function(){}},{key:"getPlaybackRate",value:function(){}},{key:"setPlaybackRate",value:function(){}},{key:"getTextTracks",value:function(){return[]}},{key:"setTextTrackActive",value:function(e){}},{key:"onPlayer",value:function(e,t){this.player.on(e,t),this.p_player_events.push({evt:e,fn:t})}},{key:"oncePlayer",value:function(e,t){this.player.once(e,t),this.p_player_events.push({evt:e,fn:t})}},{key:"onDom",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];R(e,t,n),r&&this.p_dom_events.push({ele:e,evt:t,fn:n})}},{key:"onSelf",value:function(e,t){this.on(e,t),this.p_self_events.push({evt:e,fn:t})}},{key:"onceSelf",value:function(e,t){this.once(e,t),this.p_self_events.push({evt:e,fn:t})}}]),t}($t);Po.defaultOptions={},Po.canPlayType=P,Po.isSupported=P,Po.canPlaySource=P,Po.canPlayMineType=P,Po.isPlaybackRateSupported=P,Po.isFlash=P,Po.isHTML5=P;var Co="application/x-shockwave-flash",Mo=[],Ao=Bt(),Io=mt(),jo=Ot(),Bo=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this)),r.options=e||{},r.gap=+r.options.gap||1e3,r.isRaf=!!r.options.isRaf,r.task=null,r.dotTime=(new Date).getTime(),r}return s(t,e),i(t,[{key:"start",value:function(){this.trigger("start",{options:this.options}),this.stop(),this._startTimer()}},{key:"tick",value:function(){var e=this._passedTime();this.task&&(this._clearTimer(),e>0&&this.trigger("tick",{options:this.options,duration:e,isStop:!1}),this._startTimer())}},{key:"stop",value:function(){var e=this._passedTime();this.task&&(this._clearTimer(),e>0&&this.trigger("tick",{options:this.options,duration:e,isStop:!0}),this.trigger("stop",{options:this.options}))}},{key:"_internalF",value:function(){var e=this._passedTime();e>0&&this.trigger("tick",{options:this.options,duration:e,isStop:!1}),this._startTimer()}},{key:"_clearTimer",value:function(){this.isRaf?Yt(this.task):clearTimeout(this.task),this.task=null}},{key:"_startTimer",value:function(){var e=this;this.isRaf?this.task=Xt(function(){return e._internalF()}):this.task=setTimeout(function(){return e._internalF()},this.gap)}},{key:"_passedTime",value:function(){var e=(new Date).getTime(),t=e-this.dotTime;return this.dotTime=e,t}}]),t}($t);Re.prototype.get=function(e){var t=this._getData();return t[e]},Re.prototype.set=function(e,t){var n=this._getData();n[e]=t,this._setData(n)},Re.prototype._getData=function(){var e=localStorage.getItem(this.storeKey);try{e=JSON.parse(e)}catch(t){e={}}return e||{}},Re.prototype._setData=function(e){localStorage.setItem(this.storeKey,V(e))};var Ro=function(e){function t(){return n(this,t),f(this,u(t).apply(this,arguments))}return s(t,e),i(t,[{key:"onError",value:function(){this.trigger.apply(this,["onError"].concat(Array.prototype.slice.call(arguments)))}},{key:"onEvent",value:function(){this.trigger.apply(this,["onEvent"].concat(Array.prototype.slice.call(arguments)))}},{key:"onReady",value:function(){this.trigger.apply(this,["onReady"].concat(Array.prototype.slice.call(arguments)))}}]),t}($t),Do=new Ro,Uo=function(t){function r(e,t){var i;return n(this,r),i=f(this,u(r).call(this,e,t)),i.object=null,i._prevPos=null,i.flashUtilListener=[],i._commandQueue=[],i.currentTimer=null,i.commandQueueTimer=null,i.lastVolume=Re().get("volume"),window.muduPlayer=window.muduPlayer||{},window.muduPlayer.flashUtil=window.muduPlayer.flashUtil||Do,i.renderCustomTip(),i.initCommandQueueTimer(),i}return s(r,t),i(r,[{key:"getMediaElement",value:function(){return this.player.dom.videoWrap.querySelector("object")}},{key:"createMediaElement",value:function(){var e=this;this.id=this.player._config.containerId+"-flash",this.player.dom.flash.id=this.id;var t={autoplay:!1,preload:this.player._config.preload,hls_seekmode:"ACCURATE",debug:!1},n={id:this.id,name:this.id,"class":bn,style:"position: absolute; display: block; left: 0; right: 0; top: 0; bottom: 0; pointer-events:auto;"},r={wmode:"opaque",allowScriptAccess:"always",bgcolor:"#000000"};return Ce(this.player._config.fileCdnPath+"/mudu-player.swf",this.id,"100%","100%","10.3","",t,r,n,function(t){t.success===!1&&U(e.player.dom.container).add(Vr)}),this.getMediaElement()}},{key:"remove",value:function(){p(u(r.prototype),"remove",this).call(this),this.currentTimer&&this.currentTimer.stop(),this.commandQueueTimer&&this.commandQueueTimer.stop(),this.flashUtilListener.forEach(function(e){return Do.off(e.event,e.id)}),this.triggerFlash("mudu_stop"),this.object=null}},{key:"setup",value:function(e){var t=this,n=e.type,i=e.absoluteFile,o=e.isLive,a=function(){t.player._status.flashReady=!0,t.object=t.getMediaElement(),t.id=t.player._config.containerId+"-flash";var e="",r=(new Date).getTime();if(e=i.indexOf("?")>=0?"&safari".concat(r,"=").concat(r):"?safari".concat(r,"=").concat(r),"rtmp"===n){var a=M(i);t.triggerFlash("mudu_setProperty","rtmpConnection",a.connection),t.triggerFlash("mudu_setProperty","rtmpStream",a.stream)}else"auto"===t.player._config.preload?wt()&&o?t.triggerFlash("mudu_src",i+e):t.triggerFlash("mudu_src",i):t.oncePlayer("beforePlay",function(){wt()&&o?t.triggerFlash("mudu_src",i+e):t.triggerFlash("mudu_src",i)});t._subEvents(),t._updateCurrentTime()};if(this.player._status.flashReady)return a(),Promise.resolve();var s=new Promise(function(e,n){var i=!1,o=Do.on("onReady",function(n){n===t.id&&null===t.object&&(i=!0,a(),e())});t.flashUtilListener.push({event:"onReady",id:o}),ft()&&setTimeout(function(){i||(U(t.player.dom.container).add(Vr),n(new Error(r.Error.NotAllowedError)))},5e3)});return s}},{key:"initCommandQueueTimer",value:function(){var e=this;this.commandQueueTimer=new Bo({gap:200}),this.commandQueueTimer.on("tick",function(t){var n=t.isStop;n||(0===e._commandQueue.length?e.commandQueueTimer.stop():e._apiAvailable()&&(e._commandQueue.forEach(function(t){if(e.object[t.fn]){var n;(n=e.object)[t.fn].apply(n,d(t.args))}}),e._commandQueue=[]))})}},{key:"renderCustomTip",value:function(){var t=this.option.renderTip(),n=this.player.dom.flashTip,r=function(){n.innerHTML=""};"string"==typeof t&&(r(),n.innerHTML=t),"object"===e(t)&&(r(),n.appendChild(t))}},{key:"triggerFlash",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?n-1:0),i=1;i=1){var t=e.map(function(e){return{start:e[0],end:e[1]}});return t}}return[]}},{key:"getVolume",value:function(){return this._apiAvailable()?this._get("volume"):1}},{key:"setVolume",value:function(e){if(this.object){var t=this.getMute();O("number",e)&&(e<0&&(e=0),e>1&&(e=1),this.triggerFlash("mudu_setProperty","volume",e),t&&e>0&&this.setMute(!1),t||0!==e||this.setMute(!0))}}},{key:"setMute",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._apiAvailable()&&(e||0!==this.getVolume()||this.setVolume(.5),this.object.mudu_setProperty("muted",!!e),this.trigger("mute",{type:"mute",mute:!!e}))}},{key:"getMute",value:function(){return!!this._apiAvailable()&&this._get("muted")}},{key:"setStretching",value:function(e){if(this._apiAvailable())switch(e){case"none":case"contain":case"fill":case"cover":case"scale-down":this.object.mudu_setProperty("stretching",e);break;default:this.object.mudu_setProperty("stretching","contain")}}},{key:"getStretching",value:function(){return this._apiAvailable()?this._get("stretching"):"contain"}},{key:"getPosition",value:function(){if(this._apiAvailable())return this._get("currentTime")||0}},{key:"getDuration",value:function(){if(this._apiAvailable())return this._get("duration")}},{key:"setStretch",value:function(){}},{key:"getMetadata",value:function(){}},{key:"play",value:function(){if(this.object)if(this._get){var e=this._get("ended");e?(this.object.mudu_play(),this.seek(0)):this.object.mudu_play()}else this.triggerFlash("mudu_play");return Promise.resolve()}},{key:"pause",value:function(){return this.object&&this.triggerFlash("mudu_pause"),Promise.resolve()}},{key:"seek",value:function(e){if(this._apiAvailable()){var t=this._get("currentTime");this.object.mudu_setProperty("currentTime",e),this.trigger("seek",{type:"seek",position:t,offset:e})}}},{key:"getPlaybackRate",value:function(){return 1}},{key:"setPlaybackRate",value:function(){}},{key:"_apiAvailable",value:function(){return this.object&&this.object.mudu_getProperty}},{key:"_get",value:function(e,t){try{return this.object.mudu_getProperty(e)}catch(n){if(O("undefined",t))throw n;return t}}}]),r}(Po);Uo.types=["flv","rtmp","hls","m3u8","mp4"],Uo.canPlayType=function(e){return Uo.types.indexOf(e)>=0},Uo.canPlayMineType=P,Uo.isSupported=function(){return!Pt()},Uo.isPlaybackRateSuppooed=function(){return!1},Uo.isFlash=function(e){return!0},Uo.isHTML5=function(e){return!1},Uo.version="5.0.2-12",Uo.defaultOptions={renderTip:P},Uo.Error={NotAllowedError:"Media element cannot be created, probably flash is not allowed"};var Fo,Lo=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),ae(r.player,l(l(r))).method("play").method("pause").method("toggle").method("getState").method("getPlaybackRate").method("setPlaybackRate"),r.subEvents(),r.setPlayBtnIcon(on),r.initPlayButton(),r}return s(t,e),i(t,[{key:"changeStateClass",value:function(){var e=this.getState();U(this.player.dom.container).remove(Zr),U(this.player.dom.container).add("mudu-state-".concat(e))}},{key:"subEvents",value:function(){var e=this;this.onPlayer(wi,function(){e.subProvider(),U(e.player.dom.container).add(Fr)}),this.onPlayer(ki,function(){U(e.player.dom.container).remove(Zr)}),this.onPlayer(Si,function(){e.player.timer.loading.stop(),U(e.player.dom.container).remove(Zr),U(e.player.dom.container).remove(ti),e._triggerStateEvt(Ni,"idle"),e.setPlayBtnIcon(on),e.changeStateClass()}),this.onPlayer("internal_buffer",function(t){if(t){if(e._isErrorState())return;e._triggerStateEvt("buffer","buffering"),e.changeStateClass()}else e._triggerStateEvt("play","playing"),e.changeStateClass()}),this.onPlayer(Ei,this._onInternalKeyDown.bind(this))}},{key:"subProvider",value:function(){var e=this;this.onProvider(ro,function(){e.player.timer.loading.start();var t=e.getState();"playing"!==e.getState()&&(e._triggerStateEvt(Pi,"playing"),e.setPlayBtnIcon(an),"buffering"!==t&&"playing"!==t&&e.player.model.bezel["switch"](on),e.changeStateClass())}),this.onProvider(io,function(){e.player.timer.loading.stop(),e._triggerStateEvt(io,"paused"),e.setPlayBtnIcon(on),e.player.model.bezel["switch"](an),!e._isErrorState()&&e.changeStateClass()}),this.onProvider($i,function(){e.player.timer.loading.stop(),e._triggerStateEvt(Ni),e.changeStateClass()}),this.onProvider(so,function(){e.player.trigger(Vi)}),this.onProvider(uo,function(t){e.player.trigger(qi,t)}),this.onProvider(to,function(){var t=me.isAnyClassShow("mudu-popup");t?me.hideAll():e.player.getControls()&&e.player.toggle()})}},{key:"_triggerStateEvt",value:function(e,t){t=t||e;var n=this.player._status.state;this.player._status.state=t,this.player.trigger(e,{type:e,oldState:n,newState:t})}},{key:"_isErrorState",value:function(){return U(this.player.dom.container).contains(Lr)}},{key:"initPlayButton",value:function(){var e=this;this.onDom(this.player.dom.leftPlayBtn,"click",function(){e.player.toggle()}),this.onDom(this.player.dom.bigPlayBtn,"click",function(){e.player.toggle()}),Pt()||this.onDom(this.player.dom.videoWrap,"click",function(t){if(!e.player._provider||!e.player._provider.flash){var n=me.isAnyClassShow("mudu-popup");!n&&e.player.getControls()&&e.player.toggle()}})}},{key:"setPlayBtnIcon",value:function(e){var t=this.player.dom.leftPlayBtn;U(t).remove(yn),U(t).add(e)}},{key:"toggle",value:function(){var e=this.player._status.state;return"paused"===e||"idle"===e?this.play():this.pause()}},{key:"play",value:function(){var e=this;return this.provider()?(this.player.trigger(Wi,{type:Wi}),this.provider().play()):De.call(this.player).then(function(){return e.play()})}},{key:"pause",value:function(){return this.provider()?this.provider().pause():Promise.resolve()}},{key:"getPlaybackRate",value:function(){return this.provider()?this.provider().getPlaybackRate():1}},{key:"setPlaybackRate",value:function(e){if(this.provider())return this.provider().setPlaybackRate(e)}},{key:"getState",value:function(){return this.player._status.state}},{key:"_onInternalKeyDown",value:function(e){32===e&&this.toggle(); }}]),t}(yo),No={nameMap:{dragStart:Pt()?"touchstart":"mousedown",dragMove:Pt()?"touchmove":"mousemove",dragEnd:Pt()?"touchend":"mouseup"}},Wo=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.player.dom.ptime.innerHTML="00:00",r.prevDragX=null,r.onPlayer(wi,r._onProviderInited.bind(l(l(r)))),r.onPlayer(Si,r._onProviderRemoved.bind(l(l(r)))),r.onPlayer(Ei,r._onInternalKeyDown.bind(l(l(r)))),r.initPlayedBar(),ae(r.player,l(l(r))).method("seek").method("getPosition").method("getDuration").method("getBuffer"),r}return s(t,e),i(t,[{key:"setBarWidth",value:function(e){this.player.dom.playedBar.style.width=x(e)}},{key:"getBarWidth",value:function(){return parseFloat(this.player.dom.playedBar.style.width)/100}},{key:"getDuration",value:function(){return this.provider()?this.provider().getDuration():1}},{key:"getPosition",value:function(){return this.provider()?this.provider().getPosition():0}},{key:"getBufferPercentage",value:function(){if(!this.provider())return 0;var e=this.getBuffer(),t=e.pop(),n=t&&t.end||0,r=this.getDuration(),i=n/r||0;return i}},{key:"getBuffer",value:function(){return this.provider()?this.provider().getBuffer():[]}},{key:"seek",value:function(e){if(this.provider()){this.provider().seek(e);var t=this.getDuration();e=Math.max(e,0),t&&(e=Math.min(e,t)),this.setBarWidth(e/t),this.player.dom.ptime.innerHTML=A(e)}}},{key:"computeDragDirec",value:function(e){if(null===this.prevDragX)return this.prevDragX=e,"";var t=e>this.prevDragX?"right":"left";return this.prevDragX=e,t}},{key:"initPlayedBar",value:function(){var e=this,t=function(t){U(e.player.dom.container).add(Yr);var n=(t.clientX||t.changedTouches[0].clientX)-B(e.player.dom.playedBarWrap);e.player.model.progressPopup.dragMove(n,e.computeDragDirec(n)),e.player.model.progressPopup.show();var r=n/e.player.dom.playedBarWrap.clientWidth;r=Math.max(r,0),r=Math.min(r,1),e.setBarWidth(r),e.player.dom.ptime.innerHTML=A(r*e.getDuration())},n=function r(n){e.prevDragX=null,e.player.model.progressPopup.hide(),e.player.model.progressPopup.dragEnd(),e.player._status.dragging=!1,e.player.model.controls.setAutoHide(),D(document,No.nameMap.dragEnd,r),D(document,No.nameMap.dragMove,t);var i=((n.clientX||n.changedTouches[0].clientX)-B(e.player.dom.playedBarWrap))/e.player.dom.playedBarWrap.clientWidth;i=Math.max(i,0),i=Math.min(i,1);var o=i*e.getDuration();e.setBarWidth(i),e.seek(o)};R(this.player.dom.playedBarWrap,No.nameMap.dragStart,function(){e.player._status.dragging=!0,R(document,No.nameMap.dragMove,t),R(document,No.nameMap.dragEnd,n)})}},{key:"_onProviderInited",value:function(e){var t=e.isLive;this.onProvider(Qi,this._onBufferChange.bind(this)),this.onProvider(eo,this._onDuration.bind(this)),this.onProvider(Zi,this._onTimeUpdate.bind(this)),this.onProvider(Zi,this._onBufferChange.bind(this)),this.onProvider(lo,this._onLoadedData.bind(this)),U(this.player.dom.container).add(Ur),t?(U(this.player.dom.container).add(Cr),U(this.player.dom.container).remove(Mr)):(U(this.player.dom.container).remove(Cr),U(this.player.dom.container).add(Mr))}},{key:"_onProviderRemoved",value:function(){U(this.player.dom.container).add(Ur)}},{key:"_onBufferChange",value:function(){var e=this.player.dom.loadedBar,t=this.getBufferPercentage();e.style.width=x(t)}},{key:"_onDuration",value:function(){var e=this.player.dom.dtime,t=this.getDuration();t&&t!==1/0&&(e.innerHTML=A(t),this.player.trigger(Fi,{type:Fi,duration:t}),U(this.player.dom.container).remove(Ur))}},{key:"_onTimeUpdate",value:function(){var e=this.player.dom,t=e.playedBar,n=e.ptime,r=this.getPosition(),i=r/(this.getDuration()||1/0);this.player._status.dragging||(t.style.width=x(i)),n.innerHTML=A(this.getPosition()),this.player.trigger(Ui,{type:Ui,position:r})}},{key:"_onLoadedData",value:function(){this.player.trigger(Hi)}},{key:"_onInternalKeyDown",value:function(e){var t=this._isLive();if(!t)switch(e){case 37:this.seek(this.getPosition()-5);break;case 39:this.seek(this.getPosition()+5)}}},{key:"_isLive",value:function(){return U(this.player.dom.container).contains(Cr)}}]),t}(yo),Go=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.autoHideTimer=null,r._controlsVisible=!!e._config.controls,ae(r.player,l(l(r))).method("setControls").method("getControls"),r.setControls(!!e._config.controls),r.setMobileToggle(),r.setPcToggle(),r}return s(t,e),i(t,[{key:"setPcToggle",value:function(){var e=this;if(!Pt()){var t=function(){e.show(),e.setAutoHide()},n=function(e){var n=e.oldState;"buffering"!==n&&"playing"!==n&&t()};this.onDom(this.player.dom.container,"mousemove",t),this.onDom(this.player.dom.container,"click",t),this.onPlayer(Pi,n),this.onPlayer(Ci,t)}}},{key:"setMobileToggle",value:function(){var e=this;if(Pt()){var t=function(t){t.stopPropagation(),e.toggle()};this.onDom(this.player.dom.videoWrap,"touchend",t)}}},{key:"setAutoHide",value:function(){var e=this;clearTimeout(this.autoHideTimer),this.autoHideTimer=setTimeout(function(){me.isAnyClassShow("mudu-popup")||e.player._status.dragging||e.hide()},3e3)}},{key:"show",value:function(){U(this.player.dom.container).remove(Dr),this._triggerControlsVisible(this.getControls())}},{key:"hide",value:function(){var e=this.player.model.video.getState();"paused"!==e&&"idle"!==e&&(U(this.player.dom.container).add(Dr),this._triggerControlsVisible(!1))}},{key:"isShow",value:function(){return!U(this.player.dom.container).contains(Dr)}},{key:"_triggerControlsVisible",value:function(e){e!==this._controlsVisible&&(this._controlsVisible=e,this.player.trigger(Ai,{type:Ai,visible:this._controlsVisible}))}},{key:"toggle",value:function(){var e=this.isShow();e?this.hide():this.show(),this.setAutoHide()}},{key:"setControls",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._showControls=!!e;var t=this._showControls?"block":"none";this.player.dom.controllerWrap.style.display=t,this.player.trigger(Mi,{type:Mi,controls:this._showControls}),this._triggerControlsVisible(this._showControls&&this.isShow())}},{key:"getControls",value:function(){return this._showControls}},{key:"remove",value:function(){p(u(t.prototype),"remove",this).call(this),clearTimeout(this.autoHideTimer)}}]),t}(yo),zo=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),ae(r.player,l(l(r))).method("getMute").method("setMute").method("getVolume").method("setVolume"),r.initVolumeButton(),r.subEvents(),r.volumeTip=me(r.player.dom.volumeButton,{content:"",container:r.player.dom.container}),Pt()&&(r.player.dom.volumeWrap.style.display="none"),r}return s(t,e),i(t,[{key:"subEvents",value:function(){var e=this;this.onPlayer(wi,function(){e.subProviderEvents();var t=Re().get("volume")||1,n=Re().get("mute")||!1;Pt()?e.setVolume(1):(e.setVolume(t),e.setMute(n))}),this.onPlayer(Ei,this._onInternalKeyDown.bind(this))}},{key:"updateTipText",value:function(){var e=this.getMute()?this.lang.Unmute:this.lang.Mute,t=q(e);this.volumeTip.updateContent(t)}},{key:"subProviderEvents",value:function(){var e=this;this.onProvider(oo,function(t){e.player.trigger(Gi,t),e.switchVolumeIcon(),e.setBarWidth(x(e.getVolume())),e.cacheVolume(),e.updateTipText()}),this.onProvider(ao,function(t){e.player.trigger(zi,t),e.switchVolumeIcon(),e.setBarWidth(x(e.getVolume())),e.cacheVolume()})}},{key:"cacheVolume",value:function(){Re().set("volume",this.getVolume()),Re().set("mute",this.getMute())}},{key:"initVolumeButton",value:function(){var e=this;this.setBarWidth("100%"),this.switchVolumeIcon();var t=function(t){var n=t||window.event,r=e.player._status.containerFontSize/16,i=45*r,o=((n.clientX||n.changedTouches[0].clientX)-B(e.player.dom.volumeBarWrap))/i;e.setVolume(o)},n=function r(){D(document,No.nameMap.dragEnd,r),D(document,No.nameMap.dragMove,t)};R(this.player.dom.volumeBarWrapWrap,"click",function(t){var n=e.player._status.containerFontSize/16,r=45*n,i=t||window.event,o=((i.clientX||i.changedTouches[0].clientX)-B(e.player.dom.volumeBarWrap))/r;e.player.setVolume(o)}),R(this.player.dom.volumeBarWrapWrap,No.nameMap.dragStart,function(){R(document,No.nameMap.dragMove,t),R(document,No.nameMap.dragEnd,n)}),R(this.player.dom.volumeButton,"click",function(){e.setMute(!e.getMute()),Xt(function(){e.updateTipText(),e.volumeTip.show()})})}},{key:"getMute",value:function(){return!!this.provider()&&this.provider().getMute()}},{key:"setMute",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.provider())return e||0!==this.getVolume()||this.setVolume(.5),this.provider().setMute(e)}},{key:"getVolume",value:function(){return this.provider()?this.provider().getVolume():1}},{key:"setVolume",value:function(e){this.provider()&&this.provider().setVolume(e)}},{key:"setBarWidth",value:function(e){this.player.dom.volumeBar.style.width=e}},{key:"switchVolumeIcon",value:function(e){var t=this.player.dom.volumeButton;return U(t).remove(yn),e?void U(t).add(e):void(this.getVolume()>=.95?U(t).add(sn):this.getVolume()>0?U(t).add(un):U(t).add(cn))}},{key:"_onInternalKeyDown",value:function(e){switch(e){case 38:this.setVolume(this.getVolume()+.1);break;case 40:this.setVolume(this.getVolume()-.1)}}}]),t}(yo),Ho=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),ae(r.player,l(l(r))).method("getPlaylist").method("getPlaylistItem").method("getPlaylistIndex").method("load").method("reload").method("next").method("prev").method("replay").method("setQuality").method("switchQuality").method("switchListItem"),r._subEvent(),r._retryStartTime=new Date,r._retryTimes=0,e._config.enableErrorRetry&&(r.onPlayer("delegate-model",r._onDelegateModel.bind(l(l(r)))),r.onPlayer(Ji,r._onOuterError.bind(l(l(r))))),r}return s(t,e),i(t,[{key:"_onDelegateModel",value:function(e){var t=e.fn;switch(t){case"load":case"reload":case"next":case"prev":case"replay":case"setQuality":case"switchQuality":case"switchListItem":this._retryStartTime=new Date,this._retryTimes=0}}},{key:"_onOuterError",value:function(e){var t=this,n=e.fatal,r=this.player._config,i=r.errorMaxRetry,o=r.errorMaxRetryTimeout,a=r.errorRetryDelay,s=new Date;n&&(i>this._retryTimes||s.getTime()1&&void 0!==arguments[1])||arguments[1],n=Q(e);return n?(this.player._config.playlist=n,this.player.trigger(Ri,{type:Ri,playlist:n}),this.reload(t)):Promise.reject(new Error("muduPlayer().load(`playlist`): the format of `playlist` is illegel"))}},{key:"reload",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Oe.call(this.player),De.call(this.player).then(function(){if(t)return e.player.play()})}},{key:"replay",value:function(){var e=this;return De.call(this.player).then(function(){return e.player.play()})}},{key:"switchListItem",value:function(e,t){var n=this;if(!O("number",e))return Promise.resolve(!1);var r=this.player._config.playlist[e];return r?O("number",t)&!r.sources[t]?Promise.resolve(!1):(O("number",t)?xe.call(this.player,e,t):Oe.call(this.player,e),this.player.trigger(Di,{type:Di,index:e,item:this.getPlaylistItem(e)}),De.call(this.player).then(function(){return n.player.play()}).then(function(){return!0})):Promise.resolve(!1)}},{key:"next",value:function(){var e=this.getPlaylistIndex()+1;return this.switchListItem(e)}},{key:"prev",value:function(){var e=this.getPlaylistIndex()-1;return this.switchListItem(e)}},{key:"getPlaylist",value:function(){return this.player._config.playlist}},{key:"getPlaylistItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.player._config.playlist[e]}},{key:"getPlaylistIndex",value:function(){for(var e=0;e0});if(2===t.length){var n=t[1]/t[0]*100+"%";return this.player.dom.aspect.style.paddingTop=n,U(this.player.dom.container).add(Br),this.setHeight("auto"),!0}return U(this.player.dom.container).add(Rr),!1}},{key:"removeAspect",value:function(){this.player.dom.aspect.style.paddingTop=0,U(this.player.dom.container).remove(Br)}}]),t}(yo),Xo=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.onPlayer(wi,r._onProviderInited.bind(l(l(r)))),r}return s(t,e),i(t,[{key:"_onProviderInited",value:function(){var e=this.player._config.stretching;this.provider()&&this.provider().setStretching(e)}}]),t}(yo),Yo=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r._onImgLoad=r._onImgLoad.bind(l(l(r))),r._onStyleLoaded=r._onStyleLoaded.bind(l(l(r))),r.setLogoStyle(),r.oncePlayer(Oi,r._onStyleLoaded),r}return s(t,e),i(t,[{key:"_onStyleLoaded",value:function(){this.setLogoVisible()}},{key:"_onImgLoad",value:function(){var e=this.player.dom,t=e.logoWrap,n=e.logoImg,r=H(n),i=H(t),o=i.width/i.height,a=r.width/r.height;o>a?n.style.height="100%":n.style.width="100%",n.style.opacity=this.player._config.logo.opacity+""}},{key:"setLogoVisible",value:function(){var e=this.player._config.logo,t=this.player.dom.logoImg;R(t,"load",this._onImgLoad),t.style.display="inline-block",t.src=e.file}},{key:"setLogoStyle",value:function(){var e=this.player._config.logo,t=this.player.dom,n=t.logoWrap,r=t.logoImg,i=t.logoLink;if(e.file){if(this.resetPosition(),n.style.width=x(e.width),n.style.height=x(e.height),"control-bar"!==e.position){var o=e.position.split("-");o.forEach(function(t){"top"!==t&&"bottom"!==t||(n.style[t]=x(e.marginh)),"left"!==t&&"right"!==t||(n.style[t]=x(e.marginw))}),o.forEach(function(e){r.style[e]="0"})}i.href=e.link?e.link:"javascript:void(0)"}}},{key:"resetPosition",value:function(){var e=this.player.dom.logoWrap;e.style.cssText="position: absolute;"}},{key:"remove",value:function(){D(this.player.dom.logoImg,"load",this._onImgLoad),p(u(t.prototype),"remove",this).call(this)}}]),t}(yo),Ko=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.init(),r}return s(t,e),i(t,[{key:"init",value:function(){var e=this.player;this.setTrue=function(){e._status.focus=!0},this.setFalse=function(){e._status.focus=!1},R(document,"click",this.setFalse,!0),R(e.dom.container,"click",this.setTrue,!0)}},{key:"remove",value:function(){D(document,"click",this.setFalse,!0),D(this.player.dom.container,"click",this.setTrue,!0)}}]),t}(yo),$o=function(e){function t(e){var r;n(this,t),r=f(this,u(t).call(this,e));var i=r.player.dom.bezel;return r.onDom(i,"animationend",function(){U(i).remove(hr)}),r}return s(t,e),i(t,[{key:"switch",value:function(e){var t=this.player.dom.bezel;U(t).remove(yn),U(t).add(e),U(t).add(hr)}}]),t}(yo),Qo=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.subEvents(),r}return s(t,e),i(t,[{key:"subEvents",value:function(){var e=this;this.onPlayer(wi,function(t){var n=t.image,r=e.player.dom.background,i=e.player.dom.container;U(i).remove(ei),U(i).add(Nr+"-"+e.player._config.stretching),n?r.style.backgroundImage="url(".concat(n,")"):r.style.backgroundImage="none"})}}]),t}(yo),Zo=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),ae(r.player,l(l(r))).method("appendRightControllerButton"),r}return s(t,e),i(t,[{key:"appendRightControllerButton",value:function(e){e instanceof window.HTMLElement&&this.player.dom.controllerRightIcons.appendChild(e)}}]),t}(yo),ea=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.onPlayer(wi,function(){var t=Ee.call(e),n=t.title;n?e.dom.title.innerHTML=n:e.dom.title.style.display="none"}),r}return s(t,e),t}(yo),ta=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.dom=null,r.createDom(),r.tip=me("",{container:e.dom.container,content:r.dom,"class":"mudu-popup",getMaxHeight:function(e){var t=e.height;return t}}),r._subEvents(),r}return s(t,e),i(t,[{key:"generateDom",value:function(){this.createDom()}},{key:"_subEvents",value:function(){var e=this;this.handleContextMenu=function(t){if(e.tip.isShow())return void e.tip.hide();var n=e.getStyle(t);n&&(me.hideAll(),e.tip.show(n),t.preventDefault&&t.preventDefault())},this.onDom(this.player.dom.container,"contextmenu",this.handleContextMenu)}},{key:"getStyle",value:function(e){var t=H(this.player.dom.container),n=H(this.player.dom.container.querySelector(".".concat(ur)));if(!(t.widtho?o:u,s=s>a?a:s,{left:s,top:u}}}},{key:"createDom",value:function(){for(var e=this.player._config.contextMenus,t="javascript:void(0)",n=e.map(function(e){var n='')+'
').concat(e.text,"
")+"
";return n}),r='
')+'
').concat(n.join(""),"
")+"
",i=F(r),o=i.querySelectorAll(".".concat(Sr)),a=this,s=0;sthis.player.dom.playedBarWrap.offsetWidth||this.move(n)}},{key:"handleDotEnter",value:function(e){var t=e.target||e.srcElement;if(t&&U(t).contains(sr)){var n=t.getAttribute("text");this.setDotActive(t,!0),this.setPopText(n),this.setPopTextVisible(!0),this.handleMouseMove(e)}}},{key:"handleDotLeave",value:function(e){var t=e.target||e.srcElement;t&&U(t).contains(sr)&&(this.setDotActive(t,!1),this.setPopText(""),this.setPopTextVisible(!1),this.handleMouseMove(e))}},{key:"setPopText",value:function(e){this.player.dom.barTextText.innerHTML=e}},{key:"setPopTextVisible",value:function(e){var t=U(this.player.dom.barPopup);e?t.add(Yn):t.remove(Yn)}},{key:"isPopTextVisible",value:function(){return U(this.player.dom.barPopup).contains(Yn)}},{key:"setDotActive",value:function(e,t){var n=U(e);t?n.add(hi):n.remove(hi)}},{key:"show",value:function(){U(this.player.dom.barPopup).remove("hidden")}},{key:"hide",value:function(){U(this.player.dom.barPopup).add("hidden")}},{key:"move",value:function(e){var t=this.player.model.progress.getDuration(),n=this.player.dom.playedBarWrap.offsetWidth;e<0&&(e=0),e>n&&(e=n);var r=t*(e/n),i=A(r);this.player.dom.barTime.innerHTML=i,this.player.dom.barTextTime.innerHTML=i,this.setPosition(!1,this.isPopTextVisible(),e,n)}},{key:"dragMove",value:function(e,t){var n=this,r=this.getDotFromDrag(e,t),i=this.highlights.indexOf(r),o=this.player.dom.highlight.querySelectorAll(".".concat(sr)),a=o[i];[].slice.call(o).forEach(function(e){return n.setDotActive(e,e===a)}),a?(this.setPopText(r.text),this.setPopTextVisible(!0)):(this.setPopText(""),this.setPopTextVisible(!1)),this.move(e)}},{key:"dragEnd",value:function(){var e=this,t=this.player.dom.highlight.querySelectorAll(".".concat(sr));[].slice.call(t).forEach(function(t){return e.setDotActive(t,!1)})}},{key:"getDotFromDrag",value:function(e,t){var n=this.player.dom.playedBarWrap.offsetWidth,r=6,i=this.player.model.progress.getDuration(),o=e/n*i,a=r/2/n*i,s=this.highlights.filter(function(e){return e.time>o-a&&e.times&&(u=s),this.player.dom.barPopup.style.left="".concat(u,"px")}},{key:"setHightLights",value:function(){var e=Ee.call(this.player),t=e.highlights,n=this.player.dom.highlight,r=this.player.model.progress.getDuration();this.highlights=O("array",t)?t:[],this.highlights=this.highlights.sort(function(e,t){return e.time>t.time?1:e.time')});n.innerHTML=i.join("")}},{key:"clearHightLights",value:function(){this.player.dom.highlight.innerHTML="",this.highlights=[]}}]),t}(yo),ra=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r._tryDom=r.geneTryDom(),r.renderError=O("function",r.player._config.renderError)?r.player._config.renderError:r.defaultRenderError.bind(l(l(r))),r.onPlayer(wi,function(){r.onProvider(co,function(e){e.message="provider_".concat(r.player._provider.name,"_").concat(e.message),e.errorId=W(),r.player.trigger(Ji,e)})}),r.onPlayer(Ji,function(e){var t={errorId:e.errorId,message:r.filterErrorMsg(e.message),detail:e.message};if(e.fatal){var n=r.renderError(t);n&&(O("string",n)||n instanceof HTMLElement)||(n=r.defaultRenderError(t)),O("string",n)?r.player.dom.errorWrap.innerHTML=n:(r.player.dom.errorWrap.innerHTML="",r.player.dom.errorWrap.appendChild(n)),U(r.player.dom.container).add(Lr)}}),r}return s(t,e),i(t,[{key:"geneTryDom",value:function(){var e=this,t=''.concat(this.lang.Reload,""),n="
".concat(this.lang["You can try"]," ").concat(t,"
"),r=F(n);return r.onclick=function(t){t=t||window.event;var n=t.target||t.srcElement;"reload"===n.getAttribute("action")&&e.player.replay()},r}},{key:"defaultRenderError",value:function(e){var t=e.message,n=(e.detail,e.errorId),r='
')+'
')+'
')+"
".concat(t,"(").concat(n,")
")+"
",i=F(r);return i.querySelector(".".concat(mr)).appendChild(this._tryDom),i}},{key:"filterErrorMsg",value:function(e){if(!e)return this.lang["Unknown Error"];var t=e.toLowerCase(),n=function(e){return t.indexOf(e)>=0};return n("network")?this.lang["Network Error"]:n("media")||n("parse")||n("demux")||n("remux")||n("decode")?this.lang["Media Error"]:e}},{key:"hideError",value:function(){U(this.player.dom.container).remove(Lr)}}]),t}(yo),ia=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.nt=r.player.dom.notice,r._t=null,ae(r.player,l(l(r))).method("notice"),r}return s(t,e),i(t,[{key:"notice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;this.setContent(e),t>0&&this.autoHide(t)}},{key:"hide",value:function(){this.setVisible(!1)}},{key:"show",value:function(){this.setVisible(!0)}},{key:"autoHide",value:function(e){var t=this;this.show(),this._t&&(clearTimeout(this._t),this._t=null),setTimeout(function(){return t.hide()},e)}},{key:"setContent",value:function(e){this.nt.innerHTML=e}},{key:"setVisible",value:function(e){e?U(this.nt).remove(fi):U(this.nt).add(fi)}},{key:"remove",value:function(){p(u(t.prototype),"remove",this).call(this),this._t&&clearTimeout(this._t)}}]),t}(yo),oa=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.dom=null,r.createDom(),r.onPlayer(wi,function(){r.onProviderInited()}),r.onPlayer(Si,function(){r.qsPopup.hide()}),r.qsPopup=me(e.dom.switchQuality,{trigger:"click",content:r.dom,container:e.dom.container,"class":"mudu-popup",getMaxHeight:function(e){var t=e.height;return t-70}}),r}return s(t,e),i(t,[{key:"createDom",value:function(){var e='
')+'
')+"
";this.dom=F(e)}},{key:"onProviderInited",value:function(){var e=Pe.call(this.player);this.updateQualityItem(),this.updateSourceCls(e),this.updateSwitchText(e)}},{key:"updateSourceCls",value:function(e){var t=e.length,n=this.player.dom.container;U(n).remove(ni),U(n).add(1===t?$r:Qr)}},{key:"updateSwitchText",value:function(e){var t=e.filter(function(e){return e.active})[0];t&&(this.player.dom.switchQuality.innerHTML=t.label)}},{key:"updateQualityItem",value:function(){var e=Pe.call(this.player),t=e.map(function(e,t){return'
')+'
')+'
').concat(e.label,"
")+"
"}).join("");this.dom.querySelector(".".concat(Er)).innerHTML=t;for(var n=this.dom.querySelectorAll('[type="value"]'),r=this,i=0;i'):""}}}]),t}(yo),aa="undefined"!=typeof window?window:"undefined"!=typeof t?t:"undefined"!=typeof self?self:{};Fo="undefined"!=typeof window?window:"undefined"!=typeof aa?aa:"undefined"!=typeof self?self:{};var sa=Fo,ua=Le,ca=Object.prototype.toString,la=Fe(function(e,t){function n(e){return e.replace(/^\s*|\s*$/g,"")}t=e.exports=n,t.left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}}),fa=(la.left,la.right,Function.prototype.toString),ha=/^\s*class\b/,pa=function(e){try{var t=fa.call(e);return ha.test(t)}catch(n){return!1}},da=function(e){try{return!pa(e)&&(fa.call(e),!0)}catch(t){return!1}},va=Object.prototype.toString,ya="[object Function]",ga="[object GeneratorFunction]",ma="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,_a=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(ma)return da(e);if(pa(e))return!1;var t=va.call(e);return t===ya||t===ga},ba=Object.prototype.toString,wa=Object.prototype.hasOwnProperty,Sa=function(e,t,n){for(var r=0,i=e.length;r=3&&(r=n),"[object Array]"===ba.call(e)?Sa(e,t,r):"string"==typeof e?ka(e,t,r):Ta(e,t,r)},Oa=Ea,xa=function(e){return"[object Array]"===Object.prototype.toString.call(e)},Pa=function(e){if(!e)return{};var t={};return Oa(la(e).split("\n"),function(e){var n=e.indexOf(":"),r=la(e.slice(0,n)).toLowerCase(),i=la(e.slice(n+1));"undefined"==typeof t[r]?t[r]=i:xa(t[r])?t[r].push(i):t[r]=[t[r],i]}),t},Ca=Ne,Ma=Object.prototype.hasOwnProperty,Aa=He,Ia=He;He.XMLHttpRequest=sa.XMLHttpRequest||Je,He.XDomainRequest="withCredentials"in new He.XMLHttpRequest?He.XMLHttpRequest:sa.XDomainRequest,We(["get","put","post","patch","head","delete"],function(e){He["delete"===e?"del":e]=function(t,n,r){return n=ze(t,n,r),n.method=e.toUpperCase(),qe(n)}}),Aa["default"]=Ia;var ja=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.perfLogUrl=e._config.perfLogUrl,r.buffer_records=[],r.metric_records=[],r.provider_is_html5=!1,r.provider_name="",r.stream_url="",r.perf_id="",r.perf_paused=!0,ae(r.player,l(l(r))).method("getMediaHeight").method("getMediaWidth").method("getMetrics"),r.perfLogUrl?At()?f(r,l(l(r))):(r.calcTimer=new Bo({gap:3e3}),r.recordTimer=new Bo({gap:800}),r.onPlayer(wi,r._onProviderInited.bind(l(l(r)))),r.onPlayer(Si,r._onProviderRemoved.bind(l(l(r)))),r.recordTimer.on("tick",r._onRecordTimerTick.bind(l(l(r)))),r.recordTimer.on("start",r._onRecordTimerTick.bind(l(l(r)))),r.calcTimer.on("tick",r._onCalcTimerTick.bind(l(l(r)))),r):f(r,l(l(r)))}return s(t,e),i(t,[{key:"remove",value:function(){p(u(t.prototype),"remove",this).call(this),this.recordTimer&&this.recordTimer.stop(),this.calcTimer&&this.calcTimer.stop()}},{key:"getMediaHeight",value:function(){return this.provider()?this.provider().getHeight():-1}},{key:"getMeidaWidth",value:function(){return this.provider()?this.provider().getWidth():-1}},{key:"getMetrics",value:function(){return this.provider()?this.provider().getMetrics():null}},{key:"recordMetrics",value:function(){this.metric_records.push(a({time:this._getTs(),pos:this.player.model.progress.getPosition()},this.getMetrics()))}},{key:"calcBufferTimes",value:function(){var e=this._getTs(),t=this.buffer_records.filter(function(t){return t.time>=e-3e3&&t.time=e-3e3&&t.time<=e});if(this.metric_records=this.metric_records.filter(function(t){return t.time0}),r=e.map(function(e){return e.bps}).filter(function(e){return e>0}),i=n.length,o=r.length;return n.forEach(function(e){t.fps+=e/i}),r.forEach(function(e){t.bps+=e/o}),t}},{key:"_calcWebkitMetrics",value:function(e){var t={fps:0,bps:0,decodedFps:0,droppedFps:0,audioBps:0,videoBps:0,recordsLength:e.length};if(1===e.length)return t;var n=e.map(function(e,t,n){return 0===t?{time:0}:{time:n[t].time-n[t-1].time,audioDecodedBytes:n[t].webkitAudioDecodedByteCount-n[t-1].webkitAudioDecodedByteCount,videoDecodedBytes:n[t].webkitVideoDecodedByteCount-n[t-1].webkitVideoDecodedByteCount,decodedFrames:n[t].webkitDecodedFrameCount-n[t-1].webkitDecodedFrameCount,droppedFrames:n[t].webkitDroppedFrameCount-n[t-1].webkitDroppedFrameCount}}).filter(function(e){return 0!==e.time}),r=n.map(function(e){var t=e.time/1e3,n={decodedFps:e.decodedFrames/t,droppedFps:e.droppedFrames/t,audioBps:e.audioDecodedBytes/t,videoBps:e.videoDecodedBytes/t,time:t};return n.fps=n.decodedFps+n.droppedFps,n.bps=n.audioBps+n.videoBps,n}),i=r.reduce(function(e,t){return e+t.time},0);return r.forEach(function(e){t.decodedFps=e.decodedFps*e.time/i+t.decodedFps,t.droppedFps=e.droppedFps*e.time/i+t.droppedFps,t.audioBps=e.audioBps*e.time/i+t.audioBps,t.videoBps=e.videoBps*e.time/i+t.videoBps}),t.fps=t.decodedFps+t.droppedFps,t.bps=t.audioBps+t.videoBps,t}},{key:"_calcMozMetrics",value:function(e){var t={fps:0,parsedFps:0,decodedFps:0,presentedFps:0,paintedFps:0,recordsLength:e.length};if(1===e.length)return t;var n=e.map(function(e,t,n){return 0===t?{time:0}:{time:n[t].time-n[t-1].time,parsedFrames:n[t].mozParsedFrames-n[t-1].mozParsedFrames,decodedFrames:n[t].mozDecodedFrames-n[t-1].mozDecodedFrames,presentedFrames:n[t].mozPresentedFrames-n[t-1].mozPresentedFrames,paintedFrames:n[t].mozPaintedFrames-n[t-1].mozPaintedFrames}}).filter(function(e){return 0!==e.time}),r=n.map(function(e){var t=e.time/1e3,n={parsedFps:e.parsedFrames/t,decodedFps:e.decodedFrames/t,presentedFps:e.presentedFrames/t,paintedFps:e.paintedFrames/t,time:t};return n.fps=n.parsedFps,n}),i=r.reduce(function(e,t){return e+t.time},0);return r.forEach(function(e){t.parsedFps=e.parsedFps*e.time/i+t.parsedFps,t.decodedFps=e.decodedFps*e.time/i+t.decodedFps,t.presentedFps=e.presentedFps*e.time/i+t.presentedFps,t.paintedFps=e.paintedFps*e.time/i+t.paintedFps}),t.fps=t.parsedFps,t}},{key:"_onProviderInited",value:function(e){var t=e.file;this.stream_url=t,this.provider_is_html5=this.player._provider.html5,this.provider_name=this.player._provider.name,this.perf_id=this.player._status.uniqId+"_"+J(2),this.buffer_records=[],this.metric_records=[],this.onProvider(fo,this._onWaiting.bind(this)),this.onProvider(ro,this._onPlay.bind(this)),this.onProvider(io,this._onPause.bind(this))}},{key:"_onProviderRemoved",value:function(){this.stream_url="",this.provider_name="",this.buffer_records=[],this.metric_records=[],this.calcTimer&&this.calcTimer.stop(),this.recordTimer&&this.recordTimer.stop()}},{key:"_onCalcTimerTick",value:function(e){var t=e.isStop;e.duration;if(!t){var n=this.calcMetrics();if(n){var r=this.calcBufferTimes(),i=this.calcBuffer(),o=n.records[0],a=n.records[n.records.length-1],s=o&&o.pos,u=a&&a.pos-o.pos,c={fps:n.fps,bps:n.bps,waiting_times:r.times,buffer_length:i.length,decoded_fps:O("number",n.decodedFps)?n.decodedFps:-1,dropped_fps:O("number",n.droppedFps)?n.droppedFps:-1,audio_bps:O("number",n.audioBps)?n.audioBps:-1,video_bps:O("number",n.videoBps)?n.videoBps:-1,records_count:n.records.length,record_pos:s,record_time:u,metric_type:n.type,buffer_detail:JSON.stringify(i.buffer),metrics_detail:JSON.stringify(n),stream_url:this.stream_url,metric_id:this.perf_id,user_agent:navigator.userAgent,refer:window.location.href};Ye(this.perfLogUrl,c)}}}},{key:"_onRecordTimerTick",value:function(e){var t=e.isStop;!t&&this.recordMetrics()}},{key:"_onWaiting",value:function(){this.buffer_records.push({type:"waiting",pos:this.player.model.progress.getPosition(),time:this._getTs()})}},{key:"_onPlay",value:function(){this.buffer_records.push({type:"play",pos:this.player.model.progress.getPosition(),time:this._getTs()}),this.recordTimer.start(),this.calcTimer.start()}},{key:"_onPause",value:function(){this.recordTimer.tick(),this.recordTimer.stop(),this.calcTimer.tick(),this.calcTimer.stop()}},{key:"_getTs",value:function(){return(new Date).getTime()}}]),t}(yo),Ba=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r.onPlayer(wi,r._onProviderInited.bind(l(l(r)))),ae(r.player,l(l(r))).method("getTextTracks").method("setTextTrackEnable").method("setTextTrackDisable").method("getTextTrackCues").method("getTextTrackActiveCues"),r}return s(t,e),i(t,[{key:"getTextTracks",value:function(){return this.provider()?this.provider().getTextTracks():[]}},{key:"getTextTrackCues",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.provider()?this.provider().getTextTrackCues(e):[]}},{key:"getTextTrackActiveCues",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.provider()?this.provider().getTextTrackActiveCues(e):[]}},{key:"setTextTrackEnable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.provider())return this.provider().setTextTrackEnable(e)}},{key:"setTextTrackDisable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.provider())return this.provider().setTextTrackDisable(e)}},{key:"_onProviderInited",value:function(){this.onProvider(ho,this._onTexttrackAdd.bind(this)),this.onProvider(po,this._onTexttrackChange.bind(this)),this.onProvider(vo,this._onCueChange.bind(this))}},{key:"_onCueChange",value:function(e){var t=e.track,n=e.cues,r=e.activeCues;this.player.trigger(Ki,{track:t,cues:n,activeCues:r,type:Ki})}},{key:"_onTexttrackAdd",value:function(e){this.player.trigger(Yi,{track:e,type:Yi})}},{key:"_onTexttrackChange",value:function(e){this.player.trigger(Xi,{tracks:e,type:Xi})}}]),t}(yo),Ra=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r._fontSize=0,r._borderRadius=0,r._subtitleTrackIdx=-1,r._showSubtitles=e._config.showSubtitle,ae(r.player,l(l(r))).method("getShowSubtitle").method("setShowSubtitle").method("setShowingTextTrackIndex").method("getShowingTextTrackIndex"),r.onPlayer(Si,r._onProviderRemoved.bind(l(l(r)))),r.onPlayer(Yi,r._onTextTrackAdd.bind(l(l(r)))),r.onPlayer(Ki,r._onCueChange.bind(l(l(r)))),r}return s(t,e),i(t,[{key:"setShowSubtitle",value:function(e){e=!!e,e&&!this._isShowingSubtitles()&&this._showRandomSubtitle(),!e&&this._isShowingSubtitles()&&(this._clearShowingCues(),this._subtitleTrackIdx=-1),this._showSubtitles=e}},{key:"getShowSubtitle",value:function(){return this._showSubtitles}},{key:"setShowingTextTrackIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.player.model.textTrack.getTextTracks(),n=t[e];e!==this._subtitleTrackIdx&&n&&(this._subtitleTrackIdx>=0&&this.player.model.textTrack.setTextTrackDisable(this._subtitleTrackIdx),this._subtitleTrackIdx=e,this.player.model.textTrack.setTextTrackEnable(e))}},{key:"getShowingTextTrackIndex",value:function(){return this._subtitleTrackIdx}},{key:"_onCueChange",value:function(e){var t=e.track,n=e.activeCues,r=this.player.model.textTrack.getTextTracks(),i=r.indexOf(t);i===this._subtitleTrackIdx&&this._showActiveCues(n)}},{key:"_onTextTrackAdd",value:function(e){e.track;this._showSubtitles&&this._subtitleTrackIdx===-1&&this._showRandomSubtitle()}},{key:"_updateSubtitleStyle",value:function(){var e=this,t=[].slice.call(document.querySelectorAll(".".concat(On)));t.forEach(function(t){t.style.fontSize=e._fontSize+"px",t.style.borderRadius=e._borderRadius+"px"})}},{key:"_onProviderRemoved",value:function(){this._clearShowingCues(),this._subtitleTrackIdx=-1}},{key:"_isShowingSubtitles",value:function(){return this._showSubtitles&&this._subtitleTrackIdx!==-1}},{key:"_selectSubtitleTrack",value:function(){for(var e,t,n=this.player.model.textTrack.getTextTracks(),r=0;r ').concat(e.text," ");return n}),r=document.querySelector(".".concat(En));r.innerHTML=n.join("
")}},{key:"_setSubtitleSize",value:function(e){var t=.003125,n=.025,r=14,i=40,o=1.5;this._fontSize=Math.max(e*n,r),this._fontSize=Math.min(this._fontSize,i),this._borderRadius=Math.max(e*t,o)}},{key:"_showRandomSubtitle",value:function(){var e=this._selectSubtitleTrack(),t=e.index;return t!==-1&&(this.setShowingTextTrackIndex(t,!0),!0)}}]),t}(yo),Da="myunSyncAvailable",Ua="myunSyncMessage",Fa=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r._available=!1,r._textTrackLabel=e._config.myunSyncTextTrackLabel,r._myunSyncTrack=null,r._myunMsgCue=null,r.onPlayer(Si,r._onProviderRemoved.bind(l(l(r)))),r.onPlayer(Yi,r._onTextTrackAdd.bind(l(l(r)))),r.onPlayer(Ki,r._onCueChange.bind(l(l(r)))),ae(r.player,l(l(r))).method("getMyunSyncAvailable"),r}return s(t,e),i(t,[{key:"getMyunSyncAvailable",value:function(){return this._available}},{key:"_onProviderRemoved",value:function(){this._myunSyncTrack=null,this._available=!1,this._myunMsgCue=null,this.player.trigger(Da,{type:Da,available:!1})}},{key:"_onTextTrackAdd",value:function(e){var t=e.track;if(t.label===this._textTrackLabel&&"subtitles"===t.kind){var n=this.player.model.textTrack.getTextTracks(),r=n.indexOf(t);this.player.model.textTrack.setTextTrackEnable(r),this._myunSyncTrack=t,this.player.trigger(Da,{type:Da,available:!0})}}},{key:"_onCueChange",value:function(e){var t=e.activeCues,n=e.cues,r=e.track;if(r===this._myunSyncTrack&&0!==t.length){var i=t.pop();i!==this._myunMsgCue&&(this._myunMsgCue=i,this.player.trigger(Ua,{type:Ua,message:i.text,cue:i,cues:n}))}}}]),t}(yo),La={isAvailable:function(){return!(!window.screen||!window.screen.orientation)},lock:function(e){var t=window.screen.orientation.lock(e);return t},unlock:function(){window.screen.orientation.unlock()},getType:function(){return window.screen.orientation.type},getAngle:function(){return window.screen.orientation.angle},getOrientationObj:function(){return window.screen.orientation}},Na=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this,e)),r._onFullscreen=r._onFullscreen.bind(l(l(r))),r._available=La.isAvailable(),r._available&&r.onPlayer(Ii,r._onFullscreen),r}return s(t,e),i(t,[{key:"_onFullscreen",value:function(e){var t=e.fullscreen;if(t){if(this.provider()){var n=this.provider().getWidth(),r=this.provider().getHeight(),i=Y(),o="";if(n&&r){var a=n/r,s=i.width/i.height;o=a>s?"landscape":"portrait",La.lock(o)["catch"](P)}}}else La.unlock()}}]),t}(yo),Wa={},Ga=function(e){function t(e){var r;return n(this,t),r=f(this,u(t).call(this)),r._container=document.getElementById(e),r.formatState(),r}return s(t,e),i(t,[{key:"formatState",value:function(){this._config={},this._config.containerId=this._container.id,this._status={uniqId:G(),state:"idle",focus:!1,isSetuped:!1,flashReady:!1,dragging:!1,index:"",containerFontSize:16},this._provider=null,this.plugin={},this.dom={},this.timer={},this.model={}}},{key:"getUniqId",value:function(){return this._status.uniqId}},{key:"setup",value:function(e){var t=this;kt()&&console.log("[setup]",e),this._status&&this._status.isSetuped&&!this._container.querySelector(_n)&&(this.remove(),console.warn("muduPlayer().setup(): please don`t setup twice")),this.formatState();var n=Z(e),r=$(te(),n);if(this._config=a({},this._config,r),this._config.uniqId&&(this._status.uniqId=this._config.uniqId),rt.call(this),this.trigger(gi),!O("array",this._config.playlist))throw new Error("setup(options): you should give me a video url to play, through `options.file` or `options.playlist` array");this._status.lang=K(this._config.language,this._config.localization),this._status.localization=this._config.localization[this._status.lang],this._status.isSetuped=!0,this.trigger(Ti),this.trigger("setup"),re.call(this),Ke.call(this),Qe.call(this),Oe.call(this);var i=this._config.autoplay;return De.call(this).then(function(){return i&&t.play(),Promise.resolve()})}},{key:"remove",value:function(){kt()&&console.log("[remove]"),this._status&&this._status.isSetuped&&(Ze.call(this),$e.call(this),it.call(this),Ue.call(this),ie.call(this),this._config=null,this._status=null,this._provider=null,this.dom=null,this.timer=null,this.model=null,this.trigger("remove"))}},{key:"stop",value:function(){kt()&&console.log("[stop]"),Ue.call(this)}}]),t}($t),za=function(e){function t(e,r){var i;return n(this,t),i=f(this,u(t).call(this,e,r)),i._onVideoEvents=i._onVideoEvents.bind(l(l(i))),i._onTextTracksAdd=i._onTextTracksAdd.bind(l(l(i))),i._onTextTracksChange=i._onTextTracksChange.bind(l(l(i))),i._onTextTracksRemove=i._onTextTracksRemove.bind(l(l(i))),i._onTextTrackCueChange=i._onTextTrackCueChange.bind(l(l(i))),i.TAG="HTML5Provider",i}return s(t,e),i(t,[{key:"setup",value:function(e){var t=this,n=e.file;this._setupEvents(),this._duration=0,this.video.src=n,this.oncePlayer("play",function(){"HTML5Provider"===t.TAG&&t.seek(.01)})}},{key:"getMediaElement",value:function(){var e=this.player.dom.videoWrap.querySelector("video");if(e){var t=e.textTracks;if(t&&t.length){try{e.parentNode.removeChild(e)}catch(n){console.error("remove video element error")}return null}}return this.video=e,e}},{key:"createMediaElement",value:function(){var e=document.createElement("video"),t=this.player._config.preload;e.setAttribute("class",bn),e.setAttribute("preload",t);for(var n in this.player._config.videoAttributes){var r=this.player._config.videoAttributes[n];e.setAttribute(n,r)}return this.video=e,e}},{key:"play",value:function(){return this.video&&(this.video.setAttribute("preload","auto"),this.video.play()),Promise.resolve()}},{key:"pause",value:function(){return this.video&&this.video.pause(),Promise.resolve()}},{key:"remove",value:function(){if(this._removeEvents(),this.video){try{this.video.parentNode.removeChild(this.video)}catch(e){}this.video=null}p(u(t.prototype),"remove",this).call(this)}},{key:"seek",value:function(e){if(this.video){var t=this.getPosition();this.video.currentTime=e,this.trigger("seek",{type:"seek",position:t,offset:e})}}},{key:"getPlaybackRate",value:function(){return this.video?this.video.playbackRate:1}},{key:"setPlaybackRate",value:function(e){this.video&&(this.video.playbackRate=e,this.trigger("playbackrate",{type:"playbackrate",playbackRate:e}))}},{key:"getDuration",value:function(){return this._duration}},{key:"getPosition",value:function(){return this.video?this.video.currentTime:0}},{key:"getVolume",value:function(){return this.video?this.getMute()?0:this.video.volume:1}},{key:"getWidth",value:function(){return this.video?this.video.videoWidth:-1}},{key:"getHeight",value:function(){return this.video?this.video.videoHeight:-1}},{key:"setVolume",value:function(e){if(this.video){var t=this.video.muted;O("number",e)&&(e<0&&(e=0),e>1&&(e=1),this.video.volume=e,this.trigger("volume",{type:"volume",volume:e}),t&&e>0&&this.setMute(!1),t||0!==e||this.setMute(!0))}}},{key:"setMute",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.video&&(this.video.muted=!!e,this.trigger("mute",{type:"mute",mute:!!e}))}},{key:"getMute",value:function(){return!!this.video&&this.video.muted}},{key:"setStretching",value:function(e){if(this.video)switch(e){case"none":case"contain":case"fill":case"cover":case"scale-down":this.video.style.objectFit=e;break;default:this.video.style.objectFit="contain"}}},{key:"getStretching",value:function(){return this.video.style.objectFit}},{key:"getBuffer",value:function(){if(!this.video)return[];for(var e=this.video,t=e.buffered,n=[],r=0;r1});break;case"playing":this.trigger("play",e),this.trigger(t,e);break;case"durationchange":1!==this.video.duration&&(this._duration=this.video.duration,this.trigger("duration")),this.trigger(t,e);break;default:this.trigger(t,e)}}}]),t}(Po);za.mediaEvents=["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","mozaudioavailable","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],za.canPlayMineType=function(e){var t=document.createElement("video");return t.canPlayType(e)},za.isSupported=function(){return!bt()||bt()&&Nt.major>8},za.isPlaybackRateSuppooed=function(){return!0},za.isHTML5=function(e){return!0},za.isFlash=function(e){return!1},za.version="0.21.0";var Ha=function(e){function t(e,r){var i;return n(this,t),i=f(this,u(t).call(this,e,r)),i.video_error_report=!1,i.TAG="DashjsProvider",i}return s(t,e),i(t,[{key:"loadFiles",value:function(){var e=new yi(this.player._config.fileCdnPath+"/dash.js");return e.load()}},{key:"setup",value:function(e){var n=this,r=e.file;p(u(t.prototype),"setup",this).call(this,{file:r}),this.file=r,"auto"===this.player._config.preload?this.loadDash():this.oncePlayer("beforePlay",function(){return n.loadDash()})}},{key:"loadDash",value:function(){this.dashPlayer=window.dashjs.MediaPlayer().create(),this.dashPlayer.initialize(this.video,this.file,!1)}},{key:"remove",value:function(){p(u(t.prototype),"remove",this).call(this),this.dashPlayer&&this.dashPlayer.reset()}}]),t}(za);Ha.formats={"application/dash+xml":"dash"},Ha.types=["mpd","dash"],Ha.canPlayType=function(e){return Ha.types.indexOf(e)>=0?"maybe":""},Ha.canPlayMineType=function(e){return e in Ha.formats?"maybe":""},Ha.isSupported=function(){var e=window.MediaSource||window.WebKitMediaSource,t=window.SourceBuffer||window.WebKitSourceBuffer,n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!r},Ha.isFlash=function(e){return!1},Ha.isHTML5=function(e){return!0},Ha.version="2.9.0";var qa=function(e){function t(e,r){var i;return n(this,t),i=f(this,u(t).call(this,e,r)),i.onHlsError=i.onHlsError.bind(l(l(i))),i.option=r,i.video_error_report=!1,i.onPlayer("buffer",i._onPlayerBuffer.bind(l(l(i)))),i.TAG="HlsjsProvider",i}return s(t,e),i(t,[{key:"loadFiles",value:function(){var e=new yi("//e.huawei.com/topic/minisiteStatic/ebg/js/vendor/mudu/hls.js");return e.load()}},{key:"setup",value:function(e){var n=this,r=e.file;p(u(t.prototype),"setup",this).call(this,{file:r}),this.file=r,"auto"===this.player._config.preload?this.loadHls():this.oncePlayer(Wi,function(){return n.loadHls()})}},{key:"play",value:function(){var e=this.player.getState(),n=this.getPosition();return"idle"===e&&n>0&&this.seek(0),p(u(t.prototype),"play",this).call(this)}},{key:"loadHls",value:function(){var e=ot(),t=e.XHRLoader,n={fLoader:t},r=a({},this.option["hls.js"]||{},n),i=this.hlsPlayer=new window.Hls(r);i.subtitleDisplay=!1,i.loadSource(this.file),i.attachMedia(this.video),i.on(window.Hls.Events.ERROR,this.onHlsError)}},{key:"onHlsError",value:function(e,t){var n=t.type,r=t.details,i=t.fatal,o="".concat(n,"_").concat(r),a=[window.Hls.ErrorDetails.BUFFER_STALLED_ERROR,window.Hls.ErrorDetails.BUFFER_NUDGE_ON_STALL];if(a.indexOf(r)===-1){if(n===window.Hls.ErrorTypes.NETWORK_ERROR){var s=t.networkDetails;s&&(s.status&&(o+="_".concat(s.status)),s.statusText&&(o+="_".concat(s.statusText)))}this.trigger(co,{message:o,fatal:i,details:r,data:t})}}},{key:"remove",value:function(){p(u(t.prototype),"remove",this).call(this),this.hlsPlayer&&(this.hlsPlayer.off(window.Hls.Events.ERROR,this.onHlsError),this.hlsPlayer.detachMedia(),this.hlsPlayer.destroy())}},{key:"_onPlayerBuffer",value:function(e){var t=e.oldState;if("playing"===t){var n=this.getPosition(),r=this.getDuration();r-n<1&&n>0&&r>2&&(this.pause(),this.trigger("ended"))}}}]),t}(za);qa.formats={"application/vnd.apple.mpegurl":"hls"},qa.type=["m3u8","hls"],qa.canPlayType=function(e){return qa.type.indexOf(e)>=0},qa.isHlsSupported=function(){var e=window.MediaSource||window.WebKitMediaSource,t=window.SourceBuffer||window.WebKitSourceBuffer,n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!r},qa.isSupported=function(){return qa.isHlsSupported()},qa.isFlash=function(e){return!1},qa.isHTML5=function(e){return!0},qa.version="0.10.1";var Va=function(e){function t(e,r){var i;return n(this,t),i=f(this,u(t).call(this)),i.player=e,i.p_player_events=[],i.p_dom_events=[],i.option=r,i}return s(t,e),i(t,[{key:"onPlayer",value:function(e,t){this.player.on(e,t),this.p_player_events.push({evt:e,fn:t})}},{key:"oncePlayer",value:function(e,t){this.player.once(e,t),this.p_player_events.push({evt:e,fn:t})}},{key:"onDom",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];R(e,t,n),r&&this.p_dom_events.push({ele:e,evt:t,fn:n})}},{key:"remove",value:function(){var e=this;this.p_player_events.forEach(function(t){return e.player.off(t.evt,t.fn)}),this.p_dom_events.forEach(function(e){return D(e.ele,e.evt,e.fn)})}}]),t}($t);Va.isSupported=Jt,Va.defaultOptions={};var Ja=function(e){function t(e,r){var i;n(this,t),i=f(this,u(t).call(this,e,r));var o,s,c=At(),l={x5Layer:{"x5-video-player-type":"h5","x5-video-player-fullscreen":"true","x5-video-orientation":"portrait"},x5Inline:{"x5-playsinline":""}};i.eventIds=[];var h=e.once("internal_option_merged",function(){o=r.inline,s=r.layer;var t=e._config.height;if(!O("number",t)&&s&&console.error("x5 plugin: 使用x5插件的layer选项时,高度应该设置为具体的px值"),o&&c&&(i.player._config.videoAttributes=a({},i.player._config.videoAttributes,l.x5Inline)),s&&c&&(i.player._config.videoAttributes=a({},i.player._config.videoAttributes,l.x5Layer)),c&&(i.player._config.autoplay=!1),s&&c){var n=e.on("internal_model_inited",function(){var t=i.player.dom.container.querySelector(".".concat(ui));t.style.display="none",i.fakeFullBtn=F('')),i.player.appendRightControllerButton(i.fakeFullBtn),i.fakeFullBtn.addEventListener("click",function(){i.fakeFullBtn.style.display="none",U(e.dom.container).remove(Ar),i.player.notice("点击右下角全屏")})}),u=e.on("play",function(){U(e.dom.container).add(Ar),i.fakeFullBtn.style.display="inline-block"}),f=e.on("pause",function(){i.fakeFullBtn.style.display="none"}),h=e.on("buffer",function(){e.getDuration()===1/0&&e.trigger("internal_buffer",!1)});i.eventIds.push({name:"internal_model_inited",id:n},{name:"play",id:u},{name:"pause",id:f},{name:"buffer",id:h})}});return i.eventIds.push({name:"internal_option_merged",id:h}),i}return s(t,e),i(t,[{key:"remove",value:function(){var e=this;this.eventIds.forEach(function(t){e.player.off(t.name,t.id)})}}]),t}(Va);Ja.isSupported=Vt,Ja.defaultOptions={inline:!1,layer:!1};var Xa=function(e){function t(){return n(this,t),f(this,u(t).apply(this,arguments))}return s(t,e),i(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new yi(this.player._config.fileCdnPath+"/danmaku.js");return n.load().then(function(){var n=new window.Danmaku;n.init(a({container:e.player.dom.container.querySelector(".".concat(Tn))},t)),ae(e,n).method("resize").method("show").method("hide").method("destroy").method("clear"),e.danmaku=n;var r=e.getCompaVisibility(),i=function(){O("function",e.resize)&&e.resize()},o=function(){e.danmaku.clear(),e.disableSend=document[r.hidden]};return e.onPlayer("play",function(){n.paused=!1}),e.onPlayer("pause",function(){n.paused=!0}),e.onPlayer("resize",i),e.onDom(window,"resize",i),r&&e.onDom(document,r.visibilitychange,o),n})}},{key:"emit",value:function(e){this.disableSend||this.danmaku.emit(e)}},{key:"getCompaVisibility",value:function(){return O("undefined",document.hidden)?O("undefined",document.msHidden)?O("undefined",document.webkitHidden)?void 0:{hidden:"webkitHidden",visibilitychange:"webkitvisibilitychange"}:{hidden:"msHidden",visibilitychange:"msvisibilitychange"}:{hidden:"hidden",visibilitychange:"visibilitychange"}}},{key:"setSpeed",value:function(e){this.danmaku&&(this.danmaku.speed=e)}},{key:"remove",value:function(){p(u(t.prototype),"remove",this).call(this),O("function",this.destroy)&&this.destroy()}}]),t}(Va);Xa.isSupported=function(){var e=Gt(),t=e.browser.msie&&8===e.browser.version.major;return!t};var Ya=function(e){function t(e,r){var i;return n(this,t),i=f(this,u(t).call(this,e,r)),i.timer=new Bo(a({},r,{gap:i.option.gap||6e4})),i.timer.on("tick",function(e){i.trigger("tick",e)}),i.onPlayer("play",function(){i.timer.start()}),i.onPlayer("pause",function(){i.timer.stop()}),i.onPlayer("idle",function(){i.timer.stop()}),i.onPlayer("complete",function(){i.timer.stop()}),i.onDom(document,"visibilitychange",function(){i.timer.tick()}),i.onDom(window,"pagehide",function(){i.timer.tick()}),i.onDom(window,"unload",function(){i.timer.tick()}),i.onDom(window,"beforeunload",function(){i.timer.tick()}),O("function",i.option.onTick)&&i.on("tick",i.option.onTick),i}return s(t,e),i(t,[{key:"remove",value:function(){p(u(t.prototype),"remove",this).call(this),this.timer.stop()}}]),t}(Va);Ya.isSupported=Vt;var Ka=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:"Timer.TimePassed",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s["default"])(this,e),this.param=r,this.task=null,this.topic=n,this.dotTime=(new Date).getTime(),this.uuid=_scope.Utils.Guid(),_scope.MsgBus.On("timer.stop",function(e){"function"==typeof e&&e(t)&&t.stop()})}return(0,c["default"])(e,[{key:"start",value:function(){this.stop(),function(e){e.task=setTimeout(function t(){var n=e._passedTime();n>0&&_scope.MsgBus.Pub(e.topic,(0,o["default"])({},e.param,{duration:n})),e.task=setTimeout(t,e.param.timegap||1e3*_scope.Utils.GetRandomNum(10,60))},e.param.timegap||1e3*_scope.Utils.GetRandomNum(60,10))}(this)}},{key:"stop",value:function(){if(!this.task)return void this._passedTime();clearTimeout(this.task),this.task=null;var e=this._passedTime();e>0&&_scope.MsgBus.Pub(this.topic,(0,o["default"])({},this.param,{duration:e}))}},{key:"_passedTime",value:function(){var e=(new Date).getTime()-this.dotTime;return this.dotTime=(new Date).getTime(),parseInt(e/1e3)}}]),e}()},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.DB=n(74)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(64)),o=r(i),a=n(65),s=r(a),u=function(){function e(){(0,o["default"])(this,e),this.datas={}}return(0,s["default"])(e,[{key:"Set",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i={key:e,value:t,expire:r};this.datas[e]=i,r>0&&setTimeout(function(){_scope.MsgBus.Pub("Data.Timeout."+e,i),n.Del(e)},1e3*r),_scope.MsgBus.Pub("Data.Set."+e,i)}},{key:"Get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return"undefined"==typeof this.datas[e]?t:this.datas[e].value}},{key:"Del",value:function(e){"undefined"!=typeof this.datas[e]&&(_scope.MsgBus.Pub("Data.Del."+e,this.datas[e]),delete this.datas[e],this.datas[e]=void 0)}}]),e}();e.exports=new u},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Feature=n(76)}).call(t,function(){return this}())},function(e,t,n){n(1),n(2);e.exports={Room:function(e,t){_scope.MsgBus.Sub("SendObj.Room",function(n){e.Room=n,"function"==typeof t&&t(n)})},User:function(e,t){_scope.MsgBus.Sub("SendObj.User",function(n){e.User=n,"function"==typeof t&&t(n)})},Comment:function(e,t){_scope.MsgBus.Sub("SendObj.Comment",function(n){e.Comment=n,"function"==typeof t&&t(n)})},LuckyDraw:function(e,t){_scope.MsgBus.Sub("SendObj.LuckyDraw",function(n){e.LuckyDraw=n,"function"==typeof t&&t(n)})},PPT:function(e,t){_scope.MsgBus.Sub("SendObj.PPT",function(n){e.PPT=n,"function"==typeof t&&t(n)})},Vote:function(e,t){_scope.MsgBus.Sub("SendObj.Vote",function(n){e.Vote=n,"function"==typeof t&&t(n)})},Barrage:function(e,t){_scope.MsgBus.Sub("SendObj.Barrage",function(n){e.Barrage=n,"function"==typeof t&&t(n)})},Signup:function(e,t){_scope.MsgBus.Sub("SendObj.Signup",function(n){e.Signup=n,"function"==typeof t&&t(n)})},Topic:function(e,t){_scope.MsgBus.Sub("SendObj.Topic",function(n){e.Topic=n,"function"==typeof t&&t(n)})},Redpack:function(e,t){_scope.MsgBus.Sub("SendObj.Redpack",function(n){e.Redpack=n,"function"==typeof t&&t(n)})},Reward:function(e,t){_scope.MsgBus.Sub("SendObj.Reward",function(n){e.Reward=n,"function"==typeof t&&t(n)})},EventBus:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";""!=t&&(t+="."),e.On=function(e,n){return _scope.MsgBus.Sub(t+e,n)},e.Off=function(e){_scope.MsgBus.UnSub(e)},e.Fire=function(e,n){_scope.MsgBus.Pub(t+e,n)}}}},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Room=n(78)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(63)),o=r(i),a=n(26),s=r(a),u=n(79),c=r(u),l=n(64),f=r(l),h=n(65),p=r(h),d=n(15),v=n(81);e.exports=function(){function e(t){(0,f["default"])(this,e),_scope.Feature.EventBus(this),_scope.Feature.User(this),_scope.Feature.Comment(this),_scope.Feature.LuckyDraw(this),_scope.Feature.PPT(this),_scope.Feature.Barrage(this),_scope.Feature.Vote(this),_scope.Feature.Signup(this),_scope.Feature.Topic(this),_scope.Feature.Redpack(this),_scope.Feature.Reward(this),this.act_id=t.id,_scope.DB.Set("Room",this),this._startSeesionAndKeepAlive(),this._enterPageApi(),this._msgbusDestroy()}return(0,p["default"])(e,[{key:"_msgbusDestroy",value:function(){var e=this;this.destroyKey=_scope.MsgBus.Sub("Destroy",function(){_scope.MsgBus.UnSubAll("User.Online"),_scope.MsgBus.UnSubAll("User.WatchTime"),rop.Remove("stream-event"+e.stream),_scope.MsgBus.UnSubAll("Room.StreamEvent"),_scope.MsgBus.UnSubAll("Room.ViewNumChanged"),_scope.MsgBus.UnSubAll("Room.Init.Error"),_scope.MsgBus.UnSubAll("SendObj.PPT"),_scope.MsgBus.UnSubAll("SendObj.Signup"),_scope.MsgBus.UnSubAll("SendObj.Topic"),_scope.MsgBus.UnSubAll("SendObj.Reward"),_scope.MsgBus.UnSubAll("SendObj.Comment"),_scope.MsgBus.UnSubAll("Room.Init.Over"),e._destroy(),_scope.MsgBus.UnSub(e.destroyKey)})}},{key:"_startSeesionAndKeepAlive",value:function(){var e=this;Fetcher.Get(v.USER_AUTH_START_SESSION,function(){_scope.MsgBus.Pub("User.StartSeesion")}),_scope.MsgBus.Sub("User.Online",function(){e.Online()}),function(e){function t(){_scope.MsgBus.Pub("User.Online")}e._userOnlineTimer=setInterval(t,2e4)}(this)}},{key:"_subEvent",value:function(){function e(e,t){for(var n=0;ne))return r.url}return""}var t=this,n=this;_scope.MsgBus.Sub("User.WatchTime",function(e){t.WatchTime(e)}),_scope.MsgBus.Sub("Player.pptTimer",function(t){if(n.trailer&&n.trailer.m3u8){var r=t.getPlayFile();if(n.trailer.m3u8===r){var i=t.getPosition(),o=e(i,n.trailer.ppt_list);o&&o!==n.trailer.currentUrl&&(n.trailer.currentUrl=o,_scope.MsgBus.Pub("PPT.trailer.changed",{currentUrl:o,open:n.trailer.open,player:t.player,position:i}))}}}),function(e){rop.On("stream-event-"+e.stream,function(t){var n=JSON.parse(t);n.stream==e.stream&&_scope.MsgBus.Pub("Room.StreamEvent",t)})}(this),function(e){function t(){e.RefreshViewNum(function(n){var r=JSON.parse(n);"y"==r.status&&_scope.MsgBus.Pub("Room.ViewNumChanged",r.num),e._refreshViewNumTimer=setTimeout(t,1e3*_scope.Utils.GetRandomNum(120,60))})}e._refreshViewNumTimer=setTimeout(t,1e3*_scope.Utils.GetRandomNum(120,60))}(this)}},{key:"Init",value:function(){this.platform=function(){for(var e=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],n="pc",r=0;r0){n="mobile";break}return n}(),this.InitData()}},{key:"Online",value:function(){var e=v.USER_AUTH_KEEP_ALIVE,t=this.act_id,n={current_page:"ACTIVITY."+t};Fetcher.Post(e,(0,c["default"])(n),function(e){window.MUDUDEBUG&&console.log("online",e)},{"Content-Type":"application/json"})}},{key:"WatchTime",value:function(e){var t=v.USER_AUTH_WATCH_TIME_URL,n="live";e={id:this.act_id,time:e.duration,type:n,video_id:0},Fetcher.Post(t,(0,c["default"])(e),function(e){window.MUDUDEBUG&&console.log("watch_time",e)},{"Content-Type":"application/json"})}},{key:"InitData",value:function(){var e=this,t=v.BASE_INFO_URL+"&id="+this.act_id+"&url="+encodeURIComponent(location.href.replace(location.hash,""));Fetcher.Get(t,function(t,n){if(200!=n)_scope.MsgBus.Pub("Room.Init.Error",n);else{var r=JSON.parse(t),i=r.status;i&&_scope.DB.Set("User.Arrears.Status",i),e.server_timestamp=r.timestamp,e.name=r.act.name,e.stream=r.act.stream,e.fee_status=r.act.fee_status,e.limit_status=r.act.limit_status,e.live_status=r.act.live_status,e.share_url=r.shareUrl,e.view_num=r.viewNum,e.rtmp_play_addr=r.rtmp_play_addr,e.hls_play_addr=r.hls_play_addr,e.trailer=(0,s["default"])(r.trailer||{m3u8:"",open:0,trailer_img:""},{ppt_list:[],currentUrl:""}),e.live_img=r.live_img||r.console_setting_image||"https://mudu.tv/assets/console/images/livecoverimg.jpg",e.menus=r.menus||[],e.banners=r.act.banners||[],e.theme=r.act.theme||"default",e.themes=r.act.themes||[],e.countdown=r.countdown,e.domain=r.domain?"http://"+r.domain:"http://mudu.tv","[object Object]"===Object.prototype.toString.call(r.dingdingIsvConfig)&&(e.dingdingIsvConfig=r.dingdingIsvConfig),_scope.DB.Set("socialAuthConfig",{isSetType:{issetQq:r.issetQq,issetWeibo:r.issetWeibo,issetWeixin:r.issetWeixin},oauth2AppIdConfig:r.oauth2AppIdConfig}),e._setThemeImgUrlAbsolute(),e._setLiveImgAbsolute(),e._subEvent(),e._getTrailerPPtList(),_scope.MsgBus.Pub("SendObj.PPT",new _scope.PPT({act_id:r.act.id,config:r.act.slides,actHashId:r.actHashId})),_scope.MsgBus.Pub("SendObj.Vote",new _scope.Vote({act_id:r.act.id,vote:r.vote})),_scope.MsgBus.Pub("SendObj.Signup",new _scope.Signup({act_id:r.act.id,signup:r.signup})),_scope.MsgBus.Pub("SendObj.Topic",new _scope.Topic({act_id:r.act.id,topic_visitor_publish:r.act.topic_visitor_publish,topic_needs_check:r.act.topic_needs_check,topic_allow_reply:r.act.topic_allow_reply,topic_count_num:r.topicNum})),_scope.MsgBus.Pub("SendObj.Reward",new _scope.Reward({jsonObj:r,Room:e})),_scope.MsgBus.Pub("SendObj.Comment",new _scope.Comment({jsonObj:r,Room:e})),e._getStreamAddress()}})}},{key:"_enterPageApi",value:function(){var e=this;_scope.MsgBus.Sub("Room.User.Over",function(){var t=v.AUTH_DOMAIN+"/user/api/enter_activity/"+e.act_id;Fetcher.Get(t,function(e){window.MUDUDEBUG&&console.log("enter_activity",e)})})}},{key:"_setThemeImgUrlAbsolute",value:function(){this.themes=this.themes.map(function(e){return e.banner=_scope.Utils.GetAbsoluteUrl({url:e.banner,domain:"mudu.tv"}),e.cover_img=_scope.Utils.GetAbsoluteUrl({url:e.cover_img,domain:"mudu.tv"}),e})}},{key:"_setLiveImgAbsolute",value:function(){this.live_img=_scope.Utils.GetAbsoluteUrl({url:this.live_img,domain:"mudu.tv"})}},{key:"_destroy",value:function(){clearTimeout(this._refreshViewNumTimer),clearInterval(this._userOnlineTimer)}},{key:"_getTrailerPPtList",value:function(){var e=this;this.trailer&&this.trailer.m3u8&&Fetcher.Get(v.API_DOMAIN+"/?c=activity&a=ajaxgetvideoslides&video_id="+this.trailer.m_id,function(t){var n=JSON.parse(t);"n"!==n.status&&"y"===n.status&&(e.trailer.ppt_list=n.data)})}},{key:"_getStreamAddress",value:function(){var e=this,t=v.API_DOMAIN+"/activity/"+this.act_id+"/videos";Fetcher.Get(t,function(t){var n=JSON.parse(t);e.rtmp_play_addr=n.internal_pc[0].address,e.hls_play_addr=n.internal_mobile[0].address,_scope.MsgBus.Pub("Room.Init.Over")})}},{key:"RefreshViewNum",value:function(e){var t=v.API_DOMAIN+"/?c=activity&a=Analysis&id="+this.GetId();Fetcher.PostForm(t,{},e)}},{key:"GetViewNum",value:function(){return this.view_num}},{key:"GetName",value:function(){return this.name}},{key:"GetStream",value:function(){return this.stream}},{key:"GetShareUrl",value:function(){return this.share_url}},{key:"GetPlayAddr",value:function(){return"pc"!==this.platform||d.isWindowsWechat()?this.hls_play_addr:this.rtmp_play_addr}},{key:"GetLiveImage",value:function(){return this.live_img}},{key:"GetTrailer",value:function(){return this.trailer.open=!!+this.trailer.open,JSON.parse((0,c["default"])(this.trailer))}},{key:"GetId",value:function(){return this.act_id}},{key:"GetLiveStatus",value:function(){return this.live_status}},{key:"GetMenus",value:function(){return this.menus}},{key:"GetBanners",value:function(){return this.banners}},{key:"GetActiveTheme",value:function(){return this.theme}},{key:"GetThemes",value:function(){return this.themes}},{key:"GetCountdown",value:function(){return this.countdown?(0,o["default"])({},this.countdown,{server_timestamp:this.server_timestamp}):{server_timestamp:this.server_timestamp}}}]),e}()},function(e,t,n){e.exports={"default":n(80),__esModule:!0}},function(e,t,n){var r=n(31),i=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},function(e,t,n){var r=(n(1),n(2),"http://mudu.tv"),i="http://mudu.tv",o=r+"/?c=activity&a=ajaxActBaseInfo",a=r+"/?c=activity&a=ajaxSendPhoneVerify",s=r+"/?c=activity&a=ajaxSaveSignupRecord",u=r+"/?c=activity&a=ajaxGetReplies",c=r+"/?c=activity&a=ajaxGetTopics",l=r+"/?c=activity&a=ajaxCreateTopic",f=r+"/?c=sociallogin&a=sdklogin",h="/?c=sociallogin&a=sdklogin",p=r+"/?c=activity&a=ajaxGetRedpackStatus",d=r+"/?c=activity&a=ajaxGetRedpackRecord",v=r+"/?c=activity&a=ajaxSnatchRedpack",y=r+"/?c=user&a=ajaxGetDonateMessage",g=r+"/activity.php?a=AjaxGiftDetail",m=r+"/user.php?a=donate",_="/user.php?a=donate",b=r+"/user.php?a=ajaxFreePropDonate",w=r+"/?c=document&a=ajaxGetPageImage",S=i+"/user/api/start_session",k=i+"/user/api/keep_alive",T=i+"/user/api/user_info/",E=i+"/user/api/login_by_anonymous",O=i+"/user/api/watch_time",x=i+"/user/api/login_by_other",P=["qq","weibo","weixin","openweixin","mingdao","weimob"],C=//g,M=/\[em_([0-9]*)\]/g;e.exports={API_DOMAIN:r,BASE_INFO_URL:o,SIGNUP_SENDSMS_URL:a,SIGNUP_SUBMIT_URL:s,TOPIC_GET_REPLY_URL:u,TOPIC_GET_URL:c,TOPIC_CREATE_URL:l,SOCIAL_LOGIN_URL:f,RELATIVE_SOCIAL_LOGIN_URL:h,REDPACK_STATUS_URL:p,REDPACK_RECORD_URL:d,REDPACK_SNATCH_URL:v,CASH_DONATE_DETAIL_URL:y,GIFT_DETAIL_URL:g,DONATE_URL:m,RELATIVE_DONATE_URL:_,FREE_GIFT_DONATE_URL:b,PPT_GET_IMG_BY_PAGE_URL:w,COMMENT_IMAGE_NUM_REG:C,COMMENT_TEXT_REG:M,SOCIAL_LOGIN_TYPE_ARRAY:P,AUTH_DOMAIN:i,USER_AUTH_START_SESSION:S,USER_AUTH_KEEP_ALIVE:k,USER_AUTH_GET_USER_INFO:T,USER_AUTH_ANONYMOUS:E,USER_AUTH_WATCH_TIME_URL:O,USER_AUTH_LOGIN_BY_OTHER:x}},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.User=n(83)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(63)),o=r(i),a=n(84),s=r(a),u=n(79),c=r(u),l=n(64),f=r(l),h=n(65),p=r(h),d=n(81),v=n(15),y=n(118),g=function(){function e(){(0,f["default"])(this,e),_scope.Feature.EventBus(this),_scope.Feature.Room(this),this._listenStartSessionSuccess(),this._msgbusDestroy()}return(0,p["default"])(e,[{key:"_msgbusDestroy",value:function(){var e=this;this.destroyKey=_scope.MsgBus.On("Destroy",function(){_scope.MsgBus.UnSubAll("User.Registered"),_scope.MsgBus.UnSubAll("User.Assigned"),_scope.MsgBus.UnSub(e.destroyKey)})}},{key:"_listenStartSessionSuccess",value:function(){var e=this;_scope.MsgBus.Sub("User.StartSeesion",function(){e._getUserInfo(e._PubInitUserOver)})}},{key:"_PubInitUserOver",value:function(){_scope.MsgBus.Pub("User.Init.Over")}},{key:"_getUserInfo",value:function(e){var t=this,n=d.USER_AUTH_GET_USER_INFO+this.Room.act_id;Fetcher.Get(n,function(n){""===n?t._login_by_anonymous(e):t._dealUserInfo(JSON.parse(n).user,e)})}},{key:"_login_by_anonymous",value:function(e){var t=this,n=(0,c["default"])({nick:_scope.Utils.GetCookie("user")||"",avatar:_scope.Utils.GetCookie("avatar")||""});Fetcher.Post(d.USER_AUTH_ANONYMOUS,n,function(n){t._dealUserInfo(JSON.parse(n).user,e)},{"Content-Type":"application/json"})}},{key:"_dealUserInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if("object"===("undefined"==typeof e?"undefined":(0,s["default"])(e))){var n=e.id,r=e.nick,i=e.avatar;this.user=r,this.avatar=i,this.id=n,_scope.DB.Set("UserInfo",(0,o["default"])({},e,{user:r})),_scope.DB.Set("User",this),_scope.MsgBus.Pub("User.Assigned",this),"function"==typeof t&&t()}}},{key:"Assign",value:function(e,t,n,r){this._Assign(e,t,n,"assign",r)}},{key:"_Assign",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"assign",i=arguments[4];return this.id?void this.Regist(e,t,n,r,i):void console.error(" fetch userinfo not completed ")}},{key:"Regist",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"assign",i=arguments[4],o=this;if(this.Room){var a=d.USER_AUTH_LOGIN_BY_OTHER;Fetcher.Post(a,(0,c["default"])({type:r,user_id:""+n,avatar:t,nick:e}),function(e){e=JSON.parse(e);var t={},n=1e3===e.errcode;t.status=n?"y":"n",t.info=e.msg,n&&o._getUserInfo(function(){_scope.MsgBus.Pub("User.Registered",(0,c["default"])(t)),"function"==typeof i&&i(o.GetUser())})},{"User-Agent":navigator.userAgent,Referer:document.referrer,"Content-Type":"application/json"})}}},{key:"GetUser",value:function(){var e=_scope.DB.Get("UserInfo");return{name:e.user,avatar:e.avatar,id:e.id,assign_id:e.assign_id}}},{key:"SocialLogin",value:function(e){var t=_scope.DB.Get("socialAuthConfig");if(t){var n=t.isSetType,r=n.issetQq,i=n.issetWeibo,o=t.oauth2AppIdConfig,a=o.qq_appid,s=o.weibo_appid,u=o.weixin_mp_appid,c=_scope.DB.Get("UserInfo"),l=c.wx_union_id,f=c.qq_open_id,h=c.wb_open_id;if(e=_scope.Utils.GetPrimarySocialLoginType(e),!("weixin"==e&&l||"qq"==e&&f||"weibo"==e&&h)){var p="";"weixin"==e?p=u:"qq"==e&&r?p=a:"weibo"==e&&i&&(p=s);var v=encodeURIComponent(window.location.href),y=d.AUTH_DOMAIN+"/user/api/sociallogin/"+e+"/"+p+"?referer="+v;window.location.href=y}}}},{key:"WechatLogin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(_scope.DB.Get("UserInfo").wx_union_id&&!e)return!1;if(!v.isWechat())return!1;var t=encodeURIComponent(window.location.href),n=this.Room.domain+d.RELATIVE_SOCIAL_LOGIN_URL+"&loginType=weixin&referer="+t;window.location.href=n}},{key:"IsWechatLogined",value:function(){return v.isWechat()&&!!_scope.DB.Get("UserInfo").wx_union_id}},{key:"DingdingLogin",value:function(){var e=this;return!!this.Room.dingdingIsvConfig&&(!_scope.DB.Get("UserInfo").dingding_open_id&&(!!v.isDingding()&&("undefined"!=typeof dd&&void y.init(this.Room.dingdingIsvConfig,function(){return y.login(e.Room.dingdingIsvConfig.corpId,function(t){var n=t.id,r=t.user,i=t.avatar;e._Assign(r,i,n,"dingding")})}))))}}]),e}();e.exports=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(85),o=r(i),a=n(105),s=r(a),u="function"==typeof s["default"]&&"symbol"==typeof o["default"]?function(e){return typeof e}:function(e){return e&&"function"==typeof s["default"]&&e.constructor===s["default"]&&e!==s["default"].prototype?"symbol":typeof e};t["default"]="function"==typeof s["default"]&&"symbol"===u(o["default"])?function(e){return"undefined"==typeof e?"undefined":u(e)}:function(e){return e&&"function"==typeof s["default"]&&e.constructor===s["default"]&&e!==s["default"].prototype?"symbol":"undefined"==typeof e?"undefined":u(e)}},function(e,t,n){e.exports={"default":n(86),__esModule:!0}},function(e,t,n){n(87),n(100),e.exports=n(104).f("iterator")},function(e,t,n){"use strict";var r=n(88)(!0);n(89)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(54),i=n(51);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):(o-55296<<10)+(a-56320)+65536)}}},function(e,t,n){"use strict";var r=n(90),i=n(29),o=n(91),a=n(34),s=n(47),u=n(92),c=n(93),l=n(97),f=n(99),h=n(98)("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",y="values",g=function(){return this};e.exports=function(e,t,n,m,_,b,w){c(n,t,m);var S,k,T,E=function(e){if(!p&&e in C)return C[e];switch(e){case v:return function(){return new n(this,e)};case y:return function(){return new n(this,e)}}return function(){return new n(this,e)}},O=t+" Iterator",x=_==y,P=!1,C=e.prototype,M=C[h]||C[d]||_&&C[_],A=M||E(_),I=_?x?E("entries"):A:void 0,j="Array"==t?C.entries||M:M;if(j&&(T=f(j.call(new e)),T!==Object.prototype&&T.next&&(l(T,O,!0),r||s(T,h)||a(T,h,g))),x&&M&&M.name!==y&&(P=!0,A=function(){return M.call(this)}),r&&!w||!p&&!P&&C[h]||a(C,h,A),u[t]=A,u[O]=g,_)if(S={values:x?A:E(y),keys:b?A:E(v),entries:I},w)for(k in S)k in C||o(C,k,S[k]);else i(i.P+i.F*(p||P),t,S);return S}},function(e,t){e.exports=!0},function(e,t,n){e.exports=n(34)},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(94),i=n(43),o=n(97),a={};n(34)(a,n(98)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(36),i=n(95),o=n(59),a=n(56)("IE_PROTO"),s=function(){},u="prototype",c=function(){var e,t=n(41)("iframe"),r=o.length,i="<",a=">";for(t.style.display="none",n(96).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+a+"document.F=Object"+i+"/script"+a),e.close(),c=e.F;r--;)delete c[u][o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[u]=r(e),n=new s,s[u]=null,n[a]=e):n=c(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(35),i=n(36),o=n(45);e.exports=n(39)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(30).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(35).f,i=n(47),o=n(98)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(57)("wks"),i=n(58),o=n(30).Symbol,a="function"==typeof o,s=e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))};s.store=r},function(e,t,n){var r=n(47),i=n(62),o=n(56)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){n(101);for(var r=n(30),i=n(34),o=n(92),a=n(98)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){t.f=n(98)},function(e,t,n){e.exports={"default":n(106),__esModule:!0}},function(e,t,n){n(107),n(115),n(116),n(117),e.exports=n(31).Symbol},function(e,t,n){"use strict";var r=n(30),i=n(47),o=n(39),a=n(29),s=n(91),u=n(108).KEY,c=n(40),l=n(57),f=n(97),h=n(58),p=n(98),d=n(104),v=n(109),y=n(110),g=n(111),m=n(36),_=n(48),b=n(42),w=n(43),S=n(94),k=n(112),T=n(114),E=n(35),O=n(45),x=T.f,P=E.f,C=k.f,M=r.Symbol,A=r.JSON,I=A&&A.stringify,j="prototype",B=p("_hidden"),R=p("toPrimitive"),D={}.propertyIsEnumerable,U=l("symbol-registry"),F=l("symbols"),L=l("op-symbols"),N=Object[j],W="function"==typeof M,G=r.QObject,z=!G||!G[j]||!G[j].findChild,H=o&&c(function(){return 7!=S(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=x(N,t);r&&delete N[t],P(e,t,n),r&&e!==N&&P(N,t,r)}:P,q=function(e){var t=F[e]=S(M[j]);return t._k=e,t},V=W&&"symbol"==typeof M.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof M},J=function(e,t,n){return e===N&&J(L,t,n),m(e),t=b(t,!0),m(n),i(F,t)?(n.enumerable?(i(e,B)&&e[B][t]&&(e[B][t]=!1),n=S(n,{enumerable:w(0,!1)})):(i(e,B)||P(e,B,w(1,{})),e[B][t]=!0),H(e,t,n)):P(e,t,n)},X=function(e,t){m(e);for(var n,r=y(t=_(t)),i=0,o=r.length;o>i;)J(e,n=r[i++],t[n]);return e},Y=function(e,t){return void 0===t?S(e):X(S(e),t)},K=function(e){var t=D.call(this,e=b(e,!0));return!(this===N&&i(F,e)&&!i(L,e))&&(!(t||!i(this,e)||!i(F,e)||i(this,B)&&this[B][e])||t)},$=function(e,t){if(e=_(e),t=b(t,!0),e!==N||!i(F,t)||i(L,t)){var n=x(e,t);return!n||!i(F,t)||i(e,B)&&e[B][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=C(_(e)),r=[],o=0;n.length>o;)i(F,t=n[o++])||t==B||t==u||r.push(t);return r},Z=function(e){for(var t,n=e===N,r=C(n?L:_(e)),o=[],a=0;r.length>a;)!i(F,t=r[a++])||n&&!i(N,t)||o.push(F[t]);return o};W||(M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(n){this===N&&t.call(L,n),i(this,B)&&i(this[B],e)&&(this[B][e]=!1),H(this,e,w(1,n))};return o&&z&&H(N,e,{configurable:!0,set:t}),q(e)},s(M[j],"toString",function(){return this._k}),T.f=$,E.f=J,n(113).f=k.f=Q,n(61).f=K,n(60).f=Z,o&&!n(90)&&s(N,"propertyIsEnumerable",K,!0),d.f=function(e){return q(p(e))}),a(a.G+a.W+a.F*!W,{Symbol:M});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)p(ee[te++]);for(var ne=O(p.store),re=0;ne.length>re;)v(ne[re++]);a(a.S+a.F*!W,"Symbol",{"for":function(e){return i(U,e+="")?U[e]:U[e]=M(e)},keyFor:function(e){if(!V(e))throw TypeError(e+" is not a symbol!");for(var t in U)if(U[t]===e)return t},useSetter:function(){z=!0},useSimple:function(){z=!1}}),a(a.S+a.F*!W,"Object",{create:Y,defineProperty:J,defineProperties:X,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),A&&a(a.S+a.F*(!W||c(function(){var e=M();return"[null]"!=I([e])||"{}"!=I({a:e})||"{}"!=I(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!V(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return t=r[1],"function"==typeof t&&(n=t),!n&&g(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!V(t))return t}),r[1]=t,I.apply(A,r)}}}),M[j][R]||n(34)(M[j],R,M[j].valueOf),f(M,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(58)("meta"),i=n(37),o=n(47),a=n(35).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(40)(function(){return u(Object.preventExtensions({}))}),l=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},h=function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},p=function(e){return c&&d.NEED&&u(e)&&!o(e,r)&&l(e),e},d=e.exports={KEY:r,NEED:!1,fastKey:f,getWeak:h,onFreeze:p}},function(e,t,n){var r=n(30),i=n(31),o=n(90),a=n(104),s=n(35).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(45),i=n(60),o=n(61);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),u=o.f,c=0;s.length>c;)u.call(e,a=s[c++])&&t.push(a);return t}},function(e,t,n){var r=n(50);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(48),i=n(113).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(t){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?s(e):i(r(e))}},function(e,t,n){var r=n(46),i=n(59).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(61),i=n(43),o=n(48),a=n(42),s=n(47),u=n(38),c=Object.getOwnPropertyDescriptor;t.f=n(39)?c:function(e,t){if(e=o(e),t=a(t,!0),u)try{return c(e,t)}catch(n){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t){},function(e,t,n){n(109)("asyncIterator")},function(e,t,n){n(109)("observable")},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){f.ready(function(){f.runtime.permission.requestAuthCode({corpId:e,onSuccess:function(e){t(e.code)},onFail:function(e){console.error(e)}})})}var o=(n(1),n(2),n(84)),a=r(o),s=n(15),u=s.isDingding()&&"object"==("undefined"==typeof dd?"undefined":(0,a["default"])(dd)),c=["device.notification","biz.contact.choose","biz.contact.complexChoose","biz.user.get","biz.util.openLink","biz.navigation","biz.alipay.pay"],l={status:"n",flag:101,info:"未引入dingding sdk"},f=window.dd,h="http://mudu.tv/dingding.php?a=ajaxGetUserInfo";t.init=function(e,t){return u?(f.config({agentId:e.agentId,corpId:e.corpId,timeStamp:e.timeStamp,nonceStr:e.nonceStr,signature:e.signature,jsApiList:c}),f.ready(function(){"function"==typeof t&&t()}),void f.error(function(e){console.error(e)})):l},t.login=function(e,t){i(e,function(n){var r={code:n,corpId:e};Fetcher.PostForm(h,r,function(e){if(e=JSON.parse(e),"y"==e.status){var n=e.data.detail||{};"function"==typeof t&&t({id:n.userid,user:n.name,avatar:n.avatar})}})})}},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Comment=n(120)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(63)),o=r(i),a=n(79),s=r(a),u=n(64),c=r(u),l=n(65),f=r(l),h=n(81),p={100:"发送成功",101:"频道不存在",102:"管理员关闭聊天功能",103:"不允许匿名聊天",104:"该用户被禁言",105:"聊天内容不能为空"},d=function(){function e(t){var n=t.jsonObj,r=t.Room;(0,c["default"])(this,e),this.act_id=n.act.id,this.allow_publish=!n.act.disable_comment,this.allow_anonymous=!n.act.disable_anonymous,this.auto_push=!!n.act.auto_push,this.needs_check=!!n.act.comments_check,this.Room=r,this.SetCount(n.comment_count),this._ropOnNewComment(),this._ropOnAllowPublish(),this._ropOnVisitorMute(),this._ropOnCommentTop(),this._msgbusDestroy()}return(0,f["default"])(e,[{key:"_msgbusDestroy",value:function(){var e=this;this.destroyKey=_scope.MsgBus.On("Destroy",function(){rop.Remove("comment-"+e.act_id),_scope.MsgBus.UnSubAll("Comment.New"), rop.Remove("act_comment_available_change"+e.act_id),_scope.MsgBus.UnSubAll("Comment.AllowPublish"),rop.Remove("act_visitor_mute"+e.act_id),_scope.MsgBus.UnSubAll("User.Mute"),rop.Remove("comment_set_top_"+e.act_id),_scope.MsgBus.UnSubAll("Comment.Top"),_scope.MsgBus.UnSub("Destroy",e.destroyKey)})}},{key:"_ropOnNewComment",value:function(){var e=this;rop.On("comment-"+this.act_id,function(t){_scope.MsgBus.Pub("Comment.New",(0,s["default"])(e._resolveCmt(JSON.parse(t))))})}},{key:"_ropOnAllowPublish",value:function(){var e=this;rop.On("act_comment_available_change"+this.act_id,function(t){t=JSON.parse(t),e.allow_publish=1==t.open,_scope.MsgBus.Pub("Comment.AllowPublish",e.allow_publish)})}},{key:"_ropOnVisitorMute",value:function(){rop.On("act_visitor_mute"+this.act_id,function(e){e=JSON.parse(e),e.isSelf=e.visitorId==_scope.DB.Get("UserInfo").id,e.mute=!!e.mute,_scope.MsgBus.Pub("User.Mute",e)})}},{key:"_ropOnCommentTop",value:function(){var e=this;rop.On("comment_set_top_"+this.act_id,function(t){_scope.MsgBus.Pub("Comment.Top",(0,s["default"])(e._resolveCmt(JSON.parse(t))))})}},{key:"_resolveCmt",value:function(e){var t=(0,o["default"])({},e);return"string"==typeof e.message&&(t.message=e.message.replace("/assets/img/console/envelope.png","//mudu.tv/assets/img/console/envelope.png"),t.message=t.message.replace(h.COMMENT_IMAGE_NUM_REG,function(e,t){return t?"[em_"+t+"]":e})),t}},{key:"GetAllowPublish",value:function(){return this.allow_publish}},{key:"GetNeedsCheck",value:function(){return this.needs_check}},{key:"GetAllowAnonymous",value:function(){return this.allow_anonymous}},{key:"GetAutoPush",value:function(){return this.auto_push}},{key:"Send",value:function(e,t){var n=h.API_DOMAIN+"/activity/"+this.Room.act_id+"/setcomment",r={message:e,isdmin:!1,title:""},i=function(e){e=JSON.parse(e);var n={};n.status=100===e.code?"y":"n",n.flag=+e.code,n.info=p[e.code]||"",n.hasBadWord=e.hasBadWord,n.word=e.word,"function"==typeof t&&t((0,s["default"])(n))};Fetcher.Post(n,(0,s["default"])(r),i,{"Content-Type":"application/json"})}},{key:"Get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments[1],n=this;if(!(e>this.page)){+e===this.GetPage()&&(e=0);var r=h.API_DOMAIN+"/activity/"+this.Room.GetId()+"/getcomment",i={pageSize:20,pageIndex:+e,checked:1},o=function(e){e=JSON.parse(e);var r={};"y"===e.status?(e.data=e.data.map(function(e){return n._resolveCmt(e)}),r={status:"y",info:"评论获取成功",data:{page:e.page,comments:e.data}}):r={status:"n",info:"没有更多评论!",data:{comments:[]}},"function"==typeof t&&t((0,s["default"])(r))};Fetcher.Post(r,(0,s["default"])(i),o,{"Content-Type":"application/json"})}}},{key:"SetCount",value:function(e){this.count=e,this.page=Math.ceil(e/20)}},{key:"GetPage",value:function(){return this.page}}]),e}();e.exports=d},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.LuckyDraw=n(122)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(79)),o=r(i),a=n(64),s=r(a),u=n(65),c=r(u),l=n(81),f=r(l),h=function(){function e(){var t=this;(0,s["default"])(this,e),_scope.Feature.EventBus(this),_scope.Feature.Room(this,function(){rop.On("lucky_draw_"+t.Room.GetId(),function(e){var n=JSON.parse(e);"open_lucky_draw"===n.type&&t.Result(function(e){_scope.MsgBus.Pub("LuckyDraw.Open",e)})})}),this._msgbusDestroy()}return(0,c["default"])(e,[{key:"_msgbusDestroy",value:function(){var e=this;this.destroyKey=_scope.MsgBus.On("Destroy",function(){rop.Remove("lucky_draw_"+e.Room.GetId()),_scope.MsgBus.UnSubAll("LuckyDraw.Open"),_scope.MsgBus.UnSub("Destroy",e.destroyKey)})}},{key:"Get",value:function(e){var t=f["default"].API_DOMAIN+"/?a=ajaxGetLuckyDrawInfo&c=activity",n={id:this.Room.GetId()},r=function(t){t=JSON.parse(t);var n={};n.status=t.status,n.flag=t.Flag,n.info=t.msg,n.data=t.data,"function"==typeof e&&e((0,o["default"])(n))};Fetcher.PostForm(t,n,r)}},{key:"SignUp",value:function(e,t){var n=f["default"].API_DOMAIN+"/?a=ajaxLuckyDrawSignUp&c=activity",r={id:this.Room.GetId(),uname:e.userName,voucher:e.voucher},i=function(e){e=JSON.parse(e);var n={};n.status=e.status,n.info=e.msg,n.flag=e.Flag,"function"==typeof t&&t((0,o["default"])(n))};Fetcher.PostForm(n,r,i)}},{key:"Result",value:function(e){var t=f["default"].API_DOMAIN+"/?a=ajaxGetLuckyDrawResult&c=activity&id="+this.Room.GetId(),n=function(t){t=JSON.parse(t);var n={};n.status=t.status,n.flag=t.Flag,n.info=t.msg,"y"===t.status?n.data={luckers:t.data.luckers}:n.data={luckers:t.data},"function"==typeof e&&e((0,o["default"])(n))};Fetcher.Get(t,n)}}]),e}();e.exports=h},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.PPT=n(124)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(79)),o=r(i),a=n(64),s=r(a),u=n(65),c=r(u),l=n(81);e.exports=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s["default"])(this,e),_scope.Feature.EventBus(this),t.config=t.config||{},this.id=t.act_id,this.config={current_doc:"",current_page:0,is_turn_page:!1,name:"",open:!1,url:"",total_page:0,images:[]},this.actHashId=t.actHashId,this.isPptInfoInited=!1,this.isPptConfigInited=!1,this.isPptInited=!1,this._fetchInitPptData(this._listenInitOver.bind(this,"isPptInfoInited")),this._fetchConfigPptData(this._listenInitOver.bind(this,"isPptConfigInited")),this._ropPptChange(),this._msgbusDestroy()}return(0,c["default"])(e,[{key:"_listenInitOver",value:function(e){"isPptInfoInited"!==e&&"isPptConfigInited"!==e||(this[e]=!0,this.isPptInfoInited&&this.isPptConfigInited&&(this.isPptInited=!0,_scope.MsgBus.Pub("PPT.Inited.Over")))}},{key:"_fetchInitPptData",value:function(e){var t=this,n=this.actHashId,r=l.API_DOMAIN+"/docs/api/activities/"+n+"/documents/now?time="+(new Date).getTime();Fetcher.Get(r,function(n,r){return 200!==r?void console.log("fetch ppt info failed."):(n=JSON.parse(n),1e3!==n.errcode?void console.log("something wrong with ppt info."):(t.config.current_doc=n.doc_id,t.config.current_page=n.index,t.config.url=(n.images[n.index]?n.images[n.index].url:"")||"",t.config.total_page=n.images.length,t.config.images=n.images,void("function"==typeof e&&e())))})}},{key:"_fetchConfigPptData",value:function(e){var t=this,n=this.actHashId,r=l.API_DOMAIN+"/docs/api/activities/"+n+"/config";Fetcher.Get(r,function(n,r){return 200!==r?void console.log("fetch ppt config failed."):(n=JSON.parse(n),1e3!==n.errcode?void console.log("something wrong with ppt config."):(t.config.name=n.name,t.config.is_turn_page=n.turn,t.config.open=n.open,void("function"==typeof e&&e())))})}},{key:"_ropPptChange",value:function(){var e=this,t=this.actHashId;rop.On("app.mududoc.sync."+t,function(t){t=JSON.parse(t),"config"===t.type?e._handleConfigChange(t):"doc"===t.type&&e._handleDocChange(t)})}},{key:"_handleDocChange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this,n=this.config;if(e.url)if(e.docid===this.config.current_doc){this.config.current_page=e.index,this.config.url=e.url;var r={page:e.index+1,url:e.url,total_page:n.total_page};_scope.MsgBus.Pub("PPT.Changed",(0,o["default"])(r))}else this._fetchInitPptData(function(){var e=t.config,n={page:e.current_page+1,url:e.url,total_page:e.total_page};_scope.MsgBus.Pub("PPT.Changed",(0,o["default"])(n))});else this.config={current_doc:"",current_page:0,is_turn_page:!1,name:"",open:!1,url:"",total_page:0,images:[]},_scope.MsgBus.Pub("PPT.Doc.delete")}},{key:"_handleConfigChange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.name=e.name;var t=this.config;if(e.open!==t.open){this.config.open=e.open;var n={open:e.open?1:0};1===n.open&&(n.page=t.current_page+1,n.total_page=t.total_page,n.url=t.url),_scope.MsgBus.Pub("PPT.IsOpen",(0,o["default"])(n))}else if(e.turn!==t.is_turn_page){this.config.is_turn_page=e.turn;var r={is_turn_page:e.turn?1:0,current_page:t.current_page+1,total_page:t.total_page,url:t.url};_scope.MsgBus.Pub("PPT.AllowTurnPage",(0,o["default"])(r))}}},{key:"_msgbusDestroy",value:function(){var e=this;this.destroyKey=_scope.MsgBus.On("Destroy",function(){rop.Remove("app.mududoc.sync."+e.actHashId),_scope.MsgBus.UnSubAll("PPT.Changed"),_scope.MsgBus.UnSubAll("PPT.Doc.delete"),_scope.MsgBus.UnSubAll("PPT.IsOpen"),_scope.MsgBus.UnSubAll("PPT.AllowTurnPage"),_scope.MsgBus.UnSub(e.destroyKey)})}},{key:"GetUrl",value:function(){return this.config.url}},{key:"IsOpen",value:function(){return this.config.open}},{key:"GetName",value:function(){return this.config.name||""}},{key:"GetAllowTurnPage",value:function(){return this.config.is_turn_page}},{key:"GetCurrentPage",value:function(){return this.config.current_page+1}},{key:"GetTotalPage",value:function(){return this.config.total_page}},{key:"GetPageImgUrl",value:function(e,t){var n=+e-1,r=this.config.images[n],i=(r?r.url:"")||"";"function"==typeof t&&t(i)}}]),e}()},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Barrage=n(126)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(64)),o=r(i),a=n(65),s=r(a);e.exports=function(){function e(){var t=this;(0,o["default"])(this,e),_scope.Feature.EventBus(this),_scope.Feature.Room(this,function(){rop.On("comment-stream-"+t.Room.act_id,function(e){_scope.MsgBus.Pub("Barrage.New",e)})}),this.destroyKey=_scope.MsgBus.Sub("Destroy",function(){rop.Remove("comment-stream-"+t.Room.act_id),_scope.MsgBus.UnSubAll("Barrage.New"),_scope.MsgBus.UnSub(t.destroyKey)})}return(0,s["default"])(e,[{key:"Placeholder",value:function(){}}]),e}()},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Vote=n(128)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(79)),o=r(i),a=n(64),s=r(a),u=n(65),c=r(u);e.exports=function(){function e(t){var n=this;(0,s["default"])(this,e),_scope.Feature.EventBus(this),this.act_id=t.act_id,this.vote=t.vote,t.vote&&(this.vote_id=t.vote.id),rop.On("vote_"+this.act_id,function(e){var t=JSON.parse(e);n.vote_id=t.vote_id,n.vote=t,n.Get(function(e){_scope.MsgBus.Pub("Vote.Changed",e)})}),this._msgbusDestroy()}return(0,c["default"])(e,[{key:"_msgbusDestroy",value:function(){var e=this;this.destroyKey=_scope.MsgBus.On("Destroy",function(){rop.Remove("vote_"+e.act_id),_scope.MsgBus.UnSubAll("Vote.Changed"),_scope.MsgBus.UnSub(e.destroyKey)})}},{key:"Get",value:function(e){var t="http://mudu.tv/?c=activity&a=ajaxGetActVote",n={vote_id:this.vote_id};if(!this.vote_id)return void e((0,o["default"])({status:"n",info:"无投票信息",flag:101}));var r=function(t){t=JSON.parse(t);var n={};n.status=t.status,n.data=t.vote,n.info="获取成功","function"==typeof e&&e((0,o["default"])(n))};Fetcher.PostForm(t,n,r)}},{key:"Vote",value:function(e,t){var n="http://mudu.tv/?c=activity&a=ajaxVote",r={vote:(0,o["default"])(e)},i=function(e){e=JSON.parse(e);var n={};n.status=e.status,n.flag=100,n.info=e.msg,"function"==typeof t&&t((0,o["default"])(n))};Fetcher.PostForm(n,r,i)}}]),e}()},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Signup=n(130)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(84)),o=r(i),a=n(79),s=r(a),u=n(64),c=r(u),l=n(65),f=r(l),h=n(81),p=function(){function e(t){var n=t.act_id,r=t.signup;(0,c["default"])(this,e),_scope.Feature.EventBus(this),this.act_id=n,this.config=r,this._formatConfig(this.config),this.smsTimer=null}return(0,f["default"])(e,[{key:"_formatConfig",value:function(e){if(e){e.columns=e.columns||"[]";try{e.columns=JSON.parse(e.columns)}catch(t){e.columns=[]}e.columns=e.columns.map(function(e){return e.must=!!e.must,e}),0!=e.pic.indexOf("http")&&(e.pic="//mudu.tv"+e.pic)}}},{key:"_startTimer",value:function(){var e=this;this.smsTimer=setTimeout(function(){e._clearTimer()},5e4)}},{key:"_clearTimer",value:function(){clearTimeout(this.smsTimer),this.smsTimer=null}},{key:"GetConfig",value:function(){return this.config}},{key:"SendSms",value:function(e,t){var n=this;this.smsTimer&&t((0,s["default"])({flag:104,status:"n",info:"短信发送频率过高"}));var r={id:this.act_id,type:"signup",visitor_id:_scope.DB.Get("UserInfo").id,phone_number:e},i=function(e){e=JSON.parse(e),"n"===e.status&&n._clearTimer(),"function"==typeof t&&t((0,s["default"])({flag:e.Flag,status:e.status,info:e.info}))};Fetcher.PostForm(h.SIGNUP_SENDSMS_URL,r,i)}},{key:"Submit",value:function(e,t){if("object"===("undefined"==typeof e?"undefined":(0,o["default"])(e))&&"[object Array]"===Object.prototype.toString.call(e.columns)&&0!==e.columns.length){var n=e.code||"",r=e.columns.map(function(e){return"question"===e.type|"questionAnswer"===e.type?{type:e.type,name:e.name,value:(e.selects||[]).join("")+"||"+(e.text||"")}:{type:e.type,name:e.name,value:e.text}}),i=_scope.DB.Get("UserInfo").id,a={id:this.act_id,verify_code:n,columns:(0,s["default"])(r),visitor_id:i},u=function(e){e=JSON.parse(e),"function"==typeof t&&t((0,s["default"])({flag:e.flag||e.Flag,status:e.status,info:e.msg}))};Fetcher.PostForm(h.SIGNUP_SUBMIT_URL,a,u)}}}]),e}();e.exports=p},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Topic=n(132)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(26)),o=r(i),a=n(84),s=r(a),u=n(79),c=r(u),l=n(64),f=r(l),h=n(65),p=r(h),d=n(81),v={100:"发送成功",102:"管理员禁止发布话题",103:"该用户被禁言",104:"不允许匿名发表话题",105:"内容和图片不能同时为空",106:"管理员禁止回复"},y={topicType:"1"},g=10,m=function(){function e(t){var n=this,r=t.act_id,i=t.topic_visitor_publish,o=t.topic_needs_check,a=t.topic_allow_reply,s=t.topic_count_num;(0,f["default"])(this,e),_scope.Feature.EventBus(this),this.topic_visitor_publish=!!i,this.topic_needs_check=!!o,this.topic_allow_reply=!!a,this.act_id=r,this.SetCount(s||0),rop.On("topic-"+this.act_id,function(e){_scope.MsgBus.Pub("Topic.New",(0,c["default"])(n._filterTopicReplies(JSON.parse(e))))}),rop.On("topic_set_top_"+this.act_id,function(e){_scope.MsgBus.Pub("Topic.Top",(0,c["default"])(n._filterTopicReplies(JSON.parse(e))))}),rop.On("topic_allow_reply_"+this.act_id,function(e){var t=JSON.parse(e).status;n.topic_allow_reply=!!t,_scope.MsgBus.Pub("Topic.AllowReply",n.topic_allow_reply)}),rop.On("topic_visitor_publish_"+this.act_id,function(e){var t=JSON.parse(e).status;n.topic_visitor_publish=!!t,_scope.MsgBus.Pub("Topic.AllowPublish",n.topic_visitor_publish)}),rop.On("topic_needs_check_"+this.act_id,function(e){var t=JSON.parse(e).status;n.topic_needs_check=!!t,_scope.MsgBus.Pub("Topic.NeedsCheck",n.topic_needs_check)}),rop.On("topic-reply-"+this.act_id,function(e){_scope.MsgBus.Pub("Topic.Reply.New",e)})}return(0,p["default"])(e,[{key:"_filterTopicReplies",value:function(e){var t=_scope.DB.Get("UserInfo").id;return e.replies=(e.replies||[]).filter(function(e){return!(!e.checked&&t!=e.visitor_id)}),e}},{key:"SendTopic",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(e.msg||e.images&&e.images.length){e.msg=e.msg||"",e.images=e.images||[];var n=d.API_DOMAIN+"/activity/"+this.act_id+"/setTopic",r={images:e.images.join(","),message:e.msg},i=function(e){var n=JSON.parse(e);"function"==typeof t&&t((0,c["default"])({status:n.status,flag:n.flag,info:v[n.flag]||"",hasBadWord:n.hasBadWord,word:n.word,topicNeedsChecked:n.topicNeedsChecked}))};Fetcher.Post(n,(0,c["default"])(r),i,{"Content-Type":"application/json"})}}},{key:"SendReply",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(e.topicId&&e.msg){var n=d.API_DOMAIN+"/activity/"+this.act_id+"/setTopic",r={belong_to:+e.topicId,message:e.msg},i=function(e){var n=JSON.parse(e);"function"==typeof t&&t((0,c["default"])({status:n.status,flag:n.flag,info:v[n.flag]||"",hasBadWord:n.hasBadWord,word:n.word,topicNeedsChecked:n.topicNeedsChecked}))};Fetcher.Post(n,(0,c["default"])(r),i,{"Content-Type":"application/json"})}}},{key:"Get",value:function(e,t,n){n="function"==typeof t?t:n,t="object"===("undefined"==typeof t?"undefined":(0,s["default"])(t))?(0,o["default"])({},y,t):y,this._get(e,t,n)}},{key:"_get",value:function(e,t,n){var r=this;if(+e){var i=d.API_DOMAIN+"/activity/"+this.act_id+"/getTopic",o={topicType:t.topicType,pageSize:g,pageIndex:e||1},a=function(e){var t=JSON.parse(e);"[object Array]"===Object.prototype.toString.call(t.topics)&&(t.topics=t.topics.map(function(e){return r._filterTopicReplies(e)})),"function"==typeof n&&n((0,c["default"])(t))};Fetcher.Post(i,(0,c["default"])(o),a,{"Content-Type":"application/json"})}}},{key:"GetAllowReply",value:function(){return this.topic_allow_reply}},{key:"GetAllowPublish",value:function(){return this.topic_visitor_publish}},{key:"GetNeedsCheck",value:function(){return this.topic_needs_check}},{key:"SetCount",value:function(e){this.count=e,this.page=Math.ceil(e/g)}},{key:"GetPage",value:function(){return this.page}}]),e}();e.exports=m},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Redpack=n(134)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(79)),o=r(i),a=n(64),s=r(a),u=n(65),c=r(u),l=n(81),f=n(15),h=function(){function e(){(0,s["default"])(this,e),_scope.Feature.Room(this),_scope.Feature.EventBus(this)}return(0,c["default"])(e,[{key:"_canSnatch",value:function(e){return 1==e?f.isMobileWechat()?_scope.Utils.GetCookie("openId")?{status:"y",flag:100,info:"当前红包可抢"}:{status:"n",flag:102,info:"当前红包为微信红包,需要先进行微信登录才能抢红包"}:{status:"n",flag:101,info:"当前红包为微信红包,只有在手机微信中才能抢红包"}:2==e?f.isDingding()?_scope.Utils.GetCookie("openId")?{status:"y",flag:100,info:"当前红包可抢"}:{status:"n",flag:104,info:"当前红包为钉钉红包,需要先进行钉钉登录才能抢红包"}:{status:"n",flag:103,info:"当前红包为钉钉红包,只有在钉钉中才能抢红包"}:{status:"n",flag:105,info:"红包类型未知"}}},{key:"GetRedpackStatus",value:function(e,t){var n=_scope.Utils.GetCookie("openId"),r={openId:n,redpackHashid:e},i=function(e){e=JSON.parse(e);var n={status:e.status,flag:e.flag,info:e.msg,data:{amount:e.amount,snatched:e.snatched}};"function"==typeof t&&t((0,o["default"])(n))};Fetcher.PostForm(l.REDPACK_STATUS_URL,r,i)}},{key:"GetRedpackRecord",value:function(e,t){var n={redpackHashid:e},r=function(e){e=JSON.parse(e);var n={status:e.status,flag:e.flag,info:e.msg,data:{redpack:e.redpack,snatch_list:e.data}};"function"==typeof t&&t((0,o["default"])(n))};Fetcher.PostForm(l.REDPACK_RECORD_URL,n,r)}},{key:"SnatchRedpack",value:function(e,t){var n={redpackHashid:e,snatcherOpenId:_scope.Utils.GetCookie("openId"),snatcherAvatar:_scope.Utils.GetCookie("avatar"),snatcherName:_scope.Utils.GetCookie("user")},r=function(e){e=JSON.parse(e);var n={status:e.status,flag:e.flag,info:e.msg,data:{amount:e.amount,redpack_id:e.redpack_id}};"function"==typeof t&&t((0,o["default"])(n))};Fetcher.PostForm(l.REDPACK_SNATCH_URL,n,r)}},{key:"ParseRedpackComment",value:function(e){var t=document.createElement("div");t.innerHTML=e.message;var n=t.getElementsByTagName("div")[0];if(!n)return{status:"n",flag:101,info:"当前评论不是红包评论"};var r=n.getAttribute("data-id"),i=+n.getAttribute("data-type"),o=n.getAttribute("data-wishes"),a=n.getAttribute("data-name");if(!r)return{status:"n",flag:102,info:"找不到红包hashid"};var s=this._canSnatch(i);return{status:"y",flag:100,info:"解析红包信息成功",data:{redpack:{type:i,wishes:o,name:a,hashid:r},can_snatch:s}}}}]),e}();e.exports=h},function(e,t,n){(function(t){t._scope||(t._scope={}),e.exports=t._scope.Reward=n(136)}).call(t,function(){return this}())},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}var i=(n(1),n(2),n(63)),o=r(i),a=n(79),s=r(a),u=n(64),c=r(u),l=n(65),f=r(l),h=n(15),p=n(81),d=function(){function e(t){var n=t.jsonObj,r=t.Room;(0,c["default"])(this,e),this.donateTimes=+n.donateTimes||0,this.cash_donate_id=n.act.cash_donate_id,this.donate_type=n.act.donate_type,this.reward_config=n.act.gift_config,this.gifts=n.act.gifts||[],this.cash_config={id:this.cash_donate_id},this.cash_record_list=[],this.act_id=n.act.id,this.freeGiftLock=!1,this.Room=r,this.isSetType=[],n.issetNetbank&&this.isSetType.push("netbank"),n.issetAlipay&&this.isSetType.push("alipay"),n.issetWeixinPay&&this.isSetType.push("weixin"),this._getCashConfig(),this._ropOnCashDonateMessage(),this._ropOnGiftDonateMessage(),this._ropOnGiftSend(),this._msgbusDestroy()}return(0,f["default"])(e,[{key:"_msgbusDestroy",value:function(){var e=this;this.destroyKey=_scope.MsgBus.On("Destroy",function(){_scope.MsgBus.UnSubAll("Reward.CashConfig.Changed"),_scope.MsgBus.UnSubAll("Reward.CashRecord.Changed"),rop.Remove("cash_donate_"+e.cash_donate_id),_scope.MsgBus.UnSubAll("Reward.CashPay.Result"),rop.Remove("cash_PropPay_"+e.act_id),_scope.MsgBus.UnSubAll("Reward.GiftPay.Result"),e.gifts.map(function(e){rop.Remove("act_gift_send_"+e.id)}),_scope.MsgBus.UnSubAll("Reward.Gift.Sended"),_scope.MsgBus.UnSubAll("Reward.GiftFree.Result"),_scope.MsgBus.UnSub(e.destroyKey)})}},{key:"_objToArray",value:function(e){var t=[];if(!e)return t;for(var n in e)t.push(e[n]);return t}},{key:"_getCashConfig",value:function(){var e=this;if(this.cash_donate_id){var t={donateId:this.cash_donate_id};Fetcher.PostForm(p.CASH_DONATE_DETAIL_URL,t,function(t){t=JSON.parse(t),e.cash_config.accounce_image=t.accounce_image,e.cash_config.accounce_word=t.accounce_word,e.cash_config.lowest=t.lowest,e.cash_config.showAmount=t.showAmount,e.cash_config.totalSum=t.totalSum,e.cash_config.userNum=t.userNum,e.cash_record_list=e._objToArray(t.detail),_scope.MsgBus.Pub("Reward.CashConfig.Changed",JSON.parse((0,s["default"])(e.cash_config))),_scope.MsgBus.Pub("Reward.CashRecord.Changed",JSON.parse((0,s["default"])(e.cash_record_list)))})}}},{key:"_ropOnCashDonateMessage",value:function(){var e=this;this.cash_donate_id&&rop.On("cash_donate_"+this.cash_donate_id,function(t){t=JSON.parse(t),t.tradeId&&t.visitorId==_scope.DB.Get("UserInfo").id&&_scope.MsgBus.Pub("Reward.CashPay.Result",{status:"y",flag:100,info:"支付成功"}),e._getCashConfig()})}},{key:"_ropOnGiftDonateMessage",value:function(){rop.On("cash_PropPay_"+this.act_id,function(e){e=JSON.parse(e),e.tradeId&&e.visitorId==_scope.DB.Get("UserInfo").id&&_scope.MsgBus.Pub("Reward.GiftPay.Result",{status:"y",flag:100,info:"支付成功"})})}},{key:"_ropOnGiftSend",value:function(){var e=this;this.gifts.map(function(t,n){rop.On("act_gift_send_"+t.id,function(r){r=JSON.parse(r),e.donateTimes++,e.gifts[n].recv_times++,e.gifts[n].recv_num=+e.gifts[n].recv_num+ +r.num,_scope.MsgBus.Pub("Reward.Gift.Sended",{gift_id:t.id,num:+r.num})})})}},{key:"_getCashDonateUrl",value:function(e){var t=this.Room.domain+p.RELATIVE_DONATE_URL+"&channel="+e.payType+"&donate_id="+e.donate_id+"&donate_num="+e.donate_num+"&act_id="+this.act_id+("&t="+(new Date).getTime());return"weixin"==e.payType&&!h.isMobile()&&(t+="&payType=native"),t+="&phone="+(e.phone||"")}},{key:"_getGiftDonateUrl",value:function(e){var t=this.Room.domain+p.RELATIVE_DONATE_URL+"&channel="+e.payType+"&gift_id="+e.gift_id+"&num="+e.num+"&act_id="+this.act_id+("&t="+(new Date).getTime()+"&referer="+encodeURIComponent(window.location.href));return"weixin"==e.payType&&!h.isMobile()&&(t+="&payType=native"),t+="&phone="+(e.phone||"")}},{key:"_resolvePayUrl",value:function(e,t,n){return h.isMobile()?("weixin"==t&&h.isWechat()&&(_scope.Utils.GetCookie("openId")?this._resolveWeixinPay(e,n):_scope.MsgBus.Pub(n,{status:"n",flag:101,info:"微信支付找不到openId, 请先进行微信登录或者使用扫码支付替代",data:{url:e+"&payType=native"}})),"alipay"==t&&(h.isDingding()?this._resolveDingdingAlipay(e,n):window.open(e))):"weixin"==t||window.open(e),e}},{key:"_resolveDingdingAlipay",value:function(e,t){Fetcher.Get(e+"&payType=native&type=mobile",function(e){dd.biz.alipay.pay({data:e,onSuccess:function(){_scope.MsgBus.Pub(t,{status:"y",flag:100,info:"支付成功"})},onFail:function(e){_scope.MsgBus.Pub(t,{status:"n",flag:103,info:"钉钉支付宝原生支付失败",data:{error:e}})}})})}},{key:"_resolveWeixinPay",value:function(e,t){var n=this;Fetcher.Get(e,function(r){if(r=JSON.parse(r),"undefined"==typeof WeixinJSBridge){var i=function(){return n._resolveWeixinPaySdk(r,e,t)};document.addEventListener?document.addEventListener("WeixinJSBridgeReady",i,!1):(document.attachEvent("WeixinJSBridgeReady",i),document.attachEvent("onWeixinJSBridgeReady",i))}else n._resolveWeixinPaySdk(r,e,t)})}},{key:"_resolveWeixinPaySdk",value:function(e,t,n){WeixinJSBridge.invoke("getBrandWCPayRequest",(0,o["default"])({},e,{timeStamp:e.timeStamp+""}),function(e){"get_brand_wcpay_request:ok"==e.err_msg?_scope.MsgBus.Pub(n,{status:"y",flag:100,info:"支付成功"}):_scope.MsgBus.Pub(n,{status:"n",flag:102,info:"微信支付失败,您可以使用二维码进行微信支付",data:{url:t,error:e}})})}},{key:"_findGiftById",value:function(e){var t=null;return this.gifts.map(function(n){n.id==e&&(t=n)}),t}},{key:"GetAvailablePayTypes",value:function(){return h.isMobileWechat()?this.isSetType.indexOf("weixin")?["weixin"]:[]:h.isMobile()?this.isSetType.indexOf("alipay")?["alipay"]:[]:h.isWechat()?this.isSetType.indexOf("weixin")?["weixin"]:[]:this.isSetType}},{key:"GetRewardType",value:function(){return this.donate_type}},{key:"GetRewardConfig",value:function(){return this.reward_config}},{key:"GetCashConfig",value:function(){return this.cash_config}},{key:"GetGiftConfig",value:function(){return{gifts:this.gifts}}},{key:"GetCashRecords",value:function(){return this.cash_record_list}},{key:"GetGiftRankList",value:function(e,t){if(+e){var n=p.GIFT_DETAIL_URL+"&num=50&gift_id="+e;Fetcher.Get(n,function(e){e=JSON.parse(e),t(e.data)})}}},{key:"CashReward",value:function(e){e=e||{};var t=+e.num||0,n=e.payType,r=e.phone,i=e.donate_id||this.cash_donate_id,o=+this.cash_config.lowest||.01;if(1==this.donate_type)return{status:"n",flag:101,info:"当前打赏配置为道具打赏"};if(this.GetAvailablePayTypes().indexOf(n)<0)return{status:"n",flag:103,info:"当前支付方式不可用"};if(t0)return{status:"n",flag:103,info:"当前支付方式不可用"};if(0==+a.price)return this.freeGiftLock?{status:"n",flag:105,info:"免费打赏频率过高"}:(this.freeGiftLock=!0,setTimeout(function(){return t.freeGiftLock=!1},3e3),this._freeGiftReward({num:o,gift_id:n,phone:i}),{status:"y",flag:100,info:"免费打赏中",data:{eventKey:"Reward.GiftFree.Result"}});var s=this._getGiftDonateUrl({payType:r,gift_id:n,phone:i,num:o});return this._resolvePayUrl(s,r,"Reward.GiftPay.Result"),"weixin"!=r||h.isMobile()?{status:"y",flag:100,info:"支付中,请等待结果",data:{eventKey:"Reward.GiftPay.Result"}}:{status:"y",flag:100,info:"微信打赏中,请显示图片",data:{url:s,eventKey:"Reward.GiftPay.Result"}}}},{key:"_freeGiftReward",value:function(e){var t={act_id:this.act_id,num:e.num,gift_id:e.gift_id,name:_scope.Utils.GetCookie("user"),avatar:_scope.Utils.GetCookie("avatar"),phone:e.phone};Fetcher.PostForm(p.FREE_GIFT_DONATE_URL,t,function(e){e=JSON.parse(e),_scope.MsgBus.Pub("Reward.GiftFree.Result",(0,s["default"])({status:e.status,flag:e.flag,info:e.msg}))})}}]),e}();e.exports=d},function(e,t,n){n(1),n(2);e.exports="1.15.3"},function(e,t,n){(function(t){e.exports=t.rop=n(139)}).call(t,function(){return this}())},function(e,t,n){e.exports=n(140)},function(e,t,n){(function(t,n){!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var r=(n(1),n(2),n(3));window.messager||(window.messager=new r),e.exports=window.messager},function(e,t,n){var r,i;!function(o,a){"use strict";r=a,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i))}(this,function(){var e,t,n=Array,r=n.prototype,i=Object,o=i.prototype,a=Function,s=a.prototype,u=String,c=u.prototype,l=Number,f=l.prototype,h=r.slice,p=r.splice,d=r.push,v=r.unshift,y=r.concat,g=r.join,m=s.call,_=s.apply,b=Math.max,w=Math.min,S=o.toString,k="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,T=Function.prototype.toString,E=/^\s*class /,O=function(e){try{var t=T.call(e),n=t.replace(/\/\/.*\n/g,""),r=n.replace(/\/\*[.\s\S]*\*\//g,""),i=r.replace(/\n/gm," ").replace(/ {2}/g," ");return E.test(i)}catch(o){return!1}},x=function(e){try{return!O(e)&&(T.call(e),!0)}catch(t){return!1}},P="[object Function]",C="[object GeneratorFunction]",e=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(k)return x(e);if(O(e))return!1;var t=S.call(e);return t===P||t===C},M=RegExp.prototype.exec,A=function(e){try{return M.call(e),!0}catch(t){return!1}},I="[object RegExp]";t=function(e){return"object"==typeof e&&(k?A(e):S.call(e)===I)};var j,B=String.prototype.valueOf,R=function(e){try{return B.call(e),!0}catch(t){return!1}},D="[object String]";j=function(e){return"string"==typeof e||"object"==typeof e&&(k?R(e):S.call(e)===D)};var U=i.defineProperty&&function(){try{var e={};i.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}(),F=function(e){var t;return t=U?function(e,t,n,r){!r&&t in e||i.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)},function(n,r,i){for(var o in r)e.call(r,o)&&t(n,o,r[o],i)}}(o.hasOwnProperty),L=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},N=l.isNaN||function(e){return e!==e},W={ToInteger:function(e){var t=+e;return N(t)?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,r,i;if(L(t))return t;if(r=t.valueOf,e(r)&&(n=r.call(t),L(n)))return n;if(i=t.toString,e(i)&&(n=i.call(t),L(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return i(e)},ToUint32:function(e){return e>>>0}},G=function(){};F(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,o=h.call(arguments,1),s=function(){if(this instanceof r){var e=_.call(n,this,y.call(o,h.call(arguments)));return i(e)===e?e:this}return _.call(n,t,y.call(o,h.call(arguments)))},u=b(0,n.length-o.length),c=[],l=0;l1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++o1&&(r=arguments[1]), !e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var u=0;u1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var u=0;u1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;a1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;a=2)o=arguments[1];else for(;;){if(a in r){o=r[a++];break}if(++a>=i)throw new TypeError("reduce of empty array with no initial value")}for(;a=2)o=arguments[1];else for(;;){if(a in r){o=r[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(a<0)return o;do a in r&&(o=t(o,r[a],a,n));while(a--);return o}},!oe);var ae=r.indexOf&&[0,1].indexOf(1,2)!==-1;F(r,{indexOf:function(e){var t=ne&&j(this)?X(this,""):W.ToObject(this),n=W.ToUint32(t.length);if(0===n)return-1;var r=0;for(arguments.length>1&&(r=W.ToInteger(arguments[1])),r=r>=0?r:b(0,n+r);r1&&(r=w(r,W.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}},se);var ue=function(){var e=[1,2],t=e.splice();return 2===e.length&&Z(t)&&0===t.length}();F(r,{splice:function(e,t){return 0===arguments.length?[]:p.apply(this,arguments)}},!ue);var ce=function(){var e={};return r.splice.call(e,0,0,1),1===e.length}();F(r,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=b(W.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=q(arguments),n.length<2?K(n,this.length-e):n[1]=W.ToInteger(t)),p.apply(this,n)}},!ce);var le=function(){var e=new n(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),fe=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();F(r,{splice:function(e,t){for(var n,r=W.ToObject(this),i=[],o=W.ToUint32(r.length),a=W.ToInteger(e),s=a<0?b(o+a,0):w(a,o),c=w(b(W.ToInteger(t),0),o-s),l=0;lv;)delete r[l-1],l-=1}else if(p>c)for(l=o-c;l>s;)n=u(l+c-1),f=u(l+p-1),z(r,n)?r[f]=r[n]:delete r[f],l-=1;l=s;for(var y=0;y=0&&!Z(t)&&e(t.callee)},je=Ae(arguments)?Ae:Ie;F(i,{keys:function(t){var n=e(t),r=je(t),i=null!==t&&"object"==typeof t,o=i&&j(t);if(!i&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=[],s=ke&&n;if(o&&Te||r)for(var c=0;c11?e+1:e},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=qe(this);return e<0&&t>11?0:t},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=qe(this),n=Ve(this);if(e<0&&t>11){if(12===t)return n;var r=rt(0,e+1);return r-n+1}return n},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this);return e<0&&Xe(this)>11?e+1:e},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this),t=Xe(this);return e<0&&t>11?0:t},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this),t=Xe(this),n=Ye(this);if(e<0&&t>11){if(12===t)return n;var r=rt(0,e+1);return r-n+1}return n}},Le),F(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ke(this),t=Ye(this),n=Xe(this),r=Je(this),i=$e(this),o=Qe(this),a=Ze(this);return tt[e]+", "+(t<10?"0"+t:t)+" "+nt[n]+" "+r+" "+(i<10?"0"+i:i)+":"+(o<10?"0"+o:o)+":"+(a<10?"0"+a:a)+" GMT"}},Le||Ge),F(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear();return tt[e]+" "+nt[n]+" "+(t<10?"0"+t:t)+" "+r}},Le||Ue),(Le||Fe)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear(),i=this.getHours(),o=this.getMinutes(),a=this.getSeconds(),s=this.getTimezoneOffset(),u=Math.floor(Math.abs(s)/60),c=Math.floor(Math.abs(s)%60);return tt[e]+" "+nt[n]+" "+(t<10?"0"+t:t)+" "+r+" "+(i<10?"0"+i:i)+":"+(o<10?"0"+o:o)+":"+(a<10?"0"+a:a)+" GMT"+(s>0?"-":"+")+(u<10?"0"+u:u)+(c<10?"0"+c:c)},U&&i.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var it=-621987552e5,ot="-000001",at=Date.prototype.toISOString&&new Date(it).toISOString().indexOf(ot)===-1,st=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date((-1)).toISOString(),ut=m.bind(Date.prototype.getTime);F(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(ut(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var e=Je(this),t=Xe(this);e+=Math.floor(t/12),t=(t%12+12)%12;var n=[t+1,Ye(this),$e(this),Qe(this),Ze(this)];e=(e<0?"-":e>9999?"+":"")+J("00000"+Math.abs(e),0<=e&&e<=9999?-4:-6);for(var r=0;r=7&&c>pt){var d=Math.floor(c/pt)*pt,v=Math.floor(d/1e3);h+=v,p-=1e3*v}l=1===f&&u(n)===n?new e(t.parse(n)):f>=7?new e(n,r,i,o,a,h,p):f>=6?new e(n,r,i,o,a,h):f>=5?new e(n,r,i,o,a):f>=4?new e(n,r,i,o):f>=3?new e(n,r,i):f>=2?new e(n,r):f>=1?new e(n instanceof e?+n:n):new e}else l=e.apply(this,arguments);return L(l)||F(l,{constructor:t},!0),l},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],i=function(e,t){var n=t>1?1:0;return r[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},o=function(t){var n=0,r=t;if(dt&&r>pt){var i=Math.floor(r/pt)*pt,o=Math.floor(i/1e3);n+=o,r-=1e3*o}return l(new e(1970,0,1,0,0,n,r))};for(var a in e)z(e,a)&&(t[a]=e[a]);F(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,F(t.prototype,{constructor:t},!0);var s=function(t){var r=n.exec(t);if(r){var a,s=l(r[1]),u=l(r[2]||1)-1,c=l(r[3]||1)-1,f=l(r[4]||0),h=l(r[5]||0),p=l(r[6]||0),d=Math.floor(1e3*l(r[7]||0)),v=Boolean(r[4]&&!r[8]),y="-"===r[9]?1:-1,g=l(r[10]||0),m=l(r[11]||0),_=h>0||p>0||d>0;return f<(_?24:25)&&h<60&&p<60&&d<1e3&&u>-1&&u<12&&g<24&&m<60&&c>-1&&c=0;)n+=yt.data[t],yt.data[t]=Math.floor(n/e),n=n%e*yt.base},numToString:function(){for(var e=yt.size,t="";--e>=0;)if(""!==t||0===e||0!==yt.data[e]){var n=u(yt.data[e]);""===t?t=n:t+=J("0000000",0,7-n.length)+n}return t},pow:function Dt(e,t,n){return 0===t?n:t%2===1?Dt(e,t-1,n*e):Dt(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},gt=function(e){var t,n,r,i,o,a,s,c;if(t=l(e),t=N(t)?0:Math.floor(t),t<0||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=l(this),N(n))return"NaN";if(n<=-1e21||n>=1e21)return u(n);if(r="",n<0&&(r="-",n=-n),i="0",n>1e-21)if(o=yt.log(n*yt.pow(2,69,1))-69,a=o<0?n*yt.pow(2,-o,1):n/yt.pow(2,o,1),a*=4503599627370496,o=52-o,o>0){for(yt.multiply(0,a),s=t;s>=7;)yt.multiply(1e7,0),s-=7;for(yt.multiply(yt.pow(10,s,1),0),s=o-1;s>=23;)yt.divide(1<<23),s-=23;yt.divide(1<0?(c=i.length,i=c<=t?r+J("0.0000000000000000000",0,t-c+2)+i:r+J(i,0,c-t)+"."+J(i,c-t)):i=r+i,i};F(f,{toFixed:gt},vt);var mt=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),_t=f.toPrecision;F(f,{toPrecision:function(e){return"undefined"==typeof e?_t.call(this):_t.call(this,e)}},mt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],n=Math.pow(2,32)-1;c.split=function(r,i){var o=String(this);if("undefined"==typeof r&&0===i)return[];if(!t(r))return X(this,r,i);var a,s,u,c,l=[],f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),h=0,p=new RegExp(r.source,f+"g");e||(a=new RegExp("^"+p.source+"$(?!\\s)",f));var v="undefined"==typeof i?n:W.ToUint32(i);for(s=p.exec(o);s&&(u=s.index+s[0].length,!(u>h&&(K(l,J(o,h,s.index)),!e&&s.length>1&&s[0].replace(a,function(){for(var e=1;e1&&s.index=v)));)p.lastIndex===s.index&&p.lastIndex++,s=p.exec(o);return h===o.length?!c&&p.test("")||K(l,""):K(l,J(o,h)),l.length>v?q(l,0,v):l}}():"0".split(void 0,0).length&&(c.split=function(e,t){return"undefined"==typeof e&&0===t?[]:X(this,e,t)});var bt=c.replace,wt=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){K(e,n)}),1===e.length&&"undefined"==typeof e[0]}();wt||(c.replace=function(n,r){var i=e(r),o=t(n)&&/\)[*?]/.test(n.source);if(i&&o){var a=function(e){var t=arguments.length,i=n.lastIndex;n.lastIndex=0;var o=n.exec(e)||[];return n.lastIndex=i,K(o,arguments[t-2],arguments[t-1]),r.apply(this,o)};return bt.call(this,n,a)}return bt.call(this,n,r)});var St=c.substr,kt="".substr&&"b"!=="0b".substr(-1);F(c,{substr:function(e,t){var n=e;return e<0&&(n=b(this.length+e,0)),St.call(this,n,t)}},kt);var Tt="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff",Et="​",Ot="["+Tt+"]",xt=new RegExp("^"+Ot+Ot+"*"),Pt=new RegExp(Ot+Ot+"*$"),Ct=c.trim&&(Tt.trim()||!Et.trim());F(c,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return u(this).replace(xt,"").replace(Pt,"")}},Ct);var Mt=m.bind(String.prototype.trim),At=c.lastIndexOf&&"abcあい".lastIndexOf("あい",2)!==-1;F(c,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=u(this),n=u(e),r=arguments.length>1?l(arguments[1]):NaN,i=N(r)?1/0:W.ToInteger(r),o=w(b(i,0),t.length),a=n.length,s=o+a;s>0;){s=b(0,s-a);var c=Y(J(t,s,o+a),n);if(c!==-1)return s+c}return-1}},At);var It=c.lastIndexOf;if(F(c,{lastIndexOf:function(e){return It.apply(this,arguments)}},1!==c.lastIndexOf.length),8===parseInt(Tt+"08")&&22===parseInt(Tt+"0x16")||(parseInt=function(e){var t=/^[\-+]?0[xX]/;return function(n,r){var i=Mt(String(n)),o=l(r)||(t.test(i)?16:10);return e(i,o)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(e){return function(t){var n=Mt(String(t)),r=e(n);return 0===r&&"-"===J(n,0,1)?-0:r}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var jt=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=u(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=u(t)),e?t?e+": "+t:e:t};Error.prototype.toString=jt}if(U){var Bt=function(e,t){if($(e,t)){var n=Object.getOwnPropertyDescriptor(e,t);n.configurable&&(n.enumerable=!1,Object.defineProperty(e,t,n))}};Bt(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Bt(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var Rt=function(){var e="/"+this.source+"/";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),e};RegExp.prototype.toString=Rt}})},function(e,t,n){var r,i;!function(o,a){"use strict";r=a,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i))}(this,function(){var e,t,n,r,i=Function.call,o=Object.prototype,a=i.bind(o.hasOwnProperty),s=i.bind(o.propertyIsEnumerable),u=i.bind(o.toString),c=a(o,"__defineGetter__");c&&(e=i.bind(o.__defineGetter__),t=i.bind(o.__defineSetter__),n=i.bind(o.__lookupGetter__),r=i.bind(o.__lookupSetter__));var l=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){var t=e.__proto__;return t||null===t?t:"[object Function]"===u(e.constructor)?e.constructor.prototype:e instanceof Object?o:null});var f=function(e){try{return e.sentinel=0,0===Object.getOwnPropertyDescriptor(e,"sentinel").value}catch(t){return!1}};if(Object.defineProperty){var h=f({}),p="undefined"==typeof document||f(document.createElement("div"));if(!p||!h)var d=Object.getOwnPropertyDescriptor}if(!Object.getOwnPropertyDescriptor||d){var v="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(l(e))throw new TypeError(v+e);if(d)try{return d.call(Object,e,t)}catch(i){}var u;if(!a(e,t))return u;if(u={enumerable:s(e,t),configurable:!0},c){var f=e.__proto__,h=e!==o;h&&(e.__proto__=o);var p=n(e,t),y=r(e,t);if(h&&(e.__proto__=f),p||y)return p&&(u.get=p),y&&(u.set=y),u}return u.value=e[t],u.writable=!0,u}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var y,g=!({__proto__:null}instanceof Object),m=function(){if(!document.domain)return!1;try{return!!new ActiveXObject("htmlfile")}catch(e){return!1}},_=function(){var e,t;t=new ActiveXObject("htmlfile");var n="script";return t.write("<"+n+">"),t.close(),e=t.parentWindow.Object.prototype,t=null,e},b=function(){var e,t=document.createElement("iframe"),n=document.body||document.documentElement;return t.style.display="none",n.appendChild(t),t.src="javascript:",e=t.contentWindow.Object.prototype,n.removeChild(t),t=null,e};y=g||"undefined"==typeof document?function(){return{__proto__:null}}:function(){var e=m()?_():b();delete e.constructor,delete e.hasOwnProperty,delete e.propertyIsEnumerable,delete e.isPrototypeOf,delete e.toLocaleString,delete e.toString,delete e.valueOf;var t=function(){};return t.prototype=e,y=function(){return new t},new t},Object.create=function(e,t){var n,r=function(){};if(null===e)n=y();else{if(null!==e&&l(e))throw new TypeError("Object prototype may only be an Object or null");r.prototype=e,n=new r,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}var w=function(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){return!1}};if(Object.defineProperty){var S=w({}),k="undefined"==typeof document||w(document.createElement("div"));if(!S||!k)var T=Object.defineProperty,E=Object.defineProperties}if(!Object.defineProperty||T){var O="Property description must be an object: ",x="Object.defineProperty called on non-object: ",P="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(i,a,s){if(l(i))throw new TypeError(x+i);if(l(s))throw new TypeError(O+s);if(T)try{return T.call(Object,i,a,s)}catch(u){}if("value"in s)if(c&&(n(i,a)||r(i,a))){var f=i.__proto__;i.__proto__=o,delete i[a],i[a]=s.value,i.__proto__=f}else i[a]=s.value;else{var h="get"in s,p="set"in s;if(!c&&(h||p))throw new TypeError(P);h&&e(i,a,s.get),p&&t(i,a,s.set)}return i}}Object.defineProperties&&!E||(Object.defineProperties=function(e,t){if(E)try{return E.call(Object,e,t)}catch(n){}return Object.keys(t).forEach(function(n){"__proto__"!==n&&Object.defineProperty(e,n,t[n])}),e}),Object.seal||(Object.seal=function(e){if(Object(e)!==e)throw new TypeError("Object.seal can only be called on Objects.");return e}),Object.freeze||(Object.freeze=function(e){if(Object(e)!==e)throw new TypeError("Object.freeze can only be called on Objects.");return e});try{Object.freeze(function(){})}catch(C){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){if(Object(e)!==e)throw new TypeError("Object.preventExtensions can only be called on Objects.");return e}),Object.isSealed||(Object.isSealed=function(e){if(Object(e)!==e)throw new TypeError("Object.isSealed can only be called on Objects.");return!1}),Object.isFrozen||(Object.isFrozen=function(e){if(Object(e)!==e)throw new TypeError("Object.isFrozen can only be called on Objects.");return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)!==e)throw new TypeError("Object.isExtensible can only be called on Objects.");for(var t="";a(e,t);)t+="?";e[t]=!0;var n=a(e,t);return delete e[t],n})})},function(e,t,n){function r(e,t){var n,r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[];if(t=t||r.length,e)for(n=0;n * @license MIT */ "use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),a.alloc(+e)}function g(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;cs&&(n=s-u),c=n;c>=0;c--){for(var f=!0,h=0;hi&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,c,l,f;switch(s){case 1:o<128&&(a=o);break;case 2:u=e[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(a=f));break;case 3:u=e[i+1],c=e[i+2],128===(192&u)&&128===(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(a=f));break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&f<1114112&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return M(r)}function M(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function U(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function F(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,i){return i||L(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,i){return i||L(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,r,52,8),n+8}function G(e){if(e=z(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function V(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function X(e){return $.toByteArray(G(e))}function Y(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e){return e!==e}var $=n(6),Q=n(7),Z=n(8);t.Buffer=a,t.SlowBuffer=y,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return s(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return c(null,e,t,n)},a.allocUnsafe=function(e){return l(null,e)},a.allocUnsafeSlow=function(e){return l(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,u=Math.min(o,s),c=this.slice(r,i),l=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return S(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return T(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return O(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),Q.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),Q.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),Q.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),Q.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;D(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):F(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):F(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,o,a,s=e.length;o=n(e),a=new l(3*s/4-o),r=o>0?s-4:s;var u=0;for(t=0;t>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function a(e,t,n){for(var r,i=[],a=t;al?l:c+s));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=s;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,p=f.length;h>1,l=-7,f=n?i-1:0,h=n?-1:1,p=e[t+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?h/u:h*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<0;e[n+p]=255&a,p+=d,a/=256,c-=8);e[n+p-d]|=128*v}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t,r){!function(){var i=("undefined"==typeof window?t:window)||{};_crypto=i.crypto||i.msCrypto||n(10),e.exports=function(e){if(_crypto.getRandomValues){var t=new r(e);return _crypto.getRandomValues(t),t}if(_crypto.randomBytes)return _crypto.randomBytes(e);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(t,function(){return this}(),n(5).Buffer)},function(e,t){},function(e,t,n){(function(t){function r(e){return function(){var n=[],r={update:function(e,r){return t.isBuffer(e)||(e=new t(e,r)),n.push(e),this},digest:function(r){var i=t.concat(n),o=e(i);return n=null,r?o.toString(r):o}};return r}}var i=n(12),o=r(n(21)),a=r(n(23));e.exports=function(e){return"md5"===e?new o:"rmd160"===e?new a:i(e)}}).call(t,n(5).Buffer)},function(e,t,n){var t=e.exports=function(e){var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n},r=n(5).Buffer,i=n(13)(r);t.sha1=n(14)(r,i),t.sha256=n(19)(r,i),t.sha512=n(20)(r,i)},function(e,t){e.exports=function(e){function t(t,n){this._block=new e(t),this._finalSize=n,this._blockSize=t,this._len=0,this._s=0}return t.prototype.init=function(){this._s=0,this._len=0},t.prototype.update=function(t,n){"string"==typeof t&&(n=n||"utf8",t=new e(t,n));for(var r=this._len+=t.length,i=this._s=this._s||0,o=0,a=this._block;i=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var n=this._update(this._block)||this._hash();return e?n.toString(e):n},t.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t}},function(e,t,n){var r=n(15).inherits;e.exports=function(e,t){function n(){return d.length?d.pop().init():this instanceof n?(this._w=p,t.call(this,64,56),this._h=null,void this.init()):new n}function i(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function o(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function a(e,t){return e+t|0}function s(e,t){return e<>>32-t}var u=0,c=4,l=8,f=12,h=16,p=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return r(n,t),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,t.prototype.init.call(this),this},n.prototype._POOL=d,n.prototype._update=function(e){var t,n,r,u,c,l,f,h,p,d;t=l=this._a,n=f=this._b,r=h=this._c,u=p=this._d,c=d=this._e;for(var v=this._w,y=0;y<80;y++){var g=v[y]=y<16?e.readInt32BE(4*y):s(v[y-3]^v[y-8]^v[y-14]^v[y-16],1),m=a(a(s(t,5),i(y,n,r,u)),a(a(c,g),o(y)));c=u,u=r,r=s(n,30),n=t,t=m}this._a=a(t,l),this._b=a(n,f),this._c=a(r,h),this._d=a(u,p),this._e=a(c,d)},n.prototype._hash=function(){d.length<100&&d.push(this);var t=new e(20);return t.writeInt32BE(0|this._a,u),t.writeInt32BE(0|this._b,c),t.writeInt32BE(0|this._c,l),t.writeInt32BE(0|this._d,f),t.writeInt32BE(0|this._e,h),t},n}},function(e,t,n){(function(e,r){function i(e,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),v(n)?r.showHidden=n:n&&t._extend(r,n),w(r.showHidden)&&(r.showHidden=!1),w(r.depth)&&(r.depth=2),w(r.colors)&&(r.colors=!1),w(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return _(i)||(i=u(e,i,r)),i}var o=c(e,n);if(o)return o;var a=Object.keys(n),v=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),E(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(n);if(0===a.length){if(O(n)){var y=n.name?": "+n.name:"";return e.stylize("[Function"+y+"]","special")}if(S(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(T(n))return e.stylize(Date.prototype.toString.call(n),"date");if(E(n))return l(n)}var g="",m=!1,b=["{","}"];if(d(n)&&(m=!0,b=["[","]"]),O(n)){var w=n.name?": "+n.name:"";g=" [Function"+w+"]"}if(S(n)&&(g=" "+RegExp.prototype.toString.call(n)),T(n)&&(g=" "+Date.prototype.toUTCString.call(n)),E(n)&&(g=" "+l(n)),0===a.length&&(!m||0==n.length))return b[0]+g+b[1];if(r<0)return S(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var k;return k=m?f(e,n,r,v,a):a.map(function(t){return h(e,n,r,v,t,m)}),e.seen.pop(),p(k,g,b)}function c(e,t){if(w(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return m(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i){for(var o=[],a=0,s=t.length;a-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),w(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return null==e}function m(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function w(e){return void 0===e}function S(e){return k(e)&&"[object RegExp]"===P(e)}function k(e){return"object"==typeof e&&null!==e}function T(e){return k(e)&&"[object Date]"===P(e)}function E(e){return k(e)&&("[object Error]"===P(e)||e instanceof Error)}function O(e){return"function"==typeof e}function x(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function P(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}function M(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var I=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),s=r[n];n1)for(var n=1;n>>t|e<<32-t}function o(e,t){return e>>>t}function a(e,t,n){return e&t^~e&n}function s(e,t,n){return e&t^e&n^t&n}function u(e){return i(e,2)^i(e,13)^i(e,22)}function c(e){return i(e,6)^i(e,11)^i(e,25)}function l(e){return i(e,7)^i(e,18)^o(e,3)}function f(e){return i(e,17)^i(e,19)^o(e,10)}var h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],p=new Array(64);return r(n,t),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},n.prototype._update=function(e){var t,n,r,i,o,p,d,v,y,g,m=this._w;t=0|this._a,n=0|this._b,r=0|this._c,i=0|this._d,o=0|this._e,p=0|this._f,d=0|this._g,v=0|this._h;for(var _=0;_<64;_++){var b=m[_]=_<16?e.readInt32BE(4*_):f(m[_-2])+m[_-7]+l(m[_-15])+m[_-16];y=v+c(o)+a(o,p,d)+h[_]+b,g=u(t)+s(t,n,r),v=d,d=p,p=o,o=i+y,i=r,r=n,n=t,t=y+g}this._a=t+this._a|0,this._b=n+this._b|0,this._c=r+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0,this._f=p+this._f|0,this._g=d+this._g|0,this._h=v+this._h|0},n.prototype._hash=function(){var t=new e(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},n}},function(e,t,n){var r=n(15).inherits;e.exports=function(e,t){function n(){this.init(),this._w=u,t.call(this,128,112)}function i(e,t,n){return e>>>n|t<<32-n}function o(e,t,n){return e&t^~e&n}function a(e,t,n){return e&t^e&n^t&n}var s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],u=new Array(160);return r(n,t),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},n.prototype._update=function(e){var t,n,r,u,c,l,f,h,p,d,v,y,g,m,_,b,w=this._w;t=0|this._a,n=0|this._b,r=0|this._c,u=0|this._d,c=0|this._e,l=0|this._f,f=0|this._g,h=0|this._h,p=0|this._al,d=0|this._bl,v=0|this._cl,y=0|this._dl,g=0|this._el,m=0|this._fl,_=0|this._gl,b=0|this._hl;for(var S=0;S<80;S++){var k,T,E=2*S;if(S<16)k=w[E]=e.readInt32BE(4*E),T=w[E+1]=e.readInt32BE(4*E+4);else{var O=w[E-30],x=w[E-30+1],P=i(O,x,1)^i(O,x,8)^O>>>7,C=i(x,O,1)^i(x,O,8)^i(x,O,7);O=w[E-4],x=w[E-4+1];var M=i(O,x,19)^i(x,O,29)^O>>>6,A=i(x,O,19)^i(O,x,29)^i(x,O,6),I=w[E-14],j=w[E-14+1],B=w[E-32],R=w[E-32+1];T=C+j,k=P+I+(T>>>0>>0?1:0),T+=A,k=k+M+(T>>>0>>0?1:0),T+=R,k=k+B+(T>>>0>>0?1:0),w[E]=k,w[E+1]=T}var D=a(t,n,r),U=a(p,d,v),F=i(t,p,28)^i(p,t,2)^i(p,t,7),L=i(p,t,28)^i(t,p,2)^i(t,p,7),N=i(c,g,14)^i(c,g,18)^i(g,c,9),W=i(g,c,14)^i(g,c,18)^i(c,g,9),G=s[E],z=s[E+1],H=o(c,l,f),q=o(g,m,_),V=b+W,J=h+N+(V>>>0>>0?1:0);V+=q,J=J+H+(V>>>0>>0?1:0),V+=z,J=J+G+(V>>>0>>0?1:0),V+=T,J=J+k+(V>>>0>>0?1:0);var X=L+U,Y=F+D+(X>>>0>>0?1:0);h=f,b=_,f=l,_=m,l=c,m=g,g=y+V|0,c=u+J+(g>>>0>>0?1:0)|0,u=r,y=v,r=n,v=d,n=t,d=p,p=V+X|0,t=J+Y+(p>>>0>>0?1:0)|0}this._al=this._al+p|0,this._bl=this._bl+d|0,this._cl=this._cl+v|0,this._dl=this._dl+y|0,this._el=this._el+g|0,this._fl=this._fl+m|0,this._gl=this._gl+_|0,this._hl=this._hl+b|0,this._a=this._a+t+(this._al>>>0

>>0?1:0)|0,this._b=this._b+n+(this._bl>>>0>>0?1:0)|0,this._c=this._c+r+(this._cl>>>0>>0?1:0)|0,this._d=this._d+u+(this._dl>>>0>>0?1:0)|0,this._e=this._e+c+(this._el>>>0>>0?1:0)|0,this._f=this._f+l+(this._fl>>>0>>0?1:0)|0,this._g=this._g+f+(this._gl>>>0<_>>>0?1:0)|0,this._h=this._h+h+(this._hl>>>0>>0?1:0)|0},n.prototype._hash=function(){function t(e,t,r){n.writeInt32BE(e,r),n.writeInt32BE(t,r+4)}var n=new e(64);return t(this._a,this._al,0),t(this._b,this._bl,8),t(this._c,this._cl,16),t(this._d,this._dl,24),t(this._e,this._el,32),t(this._f,this._fl,40),t(this._g,this._gl,48),t(this._h,this._hl,56),n},n}},function(e,t,n){function r(e,t){e[t>>5]|=128<>>9<<4)+14]=t;for(var n=1732584193,r=-271733879,i=-1732584194,l=271733878,f=0;f>16)+(t>>16)+(n>>16);return r<<16|65535&n}function l(e,t){return e<>>32-t}var f=n(22);e.exports=function(e){return f.hash(e,r,16)}},function(e,t,n){(function(t){function n(e,n){if(e.length%o!==0){var r=e.length+(o-e.length%o);e=t.concat([e,a],r)}for(var i=[],s=n?e.readInt32BE:e.readInt32LE,u=0;u>>32-t}function u(e){var n=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof e&&(e=new t(e,"utf8"));var r=v(e),i=8*e.length,o=8*e.length;r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);for(var a=0;a>>24)|4278255360&(s<<24|s>>>8)}var u=y(n);return new t(u)}e.exports=u;/** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ var c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],p=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],v=function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},y=function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},g=function(e,t,u){for(var v=0;v<16;v++){var y=u+v,g=t[y];t[y]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8)}var m,_,b,w,S,k,T,E,O,x;k=m=e[0],T=_=e[1],E=b=e[2],O=w=e[3],x=S=e[4];for(var P,v=0;v<80;v+=1)P=m+t[u+c[v]]|0,P+=v<16?n(_,b,w)+p[0]:v<32?r(_,b,w)+p[1]:v<48?i(_,b,w)+p[2]:v<64?o(_,b,w)+p[3]:a(_,b,w)+p[4],P|=0,P=s(P,f[v]),P=P+S|0,m=S,S=w,w=s(b,10),b=_,_=P,P=k+t[u+l[v]]|0,P+=v<16?a(T,E,O)+d[0]:v<32?o(T,E,O)+d[1]:v<48?i(T,E,O)+d[2]:v<64?r(T,E,O)+d[3]:n(T,E,O)+d[4],P|=0,P=s(P,h[v]),P=P+x|0,k=x,x=O,O=s(E,10),E=T,T=P;P=e[1]+b+O|0,e[1]=e[2]+w+x|0,e[2]=e[3]+S+k|0,e[3]=e[4]+m+T|0,e[4]=e[0]+_+E|0,e[0]=P}}).call(t,n(5).Buffer)},function(e,t,n){(function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);this._opad=u,this._alg=e;var a="sha512"===e?128:64;n=this._key=t.isBuffer(n)?n:new t(n),n.length>a?n=i(e).update(n).digest():n.length(Math.pow(2,32)-1)*s))throw new TypeError("keylen exceeds maximum length");d.copy(c,0,0,s);for(var v=1;v15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},i.prototype.flush=function(){for(var e=16-this.cache.length,n=new t(e),r=-1;++rs||e<0?(n=Math.abs(e)%s,e<0?s-n:n):e}function r(e){var t,n,r;for(t=n=0,r=e.length;0<=r?nr;t=0<=r?++n:--n)e[t]=0;return!1}function i(){var e;this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=function(){var t,n;for(n=[],e=t=0;t<4;e=++t)n.push([]);return n}(),this.INV_SUB_MIX=function(){var t,n;for(n=[],e=t=0;t<4;e=++t)n.push([]);return n}(),this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function o(e){for(var t=e.length/4,n=new Array(t),r=-1;++r>>8^255&n^99,this.SBOX[i]=n,this.INV_SBOX[n]=i,o=e[i],a=e[o],s=e[a],r=257*e[n]^16843008*n,this.SUB_MIX[0][i]=r<<24|r>>>8,this.SUB_MIX[1][i]=r<<16|r>>>16,this.SUB_MIX[2][i]=r<<8|r>>>24,this.SUB_MIX[3][i]=r,r=16843009*s^65537*a^257*o^16843008*i,this.INV_SUB_MIX[0][n]=r<<24|r>>>8,this.INV_SUB_MIX[1][n]=r<<16|r>>>16,this.INV_SUB_MIX[2][n]=r<<8|r>>>24,this.INV_SUB_MIX[3][n]=r,0===i?i=u=1:(i=o^e[e[e[s^o]]],u^=e[e[u]]);return!0};var u=new i;a.blockSize=16,a.prototype.blockSize=a.blockSize,a.keySize=32,a.prototype.keySize=a.keySize,a.ivSize=a.blockSize,a.prototype.ivSize=a.ivSize,a.prototype._doReset=function(){var e,t,n,r,i,o,a,s;for(n=this._key,t=n.length,this._nRounds=t+6,i=4*(this._nRounds+1),this._keySchedule=[],r=a=0;0<=i?ai;r=0<=i?++a:--a)this._keySchedule[r]=r>>24,o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o],o^=u.RCON[r/t|0]<<24):t>6&&r%t===4?o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o]:void 0,this._keySchedule[r-t]^o);for(this._invKeySchedule=[],e=s=0;0<=i?si;e=0<=i?++s:--s)r=i-e,o=this._keySchedule[r-(e%4?0:4)],this._invKeySchedule[e]=e<4||r<=4?o:u.INV_SUB_MIX[0][u.SBOX[o>>>24]]^u.INV_SUB_MIX[1][u.SBOX[o>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[o>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&o]];return!0},a.prototype.encryptBlock=function(t){t=o(new e(t));var n=this._doCryptBlock(t,this._keySchedule,u.SUB_MIX,u.SBOX),r=new e(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[1],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[3],12),r},a.prototype.decryptBlock=function(t){t=o(new e(t));var n=[t[3],t[1]];t[1]=n[0],t[3]=n[1];var r=this._doCryptBlock(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX),i=new e(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},a.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},a.prototype._doCryptBlock=function(e,t,r,i){var o,a,s,u,c,l,f,h,p,d,v,y;for(s=e[0]^t[0],u=e[1]^t[1],c=e[2]^t[2],l=e[3]^t[3],o=4,a=v=1,y=this._nRounds;1<=y?vy;a=1<=y?++v:--v)f=r[0][s>>>24]^r[1][u>>>16&255]^r[2][c>>>8&255]^r[3][255&l]^t[o++],h=r[0][u>>>24]^r[1][c>>>16&255]^r[2][l>>>8&255]^r[3][255&s]^t[o++],p=r[0][c>>>24]^r[1][l>>>16&255]^r[2][s>>>8&255]^r[3][255&u]^t[o++],d=r[0][l>>>24]^r[1][s>>>16&255]^r[2][u>>>8&255]^r[3][255&c]^t[o++],s=f,u=h,c=p,l=d;return f=(i[s>>>24]<<24|i[u>>>16&255]<<16|i[c>>>8&255]<<8|i[255&l])^t[o++],h=(i[u>>>24]<<24|i[c>>>16&255]<<16|i[l>>>8&255]<<8|i[255&s])^t[o++],p=(i[c>>>24]<<24|i[l>>>16&255]<<16|i[s>>>8&255]<<8|i[255&u])^t[o++],d=(i[l>>>24]<<24|i[s>>>16&255]<<16|i[u>>>8&255]<<8|i[255&c])^t[o++],[n(f),n(h),n(p),n(d)]},t.AES=a}).call(t,n(5).Buffer)},function(e,t,n){(function(t){function r(){i.call(this)}var i=n(31).Transform,o=n(33);e.exports=r,o(r,i),r.prototype.update=function(e,n,r){this.write(e,n);for(var i,o=new t("");i=this.read();)o=t.concat([o,i]);return r&&(o=o.toString(r)),o},r.prototype["final"]=function(e){this.end();for(var n,r=new t("");n=this.read();)r=t.concat([r,n]);return e&&(r=r.toString(e)),r}}).call(t,n(5).Buffer)},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(32).EventEmitter,o=n(33);o(r,i),r.Readable=n(34),r.Writable=n(51),r.Duplex=n(52),r.Transform=n(53),r.PassThrough=n(54),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function o(){l||(l=!0,e.end())}function a(){l||(l=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){c.removeListener("data",n),e.removeListener("drain",r),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),e.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),e.removeListener("close",u)}var c=this;c.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(c.on("end",o),c.on("close",a));var l=!1;return c.on("error",s),e.on("error",s),c.on("end",u),c.on("close",u),e.on("close",u),e.emit("pipe",c),e}},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,c;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 l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(n=this._events[e],a(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:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,u=0;u0&&this._events[e].length>i&&(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},n.prototype.on=n.prototype.addListener,n.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},n.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},n.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},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){t=e.exports=n(35),t.Stream=t,t.Readable=t,t.Writable=n(43),t.Duplex=n(42),t.Transform=n(49),t.PassThrough=n(50)},function(e,t,n){(function(t){"use strict";function r(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?M(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function i(e,t){P=P||n(42),e=e||{},this.objectMode=!!e.objectMode,t instanceof P&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new F,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(U||(U=n(47).StringDecoder),this.decoder=new U(e.encoding),this.encoding=e.encoding)}function o(e){return P=P||n(42),this instanceof o?(this._readableState=new i(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),void I.call(this)):new o(e)}function a(e,t,n,r,i){var o=l(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,f(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var c;!t.decoder||i||r||(n=t.decoder.write(n),c=!t.objectMode&&0===n.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&h(e))),d(e,t)}else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length=N?e=N:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function c(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function l(e,t){var n=null;return j.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function f(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,h(e)}}function h(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(D("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?C(p,e):p(e))}function p(e){D("emit readable"),e.emit("readable"),b(e)}function d(e,t){t.readingMore||(t.readingMore=!0,C(v,e,t))}function v(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=S(e,t.buffer,t.decoder),n}function S(e,t,n){var r;return eo.length?o.length:e;if(i+=a===o.length?o:o.slice(0,e),e-=a,0===e){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}function T(e,t){var n=j.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),e-=a,0===e){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}function E(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,C(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function x(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return D("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):h(this),null;if(e=c(e,t),0===e&&t.ended)return 0===t.length&&E(this),null;var r=t.needReadable;D("need readable",r),(0===t.length||t.length-e0?w(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==i&&this.emit("data",i),i},o.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(e,n){function i(e){D("onunpipe"),e===h&&a()}function o(){D("onend"),e.end()}function a(){D("cleanup"),e.removeListener("close",c),e.removeListener("finish",l),e.removeListener("drain",g),e.removeListener("error",u),e.removeListener("unpipe",i),h.removeListener("end",o),h.removeListener("end",f),h.removeListener("data",s),m=!0,!p.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function s(t){D("ondata"),_=!1;var n=e.write(t);!1!==n||_||((1===p.pipesCount&&p.pipes===e||p.pipesCount>1&&x(p.pipes,e)!==-1)&&!m&&(D("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,_=!0),h.pause())}function u(t){D("onerror",t),f(),e.removeListener("error",u),0===A(e,"error")&&e.emit("error",t)}function c(){e.removeListener("finish",l),f()}function l(){D("onfinish"),e.removeListener("close",c),f()}function f(){D("unpipe"),h.unpipe(e)}var h=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=e;break;case 1:p.pipes=[p.pipes,e];break;default:p.pipes.push(e)}p.pipesCount+=1,D("pipe count=%d opts=%j",p.pipesCount,n);var d=(!n||n.end!==!1)&&e!==t.stdout&&e!==t.stderr,v=d?o:f;p.endEmitted?C(v):h.once("end",v),e.on("unpipe",i);var g=y(h);e.on("drain",g);var m=!1,_=!1;return h.on("data",s),r(e,"error",u),e.once("close",c),e.once("finish",l),e.emit("pipe",h),p.flowing||(D("pipe resume"),h.resume()),e},o.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length},r.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},r.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},r.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t}},function(e,t,n){"use strict";function r(e){return this instanceof r?(c.call(this,e),l.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||s(o,this)}function o(e){e.end()}var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var s=n(36),u=n(39);u.inherits=n(33);var c=n(35),l=n(43);u.inherits(r,c);for(var f=a(l.prototype),h=0;h-1?r:E;s.WritableState=a;var x=n(39);x.inherits=n(33);var P={deprecate:n(46)},C=n(37),M=n(38).Buffer;x.inherits(s,C),a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:P.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var A;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(s,Symbol.hasInstance,{value:function(e){return!!A.call(this,e)||e&&e._writableState instanceof a}})):A=function(e){return e instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(e,t,n){ var r=this._writableState,o=!1,a=M.isBuffer(e);return"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=i),r.ended?u(this,n):(a||c(this,r,e,n))&&(r.pendingcb++,o=f(this,r,a,e,t,n)),o},s.prototype.cork=function(){var e=this._writableState;e.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||m(this,e))},s.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},s.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||S(this,r,n)}}).call(t,n(16),n(44).setImmediate)},function(e,r,i){function o(e,t){this._id=e,this._clearFn=t}var a=Function.prototype.apply;r.setTimeout=function(){return new o(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new o(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},i(45),r.setImmediate=t,r.clearImmediate=n},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n>5===6?2:e>>4===14?3:e>>3===30?4:-1}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function u(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"�".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�".repeat(n+2)}}function c(e){var t=this.lastTotal-this.lastNeed,n=u(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t}function h(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function d(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function v(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function g(e){return e&&e.length?this.write(e):""}var m=n(48).Buffer,_=m.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n0&&o.update(a),o.update(n),a=o.digest(),s=0,r>0)for(;0!==r&&s!==a.length;)l[u++]=a[s],r--,s++;if(i>0&&s!==a.length)for(;0!==i&&s!==a.length;)f[c++]=a[s],i--,s++;if(0===r&&0===i)break}for(s=0;s16){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},i.prototype.flush=function(){if(this.cache.length)return this.cache};var h={ECB:n(58),CBC:n(59),CFB:n(61),OFB:n(62),CTR:n(63)};e.exports=function(e){function n(e,n,i){var o=c[e];if(!o)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new t(i)),"string"==typeof n&&(n=new t(n)),n.length!==o.key/8)throw new TypeError("invalid key length "+n.length);if(i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new l(h[o.mode],n,i,(!0)):new r(h[o.mode],n,i)}function i(t,r){var i=c[t];if(!i)throw new TypeError("invalid suite type");var o=f(e,r,i.key,i.iv);return n(t,o.key,o.iv)}return{createDecipher:i,createDecipheriv:n}}}).call(t,n(5).Buffer)},function(e,t){var n=function(){function e(){if(!H){try{var e=U.getElementsByTagName("body")[0].appendChild(g("span"));e.parentNode.removeChild(e)}catch(t){return}H=!0;for(var n=N.length,r=0;r0)for(var t=0;t0){var o=y(n);if(o)if(!_(W[t].swfVersion)||J.wk&&J.wk<312)if(W[t].expressInstall&&u()){var a={};a.data=W[t].expressInstall,a.width=o.getAttribute("width")||"0",a.height=o.getAttribute("height")||"0",o.getAttribute("class")&&(a.styleclass=o.getAttribute("class")),o.getAttribute("align")&&(a.align=o.getAttribute("align"));for(var f={},h=o.getElementsByTagName("param"),p=h.length,d=0;d');i.outerHTML='"+s+"",G[G.length]=e.id,r=y(e.id)}else{var c=g(M);c.setAttribute("type",j);for(var l in e)e[l]!=Object.prototype[l]&&("styleclass"==l.toLowerCase()?c.setAttribute("class",e[l]):"classid"!=l.toLowerCase()&&c.setAttribute(l,e[l]));for(var f in t)t[f]!=Object.prototype[f]&&"movie"!=f.toLowerCase()&&p(c,f,t[f]);i.parentNode.replaceChild(c,i),r=c}return r}function p(e,t,n){var r=g("param");r.setAttribute("name",t),r.setAttribute("value",n),e.appendChild(r)}function d(e){var t=y(e);t&&"OBJECT"==t.nodeName&&(J.ie&&J.win?(t.style.display="none",function(){4==t.readyState?v(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))}function v(e){var t=y(e);if(t){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function y(e){var t=null;try{t=U.getElementById(e)}catch(n){}return t}function g(e){return U.createElement(e)}function m(e,t,n){e.attachEvent(t,n),z[z.length]=[e,t,n]}function _(e){var t=J.pv,n=e.split(".");return n[0]=parseInt(n[0],10),n[1]=parseInt(n[1],10)||0,n[2]=parseInt(n[2],10)||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 b(e,t,n,r){if(!J.ie||!J.mac){var i=U.getElementsByTagName("head")[0];if(i){var o=n&&"string"==typeof n?n:"screen";if(r&&(x=null,P=null),!x||P!=o){var a=g("style");a.setAttribute("type","text/css"),a.setAttribute("media",o),x=i.appendChild(a),J.ie&&J.win&&typeof U.styleSheets!=C&&U.styleSheets.length>0&&(x=U.styleSheets[U.styleSheets.length-1]),P=o}J.ie&&J.win?x&&typeof x.addRule==M&&x.addRule(e,t):x&&typeof U.createTextNode!=C&&x.appendChild(U.createTextNode(e+" {"+t+"}"))}}}function w(e,t){if(V){var n=t?"visible":"hidden";H&&y(e)?y(e).style.visibility=n:b("#"+e,"visibility:"+n)}}function S(e){var t=/[\\\"<>\.;]/,n=null!=t.exec(e);return n&&typeof encodeURIComponent!=C?encodeURIComponent(e):e}var k,T,E,O,x,P,C="undefined",M="object",A="Shockwave Flash",I="ShockwaveFlash.ShockwaveFlash",j="application/x-shockwave-flash",B="SWFObjectExprInst",R="onreadystatechange",D=window,U=document,F=navigator,L=!1,N=[i],W=[],G=[],z=[],H=!1,q=!1,V=!0,J=function(){var e=typeof U.getElementById!=C&&typeof U.getElementsByTagName!=C&&typeof U.createElement!=C,t=F.userAgent.toLowerCase(),n=F.platform.toLowerCase(),r=n?/win/.test(n):/win/.test(t),i=n?/mac/.test(n):/mac/.test(t),o=!!/webkit/.test(t)&&parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),a=!1,s=[0,0,0],u=null;if(typeof F.plugins!=C&&typeof F.plugins[A]==M)u=F.plugins[A].description,!u||typeof F.mimeTypes!=C&&F.mimeTypes[j]&&!F.mimeTypes[j].enabledPlugin||(L=!0,a=!1,u=u.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),s[0]=parseInt(u.replace(/^(.*)\..*$/,"$1"),10),s[1]=parseInt(u.replace(/^.*\.(.*)\s.*$/,"$1"),10),s[2]=/[a-zA-Z]/.test(u)?parseInt(u.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof D[["Active"].concat("Object").join("X")]!=C)try{var c=new(window[["Active"].concat("Object").join("X")])(I);c&&(u=c.GetVariable("$version"),u&&(a=!0,u=u.split(" ")[1].split(","),s=[parseInt(u[0],10),parseInt(u[1],10),parseInt(u[2],10)]))}catch(l){}return{w3:e,pv:s,wk:o,ie:a,win:r,mac:i}}();return function(){J.w3&&((typeof U.readyState!=C&&"complete"==U.readyState||typeof U.readyState==C&&(U.getElementsByTagName("body")[0]||U.body))&&e(),H||(typeof U.addEventListener!=C&&U.addEventListener("DOMContentLoaded",e,!1),J.ie&&J.win&&(U.attachEvent(R,function(){"complete"==U.readyState&&(U.detachEvent(R,arguments.callee),e())}),D==top&&!function(){if(!H){try{U.documentElement.doScroll("left")}catch(t){return void setTimeout(arguments.callee,0)}e()}}()),J.wk&&!function(){if(!H)return/loaded|complete/.test(U.readyState)?void e():void setTimeout(arguments.callee,0)}(),r(e)))}(),function(){J.ie&&J.win&&window.attachEvent("onunload",function(){for(var e=z.length,t=0;tswfobject.getFlashPlayerVersion().major?void e.error("Flash Player >= 10.0.0 is required."):("file:"==location.protocol&&e.error("WARNING: web-socket-js doesn't work in file:///... URL unless you set Flash Security Settings properly. Open the page via Web server i.e. http://..."),window.WebSocket=function(e,t,n,r,i){var o=this;o.__id=WebSocket.__nextId++,WebSocket.__instances[o.__id]=o,o.readyState=WebSocket.CONNECTING,o.bufferedAmount=0,o.__events={},t?"string"==typeof t&&(t=[t]):t=[],o.__createTask=setTimeout(function(){WebSocket.__addTask(function(){o.__createTask=null,WebSocket.__flash.create(o.__id,e,t,n||null,r||0,i||null)})},0)},WebSocket.prototype.send=function(e){if(this.readyState==WebSocket.CONNECTING)throw"INVALID_STATE_ERR: Web Socket connection has not been established";var t=WebSocket.__flash.send(this.__id,encodeURIComponent(e));return 0>t||(this.bufferedAmount+=t,!1)},WebSocket.prototype.close=function(){return this.__createTask?(clearTimeout(this.__createTask),this.__createTask=null,void(this.readyState=WebSocket.CLOSED)):void(this.readyState!=WebSocket.CLOSED&&this.readyState!=WebSocket.CLOSING&&(this.readyState=WebSocket.CLOSING,WebSocket.__flash.close(this.__id)))},WebSocket.prototype.addEventListener=function(e,t){e in this.__events||(this.__events[e]=[]),this.__events[e].push(t)},WebSocket.prototype.removeEventListener=function(e,t){if(e in this.__events)for(var n=this.__events[e],r=n.length-1;r>=0;--r)if(n[r]===t){n.splice(r,1);break}},WebSocket.prototype.dispatchEvent=function(e){for(var t=this.__events[e.type]||[],n=0;t.length>n;++n)t[n](e);var r=this["on"+e.type];r&&r.apply(this,[e])},WebSocket.prototype.__handleEvent=function(e){"readyState"in e&&(this.readyState=e.readyState),"protocol"in e&&(this.protocol=e.protocol);var t;if("open"==e.type||"error"==e.type)t=this.__createSimpleEvent(e.type);else if("close"==e.type)t=this.__createSimpleEvent("close"),t.wasClean=!!e.wasClean,t.code=e.code,t.reason=e.reason;else{if("message"!=e.type)throw"unknown event type: "+e.type;var n=decodeURIComponent(e.message);t=this.__createMessageEvent("message",n)}this.dispatchEvent(t)},WebSocket.prototype.__createSimpleEvent=function(e){if(document.createEvent&&window.Event){var t=document.createEvent("Event");return t.initEvent(e,!1,!1),t}return{type:e,bubbles:!1,cancelable:!1}},WebSocket.prototype.__createMessageEvent=function(e,t){if(document.createEvent&&window.MessageEvent&&!window.opera){var n=document.createEvent("MessageEvent");return n.initMessageEvent("message",!1,!1,t,null,null,window,null),n}return{type:e,data:t,bubbles:!1,cancelable:!1}},WebSocket.CONNECTING=0,WebSocket.OPEN=1,WebSocket.CLOSING=2,WebSocket.CLOSED=3,WebSocket.__isFlashImplementation=!0,WebSocket.__initialized=!1,WebSocket.__flash=null,WebSocket.__instances={},WebSocket.__tasks=[],WebSocket.__nextId=0,WebSocket.loadFlashPolicyFile=function(e){WebSocket.__addTask(function(){WebSocket.__flash.loadManualPolicyFile(e)})},WebSocket.__initialize=function(){if(!WebSocket.__initialized){if(WebSocket.__initialized=!0,WebSocket.__swfLocation&&(window.WEB_SOCKET_SWF_LOCATION=WebSocket.__swfLocation),!window.WEB_SOCKET_SWF_LOCATION)return void e.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");if(!window.WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR&&!WEB_SOCKET_SWF_LOCATION.match(/(^|\/)WebSocketMainInsecure\.swf(\?.*)?$/)&&WEB_SOCKET_SWF_LOCATION.match(/^\w+:\/\/([^\/]+)/)){var t=RegExp.$1;location.host!=t&&e.error("[WebSocket] You must host HTML and WebSocketMain.swf in the same host ('"+location.host+"' != '"+t+"'). See also 'How to host HTML file and SWF file in different domains' section in README.md. If you use WebSocketMainInsecure.swf, you can suppress this message by WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR = true;")}var n=document.createElement("div");n.id="webSocketContainer",n.style.position="absolute",WebSocket.__isFlashLite()?(n.style.left="0px",n.style.top="0px"):(n.style.left="-100px",n.style.top="-100px");var r=document.createElement("div");r.id="webSocketFlash",n.appendChild(r),document.body.appendChild(n),swfobject.embedSWF(WEB_SOCKET_SWF_LOCATION,"webSocketFlash","1","1","10.0.0",null,null,{hasPriority:!0,swliveconnect:!0,allowScriptAccess:"always"},null,function(t){t.success||e.error("[WebSocket] swfobject.embedSWF failed")})}},WebSocket.__onFlashInitialized=function(){setTimeout(function(){WebSocket.__flash=document.getElementById("webSocketFlash"),WebSocket.__flash.setCallerUrl(location.href),WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG);for(var e=0;WebSocket.__tasks.length>e;++e)WebSocket.__tasks[e]();WebSocket.__tasks=[]},0)},WebSocket.__onFlashEvent=function(){return setTimeout(function(){try{for(var t=WebSocket.__flash.receiveEvents(),n=0;t.length>n;++n)WebSocket.__instances[t[n].webSocketId].__handleEvent(t[n])}catch(r){e.error(r)}},0),!0},WebSocket.__log=function(t){e.log(decodeURIComponent(t))},WebSocket.__error=function(t){e.error(decodeURIComponent(t))},WebSocket.__addTask=function(e){WebSocket.__flash?e():WebSocket.__tasks.push(e)},WebSocket.__isFlashLite=function(){if(!window.navigator||!window.navigator.mimeTypes)return!1;var e=window.navigator.mimeTypes["application/x-shockwave-flash"];return!!(e&&e.enabledPlugin&&e.enabledPlugin.filename)&&!!e.enabledPlugin.filename.match(/flashlite/i)},void(window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION||swfobject.addDomLoadEvent(function(){WebSocket.__initialize()})))}()},function(e,t,n){e.exports=n(68)},function(e,t,n){(function(e,r){/*! * Nats * Copyright(c) 2012-2016 Apcera Inc. All rights reserved. * Copyright(c) 2011-2014 Derek Collison (derek.collison@gmail.com) * MIT Licensed */ "use strict";function i(e){f.EventEmitter.call(this),this.parseOptions(e),this.initState(),this.createConnection()}function o(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function a(e){this.url=e,this.didConnect=!1,this.reconnects=0}var s=n(69),u=n(70),c=n(71),l=n(15),f=n(32),h=n(78),p="0.6.8",d=4222,v="nats://localhost:",y=v+d,g=512,m=0,_=1,b=2e3,w=10,S=/^MSG\s+([^\s\r\n]+)\s+([^\s\r\n]+)\s+(([^\s\r\n]+)[^\S\r\n]+)?(\d+)\r\n/i,k=/^\+OK\s*\r\n/i,T=/^-ERR\s+('.+')?\r\n/i,E=/^PING\r\n/i,O=/^PONG\r\n/i,x=/^INFO\s+([^\r\n]+)\r\n/i,P=/^SUB\s+([^\r\n]+)\r\n/i,C="\r\n",M=C.length,A="",I=" ",j="SUB",B="UNSUB",R="CONNECT",D="PING"+C,U="PONG"+C,F="Subject must be supplied",L="Message can't be a function",N="Reply can't be a function",W="Connection closed",G="Message should be a JSON object",z="User and Token can not both be provided",H=65536;t.version=p;var q=t.createInbox=function(){return"_INBOX."+h.next()};t.connect=function(e){return new i(e)},l.inherits(i,f.EventEmitter),i.prototype.createInbox=q,i.prototype.assignOption=function(e,t,n){void 0===n&&(n=t),void 0!==e[t]&&(this.options[n]=e[t])},i.prototype.parseOptions=function(t){var n=this.options={verbose:!1,pedantic:!1,reconnect:!0,maxReconnectAttempts:w,reconnectTimeWait:b,encoding:"utf8",tls:!1,waitOnFirstConnect:!1};void 0===t?n.url=y:"number"==typeof t?n.url=v+t:"string"==typeof t?n.url=t:"object"==typeof t&&(void 0!==t.port&&(n.url=v+t.port),this.assignOption(t,"url"),this.assignOption(t,"uri","url"),this.assignOption(t,"user"),this.assignOption(t,"pass"),this.assignOption(t,"token"),this.assignOption(t,"password","pass"),this.assignOption(t,"verbose"),this.assignOption(t,"pedantic"),this.assignOption(t,"reconnect"),this.assignOption(t,"maxReconnectAttempts"),this.assignOption(t,"reconnectTimeWait"),this.assignOption(t,"servers"),this.assignOption(t,"urls","servers"),this.assignOption(t,"noRandomize"),this.assignOption(t,"NoRandomize","noRandomize"),this.assignOption(t,"dontRandomize","noRandomize"),this.assignOption(t,"encoding"),this.assignOption(t,"tls"),this.assignOption(t,"secure","tls"),this.assignOption(t,"name"),this.assignOption(t,"client","name"),this.assignOption(t,"yieldTime"),this.assignOption(t,"waitOnFirstConnect"),this.assignOption(t,"json"));var r=this;if(r.user=n.user,r.pass=n.pass,r.token=n.token,r.user&&r.token)throw new Error(z);if(!e.isEncoding(n.encoding))throw new Error("Invalid Encoding:"+n.encoding);r.encoding=n.encoding,r.servers=[],Array.isArray(n.servers)?n.servers.forEach(function(e){r.servers.push(new a(c.parse(e)))}):(void 0===n.url&&(n.url=y),r.servers.push(new a(c.parse(n.url)))),n.noRandomize!==!0&&o(r.servers)},i.prototype.selectServer=function(){var e=this,t=e.servers.shift();if(e.currentServer=t,e.url=t.url,"auth"in t.url&&t.url.auth){var n=t.url.auth.split(":");1!==n.length?(void 0===e.options.user&&(e.user=n[0]),void 0===e.options.pass&&(e.pass=n[1])):void 0===e.options.token&&(e.token=n[0])}e.servers.push(t)},i.prototype.checkTLSMismatch=function(){return this.info.tls_required===!0&&this.options.tls===!1?(this.emit("error","Server requires a secure connection."),this.closeStream(),!0):this.info.tls_required===!1&&this.options.tls!==!1?(this.emit("error","Server does not support a secure connection."),this.closeStream(),!0):this.info.tls_verify===!0&&void 0===this.options.tls.cert&&(this.emit("error","Server requires a client certificate."),this.closeStream(),!0)},i.prototype.connectCB=function(){var e=this.reconnecting,t=e===!0?"reconnect":"connect";this.reconnecting=!1,this.reconnects=0,this.wasConnected=!0,this.currentServer.didConnect=!0,this.emit(t,this),this.flushPending()},i.prototype.setupHandlers=function(){var t=this,n=t.stream;void 0!==n&&(n.on("connect",function(){t.connected=!0}),n.on("close",function(e){t.closeStream(),t.emit("disconnect"),t.closed===!0||t.options.reconnect===!1||t.reconnects>=t.options.maxReconnectAttempts&&t.options.maxReconnectAttempts!==-1?t.emit("close"):t.scheduleReconnect()}),n.on("error",function(e){t.wasConnected===!0&&t.currentServer.didConnect===!0||(t.wasConnected===!1&&t.currentServer.didConnect===!1&&(t.options.waitOnFirstConnect?t.currentServer.didConnect=!0:t.servers.splice(t.servers.length-1,1)),t.wasConnected===!1&&0===t.servers.length&&t.emit("error","Could not connect to server: "+e),t.closeStream())}),n.on("data",function(n){t.inbound?t.inbound=e.concat([t.inbound,n]):t.inbound=n,t.processInbound()}))},i.prototype.sendConnect=function(){var e={lang:"node",version:p,verbose:this.options.verbose,pedantic:this.options.pedantic};void 0!==this.user&&(e.user=this.user,e.pass=this.pass),void 0!==this.token&&(e.auth_token=this.token),void 0!==this.options.name&&(e.name=this.options.name),this.stream.write(R+I+JSON.stringify(e)+C)},i.prototype.createConnection=function(){var t=[],n=[],r=0,i=this;if(null!==i.pending){var o=0;i.pending.forEach(function(a){var s=e.isBuffer(a)?a.length:e.byteLength(a);if(a===D&&null!==i.pongs&&o3&&"P"==a[0]&&"U"==a[1]&&"B"==a[2]&&(n.push(a),r+=s)})}this.pongs=t,this.pending=n,this.pSize=r,this.pstate=m,this.info=null,this.infoReceived=!1,this.selectServer(),this.stream=s.createConnection(this.url),this.setupHandlers()},i.prototype.initState=function(){this.ssid=1,this.subs={},this.reconnects=0,this.connected=!1,this.wasConnected=!1,this.reconnecting=!1,this.server=null,this.pending=[]},i.prototype.close=function(){this.closed=!0,this.removeAllListeners(),this.closeStream(),this.ssid=-1,this.subs=null,this.pstate=-1,this.pongs=null,this.pending=null,this.pSize=0},i.prototype.closeStream=function(){null!==this.stream&&(this.stream.end(),this.stream.destroy(),this.stream=null),this.connected!==!0&&this.closed!==!0||(this.pongs=null,this.pending=null,this.pSize=0,this.connected=!1),this.inbound=null},i.prototype.flushPending=function(){if(this.connected!==!1&&null!==this.pending&&0!==this.pending.length&&this.infoReceived===!0){var t=this,n=function(e){return t.pending=[],t.pSize=0,t.stream.write(e)};if(this.pBufs){for(var r=!0,i=0;iH&&this.flushPending()},i.prototype.sendSubscriptions=function(){var e="";for(var t in this.subs)if(this.subs.hasOwnProperty(t)){var n,r=this.subs[t];n=r.qgroup?[j,r.subject,r.qgroup,t+C]:[j,r.subject,t+C],e+=n.join(I)}e.length>0&&this.stream.write(e)},i.prototype.processInbound=function(){var t,n,i=this;for(i.stream.resume(),void 0!==i.options.yieldTime&&(n=Date.now());!i.closed&&i.inbound&&i.inbound.length>0;){switch(i.pstate){case m:var o=i.inbound.toString("binary",0,g);if(null!==(t=S.exec(o)))i.payload={subj:t[1],sid:parseInt(t[2],10),reply:t[4],size:parseInt(t[5],10)},i.payload.psize=i.payload.size+M,i.pstate=_;else if(null!==(t=k.exec(o)));else if(null!==(t=T.exec(o)))i.emit("error",t[1]);else if(null!==(t=O.exec(o))){var a=i.pongs&&i.pongs.shift();a&&a()}else if(null!==(t=E.exec(o)))i.sendCommand(U);else{if(null===(t=x.exec(o)))return;if(i.info=JSON.parse(t[1]),i.checkTLSMismatch()===!0)return;if(i.infoReceived===!1){if(i.options.tls!==!1&&i.stream.encrypted!==!0){var s={socket:i.stream};if("object"==typeof i.options.tls)for(var c in i.options.tls)s[c]=i.options.tls[c];i.stream=u.connect(s,function(){i.flushPending()}),i.setupHandlers()}i.sendConnect(),i.sendSubscriptions(),i.pongs.unshift(function(){i.connectCB()}),i.stream.write(D),i.infoReceived=!0,i.stripPendingSubs(),i.flushPending()}}break;case _:if(i.inbound.lengthi.options.yieldTime)return i.stream.pause(),void r(i.processInbound.bind(this))}if(t&&!this.closed){var f=t[0].length;f>=i.inbound.length?i.inbound=null:i.inbound=i.inbound.slice(f)}t=null}},i.prototype.processMsg=function(){var t=this.subs[this.payload.sid];if(void 0!==t&&(t.received+=1,t.timeout&&t.received>=t.expected&&(clearTimeout(t.timeout),t.timeout=null),void 0!==t.max&&(t.received===t.max?(delete this.subs[this.payload.sid],this.emit("unsubscribe",this.payload.sid,t.subject)):t.received>t.max&&(this.unsubscribe(this.payload.sid),t.callback=null)),t.callback)){var n=this.payload.msg;if(this.options.json)try{n=JSON.parse(new e(this.payload.msg,this.options.encoding).toString())}catch(r){n=r}t.callback(n,this.payload.reply,this.payload.subj,this.payload.sid)}},i.prototype.addServer=function(e){this.servers.push(new a(c.parse(e))),this.options.noRandomize!==!0&&o(this.servers)},i.prototype.flush=function(e){if(this.closed){if("function"==typeof e)return void e(new Error(W));throw new Error(W)}this.pongs&&(this.pongs.push(e),this.sendCommand(D),this.flushPending())},i.prototype.publish=function(t,n,r,i){if("function"==typeof t&&(i=t,t=void 0),n||(n=A),!t){if(!i)throw new Error(F);i(new Error(F))}if("function"==typeof n){if(i||r)return void i(new Error(L));i=n,n=A,r=void 0}if("function"==typeof r){if(i)return void i(new Error(N));i=r,r=void 0}var o;if(o=void 0===r?"PUB "+t+I:"PUB "+t+I+r+I,"ArrayBuffer"in window&&ArrayBuffer.isView(n)&&(n=e.from(n)),e.isBuffer(n)){var a=new e(o.length+n.length+2*M+n.length.toString().length),s=a.write(o+n.length+C);n.copy(a,s),a.write(C,s+n.length),this.sendCommand(a)}else{var u=n;if(this.options.json){if("object"!=typeof n||Array.isArray(n))throw new Error(G);try{u=JSON.stringify(n)}catch(c){throw new Error(G)}}this.sendCommand(o+e.byteLength(u)+C+u+C)}if(void 0!==i)this.flush(i);else if(this.closed)throw new Error(W)},i.prototype.subscribe=function(e,t,n){if(this.closed)throw new Error(W);var r,i;"function"==typeof t?(n=t,t=void 0):t&&"object"==typeof t&&(r=t.queue,i=t.max),this.ssid+=1,this.subs[this.ssid]={subject:e,callback:n,received:0};var o;return"string"==typeof r?(this.subs[this.ssid].qgroup=r,o=[j,e,r,this.ssid+C]):o=[j,e,this.ssid+C],this.sendCommand(o.join(I)),this.emit("subscribe",this.ssid,e,t),i&&this.unsubscribe(this.ssid,i),this.ssid},i.prototype.unsubscribe=function(e,t){if(e&&!this.closed){var n;n=t?[B,e,t+C]:[B,e+C],this.sendCommand(n.join(I));var r=this.subs[e];void 0!==r&&(r.max=t,(void 0===r.max||r.received>=r.max)&&(delete this.subs[e],this.emit("unsubscribe",e,r.subject)))}},i.prototype.timeout=function(e,t,n,r){if(e){var i=this.subs[e];null!==i&&(i.expected=n,i.timeout=setTimeout(function(){r(e)},t))}},i.prototype.request=function(e,t,n,r){"function"==typeof t&&(r=t,t=A,n=null),"function"==typeof n&&(r=n,n=null);var i=q(),o=this.subscribe(i,n,function(e,t){r(e,t)});return this.publish(e,t,i),o},i.prototype.numSubscriptions=function(){return Object.keys(this.subs).length},i.prototype.reconnect=function(){this.closed||(this.reconnects+=1,this.createConnection(),this.currentServer.didConnect===!0&&this.emit("reconnecting"))},i.prototype.scheduleReconnect=function(){var e=this;if(0!==e.servers.length){e.wasConnected===!0&&(e.reconnecting=!0);var t=0;e.servers[0].didConnect===!0&&(t=this.options.reconnectTimeWait),setTimeout(function(){e.reconnect()},t)}}}).call(t,n(5).Buffer,n(44).setImmediate)},function(e,t,n){(function(e){"use strict";function r(t){var n=this;o.call(this);return;this.sock=new WebSocket(t),this.sock.addEventListener("open",function(e){n.emit("connect")}),this.sock.addEventListener("message",function(t){n.emit("data",new e(t.data))}),this.sock.addEventListener("error",function(e){n.emit("error",e)}),this.sock.addEventListener("close",function(e){n.emit("close")})}var i=n(15),o=n(32).EventEmitter;i.inherits(r,o),r.prototype.end=function(){this.destroy()},r.prototype.destroy=function(){this.sock.readyState!==WebSocket.CONNECTING&&this.sock.readyState!==WebSocket.OPEN||this.sock.close()},r.prototype.write=function(e){this.sock.readyState===WebSocket.OPEN&&this.sock.send(e)},r.prototype.pause=function(){console.warn("WebSocketProxy stream pause/resume is not supported yet.")},r.prototype.resume=function(){},t.createConnection=function(e){return new r(e.format({protocol:e.protocol,slashes:e.slashes,host:e.host,hostname:e.hostname,port:e.port,pathname:e.pathname,search:e.search,path:e.path,query:e.query,hash:e.hash}))}}).call(t,n(5).Buffer)},function(e,t){t.connect=function(e,t){throw"TLS is not supported in the browser. Use WSS instead."}},function(e,t,n){"use strict";function r(){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 i(e,t,n){if(e&&c.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return c.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=n(72),c=n(74);t.parse=i,t.resolve=a,t.resolveObject=s,t.format=o,t.Url=r;var l=/^([a-z0-9.+-]+:)/i,f=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(p),v=["'"].concat(d),y=["%","/","?",";","#"].concat(v),g=["/","?","#"],m=255,_=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},k={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},T=n(75);r.prototype.parse=function(e,t,n){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r127?"x":B[D];if(!R.match(_)){var F=I.slice(0,x),L=I.slice(x+1),N=B.match(b);N&&(F.push(N[1]),L.unshift(N[2])),L.length&&(s="/"+L.join(".")+s),this.hostname=F.join(".");break}}}this.hostname.length>m?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=u.toASCII(this.hostname));var W=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+W,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!w[d])for(var x=0,j=v.length;x0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return n.search=e.search,n.query=e.query,c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var O=w.slice(-1)[0],x=(n.host||e.host||w.length>1)&&("."===O||".."===O)||""===O,P=0,C=w.length;C>=0;C--)O=w[C],"."===O?w.splice(C,1):".."===O?(w.splice(C,1),P++):P&&(w.splice(C,1),P--);if(!_&&!b)for(;P--;P)w.unshift("..");!_||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),x&&"/"!==w.join("/").substr(-1)&&w.push("");var M=""===w[0]||w[0]&&"/"===w[0].charAt(0);if(T){n.hostname=n.host=M?"":w.length?w.shift():"";var E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return _=_||n.host&&w.length,_&&!M&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),c.isNull(n.pathname)&&c.isNull(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},r.prototype.parseHost=function(){var e=this.host,t=f.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,n){var r;(function(e,i){!function(o){function a(e){throw RangeError(I[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function u(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(A,".");var i=e.split("."),o=s(i,t).join(".");return r+o}function c(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=R(e>>>10&1023|55296),e=56320|1023&e),t+=R(e)}).join("")}function f(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:w}function h(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function p(e,t,n){var r=0;for(e=n?B(e/E):e>>1,e+=B(e/t);e>j*k>>1;r+=w)e=B(e/j);return B(r+(j+1)*e/(e+T))}function d(e){var t,n,r,i,o,s,u,c,h,d,v=[],y=e.length,g=0,m=x,_=O;for(n=e.lastIndexOf(P),n<0&&(n=0),r=0;r=128&&a("not-basic"),v.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=y&&a("invalid-input"),c=f(e.charCodeAt(i++)),(c>=w||c>B((b-g)/s))&&a("overflow"),g+=c*s,h=u<=_?S:u>=_+k?k:u-_,!(cB(b/d)&&a("overflow"),s*=d;t=v.length+1,_=p(g-o,t,0==o),B(g/t)>b-m&&a("overflow"),m+=B(g/t),g%=t,v.splice(g++,0,m)}return l(v)}function v(e){var t,n,r,i,o,s,u,l,f,d,v,y,g,m,_,T=[];for(e=c(e),y=e.length,t=x,n=0,o=O,s=0;s=t&&vB((b-n)/g)&&a("overflow"),n+=(u-t)*g,t=u,s=0;sb&&a("overflow"),v==t){for(l=n,f=w;d=f<=o?S:f>=o+k?k:f-o,!(l= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=w-S,B=Math.floor,R=String.fromCharCode;_={version:"1.3.2",ucs2:{decode:c,encode:l},decode:d,encode:v,toASCII:g,toUnicode:y},r=function(){return _}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(73)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(76),t.encode=t.stringify=n(77)},function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var c=0;c=0?(l=d.substr(0,v),f=d.substr(v+1)):(l=d,f=""),h=decodeURIComponent(l),p=decodeURIComponent(f),n(o,h)?Array.isArray(o[h])?o[h].push(p):o[h]=[o[h],p]:o[h]=p}return o}},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,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(n(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},function(e,t,n){e.exports=n(79)},function(e,t,n){(function(e){/*! * Nats * Copyright(c) 2016 Apcera Inc. All rights reserved. * MIT Licensed */ "use strict";function r(){this.buf=new e(p),this.init()}var i=n(4),o="0.6.8",a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",s=36,u=12,c=10,l=0xcfd41b9100000,f=33,h=333,p=u+c;t.version=o,r.prototype.init=function(){this.setPre(),this.initSeqAndInc(),this.fillSeq()},r.prototype.initSeqAndInc=function(){this.seq=Math.floor(Math.random()*l),this.inc=Math.floor(Math.random()*(h-f)+f)},r.prototype.setPre=function(){for(var e=i.randomBytes(u),t=0;t=u;t--)this.buf[t]=a.charCodeAt(e%s),e=Math.floor(e/s)},r.prototype.next=function(){return this.seq+=this.inc,this.seq>l&&this.setPre(),this.initSeqAndInc(),this.fillSeq(),this.buf.toString("ascii")};var d=new r;t.reset=function(){d.init()},t.next=function(){return d.next()},t._global=d}).call(t,n(5).Buffer)},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=(n(1),n(2),function(){function e(e,t){for(var n=0;n1)))/4)-P((e-1901+t)/100)+P((e-1601+t)/400)};if((d=g.hasOwnProperty)||(d=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=m?d=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,d=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,d.call(this,e)}),v=function(e,t){var n,r,i,o=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(i in r)d.call(r,i)&&o++;return n=r=null,o?v=2==o?function(e,t){var n,r={},i=m.call(e)==w;for(n in e)i&&"prototype"==n||d.call(r,n)||!(r[n]=1)||!d.call(e,n)||t(n)}:function(e,t){var n,r,i=m.call(e)==w;for(n in e)i&&"prototype"==n||!d.call(e,n)||(r="constructor"===n)||t(n);(r||d.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(e,t){var n,i,o=m.call(e)==w,a=!o&&"function"!=typeof e.constructor&&s[typeof e.hasOwnProperty]&&e.hasOwnProperty||d;for(n in e)o&&"prototype"==n||!a.call(e,n)||t(n);for(i=r.length;n=r[--i];a.call(e,n)&&t(n));}),v(e,t)},!n("json-stringify")){var A={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},I="000000",j=function(e,t){return(I+(t||0)).slice(-e)},B="\\u00",R=function(e){for(var t='"',n=0,r=e.length,i=!x||r>10,o=i&&(x?e.split(""):e);n-1/0&&s<1/0){if(M){for(h=P(s/864e5),c=P(h/365.2425)+1970-1;M(c+1,0)<=h;c++);for(l=P((h-M(c,0))/30.42);M(c,l+1)<=h;l++);h=1+h-M(c,l),p=(s%864e5+864e5)%864e5,g=P(p/36e5)%24,_=P(p/6e4)%60,b=P(p/1e3)%60,w=p%1e3}else c=s.getUTCFullYear(),l=s.getUTCMonth(),h=s.getUTCDate(),g=s.getUTCHours(),_=s.getUTCMinutes(),b=s.getUTCSeconds(),w=s.getUTCMilliseconds();s=(c<=0||c>=1e4?(c<0?"-":"+")+j(6,c<0?-c:c):j(4,c))+"-"+j(2,l+1)+"-"+j(2,h)+"T"+j(2,g)+":"+j(2,_)+":"+j(2,b)+"."+j(3,w)+"Z"}else s=null;if(n&&(s=n.call(t,e,s)),null===s)return"null";if(u=m.call(s),u==O)return""+s;if(u==k)return s>-1/0&&s<1/0?""+s:"null";if(u==T)return R(""+s);if("object"==typeof s){for(I=a.length;I--;)if(a[I]===s)throw f();if(a.push(s),x=[],B=o,o+=i,u==E){for(A=0,I=s.length;A0)for(r="",n>10&&(n=10);r.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||W();e+=L("0x"+o.slice(t,U));break;default:W()}else{if(34==i)break;for(i=o.charCodeAt(U),t=U;i>=32&&92!=i&&34!=i;)i=o.charCodeAt(++U);e+=o.slice(t,U)}if(34==o.charCodeAt(U))return U++,e;W();default:if(t=U,45==i&&(r=!0,i=o.charCodeAt(++U)),i>=48&&i<=57){for(48==i&&(i=o.charCodeAt(U+1),i>=48&&i<=57)&&W(),r=!1;U=48&&i<=57);U++);if(46==o.charCodeAt(U)){for(n=++U;n=48&&i<=57);n++);n==U&&W(),U=n}if(i=o.charCodeAt(U),101==i||69==i){for(i=o.charCodeAt(++U),43!=i&&45!=i||U++,n=U;n=48&&i<=57);n++);n==U&&W(),U=n}return+o.slice(t,U)}if(r&&W(),"true"==o.slice(U,U+4))return U+=4,!0;if("false"==o.slice(U,U+5))return U+=5,!1;if("null"==o.slice(U,U+4))return U+=4,null;W()}return"$"},z=function(e){var t,n;if("$"==e&&W(),"string"==typeof e){if("@"==(x?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=G(),"]"!=e;n||(n=!0))n&&(","==e?(e=G(),"]"==e&&W()):W()),","==e&&W(),t.push(z(e));return t}if("{"==e){for(t={};e=G(),"}"!=e;n||(n=!0))n&&(","==e?(e=G(),"}"==e&&W()):W()),","!=e&&"string"==typeof e&&"@"==(x?e.charAt(0):e[0])&&":"==G()||W(),t[e.slice(1)]=z(G());return t}W()}return e},H=function(e,t,n){var r=q(e,t,n);r===y?delete e[t]:e[t]=r},q=function(e,t,n){var r,i=e[t];if("object"==typeof i&&i)if(m.call(i)==E)for(r=i.length;r--;)H(i,r,n);else v(i,function(e){H(i,e,n)});return n.call(e,t,i)};t.parse=function(e,t){var n,r;return U=0,F=""+e,n=z(G()),"$"!=G()&&W(),U=F=null,t&&m.call(t)==w?q((r={},r[""]=n,r),"",t):n}}}return t.runInContext=o,t}var a=n(82),s={"function":!0,object:!0},u=s[typeof t]&&t&&!t.nodeType&&t,c=s[typeof window]&&window||this,l=u&&s[typeof e]&&e&&!e.nodeType&&"object"==typeof i&&i;if(!l||l.global!==l&&l.window!==l&&l.self!==l||(c=l),u&&!a)o(c,u);else{var f=c.JSON,h=c.JSON3,p=!1,d=o(c,c.JSON3={noConflict:function(){return p||(p=!0,c.JSON=f,c.JSON3=h,f=h=null),d}});c.JSON={parse:d.parse,stringify:d.stringify}}a&&(r=function(){return d}.call(t,n,t,e),!(void 0!==r&&(e.exports=r)))}).call(this)}).call(t,n(73)(e),function(){return this}())},function(e,t){(function(t){e.exports=t}).call(t,{})}]),e.exports=messager}).call(t,n(141).setImmediate,n(141).clearImmediate)},function(e,t,n){(function(e,r){function i(e,t){this._id=e,this._clearFn=t}var o=n(142).nextTick,a=Function.prototype.apply,s=Array.prototype.slice,u={},c=0;t.setTimeout=function(){return new i(a.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new i(a.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},t.setImmediate="function"==typeof e?e:function(e){var n=c++,r=!(arguments.length<2)&&s.call(arguments,1);return u[n]=!0,o(function(){u[n]&&(r?e.apply(null,r):e.call(null),t.clearImmediate(n))}),n},t.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(t,n(141).setImmediate,n(141).clearImmediate)},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){v&&p&&(v=!1,p.length?d=p.concat(d):y=-1,d.length&&s())}function s(){if(!v){var e=i(a);v=!0;for(var t=d.length;t;){for(p=d,d=[];++y1)for(var n=1;n