var Hl=Object.getOwnPropertySymbols;var mh=Object.prototype.hasOwnProperty,ph=Object.prototype.propertyIsEnumerable;var Vl=(ae,Je)=>{var ue={};for(var fe in ae)mh.call(ae,fe)&&Je.indexOf(fe)<0&&(ue[fe]=ae[fe]);if(ae!=null&&Hl)for(var fe of Hl(ae))Je.indexOf(fe)<0&&ph.call(ae,fe)&&(ue[fe]=ae[fe]);return ue};var Wl=(ae,Je,ue)=>new Promise((fe,St)=>{var dt=ut=>{try{gn(ue.next(ut))}catch(Mt){St(Mt)}},je=ut=>{try{gn(ue.throw(ut))}catch(Mt){St(Mt)}},gn=ut=>ut.done?fe(ut.value):Promise.resolve(ut.value).then(dt,je);gn((ue=ue.apply(ae,Je)).next())});import{r as fh,n as hh}from"./index-bb11a8b6-1784378651390.js";var Ar=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function gh(ae){return ae&&ae.__esModule&&Object.prototype.hasOwnProperty.call(ae,"default")?ae.default:ae}function Dr(ae){throw new Error('Could not dynamically require "'+ae+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Mr={exports:{}};Mr.exports;(function(ae,Je){function ue(f){"@babel/helpers - typeof";return ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},ue(f)}function fe(f,u){if(!(f instanceof u))throw new TypeError("Cannot call a class as a function")}function St(f,u){for(var n=0;n>>1,ce=[["ary",A],["bind",w],["bindKey",z],["curry",d],["curryRight",m],["flip",H],["partial",g],["partialRight",k],["rearg",O]],he="[object Arguments]",Re="[object Array]",we="[object AsyncFunction]",ke="[object Boolean]",We="[object Date]",yn="[object DOMException]",Yt="[object Error]",It="[object Function]",Ht="[object GeneratorFunction]",Ge="[object Map]",Ct="[object Number]",kt="[object Null]",Oe="[object Object]",rt="[object Promise]",Ae="[object Proxy]",ye="[object RegExp]",De="[object Set]",Xe="[object String]",P="[object Symbol]",M="[object Undefined]",F="[object WeakMap]",j="[object WeakSet]",I="[object ArrayBuffer]",V="[object DataView]",L="[object Float32Array]",J="[object Float64Array]",q="[object Int8Array]",de="[object Int16Array]",ee="[object Int32Array]",se="[object Uint8Array]",Qe="[object Uint8ClampedArray]",mt="[object Uint16Array]",Ie="[object Uint32Array]",ht=/\b__p \+= '';/g,Be=/\b(__p \+=) '' \+/g,tt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xt=/&(?:amp|lt|gt|quot|#39);/g,Vt=/[&<>"']/g,Ue=RegExp(Xt.source),st=RegExp(Vt.source),Nn=/<%-([\s\S]+?)%>/g,Ti=/<%([\s\S]+?)%>/g,Si=/<%=([\s\S]+?)%>/g,ji=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Li=/^\w*$/,yt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pt=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(pt.source),cn=/^\s+/,Tn=/\s/,ni=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Oi=/\{\n\/\* \[wrapped with (.+)\] \*/,Ui=/,? & /,Hi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ii=/[()=,{}\[\]\/\s]/,un=/\\(\\)?/g,$s=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ga=/\w*$/,Ys=/^[-+]0x[0-9a-f]+$/i,Xs=/^0b[01]+$/i,Qs=/^\[object .+?Constructor\]$/,e0=/^0o[0-7]+$/i,t0=/^(?:0|[1-9]\d*)$/,n0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Vi=/($^)/,i0=/['\n\r\u2028\u2029\\]/g,Wi="\\ud800-\\udfff",r0="\\u0300-\\u036f",o0="\\ufe20-\\ufe2f",a0="\\u20d0-\\u20ff",va=r0+o0+a0,ya="\\u2700-\\u27bf",Ta="a-z\\xdf-\\xf6\\xf8-\\xff",d0="\\xac\\xb1\\xd7\\xf7",l0="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",s0="\\u2000-\\u206f",c0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Sa="A-Z\\xc0-\\xd6\\xd8-\\xde",Ca="\\ufe0e\\ufe0f",ba=d0+l0+s0+c0,jr="['’]",u0="["+Wi+"]",Pa="["+ba+"]",Gi="["+va+"]",wa="\\d+",m0="["+ya+"]",Ea="["+Ta+"]",Ia="[^"+Wi+ba+wa+ya+Ta+Sa+"]",Lr="\\ud83c[\\udffb-\\udfff]",p0="(?:"+Gi+"|"+Lr+")",xa="[^"+Wi+"]",Or="(?:\\ud83c[\\udde6-\\uddff]){2}",Ur="[\\ud800-\\udbff][\\udc00-\\udfff]",ri="["+Sa+"]",_a="\\u200d",Ra="(?:"+Ea+"|"+Ia+")",f0="(?:"+ri+"|"+Ia+")",ka="(?:"+jr+"(?:d|ll|m|re|s|t|ve))?",Aa="(?:"+jr+"(?:D|LL|M|RE|S|T|VE))?",Da=p0+"?",Ma="["+Ca+"]?",h0="(?:"+_a+"(?:"+[xa,Or,Ur].join("|")+")"+Ma+Da+")*",g0="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",v0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Na=Ma+Da+h0,y0="(?:"+[m0,Or,Ur].join("|")+")"+Na,T0="(?:"+[xa+Gi+"?",Gi,Or,Ur,u0].join("|")+")",S0=RegExp(jr,"g"),C0=RegExp(Gi,"g"),Hr=RegExp(Lr+"(?="+Lr+")|"+T0+Na,"g"),b0=RegExp([ri+"?"+Ea+"+"+ka+"(?="+[Pa,ri,"$"].join("|")+")",f0+"+"+Aa+"(?="+[Pa,ri+Ra,"$"].join("|")+")",ri+"?"+Ra+"+"+ka,ri+"+"+Aa,v0,g0,wa,y0].join("|"),"g"),P0=RegExp("["+_a+Wi+va+Ca+"]"),w0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,E0=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],I0=-1,ft={};ft[L]=ft[J]=ft[q]=ft[de]=ft[ee]=ft[se]=ft[Qe]=ft[mt]=ft[Ie]=!0,ft[he]=ft[Re]=ft[I]=ft[ke]=ft[V]=ft[We]=ft[Yt]=ft[It]=ft[Ge]=ft[Ct]=ft[Oe]=ft[ye]=ft[De]=ft[Xe]=ft[F]=!1;var ct={};ct[he]=ct[Re]=ct[I]=ct[V]=ct[ke]=ct[We]=ct[L]=ct[J]=ct[q]=ct[de]=ct[ee]=ct[Ge]=ct[Ct]=ct[Oe]=ct[ye]=ct[De]=ct[Xe]=ct[P]=ct[se]=ct[Qe]=ct[mt]=ct[Ie]=!0,ct[Yt]=ct[It]=ct[F]=!1;var x0={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},_0={"&":"&","<":"<",">":">",'"':""","'":"'"},R0={"&":"&","<":"<",">":">",""":'"',"'":"'"},k0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},A0=parseFloat,D0=parseInt,Fa=typeof Zn=="object"&&Zn&&Zn.Object===Object&&Zn,M0=typeof self=="object"&&self&&self.Object===Object&&self,_t=Fa||M0||Function("return this")(),Vr=u&&!u.nodeType&&u,Jn=Vr&&!0&&f&&!f.nodeType&&f,Ba=Jn&&Jn.exports===Vr,Wr=Ba&&Fa.process,Qt=function(){try{var W=Jn&&Jn.require&&Jn.require("util").types;return W||Wr&&Wr.binding&&Wr.binding("util")}catch(ie){}}(),za=Qt&&Qt.isArrayBuffer,ja=Qt&&Qt.isDate,La=Qt&&Qt.isMap,Oa=Qt&&Qt.isRegExp,Ua=Qt&&Qt.isSet,Ha=Qt&&Qt.isTypedArray;function Gt(W,ie,Q){switch(Q.length){case 0:return W.call(ie);case 1:return W.call(ie,Q[0]);case 2:return W.call(ie,Q[0],Q[1]);case 3:return W.call(ie,Q[0],Q[1],Q[2])}return W.apply(ie,Q)}function N0(W,ie,Q,Te){for(var Ne=-1,nt=W==null?0:W.length;++Ne-1}function Gr(W,ie,Q){for(var Te=-1,Ne=W==null?0:W.length;++Te-1;);return Q}function $a(W,ie){for(var Q=W.length;Q--&&oi(ie,W[Q],0)>-1;);return Q}function V0(W,ie){for(var Q=W.length,Te=0;Q--;)W[Q]===ie&&++Te;return Te}var W0=qr(x0),G0=qr(_0);function Z0(W){return"\\"+k0[W]}function J0(W,ie){return W==null?n:W[ie]}function ai(W){return P0.test(W)}function K0(W){return w0.test(W)}function q0(W){for(var ie,Q=[];!(ie=W.next()).done;)Q.push(ie.value);return Q}function Qr(W){var ie=-1,Q=Array(W.size);return W.forEach(function(Te,Ne){Q[++ie]=[Ne,Te]}),Q}function Ya(W,ie){return function(Q){return W(ie(Q))}}function zn(W,ie){for(var Q=-1,Te=W.length,Ne=0,nt=[];++Q-1}function Bc(e,t){var o=this.__data__,c=sr(o,e);return c<0?(++this.size,o.push([e,t])):o[c][1]=t,this}En.prototype.clear=Dc,En.prototype.delete=Mc,En.prototype.get=Nc,En.prototype.has=Fc,En.prototype.set=Bc;function In(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t=t?e:t)),e}function rn(e,t,o,c,v,R){var B,U=t&y,G=t&h,re=t&D;if(o&&(B=v?o(e,c,v,R):o(e)),B!==n)return B;if(!vt(e))return e;var oe=Fe(e);if(oe){if(B=Ou(e),!U)return zt(e,B)}else{var le=Dt(e),pe=le==It||le==Ht;if(Vn(e))return Md(e,U);if(le==Oe||le==he||pe&&!v){if(B=G||pe?{}:Xd(e),!U)return G?Ru(e,Xc(B,e)):_u(e,sd(B,e))}else{if(!ct[le])return v?e:{};B=Uu(e,le,U)}}R||(R=new pn);var Se=R.get(e);if(Se)return Se;R.set(e,B),xl(e)?e.forEach(function(_e){B.add(rn(_e,t,o,_e,e,R))}):El(e)&&e.forEach(function(_e,Ve){B.set(Ve,rn(_e,t,o,Ve,e,R))});var xe=re?G?Io:Eo:G?Lt:xt,Le=oe?n:xe(e);return en(Le||e,function(_e,Ve){Le&&(Ve=_e,_e=e[Ve]),xi(B,Ve,rn(_e,t,o,Ve,e,R))}),B}function Qc(e){var t=xt(e);return function(o){return cd(o,e,t)}}function cd(e,t,o){var c=o.length;if(e==null)return!c;for(e=at(e);c--;){var v=o[c],R=t[v],B=e[v];if(B===n&&!(v in e)||!R(B))return!1}return!0}function ud(e,t,o){if(typeof e!="function")throw new tn(l);return Ni(function(){e.apply(n,o)},t)}function _i(e,t,o,c){var v=-1,R=Zi,B=!0,U=e.length,G=[],re=t.length;if(!U)return G;o&&(t=gt(t,Zt(o))),c?(R=Gr,B=!1):t.length>=r&&(R=Ci,B=!1,t=new $n(t));e:for(;++vv?0:v+o),c=c===n||c>v?v:ze(c),c<0&&(c+=v),c=o>c?0:Rl(c);o0&&o(U)?t>1?Rt(U,t-1,o,c,v):Bn(v,U):c||(v[v.length]=U)}return v}var ao=Ld(),fd=Ld(!0);function Sn(e,t){return e&&ao(e,t,xt)}function lo(e,t){return e&&fd(e,t,xt)}function ur(e,t){return Fn(t,function(o){return An(e[o])})}function Xn(e,t){t=Un(t,e);for(var o=0,c=t.length;e!=null&&ot}function nu(e,t){return e!=null&&ot.call(e,t)}function iu(e,t){return e!=null&&t in at(e)}function ru(e,t,o){return e>=At(t,o)&&e=120&&oe.length>=120)?new $n(B&&oe):n}oe=e[0];var le=-1,pe=U[0];e:for(;++le-1;)U!==e&&nr.call(U,G,1),nr.call(e,G,1);return e}function Ed(e,t){for(var o=e?t.length:0,c=o-1;o--;){var v=t[o];if(o==c||v!==R){var R=v;kn(v)?nr.call(e,v,1):yo(e,v)}}return e}function ho(e,t){return e+or(od()*(t-e+1))}function vu(e,t,o,c){for(var v=-1,R=Et(rr((t-e)/(o||1)),0),B=Q(R);R--;)B[c?R:++v]=e,e+=o;return B}function go(e,t){var o="";if(!e||t<1||t>be)return o;do t%2&&(o+=e),t=or(t/2),t&&(e+=e);while(t);return o}function He(e,t){return Mo(tl(e,t,Ot),e+"")}function yu(e){return ld(vi(e))}function Tu(e,t){var o=vi(e);return br(o,Yn(t,0,o.length))}function Ai(e,t,o,c){if(!vt(e))return e;t=Un(t,e);for(var v=-1,R=t.length,B=R-1,U=e;U!=null&&++vv?0:v+t),o=o>v?v:o,o<0&&(o+=v),v=t>o?0:o-t>>>0,t>>>=0;for(var R=Q(v);++c>>1,B=e[R];B!==null&&!Kt(B)&&(o?B<=t:B=r){var re=t?null:Mu(e);if(re)return Ki(re);B=!1,v=Ci,G=new $n}else G=t?[]:U;e:for(;++c=c?e:on(e,t,o)}var Dd=cc||function(e){return _t.clearTimeout(e)};function Md(e,t){if(t)return e.slice();var o=e.length,c=ed?ed(o):new e.constructor(o);return e.copy(c),c}function bo(e){var t=new e.constructor(e.byteLength);return new er(t).set(new er(e)),t}function wu(e,t){var o=t?bo(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function Eu(e){var t=new e.constructor(e.source,ga.exec(e));return t.lastIndex=e.lastIndex,t}function Iu(e){return Ii?at(Ii.call(e)):{}}function Nd(e,t){var o=t?bo(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function Fd(e,t){if(e!==t){var o=e!==n,c=e===null,v=e===e,R=Kt(e),B=t!==n,U=t===null,G=t===t,re=Kt(t);if(!U&&!re&&!R&&e>t||R&&B&&G&&!U&&!re||c&&B&&G||!o&&G||!v)return 1;if(!c&&!R&&!re&&e=U)return G;var re=o[c];return G*(re=="desc"?-1:1)}}return e.index-t.index}function Bd(e,t,o,c){for(var v=-1,R=e.length,B=o.length,U=-1,G=t.length,re=Et(R-B,0),oe=Q(G+re),le=!c;++U1?o[v-1]:n,B=v>2?o[2]:n;for(R=e.length>3&&typeof R=="function"?(v--,R):n,B&&Ft(o[0],o[1],B)&&(R=v<3?n:R,v=1),t=at(t);++c-1?v[R?t[B]:B]:n}}function Hd(e){return Rn(function(t){var o=t.length,c=o,v=nn.prototype.thru;for(e&&t.reverse();c--;){var R=t[c];if(typeof R!="function")throw new tn(l);if(v&&!B&&Sr(R)=="wrapper")var B=new nn([],!0)}for(c=B?c:o;++c1&&$e.reverse(),oe&&GU))return!1;var re=R.get(e),oe=R.get(t);if(re&&oe)return re==t&&oe==e;var le=-1,pe=!0,Se=o&E?new $n:n;for(R.set(e,t),R.set(t,e);++le1?"& ":"")+t[c],t=t.join(o>2?", ":" "),e.replace(ni,`{ /* [wrapped with `+t+`] */ `)}function Vu(e){return Fe(e)||ti(e)||!!(id&&e&&e[id])}function kn(e,t){var o=typeof e;return t=t==null?be:t,!!t&&(o=="number"||o!="symbol"&&t0.test(e))&&e>-1&&e%1==0&&e0){if(++t>=ne)return arguments[0]}else t=0;return e.apply(n,arguments)}}function br(e,t){var o=-1,c=e.length,v=c-1;for(t=t===n?c:t;++o1?e[t-1]:n;return o=typeof o=="function"?(e.pop(),o):n,pl(e,o)});function fl(e){var t=x(e);return t.__chain__=!0,t}function ep(e,t){return t(e),e}function Pr(e,t){return t(e)}var tp=Rn(function(e){var t=e.length,o=t?e[0]:0,c=this.__wrapped__,v=function(R){return oo(R,e)};return t>1||this.__actions__.length||!(c instanceof Ze)||!kn(o)?this.thru(v):(c=c.slice(o,+o+(t?1:0)),c.__actions__.push({func:Pr,args:[v],thisArg:n}),new nn(c,this.__chain__).thru(function(R){return t&&!R.length&&R.push(n),R}))});function np(){return fl(this)}function ip(){return new nn(this.value(),this.__chain__)}function rp(){this.__values__===n&&(this.__values__=_l(this.value()));var e=this.__index__>=this.__values__.length,t=e?n:this.__values__[this.__index__++];return{done:e,value:t}}function op(){return this}function ap(e){for(var t,o=this;o instanceof lr;){var c=dl(o);c.__index__=0,c.__values__=n,t?v.__wrapped__=c:t=c;var v=c;o=o.__wrapped__}return v.__wrapped__=e,t}function dp(){var e=this.__wrapped__;if(e instanceof Ze){var t=e;return this.__actions__.length&&(t=new Ze(this)),t=t.reverse(),t.__actions__.push({func:Pr,args:[No],thisArg:n}),new nn(t,this.__chain__)}return this.thru(No)}function lp(){return kd(this.__wrapped__,this.__actions__)}var sp=hr(function(e,t,o){ot.call(e,o)?++e[o]:xn(e,o,1)});function cp(e,t,o){var c=Fe(e)?Va:eu;return o&&Ft(e,t,o)&&(t=n),c(e,Ee(t,3))}function up(e,t){var o=Fe(e)?Fn:pd;return o(e,Ee(t,3))}var mp=Ud(ll),pp=Ud(sl);function fp(e,t){return Rt(wr(e,t),1)}function hp(e,t){return Rt(wr(e,t),Ce)}function gp(e,t,o){return o=o===n?1:ze(o),Rt(wr(e,t),o)}function hl(e,t){var o=Fe(e)?en:Ln;return o(e,Ee(t,3))}function gl(e,t){var o=Fe(e)?F0:md;return o(e,Ee(t,3))}var vp=hr(function(e,t,o){ot.call(e,o)?e[o].push(t):xn(e,o,[t])});function yp(e,t,o,c){e=jt(e)?e:vi(e),o=o&&!c?ze(o):0;var v=e.length;return o<0&&(o=Et(v+o,0)),Rr(e)?o<=v&&e.indexOf(t,o)>-1:!!v&&oi(e,t,o)>-1}var Tp=He(function(e,t,o){var c=-1,v=typeof t=="function",R=jt(e)?Q(e.length):[];return Ln(e,function(B){R[++c]=v?Gt(t,B,o):Ri(B,t,o)}),R}),Sp=hr(function(e,t,o){xn(e,o,t)});function wr(e,t){var o=Fe(e)?gt:Td;return o(e,Ee(t,3))}function Cp(e,t,o,c){return e==null?[]:(Fe(t)||(t=t==null?[]:[t]),o=c?n:o,Fe(o)||(o=o==null?[]:[o]),Pd(e,t,o))}var bp=hr(function(e,t,o){e[o?0:1].push(t)},function(){return[[],[]]});function Pp(e,t,o){var c=Fe(e)?Zr:Ja,v=arguments.length<3;return c(e,Ee(t,4),o,v,Ln)}function wp(e,t,o){var c=Fe(e)?B0:Ja,v=arguments.length<3;return c(e,Ee(t,4),o,v,md)}function Ep(e,t){var o=Fe(e)?Fn:pd;return o(e,xr(Ee(t,3)))}function Ip(e){var t=Fe(e)?ld:yu;return t(e)}function xp(e,t,o){(o?Ft(e,t,o):t===n)?t=1:t=ze(t);var c=Fe(e)?qc:Tu;return c(e,t)}function _p(e){var t=Fe(e)?$c:Cu;return t(e)}function Rp(e){if(e==null)return 0;if(jt(e))return Rr(e)?di(e):e.length;var t=Dt(e);return t==Ge||t==De?e.size:mo(e).length}function kp(e,t,o){var c=Fe(e)?Jr:bu;return o&&Ft(e,t,o)&&(t=n),c(e,Ee(t,3))}var Ap=He(function(e,t){if(e==null)return[];var o=t.length;return o>1&&Ft(e,t[0],t[1])?t=[]:o>2&&Ft(t[0],t[1],t[2])&&(t=[t[0]]),Pd(e,Rt(t,1),[])}),Er=uc||function(){return _t.Date.now()};function Dp(e,t){if(typeof t!="function")throw new tn(l);return e=ze(e),function(){if(--e<1)return t.apply(this,arguments)}}function vl(e,t,o){return t=o?n:t,t=e&&t==null?e.length:t,_n(e,A,n,n,n,n,t)}function yl(e,t){var o;if(typeof t!="function")throw new tn(l);return e=ze(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=n),o}}var Bo=He(function(e,t,o){var c=w;if(o.length){var v=zn(o,hi(Bo));c|=g}return _n(e,c,t,o,v)}),Tl=He(function(e,t,o){var c=w|z;if(o.length){var v=zn(o,hi(Tl));c|=g}return _n(t,c,e,o,v)});function Sl(e,t,o){t=o?n:t;var c=_n(e,d,n,n,n,n,n,t);return c.placeholder=Sl.placeholder,c}function Cl(e,t,o){t=o?n:t;var c=_n(e,m,n,n,n,n,n,t);return c.placeholder=Cl.placeholder,c}function bl(e,t,o){var c,v,R,B,U,G,re=0,oe=!1,le=!1,pe=!0;if(typeof e!="function")throw new tn(l);t=dn(t)||0,vt(o)&&(oe=!!o.leading,le="maxWait"in o,R=le?Et(dn(o.maxWait)||0,t):R,pe="trailing"in o?!!o.trailing:pe);function Se(Pt){var hn=c,Mn=v;return c=v=n,re=Pt,B=e.apply(Mn,hn),B}function xe(Pt){return re=Pt,U=Ni(Ve,t),oe?Se(Pt):B}function Le(Pt){var hn=Pt-G,Mn=Pt-re,Ul=t-hn;return le?At(Ul,R-Mn):Ul}function _e(Pt){var hn=Pt-G,Mn=Pt-re;return G===n||hn>=t||hn<0||le&&Mn>=R}function Ve(){var Pt=Er();if(_e(Pt))return $e(Pt);U=Ni(Ve,Le(Pt))}function $e(Pt){return U=n,pe&&c?Se(Pt):(c=v=n,B)}function qt(){U!==n&&Dd(U),re=0,c=G=v=U=n}function Bt(){return U===n?B:$e(Er())}function $t(){var Pt=Er(),hn=_e(Pt);if(c=arguments,v=this,G=Pt,hn){if(U===n)return xe(G);if(le)return Dd(U),U=Ni(Ve,t),Se(G)}return U===n&&(U=Ni(Ve,t)),B}return $t.cancel=qt,$t.flush=Bt,$t}var Mp=He(function(e,t){return ud(e,1,t)}),Np=He(function(e,t,o){return ud(e,dn(t)||0,o)});function Fp(e){return _n(e,H)}function Ir(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new tn(l);var o=function(){var c=arguments,v=t?t.apply(this,c):c[0],R=o.cache;if(R.has(v))return R.get(v);var B=e.apply(this,c);return o.cache=R.set(v,B)||R,B};return o.cache=new(Ir.Cache||In),o}Ir.Cache=In;function xr(e){if(typeof e!="function")throw new tn(l);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Bp(e){return yl(2,e)}var zp=Pu(function(e,t){t=t.length==1&&Fe(t[0])?gt(t[0],Zt(Ee())):gt(Rt(t,1),Zt(Ee()));var o=t.length;return He(function(c){for(var v=-1,R=At(c.length,o);++v=t}),ti=gd(function(){return arguments}())?gd:function(e){return Tt(e)&&ot.call(e,"callee")&&!nd.call(e,"callee")},Fe=Q.isArray,Xp=za?Zt(za):au;function jt(e){return e!=null&&_r(e.length)&&!An(e)}function bt(e){return Tt(e)&&jt(e)}function Qp(e){return e===!0||e===!1||Tt(e)&&Nt(e)==ke}var Vn=pc||Ko,ef=ja?Zt(ja):du;function tf(e){return Tt(e)&&e.nodeType===1&&!Fi(e)}function nf(e){if(e==null)return!0;if(jt(e)&&(Fe(e)||typeof e=="string"||typeof e.splice=="function"||Vn(e)||gi(e)||ti(e)))return!e.length;var t=Dt(e);if(t==Ge||t==De)return!e.size;if(Mi(e))return!mo(e).length;for(var o in e)if(ot.call(e,o))return!1;return!0}function rf(e,t){return ki(e,t)}function of(e,t,o){o=typeof o=="function"?o:n;var c=o?o(e,t):n;return c===n?ki(e,t,n,o):!!c}function jo(e){if(!Tt(e))return!1;var t=Nt(e);return t==Yt||t==yn||typeof e.message=="string"&&typeof e.name=="string"&&!Fi(e)}function af(e){return typeof e=="number"&&rd(e)}function An(e){if(!vt(e))return!1;var t=Nt(e);return t==It||t==Ht||t==we||t==Ae}function wl(e){return typeof e=="number"&&e==ze(e)}function _r(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=be}function vt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Tt(e){return e!=null&&typeof e=="object"}var El=La?Zt(La):su;function df(e,t){return e===t||uo(e,t,_o(t))}function lf(e,t,o){return o=typeof o=="function"?o:n,uo(e,t,_o(t),o)}function sf(e){return Il(e)&&e!=+e}function cf(e){if(Zu(e))throw new Ne(a);return vd(e)}function uf(e){return e===null}function mf(e){return e==null}function Il(e){return typeof e=="number"||Tt(e)&&Nt(e)==Ct}function Fi(e){if(!Tt(e)||Nt(e)!=Oe)return!1;var t=tr(e);if(t===null)return!0;var o=ot.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&Yi.call(o)==dc}var Lo=Oa?Zt(Oa):cu;function pf(e){return wl(e)&&e>=-be&&e<=be}var xl=Ua?Zt(Ua):uu;function Rr(e){return typeof e=="string"||!Fe(e)&&Tt(e)&&Nt(e)==Xe}function Kt(e){return typeof e=="symbol"||Tt(e)&&Nt(e)==P}var gi=Ha?Zt(Ha):mu;function ff(e){return e===n}function hf(e){return Tt(e)&&Dt(e)==F}function gf(e){return Tt(e)&&Nt(e)==j}var vf=Tr(po),yf=Tr(function(e,t){return e<=t});function _l(e){if(!e)return[];if(jt(e))return Rr(e)?mn(e):zt(e);if(bi&&e[bi])return q0(e[bi]());var t=Dt(e),o=t==Ge?Qr:t==De?Ki:vi;return o(e)}function Dn(e){if(!e)return e===0?e:0;if(e=dn(e),e===Ce||e===-Ce){var t=e<0?-1:1;return t*Pe}return e===e?e:0}function ze(e){var t=Dn(e),o=t%1;return t===t?o?t-o:t:0}function Rl(e){return e?Yn(ze(e),0,N):0}function dn(e){if(typeof e=="number")return e;if(Kt(e))return Ye;if(vt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ka(e);var o=Xs.test(e);return o||e0.test(e)?D0(e.slice(2),o?2:8):Ys.test(e)?Ye:+e}function kl(e){return Cn(e,Lt(e))}function Tf(e){return e?Yn(ze(e),-be,be):e===0?e:0}function it(e){return e==null?"":Jt(e)}var Sf=pi(function(e,t){if(Mi(t)||jt(t)){Cn(t,xt(t),e);return}for(var o in t)ot.call(t,o)&&xi(e,o,t[o])}),Al=pi(function(e,t){Cn(t,Lt(t),e)}),kr=pi(function(e,t,o,c){Cn(t,Lt(t),e,c)}),Cf=pi(function(e,t,o,c){Cn(t,xt(t),e,c)}),bf=Rn(oo);function Pf(e,t){var o=mi(e);return t==null?o:sd(o,t)}var wf=He(function(e,t){e=at(e);var o=-1,c=t.length,v=c>2?t[2]:n;for(v&&Ft(t[0],t[1],v)&&(c=1);++o1),R}),Cn(e,Io(e),o),c&&(o=rn(o,y|h|D,Nu));for(var v=t.length;v--;)yo(o,t[v]);return o});function Hf(e,t){return Ml(e,xr(Ee(t)))}var Vf=Rn(function(e,t){return e==null?{}:hu(e,t)});function Ml(e,t){if(e==null)return{};var o=gt(Io(e),function(c){return[c]});return t=Ee(t),wd(e,o,function(c,v){return t(c,v[0])})}function Wf(e,t,o){t=Un(t,e);var c=-1,v=t.length;for(v||(v=1,e=n);++ct){var c=e;e=t,t=c}if(o||e%1||t%1){var v=od();return At(e+v*(t-e+A0("1e-"+((v+"").length-1))),t)}return ho(e,t)}var t1=fi(function(e,t,o){return t=t.toLowerCase(),e+(o?Bl(t):t)});function Bl(e){return Ho(it(e).toLowerCase())}function zl(e){return e=it(e),e&&e.replace(n0,W0).replace(C0,"")}function n1(e,t,o){e=it(e),t=Jt(t);var c=e.length;o=o===n?c:Yn(ze(o),0,c);var v=o;return o-=t.length,o>=0&&e.slice(o,v)==t}function i1(e){return e=it(e),e&&st.test(e)?e.replace(Vt,G0):e}function r1(e){return e=it(e),e&&Wt.test(e)?e.replace(pt,"\\$&"):e}var o1=fi(function(e,t,o){return e+(o?"-":"")+t.toLowerCase()}),a1=fi(function(e,t,o){return e+(o?" ":"")+t.toLowerCase()}),d1=Od("toLowerCase");function l1(e,t,o){e=it(e),t=ze(t);var c=t?di(e):0;if(!t||c>=t)return e;var v=(t-c)/2;return yr(or(v),o)+e+yr(rr(v),o)}function s1(e,t,o){e=it(e),t=ze(t);var c=t?di(e):0;return t&&c>>0,o?(e=it(e),e&&(typeof t=="string"||t!=null&&!Lo(t))&&(t=Jt(t),!t&&ai(e))?Hn(mn(e),0,o):e.split(t,o)):[]}var g1=fi(function(e,t,o){return e+(o?" ":"")+Ho(t)});function v1(e,t,o){return e=it(e),o=o==null?0:Yn(ze(o),0,e.length),t=Jt(t),e.slice(o,o+t.length)==t}function y1(e,t,o){var c=x.templateSettings;o&&Ft(e,t,o)&&(t=n),e=it(e),t=kr({},t,c,Jd);var v=kr({},t.imports,c.imports,Jd),R=xt(v),B=Xr(v,R),U,G,re=0,oe=t.interpolate||Vi,le="__p += '",pe=eo((t.escape||Vi).source+"|"+oe.source+"|"+(oe===Si?$s:Vi).source+"|"+(t.evaluate||Vi).source+"|$","g"),Se="//# sourceURL="+(ot.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++I0+"]")+` `;e.replace(pe,function(_e,Ve,$e,qt,Bt,$t){return $e||($e=qt),le+=e.slice(re,$t).replace(i0,Z0),Ve&&(U=!0,le+=`' + __e(`+Ve+`) + '`),Bt&&(G=!0,le+=`'; `+Bt+`; __p += '`),$e&&(le+=`' + ((__t = (`+$e+`)) == null ? '' : __t) + '`),re=$t+_e.length,_e}),le+=`'; `;var xe=ot.call(t,"variable")&&t.variable;if(!xe)le=`with (obj) { `+le+` } `;else if(ii.test(xe))throw new Ne(s);le=(G?le.replace(ht,""):le).replace(Be,"$1").replace(tt,"$1;"),le="function("+(xe||"obj")+`) { `+(xe?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(U?", __e = _.escape":"")+(G?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+le+`return __p }`;var Le=Ll(function(){return nt(R,Se+"return "+le).apply(n,B)});if(Le.source=le,jo(Le))throw Le;return Le}function T1(e){return it(e).toLowerCase()}function S1(e){return it(e).toUpperCase()}function C1(e,t,o){if(e=it(e),e&&(o||t===n))return Ka(e);if(!e||!(t=Jt(t)))return e;var c=mn(e),v=mn(t),R=qa(c,v),B=$a(c,v)+1;return Hn(c,R,B).join("")}function b1(e,t,o){if(e=it(e),e&&(o||t===n))return e.slice(0,Xa(e)+1);if(!e||!(t=Jt(t)))return e;var c=mn(e),v=$a(c,mn(t))+1;return Hn(c,0,v).join("")}function P1(e,t,o){if(e=it(e),e&&(o||t===n))return e.replace(cn,"");if(!e||!(t=Jt(t)))return e;var c=mn(e),v=qa(c,mn(t));return Hn(c,v).join("")}function w1(e,t){var o=Z,c=X;if(vt(t)){var v="separator"in t?t.separator:v;o="length"in t?ze(t.length):o,c="omission"in t?Jt(t.omission):c}e=it(e);var R=e.length;if(ai(e)){var B=mn(e);R=B.length}if(o>=R)return e;var U=o-di(c);if(U<1)return c;var G=B?Hn(B,0,U).join(""):e.slice(0,U);if(v===n)return G+c;if(B&&(U+=G.length-U),Lo(v)){if(e.slice(U).search(v)){var re,oe=G;for(v.global||(v=eo(v.source,it(ga.exec(v))+"g")),v.lastIndex=0;re=v.exec(oe);)var le=re.index;G=G.slice(0,le===n?U:le)}}else if(e.indexOf(Jt(v),U)!=U){var pe=G.lastIndexOf(v);pe>-1&&(G=G.slice(0,pe))}return G+c}function E1(e){return e=it(e),e&&Ue.test(e)?e.replace(Xt,Q0):e}var I1=fi(function(e,t,o){return e+(o?" ":"")+t.toUpperCase()}),Ho=Od("toUpperCase");function jl(e,t,o){return e=it(e),t=o?n:t,t===n?K0(e)?nc(e):L0(e):e.match(t)||[]}var Ll=He(function(e,t){try{return Gt(e,n,t)}catch(o){return jo(o)?o:new Ne(o)}}),x1=Rn(function(e,t){return en(t,function(o){o=bn(o),xn(e,o,Bo(e[o],e))}),e});function _1(e){var t=e==null?0:e.length,o=Ee();return e=t?gt(e,function(c){if(typeof c[1]!="function")throw new tn(l);return[o(c[0]),c[1]]}):[],He(function(c){for(var v=-1;++vbe)return[];var o=N,c=At(e,N);t=Ee(t),e-=N;for(var v=Yr(c,t);++o0||t<0)?new Ze(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),t!==n&&(t=ze(t),o=t<0?o.dropRight(-t):o.take(t-e)),o)},Ze.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ze.prototype.toArray=function(){return this.take(N)},Sn(Ze.prototype,function(e,t){var o=/^(?:filter|find|map|reject)|While$/.test(t),c=/^(?:head|last)$/.test(t),v=x[c?"take"+(t=="last"?"Right":""):t],R=c||/^find/.test(t);v&&(x.prototype[t]=function(){var B=this.__wrapped__,U=c?[1]:arguments,G=B instanceof Ze,re=U[0],oe=G||Fe(B),le=function(Ve){var $e=v.apply(x,Bn([Ve],U));return c&&pe?$e[0]:$e};oe&&o&&typeof re=="function"&&re.length!=1&&(G=oe=!1);var pe=this.__chain__,Se=!!this.__actions__.length,xe=R&&!pe,Le=G&&!Se;if(!R&&oe){B=Le?B:new Ze(this);var _e=e.apply(B,U);return _e.__actions__.push({func:Pr,args:[le],thisArg:n}),new nn(_e,pe)}return xe&&Le?e.apply(this,U):(_e=this.thru(le),xe?c?_e.value()[0]:_e.value():_e)})}),en(["pop","push","shift","sort","splice","unshift"],function(e){var t=qi[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);x.prototype[e]=function(){var v=arguments;if(c&&!this.__chain__){var R=this.value();return t.apply(Fe(R)?R:[],v)}return this[o](function(B){return t.apply(Fe(B)?B:[],v)})}}),Sn(Ze.prototype,function(e,t){var o=x[t];if(o){var c=o.name+"";ot.call(ui,c)||(ui[c]=[]),ui[c].push({name:t,func:o})}}),ui[gr(n,z).name]=[{name:"wrapper",func:n}],Ze.prototype.clone=wc,Ze.prototype.reverse=Ec,Ze.prototype.value=Ic,x.prototype.at=tp,x.prototype.chain=np,x.prototype.commit=ip,x.prototype.next=rp,x.prototype.plant=ap,x.prototype.reverse=dp,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=lp,x.prototype.first=x.prototype.head,bi&&(x.prototype[bi]=op),x},li=ic();Jn?((Jn.exports=li)._=li,Vr._=li):_t._=li}).call(Zn)});function es(f,u){var n=u.parentNode;n.lastChild==u?n.appendChild(f):n.insertBefore(f,u.nextSibling)}var Bi=function(){function f(u,n){fe(this,f),this.id=n,this.jSPlugin=u,this.state={play:!1,loading:!1,text:""},this.loadingSetText=this.loadingSetText}return dt(f,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"setPlayStatus",value:function(n){this.state=Object.assign(this.state,n)}},{key:"loadingStart",value:function(n){var i=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(i),i.innerHTML="@keyframes antRotate {to {transform: rotate(400deg);transform-origin:50% 50%;}} .loading {display: inline-block;z-index: 1000;-webkit-animation: antRotate 1s infinite linear;animation: antRotate 1s infinite linear;}";var r=n,a=document.getElementById(r),l=a.offsetWidth,s=a.offsetHeight,b=0,T=a.offsetLeft;document.getElementById("".concat(n,"-loading-id-0"))&&document.getElementById("".concat(n,"-loading-id-0")).parentNode.removeChild(document.getElementById("".concat(n,"-loading-id-0")));var C=document.createElement("div");C.setAttribute("id","".concat(n,"-loading-id-0"));var _="position:absolute;outline:none;pointer-events:none;";console.log("this.jSPlugin",this.jSPlugin),_+="width: 100%;background-size: cover; background-repeat:no-repeat;",_+="height: 100%;",_+="top:"+b+";",_+="left:"+T+"px;",C.setAttribute("style",_),C.style.height=s,C.setAttribute("class","loading-container"),es(C,a);var y=1,h=document.createElement("div"),D=document.createElement("div");h.setAttribute("class","loading-item"),h.setAttribute("id","".concat(n,"-loading-item-0"));var _="display:inline-flex;pointer-events:none;flex-direction:column;justify-content:center;align-items: center;width:100%;height:"+s+"px;outline:none;vertical-align: top;position:absolute;";_+="left:"+E(s,l,y,0).left+"px;",_+="top:"+E(s,l,y,0).top+"px;",h.setAttribute("style",_);function E(S,d,m,g){var k=parseInt(g/m,10)*(S/m),A=g%m*(d/m);return{top:k,left:A}}var w=document.createElement("div");D.innerHTML="",D.style.color="#fff",w.setAttribute("class","loading"),w.setAttribute("id","loading-icon");var z='';w.innerHTML=z,h.appendChild(w),h.appendChild(D),C.appendChild(h)}},{key:"loadingStop",value:function(n){var i=document.getElementById("".concat(n,"-loading-item-0"));i&&i.removeChild(document.getElementById("loading-icon"))}},{key:"loadingSetText",value:function(n){var i=this;if(this.loadingClearText(),document.getElementById("".concat(this.id,"-loading-item-0"))){var r=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes[1];if(!r){var a=document.getElementById("".concat(this.id,"-loading-item-0"));a.style.height="100%",r=document.createElement("div"),r.innerHTML=n.text,a.appendChild(r)}r.innerHTML=n.text,r.style.fontSize="14px",r.style.color=n.color||"#FFFFFF",this.state.text=n.text,n.delayClear&&setTimeout(function(){i.loadingClearText()},parseInt(n.delayClear))}}},{key:"loadingClearText",value:function(){if(document.getElementById("".concat(this.id,"-loading-item-0"))){var n=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes;n.length>1?n[1].parentNode.removeChild(n[1]):n[0]&&n[0].parentNode.removeChild(n[0])}}},{key:"loadingClear",value:function(){if(document.getElementById("".concat(this.id,"-loading-item-0"))){for(var n=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes,i=n.length-1;i>=0;i--)n[i].parentNode.removeChild(n[i]);document.getElementById("".concat(this.id,"-loading-id-0"))&&(document.getElementById("".concat(this.id,"-loading-id-0")).style.background="none"),document.getElementById("loading-icon")&&document.getElementById("loading-icon").parentNode.removeChild(document.getElementById("loading-icon"))}}},{key:"loadingEnd",value:function(){var n=document.getElementById("".concat(this.id,"-loading-item-0"));if(n){n.parentNode.removeChild(n);var i=document.getElementById("".concat(this.id,"-loading-id-0"));i&&i.children.length===0&&i.parentNode.removeChild(i)}document.getElementById("".concat(this.id,"-loading-item-0")).style.background="none"}}]),f}(),ts=function(){function f(u,n){fe(this,f),this.id=n,this.jSPlugin=u,this.timer=null,this.state={play:!1,loading:!1}}return dt(f,[{key:"default",value:function(n){var i=this,r="msgId";document.getElementById("".concat(this.id,"-").concat(r))&&document.getElementById("".concat(this.id,"-wrap")).removeChild(document.getElementById("".concat(this.id,"-").concat(r)));var a=document.createElement("div");a.id="".concat(this.id,"-").concat(r),a.style="position: absolute;top: 50%;left:calc(50% - ".concat(n.length*14/2,"px);padding: 4px 16px;background: #00000080;color: #FFFFFF;font-size: 14px"),a.innerHTML=n,document.getElementById("".concat(this.id,"-wrap")).appendChild(a),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){document.getElementById("".concat(i.id,"-wrap")).removeChild(document.getElementById("".concat(i.id,"-").concat(r)))},2e3)}}]),f}(),ns=[{moduleCode:"",detailCode:"405984",description:"",solution:"",updateTime:1559564188e3},{moduleCode:"",detailCode:"10035",description:"获取子账户AccessToken异常,子账户不存在或子账户不属于该开发者",solution:"",updateTime:1559551958e3},{moduleCode:"",detailCode:"1052674",description:"获取本地录像失败",solution:"",updateTime:1558579653e3},{moduleCode:"",detailCode:"395547",description:"",solution:"",updateTime:1557367296e3},{moduleCode:"",detailCode:"12",description:"",solution:"",updateTime:1557229476e3},{moduleCode:"",detailCode:"10052",description:"余额不足",solution:"",updateTime:1557121463e3},{moduleCode:"",detailCode:"20108",description:"当前用户和所添加用户不是好友关系",solution:"",updateTime:1556541725e3},{moduleCode:"",detailCode:"10009",description:"",solution:"",updateTime:1556422452e3},{moduleCode:"",detailCode:"320001",description:"通道不存在",solution:"请检查录像机的关联状态是否正常,没有摄像头的通道无法播放",updateTime:1556419044e3},{moduleCode:"",detailCode:"120001",description:"通道不存在",solution:"请检查录像机的关联状态是否正常,没有摄像头的通道无法播放",updateTime:155641903e4},{moduleCode:"",detailCode:"320049",description:"",solution:"",updateTime:1556272984e3},{moduleCode:"",detailCode:"380227",description:"",solution:"",updateTime:1556264379e3},{moduleCode:"",detailCode:"10033",description:"policy参数信息异常",solution:"",updateTime:1555922124e3},{moduleCode:"",detailCode:"10065",description:"weakAppKey 不属于accessToken对应的用户",solution:"",updateTime:1555497522e3},{moduleCode:"",detailCode:"100001",description:"",solution:"",updateTime:1555141776e3},{moduleCode:"",detailCode:"395558",description:"",solution:"",updateTime:1554987121e3},{moduleCode:"",detailCode:"70001",description:"智能家居买断用户设备受到限制,建议合理选择pagestart和pageSize",solution:"",updateTime:1554691023e3},{moduleCode:"",detailCode:"170001",description:"",solution:"",updateTime:1554691023e3},{moduleCode:"",detailCode:"1012",description:"重置失败",solution:"",updateTime:1554645841e3},{moduleCode:"",detailCode:"1043",description:"重置失败",solution:"",updateTime:1554645834e3},{moduleCode:"",detailCode:"60060",description:"直播功能未开通",solution:"通道未开通直播功能,请先开通直播",updateTime:1554346018e3},{moduleCode:"",detailCode:"380203",description:"",solution:"",updateTime:1554093666e3},{moduleCode:"",detailCode:"399048",description:"免费版并发数达到上限,请升级企业版使用多并发能力",solution:"升级成为企业版套餐即可取消并发数限制",updateTime:1553839878e3},{moduleCode:"",detailCode:"60007",description:"预置点个数超过最大值",solution:"",updateTime:1553671316e3},{moduleCode:"",detailCode:"1005",description:"",solution:"",updateTime:1553513701e3},{moduleCode:"",detailCode:"20605",description:"其他用户正在认证中",solution:"",updateTime:1552976317e3},{moduleCode:"",detailCode:"90004",description:"当前型号设备暂时不支持AI任务:CS-C3W-3B1WFR-YGL",solution:"",updateTime:1552898525e3},{moduleCode:"",detailCode:"60046",description:"添加的设备的IP和本设备的IP冲突",solution:"",updateTime:1552872372e3},{moduleCode:"",detailCode:"3",description:"修改视频清晰度失败!",solution:"",updateTime:1552440229e3},{moduleCode:"",detailCode:"1013",description:"",solution:"",updateTime:1552035069e3},{moduleCode:"",detailCode:"370007",description:"",solution:"",updateTime:1551852327e3},{moduleCode:"",detailCode:"-1",description:"",solution:"",updateTime:1551752889e3},{moduleCode:"",detailCode:"30005",description:"弱账户不存在",solution:"",updateTime:1551422358e3},{moduleCode:"",detailCode:"90006",description:"用户操作AI任务受限",solution:"",updateTime:155107332e4},{moduleCode:"",detailCode:"60203",description:"未开通相关服务",solution:"",updateTime:155062307e4},{moduleCode:"",detailCode:"10002",description:"accessToken过期或异常",solution:"",updateTime:1550300346e3},{moduleCode:"",detailCode:"380339",description:"",solution:"",updateTime:1549889458e3},{moduleCode:"",detailCode:"90002",description:"AI任务设备配置数达到上限:3",solution:"",updateTime:1549071664e3},{moduleCode:"",detailCode:"380008",description:"",solution:"",updateTime:1549005979e3},{moduleCode:"",detailCode:"320227",description:"",solution:"",updateTime:1548739731e3},{moduleCode:"",detailCode:"60059",description:"ezopen地址均不可用",solution:"",updateTime:154839535e4},{moduleCode:"",detailCode:"10005",description:"appKey异常",solution:"",updateTime:1548317858e3},{moduleCode:"",detailCode:"60045",description:"添加的设备的IP和其他通道的IP冲突",solution:"",updateTime:1548155085e3},{moduleCode:"",detailCode:"60047",description:"码流类型不支持",solution:"",updateTime:1547962108e3},{moduleCode:"",detailCode:"60041",description:"添加的设备被其他设备关联或响应超时",solution:"",updateTime:154796098e4},{moduleCode:"",detailCode:"110029",description:"个人用户接口调用频率超限",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1547606859e3},{moduleCode:"",detailCode:"380355",description:"设备直连推流异常结束",solution:"",updateTime:1547106294e3},{moduleCode:"",detailCode:"320081",description:"",solution:"",updateTime:1547106279e3},{moduleCode:"",detailCode:"60035",description:"购买云存储服务失败",solution:"",updateTime:1547026959e3},{moduleCode:"",detailCode:"90005",description:"设备已存在:C75714141",solution:"",updateTime:1546940622e3},{moduleCode:"",detailCode:"1053445",description:"该时间段没有录像片段",solution:"",updateTime:1546935727e3},{moduleCode:"",detailCode:"90007",description:"设备未加入到AI任务",solution:"",updateTime:1546932948e3},{moduleCode:"",detailCode:"326000",description:"",solution:"",updateTime:1546823143e3},{moduleCode:"",detailCode:"1021",description:"重置失败",solution:"",updateTime:1546781152e3},{moduleCode:"",detailCode:"2001",description:"删除设备失败!",solution:"",updateTime:1546422886e3},{moduleCode:"",detailCode:"380425",description:"",solution:"",updateTime:1546407694e3},{moduleCode:"",detailCode:"120097",description:"",solution:"",updateTime:1546085995e3},{moduleCode:"",detailCode:"10059",description:"requestId已存在",solution:"",updateTime:1545824509e3},{moduleCode:"",detailCode:"1154723",description:"",solution:"",updateTime:1545795209e3},{moduleCode:"",detailCode:"60043",description:"添加的设备超出最大数量",solution:"",updateTime:1545493607e3},{moduleCode:"",detailCode:"1152677",description:"",solution:"",updateTime:1545313404e3},{moduleCode:"",detailCode:"20097",description:"设备添加异常,设备验证码为ABCDEF或设备被N1,R1关联",solution:"",updateTime:1545310795e3},{moduleCode:"",detailCode:"10060",description:"设备不支持该云存储类型",solution:"",updateTime:1545309064e3},{moduleCode:"",detailCode:"20102",description:"无相应邀请信息,无法接受邀请",solution:"",updateTime:1545204966e3},{moduleCode:"",detailCode:"10053",description:"云存储开通中",solution:"",updateTime:1545100293e3},{moduleCode:"",detailCode:"20401",description:"用户云空间信息不存在",solution:"",updateTime:154501788e4},{moduleCode:"",detailCode:"20600",description:"临时密码数已达上限",solution:"",updateTime:1544873457e3},{moduleCode:"",detailCode:"901",description:"",solution:"",updateTime:1544693519e3},{moduleCode:"",detailCode:"60210",description:"图片数据错误",solution:"",updateTime:1544604457e3},{moduleCode:"",detailCode:"10013",description:"您的应用没有权限调用",solution:"",updateTime:1544416237e3},{moduleCode:"",detailCode:"70007",description:"授权码不存在",solution:"",updateTime:1544179533e3},{moduleCode:"",detailCode:"10015",description:"授权地址不存在",solution:"",updateTime:154416324e4},{moduleCode:"",detailCode:"320423",description:"",solution:"",updateTime:1544100685e3},{moduleCode:"",detailCode:"370009",description:"",solution:"",updateTime:1544077151e3},{moduleCode:"",detailCode:"10031",description:"子账户或萤石用户没有权限",solution:"",updateTime:1543990462e3},{moduleCode:"",detailCode:"10055",description:"设备不支持试用云存储服务",solution:"",updateTime:1543986292e3},{moduleCode:"",detailCode:"60042",description:"添加的设备密码错误",solution:"",updateTime:1543710913e3},{moduleCode:"",detailCode:"60082",description:"设备正在响应本次声源定位",solution:"",updateTime:1543647426e3},{moduleCode:"",detailCode:"10056",description:"设备不支持云存储服务转出",solution:"",updateTime:1543558342e3},{moduleCode:"",detailCode:"20104",description:"好友不存在",solution:"",updateTime:1543492403e3},{moduleCode:"",detailCode:"20111",description:"好友不是等待验证状态,无法接受邀请",solution:"",updateTime:1543492365e3},{moduleCode:"",detailCode:"20107",description:"不能添加自己为好友",solution:"",updateTime:1543480986e3},{moduleCode:"",detailCode:"1",description:"设备返回其他错误",solution:"",updateTime:1543459921e3},{moduleCode:"",detailCode:"60084",description:"当前正在关闭隐私遮蔽",solution:"",updateTime:1543456515e3},{moduleCode:"",detailCode:"380255",description:"",solution:"",updateTime:1543411652e3},{moduleCode:"",detailCode:"20015",description:"设备不支持",solution:"",updateTime:1543390936e3},{moduleCode:"",detailCode:"30003",description:"手机验证码错误",solution:"",updateTime:1543389137e3},{moduleCode:"",detailCode:"20615",description:"锁用户已存在",solution:"",updateTime:1543388325e3},{moduleCode:"",detailCode:"60061",description:"账户流量已超出或未购买,限制开通",solution:"",updateTime:1543372581e3},{moduleCode:"",detailCode:"60020",description:"设备不支持该信令",solution:"",updateTime:1543321636e3},{moduleCode:"",detailCode:"320146",description:"",solution:"",updateTime:1543318472e3},{moduleCode:"",detailCode:"60018",description:"设备升级失败",solution:"",updateTime:1543304928e3},{moduleCode:"",detailCode:"60044",description:"添加的设备网络不可达超时",solution:"",updateTime:1543304102e3},{moduleCode:"",detailCode:"20619",description:"主用户无法删除",solution:"",updateTime:1543290219e3},{moduleCode:"",detailCode:"20608",description:"锁用户不存在",solution:"",updateTime:154328195e4},{moduleCode:"",detailCode:"20609",description:"设备响应超时,门锁通信故障或者电量不足,请重试.",solution:"",updateTime:1543281601e3},{moduleCode:"",detailCode:"1049954",description:"升级设备失败",solution:"",updateTime:1543279264e3},{moduleCode:"",detailCode:"60009",description:"正在调用预置点",solution:"",updateTime:1543238114e3},{moduleCode:"",detailCode:"1052677",description:"获取本地录像失败",solution:"",updateTime:1543207604e3},{moduleCode:"",detailCode:"327000",description:"",solution:"",updateTime:1543196609e3},{moduleCode:"",detailCode:"20021",description:"设备在线,未被用户添加",solution:"",updateTime:1543193436e3},{moduleCode:"",detailCode:"20202",description:"操作留言信息失败",solution:"",updateTime:1543191562e3},{moduleCode:"",detailCode:"1052678",description:"获取本地录像失败",solution:"",updateTime:1543132218e3},{moduleCode:"",detailCode:"1054723",description:"格式化设备失败",solution:"",updateTime:1543129833e3},{moduleCode:"",detailCode:"20109",description:"对应分享不存在",solution:"",updateTime:1543129111e3},{moduleCode:"",detailCode:"60026",description:"设备处于隐私遮蔽状态",solution:"",updateTime:1543110403e3},{moduleCode:"",detailCode:"60083",description:"当前正在开启隐私遮蔽",solution:"",updateTime:1543071148e3},{moduleCode:"",detailCode:"60001",description:"用户无云台控制权限",solution:"",updateTime:1543059167e3},{moduleCode:"",detailCode:"2003",description:"设备不在线",solution:"",updateTime:1543051046e3},{moduleCode:"",detailCode:"-24",description:"设置设备enable错误",solution:"",updateTime:1543042701e3},{moduleCode:"",detailCode:"10018",description:"",solution:"",updateTime:1543041564e3},{moduleCode:"",detailCode:"20103",description:"好友已存在",solution:"",updateTime:154303843e4},{moduleCode:"",detailCode:"70010",description:"授权异常请重试",solution:"",updateTime:154303559e4},{moduleCode:"",detailCode:"60056",description:"删除设备失败",solution:"",updateTime:1543031275e3},{moduleCode:"",detailCode:"60040",description:"添加的设备不在同一局域网",solution:"",updateTime:154303121e4},{moduleCode:"",detailCode:"60019",description:"加密已开启",solution:"",updateTime:1543029931e3},{moduleCode:"",detailCode:"1054722",description:"格式化设备失败",solution:"",updateTime:1543028537e3},{moduleCode:"",detailCode:"20016",description:"当前设备正在格式化",solution:"",updateTime:1543028537e3},{moduleCode:"",detailCode:"10024",description:"透明通道权限校验不通过",solution:"",updateTime:154302554e4},{moduleCode:"",detailCode:"6002",description:"删除设备失败!",solution:"",updateTime:1543025026e3},{moduleCode:"",detailCode:"1011",description:"验证码错误!",solution:"",updateTime:1543016865e3},{moduleCode:"",detailCode:"60032",description:"卡密已使用",solution:"",updateTime:1543006668e3},{moduleCode:"",detailCode:"10034",description:"子账号已存在",solution:"",updateTime:1542989194e3},{moduleCode:"",detailCode:"20301",description:"根据uuid查询联动信息不存在",solution:"",updateTime:1542988651e3},{moduleCode:"",detailCode:"1041",description:"获取验证码过于频繁",solution:"",updateTime:1542980953e3},{moduleCode:"",detailCode:"10012",description:"该appkey下已绑定重复的phone!",solution:"",updateTime:15429808e5},{moduleCode:"",detailCode:"1008",description:"phone不合法!",solution:"",updateTime:1542979812e3},{moduleCode:"",detailCode:"60023",description:"订阅操作失败",solution:"",updateTime:1542979006e3},{moduleCode:"",detailCode:"5",description:"设备返回其他错误",solution:"",updateTime:1542977828e3},{moduleCode:"",detailCode:"60006",description:"云台当前操作失败",solution:"",updateTime:1542977598e3},{moduleCode:"",detailCode:"131",description:"修改视频清晰度失败!",solution:"",updateTime:1542977246e3},{moduleCode:"",detailCode:"10019",description:"密码错误",solution:"",updateTime:1542976628e3},{moduleCode:"",detailCode:"10004",description:"用户不存在",solution:"",updateTime:1542976268e3},{moduleCode:"",detailCode:"20201",description:"操作报警信息失败",solution:"",updateTime:1542975906e3},{moduleCode:"",detailCode:"20024",description:"设备不在线,已经被别的用户添加",solution:"",updateTime:1542975858e3},{moduleCode:"",detailCode:"60004",description:"设备云台旋转达到左限位",solution:"",updateTime:1542975207e3},{moduleCode:"",detailCode:"1052679",description:"修改视频清晰度失败!",solution:"",updateTime:1542974886e3},{moduleCode:"",detailCode:"20031",description:"请在萤石客户端关闭终端绑定",solution:"",updateTime:1542974756e3},{moduleCode:"",detailCode:"1053825",description:"获取本地录像失败",solution:"",updateTime:1542974692e3},{moduleCode:"",detailCode:"60011",description:"预置点不存在",solution:"",updateTime:1542974414e3},{moduleCode:"",detailCode:"1052936",description:"修改视频清晰度失败!",solution:"",updateTime:154297439e4},{moduleCode:"",detailCode:"1016",description:"",solution:"",updateTime:1542974273e3},{moduleCode:"",detailCode:"10032",description:"子账号不存在",solution:"",updateTime:1542973906e3},{moduleCode:"",detailCode:"20013",description:"设备已被别人添加",solution:"",updateTime:1542973817e3},{moduleCode:"",detailCode:"50000",description:"服务器错误!",solution:"",updateTime:1542973801e3},{moduleCode:"",detailCode:"60010",description:"该预置点已经是当前位置",solution:"",updateTime:15429738e5},{moduleCode:"",detailCode:"60003",description:"设备云台旋转达到下限位",solution:"",updateTime:154297377e4},{moduleCode:"",detailCode:"4",description:"设备返回其他错误",solution:"",updateTime:1542973755e3},{moduleCode:"",detailCode:"60016",description:"加密未开启,无需关闭",solution:"",updateTime:1542973753e3},{moduleCode:"",detailCode:"60002",description:"设备云台旋转达到上限位",solution:"",updateTime:1542973742e3},{moduleCode:"",detailCode:"20023",description:"设备不在线,未被用户添加",solution:"",updateTime:1542973685e3},{moduleCode:"",detailCode:"10008",description:"",solution:"",updateTime:1542973676e3},{moduleCode:"",detailCode:"20010",description:"设备验证码错误",solution:"",updateTime:1542973658e3},{moduleCode:"",detailCode:"60005",description:"设备云台旋转达到右限位",solution:"",updateTime:1542973657e3},{moduleCode:"",detailCode:"20017",description:"设备已经被自己添加",solution:"",updateTime:1542973648e3},{moduleCode:"",detailCode:"20020",description:"设备在线,已经被自己添加",solution:"",updateTime:1542973533e3},{moduleCode:"",detailCode:"20029",description:"设备不在线,已经被自己添加",solution:"",updateTime:154297353e4},{moduleCode:"",detailCode:"10014",description:"APPKEY下对应的第三方userId和phone未绑定!",solution:"",updateTime:1542973499e3},{moduleCode:"",detailCode:"20002",description:"设备不存在",solution:"",updateTime:1542973499e3},{moduleCode:"",detailCode:"10030",description:"appkey和appsecret不匹配",solution:"",updateTime:154297349e4},{moduleCode:"",detailCode:"20022",description:"设备在线,已经被别的用户添加",solution:"",updateTime:1542973486e3},{moduleCode:"",detailCode:"20008",description:"设备响应超时",solution:"",updateTime:1542973484e3},{moduleCode:"",detailCode:"20032",description:"该用户下通道不存在",solution:"",updateTime:1542973481e3},{moduleCode:"",detailCode:"20006",description:"网络异常",solution:"",updateTime:1542973475e3},{moduleCode:"",detailCode:"20014",description:"deviceSerial不合法!",solution:"",updateTime:1542973454e3},{moduleCode:"",detailCode:"20007",description:"设备不在线",solution:"",updateTime:1542973454e3},{moduleCode:"",detailCode:"20018",description:"该用户不拥有该设备",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"10010",description:"",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"10011",description:"未绑定!",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"20001",description:"通道不存在!",solution:"",updateTime:1542973452e3},{moduleCode:"",detailCode:"10017",description:"appKey不存在",solution:"",updateTime:1542973451e3},{moduleCode:"",detailCode:"400259",description:"",solution:"",updateTime:1542875643e3},{moduleCode:"",detailCode:"400004",description:"",solution:"",updateTime:1542873364e3},{moduleCode:"",detailCode:"3840",description:"",solution:"",updateTime:154186e7},{moduleCode:"",detailCode:"-1017",description:"",solution:"",updateTime:1541733663e3},{moduleCode:"",detailCode:"320025",description:"",solution:"",updateTime:1541078281e3},{moduleCode:"",detailCode:"320024",description:"",solution:"",updateTime:1540801374e3},{moduleCode:"",detailCode:"321002",description:"",solution:"",updateTime:1540631734e3},{moduleCode:"",detailCode:"321000",description:"",solution:"",updateTime:1540609178e3},{moduleCode:"",detailCode:"321022",description:"",solution:"",updateTime:1540548345e3},{moduleCode:"",detailCode:"321016",description:"",solution:"",updateTime:1540287187e3},{moduleCode:"",detailCode:"320023",description:"",solution:"",updateTime:1539825993e3},{moduleCode:"",detailCode:"-1016",description:"",solution:"",updateTime:1539584931e3},{moduleCode:"",detailCode:"8",description:"",solution:"",updateTime:1539391812e3},{moduleCode:"",detailCode:"1075127593",description:"",solution:"",updateTime:1538959251e3},{moduleCode:"",detailCode:"380421",description:"",solution:"",updateTime:1537288465e3},{moduleCode:"",detailCode:"322000",description:"麦克风权限未开启",solution:"",updateTime:1536820136e3},{moduleCode:"",detailCode:"1152678",description:"",solution:"",updateTime:1536738348e3},{moduleCode:"",detailCode:"320047",description:"",solution:"",updateTime:1536664472e3},{moduleCode:"",detailCode:"327006",description:"",solution:"",updateTime:153613612e4},{moduleCode:"",detailCode:"1074807593",description:"",solution:"",updateTime:1536135035e3},{moduleCode:"",detailCode:"320291",description:"",solution:"",updateTime:1536110836e3},{moduleCode:"",detailCode:"320045",description:"",solution:"",updateTime:1535963775e3},{moduleCode:"",detailCode:"370004",description:"",solution:"",updateTime:1535883699e3},{moduleCode:"",detailCode:"1149954",description:"",solution:"",updateTime:1535700674e3},{moduleCode:"",detailCode:"320053",description:"",solution:"",updateTime:1535681079e3},{moduleCode:"",detailCode:"400000",description:"",solution:"",updateTime:1535532332e3},{moduleCode:"",detailCode:"110028",description:"个人版抓图接口日调用次数超出限制",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348756e3},{moduleCode:"",detailCode:"110027",description:"个人版帐号数量超出安全限制,无法调用",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348734e3},{moduleCode:"",detailCode:"110026",description:"设备数量超出个人版限制,当前设备无法操作",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348588e3},{moduleCode:"",detailCode:"100000",description:"",solution:"",updateTime:1534980008e3},{moduleCode:"",detailCode:"324004",description:"",solution:"",updateTime:1534927762e3},{moduleCode:"",detailCode:"360104",description:"",solution:"",updateTime:1534761006e3},{moduleCode:"",detailCode:"320204",description:"",solution:"",updateTime:1534584221e3},{moduleCode:"",detailCode:"380001",description:"",solution:"",updateTime:1534404715e3},{moduleCode:"",detailCode:"380204",description:"",solution:"",updateTime:1534401682e3},{moduleCode:"",detailCode:"328006",description:"",solution:"",updateTime:1534144407e3},{moduleCode:"",detailCode:"321703",description:"",solution:"",updateTime:1534127274e3},{moduleCode:"",detailCode:"321510",description:"",solution:"",updateTime:1533428892e3},{moduleCode:"",detailCode:"321006",description:"",solution:"",updateTime:1533036916e3},{moduleCode:"",detailCode:"50009",description:"",solution:"",updateTime:1532078548e3},{moduleCode:"",detailCode:"50007",description:"",solution:"",updateTime:153199172e4},{moduleCode:"",detailCode:"50018",description:"",solution:"",updateTime:1531912829e3},{moduleCode:"",detailCode:"380451",description:"",solution:"",updateTime:15316157e5},{moduleCode:"",detailCode:"380336",description:"",solution:"",updateTime:1531231721e3},{moduleCode:"",detailCode:"360020",description:"",solution:"",updateTime:1531117554e3},{moduleCode:"",detailCode:"380418",description:"",solution:"",updateTime:153110707e4},{moduleCode:"",detailCode:"1153445",description:"设备在该时间段内没有录像",solution:"",updateTime:1530944007e3},{moduleCode:"",detailCode:"110007",description:"调用接口总次数达到上限",solution:"请升级企业版,获取更高能力",updateTime:1530935584e3},{moduleCode:"",detailCode:"360019",description:"",solution:"",updateTime:1530869771e3},{moduleCode:"",detailCode:"360100",description:"",solution:"",updateTime:1530786188e3},{moduleCode:"",detailCode:"380042",description:"",solution:"",updateTime:1530775199e3},{moduleCode:"",detailCode:"320355",description:"",solution:"",updateTime:1530716074e3},{moduleCode:"",detailCode:"100003",description:"",solution:"",updateTime:1530232541e3},{moduleCode:"",detailCode:"371026",description:"",solution:"",updateTime:15301926e5},{moduleCode:"",detailCode:"102",description:"",solution:"",updateTime:1529895641e3},{moduleCode:"",detailCode:"380201",description:"",solution:"",updateTime:1529740929e3},{moduleCode:"",detailCode:"320054",description:"",solution:"",updateTime:1529544875e3},{moduleCode:"",detailCode:"500101",description:"",solution:"",updateTime:1529485953e3},{moduleCode:"",detailCode:"321001",description:"",solution:"",updateTime:1529411048e3},{moduleCode:"",detailCode:"321508",description:"",solution:"",updateTime:1529393279e3},{moduleCode:"",detailCode:"405991",description:"",solution:"",updateTime:1529380238e3},{moduleCode:"",detailCode:"380461",description:"",solution:"",updateTime:1529130941e3},{moduleCode:"",detailCode:"-1019",description:"",solution:"",updateTime:1529057245e3},{moduleCode:"",detailCode:"322009",description:"",solution:"",updateTime:1528965717e3},{moduleCode:"",detailCode:"324005",description:"",solution:"",updateTime:1528950153e3},{moduleCode:"",detailCode:"325000",description:"",solution:"",updateTime:1528947143e3},{moduleCode:"",detailCode:"326032",description:"",solution:"",updateTime:1528872971e3},{moduleCode:"",detailCode:"325032",description:"",solution:"",updateTime:1528863189e3},{moduleCode:"",detailCode:"328000",description:"",solution:"",updateTime:1528794505e3},{moduleCode:"",detailCode:"53",description:"",solution:"",updateTime:1528693249e3},{moduleCode:"",detailCode:"-1020",description:"",solution:"",updateTime:152849944e4},{moduleCode:"",detailCode:"329032",description:"",solution:"",updateTime:1528446301e3},{moduleCode:"",detailCode:"-1202",description:"",solution:"",updateTime:152843982e4},{moduleCode:"",detailCode:"2",description:"",solution:"",updateTime:1528434175e3},{moduleCode:"",detailCode:"1152936",description:"",solution:"",updateTime:1528345986e3},{moduleCode:"",detailCode:"328011",description:"",solution:"",updateTime:15283386e5},{moduleCode:"",detailCode:"28",description:"",solution:"",updateTime:152833753e4},{moduleCode:"",detailCode:"320356",description:"",solution:"",updateTime:1528188693e3},{moduleCode:"",detailCode:"320357",description:"",solution:"",updateTime:1528188517e3},{moduleCode:"",detailCode:"405800",description:"",solution:"",updateTime:1528168732e3},{moduleCode:"",detailCode:"405996",description:"",solution:"",updateTime:1528168686e3},{moduleCode:"",detailCode:"380357",description:"",solution:"",updateTime:1528011565e3},{moduleCode:"",detailCode:"328022",description:"",solution:"",updateTime:1527929065e3},{moduleCode:"",detailCode:"380003",description:"",solution:"",updateTime:1527927819e3},{moduleCode:"",detailCode:"50004",description:"",solution:"",updateTime:1527770643e3},{moduleCode:"",detailCode:"50011",description:"",solution:"",updateTime:1527770635e3},{moduleCode:"",detailCode:"370017",description:"",solution:"",updateTime:1527739514e3},{moduleCode:"",detailCode:"327032",description:"",solution:"",updateTime:1527726704e3},{moduleCode:"",detailCode:"324001",description:"",solution:"",updateTime:1527681892e3},{moduleCode:"",detailCode:"405997",description:"",solution:"",updateTime:1527653408e3},{moduleCode:"",detailCode:"405995",description:"",solution:"",updateTime:1527647283e3},{moduleCode:"",detailCode:"1153825",description:"",solution:"",updateTime:1527601747e3},{moduleCode:"",detailCode:"328002",description:"",solution:"",updateTime:1527495292e3},{moduleCode:"",detailCode:"1152679",description:"",solution:"",updateTime:1527486665e3},{moduleCode:"",detailCode:"380356",description:"",solution:"",updateTime:1527125669e3},{moduleCode:"",detailCode:"328032",description:"",solution:"",updateTime:1527069382e3},{moduleCode:"",detailCode:"22",description:"",solution:"",updateTime:1527049826e3},{moduleCode:"",detailCode:"9",description:"",solution:"",updateTime:1527006778e3},{moduleCode:"",detailCode:"89",description:"",solution:"",updateTime:1526622784e3},{moduleCode:"",detailCode:"328016",description:"",solution:"",updateTime:1526452365e3},{moduleCode:"",detailCode:"368005",description:"",solution:"",updateTime:1525921264e3},{moduleCode:"",detailCode:"0",description:"",solution:"",updateTime:1525920242e3},{moduleCode:"",detailCode:"380006",description:"",solution:"",updateTime:1525918868e3},{moduleCode:"",detailCode:"310",description:"",solution:"",updateTime:1525834436e3},{moduleCode:"",detailCode:"360011",description:"",solution:"",updateTime:1525681552e3},{moduleCode:"",detailCode:"170005",description:"",solution:"",updateTime:15254339e5},{moduleCode:"",detailCode:"50023",description:"",solution:"",updateTime:1525403338e3},{moduleCode:"",detailCode:"100131",description:"",solution:"",updateTime:1525229691e3},{moduleCode:"",detailCode:"-1018",description:"",solution:"",updateTime:1525142341e3},{moduleCode:"",detailCode:"362026",description:"",solution:"",updateTime:1524882677e3},{moduleCode:"",detailCode:"368007",description:"",solution:"",updateTime:1524832269e3},{moduleCode:"",detailCode:"54",description:"",solution:"",updateTime:1524793646e3},{moduleCode:"",detailCode:"1154722",description:"",solution:"",updateTime:1524620807e3},{moduleCode:"",detailCode:"320229",description:"",solution:"",updateTime:1524551682e3},{moduleCode:"",detailCode:"360012",description:"",solution:"",updateTime:1524472094e3},{moduleCode:"",detailCode:"380229",description:"",solution:"",updateTime:1524110755e3},{moduleCode:"",detailCode:"360016",description:"",solution:"",updateTime:1523933518e3},{moduleCode:"",detailCode:"-1003",description:"",solution:"",updateTime:1523584804e3},{moduleCode:"",detailCode:"410026",description:"",solution:"",updateTime:152351743e4},{moduleCode:"",detailCode:"360102",description:"TTS初始化失败",solution:"",updateTime:1523503528e3},{moduleCode:"",detailCode:"360013",description:"设备开启了隐私保护",solution:"",updateTime:1523503507e3},{moduleCode:"",detailCode:"360010",description:"设备正在对讲中",solution:"",updateTime:1523503491e3},{moduleCode:"",detailCode:"360007",description:"TTS关闭了与客户端的连接",solution:"",updateTime:1523503475e3},{moduleCode:"",detailCode:"360006",description:"客户端接收发生错误",solution:"",updateTime:1523503457e3},{moduleCode:"",detailCode:"360005",description:"客户端发送的消息错误",solution:"",updateTime:1523503437e3},{moduleCode:"",detailCode:"360004",description:"TTS内部发生错误",solution:"",updateTime:1523503421e3},{moduleCode:"",detailCode:"360003",description:"TTS的设备端发生错误",solution:"",updateTime:1523503397e3},{moduleCode:"",detailCode:"360002",description:"对讲发起超时",solution:"",updateTime:1523503376e3},{moduleCode:"",detailCode:"360001",description:"客户端请求超时",solution:"",updateTime:1523503357e3},{moduleCode:"",detailCode:"320077",description:"",solution:"",updateTime:1523444274e3},{moduleCode:"",detailCode:"370047",description:"",solution:"",updateTime:152344048e4},{moduleCode:"",detailCode:"100002",description:"",solution:"",updateTime:1523413964e3},{moduleCode:"",detailCode:"-1004",description:"",solution:"",updateTime:1523336653e3},{moduleCode:"",detailCode:"380000",description:"",solution:"",updateTime:1523180856e3},{moduleCode:"",detailCode:"380213",description:"",solution:"",updateTime:1523180623e3},{moduleCode:"",detailCode:"380101",description:"",solution:"",updateTime:1522834231e3},{moduleCode:"",detailCode:"50047",description:"",solution:"",updateTime:1522833243e3},{moduleCode:"",detailCode:"-999",description:"",solution:"",updateTime:1522831034e3},{moduleCode:"",detailCode:"320418",description:"",solution:"",updateTime:1522829072e3},{moduleCode:"",detailCode:"-1009",description:"",solution:"",updateTime:1522746247e3},{moduleCode:"",detailCode:"320209",description:"",solution:"",updateTime:1522744395e3},{moduleCode:"",detailCode:"368006",description:"",solution:"",updateTime:15227443e5},{moduleCode:"",detailCode:"369003",description:"",solution:"",updateTime:1522736355e3},{moduleCode:"",detailCode:"405989",description:"",solution:"",updateTime:1522726571e3},{moduleCode:"",detailCode:"-1012",description:"",solution:"",updateTime:1522726203e3},{moduleCode:"",detailCode:"322016",description:"",solution:"",updateTime:1522722918e3},{moduleCode:"",detailCode:"500103",description:"",solution:"",updateTime:1522655556e3},{moduleCode:"",detailCode:"405999",description:"",solution:"",updateTime:1522654716e3},{moduleCode:"",detailCode:"321032",description:"",solution:"",updateTime:1522647732e3},{moduleCode:"",detailCode:"381101",description:"",solution:"",updateTime:1522392414e3},{moduleCode:"",detailCode:"399999",description:"",solution:"",updateTime:1522379834e3},{moduleCode:"",detailCode:"380103",description:"",solution:"",updateTime:1522312724e3},{moduleCode:"",detailCode:"360014",description:"",solution:"",updateTime:1522304341e3},{moduleCode:"",detailCode:"-1005",description:"",solution:"",updateTime:1522288195e3},{moduleCode:"",detailCode:"100005",description:"",solution:"",updateTime:1522218849e3},{moduleCode:"",detailCode:"100004",description:"",solution:"",updateTime:1522209053e3},{moduleCode:"",detailCode:"106002",description:"",solution:"",updateTime:15222062e5},{moduleCode:"",detailCode:"410030",description:"",solution:"",updateTime:1522162252e3},{moduleCode:"",detailCode:"-1002",description:"",solution:"",updateTime:152215069e4},{moduleCode:"",detailCode:"-1200",description:"",solution:"",updateTime:1522139025e3},{moduleCode:"",detailCode:"-1001",description:"",solution:"",updateTime:1522046436e3},{moduleCode:"",detailCode:"-1011",description:"",solution:"",updateTime:1522045931e3},{moduleCode:"",detailCode:"381102",description:"",solution:"",updateTime:1522044953e3},{moduleCode:"",detailCode:"381103",description:"",solution:"",updateTime:1522044953e3},{moduleCode:"",detailCode:"391205",description:"vtdu解析服务器ip失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391206",description:"vtdu描述符select失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391207",description:"vtdu文件描述符不在可读中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391208",description:"vtdu网络发生错误getsockopt",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391209",description:"vtdu描述符select超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395000",description:"cas回复信令,发现内存已经释放(和设备之间异常断开)",msg:"播放失败请重试",solution:"检查设备网络;刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395400",description:"私有化协议vtm检测私有化协议中码流类型小于0或者设备序列号为空等非法参数场景返回(app不重试取流)",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395402",description:"回放找不到录像文件",msg:"回放找不到录像文件,本地存储请检查存储卡是否接触良好",solution:"检查是否有存储卡并且接触良好",updateTime:1522034841e3},{moduleCode:"",detailCode:"395403",description:"操作码或信令密钥与设备不匹配",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395404",description:"设备不在线",solution:"检查设备网络;重启设备接入萤石云",msg:"设备不在线,请检查设备网络或重启设备接入萤石云",updateTime:1522034841e3},{moduleCode:"",detailCode:"395405",description:"流媒体向设备发送或接受信令超时/cas响应超时",msg:"播放失败,请检查设备网络或重启设备",solution:"检查设备网络;重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395406",description:"token失效",msg:"播放失败请重试或重启设备",solution:"刷新重试或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395407",description:"客户端的URL格式错误",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395409",description:"预览开启隐私保护",msg:"播放失败请关闭隐私遮蔽",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395410",description:"设备达到最大连接数",solution:"请升级设备固件版本",updateTime:1522034841e3},{moduleCode:"",detailCode:"395411",description:"token无权限",msg:"播放失败",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395412",description:"session不存在",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395413",description:"验证token的他异常(不具体) ",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395415",description:"设备通道错",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395416",description:"设备资源受限",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395451",description:"设备不支持的码流类型",msg:"播放失败请重试或切换设备码流",solution:"刷新重试或者切换到高清模式",updateTime:1522034841e3},{moduleCode:"",detailCode:"395452",description:"设备链接流媒体服务器失败",msg:"播放失败,请检查设备网络或重启设备或重新加载",solution:"检查设备网络,重启设备,刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395454",description:"流媒体中关于设备取流会话不存在",msg:"播放失败请重试",solution:"流媒体中关于设备取流会话不存在",updateTime:152222018e4},{moduleCode:"",detailCode:"395455",description:"设备通道未关联",msg:"播放失败,请检查设备通道是否关联",solution:"检查设备通道是否关联",updateTime:152222018e4},{moduleCode:"",detailCode:"395456",description:"设备通道关联设备不在线",msg:"播放失败,请检查设备通道是否上线",solution:"检查设备通道是否上线",updateTime:152222018e4},{moduleCode:"",detailCode:"395457",description:"客户端不支持端到端加密",msg:"播放失败",solution:"客户端不支持端到端加密",updateTime:152222018e4},{moduleCode:"",detailCode:"395458",description:"设备不支持当前并发ECDH密",msg:"客户端不支持端到端加密",solution:"设备不支持当前并发ECDH密",updateTime:152222018e4},{moduleCode:"",detailCode:"395459",description:"VTDU 处理ECDH 加密失败",msg:"播放失败",solution:"VTDU 处理ECDH 加密失败",updateTime:152222018e4},{moduleCode:"",detailCode:"395460",description:"流媒体中关于设备取流会话不存在",msg:"播放失败请重试",solution:"流媒体中关于设备取流会话不存在",updateTime:152222018e4},{moduleCode:"",detailCode:"395492",description:"设备不支持的命令",msg:"操作失败,设备不支持",solution:"",updateTime:152222018e4},{moduleCode:"",detailCode:"395500",description:"服务器处理失败",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395501",description:"流媒体vtdu达到最大负载,请扩容",msg:"播放失败请重试",solution:"服务器负载达到上限,请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395503",description:"vtm返回分配vtdu失败",msg:"播放失败请重试",solution:"vtdu服务异常,请请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395504",description:"流媒体vtdu达到最大负载",msg:"播放失败请重试",solution:"服务器负载达到上限,请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395505",description:"vtm ecdh解密失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395506",description:"vtm 返回IPC不支持取流(需要IPC添加NVR后支持)",msg:"播放失败,请绑定NVR使用",solution:"IPC绑定NVR使用",updateTime:1522034841e3},{moduleCode:"",detailCode:"395544",description:"设备返回无视频源",msg:"播放失败,请检查设备接触情况",solution:"设备是否接触良好; 如果一直无法解决,请联系技术支持",updateTime:1522034841e3},{moduleCode:"",detailCode:"395545",description:"视频分享时间已经结束",msg:"视频分享时间已结束",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395546",description:"vtdu返回达到取流并发路数限制",msg:"并发上限,请升级为企业版",solution:"请升级为企业版,放开并发限制",updateTime:1522034841e3},{moduleCode:"",detailCode:"395547",description:"vtdu返回开放平台用户并发限制",msg:"并发上限,请升级为企业版",solution:"请确定开放平台用户预览是否超过用户并发数量限制",updateTime:1522034841e3},{moduleCode:"",detailCode:"395556",description:"ticket校验失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395557",description:"回放服务器等待流头超时",msg:"播放失败请重试",solution:"刷新重试,检测设备网络,重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395558",description:"查找录像开始时间错误",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395560",description:"群组分享取流二次验证失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395561",description:"分享群组用户被锁住",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395562",description:"群组分享用户权限变更",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395563",description:"认证服务连接失败",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395564",description:"认证超时",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395566",description:"不在分享时间内预览",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395567",description:"分享通道被锁定",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395568",description:"未找到认证类型",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395569",description:"认证返回的参数异常",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395600",description:"分享设备不在分享时间内",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395601",description:"群组分享用户没权限",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395602",description:"群组分享权限变更",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395610",description:"接收流头失败",msg:"播放失败请重试并检查设备网络情况以及设备配置",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395620",description:"心跳超时",msg:"播放失败请重试并检查设备网络情况以及设备配置",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395530",description:"机房故障不可用",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395701",description:"cas信令返回格式错误",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395702",description:"SPGW请求Cas、Status透传超时",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395703",description:"SPGW请求http不通",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396001",description:"客户端参数出错",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396099",description:"客户端默认错误",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396101",description:"不支持的命令",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396102",description:"设备流头发送失败",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396103",description:"cas/设备返回错误1",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396104",description:"cas/设备返回错误-1",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396105",description:"设备返回错误码3",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396106",description:"设备返回错误码4",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396107",description:"设备返回错误码5",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396108",description:"cas信令回应重复",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396109",description:"视频广场取消分享",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396110",description:"设备信令默认错误",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396501",description:"设备数据链路和实际链路不匹配",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396502",description:"设备数据链路重复建立连接",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396503",description:"设备数据链路端口不匹配",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396504",description:"缓存设备数据链路失败(内存块不足)",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396505",description:"设备发送确认头消息重复",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396506",description:"设备数据先于确定头部到达",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396508",description:"设备数据头部长度非法",msg:"播放失败请重试或重启设备",solution:"刷新重试,或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"396509",description:"索引找不到设备数据管理块",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396510",description:"设备数据链路vtdu内存块协议状态不匹配",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396511",description:"设备数据头部没有streamkey错误",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396512",description:"设备数据头部非法(较笼统)",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396513",description:"设备数据长度过小",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396514",description:"设备老协议推流头部没有streamkey错误",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396515",description:"设备老协议推流数据非法",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396516",description:"设备老协议索引找不到内存管理块",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396517",description:"设备老协议推流数据非法",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396518",description:"设备数据包过大",msg:"播放失败请重试或重启设备",solution:"刷新重试,或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"396519",description:"设备推流链路网络不稳定",msg:"播放失败,请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396520",description:"设备推流链路网络不稳定(默认)",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396700",description:"异常数据包",msg:"播放失败,设备重启",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396701",description:"回放结束数据包",msg:"回放结束",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397001",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397002",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397003",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397004",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397005",description:"VTDU连接失败,或VTDU侧断开连接",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397006",description:"vtm断开连接(无需 关注)",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397007",description:"客户端发送缓冲区满(上行带宽太小)",msg:"播放失败,上行带宽过小请检查设备网络情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399000",description:"无效包,包过大",msg:" 检查设备重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399001",description:"地址不合法",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399002",description:"缺少端口",msg:" 播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"170003",description:"refreshToken不存在",solution:"建议用户重新调用logout接口,然后调用openLoginPage接口重新启动登录页面登录",updateTime:1522034841e3},{moduleCode:"",detailCode:"170004",description:"refreshToken已过期",solution:"建议用户重新调用logout接口,然后调用openLoginPage接口重新启动登录页面登录",updateTime:1522034841e3},{moduleCode:"",detailCode:"380011",description:"设备隐私保护中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380045",description:"设备直连取流连接数量过大",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380047",description:"设备不支持该命令",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380077",description:"设备正在对讲中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380102",description:"数据接收异常",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380205",description:"设备检测入参异常",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380209",description:"网络连接超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380212",description:"设备端网络连接超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"101007",description:"手机号未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120503",description:"正在响铃",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390016",description:"vtdu成功响应未携带流头",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101008",description:"手机号码不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120504",description:"室内机正在通话",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390017",description:"无数据流,尚未使用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101009",description:"用户名与手机不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120505",description:"设备操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390018",description:"信令消息体PB解析失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101010",description:"获取验证码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120506",description:"非法命令",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390019",description:"信令消息体PB封装失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101011",description:"验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120507",description:"智能锁密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390020",description:"申请系统内存资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101012",description:"验证码失效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120508",description:"开关锁失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390021",description:"vtdu地址尚未获取到",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101013",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120509",description:"开关锁超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390022",description:"客户端尚未支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101014",description:"密码不正确或者appKey不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120510",description:"智能锁设备繁忙",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390023",description:"获取系统socket资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101015",description:"用户被锁住",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120511",description:"远程开锁功能未打开",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390024",description:"上层填充的StreamSsnId不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101021",description:"验证参数异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120600",description:"临时密码数已达上限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390025",description:"链接服务器失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101026",description:"邮箱已经被注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120601",description:"添加临时密码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390026",description:"客户端请求未收到服务端应答",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101031",description:"邮箱未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120602",description:"删除临时密码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390027",description:"链路断开",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101032",description:"邮箱不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120603",description:"该临时密码不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390028",description:"没有取流链接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101041",description:"获取验证码过于频繁",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120604",description:"指纹锁射频通信失败,请稍后再试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390029",description:"流成功停止",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101043",description:"手机验证码输入错误超过规定次数",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120605",description:"其他用户正在认证中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390030",description:"客户端防串流校验失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102000",description:"设备不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120606",description:"验证已启动,请在120s内进行本地验证和调用添加设备接口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390031",description:"应用层tcp粘包处理缓冲区满",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102001",description:"摄像机不存在",solution:"摄像机未注册到萤石云平台,请仔细检查摄像机的网络配置,确保连接到网络",updateTime:152203484e4},{moduleCode:"",detailCode:"120607",description:"删除用户失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390032",description:"无效状态迁移",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102003",description:"设备不在线",solution:"参考服务中心排查方法",updateTime:152203484e4},{moduleCode:"",detailCode:"120608",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390033",description:"无效客户端状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102004",description:"设备异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120609",description:"设备响应超时,门锁通信故障或者电量不足,请重试.",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390034",description:"向vtm取流流媒体信息请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102007",description:"设备序列号不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120610",description:"获取临时密码列表失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390035",description:"向代理取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102009",description:"设备请求响应超时异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130001",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390036",description:"向代理保活取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105000",description:"设备已被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130002",description:"手机号码已经注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390037",description:"向vtdu取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105001",description:"设备已被别人添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130003",description:"手机验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390038",description:"向vtdu保活取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105002",description:"设备验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130004",description:"终端绑定操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391001",description:"vtm地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107001",description:"邀请不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"149999",description:"数据异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391002",description:"vtm生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107002",description:"邀请验证失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"150000",description:"服务器异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391003",description:"vtm设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107003",description:"邀请用户不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160000",description:"设备不支持云台控制",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391004",description:"vtm设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107004",description:"云存储连接失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160001",description:"用户无云台控制权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391005",description:"vtm解析服务器ip失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"7005",description:"VTDU主动断开连接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107005",description:"VTDU主动断开连接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160002",description:"设备云台旋转达到上限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391006",description:"vtm描述符select失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107006",description:"不能邀请自己",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160003",description:"设备云台旋转达到下限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391007",description:"vtm文件描述符不在可读中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107007",description:"重复邀请",solution:"分享和删除分享必须全部由接口形式操作,如果与萤石客户端混用会造成这个问题,解决办法:在萤石客户端清空所有相关分享数据并重新添加设备,再通过接口操作即可",updateTime:152203484e4},{moduleCode:"",detailCode:"160004",description:"设备云台旋转达到左限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391008",description:"vtm网络发生错误getsockopt",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110001",description:"参数错误",solution:"参数为空或者格式不对",updateTime:152203484e4},{moduleCode:"",detailCode:"160005",description:"设备云台旋转达到右限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391009",description:"vtm描述符select超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110002",description:"accessToken异常或过期",solution:"accessToken有效期为七天,建议在accessToken即将过期或者出现10002错误码的时候重新获取accessToken",updateTime:152203484e4},{moduleCode:"",detailCode:"160006",description:"云台当前操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391101",description:"proxy地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110004",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160007",description:"预置点个数超过最大值",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391102",description:"proxy生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110005",description:"appKey异常",solution:"确认appKey状态,不通过或者冻结状态会返回该错误码",updateTime:152203484e4},{moduleCode:"",detailCode:"160009",description:"正在调用预置点",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391103",description:"proxy设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110006",description:"ip受限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160010",description:"该预置点已经是当前位置",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391104",description:"proxy设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160011",description:"预置点不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391105",description:"proxy解析服务器ip失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110008",description:"签名错误",solution:"①获取签名方式详见apidemo及[旧]API文档 ②注意编码格式为UTF-8",updateTime:152203484e4},{moduleCode:"",detailCode:"160013",description:"设备版本已是最新",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391106",description:"proxy描述符select失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110009",description:"签名参数错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160014",description:"设备正在升级",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391107",description:"proxy文件描述符不在可读中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110010",description:"签名超时",solution:"请调用同步服务器时间接口进行校时",updateTime:152203484e4},{moduleCode:"",detailCode:"160015",description:"设备正在重启",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391108",description:"proxy网络发生错误getsockopt",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110011",description:"未开通萤石云服务",solution:"参照绑定流程",updateTime:152203484e4},{moduleCode:"",detailCode:"160016",description:"加密未开启,无须关闭",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391109",description:"proxy描述符select超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110012",description:"第三方账户与萤石账号已经绑定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160017",description:"设备抓图失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391201",description:"vtdu地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110013",description:"应用没有权限调用此接口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160018",description:"设备升级失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391202",description:"vtdu生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110014",description:"APPKEY下对应的第三方userId和phone未绑定",solution:"获取AccessToken时所用appKey与SDK所用appKey不一致",updateTime:152203484e4},{moduleCode:"",detailCode:"160019",description:"加密已开启",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391203",description:"vtdu设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110017",description:"appKey不存在",solution:"请填写在官网申请的应用秘钥",updateTime:152203484e4},{moduleCode:"",detailCode:"160020",description:"不支持该命令",solution:"请确认设备是否支持该命令",updateTime:152203484e4},{moduleCode:"",detailCode:"391204",description:"vtdu设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110018",description:"AccessToken与Appkey不匹配",solution:"请检查获取accessToken对应的appKey和SDK中设置的appKey是否一致",updateTime:152203484e4},{moduleCode:"",detailCode:"160023",description:"订阅操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110019",description:"密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160024",description:"取消订阅操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110020",description:"请求方法为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160025",description:"客流统计配置失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110021",description:"ticket校验失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160026",description:"设备处于隐私遮蔽状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110022",description:"透传目的地非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160027",description:"设备正在镜像操作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110024",description:"无透传权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160028",description:"设备正在键控动作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110025",description:"appKey被禁止使用通明通道",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160029",description:"设备处于语音对讲状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160030",description:"卡密输入错误次数过多,24小时后再输入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160031",description:"卡密信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160032",description:"卡密状态不对或已过期",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160033",description:"卡密非卖品,只能开通对应的绑定设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110030",description:"appKey和appSecret不匹配",solution:"请检查appKey和appSecret是否对应",updateTime:152203484e4},{moduleCode:"",detailCode:"160035",description:"购买云存储服务失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110031",description:"子账户或萤石用户没有权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160040",description:"添加的设备不在同一局域网",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110032",description:"子账户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160041",description:"添加的设备被其他设备关联或响应超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110033",description:"子账户未设置授权策略",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160042",description:"添加的设备密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110034",description:"子账户已存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160043",description:"添加的设备超出最大数量",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110035",description:"获取子账户AccessToken异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160044",description:"添加的设备网络不可达超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110036",description:"子账户被禁用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160045",description:"添加的设备的IP和其他通道的IP冲突",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110051",description:"无权限进行抓图",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160046",description:"添加的设备的IP和本设备的IP冲突",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160047",description:"码流类型不支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120002",description:"设备不存在",solution:"①设备没有注册到萤石云平台,请检查下设备网络参数,确保能正常连接网络②设备序列号不存在",updateTime:152203484e4},{moduleCode:"",detailCode:"160048",description:"带宽超出系统接入带宽",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120003",description:"参数异常,SDK版本过低",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160049",description:"IP或者端口不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120004",description:"参数异常,SDK版本过低",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160050",description:"添加的设备版本不支持需要升级才能接入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120005",description:"安全认证失败,需进行SDK安全认证",solution:"已去掉安全验证",updateTime:152203484e4},{moduleCode:"",detailCode:"160051",description:"添加的设备不支持接入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120006",description:"网络异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160052",description:"添加的设备通道号出错",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120007",description:"设备不在线",solution:"参考服务中心排查方法",updateTime:152203484e4},{moduleCode:"",detailCode:"160053",description:"添加的设备分辨率不支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120008",description:"设备响应超时",solution:"设备响应超时,请检测设备网络或重试",updateTime:152203484e4},{moduleCode:"",detailCode:"160054",description:"添加的设备账号被锁定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120009",description:"子账号不能添加设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160055",description:"添加的设备取码流出错",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120010",description:"设备验证码错误",solution:"验证码在设备标签上,六位大写字母,注意大小写",updateTime:152203484e4},{moduleCode:"",detailCode:"160056",description:"删除设备失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120012",description:"设备添加失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160057",description:"删除的设备未关联",solution:"检查IPC与NVR是否有关联关系",updateTime:152203484e4},{moduleCode:"",detailCode:"120013",description:"设备已被别人添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160060",description:"地址未绑定",solution:"请前往官网设置直播",updateTime:152203484e4},{moduleCode:"",detailCode:"120014",description:"设备序列号不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160061",description:"账户流量已超出或未购买,限制开通",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120015",description:"设备不支持该功能",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160062",description:"该通道直播已开通",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120016",description:"当前设备正在格式化",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160063",description:"直播未使用或直播已关闭",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120017",description:"设备已被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160070",description:"设备不能转移给自己",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120018",description:"该用户不拥有该设备",solution:"确认设备是否属于用户",updateTime:152203484e4},{moduleCode:"",detailCode:"160071",description:"设备不能转移,设备与其他设备存在关联关系",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400001",description:"参数为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120019",description:"设备不支持云存储服务",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160072",description:"设备不能转移,通道被分享给其他用户或者分享到视频广场",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400002",description:"参数错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120020",description:"设备在线,被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160073",description:"云存储转移失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400025",description:"设备不支持对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120021",description:"设备在线,但是未被用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160080",description:"当前正在声源定位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400029",description:"没有初始化或资源被释放",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120022",description:"设备在线,但是已经被别的用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160081",description:"当前正在轨迹巡航",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400030",description:"json解析异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120023",description:"设备不在线,未被用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160082",description:"设备正在响应本次声源定位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400031",description:"网络异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120024",description:"设备不在线,但是已经被别的用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160083",description:"当前正在开启隐私遮蔽",solution:"设备正在操作隐私遮蔽,无法进行当前操作",updateTime:152203484e4},{moduleCode:"",detailCode:"400032",description:"设备信息异常为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120025",description:"重复申请分享",solution:"确认设备是否由添加过该设备且申请过分享的账户下是否还存在分享记录",updateTime:152203484e4},{moduleCode:"",detailCode:"160084",description:"当前正在关闭隐私遮蔽",solution:"设备正在操作隐私遮蔽,无法进行当前操作",updateTime:152203484e4},{moduleCode:"",detailCode:"400034",description:"取流超时",solution:"一般是由于网络状况不好导致,可以尝试下让用户重新播放",updateTime:152203484e4},{moduleCode:"",detailCode:"120026",description:"视频广场不存在该视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"380290",description:" 连接CAS服务器失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400035",description:"设备已加密,需要输入验证码",solution:"收到此错误码,需要让用户输入验证码后,调用EZPlayer.setPlayKey传入验证码,并重新调用播放函数",updateTime:152203484e4},{moduleCode:"",detailCode:"120027",description:"视频转码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361001",description:"对讲服务端排队超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400036",description:"播放验证码错误",solution:"收到此错误码,需要让用户输入验证码后,调用EZPlayer.setPlayKey传入验证码,并重新调用播放函数",updateTime:152203484e4},{moduleCode:"",detailCode:"120028",description:"设备固件升级包不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361002",description:"对讲服务端处理超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400037",description:"surfacehold错误",solution:"请检查是否是播放之前销毁了surface,收到此错误也可以重新建立surface后播放",updateTime:152203484e4},{moduleCode:"",detailCode:"120029",description:"设备不在线,但是已经被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361003",description:"设备链接对讲服务器超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400100",description:"未知错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120030",description:"该用户不拥有该视频广场视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361004",description:"服务器内部错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400200",description:"player sdk出错,这种错误一般开发者也是无法解决,不具体分类传出,传一个统一的inner错误码出去",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120031",description:"开启终端绑定,硬件特征码验证失败",solution:"请在萤石客户端关闭终端绑定,参考此步骤",updateTime:152203484e4},{moduleCode:"",detailCode:"361005",description:"解析消息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400300",description:"内存溢出",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120032",description:"该用户下通道不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361006",description:"请求重定向--需要向其他服务申请对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400901",description:"设备不在线,可以提示用户",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120033",description:"无法收藏自己分享的视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361007",description:"请求url非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400902",description:"accesstoken异常或失效,需要重新获取accesstoken,并传入到sdk",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120034",description:"该用户下无设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361008",description:"token失效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400903",description:"当前账号开启了终端绑定,只允许指定设备登录操作,提示用户登录i.ys7.com解除终端绑定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120090",description:"用户反馈失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361009",description:"设备验证码或者通信秘钥不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400904",description:"设备正在对讲中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120095",description:"APP包下载失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361010",description:"设备已经在对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400905",description:"设备开启了隐私保护,不允许预览、对讲等",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120096",description:"APP包信息删除失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361011",description:"设备10s响应超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120101",description:"视频不支持分享给本人",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361012",description:"设备不在线",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320002",description:"参数无效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120102",description:"无相应邀请信息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361013",description:"设备开启隐私保护拒绝对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320003",description:"暂不支持此操作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120103",description:"好友已存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361014",description:"token无权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320004",description:"内存溢出",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120104",description:"好友不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361015",description:"设备返回session不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320005",description:"创建CAS session失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120105",description:"好友状态错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361016",description:"验证token其他异常错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320006",description:"创建cloud session失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120106",description:"对应群组不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361017",description:"服务端监听设备建立端口超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320007",description:"token失效",solution:"重新设置token后再重试",updateTime:152203484e4},{moduleCode:"",detailCode:"120107",description:"不能添加自己为好友",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361018",description:"设备链路异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320008",description:"token池里面没有token,请传入token",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120108",description:"当前用户和所添加用户不是好友关系",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361019",description:"对讲服务端不支持的信令消息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320009",description:"传入新的INIT_PARAM并reset(保留,目前未用)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120109",description:"对应分享不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361020",description:"对讲服务端解析对讲请求未携带会话描述能力集",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320010",description:"请重试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120110",description:"好友群组不属于当前用户",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361021",description:"对讲服务端优先能力集结果为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320011",description:"500毫秒后请重试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120111",description:"好友不是等待验证状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361022",description:"cas链路异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320012",description:"token池已满",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120112",description:"添加应用下的用户为好友失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361023",description:"对讲服务端分配对讲会话资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320013",description:"P2P client超过限制",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120201",description:"操作报警信息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361024",description:"对讲服务端解析信令消息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320014",description:"sdk未初始化",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120202",description:"操作留言信息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390001",description:"通用错误返回",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320015",description:"超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120301",description:"根据UUID查询报警消息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390002",description:"入参为空指针",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320016",description:"正在打洞中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120302",description:"根据UUID查询图片不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390003",description:"入参值无效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320017",description:"没有视频文件头(播放器层面产生和处理此错误)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120303",description:"根据FID查询图片不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390004",description:"信令消息解析非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320018",description:"解码错误/超时(播放器层面产生和处理此错误)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120305",description:"设备ip解析错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390005",description:"内存资源不足",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320019",description:"取消(保留,用户不用处理)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120401",description:"用户云空间信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390006",description:"协议格式不对或者消息体长度超过STREAM_MAX_MSGBODY_LEN",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320020",description:"播放过程中预连接被用户清除预操作信息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120402",description:"云空间操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390007",description:"设备序列号长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320021",description:"流加密码不对",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120403",description:"用户目录不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390008",description:"取流url长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320022",description:"未传入播放窗口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120404",description:"要操作的目标目录不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390009",description:"解析vtm返回vtdu地址不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"100200",description:"操作成功",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120405",description:"要删除的文件信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390010",description:"解析vtm返回级联vtdu地址不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101001",description:"用户名不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120406",description:"已开通云存储",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390011",description:"解析vtm返回会话标识长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101002",description:"用户名已被占用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120407",description:"开通记录失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390012",description:"vtdu返回流头长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101003",description:"密码不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120500",description:"获取数据错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390013",description:"vtdu会话长度非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101004",description:"密码为同一字符",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120501",description:"开锁失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390014",description:"回调函数未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101006",description:"手机号码已经被注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120502",description:"室内机未收到呼叫",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390015",description:"vtdu成功响应未携带会话标识",solution:"",updateTime:152203484e4}],is="200",rs="操作成功!",Yo={data:ns,code:is,msg:rs},Xo=function(){function f(u,n){fe(this,f),this.coreX=u,this.coreY=n,console.log("ErrorCode",Yo)}return dt(f,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"matchErrorInfo",value:function(n){return Yo.data.find(function(i){return i.detailCode.substr(-4)==n})}}]),f}(),os={color:"red",backgroundColor:"red",activeColor:"red",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-0",iconId:"deviceID",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"},{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-1",iconId:"deviceName",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]},as={color:"blue",backgroundColor:"blue",activeColor:"blue",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-footer-0",iconId:"play",part:"left",defaultActive:0,isrender:0,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]},Qo={header:os,footer:as},ds=function f(u){this.jsPlugin=u;var n={isMouseDown:!1,isOver:!1,mousePosition:null,oldTime:null,nowTime:null,moved:null,hoverTime:"2018-12-07 12:00:00",hoverLeft:0,timeTipShow:!1,randomNum:123,timeWidthTbls:[60,1800,3600,86400],timeUnits:["范围: 1分钟; 单位: 秒","范围: 30分钟; 单位: 分钟","范围: 1小时; 单位: 分钟","范围: 1天; 单位: 小时","范围: 3天; 单位: 小时"],drawPen:null,timeSection:[],canvasWidth:null,canvasHeight:null,timeTips:null},i=this;Object.keys(n).forEach(function(r){i[r]=n[r]}),this.options={width:this.canvasWidth,height:48,time:new Date().getTime(),timeSection:[],timeWidth:0},f.prototype.subTime=function(r){return r<10?"0"+r:r},f.prototype.tranTime=function(r){var a=r;if(r){var l=new Date(r);a=l.getFullYear()+"/"+(l.getMonth()+1)+"/"+l.getDate()+" "+this.subTime(l.getHours())+":"+this.subTime(l.getMinutes())+":"+this.subTime(l.getSeconds())}return a},f.prototype.init=function(r){r.width&&document.getElementById(r.id).setAttribute("width",parseInt(r.width,10)+"px");var a=this,l=this.options;a.randomNum=(Math.random()+"").split(".").join(""),a.timeWidthTblIndex=l.timeWidth;var s=document.querySelector("#".concat(this.jsPlugin.id,"-canvas"));a.drawPen=s.getContext("2d"),a.nowTime=l.time||Date.now(),a.timeSection=l.timeSection||[],a.canvasWidth=s.offsetWidth,a.canvasHeight=s.offsetHeight,a.updata(),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mousemove",function(b){a.options.readOnly||a.mousemove(b)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseover",function(b){a.options.readOnly||a.mouseover(b)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseleave",function(b){a.options.readOnly||a.mouseleave(b)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mousedown",function(b){a.options.readOnly||a.mousedown(b)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseup",function(b){if(!a.options.readOnly){var T=r.onChange;a.mouseUpFn(b,T)}})},f.prototype.setWidth=function(r){var a=this,l=this;r.width&&(document.getElementById(this.jsPlugin.id).style.width=r.width,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.width=r.width,document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.width=r.width,l.canvasWidth=r.width,setTimeout(function(){a.updata({time:new Date})},500))},f.prototype.mousemove=function(r){if(this.isMouseDown&&this.isOver){var a=this.mousePosition-r.pageX;if(a===0)return;var l=0;switch(this.timeWidth){case 60:l=1/10;break;case 1800:l=1/20*60;break;case 3600:l=1/20*60;break;case 86400:l=1/30*60*60;break}var s=new Date(this.oldTime).getTime()+a*l*1e3;this.updata({time:s}),this.moved=!0}else{var b=parseInt(document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).offsetLeft,10);this.mousePosition=r.pageX-b,this.updata()}},f.prototype.mousedown=function(r){this.isMouseDown=!0,this.mousePosition=r.pageX,this.oldTime=this.nowTime},f.prototype.mouseover=function(r){this.isOver=!0},f.prototype.mouseleave=function(r){this.isOver=!1,this.isMouseDown=!1,this.updata()},f.prototype.changeSize=function(r){console.log("changeSize",r),this.options.timeWidth=r,this.updata({timeWidth:r})},f.prototype.mouseUpFn=function(r,a){if(this.isMouseDown&&(this.isMouseDown=!1,this.moved)){this.moved=!1;var l=this.subTime(new Date(this.nowTime).getHours())+":"+this.subTime(new Date(this.nowTime).getMinutes())+":"+this.subTime(new Date(this.nowTime).getSeconds()),s=new Date(this.oldTime).getFullYear()+"/"+(new Date(this.oldTime).getMonth()+1)+"/"+new Date(this.oldTime).getDate();this.nowTime=new Date("".concat(s," ").concat(l)),this.updata({time:this.nowTime}),this.oldTime=this.nowTime,console.log("nowTime",new Date(this.nowTime),"".concat(s," ").concat(l)),a(this.nowTime)}},f.prototype.readOnly=function(r){console.log("更改为只读"),this.options.readOnly=!0,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.cursor="not-allowed"},f.prototype.unReadOnly=function(r){console.log("更改为只读"),this.options.readOnly=!1,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.cursor="pointer"},f.prototype.run=function(r){this.isMouseDown||this.updata(r)},f.prototype.getTime=function(r){console.log("this",this),console.log("当前时间",new Date(this.nowTime))},f.prototype.updata=function(r){var a=this;r=r||{},a.nowTime=r.time||a.nowTime,a.timeSection=r.timeSection||a.timeSection,a.timeWidthTblIndex=r.timeWidth||a.timeWidthTblIndex,a.timeWidth=a.timeWidthTbls[r.timeWidth||a.timeWidthTblIndex],a.timeUnit=a.timeUnits[r.timeWidth||a.timeWidthTblIndex],r.timeWidth===0&&(a.timeWidthTblIndex=0,a.timeWidth=a.timeWidthTbls[0],a.timeUnit=a.timeUnits[0]),a.drawPen.fillStyle="#000000",a.drawPen.fillRect(0,0,a.canvasWidth,a.canvasHeight),a.drawScale(),a.drawRecord(),a.drawOtherMsg(),document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.width=a.options.width+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.width=a.options.width+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.height=a.options.height+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.height=a.options.height+"px"},f.prototype.drawSolidLine=function(r,a,l,s,b,T){this.drawPen.save(),this.drawPen.strokeStyle=T,this.drawPen.lineWidth=b,this.drawPen.beginPath(),this.drawPen.moveTo(r,a),this.drawPen.lineTo(l,s),this.drawPen.stroke(),this.drawPen.restore()},f.prototype.drawString=function(r,a,l,s,b){this.drawPen.font="12px serif",this.drawPen.fillStyle="#ffffff",this.drawPen.textAlign=s||"left",this.drawPen.fillText(r,a,l+10)},f.prototype.drawScale=function(){var r=this,a="rgba(255,255,255)",l=new Date(r.nowTime),s=l.getFullYear(),b=l.getSeconds(),T=l.getMinutes(),C=l.getHours(),y=l.getDate(),h=0;switch(r.timeWidth){case 60:{var D=parseInt(r.canvasWidth/10);l.setSeconds(l.getSeconds()-parseInt(D/2,10)),y=l.getDate(),C=l.getHours(),T=l.getMinutes(),b=l.getSeconds();for(var _=0;_a.canvasWidth&&(_=a.canvasWidth),_<=0&&(_=0),_}},f.prototype.drawOtherMsg=function(){this.drawSolidLine(this.canvasWidth/2,0,this.canvasWidth/2,this.canvasHeight,2,"#1890FF"),this.drawPen.shadowBlur=0,this.isOver&&!this.isMouseDown?(this.mouseTime=this.mousePosition/this.canvasWidth*this.timeWidth*1e3+this.nowTime-this.timeWidth/2*1e3,this.mouseString=this.tranTime(this.mouseTime),this.hoverTime=this.mouseString,this.hoverLeft=this.mousePosition-60,this.timeTipShow=!0):this.timeTipShow=!1}},ls=function(){function f(u){if(fe(this,f),this.jSPlugin=u,!document.getElementById("".concat(this.jSPlugin.id,"-audioControls")))return!1;this.currentTimeWidth=0,this.date=new Date,this.datepickerVisible=!1,this.seekTimer=null,this.disabled=!1,this.seekFrequency=2e3,this.jSPlugin.params&&this.jSPlugin.params.seekFrequency&&(this.seekFrequency=this.jSPlugin.params.seekFrequency),this.recInit()}return dt(f,[{key:"recInit",value:function(){var n=this;this.currentTimeWidth=0;var i=parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width,10)-100,r=document.createElement("div");r.style="display:inline-block;height:48px;",r.id=this.jSPlugin.id+"-canvas-container";var a=document.createElement("canvas");a.id=this.jSPlugin.id+"-canvas",a.className="time-line-body",a.height="48",a.width=i,a.style="display:inline-block;",a.innerHTML="该浏览器不支持canvas",r.appendChild(a),Wn(r,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")));var l=document.createElement("div");l.className="timeline-controls",l.style="display:flex;width:100px;height:48px;text-align:center;line-height: 48px;vertical-align: top;background: #000000;";var s=`
add reduce
`);l.innerHTML=s,Wn(l,r),this.timeLine=new ds(this.jSPlugin),this.timeLine.init({id:this.jSPlugin.id+"-canvas",width:i,onChange:function(h){console.log("time",h,new Date(h).Format("yyyyMMddhhmmss"));var D=new Date(h).Format("yyyyMMddhhmmss");if(console.log("----------------this.jSPlugin.url",n.jSPlugin.url),Ke(n.jSPlugin.url).type==="cloud.rec"||n.jSPlugin.capacity&&n.jSPlugin.capacity.support_seek_playback=="1"){var _=function(){n.jSPlugin.seek(D.substr(8,6),"235959"),n.unSyncTimeLine(),setTimeout(function(){n.syncTimeLine()},6e3)};n.seekTimer?clearTimeout(n.seekTimer):_(),n.seekTimer=setTimeout(function(){_(),clearTimeout(n.seekTimer),n.seekTimer=null},n.seekFrequency)}else{var E=function(){setTimeout(function(){n.disabled=!1},n.seekFrequency)},w=function(S){n.disabled=!0,n.jSPlugin.pause().then(function(){console.log("暂停成功"),n.jSPlugin.resume(D).then(function(d){console.log("恢复成功:",d),n.jSPlugin.Theme&&n.jSPlugin.Theme.setDecoderState({play:!0}),n.jSPlugin.Theme&&n.jSPlugin.Theme.decoderState.state.sound&&n.jSPlugin.openSound(),S&&S()}).catch(function(d){console.log("恢复失败",d)})}).catch(function(){console.log("暂停失败"),n.jSPlugin.resume(D).then(function(d){console.log("恢复成功"),n.jSPlugin.Theme&&n.jSPlugin.Theme.setDecoderState({play:!0}),S&&S()}).catch(function(d){console.log("恢复失败",d)})})};n.disabled?(console.log("操作频繁,等待2秒后执行"),n.seekTimer&&clearTimeout(n.seekTimer),n.seekTimer=setTimeout(function(){w(E)},n.seekFrequency)):w(E)}}}),this.syncTimeLine(),Mt("".concat(this.jSPlugin.staticPath,"/rec/datepicker.min.css")),ut("".concat(this.jSPlugin.staticPath,"/rec/jquery.min.js"),function(){ut("".concat(n.jSPlugin.staticPath,"/rec/datepicker.js"),function(){ut("".concat(n.jSPlugin.staticPath,"/rec/datepicker.zh-CN.js"),function(){!document.getElementsByClassName("datepicker-container")[0]&&$("#".concat(n.jSPlugin.id,"-datepicker")).datepicker&&$("#".concat(n.jSPlugin.id,"-datepicker")).datepicker({autoShow:!1,autoHide:!0,autoPick:!0,language:"zh-CN",date:new Date(et("begin",n.jSPlugin.params.url).replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"))||new Date,format:"yyyy-mm-dd",endDate:new Date,inline:!0,container:document.getElementById("".concat(n.jSPlugin.id,"-wrap"))}),document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),n.datepickerVisible=!1,$("#".concat(n.jSPlugin.id,"-datepicker")).on("pick.datepicker",function(y){console.log("重新选择日期",y.date,new Date(y.date).Format("yyyyMMdd"),new Date(document.getElementById("".concat(n.jSPlugin.id,"-datepicker")).value).Format("yyyyMMdd")),y.date>new Date||new Date(y.date).Format("yyyyMMdd")===new Date(document.getElementById("".concat(n.jSPlugin.id,"-datepicker")).value).Format("yyyyMMdd")?y.preventDefault():(document.getElementById("".concat(n.jSPlugin.id,"-datepicker")).value=new Date(y.date).Format("yyyy-MM-dd"),n.renderRec(y.date),n.jSPlugin.decoderState&&n.jSPlugin.decoderState.state?n.jSPlugin.decoderState.state.cloudRec?n.jSPlugin.changePlayUrl({begin:new Date(y.date).Format("yyyyMMdd"),type:"cloud.rec"}):n.jSPlugin.decoderState.state.rec?n.jSPlugin.changePlayUrl({begin:new Date(y.date).Format("yyyyMMdd"),type:"rec"}):n.jSPlugin.changePlayUrl({begin:new Date(y.date).Format("yyyyMMdd")}):n.jSPlugin.changePlayUrl({begin:new Date(y.date).Format("yyyyMMdd")})),document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),n.datepickerVisible=!1,n.jSPlugin.decoderState&&n.jSPlugin.decoderState&&n.jSPlugin.decoderState.state&&n.jSPlugin.decoderState.state.zoom&&(n.jSPlugin.setDecoderState({zoom:!1}),n.jSPlugin.Zoom.stopZoom())}),$("#".concat(n.jSPlugin.id,"-datepicker")).off("click").on("click",function(y){console.log("点击日期"),n.datepickerVisible?document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"):document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="inline"),n.datepickerVisible=!n.datepickerVisible})})})}),document.getElementById("".concat(this.jSPlugin.id,"-timeline-scale-add")).onclick=function(){var y=n.currentTimeWidth;y<3&&n.timeLine.changeSize(++n.currentTimeWidth)},document.getElementById("".concat(this.jSPlugin.id,"-timeline-scale-sub")).onclick=function(){var y=n.currentTimeWidth;y>0&&n.timeLine.changeSize(--n.currentTimeWidth)};var b=et("begin",this.jSPlugin.url)||new Date().Format("yyyyMMdd");this.renderRec("".concat(b.slice(0,4),"-").concat(b.slice(4,6),"-").concat(b.slice(6,8))),this.observer=new MutationObserver(function(y,h){n.recAutoSize()});var T={attributes:!0,attributeOldValue:!0,attributeFilter:["style"]},C=document.getElementById("".concat(this.jSPlugin.id));this.observer.observe(C,T)}},{key:"setDatepickerDate",value:function(n){if(document.getElementsByClassName("datepicker-container")[0]){var i=document.getElementsByClassName("datepicker-container")[0],r=i.parentNode;r.removeChild(i),document.getElementById("".concat(this.jSPlugin.id,"-datepicker")).value=n.replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"),$("#".concat(this.jSPlugin.id,"-datepicker")).datepicker({autoShow:!1,autoHide:!0,autoPick:!0,language:"zh-CN",defaultDate:n,format:"yyyy-mm-dd",endDate:new Date,inline:!0,container:document.getElementById("".concat(this.jSPlugin.id,"-wrap"))})}}},{key:"datepickerHide",value:function(){document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),this.datepickerVisible=!1}},{key:"datepickerShow",value:function(){document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="inline"),this.datepickerVisible=!0}},{key:"recAutoSize",value:function(){var n=this;if(document.getElementById("".concat(this.jSPlugin.id,"-canvas"))){var i=parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width,10)-100;i!==parseInt(document.getElementById("".concat(this.jSPlugin.id,"-canvas")).width)&&(document.getElementById("".concat(this.jSPlugin.id,"-canvas")).width=i,this.timeLine.init({id:"".concat(this.jSPlugin.id,"-canvas"),width:i,onChange:function(a){console.log("time",a,new Date(a).Format("yyyyMMddhhmmss")),console.log("jSPlugin",n.jSPlugin);var l=new Date(a).Format("yyyyMMddhhmmss");n.jSPlugin.changePlayUrl({begin:l})}}),this.renderRec(this.date),this.syncTimeLine())}}},{key:"syncTimeLine",value:function(){var n=this;this.jSPlugin.recTimer&&clearInterval(this.jSPlugin.recTimer),this.jSPlugin.recTimer=setInterval(function(){var i=n.jSPlugin.getOSDTime();i.then(function(r){var a=r.data;a===-1?console.log("获取播放时间错误"):a>0&&n.timeLine.run({time:new Date(a>1e12?a:a*1e3)})}).catch(function(r){})},1e3)}},{key:"unSyncTimeLine",value:function(){this.jSPlugin.recTimer&&clearInterval(this.jSPlugin.recTimer)}},{key:"renderRec",value:function(n){var i=this;this.date=n;var r=this,a=new Date(new Date(n).Format("yyyy-MM-dd 00:00:00").replace(/-/g,"/")).getTime(),l=new Date(new Date(n).Format("yyyy-MM-dd 23:59:59").replace(/-/g,"/")).getTime();this.timeLine.getRecord([],a,l),console.log("-----------233---------this.jSPlugin.url",this.jSPlugin.url);var s={accessToken:this.jSPlugin.accessToken,recType:Ke(this.jSPlugin.url).type==="cloud.rec"?1:2,deviceSerial:Ke(this.jSPlugin.url).deviceSerial,channelNo:Ke(this.jSPlugin.url).channelNo,startTime:a,endTime:l,version:"2.0"},b=function(y){if(y.data&&y.data.files&&y.data.files.length>0){var h=y.data.files,D=new Date().getTime(),_=y.data.isAll;if(_)i.timeLine.getRecord(h,a,l);else{var E=function w(){function z(S){S.data&&S.data.files&&S.data.files.length>0?S.data.isAll==!1?(S.data.files&&(h=h.concat(S.data.files)),D=S.data.nextFileTime>0?S.data.nextFileTime:new Date().getTime(),w()):(console.log("云存储执行渲染片段"),r.timeLine.getRecord(h,a,l)):r.timeLine.getRecord(h,a,l)}s.startTime=D,Gn(this.jSPlugin.env.domain+"/api/lapp/video/by/time","POST",s,"",z)};E()}i.timeLine.run({time:new Date(a)})}else y.data&&y.data.length>0&&(console.log("获取本地录像片段成功",y),r.timeLine.getRecord(y.data,a,l),r.timeLine.run({time:new Date(a)}))},T=this.jSPlugin.env.domain+"/api/lapp/video/by/time";Gn(T,"POST",s,"",b)}}]),f}(),sn=function(u){console.log("执行TimeLine - params",u),this.state={id:u.id,start:"00:00:00",end:"24:00:00",current:0,timelag:30,timeArr:[],availTimeLine:[],scrollTop:0,index:0,date:"",noTimeLineTxt:"",disabled:!1};var n=this;this.setState=function(i){Object.keys(i).forEach(function(r){n.state[r]=i[r],r==="scrollTop"&&document.getElementById("time-line-item").parentNode.scrollTo(0,i[r]),r==="current"&&(document.getElementById("time-line-current").innerHTML=i[r])})},this.setDisabled=function(i){this.setState({disabled:i}),document.getElementById("time-line-item").parentNode.style.overflowY=i?"hidden":"scroll"},this.timeToSecond=function(i){var r=i.split(":"),a=Number(r[0]),l=Number(r[1]),s=Number(r[2]);return a*60*60+l*60+(s||0)},this.minuteToTime=function(i){var r=Math.floor(i/60),a=i%60;return(r>9?r:"0"+r)+":"+(a>9?a:"0"+a)},this.timeToMinute=function(i){var r=i.split(":"),a=Number(r[0]),l=Number(r[1]);return a*60+l},this.getPalyParam=u.getPalyParam,document.getElementById("time-line-item").parentNode.ontouchstart=function(){if(n.state.disabled)return!1;u.ontouchstart()},document.getElementById("time-line-item").parentNode.ontouchmove=function(){if(n.state.disabled)return!1;u.ontouchmove()},document.getElementById("time-line-item").parentNode.ontouchend=function(){if(n.state.disabled)return!1;var i,r=new Promise(function(a,l){var s=-1;i=setInterval(function(){var b=document.getElementById("time-line-item").parentNode.scrollTop;b!==s?(console.log("scolling",b,s),s=b):(console.log("scoll stop",b,s),clearInterval(i),a(b))},100)});r.then(function(a){console.log("scollPromise: then",a,n),n.rectTopTotime(a),console.log("页面滚动实际高度",a,n.state),n.getPalyParam({current:n.state.current})}),u.ontouchend()},this.matchTimeDot()};sn.prototype.changeScale=function(f){this.setState({timelag:f}),this.matchTimeDot()},sn.prototype.setDateLine=function(f,u){f.length>0?(typeof u=="undefined"&&(u=f.length-1),this.setState({availTimeLine:f,start:f[u].st,end:f[u].et,current:f[u].st}),console.log("this.state",this.state),this.matchRecTimeDot(),this.primaryOffsetH()):(this.setState({availTimeLine:[]}),console.log("this.state",this.state),this.matchRecTimeDot())},sn.prototype.matchTimeDot=function(){var f=this.state,u=f.start,n=f.end,i=f.timelag;f.availTimeLine,console.log("start",u,"end",n);var r=[],a=this.timeToMinute(n);a=Math.floor(a/i)*i;for(var l=a;l>=0;){var s=0,b=0,T=[];l==a&&(s=70),l==0&&(b=230);var C=this.minuteToTime(l);r.push({id:l,current:C,label:"a"+l,marginTop:s,marginBottom:b,recArr:T}),l=l-i}this.setState({timeArr:r}),this.renderDateLine()},sn.prototype.matchRecTimeDot=function(){var f=this.state,u=f.start,n=f.end,i=f.timelag,r=f.availTimeLine,a=f.timeArr;console.log("start",u,"end",n);var l=[],s=r.length;if(s===0)for(var b=0;b_&&a[b].id')}),b+="
').concat(r.current,"
"),l.innerHTML=b,i.appendChild(l)})},sn.prototype.primaryOffsetH=function(){var f=this.state,u=f.start,n=f.timelag,i=f.timeArr,r=i[0].current,a=this.timeToSecond(r),l=this.timeToSecond(u),s=a-l,b=Math.ceil(s/n)+60;this.setState({scrollTop:b}),console.log("起始偏移量",b)},sn.prototype.currentOffsetH=function(){var f=this.state,u=f.current,n=f.timelag,i=f.timeArr,r=i[0].current,a=this.timeToSecond(r),l=this.timeToSecond(u),s=a-l,b=Math.ceil(s/n)+60;this.setState({scrollTop:b})},sn.prototype.rectTopTotime=function(f){var u=this.state.timelag,n=Math.floor(f/60),i=f-n*60,r,a;if(console.log("index:",n,"offsetH:",i),i==0)r=this.state.timeArr[n-1].current,a=0;else{var l=this.state.timeArr[n].current,s=this.timeToMinute(l),b=60-i,T=b*u,C=Math.floor(T/60)+s,y=Math.floor(T/60)*60;a=Math.ceil(T-y),r=this.minuteToTime(C)}this.setState({current:r+":"+(a>9?a:"0"+a),scrollTop:f})},sn.prototype.stepScrollTimeLine=function(f){this.setState({current:f}),this.currentOffsetH()},sn.prototype.secondCountDown=function(f){var u=this.state.current,n=u.split(":"),i=Number(n[0]),r=Number(n[1]),a=Number(n[2]),l=i*60*60+r*60+a+1,s=Math.floor(l/3600),b=Math.floor((l-s*3600)/60),T=l-s*3600-b*60;this.setState({current:(s>9?s:"0"+s)+":"+(b>9?b:"0"+b)+":"+(T>9?T:"0"+T)})};var ss=sn;Date.prototype.Format=function(f){var u={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(f)&&(f=f.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in u)new RegExp("("+n+")").test(f)&&(f=f.replace(RegExp.$1,RegExp.$1.length==1?u[n]:("00"+u[n]).substr((""+u[n]).length)));return f};function ea(f){var u=new Date(f),n=u.getHours(),i=u.getMinutes(),r=u.getSeconds();return(n>9?n:"0"+n)+":"+(i>9?i:"0"+i)+":"+(r>9?r:"0"+r)}var cs=function(){function f(u,n,i){var r=this;fe(this,f),this.changeRecSpeed=n,this.resetMobileZoomStatus=i,this.isMobile=!0,this.jSPlugin=u,this.timer=null,this.date=new Date().Format("yyyy-MM-dd"),this.begin=(new Date().Format("yyyy-MM-dd")+" 00:00:00").replace(/-/g,"/"),this.end=(new Date().Format("yyyy-MM-dd")+" 23:59:59").replace(/-/g,"/"),this.initBegin=null,this.initEnd=null,this.type=Ke(this.jSPlugin.url).type,this.operating=!1,this.seekTimer=null,this.disabled=!1,this.seekFrequency=2e3,this.jSPlugin.params&&this.jSPlugin.params.seekFrequency&&(this.seekFrequency=this.jSPlugin.params.seekFrequency);var a=document.createElement("style");if(a.innerHTML=` body{ padding: 0; margin: 0; } .time-line-container { text-align: left; height: 300px; /* outline: 1px solid red; */ /* background: gray; */ position: relative; /* padding-top: 60px; */ margin-top: 20px; } .time-line-container .time-line-item-container { display: inline-block; /* height: 400px; */ width: 30%; /* background: indianred; */ overflow-y: scroll; overflow-x: hidden; /* padding-top: 60px; */ height: 300px; box-sizing: border-box; white-space: nowrap; position: relative; } .time-line-container .time-line-item-container::-webkit-scrollbar { width: 0px; /*滚动条宽度*/ height: 0px; /*滚动条高度*/ } .time-line-item .time-item { position: relative; box-sizing: border-box; height: 60px; font-size: 12px; color: rgb(150, 150, 150); border-right: 6px solid; border-right-color: #ddd; } .time-line-item .time-item .scale { width: 6px; height: 9px; border-bottom: 1px solid #ccc; float: right; clear: both; } .time-line-item .time-item .item-unavail { width: 6px; position: absolute; left: 100%; background-color: #ddd; } .time-line-container .current-time { position: absolute; left: 0; top: 40px; height: 29px; /* line-height: 58px; */ border-bottom: 1px solid #648FFC; width: 60%; margin-left: 26%; } .time-line-container .current-time .current-time-bg { position: relative; top: 15px; width: 100px; height: 29px; line-height: 29px; left: -70px; font-size: 12px; color: #2C2C2C; } .time-line-container .current-time .current-time-bg::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 100%; background: #648FFC; top: 11px; position: absolute; right: 30px; } .date-switch-container { height: 40px; position: relative; text-align: center; margin: 20px 10px; } .date-switch-container .current-date { line-height: 40px; height: 22px; font-size: 16px; color: #2C2C2C; text-align: center; font-weight: bold; } .date-container { width: 40px; height: 40px; position: absolute; right: 0; top: 0; } .rec-type-container { display: flex; justify-content: space-between; } .rec-type-container .rec-type-text { padding: 0 15px; font-size: 12px; color: #2C2C2C; } .rec-type-container .rec-type-switch { padding: 0 20px; } .date-container input { position: absolute; opacity: 0; display: inline-block; width: 40px; height: 40px; z-index: 10; left: 0; } .date-container label { position: absolute; left: 0; top: 0; /* display: none; */ z-index: 0; } .date-icon { display: inline-block; width: 40px; height: 40px; background: url('https://resource.eziot.com/group2/M00/00/6A/CtwQF2F6VieAQrU9AAABP-_Nsqo949.png') no-repeat 100% 100%; } .select-container { padding: 10px; display: flex; justify-content: space-between; } .advice { height: 24px; width: 70px; display: flex; justify-content: space-between; line-height: 24px; background: #F8F8F8; border-radius: 8px; } .advice span { width: 40px; display: inline-block; } input[type="checkbox"]:not(:checked)+.advice span:first-child { box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%); border-radius: 8px; text-align: center; } input[type="checkbox"]:checked+.advice span:last-child { box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%); border-radius: 8px; text-align: center; } input[type="checkbox"]:not(:checked)+.advice span:first-child svg { fill: #648FFC !important; } input[type="checkbox"]:checked+.advice span:last-child svg { fill: #648FFC !important; }`,document.getElementsByTagName("head")[0].appendChild(a),et("begin",this.jSPlugin.url)){var l=et("begin",this.jSPlugin.url);this.date=l.slice(0,4)+"/"+l.slice(4,6)+"/"+l.slice(6,8),this.begin=this.date+" ".concat(l.slice(8,10)||"00",":").concat(l.slice(10,12)||"00",":").concat(l.slice(12,14)||"00"),this.end=this.date+" 23:59:59",this.initBegin=this.begin}if(et("end",this.jSPlugin.url)){var s=et("end",this.jSPlugin.url);this.end=this.date+" ".concat(s.slice(8,10)||"23",":").concat(s.slice(10,12)||"59",":").concat(s.slice(12,14)||"59"),this.initEnd=this.end}var b=document.createElement("div");b.id="date-switch-container-wrap",b.className="date-switch-container-wrap",b.style="",b.innerHTML=`
今日录像
`,Wn(b,document.getElementById("".concat(this.jSPlugin.id,"-wrap")));var T=document.createElement("div");T.id="rec-type-container-wrap",T.className="rec-type-container-wrap",T.style="",T.innerHTML=`
0个录像
`,Wn(T,b);var C=document.createElement("div");C.id="mobile-rec-wrap",C.className="mobileRec-wrap",C.style="",C.innerHTML=`
2020-01-01 00:00:00
`,Wn(C,T);var y=function(w){console.log("子组件传值到父组件",w,w.current);var z=w.current,S=new Date(r.date).Format("yyyyMMdd").substr(0,8)+(w.current?z.replace(/:/g,""):w.current.replace(/:/g,""));if(r.initBegin&&new Date("".concat(r.date," ").concat(w.current)).getTime()new Date(r.initEnd).getTime()&&(console.log("超过限制最高值"),S=new Date(r.initBegin).Format("yyyyMMddhhmmss")),r.type==="cloud.rec"){var d=function(){r.jSPlugin.seek(S.substr(8,6),"235959"),setTimeout(function(){r.syncTimeLine()},6e3)};r.seekTimer?clearTimeout(r.seekTimer):d(),console.log("this.jsPlug",r.jSPlugin.params),r.seekTimer=setTimeout(function(){d(),clearTimeout(r.seekTimer),r.seekTimer=null},r.seekFrequency)}else{var m=function(){setTimeout(function(){r.disabled=!1},r.seekFrequency)},g=function(A){r.disabled=!0,r.jSPlugin.pause().then(function(){console.log("暂停成功"),r.jSPlugin.resume(S).then(function(O){console.log("恢复成功"),r.jSPlugin.Theme&&r.jSPlugin.Theme.setDecoderState({play:!0}),r.jSPlugin.Theme&&r.jSPlugin.Theme.decoderState.state.sound&&r.jSPlugin.openSound(),r.syncTimeLine(),A&&A()})}).catch(function(){console.log("暂停失败"),r.jSPlugin.resume(S).then(function(O){console.log("恢复成功"),r.jSPlugin.Theme&&r.jSPlugin.Theme.setDecoderState({play:!0}),r.syncTimeLine(),A&&A()})})};r.disabled?(console.log("操作频繁,等待2秒后执行"),r.seekTimer&&clearTimeout(r.seekTimer),r.seekTimer=setTimeout(function(){g(m)},r.seekFrequency)):g(m)}},h=function(){r.operating=!0,r.unSyncTimeLine()},D=function(){},_=function(){r.operating=!1,console.log("ontouchend")};this.TimeLineOBJ=new ss({id:"time-line-item",getPalyParam:y,ontouchstart:h,ontouchmove:D,ontouchend:_}),this.fetchDeviceRec(),document.getElementById("date").addEventListener("change",function(E){if(console.log("日期变化",E.target.value),r.initBegin||r.initEnd)return console.log("您开启了时间限制,无法切换日期"),!1;r.date=new Date(E.target.value).Format("yyyy/MM/dd"),r.begin=r.date+" 00:00:00",r.end=r.date+" 23:59:59",r.fetchDeviceRec(),r.jSPlugin.changePlayUrl({type:r.type,begin:"".concat(new Date(r.date).Format("yyyyMMdd"),"000000")}),r.changeRecSpeed(1),r.resetMobileZoomStatus()}),document.getElementById("cloudType").checked=this.type==="rec",document.getElementById("cloudType").addEventListener("change",function(E){var w=E.target.checked?2:1;r.type=E.target.checked?"rec":"cloud.rec",console.log("recType",w),r.fetchDeviceRec(),r.jSPlugin.changePlayUrl({type:r.type,begin:"".concat(new Date(r.date).Format("yyyyMMdd"),"000000")}).then(function(){console.log("切换类型成功"),r.syncTimeLine(),r.changeRecSpeed(1),r.resetMobileZoomStatus()},function(z){console.log("err",z)}).catch(function(z){console.log(z)})}),this.syncTimeLine()}return dt(f,[{key:"fetchDeviceRec",value:function(){var n=this,i=function(l){var s=l.length;document.getElementById("recCount").innerHTML=s;for(var b=[],T=s-1;T>=0;T--){var C=l[T],y=ea(C.endTime),h=ea(C.startTime);b.push({st:h,et:y})}n.TimeLineOBJ.setDateLine(b)},r=new FormData;r.append("deviceSerial",Ke(this.jSPlugin.url).deviceSerial),r.append("channelNo",Ke(this.jSPlugin.url).channelNo),r.append("accessToken",this.jSPlugin.accessToken),r.append("recType",this.type==="cloud.rec"?1:2),r.append("startTime",new Date(this.begin).getTime()),r.append("endTime",new Date(this.end).getTime()),fetch(this.jSPlugin.env.domain+"/api/lapp/video/by/time",{method:"POST",body:r}).then(function(a){return a.json()}).then(function(a){if(a.code==200&&a.data){var l=[];l=a.data,i(l)}else i([])})}},{key:"syncTimeLine",value:function(){var n=this,i=function(a){var l=new Date(a),s=l.getHours(),b=l.getMinutes(),T=l.getSeconds();return(s>9?s:"0"+s)+":"+(b>9?b:"0"+b)+":"+(T>9?T:"0"+T)};this.timer&&clearInterval(this.timer),this.timer=setInterval(function(){if(n.operating)return console.log("操作中"),!1;n.jSPlugin.getOSDTime().then(function(r){r.data>0?n.TimeLineOBJ.stepScrollTimeLine(i(r.data*1e3)):(console.log("未找到当前获取播放时间,等待中..."),console.log("res:-----------------",r))}).catch(function(r){console.log("err:-----",r),console.log("未找到当前获取播放时间,等待中...")})},1e3)}},{key:"unSyncTimeLine",value:function(){this.timer&&clearInterval(this.timer)}}]),f}(),us=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"ptzStart"},{code:10001,msg:"操作失败",desc:"参数为空或格式不正确",text:"参数错误",type:"ptzStart"},{code:10002,msg:"账号异常,操作失败",desc:"重新获取accessToken",text:"accessToken异常或过期",type:"ptzStart"},{code:10005,msg:"账号异常,操作失败",desc:"appKey被冻结",text:"appKey异常",type:"ptzStart"},{code:20002,msg:"设备不存在,请检查设备连接情况",desc:"",text:"设备不存在",type:"ptzStart"},{code:20006,msg:"操作失败,请检查设备网络情况",desc:"检查设备网络状况,稍后再试",text:"网络异常",type:"ptzStart"},{code:20007,msg:"操作失败,请检查设备在线情况",desc:"检查设备是否在线",text:"设备不在线",type:"ptzStart"},{code:20008,msg:"操作过于频繁,稍后再试",desc:"操作过于频繁,稍后再试",text:"设备响应超时",type:"ptzStart"},{code:20014,msg:"操作失败",desc:"",text:"deviceSerial不合法",type:"ptzStart"},{code:20032,msg:"通道不存在请检查设备连接情况",desc:"该用户下通道不存在",text:"该用户下通道不存在",type:"ptzStart"},{code:49999,msg:"操作失败,请重试",desc:"接口调用异常",text:"数据异常",type:"ptzStart"},{code:6e4,msg:"操作失败,设备不支持该操作",desc:"",text:"设备不支持云台控制",type:"ptzStart"},{code:60001,msg:"操作失败,用户无权限",desc:"",text:"用户无云台控制权限",type:"ptzStart"},{code:60002,msg:"设备已旋转到上限位",desc:"",text:"设备云台旋转达到上限位",type:"ptzStart"},{code:60003,msg:"设备已旋转到下限位",desc:"",text:"设备云台旋转达到下限位",type:"ptzStart"},{code:60004,msg:"设备已旋转到左限位",desc:"",text:"设备云台旋转达到左限位",type:"ptzStart"},{code:60005,msg:"设备已旋转到右限位",desc:"",text:"设备云台旋转达到右限位",type:"ptzStart"},{code:60006,msg:"操作失败,请重试",desc:"稍候再试",text:"云台当前操作失败",type:"ptzStart"},{code:60009,msg:"设备正在操作中",desc:"",text:"正在调用预置点",type:"ptzStart"},{code:60020,msg:"操作失败",desc:"确认设备是否支持该操作",text:"不支持该命令",type:"ptzStart"}],ms=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"ptzStop"},{code:10001,msg:"操作失败",desc:"参数为空或格式不正确",text:"参数错误",type:"ptzStop"},{code:10002,msg:"账号异常,操作失败",desc:"重新获取accessToken",text:"accessToken异常或过期",type:"ptzStop"},{code:10005,msg:"账号异常,操作失败",desc:"appKey被冻结",text:"appKey异常",type:"ptzStop"},{code:20002,msg:"设备不存在,请检查设备连接情况",desc:"",text:"设备不存在",type:"ptzStop"},{code:20006,msg:"操作失败,请检查设备网络情况",desc:"检查设备网络状况,稍后再试",text:"网络异常",type:"ptzStop"},{code:20007,msg:"操作失败,请检查设备在线情况",desc:"检查设备是否在线",text:"设备不在线",type:"ptzStop"},{code:20008,msg:"操作过于频繁,稍后再试",desc:"操作过于频繁,稍后再试",text:"设备响应超时",type:"ptzStop"},{code:20014,msg:"操作失败",desc:"",text:"deviceSerial不合法",type:"ptzStop"},{code:20032,msg:"通道不存在请检查设备连接情况",desc:"该用户下通道不存在",text:"该用户下通道不存在",type:"ptzStop"},{code:49999,msg:"操作失败,请重试",desc:"接口调用异常",text:"数据异常",type:"ptzStop"},{code:6e4,msg:"操作失败,设备不支持该操作",desc:"",text:"设备不支持云台控制",type:"ptzStop"},{code:60001,msg:"操作失败,用户无权限",desc:"",text:"用户无云台控制权限",type:"ptzStop"},{code:60006,msg:"操作失败,请重试",desc:"稍候再试",text:"云台当前操作失败",type:"ptzStop"},{code:60009,msg:"设备正在操作中",desc:"",text:"正在调用预置点",type:"ptzStop"},{code:60020,msg:"操作失败",desc:"确认设备是否支持该操作",text:"不支持该命令",type:"ptzStop"}],ps=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"talk"},{code:10001,msg:"播放失败",desc:"参数为空或格式不正确",text:"参数错误",type:"talk"},{code:10002,msg:"账号异常,操作失败",desc:"",text:"accessToken异常或过期",type:"talk"},{code:10031,msg:"账号异常,操作失败",desc:"",text:"子账户或萤石用户没有权限",type:"talk"},{code:20002,msg:"设备不存在请检查设备连接情况",desc:"设备序列号输入有误或者设备未被添加或者通道异常",text:"设备不存在",type:"talk"},{code:60059,msg:"播放失败",desc:"",text:"ezopen地址均不可用",type:"talk"}],fs=[{code:200,msg:"",desc:"",text:"操作成功",type:"time"},{code:10001,msg:"播放失败",desc:"参数为空或格式不正确",text:"参数错误",type:"time"},{code:10002,msg:"账号异常,播放失败",desc:"",text:"accessToken异常或过期",type:"time"},{code:10004,msg:"账号异常,播放失败",desc:"",text:"用户不存在",type:"time"},{code:10005,msg:"账号异常,播放失败",desc:"",text:"appKey异常",type:"time"},{code:10011,msg:"播放失败",desc:"设备对应用户未注册至应用下",text:"未开通萤石服务",type:"time"},{code:10013,msg:"账号异常,播放失败",desc:"",text:"非开发者账号无权限调用",type:"time"},{code:10030,msg:"播放失败",desc:"",text:"appkey和appsecret不匹配",type:"time"},{code:20002,msg:"设备不存在请检查设备连接情况",desc:"设备序列号输入有误或者设备未被添加或者通道异常",text:"设备不存在",type:"time"},{code:20014,msg:"播放失败",desc:"",text:"deviceSerial不合法",type:"time"},{code:20032,msg:"设备不存在请检查设备连接情况",desc:"",text:"该用户下通道不存在",type:"time"},{code:60024,msg:"播放失败请重试",desc:"",text:"取消订阅操作失败",type:"time"},{code:49999,msg:"播放失败请重试",desc:"",text:"操作异常",type:"time"}],Fr={ptzStart:us,ptzStop:ms,talk:ps,time:fs},ta=function(){function f(u,n){fe(this,f),this.coreX=u,this.coreY=n,console.log("uikitCode",Fr)}return dt(f,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"matchInfo",value:function(n,i){if(Fr[i]){var r={};return Fr[i].map(function(a){a.code==n&&(r=a)}),r}else return{code:500,msg:"未知错误",desc:"未知的错误码,或错误码类型有误",text:"",type:i}}}]),f}(),hs=function(){function f(u){var n=this;if(fe(this,f),this.jSPlugin=u,this.codeHandler=new ta,this.pluginStatus=new Bi(this,this.jSPlugin.id),console.log("云台初始化"),document.getElementById(this.jSPlugin.id+"-ez-ptz-item"))return!1;var i=document.createElement("div");i.id=this.jSPlugin.id+"-ez-ptz-item",i.className="ez-ptz-wrap",i.style="display:none";var r=document.createElement("style");r.innerHTML=` .ez-ptz-container { position: relative; width: 80px; height: 80px; background: rgba(255, 255, 255, 0.80); box-shadow: 0px 0px 33px 4px rgb(0 0 0 / 15%); border: 1px solid rgba(255, 255, 255, 0.80); border-radius: 100%; cursor: pointer; overflow: hidden; user-select: none; } .ez-ptz-container .ez-ptz-icon.top { width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; border-bottom: 6px solid #333333; position: absolute; display: inline-block; left: calc(50% - 3px); top: 2px; } .ez-ptz-container .ez-ptz-icon.top.active { border-bottom-color: #1890FF; } .ez-ptz-container .ez-ptz-icon.bottom { width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 6px solid #333333; position: absolute; display: inline-block; left: calc(50% - 3px); bottom: 2px; } .ez-ptz-container .ez-ptz-icon.bottom.active { border-top-color: #1890FF; } .ez-ptz-container .ez-ptz-icon.right { width: 0; height: 0; border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-left: 6px solid #333333; position: absolute; display: inline-block; top: calc(50% - 3px); right: 2px; } .ez-ptz-container .ez-ptz-icon.right.active { border-left-color: #1890FF; } .ez-ptz-container .ez-ptz-icon.left { width: 0; height: 0; border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-right: 6px solid #333333; position: absolute; display: inline-block; top: calc(50% - 3px); left: 2px; } .ez-ptz-container .ez-ptz-icon.left.active { border-right-color: #1890FF; } .ez-ptz-container .ez-ptz-main.center { width: 23px; height: 23px; background: #1890FF; border-radius: 100%; top: calc(50% - 12.3px); left: calc(50% - 12.3px); position: absolute; } .ez-ptz-wrap { position: absolute; right: 20px; top: calc(50% - 50px); width: 100px; height: 100px; z-index: 999; } .ez-ptz-close { position: absolute; color: #FFFFFF; top: 0; right: 0px; }`,document.getElementsByTagName("head")[0].appendChild(r),i.innerHTML=`
`),document.getElementById("".concat(u.id,"-wrap")).appendChild(i),document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).onmousedown=function(a){a.preventDefault(),console.log("触摸开始"),n._handlePtzTouch(a,"start")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).onmouseup=function(a){a.preventDefault(),console.log("触摸结束"),n._handlePtzTouch(a,"stop")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).ontouchstart=function(a){a.preventDefault(),console.log("触摸开始"),n._handlePtzTouch(a,"start")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).ontouchend=function(a){a.preventDefault(),console.log("触摸结束",a),n._handlePtzTouch(a,"stop")}}return dt(f,[{key:"show",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item")).style="display: inline-block"}},{key:"hide",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item")).style="display: none"}},{key:"_handlePtzTouch",value:function(n,i){var r=this,a=document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).getBoundingClientRect(),l=a.left+41,s=a.top+41,b=n.x||n.changedTouches[0].clientX,T=n.y||n.changedTouches[0].clientY,C=b-l,y=T-s,h=0,D=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start";if(Math.abs(C)>Math.abs(y)?C>0?h=3:h=2:y>0?h=1:h=0,/^rotate\(90/.test(document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.transform))switch(h){case 0:h=2;break;case 1:h=3;break;case 2:h=1;break;case 3:h=0;break}document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).style="background-image:linear-gradient(".concat(h===0?180:h===1?0:h===2?90:270,"deg, #1d8dd8 0%, rgba(100,143,252,0.00) 30%)"),i==="stop"&&(D=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).style="");var _=new FormData;_.append("deviceSerial",Ke(this.jSPlugin.url).deviceSerial),_.append("channelNo",Ke(this.jSPlugin.url).channelNo),_.append("speed",1),_.append("direction",h),_.append("accessToken",this.jSPlugin.accessToken),fetch(D,{method:"POST",body:_}).then(function(E){return E.json()}).then(function(E){E.code==200||(console.log(E.code,r.codeHandler.matchInfo(E.code,i==="start"?"ptzStart":"ptzStop")),r.pluginStatus.loadingSetText({text:r.codeHandler.matchInfo(E.code,i==="start"?"ptzStart":"ptzStop").msg,color:"red",delayClear:2e3}),(E.code==60005||E.code==60002||E.code==60003||E.code==60004)&&(document.getElementById("".concat(r.jSPlugin.id,"-ez-ptz-container")).style="background-image:linear-gradient(".concat(h===0?180:h===1?0:h===2?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)")))}).catch(function(E){console.log("云台调用异常",E)})}}]),f}();(function(f){if(ue(Je)==="object")ae.exports=f();else{var u;typeof window!="undefined"?u=window:typeof Ar!="undefined"?u=Ar:typeof self!="undefined"?u=self:u=this,u.adapter=f()}})(function(){return function(){function f(u,n,i){function r(s,b){if(!n[s]){if(!u[s]){var T=typeof Dr=="function"&&Dr;if(!b&&T)return T(s,!0);if(a)return a(s,!0);var C=new Error("Cannot find module '"+s+"'");throw C.code="MODULE_NOT_FOUND",C}var y=n[s]={exports:{}};u[s][0].call(y.exports,function(h){var D=u[s][1][h];return r(D||h)},y,y.exports,f,u,n,i)}return n[s].exports}for(var a=typeof Dr=="function"&&Dr,l=0;l0&&arguments[0]!==void 0?arguments[0]:{},S=z.window,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0},m=r.log,g=r.detectBrowser(S),k={browserDetails:g,commonShim:_,extractVersion:r.extractVersion,disableLog:r.disableLog,disableWarnings:r.disableWarnings};switch(g.browser){case"chrome":if(!l||!l.shimPeerConnection||!d.shimChrome)return m("Chrome shim is not included in this adapter release."),k;m("adapter.js shimming chrome."),k.browserShim=l,l.shimGetUserMedia(S),l.shimMediaStream(S),l.shimPeerConnection(S),l.shimOnTrack(S),l.shimAddTrackRemoveTrack(S),l.shimGetSendersWithDtmf(S),l.shimGetStats(S),l.shimSenderReceiverGetStats(S),l.fixNegotiationNeeded(S),_.shimRTCIceCandidate(S),_.shimConnectionState(S),_.shimMaxMessageSize(S),_.shimSendThrowTypeError(S),_.removeAllowExtmapMixed(S);break;case"firefox":if(!C||!C.shimPeerConnection||!d.shimFirefox)return m("Firefox shim is not included in this adapter release."),k;m("adapter.js shimming firefox."),k.browserShim=C,C.shimGetUserMedia(S),C.shimPeerConnection(S),C.shimOnTrack(S),C.shimRemoveStream(S),C.shimSenderGetStats(S),C.shimReceiverGetStats(S),C.shimRTCDataChannel(S),C.shimAddTransceiver(S),C.shimCreateOffer(S),C.shimCreateAnswer(S),_.shimRTCIceCandidate(S),_.shimConnectionState(S),_.shimMaxMessageSize(S),_.shimSendThrowTypeError(S);break;case"edge":if(!b||!b.shimPeerConnection||!d.shimEdge)return m("MS edge shim is not included in this adapter release."),k;m("adapter.js shimming edge."),k.browserShim=b,b.shimGetUserMedia(S),b.shimGetDisplayMedia(S),b.shimPeerConnection(S),b.shimReplaceTrack(S),_.shimMaxMessageSize(S),_.shimSendThrowTypeError(S);break;case"safari":if(!h||!d.shimSafari)return m("Safari shim is not included in this adapter release."),k;m("adapter.js shimming safari."),k.browserShim=h,h.shimRTCIceServerUrls(S),h.shimCreateOfferLegacy(S),h.shimCallbacksAPI(S),h.shimLocalStreamsAPI(S),h.shimRemoteStreamsAPI(S),h.shimTrackEventTransceiver(S),h.shimGetUserMedia(S),_.shimRTCIceCandidate(S),_.shimMaxMessageSize(S),_.shimSendThrowTypeError(S),_.removeAllowExtmapMixed(S);break;default:m("Unsupported browser!");break}return k}},{"./chrome/chrome_shim":3,"./common_shim":6,"./edge/edge_shim":7,"./firefox/firefox_shim":11,"./safari/safari_shim":14,"./utils":15}],3:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=n.shimGetUserMedia=void 0;var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(d){return ue(d)}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":ue(d)},r=f("./getusermedia");Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return r.shimGetUserMedia}});var a=f("./getdisplaymedia");Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return a.shimGetDisplayMedia}}),n.shimMediaStream=C,n.shimOnTrack=y,n.shimGetSendersWithDtmf=h,n.shimGetStats=D,n.shimSenderReceiverGetStats=_,n.shimAddTrackRemoveTrackWithNative=E,n.shimAddTrackRemoveTrack=w,n.shimPeerConnection=z,n.fixNegotiationNeeded=S;var l=f("../utils.js"),s=b(l);function b(d){if(d&&d.__esModule)return d;var m={};if(d!=null)for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[g]=d[g]);return m.default=d,m}function T(d,m,g){return m in d?Object.defineProperty(d,m,{value:g,enumerable:!0,configurable:!0,writable:!0}):d[m]=g,d}function C(d){d.MediaStream=d.MediaStream||d.webkitMediaStream}function y(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&!("ontrack"in d.RTCPeerConnection.prototype)){Object.defineProperty(d.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(k){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=k)},enumerable:!0,configurable:!0});var m=d.RTCPeerConnection.prototype.setRemoteDescription;d.RTCPeerConnection.prototype.setRemoteDescription=function(){var k=this;return this._ontrackpoly||(this._ontrackpoly=function(A){A.stream.addEventListener("addtrack",function(O){var H=void 0;d.RTCPeerConnection.prototype.getReceivers?H=k.getReceivers().find(function(X){return X.track&&X.track.id===O.track.id}):H={track:O.track};var Z=new Event("track");Z.track=O.track,Z.receiver=H,Z.transceiver={receiver:H},Z.streams=[A.stream],k.dispatchEvent(Z)}),A.stream.getTracks().forEach(function(O){var H=void 0;d.RTCPeerConnection.prototype.getReceivers?H=k.getReceivers().find(function(X){return X.track&&X.track.id===O.id}):H={track:O};var Z=new Event("track");Z.track=O,Z.receiver=H,Z.transceiver={receiver:H},Z.streams=[A.stream],k.dispatchEvent(Z)})},this.addEventListener("addstream",this._ontrackpoly)),m.apply(this,arguments)}}else s.wrapPeerConnectionEvent(d,"track",function(g){return g.transceiver||Object.defineProperty(g,"transceiver",{value:{receiver:g.receiver}}),g})}function h(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&!("getSenders"in d.RTCPeerConnection.prototype)&&"createDTMFSender"in d.RTCPeerConnection.prototype){var m=function(X,ne){return{track:ne,get dtmf(){return this._dtmf===void 0&&(ne.kind==="audio"?this._dtmf=X.createDTMFSender(ne):this._dtmf=null),this._dtmf},_pc:X}};if(!d.RTCPeerConnection.prototype.getSenders){d.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var g=d.RTCPeerConnection.prototype.addTrack;d.RTCPeerConnection.prototype.addTrack=function(X,ne){var Y=g.apply(this,arguments);return Y||(Y=m(this,X),this._senders.push(Y)),Y};var k=d.RTCPeerConnection.prototype.removeTrack;d.RTCPeerConnection.prototype.removeTrack=function(X){k.apply(this,arguments);var ne=this._senders.indexOf(X);ne!==-1&&this._senders.splice(ne,1)}}var A=d.RTCPeerConnection.prototype.addStream;d.RTCPeerConnection.prototype.addStream=function(X){var ne=this;this._senders=this._senders||[],A.apply(this,[X]),X.getTracks().forEach(function(Y){ne._senders.push(m(ne,Y))})};var O=d.RTCPeerConnection.prototype.removeStream;d.RTCPeerConnection.prototype.removeStream=function(X){var ne=this;this._senders=this._senders||[],O.apply(this,[X]),X.getTracks().forEach(function(Y){var me=ne._senders.find(function(ge){return ge.track===Y});me&&ne._senders.splice(ne._senders.indexOf(me),1)})}}else if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&"getSenders"in d.RTCPeerConnection.prototype&&"createDTMFSender"in d.RTCPeerConnection.prototype&&d.RTCRtpSender&&!("dtmf"in d.RTCRtpSender.prototype)){var H=d.RTCPeerConnection.prototype.getSenders;d.RTCPeerConnection.prototype.getSenders=function(){var X=this,ne=H.apply(this,[]);return ne.forEach(function(Y){return Y._pc=X}),ne},Object.defineProperty(d.RTCRtpSender.prototype,"dtmf",{get:function(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function D(d){if(d.RTCPeerConnection){var m=d.RTCPeerConnection.prototype.getStats;d.RTCPeerConnection.prototype.getStats=function(){var k=this,A=Array.prototype.slice.call(arguments),O=A[0],H=A[1],Z=A[2];if(arguments.length>0&&typeof O=="function")return m.apply(this,arguments);if(m.length===0&&(arguments.length===0||typeof O!="function"))return m.apply(this,[]);var X=function(ge){var ve={},Ce=ge.result();return Ce.forEach(function(be){var Pe={id:be.id,timestamp:be.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[be.type]||be.type};be.names().forEach(function(Ye){Pe[Ye]=be.stat(Ye)}),ve[Pe.id]=Pe}),ve},ne=function(ge){return new Map(Object.keys(ge).map(function(ve){return[ve,ge[ve]]}))};if(arguments.length>=2){var Y=function(ge){H(ne(X(ge)))};return m.apply(this,[Y,O])}return new Promise(function(me,ge){m.apply(k,[function(ve){me(ne(X(ve)))},ge])}).then(H,Z)}}}function _(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&d.RTCRtpSender&&d.RTCRtpReceiver){if(!("getStats"in d.RTCRtpSender.prototype)){var m=d.RTCPeerConnection.prototype.getSenders;m&&(d.RTCPeerConnection.prototype.getSenders=function(){var H=this,Z=m.apply(this,[]);return Z.forEach(function(X){return X._pc=H}),Z});var g=d.RTCPeerConnection.prototype.addTrack;g&&(d.RTCPeerConnection.prototype.addTrack=function(){var H=g.apply(this,arguments);return H._pc=this,H}),d.RTCRtpSender.prototype.getStats=function(){var H=this;return this._pc.getStats().then(function(Z){return s.filterStats(Z,H.track,!0)})}}if(!("getStats"in d.RTCRtpReceiver.prototype)){var k=d.RTCPeerConnection.prototype.getReceivers;k&&(d.RTCPeerConnection.prototype.getReceivers=function(){var H=this,Z=k.apply(this,[]);return Z.forEach(function(X){return X._pc=H}),Z}),s.wrapPeerConnectionEvent(d,"track",function(O){return O.receiver._pc=O.srcElement,O}),d.RTCRtpReceiver.prototype.getStats=function(){var H=this;return this._pc.getStats().then(function(Z){return s.filterStats(Z,H.track,!1)})}}if("getStats"in d.RTCRtpSender.prototype&&"getStats"in d.RTCRtpReceiver.prototype){var A=d.RTCPeerConnection.prototype.getStats;d.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof d.MediaStreamTrack){var H=arguments[0],Z=void 0,X=void 0,ne=void 0;return this.getSenders().forEach(function(Y){Y.track===H&&(Z?ne=!0:Z=Y)}),this.getReceivers().forEach(function(Y){return Y.track===H&&(X?ne=!0:X=Y),Y.track===H}),ne||Z&&X?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):Z?Z.getStats():X?X.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return A.apply(this,arguments)}}}}function E(d){d.RTCPeerConnection.prototype.getLocalStreams=function(){var H=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(Z){return H._shimmedLocalStreams[Z][0]})};var m=d.RTCPeerConnection.prototype.addTrack;d.RTCPeerConnection.prototype.addTrack=function(H,Z){if(!Z)return m.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var X=m.apply(this,arguments);return this._shimmedLocalStreams[Z.id]?this._shimmedLocalStreams[Z.id].indexOf(X)===-1&&this._shimmedLocalStreams[Z.id].push(X):this._shimmedLocalStreams[Z.id]=[Z,X],X};var g=d.RTCPeerConnection.prototype.addStream;d.RTCPeerConnection.prototype.addStream=function(H){var Z=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},H.getTracks().forEach(function(Y){var me=Z.getSenders().find(function(ge){return ge.track===Y});if(me)throw new DOMException("Track already exists.","InvalidAccessError")});var X=this.getSenders();g.apply(this,arguments);var ne=this.getSenders().filter(function(Y){return X.indexOf(Y)===-1});this._shimmedLocalStreams[H.id]=[H].concat(ne)};var k=d.RTCPeerConnection.prototype.removeStream;d.RTCPeerConnection.prototype.removeStream=function(H){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[H.id],k.apply(this,arguments)};var A=d.RTCPeerConnection.prototype.removeTrack;d.RTCPeerConnection.prototype.removeTrack=function(H){var Z=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},H&&Object.keys(this._shimmedLocalStreams).forEach(function(X){var ne=Z._shimmedLocalStreams[X].indexOf(H);ne!==-1&&Z._shimmedLocalStreams[X].splice(ne,1),Z._shimmedLocalStreams[X].length===1&&delete Z._shimmedLocalStreams[X]}),A.apply(this,arguments)}}function w(d){if(!d.RTCPeerConnection)return;var m=s.detectBrowser(d);if(d.RTCPeerConnection.prototype.addTrack&&m.version>=65)return E(d);var g=d.RTCPeerConnection.prototype.getLocalStreams;d.RTCPeerConnection.prototype.getLocalStreams=function(){var Y=this,me=g.apply(this);return this._reverseStreams=this._reverseStreams||{},me.map(function(ge){return Y._reverseStreams[ge.id]})};var k=d.RTCPeerConnection.prototype.addStream;d.RTCPeerConnection.prototype.addStream=function(Y){var me=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},Y.getTracks().forEach(function(ve){var Ce=me.getSenders().find(function(be){return be.track===ve});if(Ce)throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[Y.id]){var ge=new d.MediaStream(Y.getTracks());this._streams[Y.id]=ge,this._reverseStreams[ge.id]=Y,Y=ge}k.apply(this,[Y])};var A=d.RTCPeerConnection.prototype.removeStream;d.RTCPeerConnection.prototype.removeStream=function(Y){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},A.apply(this,[this._streams[Y.id]||Y]),delete this._reverseStreams[this._streams[Y.id]?this._streams[Y.id].id:Y.id],delete this._streams[Y.id]},d.RTCPeerConnection.prototype.addTrack=function(Y,me){var ge=this;if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var ve=[].slice.call(arguments,1);if(ve.length!==1||!ve[0].getTracks().find(function(Ye){return Ye===Y}))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");var Ce=this.getSenders().find(function(Ye){return Ye.track===Y});if(Ce)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var be=this._streams[me.id];if(be)be.addTrack(Y),Promise.resolve().then(function(){ge.dispatchEvent(new Event("negotiationneeded"))});else{var Pe=new d.MediaStream([Y]);this._streams[me.id]=Pe,this._reverseStreams[Pe.id]=me,this.addStream(Pe)}return this.getSenders().find(function(Ye){return Ye.track===Y})};function O(ne,Y){var me=Y.sdp;return Object.keys(ne._reverseStreams||[]).forEach(function(ge){var ve=ne._reverseStreams[ge],Ce=ne._streams[ve.id];me=me.replace(new RegExp(Ce.id,"g"),ve.id)}),new RTCSessionDescription({type:Y.type,sdp:me})}function H(ne,Y){var me=Y.sdp;return Object.keys(ne._reverseStreams||[]).forEach(function(ge){var ve=ne._reverseStreams[ge],Ce=ne._streams[ve.id];me=me.replace(new RegExp(ve.id,"g"),Ce.id)}),new RTCSessionDescription({type:Y.type,sdp:me})}["createOffer","createAnswer"].forEach(function(ne){var Y=d.RTCPeerConnection.prototype[ne],me=T({},ne,function(){var ge=this,ve=arguments,Ce=arguments.length&&typeof arguments[0]=="function";return Ce?Y.apply(this,[function(be){var Pe=O(ge,be);ve[0].apply(null,[Pe])},function(be){ve[1]&&ve[1].apply(null,be)},arguments[2]]):Y.apply(this,arguments).then(function(be){return O(ge,be)})});d.RTCPeerConnection.prototype[ne]=me[ne]});var Z=d.RTCPeerConnection.prototype.setLocalDescription;d.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?Z.apply(this,arguments):(arguments[0]=H(this,arguments[0]),Z.apply(this,arguments))};var X=Object.getOwnPropertyDescriptor(d.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(d.RTCPeerConnection.prototype,"localDescription",{get:function(){var Y=X.get.apply(this);return Y.type===""?Y:O(this,Y)}}),d.RTCPeerConnection.prototype.removeTrack=function(Y){var me=this;if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!Y._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");var ge=Y._pc===this;if(!ge)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};var ve=void 0;Object.keys(this._streams).forEach(function(Ce){var be=me._streams[Ce].getTracks().find(function(Pe){return Y.track===Pe});be&&(ve=me._streams[Ce])}),ve&&(ve.getTracks().length===1?this.removeStream(this._reverseStreams[ve.id]):ve.removeTrack(Y.track),this.dispatchEvent(new Event("negotiationneeded")))}}function z(d){var m=s.detectBrowser(d);if(!d.RTCPeerConnection&&d.webkitRTCPeerConnection&&(d.RTCPeerConnection=d.webkitRTCPeerConnection),!!d.RTCPeerConnection){m.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(k){var A=d.RTCPeerConnection.prototype[k],O=T({},k,function(){return arguments[0]=new(k==="addIceCandidate"?d.RTCIceCandidate:d.RTCSessionDescription)(arguments[0]),A.apply(this,arguments)});d.RTCPeerConnection.prototype[k]=O[k]});var g=d.RTCPeerConnection.prototype.addIceCandidate;d.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?m.version<78&&arguments[0]&&arguments[0].candidate===""?Promise.resolve():g.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}}function S(d){s.wrapPeerConnectionEvent(d,"negotiationneeded",function(m){var g=m.target;if(g.signalingState==="stable")return m})}},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=i;function i(r,a){if(!(r.navigator.mediaDevices&&"getDisplayMedia"in r.navigator.mediaDevices)&&r.navigator.mediaDevices){if(typeof a!="function"){console.error("shimGetDisplayMedia: getSourceId argument is not a function");return}r.navigator.mediaDevices.getDisplayMedia=function(s){return a(s).then(function(b){var T=s.video&&s.video.width,C=s.video&&s.video.height,y=s.video&&s.video.frameRate;return s.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:b,maxFrameRate:y||3}},T&&(s.video.mandatory.maxWidth=T),C&&(s.video.mandatory.maxHeight=C),r.navigator.mediaDevices.getUserMedia(s)})}}}},{}],5:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(T){return ue(T)}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":ue(T)};n.shimGetUserMedia=b;var r=f("../utils.js"),a=l(r);function l(T){if(T&&T.__esModule)return T;var C={};if(T!=null)for(var y in T)Object.prototype.hasOwnProperty.call(T,y)&&(C[y]=T[y]);return C.default=T,C}var s=a.log;function b(T){var C=T&&T.navigator;if(C.mediaDevices){var y=a.detectBrowser(T),h=function(S){if((typeof S=="undefined"?"undefined":i(S))!=="object"||S.mandatory||S.optional)return S;var d={};return Object.keys(S).forEach(function(m){if(!(m==="require"||m==="advanced"||m==="mediaSource")){var g=i(S[m])==="object"?S[m]:{ideal:S[m]};g.exact!==void 0&&typeof g.exact=="number"&&(g.min=g.max=g.exact);var k=function(H,Z){return H?H+Z.charAt(0).toUpperCase()+Z.slice(1):Z==="deviceId"?"sourceId":Z};if(g.ideal!==void 0){d.optional=d.optional||[];var A={};typeof g.ideal=="number"?(A[k("min",m)]=g.ideal,d.optional.push(A),A={},A[k("max",m)]=g.ideal,d.optional.push(A)):(A[k("",m)]=g.ideal,d.optional.push(A))}g.exact!==void 0&&typeof g.exact!="number"?(d.mandatory=d.mandatory||{},d.mandatory[k("",m)]=g.exact):["min","max"].forEach(function(O){g[O]!==void 0&&(d.mandatory=d.mandatory||{},d.mandatory[k(O,m)]=g[O])})}}),S.advanced&&(d.optional=(d.optional||[]).concat(S.advanced)),d},D=function(S,d){if(y.version>=61)return d(S);if(S=JSON.parse(JSON.stringify(S)),S&&i(S.audio)==="object"){var m=function(H,Z,X){Z in H&&!(X in H)&&(H[X]=H[Z],delete H[Z])};S=JSON.parse(JSON.stringify(S)),m(S.audio,"autoGainControl","googAutoGainControl"),m(S.audio,"noiseSuppression","googNoiseSuppression"),S.audio=h(S.audio)}if(S&&i(S.video)==="object"){var g=S.video.facingMode;g=g&&((typeof g=="undefined"?"undefined":i(g))==="object"?g:{ideal:g});var k=y.version<66;if(g&&(g.exact==="user"||g.exact==="environment"||g.ideal==="user"||g.ideal==="environment")&&!(C.mediaDevices.getSupportedConstraints&&C.mediaDevices.getSupportedConstraints().facingMode&&!k)){delete S.video.facingMode;var A=void 0;if(g.exact==="environment"||g.ideal==="environment"?A=["back","rear"]:(g.exact==="user"||g.ideal==="user")&&(A=["front"]),A)return C.mediaDevices.enumerateDevices().then(function(O){O=O.filter(function(Z){return Z.kind==="videoinput"});var H=O.find(function(Z){return A.some(function(X){return Z.label.toLowerCase().includes(X)})});return!H&&O.length&&A.includes("back")&&(H=O[O.length-1]),H&&(S.video.deviceId=g.exact?{exact:H.deviceId}:{ideal:H.deviceId}),S.video=h(S.video),s("chrome: "+JSON.stringify(S)),d(S)})}S.video=h(S.video)}return s("chrome: "+JSON.stringify(S)),d(S)},_=function(S){return y.version>=64?S:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[S.name]||S.name,message:S.message,constraint:S.constraint||S.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},E=function(S,d,m){D(S,function(g){C.webkitGetUserMedia(g,d,function(k){m&&m(_(k))})})};if(C.getUserMedia=E.bind(C),C.mediaDevices.getUserMedia){var w=C.mediaDevices.getUserMedia.bind(C.mediaDevices);C.mediaDevices.getUserMedia=function(z){return D(z,function(S){return w(S).then(function(d){if(S.audio&&!d.getAudioTracks().length||S.video&&!d.getVideoTracks().length)throw d.getTracks().forEach(function(m){m.stop()}),new DOMException("","NotFoundError");return d},function(d){return Promise.reject(_(d))})})}}}}},{"../utils.js":15}],6:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(E){return ue(E)}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":ue(E)};n.shimRTCIceCandidate=C,n.shimMaxMessageSize=y,n.shimSendThrowTypeError=h,n.shimConnectionState=D,n.removeAllowExtmapMixed=_;var r=f("sdp"),a=T(r),l=f("./utils"),s=b(l);function b(E){if(E&&E.__esModule)return E;var w={};if(E!=null)for(var z in E)Object.prototype.hasOwnProperty.call(E,z)&&(w[z]=E[z]);return w.default=E,w}function T(E){return E&&E.__esModule?E:{default:E}}function C(E){if(!(!E.RTCIceCandidate||E.RTCIceCandidate&&"foundation"in E.RTCIceCandidate.prototype)){var w=E.RTCIceCandidate;E.RTCIceCandidate=function(S){if((typeof S=="undefined"?"undefined":i(S))==="object"&&S.candidate&&S.candidate.indexOf("a=")===0&&(S=JSON.parse(JSON.stringify(S)),S.candidate=S.candidate.substr(2)),S.candidate&&S.candidate.length){var d=new w(S),m=a.default.parseCandidate(S.candidate),g=Object.assign(d,m);return g.toJSON=function(){return{candidate:g.candidate,sdpMid:g.sdpMid,sdpMLineIndex:g.sdpMLineIndex,usernameFragment:g.usernameFragment}},g}return new w(S)},E.RTCIceCandidate.prototype=w.prototype,s.wrapPeerConnectionEvent(E,"icecandidate",function(z){return z.candidate&&Object.defineProperty(z,"candidate",{value:new E.RTCIceCandidate(z.candidate),writable:"false"}),z})}}function y(E){if(E.RTCPeerConnection){var w=s.detectBrowser(E);"sctp"in E.RTCPeerConnection.prototype||Object.defineProperty(E.RTCPeerConnection.prototype,"sctp",{get:function(){return typeof this._sctp=="undefined"?null:this._sctp}});var z=function(A){if(!A||!A.sdp)return!1;var O=a.default.splitSections(A.sdp);return O.shift(),O.some(function(H){var Z=a.default.parseMLine(H);return Z&&Z.kind==="application"&&Z.protocol.indexOf("SCTP")!==-1})},S=function(A){var O=A.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(O===null||O.length<2)return-1;var H=parseInt(O[1],10);return H!==H?-1:H},d=function(A){var O=65536;return w.browser==="firefox"&&(w.version<57?A===-1?O=16384:O=2147483637:w.version<60?O=w.version===57?65535:65536:O=2147483637),O},m=function(A,O){var H=65536;w.browser==="firefox"&&w.version===57&&(H=65535);var Z=a.default.matchPrefix(A.sdp,"a=max-message-size:");return Z.length>0?H=parseInt(Z[0].substr(19),10):w.browser==="firefox"&&O!==-1&&(H=2147483637),H},g=E.RTCPeerConnection.prototype.setRemoteDescription;E.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,w.browser==="chrome"&&w.version>=76){var A=this.getConfiguration(),O=A.sdpSemantics;O==="plan-b"&&Object.defineProperty(this,"sctp",{get:function(){return typeof this._sctp=="undefined"?null:this._sctp},enumerable:!0,configurable:!0})}if(z(arguments[0])){var H=S(arguments[0]),Z=d(H),X=m(arguments[0],H),ne=void 0;Z===0&&X===0?ne=Number.POSITIVE_INFINITY:Z===0||X===0?ne=Math.max(Z,X):ne=Math.min(Z,X);var Y={};Object.defineProperty(Y,"maxMessageSize",{get:function(){return ne}}),this._sctp=Y}return g.apply(this,arguments)}}}function h(E){if(!(E.RTCPeerConnection&&"createDataChannel"in E.RTCPeerConnection.prototype))return;function w(S,d){var m=S.send;S.send=function(){var k=arguments[0],A=k.length||k.size||k.byteLength;if(S.readyState==="open"&&d.sctp&&A>d.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+d.sctp.maxMessageSize+" bytes)");return m.apply(S,arguments)}}var z=E.RTCPeerConnection.prototype.createDataChannel;E.RTCPeerConnection.prototype.createDataChannel=function(){var d=z.apply(this,arguments);return w(d,this),d},s.wrapPeerConnectionEvent(E,"datachannel",function(S){return w(S.channel,S.target),S})}function D(E){if(!(!E.RTCPeerConnection||"connectionState"in E.RTCPeerConnection.prototype)){var w=E.RTCPeerConnection.prototype;Object.defineProperty(w,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(w,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(S){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),S&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=S)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(function(z){var S=w[z];w[z]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(d){var m=d.target;if(m._lastConnectionState!==m.connectionState){m._lastConnectionState=m.connectionState;var g=new Event("connectionstatechange",d);m.dispatchEvent(g)}return d},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),S.apply(this,arguments)}})}}function _(E){if(E.RTCPeerConnection){var w=s.detectBrowser(E);if(!(w.browser==="chrome"&&w.version>=71)){var z=E.RTCPeerConnection.prototype.setRemoteDescription;E.RTCPeerConnection.prototype.setRemoteDescription=function(d){return d&&d.sdp&&d.sdp.indexOf(` a=extmap-allow-mixed`)!==-1&&(d.sdp=d.sdp.split(` `).filter(function(m){return m.trim()!=="a=extmap-allow-mixed"}).join(` `)),z.apply(this,arguments)}}}}},{"./utils":15,sdp:17}],7:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=n.shimGetUserMedia=void 0;var i=f("./getusermedia");Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return i.shimGetUserMedia}});var r=f("./getdisplaymedia");Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return r.shimGetDisplayMedia}}),n.shimPeerConnection=h,n.shimReplaceTrack=D;var a=f("../utils"),l=y(a),s=f("./filtericeservers"),b=f("rtcpeerconnection-shim"),T=C(b);function C(_){return _&&_.__esModule?_:{default:_}}function y(_){if(_&&_.__esModule)return _;var E={};if(_!=null)for(var w in _)Object.prototype.hasOwnProperty.call(_,w)&&(E[w]=_[w]);return E.default=_,E}function h(_){var E=l.detectBrowser(_);if(_.RTCIceGatherer&&(_.RTCIceCandidate||(_.RTCIceCandidate=function(d){return d}),_.RTCSessionDescription||(_.RTCSessionDescription=function(d){return d}),E.version<15025)){var w=Object.getOwnPropertyDescriptor(_.MediaStreamTrack.prototype,"enabled");Object.defineProperty(_.MediaStreamTrack.prototype,"enabled",{set:function(d){w.set.call(this,d);var m=new Event("enabled");m.enabled=d,this.dispatchEvent(m)}})}_.RTCRtpSender&&!("dtmf"in _.RTCRtpSender.prototype)&&Object.defineProperty(_.RTCRtpSender.prototype,"dtmf",{get:function(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=new _.RTCDtmfSender(this):this.track.kind==="video"&&(this._dtmf=null)),this._dtmf}}),_.RTCDtmfSender&&!_.RTCDTMFSender&&(_.RTCDTMFSender=_.RTCDtmfSender);var z=(0,T.default)(_,E.version);_.RTCPeerConnection=function(d){return d&&d.iceServers&&(d.iceServers=(0,s.filterIceServers)(d.iceServers,E.version),l.log("ICE servers after filtering:",d.iceServers)),new z(d)},_.RTCPeerConnection.prototype=z.prototype}function D(_){_.RTCRtpSender&&!("replaceTrack"in _.RTCRtpSender.prototype)&&(_.RTCRtpSender.prototype.replaceTrack=_.RTCRtpSender.prototype.setTrack)}},{"../utils":15,"./filtericeservers":8,"./getdisplaymedia":9,"./getusermedia":10,"rtcpeerconnection-shim":16}],8:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.filterIceServers=l;var i=f("../utils"),r=a(i);function a(s){if(s&&s.__esModule)return s;var b={};if(s!=null)for(var T in s)Object.prototype.hasOwnProperty.call(s,T)&&(b[T]=s[T]);return b.default=s,b}function l(s,b){var T=!1;return s=JSON.parse(JSON.stringify(s)),s.filter(function(C){if(C&&(C.urls||C.url)){var y=C.urls||C.url;C.url&&!C.urls&&r.deprecated("RTCIceServer.url","RTCIceServer.urls");var h=typeof y=="string";return h&&(y=[y]),y=y.filter(function(D){if(D.indexOf("stun:")===0)return!1;var _=D.startsWith("turn")&&!D.startsWith("turn:[")&&D.includes("transport=udp");return _&&!T?(T=!0,!0):_&&!T}),delete C.url,C.urls=h?y[0]:y,!!y.length}})}},{"../utils":15}],9:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=i;function i(r){"getDisplayMedia"in r.navigator&&r.navigator.mediaDevices&&(r.navigator.mediaDevices&&"getDisplayMedia"in r.navigator.mediaDevices||(r.navigator.mediaDevices.getDisplayMedia=r.navigator.getDisplayMedia.bind(r.navigator)))}},{}],10:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetUserMedia=i;function i(r){var a=r&&r.navigator,l=function(T){return{name:{PermissionDeniedError:"NotAllowedError"}[T.name]||T.name,message:T.message,constraint:T.constraint,toString:function(){return this.name}}},s=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(b){return s(b).catch(function(T){return Promise.reject(l(T))})}}},{}],11:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=n.shimGetUserMedia=void 0;var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(d){return ue(d)}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":ue(d)},r=f("./getusermedia");Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return r.shimGetUserMedia}});var a=f("./getdisplaymedia");Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return a.shimGetDisplayMedia}}),n.shimOnTrack=C,n.shimPeerConnection=y,n.shimSenderGetStats=h,n.shimReceiverGetStats=D,n.shimRemoveStream=_,n.shimRTCDataChannel=E,n.shimAddTransceiver=w,n.shimCreateOffer=z,n.shimCreateAnswer=S;var l=f("../utils"),s=b(l);function b(d){if(d&&d.__esModule)return d;var m={};if(d!=null)for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[g]=d[g]);return m.default=d,m}function T(d,m,g){return m in d?Object.defineProperty(d,m,{value:g,enumerable:!0,configurable:!0,writable:!0}):d[m]=g,d}function C(d){(typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCTrackEvent&&"receiver"in d.RTCTrackEvent.prototype&&!("transceiver"in d.RTCTrackEvent.prototype)&&Object.defineProperty(d.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function y(d){var m=s.detectBrowser(d);if(!((typeof d=="undefined"?"undefined":i(d))!=="object"||!(d.RTCPeerConnection||d.mozRTCPeerConnection))){if(!d.RTCPeerConnection&&d.mozRTCPeerConnection&&(d.RTCPeerConnection=d.mozRTCPeerConnection),m.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(O){var H=d.RTCPeerConnection.prototype[O],Z=T({},O,function(){return arguments[0]=new(O==="addIceCandidate"?d.RTCIceCandidate:d.RTCSessionDescription)(arguments[0]),H.apply(this,arguments)});d.RTCPeerConnection.prototype[O]=Z[O]}),m.version<68){var g=d.RTCPeerConnection.prototype.addIceCandidate;d.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&arguments[0].candidate===""?Promise.resolve():g.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var k={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},A=d.RTCPeerConnection.prototype.getStats;d.RTCPeerConnection.prototype.getStats=function(){var H=Array.prototype.slice.call(arguments),Z=H[0],X=H[1],ne=H[2];return A.apply(this,[Z||null]).then(function(Y){if(m.version<53&&!X)try{Y.forEach(function(me){me.type=k[me.type]||me.type})}catch(me){if(me.name!=="TypeError")throw me;Y.forEach(function(ge,ve){Y.set(ve,Object.assign({},ge,{type:k[ge.type]||ge.type}))})}return Y}).then(X,ne)}}}function h(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&d.RTCRtpSender&&!(d.RTCRtpSender&&"getStats"in d.RTCRtpSender.prototype)){var m=d.RTCPeerConnection.prototype.getSenders;m&&(d.RTCPeerConnection.prototype.getSenders=function(){var A=this,O=m.apply(this,[]);return O.forEach(function(H){return H._pc=A}),O});var g=d.RTCPeerConnection.prototype.addTrack;g&&(d.RTCPeerConnection.prototype.addTrack=function(){var A=g.apply(this,arguments);return A._pc=this,A}),d.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}}function D(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&d.RTCRtpSender&&!(d.RTCRtpSender&&"getStats"in d.RTCRtpReceiver.prototype)){var m=d.RTCPeerConnection.prototype.getReceivers;m&&(d.RTCPeerConnection.prototype.getReceivers=function(){var k=this,A=m.apply(this,[]);return A.forEach(function(O){return O._pc=k}),A}),s.wrapPeerConnectionEvent(d,"track",function(g){return g.receiver._pc=g.srcElement,g}),d.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}}function _(d){!d.RTCPeerConnection||"removeStream"in d.RTCPeerConnection.prototype||(d.RTCPeerConnection.prototype.removeStream=function(g){var k=this;s.deprecated("removeStream","removeTrack"),this.getSenders().forEach(function(A){A.track&&g.getTracks().includes(A.track)&&k.removeTrack(A)})})}function E(d){d.DataChannel&&!d.RTCDataChannel&&(d.RTCDataChannel=d.DataChannel)}function w(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection){var m=d.RTCPeerConnection.prototype.addTransceiver;m&&(d.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var k=arguments[1],A=k&&"sendEncodings"in k;A&&k.sendEncodings.forEach(function(X){if("rid"in X){var ne=/^[a-z0-9]{0,16}$/i;if(!ne.test(X.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in X&&!(parseFloat(X.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in X&&!(parseFloat(X.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});var O=m.apply(this,arguments);if(A){var H=O.sender,Z=H.getParameters();"encodings"in Z||(Z.encodings=k.sendEncodings,this.setParametersPromises.push(H.setParameters(Z).catch(function(){})))}return O})}}function z(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection){var m=d.RTCPeerConnection.prototype.createOffer;d.RTCPeerConnection.prototype.createOffer=function(){var k=this,A=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return m.apply(k,A)}).finally(function(){k.setParametersPromises=[]}):m.apply(this,arguments)}}}function S(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection){var m=d.RTCPeerConnection.prototype.createAnswer;d.RTCPeerConnection.prototype.createAnswer=function(){var k=this,A=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return m.apply(k,A)}).finally(function(){k.setParametersPromises=[]}):m.apply(this,arguments)}}}},{"../utils":15,"./getdisplaymedia":12,"./getusermedia":13}],12:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=i;function i(r,a){r.navigator.mediaDevices&&"getDisplayMedia"in r.navigator.mediaDevices||r.navigator.mediaDevices&&(r.navigator.mediaDevices.getDisplayMedia=function(s){if(!(s&&s.video)){var b=new DOMException("getDisplayMedia without video constraints is undefined");return b.name="NotFoundError",b.code=8,Promise.reject(b)}return s.video===!0?s.video={mediaSource:a}:s.video.mediaSource=a,r.navigator.mediaDevices.getUserMedia(s)})}},{}],13:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(b){return ue(b)}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":ue(b)};n.shimGetUserMedia=s;var r=f("../utils"),a=l(r);function l(b){if(b&&b.__esModule)return b;var T={};if(b!=null)for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&(T[C]=b[C]);return T.default=b,T}function s(b){var T=a.detectBrowser(b),C=b&&b.navigator,y=b&&b.MediaStreamTrack;if(C.getUserMedia=function(w,z,S){a.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),C.mediaDevices.getUserMedia(w).then(z,S)},!(T.version>55&&"autoGainControl"in C.mediaDevices.getSupportedConstraints())){var h=function(z,S,d){S in z&&!(d in z)&&(z[d]=z[S],delete z[S])},D=C.mediaDevices.getUserMedia.bind(C.mediaDevices);if(C.mediaDevices.getUserMedia=function(w){return(typeof w=="undefined"?"undefined":i(w))==="object"&&i(w.audio)==="object"&&(w=JSON.parse(JSON.stringify(w)),h(w.audio,"autoGainControl","mozAutoGainControl"),h(w.audio,"noiseSuppression","mozNoiseSuppression")),D(w)},y&&y.prototype.getSettings){var _=y.prototype.getSettings;y.prototype.getSettings=function(){var w=_.apply(this,arguments);return h(w,"mozAutoGainControl","autoGainControl"),h(w,"mozNoiseSuppression","noiseSuppression"),w}}if(y&&y.prototype.applyConstraints){var E=y.prototype.applyConstraints;y.prototype.applyConstraints=function(w){return this.kind==="audio"&&(typeof w=="undefined"?"undefined":i(w))==="object"&&(w=JSON.parse(JSON.stringify(w)),h(w,"autoGainControl","mozAutoGainControl"),h(w,"noiseSuppression","mozNoiseSuppression")),E.apply(this,[w])}}}}},{"../utils":15}],14:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(E){return ue(E)}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":ue(E)};n.shimLocalStreamsAPI=s,n.shimRemoteStreamsAPI=b,n.shimCallbacksAPI=T,n.shimGetUserMedia=C,n.shimConstraints=y,n.shimRTCIceServerUrls=h,n.shimTrackEventTransceiver=D,n.shimCreateOfferLegacy=_;var r=f("../utils"),a=l(r);function l(E){if(E&&E.__esModule)return E;var w={};if(E!=null)for(var z in E)Object.prototype.hasOwnProperty.call(E,z)&&(w[z]=E[z]);return w.default=E,w}function s(E){if(!((typeof E=="undefined"?"undefined":i(E))!=="object"||!E.RTCPeerConnection)){if("getLocalStreams"in E.RTCPeerConnection.prototype||(E.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in E.RTCPeerConnection.prototype)){var w=E.RTCPeerConnection.prototype.addTrack;E.RTCPeerConnection.prototype.addStream=function(S){var d=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(S)||this._localStreams.push(S),S.getAudioTracks().forEach(function(m){return w.call(d,m,S)}),S.getVideoTracks().forEach(function(m){return w.call(d,m,S)})},E.RTCPeerConnection.prototype.addTrack=function(S){var d=arguments[1];return d&&(this._localStreams?this._localStreams.includes(d)||this._localStreams.push(d):this._localStreams=[d]),w.apply(this,arguments)}}"removeStream"in E.RTCPeerConnection.prototype||(E.RTCPeerConnection.prototype.removeStream=function(S){var d=this;this._localStreams||(this._localStreams=[]);var m=this._localStreams.indexOf(S);if(m!==-1){this._localStreams.splice(m,1);var g=S.getTracks();this.getSenders().forEach(function(k){g.includes(k.track)&&d.removeTrack(k)})}})}}function b(E){if(!((typeof E=="undefined"?"undefined":i(E))!=="object"||!E.RTCPeerConnection)&&("getRemoteStreams"in E.RTCPeerConnection.prototype||(E.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in E.RTCPeerConnection.prototype))){Object.defineProperty(E.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(S){var d=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=S),this.addEventListener("track",this._onaddstreampoly=function(m){m.streams.forEach(function(g){if(d._remoteStreams||(d._remoteStreams=[]),!d._remoteStreams.includes(g)){d._remoteStreams.push(g);var k=new Event("addstream");k.stream=g,d.dispatchEvent(k)}})})}});var w=E.RTCPeerConnection.prototype.setRemoteDescription;E.RTCPeerConnection.prototype.setRemoteDescription=function(){var S=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(d){d.streams.forEach(function(m){if(S._remoteStreams||(S._remoteStreams=[]),!(S._remoteStreams.indexOf(m)>=0)){S._remoteStreams.push(m);var g=new Event("addstream");g.stream=m,S.dispatchEvent(g)}})}),w.apply(S,arguments)}}}function T(E){if(!((typeof E=="undefined"?"undefined":i(E))!=="object"||!E.RTCPeerConnection)){var w=E.RTCPeerConnection.prototype,z=w.createOffer,S=w.createAnswer,d=w.setLocalDescription,m=w.setRemoteDescription,g=w.addIceCandidate;w.createOffer=function(O,H){var Z=arguments.length>=2?arguments[2]:arguments[0],X=z.apply(this,[Z]);return H?(X.then(O,H),Promise.resolve()):X},w.createAnswer=function(O,H){var Z=arguments.length>=2?arguments[2]:arguments[0],X=S.apply(this,[Z]);return H?(X.then(O,H),Promise.resolve()):X};var k=function(O,H,Z){var X=d.apply(this,[O]);return Z?(X.then(H,Z),Promise.resolve()):X};w.setLocalDescription=k,k=function(O,H,Z){var X=m.apply(this,[O]);return Z?(X.then(H,Z),Promise.resolve()):X},w.setRemoteDescription=k,k=function(O,H,Z){var X=g.apply(this,[O]);return Z?(X.then(H,Z),Promise.resolve()):X},w.addIceCandidate=k}}function C(E){var w=E&&E.navigator;if(w.mediaDevices&&w.mediaDevices.getUserMedia){var z=w.mediaDevices,S=z.getUserMedia.bind(z);w.mediaDevices.getUserMedia=function(d){return S(y(d))}}!w.getUserMedia&&w.mediaDevices&&w.mediaDevices.getUserMedia&&(w.getUserMedia=function(m,g,k){w.mediaDevices.getUserMedia(m).then(g,k)}.bind(w))}function y(E){return E&&E.video!==void 0?Object.assign({},E,{video:a.compactObject(E.video)}):E}function h(E){var w=E.RTCPeerConnection;E.RTCPeerConnection=function(S,d){if(S&&S.iceServers){for(var m=[],g=0;g=m&&parseInt(g[m],10)}function b(S,d,m){if(S.RTCPeerConnection){var g=S.RTCPeerConnection.prototype,k=g.addEventListener;g.addEventListener=function(O,H){if(O!==d)return k.apply(this,arguments);var Z=function(ne){var Y=m(ne);Y&&H(Y)};return this._eventMap=this._eventMap||{},this._eventMap[H]=Z,k.apply(this,[O,Z])};var A=g.removeEventListener;g.removeEventListener=function(O,H){if(O!==d||!this._eventMap||!this._eventMap[H])return A.apply(this,arguments);var Z=this._eventMap[H];return delete this._eventMap[H],A.apply(this,[O,Z])},Object.defineProperty(g,"on"+d,{get:function(){return this["_on"+d]},set:function(H){this["_on"+d]&&(this.removeEventListener(d,this["_on"+d]),delete this["_on"+d]),H&&this.addEventListener(d,this["_on"+d]=H)},enumerable:!0,configurable:!0})}}function T(S){return typeof S!="boolean"?new Error("Argument type: "+(typeof S=="undefined"?"undefined":i(S))+". Please use a boolean."):(a=S,S?"adapter.js logging disabled":"adapter.js logging enabled")}function C(S){return typeof S!="boolean"?new Error("Argument type: "+(typeof S=="undefined"?"undefined":i(S))+". Please use a boolean."):(l=!S,"adapter.js deprecation warnings "+(S?"disabled":"enabled"))}function y(){if((typeof window=="undefined"?"undefined":i(window))==="object"){if(a)return;typeof console!="undefined"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function h(S,d){l&&console.warn(S+" is deprecated, please use "+d+" instead.")}function D(S){var d=S.navigator,m={browser:null,version:null};if(typeof S=="undefined"||!S.navigator)return m.browser="Not a browser.",m;if(d.mozGetUserMedia)m.browser="firefox",m.version=s(d.userAgent,/Firefox\/(\d+)\./,1);else if(d.webkitGetUserMedia||S.isSecureContext===!1&&S.webkitRTCPeerConnection&&!S.RTCIceGatherer)m.browser="chrome",m.version=s(d.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(d.mediaDevices&&d.userAgent.match(/Edge\/(\d+).(\d+)$/))m.browser="edge",m.version=s(d.userAgent,/Edge\/(\d+).(\d+)$/,2);else if(S.RTCPeerConnection&&d.userAgent.match(/AppleWebKit\/(\d+)\./))m.browser="safari",m.version=s(d.userAgent,/AppleWebKit\/(\d+)\./,1),m.supportsUnifiedPlan=S.RTCRtpTransceiver&&"currentDirection"in S.RTCRtpTransceiver.prototype;else return m.browser="Not a supported browser.",m;return m}function _(S){return Object.prototype.toString.call(S)==="[object Object]"}function E(S){return _(S)?Object.keys(S).reduce(function(d,m){var g=_(S[m]),k=g?E(S[m]):S[m],A=g&&!Object.keys(k).length;return k===void 0||A?d:Object.assign(d,r({},m,k))},{}):S}function w(S,d,m){!d||m.has(d.id)||(m.set(d.id,d),Object.keys(d).forEach(function(g){g.endsWith("Id")?w(S,S.get(d[g]),m):g.endsWith("Ids")&&d[g].forEach(function(k){w(S,S.get(k),m)})}))}function z(S,d,m){var g=m?"outbound-rtp":"inbound-rtp",k=new Map;if(d===null)return k;var A=[];return S.forEach(function(O){O.type==="track"&&O.trackIdentifier===d.id&&A.push(O)}),A.forEach(function(O){S.forEach(function(H){H.type===g&&H.trackId===O.id&&w(S,H,k)})}),k}},{}],16:[function(f,u,n){var i=f("sdp");function r(y){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[y.type]||y.type}function a(y,h,D,_,E){var w=i.writeRtpDescription(y.kind,h);if(w+=i.writeIceParameters(y.iceGatherer.getLocalParameters()),w+=i.writeDtlsParameters(y.dtlsTransport.getLocalParameters(),D==="offer"?"actpass":E||"active"),w+="a=mid:"+y.mid+`\r `,y.rtpSender&&y.rtpReceiver?w+=`a=sendrecv\r `:y.rtpSender?w+=`a=sendonly\r `:y.rtpReceiver?w+=`a=recvonly\r `:w+=`a=inactive\r `,y.rtpSender){var z=y.rtpSender._initialTrackId||y.rtpSender.track.id;y.rtpSender._initialTrackId=z;var S="msid:"+(_?_.id:"-")+" "+z+`\r `;w+="a="+S,w+="a=ssrc:"+y.sendEncodingParameters[0].ssrc+" "+S,y.sendEncodingParameters[0].rtx&&(w+="a=ssrc:"+y.sendEncodingParameters[0].rtx.ssrc+" "+S,w+="a=ssrc-group:FID "+y.sendEncodingParameters[0].ssrc+" "+y.sendEncodingParameters[0].rtx.ssrc+`\r `)}return w+="a=ssrc:"+y.sendEncodingParameters[0].ssrc+" cname:"+i.localCName+`\r `,y.rtpSender&&y.sendEncodingParameters[0].rtx&&(w+="a=ssrc:"+y.sendEncodingParameters[0].rtx.ssrc+" cname:"+i.localCName+`\r `),w}function l(y,h){var D=!1;return y=JSON.parse(JSON.stringify(y)),y.filter(function(_){if(_&&(_.urls||_.url)){var E=_.urls||_.url;_.url&&!_.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var w=typeof E=="string";return w&&(E=[E]),E=E.filter(function(z){var S=z.indexOf("turn:")===0&&z.indexOf("transport=udp")!==-1&&z.indexOf("turn:[")===-1&&!D;return S?(D=!0,!0):z.indexOf("stun:")===0&&h>=14393&&z.indexOf("?transport=udp")===-1}),delete _.url,_.urls=w?E[0]:E,!!E.length}})}function s(y,h){var D={codecs:[],headerExtensions:[],fecMechanisms:[]},_=function(z,S){z=parseInt(z,10);for(var d=0;d0;A--)this._iceGatherers.push(new y.RTCIceGatherer({iceServers:m.iceServers,gatherPolicy:m.iceTransportPolicy}));else m.iceCandidatePoolSize=0;this._config=m,this.transceivers=[],this._sdpSessionId=i.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(w.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(w.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),w.prototype.onicecandidate=null,w.prototype.onaddstream=null,w.prototype.ontrack=null,w.prototype.onremovestream=null,w.prototype.onsignalingstatechange=null,w.prototype.oniceconnectionstatechange=null,w.prototype.onconnectionstatechange=null,w.prototype.onicegatheringstatechange=null,w.prototype.onnegotiationneeded=null,w.prototype.ondatachannel=null,w.prototype._dispatchEvent=function(d,m){this._isClosed||(this.dispatchEvent(m),typeof this["on"+d]=="function"&&this["on"+d](m))},w.prototype._emitGatheringStateChange=function(){var d=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",d)},w.prototype.getConfiguration=function(){return this._config},w.prototype.getLocalStreams=function(){return this.localStreams},w.prototype.getRemoteStreams=function(){return this.remoteStreams},w.prototype._createTransceiver=function(d,m){var g=this.transceivers.length>0,k={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:d,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&g)k.iceTransport=this.transceivers[0].iceTransport,k.dtlsTransport=this.transceivers[0].dtlsTransport;else{var A=this._createIceAndDtlsTransports();k.iceTransport=A.iceTransport,k.dtlsTransport=A.dtlsTransport}return m||this.transceivers.push(k),k},w.prototype.addTrack=function(d,m){if(this._isClosed)throw C("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var g=this.transceivers.find(function(O){return O.track===d});if(g)throw C("InvalidAccessError","Track already exists.");for(var k,A=0;A=15025)d.getTracks().forEach(function(k){m.addTrack(k,d)});else{var g=d.clone();d.getTracks().forEach(function(k,A){var O=g.getTracks()[A];k.addEventListener("enabled",function(H){O.enabled=H.enabled})}),g.getTracks().forEach(function(k){m.addTrack(k,g)})}},w.prototype.removeTrack=function(d){if(this._isClosed)throw C("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(d instanceof y.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var m=this.transceivers.find(function(A){return A.rtpSender===d});if(!m)throw C("InvalidAccessError","Sender was not created by this connection.");var g=m.stream;m.rtpSender.stop(),m.rtpSender=null,m.track=null,m.stream=null;var k=this.transceivers.map(function(A){return A.stream});k.indexOf(g)===-1&&this.localStreams.indexOf(g)>-1&&this.localStreams.splice(this.localStreams.indexOf(g),1),this._maybeFireNegotiationNeeded()},w.prototype.removeStream=function(d){var m=this;d.getTracks().forEach(function(g){var k=m.getSenders().find(function(A){return A.track===g});k&&m.removeTrack(k)})},w.prototype.getSenders=function(){return this.transceivers.filter(function(d){return!!d.rtpSender}).map(function(d){return d.rtpSender})},w.prototype.getReceivers=function(){return this.transceivers.filter(function(d){return!!d.rtpReceiver}).map(function(d){return d.rtpReceiver})},w.prototype._createIceGatherer=function(d,m){var g=this;if(m&&d>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var k=new y.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(k,"state",{value:"new",writable:!0}),this.transceivers[d].bufferedCandidateEvents=[],this.transceivers[d].bufferCandidates=function(A){var O=!A.candidate||Object.keys(A.candidate).length===0;k.state=O?"completed":"gathering",g.transceivers[d].bufferedCandidateEvents!==null&&g.transceivers[d].bufferedCandidateEvents.push(A)},k.addEventListener("localcandidate",this.transceivers[d].bufferCandidates),k},w.prototype._gather=function(d,m){var g=this,k=this.transceivers[m].iceGatherer;if(!k.onlocalcandidate){var A=this.transceivers[m].bufferedCandidateEvents;this.transceivers[m].bufferedCandidateEvents=null,k.removeEventListener("localcandidate",this.transceivers[m].bufferCandidates),k.onlocalcandidate=function(O){if(!(g.usingBundle&&m>0)){var H=new Event("icecandidate");H.candidate={sdpMid:d,sdpMLineIndex:m};var Z=O.candidate,X=!Z||Object.keys(Z).length===0;if(X)(k.state==="new"||k.state==="gathering")&&(k.state="completed");else{k.state==="new"&&(k.state="gathering"),Z.component=1,Z.ufrag=k.getLocalParameters().usernameFragment;var ne=i.writeCandidate(Z);H.candidate=Object.assign(H.candidate,i.parseCandidate(ne)),H.candidate.candidate=ne,H.candidate.toJSON=function(){return{candidate:H.candidate.candidate,sdpMid:H.candidate.sdpMid,sdpMLineIndex:H.candidate.sdpMLineIndex,usernameFragment:H.candidate.usernameFragment}}}var Y=i.getMediaSections(g._localDescription.sdp);X?Y[H.candidate.sdpMLineIndex]+=`a=end-of-candidates\r `:Y[H.candidate.sdpMLineIndex]+="a="+H.candidate.candidate+`\r `,g._localDescription.sdp=i.getDescription(g._localDescription.sdp)+Y.join("");var me=g.transceivers.every(function(ge){return ge.iceGatherer&&ge.iceGatherer.state==="completed"});g.iceGatheringState!=="gathering"&&(g.iceGatheringState="gathering",g._emitGatheringStateChange()),X||g._dispatchEvent("icecandidate",H),me&&(g._dispatchEvent("icecandidate",new Event("icecandidate")),g.iceGatheringState="complete",g._emitGatheringStateChange())}},y.setTimeout(function(){A.forEach(function(O){k.onlocalcandidate(O)})},0)}},w.prototype._createIceAndDtlsTransports=function(){var d=this,m=new y.RTCIceTransport(null);m.onicestatechange=function(){d._updateIceConnectionState(),d._updateConnectionState()};var g=new y.RTCDtlsTransport(m);return g.ondtlsstatechange=function(){d._updateConnectionState()},g.onerror=function(){Object.defineProperty(g,"state",{value:"failed",writable:!0}),d._updateConnectionState()},{iceTransport:m,dtlsTransport:g}},w.prototype._disposeIceAndDtlsTransports=function(d){var m=this.transceivers[d].iceGatherer;m&&(delete m.onlocalcandidate,delete this.transceivers[d].iceGatherer);var g=this.transceivers[d].iceTransport;g&&(delete g.onicestatechange,delete this.transceivers[d].iceTransport);var k=this.transceivers[d].dtlsTransport;k&&(delete k.ondtlsstatechange,delete k.onerror,delete this.transceivers[d].dtlsTransport)},w.prototype._transceive=function(d,m,g){var k=s(d.localCapabilities,d.remoteCapabilities);m&&d.rtpSender&&(k.encodings=d.sendEncodingParameters,k.rtcp={cname:i.localCName,compound:d.rtcpParameters.compound},d.recvEncodingParameters.length&&(k.rtcp.ssrc=d.recvEncodingParameters[0].ssrc),d.rtpSender.send(k)),g&&d.rtpReceiver&&k.codecs.length>0&&(d.kind==="video"&&d.recvEncodingParameters&&h<15019&&d.recvEncodingParameters.forEach(function(A){delete A.rtx}),d.recvEncodingParameters.length?k.encodings=d.recvEncodingParameters:k.encodings=[{}],k.rtcp={compound:d.rtcpParameters.compound},d.rtcpParameters.cname&&(k.rtcp.cname=d.rtcpParameters.cname),d.sendEncodingParameters.length&&(k.rtcp.ssrc=d.sendEncodingParameters[0].ssrc),d.rtpReceiver.receive(k))},w.prototype.setLocalDescription=function(d){var m=this;if(["offer","answer"].indexOf(d.type)===-1)return Promise.reject(C("TypeError",'Unsupported type "'+d.type+'"'));if(!b("setLocalDescription",d.type,m.signalingState)||m._isClosed)return Promise.reject(C("InvalidStateError","Can not set local "+d.type+" in state "+m.signalingState));var g,k;if(d.type==="offer")g=i.splitSections(d.sdp),k=g.shift(),g.forEach(function(O,H){var Z=i.parseRtpParameters(O);m.transceivers[H].localCapabilities=Z}),m.transceivers.forEach(function(O,H){m._gather(O.mid,H)});else if(d.type==="answer"){g=i.splitSections(m._remoteDescription.sdp),k=g.shift();var A=i.matchPrefix(k,"a=ice-lite").length>0;g.forEach(function(O,H){var Z=m.transceivers[H],X=Z.iceGatherer,ne=Z.iceTransport,Y=Z.dtlsTransport,me=Z.localCapabilities,ge=Z.remoteCapabilities,ve=i.isRejected(O)&&i.matchPrefix(O,"a=bundle-only").length===0;if(!ve&&!Z.rejected){var Ce=i.getIceParameters(O,k),be=i.getDtlsParameters(O,k);A&&(be.role="server"),(!m.usingBundle||H===0)&&(m._gather(Z.mid,H),ne.state==="new"&&ne.start(X,Ce,A?"controlling":"controlled"),Y.state==="new"&&Y.start(be));var Pe=s(me,ge);m._transceive(Z,Pe.codecs.length>0,!1)}})}return m._localDescription={type:d.type,sdp:d.sdp},d.type==="offer"?m._updateSignalingState("have-local-offer"):m._updateSignalingState("stable"),Promise.resolve()},w.prototype.setRemoteDescription=function(d){var m=this;if(["offer","answer"].indexOf(d.type)===-1)return Promise.reject(C("TypeError",'Unsupported type "'+d.type+'"'));if(!b("setRemoteDescription",d.type,m.signalingState)||m._isClosed)return Promise.reject(C("InvalidStateError","Can not set remote "+d.type+" in state "+m.signalingState));var g={};m.remoteStreams.forEach(function(ne){g[ne.id]=ne});var k=[],A=i.splitSections(d.sdp),O=A.shift(),H=i.matchPrefix(O,"a=ice-lite").length>0,Z=i.matchPrefix(O,"a=group:BUNDLE ").length>0;m.usingBundle=Z;var X=i.matchPrefix(O,"a=ice-options:")[0];return X?m.canTrickleIceCandidates=X.substr(14).split(" ").indexOf("trickle")>=0:m.canTrickleIceCandidates=!1,A.forEach(function(ne,Y){var me=i.splitLines(ne),ge=i.getKind(ne),ve=i.isRejected(ne)&&i.matchPrefix(ne,"a=bundle-only").length===0,Ce=me[0].substr(2).split(" ")[2],be=i.getDirection(ne,O),Pe=i.parseMsid(ne),Ye=i.getMid(ne)||i.generateIdentifier();if(ve||ge==="application"&&(Ce==="DTLS/SCTP"||Ce==="UDP/DTLS/SCTP")){m.transceivers[Y]={mid:Ye,kind:ge,protocol:Ce,rejected:!0};return}!ve&&m.transceivers[Y]&&m.transceivers[Y].rejected&&(m.transceivers[Y]=m._createTransceiver(ge,!0));var N,K,te,ce,he,Re,we,ke,We,yn=i.parseRtpParameters(ne),Yt,It;ve||(Yt=i.getIceParameters(ne,O),It=i.getDtlsParameters(ne,O),It.role="client"),we=i.parseRtpEncodingParameters(ne);var Ht=i.parseRtcpParameters(ne),Ge=i.matchPrefix(ne,"a=end-of-candidates",O).length>0,Ct=i.matchPrefix(ne,"a=candidate:").map(function(ye){return i.parseCandidate(ye)}).filter(function(ye){return ye.component===1});if((d.type==="offer"||d.type==="answer")&&!ve&&Z&&Y>0&&m.transceivers[Y]&&(m._disposeIceAndDtlsTransports(Y),m.transceivers[Y].iceGatherer=m.transceivers[0].iceGatherer,m.transceivers[Y].iceTransport=m.transceivers[0].iceTransport,m.transceivers[Y].dtlsTransport=m.transceivers[0].dtlsTransport,m.transceivers[Y].rtpSender&&m.transceivers[Y].rtpSender.setTransport(m.transceivers[0].dtlsTransport),m.transceivers[Y].rtpReceiver&&m.transceivers[Y].rtpReceiver.setTransport(m.transceivers[0].dtlsTransport)),d.type==="offer"&&!ve){N=m.transceivers[Y]||m._createTransceiver(ge),N.mid=Ye,N.iceGatherer||(N.iceGatherer=m._createIceGatherer(Y,Z)),Ct.length&&N.iceTransport.state==="new"&&(Ge&&(!Z||Y===0)?N.iceTransport.setRemoteCandidates(Ct):Ct.forEach(function(ye){T(N.iceTransport,ye)})),ke=y.RTCRtpReceiver.getCapabilities(ge),h<15019&&(ke.codecs=ke.codecs.filter(function(ye){return ye.name!=="rtx"})),Re=N.sendEncodingParameters||[{ssrc:(2*Y+2)*1001}];var kt=!1;if(be==="sendrecv"||be==="sendonly"){if(kt=!N.rtpReceiver,he=N.rtpReceiver||new y.RTCRtpReceiver(N.dtlsTransport,ge),kt){var Oe;We=he.track,Pe&&Pe.stream==="-"||(Pe?(g[Pe.stream]||(g[Pe.stream]=new y.MediaStream,Object.defineProperty(g[Pe.stream],"id",{get:function(){return Pe.stream}})),Object.defineProperty(We,"id",{get:function(){return Pe.track}}),Oe=g[Pe.stream]):(g.default||(g.default=new y.MediaStream),Oe=g.default)),Oe&&(D(We,Oe),N.associatedRemoteMediaStreams.push(Oe)),k.push([We,he,Oe])}}else N.rtpReceiver&&N.rtpReceiver.track&&(N.associatedRemoteMediaStreams.forEach(function(ye){var De=ye.getTracks().find(function(Xe){return Xe.id===N.rtpReceiver.track.id});De&&_(De,ye)}),N.associatedRemoteMediaStreams=[]);N.localCapabilities=ke,N.remoteCapabilities=yn,N.rtpReceiver=he,N.rtcpParameters=Ht,N.sendEncodingParameters=Re,N.recvEncodingParameters=we,m._transceive(m.transceivers[Y],!1,kt)}else if(d.type==="answer"&&!ve){N=m.transceivers[Y],K=N.iceGatherer,te=N.iceTransport,ce=N.dtlsTransport,he=N.rtpReceiver,Re=N.sendEncodingParameters,ke=N.localCapabilities,m.transceivers[Y].recvEncodingParameters=we,m.transceivers[Y].remoteCapabilities=yn,m.transceivers[Y].rtcpParameters=Ht,Ct.length&&te.state==="new"&&((H||Ge)&&(!Z||Y===0)?te.setRemoteCandidates(Ct):Ct.forEach(function(ye){T(N.iceTransport,ye)})),(!Z||Y===0)&&(te.state==="new"&&te.start(K,Yt,"controlling"),ce.state==="new"&&ce.start(It));var rt=s(N.localCapabilities,N.remoteCapabilities),Ae=rt.codecs.filter(function(ye){return ye.name.toLowerCase()==="rtx"}).length;!Ae&&N.sendEncodingParameters[0].rtx&&delete N.sendEncodingParameters[0].rtx,m._transceive(N,be==="sendrecv"||be==="recvonly",be==="sendrecv"||be==="sendonly"),he&&(be==="sendrecv"||be==="sendonly")?(We=he.track,Pe?(g[Pe.stream]||(g[Pe.stream]=new y.MediaStream),D(We,g[Pe.stream]),k.push([We,he,g[Pe.stream]])):(g.default||(g.default=new y.MediaStream),D(We,g.default),k.push([We,he,g.default]))):delete N.rtpReceiver}}),m._dtlsRole===void 0&&(m._dtlsRole=d.type==="offer"?"active":"passive"),m._remoteDescription={type:d.type,sdp:d.sdp},d.type==="offer"?m._updateSignalingState("have-remote-offer"):m._updateSignalingState("stable"),Object.keys(g).forEach(function(ne){var Y=g[ne];if(Y.getTracks().length){if(m.remoteStreams.indexOf(Y)===-1){m.remoteStreams.push(Y);var me=new Event("addstream");me.stream=Y,y.setTimeout(function(){m._dispatchEvent("addstream",me)})}k.forEach(function(ge){var ve=ge[0],Ce=ge[1];Y.id===ge[2].id&&E(m,ve,Ce,[Y])})}}),k.forEach(function(ne){ne[2]||E(m,ne[0],ne[1],[])}),y.setTimeout(function(){m&&m.transceivers&&m.transceivers.forEach(function(ne){ne.iceTransport&&ne.iceTransport.state==="new"&&ne.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),ne.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},w.prototype.close=function(){this.transceivers.forEach(function(d){d.iceTransport&&d.iceTransport.stop(),d.dtlsTransport&&d.dtlsTransport.stop(),d.rtpSender&&d.rtpSender.stop(),d.rtpReceiver&&d.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},w.prototype._updateSignalingState=function(d){this.signalingState=d;var m=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",m)},w.prototype._maybeFireNegotiationNeeded=function(){var d=this;this.signalingState!=="stable"||this.needNegotiation===!0||(this.needNegotiation=!0,y.setTimeout(function(){if(d.needNegotiation){d.needNegotiation=!1;var m=new Event("negotiationneeded");d._dispatchEvent("negotiationneeded",m)}},0))},w.prototype._updateIceConnectionState=function(){var d,m={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(k){k.iceTransport&&!k.rejected&&m[k.iceTransport.state]++}),d="new",m.failed>0?d="failed":m.checking>0?d="checking":m.disconnected>0?d="disconnected":m.new>0?d="new":m.connected>0?d="connected":m.completed>0&&(d="completed"),d!==this.iceConnectionState){this.iceConnectionState=d;var g=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",g)}},w.prototype._updateConnectionState=function(){var d,m={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(k){k.iceTransport&&k.dtlsTransport&&!k.rejected&&(m[k.iceTransport.state]++,m[k.dtlsTransport.state]++)}),m.connected+=m.completed,d="new",m.failed>0?d="failed":m.connecting>0?d="connecting":m.disconnected>0?d="disconnected":m.new>0?d="new":m.connected>0&&(d="connected"),d!==this.connectionState){this.connectionState=d;var g=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",g)}},w.prototype.createOffer=function(){var d=this;if(d._isClosed)return Promise.reject(C("InvalidStateError","Can not call createOffer after close"));var m=d.transceivers.filter(function(H){return H.kind==="audio"}).length,g=d.transceivers.filter(function(H){return H.kind==="video"}).length,k=arguments[0];if(k){if(k.mandatory||k.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");k.offerToReceiveAudio!==void 0&&(k.offerToReceiveAudio===!0?m=1:k.offerToReceiveAudio===!1?m=0:m=k.offerToReceiveAudio),k.offerToReceiveVideo!==void 0&&(k.offerToReceiveVideo===!0?g=1:k.offerToReceiveVideo===!1?g=0:g=k.offerToReceiveVideo)}for(d.transceivers.forEach(function(H){H.kind==="audio"?(m--,m<0&&(H.wantReceive=!1)):H.kind==="video"&&(g--,g<0&&(H.wantReceive=!1))});m>0||g>0;)m>0&&(d._createTransceiver("audio"),m--),g>0&&(d._createTransceiver("video"),g--);var A=i.writeSessionBoilerplate(d._sdpSessionId,d._sdpSessionVersion++);d.transceivers.forEach(function(H,Z){var X=H.track,ne=H.kind,Y=H.mid||i.generateIdentifier();H.mid=Y,H.iceGatherer||(H.iceGatherer=d._createIceGatherer(Z,d.usingBundle));var me=y.RTCRtpSender.getCapabilities(ne);h<15019&&(me.codecs=me.codecs.filter(function(ve){return ve.name!=="rtx"})),me.codecs.forEach(function(ve){ve.name==="H264"&&ve.parameters["level-asymmetry-allowed"]===void 0&&(ve.parameters["level-asymmetry-allowed"]="1"),H.remoteCapabilities&&H.remoteCapabilities.codecs&&H.remoteCapabilities.codecs.forEach(function(Ce){ve.name.toLowerCase()===Ce.name.toLowerCase()&&ve.clockRate===Ce.clockRate&&(ve.preferredPayloadType=Ce.payloadType)})}),me.headerExtensions.forEach(function(ve){var Ce=H.remoteCapabilities&&H.remoteCapabilities.headerExtensions||[];Ce.forEach(function(be){ve.uri===be.uri&&(ve.id=be.id)})});var ge=H.sendEncodingParameters||[{ssrc:(2*Z+1)*1001}];X&&h>=15019&&ne==="video"&&!ge[0].rtx&&(ge[0].rtx={ssrc:ge[0].ssrc+1}),H.wantReceive&&(H.rtpReceiver=new y.RTCRtpReceiver(H.dtlsTransport,ne)),H.localCapabilities=me,H.sendEncodingParameters=ge}),d._config.bundlePolicy!=="max-compat"&&(A+="a=group:BUNDLE "+d.transceivers.map(function(H){return H.mid}).join(" ")+`\r `),A+=`a=ice-options:trickle\r `,d.transceivers.forEach(function(H,Z){A+=a(H,H.localCapabilities,"offer",H.stream,d._dtlsRole),A+=`a=rtcp-rsize\r `,H.iceGatherer&&d.iceGatheringState!=="new"&&(Z===0||!d.usingBundle)&&(H.iceGatherer.getLocalCandidates().forEach(function(X){X.component=1,A+="a="+i.writeCandidate(X)+`\r `}),H.iceGatherer.state==="completed"&&(A+=`a=end-of-candidates\r `))});var O=new y.RTCSessionDescription({type:"offer",sdp:A});return Promise.resolve(O)},w.prototype.createAnswer=function(){var d=this;if(d._isClosed)return Promise.reject(C("InvalidStateError","Can not call createAnswer after close"));if(!(d.signalingState==="have-remote-offer"||d.signalingState==="have-local-pranswer"))return Promise.reject(C("InvalidStateError","Can not call createAnswer in signalingState "+d.signalingState));var m=i.writeSessionBoilerplate(d._sdpSessionId,d._sdpSessionVersion++);d.usingBundle&&(m+="a=group:BUNDLE "+d.transceivers.map(function(A){return A.mid}).join(" ")+`\r `),m+=`a=ice-options:trickle\r `;var g=i.getMediaSections(d._remoteDescription.sdp).length;d.transceivers.forEach(function(A,O){if(!(O+1>g)){if(A.rejected){A.kind==="application"?A.protocol==="DTLS/SCTP"?m+=`m=application 0 DTLS/SCTP 5000\r `:m+="m=application 0 "+A.protocol+` webrtc-datachannel\r `:A.kind==="audio"?m+=`m=audio 0 UDP/TLS/RTP/SAVPF 0\r a=rtpmap:0 PCMU/8000\r `:A.kind==="video"&&(m+=`m=video 0 UDP/TLS/RTP/SAVPF 120\r a=rtpmap:120 VP8/90000\r `),m+=`c=IN IP4 0.0.0.0\r a=inactive\r a=mid:`+A.mid+`\r `;return}if(A.stream){var H;A.kind==="audio"?H=A.stream.getAudioTracks()[0]:A.kind==="video"&&(H=A.stream.getVideoTracks()[0]),H&&h>=15019&&A.kind==="video"&&!A.sendEncodingParameters[0].rtx&&(A.sendEncodingParameters[0].rtx={ssrc:A.sendEncodingParameters[0].ssrc+1})}var Z=s(A.localCapabilities,A.remoteCapabilities),X=Z.codecs.filter(function(ne){return ne.name.toLowerCase()==="rtx"}).length;!X&&A.sendEncodingParameters[0].rtx&&delete A.sendEncodingParameters[0].rtx,m+=a(A,Z,"answer",A.stream,d._dtlsRole),A.rtcpParameters&&A.rtcpParameters.reducedSize&&(m+=`a=rtcp-rsize\r `)}});var k=new y.RTCSessionDescription({type:"answer",sdp:m});return Promise.resolve(k)},w.prototype.addIceCandidate=function(d){var m=this,g;return d&&!(d.sdpMLineIndex!==void 0||d.sdpMid)?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(k,A){if(m._remoteDescription)if(!d||d.candidate==="")for(var O=0;O0?i.parseCandidate(d.candidate):{};if(ne.protocol==="tcp"&&(ne.port===0||ne.port===9)||ne.component&&ne.component!==1)return k();if((H===0||H>0&&X.iceTransport!==m.transceivers[0].iceTransport)&&!T(X.iceTransport,ne))return A(C("OperationError","Can not add ICE candidate"));var Y=d.candidate.trim();Y.indexOf("a=")===0&&(Y=Y.substr(2)),g=i.getMediaSections(m._remoteDescription.sdp),g[H]+="a="+(ne.type?Y:"end-of-candidates")+`\r `,m._remoteDescription.sdp=i.getDescription(m._remoteDescription.sdp)+g.join("")}else return A(C("OperationError","Can not add ICE candidate"))}else return A(C("InvalidStateError","Can not add ICE candidate without a remote description"));k()})},w.prototype.getStats=function(d){if(d&&d instanceof y.MediaStreamTrack){var m=null;if(this.transceivers.forEach(function(k){k.rtpSender&&k.rtpSender.track===d?m=k.rtpSender:k.rtpReceiver&&k.rtpReceiver.track===d&&(m=k.rtpReceiver)}),!m)throw C("InvalidAccessError","Invalid selector.");return m.getStats()}var g=[];return this.transceivers.forEach(function(k){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(A){k[A]&&g.push(k[A].getStats())})}),Promise.all(g).then(function(k){var A=new Map;return k.forEach(function(O){O.forEach(function(H){A.set(H.id,H)})}),A})};var z=["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"];z.forEach(function(d){var m=y[d];if(m&&m.prototype&&m.prototype.getStats){var g=m.prototype.getStats;m.prototype.getStats=function(){return g.apply(this).then(function(k){var A=new Map;return Object.keys(k).forEach(function(O){k[O].type=r(k[O]),A.set(O,k[O])}),A})}}});var S=["createOffer","createAnswer"];return S.forEach(function(d){var m=w.prototype[d];w.prototype[d]=function(){var g=arguments;return typeof g[0]=="function"||typeof g[1]=="function"?m.apply(this,[arguments[2]]).then(function(k){typeof g[0]=="function"&&g[0].apply(null,[k])},function(k){typeof g[1]=="function"&&g[1].apply(null,[k])}):m.apply(this,arguments)}}),S=["setLocalDescription","setRemoteDescription","addIceCandidate"],S.forEach(function(d){var m=w.prototype[d];w.prototype[d]=function(){var g=arguments;return typeof g[1]=="function"||typeof g[2]=="function"?m.apply(this,arguments).then(function(){typeof g[1]=="function"&&g[1].apply(null)},function(k){typeof g[2]=="function"&&g[2].apply(null,[k])}):m.apply(this,arguments)}}),["getStats"].forEach(function(d){var m=w.prototype[d];w.prototype[d]=function(){var g=arguments;return typeof g[1]=="function"?m.apply(this,arguments).then(function(){typeof g[1]=="function"&&g[1].apply(null)}):m.apply(this,arguments)}}),w}},{sdp:17}],17:[function(f,u,n){var i={};i.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},i.localCName=i.generateIdentifier(),i.splitLines=function(r){return r.trim().split(` `).map(function(a){return a.trim()})},i.splitSections=function(r){var a=r.split(` m=`);return a.map(function(l,s){return(s>0?"m="+l:l).trim()+`\r `})},i.getDescription=function(r){var a=i.splitSections(r);return a&&a[0]},i.getMediaSections=function(r){var a=i.splitSections(r);return a.shift(),a},i.matchPrefix=function(r,a){return i.splitLines(r).filter(function(l){return l.indexOf(a)===0})},i.parseCandidate=function(r){var a;r.indexOf("a=candidate:")===0?a=r.substring(12).split(" "):a=r.substring(10).split(" ");for(var l={foundation:a[0],component:parseInt(a[1],10),protocol:a[2].toLowerCase(),priority:parseInt(a[3],10),ip:a[4],address:a[4],port:parseInt(a[5],10),type:a[7]},s=8;s0?a[0].split("/")[1]:"sendrecv",uri:a[1]}},i.writeExtmap=function(r){return"a=extmap:"+(r.id||r.preferredId)+(r.direction&&r.direction!=="sendrecv"?"/"+r.direction:"")+" "+r.uri+`\r `},i.parseFmtp=function(r){for(var a={},l,s=r.substr(r.indexOf(" ")+1).split(";"),b=0;b-1?(l.attribute=r.substr(a+1,s-a-1),l.value=r.substr(s+1)):l.attribute=r.substr(a+1),l},i.parseSsrcGroup=function(r){var a=r.substr(13).split(" ");return{semantics:a.shift(),ssrcs:a.map(function(l){return parseInt(l,10)})}},i.getMid=function(r){var a=i.matchPrefix(r,"a=mid:")[0];if(a)return a.substr(6)},i.parseFingerprint=function(r){var a=r.substr(14).split(" ");return{algorithm:a[0].toLowerCase(),value:a[1]}},i.getDtlsParameters=function(r,a){var l=i.matchPrefix(r+a,"a=fingerprint:");return{role:"auto",fingerprints:l.map(i.parseFingerprint)}},i.writeDtlsParameters=function(r,a){var l="a=setup:"+a+`\r `;return r.fingerprints.forEach(function(s){l+="a=fingerprint:"+s.algorithm+" "+s.value+`\r `}),l},i.getIceParameters=function(r,a){var l=i.splitLines(r);l=l.concat(i.splitLines(a));var s={usernameFragment:l.filter(function(b){return b.indexOf("a=ice-ufrag:")===0})[0].substr(12),password:l.filter(function(b){return b.indexOf("a=ice-pwd:")===0})[0].substr(10)};return s},i.writeIceParameters=function(r){return"a=ice-ufrag:"+r.usernameFragment+`\r a=ice-pwd:`+r.password+`\r `},i.parseRtpParameters=function(r){for(var a={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},l=i.splitLines(r),s=l[0].split(" "),b=3;b0?"9":"0",l+=" UDP/TLS/RTP/SAVPF ",l+=a.codecs.map(function(b){return b.preferredPayloadType!==void 0?b.preferredPayloadType:b.payloadType}).join(" ")+`\r `,l+=`c=IN IP4 0.0.0.0\r `,l+=`a=rtcp:9 IN IP4 0.0.0.0\r `,a.codecs.forEach(function(b){l+=i.writeRtpMap(b),l+=i.writeFmtp(b),l+=i.writeRtcpFb(b)});var s=0;return a.codecs.forEach(function(b){b.maxptime>s&&(s=b.maxptime)}),s>0&&(l+="a=maxptime:"+s+`\r `),l+=`a=rtcp-mux\r `,a.headerExtensions&&a.headerExtensions.forEach(function(b){l+=i.writeExtmap(b)}),l},i.parseRtpEncodingParameters=function(r){var a=[],l=i.parseRtpParameters(r),s=l.fecMechanisms.indexOf("RED")!==-1,b=l.fecMechanisms.indexOf("ULPFEC")!==-1,T=i.matchPrefix(r,"a=ssrc:").map(function(_){return i.parseSsrcMedia(_)}).filter(function(_){return _.attribute==="cname"}),C=T.length>0&&T[0].ssrc,y,h=i.matchPrefix(r,"a=ssrc-group:FID").map(function(_){var E=_.substr(17).split(" ");return E.map(function(w){return parseInt(w,10)})});h.length>0&&h[0].length>1&&h[0][0]===C&&(y=h[0][1]),l.codecs.forEach(function(_){if(_.name.toUpperCase()==="RTX"&&_.parameters.apt){var E={ssrc:C,codecPayloadType:parseInt(_.parameters.apt,10)};C&&y&&(E.rtx={ssrc:y}),a.push(E),s&&(E=JSON.parse(JSON.stringify(E)),E.fec={ssrc:C,mechanism:b?"red+ulpfec":"red"},a.push(E))}}),a.length===0&&C&&a.push({ssrc:C});var D=i.matchPrefix(r,"b=");return D.length&&(D[0].indexOf("b=TIAS:")===0?D=parseInt(D[0].substr(7),10):D[0].indexOf("b=AS:")===0?D=parseInt(D[0].substr(5),10)*1e3*.95-50*40*8:D=void 0,a.forEach(function(_){_.maxBitrate=D})),a},i.parseRtcpParameters=function(r){var a={},l=i.matchPrefix(r,"a=ssrc:").map(function(T){return i.parseSsrcMedia(T)}).filter(function(T){return T.attribute==="cname"})[0];l&&(a.cname=l.value,a.ssrc=l.ssrc);var s=i.matchPrefix(r,"a=rtcp-rsize");a.reducedSize=s.length>0,a.compound=s.length===0;var b=i.matchPrefix(r,"a=rtcp-mux");return a.mux=b.length>0,a},i.parseMsid=function(r){var a,l=i.matchPrefix(r,"a=msid:");if(l.length===1)return a=l[0].substr(7).split(" "),{stream:a[0],track:a[1]};var s=i.matchPrefix(r,"a=ssrc:").map(function(b){return i.parseSsrcMedia(b)}).filter(function(b){return b.attribute==="msid"});if(s.length>0)return a=s[0].value.split(" "),{stream:a[0],track:a[1]}},i.parseSctpDescription=function(r){var a=i.parseMLine(r),l=i.matchPrefix(r,"a=max-message-size:"),s;l.length>0&&(s=parseInt(l[0].substr(19),10)),isNaN(s)&&(s=65536);var b=i.matchPrefix(r,"a=sctp-port:");if(b.length>0)return{port:parseInt(b[0].substr(12),10),protocol:a.fmt,maxMessageSize:s};var T=i.matchPrefix(r,"a=sctpmap:");if(T.length>0){var C=i.matchPrefix(r,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(C[0],10),protocol:C[1],maxMessageSize:s}}},i.writeSctpDescription=function(r,a){var l=[];return r.protocol!=="DTLS/SCTP"?l=["m="+r.kind+" 9 "+r.protocol+" "+a.protocol+`\r `,`c=IN IP4 0.0.0.0\r `,"a=sctp-port:"+a.port+`\r `]:l=["m="+r.kind+" 9 "+r.protocol+" "+a.port+`\r `,`c=IN IP4 0.0.0.0\r `,"a=sctpmap:"+a.port+" "+a.protocol+` 65535\r `],a.maxMessageSize!==void 0&&l.push("a=max-message-size:"+a.maxMessageSize+`\r `),l.join("")},i.generateSessionId=function(){return Math.random().toString().substr(2,21)},i.writeSessionBoilerplate=function(r,a,l){var s,b=a!==void 0?a:2;r?s=r:s=i.generateSessionId();var T=l||"thisisadapterortc";return`v=0\r o=`+T+" "+s+" "+b+` IN IP4 127.0.0.1\r s=-\r t=0 0\r `},i.writeMediaSection=function(r,a,l,s){var b=i.writeRtpDescription(r.kind,a);if(b+=i.writeIceParameters(r.iceGatherer.getLocalParameters()),b+=i.writeDtlsParameters(r.dtlsTransport.getLocalParameters(),l==="offer"?"actpass":"active"),b+="a=mid:"+r.mid+`\r `,r.direction?b+="a="+r.direction+`\r `:r.rtpSender&&r.rtpReceiver?b+=`a=sendrecv\r `:r.rtpSender?b+=`a=sendonly\r `:r.rtpReceiver?b+=`a=recvonly\r `:b+=`a=inactive\r `,r.rtpSender){var T="msid:"+s.id+" "+r.rtpSender.track.id+`\r `;b+="a="+T,b+="a=ssrc:"+r.sendEncodingParameters[0].ssrc+" "+T,r.sendEncodingParameters[0].rtx&&(b+="a=ssrc:"+r.sendEncodingParameters[0].rtx.ssrc+" "+T,b+="a=ssrc-group:FID "+r.sendEncodingParameters[0].ssrc+" "+r.sendEncodingParameters[0].rtx.ssrc+`\r `)}return b+="a=ssrc:"+r.sendEncodingParameters[0].ssrc+" cname:"+i.localCName+`\r `,r.rtpSender&&r.sendEncodingParameters[0].rtx&&(b+="a=ssrc:"+r.sendEncodingParameters[0].rtx.ssrc+" cname:"+i.localCName+`\r `),b},i.getDirection=function(r,a){for(var l=i.splitLines(r),s=0;s=26&&f<=u?!0:p.extension.isInstalled()}else return!0};var na={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return document.querySelector("#janus-extension-installed")!==null},getScreen:function(u){var n=window.setTimeout(function(){var i=new Error("NavigatorUserMediaError");return i.name='The required Chrome extension is not installed: click here to install it. (NOTE: this will need you to refresh the page)',u(i)},1e3);this.cache[n]=u,window.postMessage({type:"janusGetScreen",id:n},"*")},init:function(){var u={};this.cache=u,window.addEventListener("message",function(n){if(n.origin==window.location.origin)if(n.data.type=="janusGotScreen"&&u[n.data.id]){var i=u[n.data.id];if(delete u[n.data.id],n.data.sourceId===""){var r=new Error("NavigatorUserMediaError");r.name="You cancelled the request for permission, giving up...",i(r)}else i(null,n.data.sourceId)}else n.data.type=="janusGetScreenPending"&&(console.log("clearing ",n.data.id),window.clearTimeout(n.data.id))})}};p.useDefaultDependencies=function(f){var u=f&&f.fetch||fetch,n=f&&f.Promise||Promise,i=f&&f.WebSocket||WebSocket;return{newWebSocket:function(a,l){return new i(a,l)},extension:f&&f.extension||na,isArray:function(a){return Array.isArray(a)},webRTCAdapter:f&&f.adapter||window.adapter,httpAPICall:function(a,l){var s={method:l.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};l.verb==="POST"&&(s.headers["Content-Type"]="application/json"),l.withCredentials!==void 0&&(s.credentials=l.withCredentials===!0?"include":l.withCredentials?l.withCredentials:"omit"),l.body!==void 0&&(s.body=JSON.stringify(l.body));var b=u(a,s).catch(function(C){return n.reject({message:"Probably a network error, is the server down?",error:C})});if(l.timeout!==void 0){var T=new n(function(C,y){var h=setTimeout(function(){return clearTimeout(h),y({message:"Request timed out",timeout:l.timeout})},l.timeout)});b=n.race([b,T])}return b.then(function(C){if(C.ok){if(ue(l.success)===ue(p.noop))return C.json().then(function(y){l.success(y)}).catch(function(y){return n.reject({message:"Failed to parse response body",error:y,response:C})})}else return n.reject({message:"API call failed",response:C})}).catch(function(C){ue(l.error)===ue(p.noop)&&l.error(C.message||"<< internal error >>",C)}),b}}},p.useOldDependencies=function(f){var u=f&&f.jQuery||jQuery,n=f&&f.WebSocket||WebSocket;return{newWebSocket:function(r,a){return new n(r,a)},isArray:function(r){return u.isArray(r)},extension:f&&f.extension||na,webRTCAdapter:f&&f.adapter||adapter,httpAPICall:function(r,a){var l=a.body!==void 0?{contentType:"application/json",data:JSON.stringify(a.body)}:{},s=a.withCredentials!==void 0?{xhrFields:{withCredentials:a.withCredentials}}:{};return u.ajax(u.extend(l,s,{url:r,type:a.verb,cache:!1,dataType:"json",async:a.async,timeout:a.timeout,success:function(T){ue(a.success)===ue(p.noop)&&a.success(T)},error:function(T,C,y){ue(a.error)===ue(p.noop)&&a.error(C,y)}}))}}},p.noop=function(){},p.dataChanDefaultLabel="JanusDataChannel",p.endOfCandidates=null,p.init=function(f){if(f=f||{},f.callback=typeof f.callback=="function"?f.callback:p.noop,p.initDone===!0)f.callback();else{if((typeof console=="undefined"||typeof console.log=="undefined")&&(console={log:function(){}}),p.trace=p.noop,p.debug=p.noop,p.vdebug=p.noop,p.log=p.noop,p.warn=p.noop,p.error=p.noop,f.debug===!0||f.debug==="all")p.trace=console.trace.bind(console),p.debug=console.debug.bind(console),p.vdebug=console.debug.bind(console),p.log=console.log.bind(console),p.warn=console.warn.bind(console),p.error=console.error.bind(console);else if(Array.isArray(f.debug))for(var u in f.debug){var n=f.debug[u];switch(n){case"trace":p.trace=console.trace.bind(console);break;case"debug":p.debug=console.debug.bind(console);break;case"vdebug":p.vdebug=console.debug.bind(console);break;case"log":p.log=console.log.bind(console);break;case"warn":p.warn=console.warn.bind(console);break;case"error":p.error=console.error.bind(console);break;default:console.error("Unknown debugging option '"+n+"' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')");break}}p.log("Initializing library");var i=f.dependencies||p.useDefaultDependencies();p.isArray=i.isArray,p.webRTCAdapter=i.webRTCAdapter,p.httpAPICall=i.httpAPICall,p.newWebSocket=i.newWebSocket,p.extension=i.extension,p.extension.init(),p.listDevices=function(C,y){C=typeof C=="function"?C:p.noop,y==null&&(y={audio:!0,video:!0}),p.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(y).then(function(h){navigator.mediaDevices.enumerateDevices().then(function(D){p.debug(D),C(D);try{var _=h.getTracks();for(var E in _){var w=_[E];w!=null&&w.stop()}}catch(z){}})}).catch(function(h){p.error(h),C([])}):(p.warn("navigator.mediaDevices unavailable"),C([]))},p.attachMediaStream=function(C,y){if(p.webRTCAdapter.browserDetails.browser==="chrome"){var h=p.webRTCAdapter.browserDetails.version;h>=52?C.srcObject=y:p.error("Error attaching stream to element")}else C.srcObject=y},p.reattachMediaStream=function(C,y){if(p.webRTCAdapter.browserDetails.browser==="chrome"){var h=p.webRTCAdapter.browserDetails.version;h>=52?C.srcObject=y.srcObject:typeof C.src!="undefined"?C.src=y.src:p.error("Error reattaching stream to element")}else C.srcObject=y.srcObject};var r=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0,a=r?"pagehide":"beforeunload",l=window["on"+a];if(window.addEventListener(a,function(C){p.log("Closing window");for(var y in p.sessions)p.sessions[y]!==null&&p.sessions[y]!==void 0&&p.sessions[y].destroyOnUnload&&(p.log("Destroying session "+y),p.sessions[y].destroy({asyncRequest:!1,notifyDestroyed:!1}));l&&typeof l=="function"&&l()}),p.safariVp8=!1,p.webRTCAdapter.browserDetails.browser==="safari"&&p.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(var u in RTCRtpSender.getCapabilities("video").codecs){var s=RTCRtpSender.getCapabilities("video").codecs[u];if(s&&s.mimeType&&s.mimeType.toLowerCase()==="video/vp8"){p.safariVp8=!0;break}}p.safariVp8?p.log("This version of Safari supports VP8"):p.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{var b=new RTCPeerConnection({},{});b.createOffer({offerToReceiveVideo:!0}).then(function(C){p.safariVp8=C.sdp.indexOf("VP8")!==-1,p.safariVp8?p.log("This version of Safari supports VP8"):p.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),b.close(),b=null})}if(p.unifiedPlan=!1,p.webRTCAdapter.browserDetails.browser==="firefox"&&p.webRTCAdapter.browserDetails.version>=59)p.unifiedPlan=!0;else if(p.webRTCAdapter.browserDetails.browser==="chrome"&&p.webRTCAdapter.browserDetails.version<72)p.unifiedPlan=!1;else if(typeof RTCRtpTransceiver!="undefined"&&!("currentDirection"in RTCRtpTransceiver.prototype))p.unifiedPlan=!1;else{var T=new RTCPeerConnection;try{T.addTransceiver("audio"),p.unifiedPlan=!0}catch(C){}T.close()}p.initDone=!0,f.callback()}},p.isWebrtcSupported=function(){return window.RTCPeerConnection!==void 0&&window.RTCPeerConnection!==null},p.isGetUserMediaAvailable=function(){return navigator.mediaDevices!==void 0&&navigator.mediaDevices!==null&&navigator.mediaDevices.getUserMedia!==void 0&&navigator.mediaDevices.getUserMedia!==null},p.randomString=function(f){for(var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="",i=0;i3){d=!1,f.error("Lost connection to the server (is it down?)");return}H()}})}}function Z(P,M){if(A=0,!u&&m!==void 0&&m!==null&&M!==!0&&H(),!u&&p.isArray(P)){for(var F=0;F data channel: "+Qe),Qe==="open"){if(V.dataChannel[se].pending&&V.dataChannel[se].pending.length>0){p.log("Sending pending messages on <"+se+">:",V.dataChannel[se].pending.length);for(var mt in V.dataChannel[se].pending){var Ie=V.dataChannel[se].pending[mt];p.log("Sending string on data channel <"+se+">: "+Ie),V.dataChannel[se].send(Ie)}V.dataChannel[se].pending=[]}I.ondataopen(se)}},q=function(ee){p.error("Got error on data channel:",ee)};F?V.dataChannel[M]=F:V.dataChannel[M]=V.pc.createDataChannel(M,{ordered:!1}),V.dataChannel[M].onmessage=L,V.dataChannel[M].onopen=J,V.dataChannel[M].onclose=J,V.dataChannel[M].onerror=q,V.dataChannel[M].pending=[],j&&V.dataChannel[M].pending.push(j)}function be(P,M){M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:p.noop;var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0){p.warn("Invalid handle"),M.error("Invalid handle");return}var j=F.webrtcStuff,I=M.text;if(I==null){p.warn("Invalid text"),M.error("Invalid text");return}var V=M.label?M.label:p.dataChanDefaultLabel;if(!j.dataChannel[V]){Ce(P,V,!1,I),M.success();return}if(j.dataChannel[V].readyState!=="open"){j.dataChannel[V].pending.push(I),M.success();return}p.log("Sending string on data channel <"+V+">: "+I),j.dataChannel[V].send(I),M.success()}function Pe(P,M){M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:p.noop;var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0){p.warn("Invalid handle"),M.error("Invalid handle");return}var j=F.webrtcStuff;if(j.dtmfSender===null||j.dtmfSender===void 0){if(j.pc!==void 0&&j.pc!==null){var I=j.pc.getSenders(),V=I.find(function(ee){return ee.track&&ee.track.kind==="audio"});if(!V){p.warn("Invalid DTMF configuration (no audio track)"),M.error("Invalid DTMF configuration (no audio track)");return}j.dtmfSender=V.dtmf,j.dtmfSender&&(p.log("Created DTMF Sender"),j.dtmfSender.ontonechange=function(ee){p.debug("Sent DTMF tone: "+ee.tone)})}if(j.dtmfSender===null||j.dtmfSender===void 0){p.warn("Invalid DTMF configuration"),M.error("Invalid DTMF configuration");return}}var L=M.dtmf;if(L==null){p.warn("Invalid DTMF parameters"),M.error("Invalid DTMF parameters");return}var J=L.tones;if(J==null){p.warn("Invalid DTMF string"),M.error("Invalid DTMF string");return}var q=L.duration;q==null&&(q=500);var de=L.gap;de==null&&(de=50),p.debug("Sending DTMF string "+J+" (duration "+q+"ms, gap "+de+"ms)"),j.dtmfSender.insertDTMF(J,q,de),M.success()}function Ye(P,M){M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:p.noop;var F=!0;M.asyncRequest!==void 0&&M.asyncRequest!==null&&(F=M.asyncRequest===!0);var j=!0;M.noRequest!==void 0&&M.noRequest!==null&&(j=M.noRequest===!0),p.log("Destroying handle "+P+" (async="+F+")"),It(P);var I=g[P];if(I==null||I.detached){delete g[P],M.success();return}if(j){delete g[P],M.success();return}if(!d){p.warn("Is the server down? (connected=false)"),M.error("Is the server down? (connected=false)");return}var V={rtcgw:"detach",transaction:p.randomString(12)};if(I.token!==null&&I.token!==void 0&&(V.token=I.token),E!=null&&(V.apisecret=E),u){V.session_id=m,V.handle_id=P,n.send(JSON.stringify(V)),delete g[P],M.success();return}p.httpAPICall(s+"/"+m+"/"+P,{verb:"POST",async:F,withCredentials:h,body:V,success:function(J){p.log("Destroyed handle:"),p.debug(J),J.rtcgw!=="success"&&p.error("Ooops: "+J.error.code+" "+J.error.reason),delete g[P],M.success()},error:function(J,q){p.error(J+":",q),delete g[P],M.success()}})}function N(P,M,F,j,I){var V=g[P];if(V==null||V.webrtcStuff===null||V.webrtcStuff===void 0){p.warn("Invalid handle"),j.error("Invalid handle");return}var L=V.webrtcStuff;p.debug("streamsDone:",I),I&&(p.debug(" -- Audio tracks:",I.getAudioTracks()),p.debug(" -- Video tracks:",I.getVideoTracks()));var J=!1;if(!L.myStream||!F.update||L.streamExternal)L.myStream=I,J=!0;else{if((!F.update&&Ge(F)||F.update&&(F.addAudio||F.replaceAudio))&&I.getAudioTracks()&&I.getAudioTracks().length)if(L.myStream.addTrack(I.getAudioTracks()[0]),p.unifiedPlan){p.log((F.replaceAudio?"Replacing":"Adding")+" audio track:",I.getAudioTracks()[0]);var q=null,de=L.pc.getTransceivers();if(de&&de.length>0)for(var ee in de){var se=de[ee];if(se.sender&&se.sender.track&&se.sender.track.kind==="audio"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="audio"){q=se;break}}q&&q.sender?q.sender.replaceTrack(I.getAudioTracks()[0]):L.pc.addTrack(I.getAudioTracks()[0],I)}else p.log((F.replaceAudio?"Replacing":"Adding")+" audio track:",I.getAudioTracks()[0]),L.pc.addTrack(I.getAudioTracks()[0],I);if((!F.update&&Oe(F)||F.update&&(F.addVideo||F.replaceVideo))&&I.getVideoTracks()&&I.getVideoTracks().length)if(L.myStream.addTrack(I.getVideoTracks()[0]),p.unifiedPlan){p.log((F.replaceVideo?"Replacing":"Adding")+" video track:",I.getVideoTracks()[0]);var Qe=null,de=L.pc.getTransceivers();if(de&&de.length>0)for(var ee in de){var se=de[ee];if(se.sender&&se.sender.track&&se.sender.track.kind==="video"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="video"){Qe=se;break}}Qe&&Qe.sender?Qe.sender.replaceTrack(I.getVideoTracks()[0]):L.pc.addTrack(I.getVideoTracks()[0],I)}else p.log((F.replaceVideo?"Replacing":"Adding")+" video track:",I.getVideoTracks()[0]),L.pc.addTrack(I.getVideoTracks()[0],I)}if(!L.pc){var mt={iceServers:b,iceTransportPolicy:T,bundlePolicy:C};p.webRTCAdapter.browserDetails.browser==="chrome"&&(mt.sdpSemantics=p.webRTCAdapter.browserDetails.version<72?"plan-b":"unified-plan");var Ie={optional:[{DtlsSrtpKeyAgreement:!0}]};if(y===!0&&Ie.optional.push({googIPv6:!0}),j.rtcConstraints&&ue(j.rtcConstraints)==="object"){p.debug("Adding custom PeerConnection constraints:",j.rtcConstraints);for(var ee in j.rtcConstraints)Ie.optional.push(j.rtcConstraints[ee])}p.webRTCAdapter.browserDetails.browser==="edge"&&(mt.bundlePolicy="max-bundle"),p.log("Creating PeerConnection"),p.debug(Ie),L.pc=new RTCPeerConnection(mt,Ie),p.debug(L.pc),L.pc.getStats&&(L.volume={},L.bitrate.value="0 kbits/sec"),p.log("Preparing local SDP and gathering candidates (trickle="+L.trickle+")"),L.pc.oniceconnectionstatechange=function(Be){L.pc&&V.iceState(L.pc.iceConnectionState)},L.pc.onicecandidate=function(Be){if(Be.candidate==null||p.webRTCAdapter.browserDetails.browser==="edge"&&Be.candidate.candidate.indexOf("endOfCandidates")>0)p.log("End of candidates."),L.iceDone=!0,L.trickle===!0?ve(P,{completed:!0}):Re(P,j);else{var tt={candidate:Be.candidate.candidate,sdpMid:Be.candidate.sdpMid,sdpMLineIndex:Be.candidate.sdpMLineIndex};L.trickle===!0&&ve(P,tt)}},L.pc.ontrack=function(Be){p.log("Handling Remote Track"),p.debug(Be),Be.streams&&(L.remoteStream=Be.streams[0],V.onremotestream(L.remoteStream),!Be.track.onended&&(p.log("Adding onended callback to track:",Be.track),Be.track.onended=function(tt){p.log("Remote track muted/removed:",tt),L.remoteStream&&(L.remoteStream.removeTrack(tt.target),V.onremotestream(L.remoteStream))},Be.track.onmute=Be.track.onended,Be.track.onunmute=function(tt){p.log("Remote track flowing again:",tt);try{L.remoteStream.addTrack(tt.target),V.onremotestream(L.remoteStream)}catch(Xt){p.error(Xt)}}))}}if(J&&I!==null&&I!==void 0){p.log("Adding local stream");var ht=j.simulcast2===!0;I.getTracks().forEach(function(Be){if(p.log("Adding local track:",Be),!ht)L.pc.addTrack(Be,I);else if(Be.kind==="audio")L.pc.addTrack(Be,I);else{p.log("Enabling rid-based simulcasting:",Be);var tt=S(j.simulcastMaxBitrates);L.pc.addTransceiver(Be,{direction:"sendrecv",streams:[I],sendEncodings:[{rid:"h",active:!0,maxBitrate:tt.high},{rid:"m",active:!0,maxBitrate:tt.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:tt.low,scaleResolutionDownBy:4}]})}})}De(F)&&!L.dataChannel[p.dataChanDefaultLabel]&&(p.log("Creating data channel"),Ce(P,p.dataChanDefaultLabel,!1),L.pc.ondatachannel=function(Be){p.log("Data channel created by Janus:",Be),Ce(P,Be.channel.label,Be.channel)}),L.myStream&&V.onlocalstream(L.myStream),M==null?ce(P,F,j):L.pc.setRemoteDescription(M).then(function(){if(p.log("Remote description accepted!"),L.remoteSdp=M.sdp,L.candidates&&L.candidates.length>0){for(var Be=0;Be=26&&Si<=ji?(ht={video:{mandatory:{googLeakyBucket:!0,maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:I.screenshareFrameRate,maxFrameRate:I.screenshareFrameRate,chromeMediaSource:"screen"}},audio:Ge(I)&&!I.keepAudio},Ti(ht,Nn)):p.extension.getScreen(function(yt,pt){if(yt)return V.consentDialog(!1),F.error(yt);ht={audio:!1,video:{mandatory:{chromeMediaSource:"desktop",maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:I.screenshareFrameRate,maxFrameRate:I.screenshareFrameRate},optional:[{googLeakyBucket:!0},{googTemporalLayeredScreencast:!0}]}},ht.video.mandatory.chromeMediaSourceId=pt,Ti(ht,Nn,Ge(I)&&!I.keepAudio)})}else if(p.webRTCAdapter.browserDetails.browser==="firefox")if(p.webRTCAdapter.browserDetails.version>=33)ht={video:{mozMediaSource:I.video,mediaSource:I.video},audio:Ge(I)&&!I.keepAudio},Ti(ht,function(yt,pt){if(Nn(yt,pt),!yt)var Wt=pt.currentTime,cn=window.setInterval(function(){pt||window.clearInterval(cn),pt.currentTime==Wt&&(window.clearInterval(cn),pt.onended&&pt.onended()),Wt=pt.currentTime},500)});else{var Li=new Error("NavigatorUserMediaError");Li.name="Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)",V.consentDialog(!1),F.error(Li);return}return}}(I==null||I.video!=="screen")&&navigator.mediaDevices.enumerateDevices().then(function(yt){var pt=yt.some(function(un){return un.kind==="audioinput"}),Wt=ye(I)||yt.some(function(un){return un.kind==="videoinput"}),cn=Ge(I),Tn=Oe(I),ni=Ct(I),Oi=rt(I);if(cn||Tn||ni||Oi){var Ui=cn?pt:!1,Hi=Tn?Wt:!1;if(!Ui&&!Hi)return V.consentDialog(!1),F.error("No capture device found"),!1;if(!Ui&&ni)return V.consentDialog(!1),F.error("Audio capture is required, but no capture device found"),!1;if(!Hi&&Oi)return V.consentDialog(!1),F.error("Video capture is required, but no capture device found"),!1}var ii={audio:pt&&!I.keepAudio?Be:!1,video:Wt&&!I.keepVideo?tt:!1};p.debug("getUserMedia constraints",ii),!ii.audio&&!ii.video?(V.consentDialog(!1),N(P,j,I,F,se)):navigator.mediaDevices.getUserMedia(ii).then(function(un){V.consentDialog(!1),N(P,j,I,F,un)}).catch(function(un){V.consentDialog(!1),F.error({code:un.code,name:un.name,message:un.message})})}).catch(function(yt){V.consentDialog(!1),F.error("enumerateDevices error",yt)})}else N(P,j,I,F)}function te(P,M){M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:Yt;var F=M.jsep,j=g[P];if(j==null||j.webrtcStuff===null||j.webrtcStuff===void 0){p.warn("Invalid handle"),M.error("Invalid handle");return}var I=j.webrtcStuff;if(F!=null){if(I.pc===null){p.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),M.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");return}I.pc.setRemoteDescription(F).then(function(){if(p.log("Remote description accepted!"),I.remoteSdp=F.sdp,I.candidates&&I.candidates.length>0){for(var V=0;V0)for(var ee in de){var se=de[ee];if(se.sender&&se.sender.track&&se.sender.track.kind==="audio"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="audio"){J||(J=se);continue}if(se.sender&&se.sender.track&&se.sender.track.kind==="video"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="video"){q||(q=se);continue}}var Qe=Ge(M),mt=kt(M);!Qe&&!mt?M.removeAudio&&J&&(J.setDirection?J.setDirection("inactive"):J.direction="inactive",p.log("Setting audio transceiver to inactive:",J)):Qe&&mt?J&&(J.setDirection?J.setDirection("sendrecv"):J.direction="sendrecv",p.log("Setting audio transceiver to sendrecv:",J)):Qe&&!mt?J&&(J.setDirection?J.setDirection("sendonly"):J.direction="sendonly",p.log("Setting audio transceiver to sendonly:",J)):!Qe&&mt&&(J?(J.setDirection?J.setDirection("recvonly"):J.direction="recvonly",p.log("Setting audio transceiver to recvonly:",J)):(J=I.pc.addTransceiver("audio",{direction:"recvonly"}),p.log("Adding recvonly audio transceiver:",J)));var Ie=Oe(M),ht=Ae(M);!Ie&&!ht?M.removeVideo&&q&&(q.setDirection?q.setDirection("inactive"):q.direction="inactive",p.log("Setting video transceiver to inactive:",q)):Ie&&ht?q&&(q.setDirection?q.setDirection("sendrecv"):q.direction="sendrecv",p.log("Setting video transceiver to sendrecv:",q)):Ie&&!ht?q&&(q.setDirection?q.setDirection("sendonly"):q.direction="sendonly",p.log("Setting video transceiver to sendonly:",q)):!Ie&&ht&&(q?(q.setDirection?q.setDirection("recvonly"):q.direction="recvonly",p.log("Setting video transceiver to recvonly:",q)):(q=I.pc.addTransceiver("video",{direction:"recvonly"}),p.log("Adding recvonly video transceiver:",q)))}else L.offerToReceiveAudio=kt(M),L.offerToReceiveVideo=Ae(M);var Be=F.iceRestart===!0;Be&&(L.iceRestart=!0),p.debug(L);var tt=Oe(M);if(tt&&V&&p.webRTCAdapter.browserDetails.browser==="firefox"){p.log("Enabling Simulcasting for Firefox (RID)");var Xt=I.pc.getSenders().find(function(st){return st.track.kind=="video"});if(Xt){var Vt=Xt.getParameters();Vt||(Vt={});var Ue=S(F.simulcastMaxBitrates);Vt.encodings=[{rid:"h",active:!0,maxBitrate:Ue.high},{rid:"m",active:!0,maxBitrate:Ue.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:Ue.low,scaleResolutionDownBy:4}],Xt.setParameters(Vt)}}I.pc.createOffer(L).then(function(st){p.debug(st);var Nn={type:st.type,sdp:st.sdp};if(F.customizeSdp(Nn),st.sdp=Nn.sdp,p.log("Setting local description"),tt&&V&&(p.webRTCAdapter.browserDetails.browser==="chrome"||p.webRTCAdapter.browserDetails.browser==="safari"?(p.log("Enabling Simulcasting for Chrome (SDP munging)"),st.sdp=Ht(st.sdp)):p.webRTCAdapter.browserDetails.browser!=="firefox"&&p.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),I.mySdp=st.sdp,I.pc.setLocalDescription(st).catch(F.error),I.mediaConstraints=L,!I.iceDone&&!I.trickle){p.log("Waiting for all candidates...");return}p.log("Offer ready"),p.debug(F),F.success(st)},F.error)}function he(P,M,F){F=F||{},F.success=typeof F.success=="function"?F.success:p.noop,F.error=typeof F.error=="function"?F.error:p.noop,F.customizeSdp=typeof F.customizeSdp=="function"?F.customizeSdp:p.noop;var j=g[P];if(j==null||j.webrtcStuff===null||j.webrtcStuff===void 0){p.warn("Invalid handle"),F.error("Invalid handle");return}var I=j.webrtcStuff,V=F.simulcast===!0;V?p.log("Creating answer (iceDone="+I.iceDone+", simulcast="+V+")"):p.log("Creating answer (iceDone="+I.iceDone+")");var L=null;if(p.unifiedPlan){L={};var J=null,q=null,de=I.pc.getTransceivers();if(de&&de.length>0)for(var ee in de){var se=de[ee];if(se.sender&&se.sender.track&&se.sender.track.kind==="audio"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="audio"){J||(J=se);continue}if(se.sender&&se.sender.track&&se.sender.track.kind==="video"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="video"){q||(q=se);continue}}var Qe=Ge(M),mt=kt(M);if(!Qe&&!mt){if(M.removeAudio&&J)try{J.setDirection?J.setDirection("inactive"):J.direction="inactive",p.log("Setting audio transceiver to inactive:",J)}catch(Ue){p.error(Ue)}}else if(Qe&&mt){if(J)try{J.setDirection?J.setDirection("sendrecv"):J.direction="sendrecv",p.log("Setting audio transceiver to sendrecv:",J)}catch(Ue){p.error(Ue)}}else if(Qe&&!mt)try{J&&(J.setDirection?J.setDirection("sendonly"):J.direction="sendonly",p.log("Setting audio transceiver to sendonly:",J))}catch(Ue){p.error(Ue)}else if(!Qe&&mt)if(J)try{J.setDirection?J.setDirection("recvonly"):J.direction="recvonly",p.log("Setting audio transceiver to recvonly:",J)}catch(Ue){p.error(Ue)}else J=I.pc.addTransceiver("audio",{direction:"recvonly"}),p.log("Adding recvonly audio transceiver:",J);var Ie=Oe(M),ht=Ae(M);if(!Ie&&!ht){if(M.removeVideo&&q)try{q.setDirection?q.setDirection("inactive"):q.direction="inactive",p.log("Setting video transceiver to inactive:",q)}catch(Ue){p.error(Ue)}}else if(Ie&&ht){if(q)try{q.setDirection?q.setDirection("sendrecv"):q.direction="sendrecv",p.log("Setting video transceiver to sendrecv:",q)}catch(Ue){p.error(Ue)}}else if(Ie&&!ht){if(q)try{q.setDirection?q.setDirection("sendonly"):q.direction="sendonly",p.log("Setting video transceiver to sendonly:",q)}catch(Ue){p.error(Ue)}}else if(!Ie&&ht)if(q)try{q.setDirection?q.setDirection("recvonly"):q.direction="recvonly",p.log("Setting video transceiver to recvonly:",q)}catch(Ue){p.error(Ue)}else q=I.pc.addTransceiver("video",{direction:"recvonly"}),p.log("Adding recvonly video transceiver:",q)}else p.webRTCAdapter.browserDetails.browser=="firefox"||p.webRTCAdapter.browserDetails.browser=="edge"?L={offerToReceiveAudio:kt(M),offerToReceiveVideo:Ae(M)}:L={mandatory:{OfferToReceiveAudio:kt(M),OfferToReceiveVideo:Ae(M)}};p.debug(L);var Be=Oe(M);if(Be&&V&&p.webRTCAdapter.browserDetails.browser==="firefox"){p.log("Enabling Simulcasting for Firefox (RID)");var tt=I.pc.getSenders()[1];p.log(tt);var Xt=tt.getParameters();p.log(Xt);var Vt=S(F.simulcastMaxBitrates);tt.setParameters({encodings:[{rid:"high",active:!0,priority:"high",maxBitrate:Vt.high},{rid:"medium",active:!0,priority:"medium",maxBitrate:Vt.medium},{rid:"low",active:!0,priority:"low",maxBitrate:Vt.low}]})}I.pc.createAnswer(L).then(function(Ue){p.debug(Ue);var st={type:Ue.type,sdp:Ue.sdp};if(F.customizeSdp(st),Ue.sdp=st.sdp,p.log("Setting local description"),Be&&V&&(p.webRTCAdapter.browserDetails.browser==="chrome"?p.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it"):p.webRTCAdapter.browserDetails.browser!=="firefox"&&p.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),I.mySdp=Ue.sdp,I.pc.setLocalDescription(Ue).catch(F.error),I.mediaConstraints=L,!I.iceDone&&!I.trickle){p.log("Waiting for all candidates...");return}F.success(Ue)},F.error)}function Re(P,M){M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:p.noop;var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0){p.warn("Invalid handle, not sending anything");return}var j=F.webrtcStuff;if(p.log("Sending offer/answer SDP..."),j.mySdp===null||j.mySdp===void 0){p.warn("Local SDP instance is invalid, not sending anything...");return}j.mySdp={type:j.pc.localDescription.type,sdp:j.pc.localDescription.sdp},j.trickle===!1&&(j.mySdp.trickle=!1),p.debug(M),j.sdpSent=!0,M.success(j.mySdp)}function we(P,M){var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0)return p.warn("Invalid handle"),0;var j=M?"remote":"local",I=F.webrtcStuff;return I.volume[j]||(I.volume[j]={value:0}),I.pc.getStats&&p.webRTCAdapter.browserDetails.browser==="chrome"?M&&(I.remoteStream===null||I.remoteStream===void 0)?(p.warn("Remote stream unavailable"),0):!M&&(I.myStream===null||I.myStream===void 0)?(p.warn("Local stream unavailable"),0):I.volume[j].timer===null||I.volume[j].timer===void 0?(p.log("Starting "+j+" volume monitor"),I.volume[j].timer=setInterval(function(){I.pc.getStats(function(V){for(var L=V.result(),J=0;J-1)&&I.type==="inbound-rtp"&&I.id.indexOf("rtcp")<0||I.type=="ssrc"&&I.bytesReceived&&(I.googCodecName==="VP8"||I.googCodecName===""))&&(V=!0),V)if(F.bitrate.bsnow=I.bytesReceived,F.bitrate.tsnow=I.timestamp,F.bitrate.bsbefore===null||F.bitrate.tsbefore===null)F.bitrate.bsbefore=F.bitrate.bsnow,F.bitrate.tsbefore=F.bitrate.tsnow;else{var L=F.bitrate.tsnow-F.bitrate.tsbefore;p.webRTCAdapter.browserDetails.browser=="safari"&&(L=L/1e3);var J=Math.round((F.bitrate.bsnow-F.bitrate.bsbefore)*8/L);p.webRTCAdapter.browserDetails.browser==="safari"&&(J=parseInt(J/1e3)),F.bitrate.value=J+" kbits/sec",F.bitrate.bsbefore=F.bitrate.bsnow,F.bitrate.tsbefore=F.bitrate.tsnow}}})})},1e3),"0 kbits/sec"):F.bitrate.value:(p.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser")}function Yt(P){p.error("WebRTC error:",P)}function It(P,M){p.log("Cleaning WebRTC stuff");var F=g[P];if(F!=null){var j=F.webrtcStuff;if(j!=null){if(M===!0){var I={rtcgw:"hangup",transaction:p.randomString(12)};F.token!==null&&F.token!==void 0&&(I.token=F.token),E!=null&&(I.apisecret=E),p.debug("Sending hangup request (handle="+P+"):"),p.debug(I),u?(I.session_id=m,I.handle_id=P,n.send(JSON.stringify(I))):p.httpAPICall(s+"/"+m+"/"+P,{verb:"POST",withCredentials:h,body:I})}j.remoteStream=null,j.volume&&(j.volume.local&&j.volume.local.timer&&clearInterval(j.volume.local.timer),j.volume.remote&&j.volume.remote.timer&&clearInterval(j.volume.remote.timer)),j.volume={},j.bitrate.timer&&clearInterval(j.bitrate.timer),j.bitrate.timer=null,j.bitrate.bsnow=null,j.bitrate.bsbefore=null,j.bitrate.tsnow=null,j.bitrate.tsbefore=null,j.bitrate.value=null;try{if(!j.streamExternal&&j.myStream!==null&&j.myStream!==void 0){p.log("Stopping local stream tracks");var V=j.myStream.getTracks();for(var L in V){var J=V[L];p.log(J),J!=null&&J.stop()}}}catch(q){}j.streamExternal=!1,j.myStream=null;try{j.pc.close()}catch(q){}j.pc=null,j.candidates=null,j.mySdp=null,j.remoteSdp=null,j.iceDone=!1,j.dataChannel={},j.dtmfSender=null}F.oncleanup()}}function Ht(P){for(var M=P.split(`\r `),F=!1,j=[-1],I=[-1],V=null,L=null,J=null,q=null,de=-1,ee=0;ee-1){de=ee;break}continue}if(F){var mt=M[ee].match(/a=ssrc-group:FID (\d+) (\d+)/);if(mt){j[0]=mt[1],I[0]=mt[2],M.splice(ee,1),ee--;continue}if(j[0]){var Ie=M[ee].match("a=ssrc:"+j[0]+" cname:(.+)");if(Ie&&(V=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" msid:(.+)"),Ie&&(L=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" mslabel:(.+)"),Ie&&(J=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" label:(.+)"),Ie&&(q=Ie[1]),M[ee].indexOf("a=ssrc:"+I[0])===0){M.splice(ee,1),ee--;continue}if(M[ee].indexOf("a=ssrc:"+j[0])===0){M.splice(ee,1),ee--;continue}}if(M[ee].length==0){M.splice(ee,1),ee--;continue}}}if(j[0]<0){de=-1,F=!1;for(var ee=0;ee-1){de=ee;break}continue}if(F){if(j[0]<0){var ht=M[ee].match(/a=ssrc:(\d+)/);if(ht){j[0]=ht[1],M.splice(ee,1),ee--;continue}}else{var Ie=M[ee].match("a=ssrc:"+j[0]+" cname:(.+)");if(Ie&&(V=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" msid:(.+)"),Ie&&(L=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" mslabel:(.+)"),Ie&&(J=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" label:(.+)"),Ie&&(q=Ie[1]),M[ee].indexOf("a=ssrc:"+I[0])===0){M.splice(ee,1),ee--;continue}if(M[ee].indexOf("a=ssrc:"+j[0])===0){M.splice(ee,1),ee--;continue}}if(M[ee].length==0){M.splice(ee,1),ee--;continue}}}}if(j[0]<0)return p.warn("Couldn't find the video SSRC, simulcasting NOT enabled"),P;de<0&&(de=M.length),j[1]=Math.floor(Math.random()*4294967295),j[2]=Math.floor(Math.random()*4294967295),I[1]=Math.floor(Math.random()*4294967295),I[2]=Math.floor(Math.random()*4294967295);for(var ee=0;ee
`,document.getElementById("mobile-ez-ptz-item")||r.appendChild(s),Wn(r,document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),document.getElementById("mobile-ez-ptz-item").ontouchstart=function(b){b.preventDefault(),console.log("触摸开始"),n._handlePtzTouch(b,"start")},document.getElementById("mobile-ez-ptz-item").ontouchend=function(b){b.preventDefault(),console.log("触摸结束",b),n._handlePtzTouch(b,"stop")},document.getElementById("mobile-ez-ptz-item").onmousedown=function(b){b.preventDefault(),console.log("触摸开始"),n._handlePtzTouch(b,"start")},document.getElementById("mobile-ez-ptz-item").onmouseup=function(b){b.preventDefault(),console.log("触摸结束",b),n._handlePtzTouch(b,"stop")}}return dt(f,[{key:"show",value:function(){document.getElementById("mobile-ez-ptz-item").style="display: inline-block"}},{key:"hide",value:function(){document.getElementById("mobile-ez-ptz-item").style="display: none"}},{key:"_handlePtzTouch",value:function(n,i){var r=document.getElementById("mobile-ez-ptz-item").getBoundingClientRect(),a=r.left+130,l=r.top+130,s=n.x||n.changedTouches[0].clientX,b=n.y||n.changedTouches[0].clientY,T=s-a,C=b-l,y=0,h=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start";Math.abs(T)>Math.abs(C)?T>0?(y=3,document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("default","active")):(y=2,document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("default","active")):C>0?(y=1,document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("default","active")):(y=0,document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("default","active")),document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(y===0?180:y===1?0:y===2?90:270,"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)"),i==="stop"&&(h=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",document.getElementById("mobile-ez-ptz-item").style="",document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("active","default"));var D=new FormData;D.append("deviceSerial",Ke(this.jSPlugin.url).deviceSerial),D.append("channelNo",Ke(this.jSPlugin.url).channelNo),D.append("speed",1),D.append("direction",y),D.append("accessToken",this.jSPlugin.accessToken),fetch(h,{method:"POST",body:D}).then(function(_){return _.json()}).then(function(_){_.code==200||(_.code==60005||_.code==60002||_.code==60003||_.code==60004)&&(document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(y===0?180:y===1?0:y===2?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"))}).catch(function(_){console.log("云台调用异常",_)})}}]),f}(),ys=0,Ts="成功",Ss={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]},footer:{color:"#FFFFFF",backgroundColor:"rgb(0 0 0 / 0%)",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-0",iconId:"play",part:"left",defaultActive:1,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-1",iconId:"capturePicture",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-2",iconId:"sound",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-3",iconId:"pantile",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-4",iconId:"recordvideo",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-5",iconId:"talk",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-6",iconId:"hd",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-7",iconId:"webExpend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-8",iconId:"expend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]}},Cs={retcode:ys,msg:Ts,data:Ss},bs={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},ra={data:bs},Ps={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},oa={data:Ps},ws={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},aa={data:ws},Es={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},da={data:Es},Is={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:0},{iconId:"deviceName",part:"left",defaultActive:0,isrender:0},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:0},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:0},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:0}]}},la={data:Is},xs={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},sa={data:xs},_s={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},ca={data:_s},ua=[{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcLive",themeIntro:"PC直播全量版",themeName:"PC直播全量版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:aa.data.header,footer:aa.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"security",themeIntro:"PC直播安防版",themeName:"PC直播安防版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:da.data.header,footer:da.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"voice",themeIntro:"PC直播语音版",themeName:"PC直播语音版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:sa.data.header,footer:sa.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"simple",themeIntro:"PC直播极简版",themeName:"PC直播极简版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"",header:la.data.header,footer:la.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcRec",themeIntro:"PC回放全量版",themeName:"PC回放全量版",themeType:"webRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:ca.data.header,footer:ca.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileLive",themeIntro:"Mobile直播全量版",themeName:"Mobile直播全量版",themeType:"mobileLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:ra.data.header,footer:ra.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileRec",themeIntro:"Mobile回放全量版",themeName:"Mobile回放全量版",themeType:"mobileRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:oa.data.header,footer:oa.data.footer}],Rs=function(){function f(u){var n=this;fe(this,f),this.jSPlugin=u,this.enableZoom=!1,this.isMouseDown=!1,this.videoWidth=1920,this.videoHeight=1080,this.currentScale=1,this.currentPosition={x:0,y:0,xPercent:.1,yPercent:.1,xCurrentVideo:0,yCurrentVideo:0,left:0,top:0,right:1920,bottom:1080},this.DOM=document.getElementById(u.id),this.clientRect=document.getElementById(u.id).getBoundingClientRect();var i=document.createElement("div");i.id="".concat(u.id,"-zoom-container"),i.style=`position: absolute; display:none; left: 12px; bottom: 80px;`;var r=`
2.0X
放大
缩小
`);i.innerHTML=r,document.getElementById("".concat(u.id,"-audioControls-left")).parentNode.appendChild(i),document.getElementById("".concat(u.id,"-addScale")).onclick=function(){n.addScale()},document.getElementById("".concat(u.id,"-subScale")).onclick=function(){n.subScale()}}return dt(f,[{key:"onMouseDown",value:function(n){this.currentPosition,this.currentScale;var i=this.enableZoom;if(!i)return!1;this.moveX=n.clientX,this.moveY=n.clientY,this.isMouseDown=!0}},{key:"onMouseUp",value:function(n){var i=this.currentPosition,r=this.enableZoom;if(!r)return!1;this.isMouseDown=!1,i.left=i.left-(n.clientX-this.moveX),i.top=i.top-(n.clientY-this.moveY),this.doScale()}},{key:"onMouseOut",value:function(n){var i=this.enableZoom;if(!i)return!1;this.isMouseDown&&(console.log("鼠标按上",n),this.isMouseDown=!1),this.isMouseDown=!1}},{key:"renderDot",value:function(){var n=this.currentScale;document.getElementById("".concat(this.jSPlugin.id,"-scale-value")).innerHTML="".concat(n,".0X"),document.getElementById("".concat(this.jSPlugin.id,"-line-dot")).style.height="".concat((n-1)/7*100,"%"),document.getElementById("".concat(this.jSPlugin.id,"-scale-body-line-dot")).style.bottom="calc(".concat((n-1)/7*100,"% - 6px)")}},{key:"startZoom",value:function(){var n=this,i=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=i.width,this.videoHeight=i.height,this.currentPosition.right=i.width,this.currentPosition.bottom=i.height,this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block",this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),this.renderDot(),this.enableZoom=!0,document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0"))?(document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mousedown",function(r){return n.onMouseDown(r)}),document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mouseup",function(r){return n.onMouseUp(r)}),document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mouseout",function(r){return n.onMouseOut(r)})):document.getElementById("".concat(this.jSPlugin.id,"-player"))&&(document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mousedown",function(r){return n.onMouseDown(r)}),document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mouseup",function(r){return n.onMouseUp(r)}),document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mouseout",function(r){return n.onMouseOut(r)}))}},{key:"stopZoom",value:function(){var n=this;this.currentScale=1,this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none",this.renderDot(),this.enableZoom=!1,document.getElementById(this.jSPlugin.id).removeEventListener("mousedown",function(i){return n.onMouseDown(i)}),document.getElementById(this.jSPlugin.id).removeEventListener("mouseup",function(i){return n.onMouseUp(i)}),document.getElementById(this.jSPlugin.id).removeEventListener("mouseout",function(i){return n.onMouseOut(i)})}},{key:"doScale",value:function(){console.log("执行放大");var n=this.currentPosition,i=this.currentScale;n.left=n.left+n.xPercent*(n.right-n.left)-1/2*(this.videoWidth/i),n.left<0?n.left=0:n.left>this.videoWidth-this.videoWidth/i&&(n.left=this.videoWidth-this.videoWidth/i),n.right=n.left+this.videoWidth/i,n.top=n.top+n.yPercent*(n.bottom-n.top)-1/2*(this.videoHeight/i),n.top<0?n.top=0:n.top>this.videoHeight-this.videoHeight/i&&(n.top=this.videoHeight-this.videoHeight/i),n.bottom=n.top+this.videoHeight/i,n.left=parseInt(n.left,10),n.right=parseInt(n.right,10),n.top=parseInt(n.top,10),n.bottom=parseInt(n.bottom,10),console.log("计算后,",this.jSPlugin.jSPlugin,n.left,n.right,n.top,n.bottom,n.xPercent,n.yPercent),this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(n.left,n.right,n.top,n.bottom),this.renderDot()}},{key:"calCurrentPosition",value:function(n){var i=this.currentPosition,r=this.clientRect;i.x=n.clientX,i.y=n.clientY,i.xPercent=(n.clientX-r.x)/r.width,i.yPercent=(n.clientY-r.y)/r.height,this.doScale()}},{key:"addScale",value:function(){var n=this.currentScale,i=this.currentPosition;if(n>=8)return console.log("达到最大倍率了"),this.jSPlugin.Message&&this.jSPlugin.Message.default("已经放大到最大倍数8.0X"),!1;this.currentScale++,i.xPercent=.5,i.yPercent=.5,this.doScale()}},{key:"subScale",value:function(){var n=this.currentScale,i=this.currentPosition;if(n<=1)return console.log("达到最小倍率了"),!1;this.currentScale--,i.xPercent=.5,i.yPercent=.5,this.doScale()}}]),f}();function ma(f,u){return Math.abs(u.clientX-f.clientX)*Math.abs(u.clientX-f.clientX)+Math.abs(u.clientY-f.clientY)*Math.abs(u.clientY-f.clientY)}var ks=function(){function f(u){var n=this;fe(this,f),this.jSPlugin=u,this.enableZoom=!1,this.isDubboTouch=!1,this.videoWidth=0,this.videoHeight=0,this.currentScale=1,this.currentPosition={x:0,y:0,xPercent:.1,yPercent:.1,xCurrentVideo:0,yCurrentVideo:0,left:0,top:0,right:1920,bottom:1080},this.DOM=document.getElementById(u.id),this.clientRect=document.getElementById(u.id).getBoundingClientRect(),this.point1={clientX:0,clientY:0},this.point2={clientX:0,clientY:0},this.touchLineLength=0,this.inited=!1;var i=document.createElement("div");i.id="".concat(u.id,"-zoom-container"),i.style=`display:none; position: absolute; left: 10px; top: -30px; border: 1px solid rgba(0,0,0,0.6); color: #FFFFFF; background: rgba(0,0,0,0.6); border-radius: 10px; width: 36px; font-size: 12px; text-align: center; height: 22px; line-height: 22px;`;var r="1X";i.innerHTML=r,document.getElementById("".concat(u.id,"-audioControls-left")).parentNode.appendChild(i),document.getElementById(this.jSPlugin.id).addEventListener("touchstart",function(a){return n.onTouchstart(a)}),document.getElementById(this.jSPlugin.id).addEventListener("touchmove",function(a){return n.onTouchmove(a)})}return dt(f,[{key:"onTouchstart",value:function(n){var i=this.jSPlugin.beforeMobileZoomVerify();if(!i)return!1;if(!this.inited){var r=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=r.width,this.videoHeight=r.height,this.currentPosition.right=r.width,this.currentPosition.bottom=r.height,this.inited=!0}var a=this.currentPosition;this.currentScale,console.log("双指按下",a);var l=n.touches,s=l[0],b=l[1];s&&(this.point1.clientX=s.clientX,this.point1.clientY=s.clientY),b&&(this.point2.clientX=b.clientX,this.point2.clientY=b.clientY,this.touchLineLength=ma(this.point1,this.point2),this.isDubboTouch=!0,this.moveX=s.clientX,this.moveY=s.clientY),console.log("双指按下2",a)}},{key:"onTouchmove",value:function(n){var i=this.isDubboTouch,r=this.currentPosition,a=this.clientRect,l=this.jSPlugin.beforeMobileZoomVerify();if(!l)return!1;if(n.touches.length===1){var b=n.touches[0];return r.xPercent=r.xPercent+(this.point1.clientX-b.clientX)/a.width/this.currentScale,r.yPercent=r.yPercent+(this.point1.clientY-b.clientY)/a.height/this.currentScale,this.doScale(),this.point1.clientX=b.clientX,this.point1.clientY=b.clientY,!1}if(!i)return!1;var s=n.touches,b=s[0],T=s[1];if(b&&(this.point1.clientX=b.clientX,this.point1.clientY=b.clientY),T){this.point2.clientX=T.clientX,this.point2.clientY=T.clientY;var C=ma(this.point1,this.point2);C!==this.touchLineLength&&(C>this.touchLineLength?this.currentScale<8?(++this.currentScale,r.xPercent=(this.point1.clientX+this.point2.clientX)/2/a.width,r.yPercent=(this.point1.clientY+this.point2.clientY)/2/a.height,this.doScale()):console.log("已经是最大8倍率了"):this.currentScale>1?(--this.currentScale,r.xPercent=(this.point1.clientX+this.point2.clientX)/2/a.width,r.yPercent=(this.point1.clientY+this.point2.clientY)/2/a.height,this.doScale()):console.log("已经是最小1倍率了"),this.isDubboTouch=!1)}}},{key:"startZoom",value:function(){var n=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=n.width,this.videoHeight=n.height,this.currentPosition.right=n.width,this.currentPosition.bottom=n.height,this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block",this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),this.renderDot()}},{key:"stopZoom",value:function(){this.currentScale=1,this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none",this.renderDot()}},{key:"resetZoom",value:function(){this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none"}},{key:"doScale",value:function(){var n=this.currentPosition,i=this.currentScale;n.left=n.left+n.xPercent*(n.right-n.left)-1/2*(this.videoWidth/i),n.left<0?n.left=0:n.left>this.videoWidth-this.videoWidth/i&&(n.left=this.videoWidth-this.videoWidth/i),n.right=n.left+this.videoWidth/i,n.top=n.top+n.yPercent*(n.bottom-n.top)-1/2*(this.videoHeight/i),n.top<0?n.top=0:n.top>this.videoHeight-this.videoHeight/i&&(n.top=this.videoHeight-this.videoHeight/i),n.bottom=n.top+this.videoHeight/i,n.left=parseInt(n.left,10),n.right=parseInt(n.right,10),n.top=parseInt(n.top,10),n.bottom=parseInt(n.bottom,10),console.log("视频宽高",this.videoWidth,this.videoHeight),console.log("计算后,",n.left,n.right,n.top,n.bottom,n.xPercent,n.yPercent),n.left0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",function(){n.stopAutoFocus()})),this.setDecoderState({cloudRec:Ke(this.jSPlugin.url).type==="cloud.rec",rec:Ke(this.jSPlugin.url).type==="rec",type:Ke(this.jSPlugin.url).type});else if(!this.themeInited)var l=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(l),n.jSPlugin.play(),n.themeInited=!0)},50);var s=Ut.findIndex(this.themeData.footer.btnList,function(T){return T.iconId==="zoom"&&T.isrender>0})>=0;s&&(this.isMobile?(this.jSPlugin.beforeMobileZoomVerify=function(){var T=n.decoderState.state.play;return console.log("手机端电子放大前校验回调play------------",T),!!T},this.jSPlugin.Zoom=new ks(this.jSPlugin)):this.jSPlugin.Zoom=new Rs(this.jSPlugin));var b=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(b),n.jSPlugin.reSize(n.jSPlugin.params.width,n.jSPlugin.params.height))},50)}},{key:"setDecoderState",value:function(n){var i=this,r=this.themeData,a=r.header,l=r.footer;Object.keys(n).map(function(s,b){var T="#FFFFFF",C="#FFFFFF",y=a.btnList.findIndex(function(h){return h.iconId===s});switch(y===-1?(T=l.color.replace("-diy",""),C=l.activeColor.replace("-diy","")):(T=a.color.replace("-diy",""),C=l.activeColor.replace("-diy","")),s){case"play":n[s]?document.getElementById("".concat(i.jSPlugin.id,"-play"))&&(document.getElementById("".concat(i.jSPlugin.id,"-play-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-play-content")).children[0].children[1].style="display:none",document.getElementById("".concat(i.jSPlugin.id,"-play")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-play-content")).childNodes[0].children[0].style.fill=n[s]?C:T):document.getElementById("".concat(i.jSPlugin.id,"-play"))&&(document.getElementById("".concat(i.jSPlugin.id,"-play-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-play-content")).children[0].children[0].style="display:none",document.getElementById("".concat(i.jSPlugin.id,"-play")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-play-content")).childNodes[0].children[1].style.fill=n[s]?C:T);break;case"sound":document.getElementById("".concat(i.jSPlugin.id,"-sound"))&&(n[s]?(document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:none",document.getElementById("".concat(i.jSPlugin.id,"-sound")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).childNodes[0].children[1].style.fill=n[s]?C:T):(document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:none",document.getElementById("".concat(i.jSPlugin.id,"-sound")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).childNodes[0].children[0].style.fill=n[s]?C:T));break;case"recordvideo":document.getElementById("".concat(i.jSPlugin.id,"-recordvideo"))&&(document.getElementById("".concat(i.jSPlugin.id,"-recordvideo")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-recordvideo-content")).childNodes[0].style.fill=n[s]?C:T,n[s]?i.countTime("add",0):i.countTime("destroy",0));break;case"talk":document.getElementById("".concat(i.jSPlugin.id,"-talk"))&&(document.getElementById("".concat(i.jSPlugin.id,"-talk")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-talk-content")).childNodes[1].style.fill=n[s]?C:T);break;case"zoom":document.getElementById("".concat(i.jSPlugin.id,"-zoom"))&&(document.getElementById("".concat(i.jSPlugin.id,"-zoom")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-zoom-content")).childNodes[1].style.fill=n[s]?C:T);break;case"pantile":document.getElementById("".concat(i.jSPlugin.id,"-pantile"))&&(document.getElementById("".concat(i.jSPlugin.id,"-pantile")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-pantile-content")).childNodes[0].style.fill=n[s]?C:T);break;case"webExpend":n[s]?(document.getElementById("".concat(i.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(i.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-expend")).className="disabled")):(document.getElementById("".concat(i.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(i.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-expend")).className="")),document.getElementById("".concat(i.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-webExpend")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[0].style.fill=n[s]?C:T,document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[1].style.fill=n[s]?C:T);break;case"capturePicture":document.getElementById("".concat(i.jSPlugin.id,"-capturePicture"))&&(document.getElementById("".concat(i.jSPlugin.id,"-capturePicture")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-capturePicture-content")).childNodes[0].style.fill=n[s]?C:T);break;case"expend":n[s]?(document.getElementById("".concat(i.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(i.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-webExpend")).className="disabled")):(document.getElementById("".concat(i.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(i.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-webExpend")).className="")),document.getElementById("".concat(i.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-expend")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[0].style.fill=n[s]?C:T,document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[1].style.fill=n[s]?C:T);break;case"hd":n[s]?document.getElementById("".concat(i.jSPlugin.id,"-hd"))&&(document.getElementById("".concat(i.jSPlugin.id,"-hd-content")).children[1].children[0].style="display:block",document.getElementById("".concat(i.jSPlugin.id,"-hd-content")).children[1].children[1].style="display:none"):document.getElementById("".concat(i.jSPlugin.id,"-hd"))&&(document.getElementById("".concat(i.jSPlugin.id,"-hd-content")).children[1].children[1].style="display:block",document.getElementById("".concat(i.jSPlugin.id,"-hd-content")).children[1].children[0].style="display:none");break;case"speed":document.getElementById("".concat(i.jSPlugin.id,"-speed"))&&(document.getElementById("".concat(i.jSPlugin.id,"-speed-content")).children[1].children[0].style.color=n[s]?C:T,document.getElementById("".concat(i.jSPlugin.id,"-speed-content")).children[1].children[0].style.borderColor=n[s]?C:T),document.getElementById("".concat(i.jSPlugin.id,"-select-mask"))&&(i.isMobile&&n[s]?document.getElementById("".concat(i.jSPlugin.id,"-select-mask")).style.display="block":document.getElementById("".concat(i.jSPlugin.id,"-select-mask")).style.display="none");break;case"cloudRec":document.getElementById("".concat(i.jSPlugin.id,"-cloudRec"))&&(console.log("document.getElementById(`${this.jSPlugin.id}-cloudRec-content`)",document.getElementById("".concat(i.jSPlugin.id,"-cloudRec"))),document.getElementById("".concat(i.jSPlugin.id,"-cloudRec")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=n[s]?C:T),document.getElementById("".concat(i.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(i.jSPlugin.id,"-rec")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=n[s]?T:C);break;case"rec":document.getElementById("".concat(i.jSPlugin.id,"-cloudRec"))&&(document.getElementById("".concat(i.jSPlugin.id,"-cloudRec")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=n[s]?T:C),document.getElementById("".concat(i.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(i.jSPlugin.id,"-rec")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=n[s]?C:T);break}i.decoderState.state=Object.assign(i.decoderState.state,n)})}},{key:"startAutoFocus",value:function(){var n=this,i=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout(function(){document.getElementById("".concat(n.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(n.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(n.jSPlugin.id,"-audioControls")).style.pointerEvents="none")},i*1e3)}},{key:"stopAutoFocus",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.opacity=1,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.pointerEvents="all"),this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.startAutoFocus()}},{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"renderFooter",value:function(n,i){var r=this,a=this.matchBtn(n);if(this.isMobile&&a.id==="zoom")return!1;var l=document.createElement("div");l.className="theme-icon-item",l.innerHTML="".concat('')+'
')).concat(a.domString,"
")+"
",l.onclick=function(C){if(r.decoderState.state.isEditing)return!1;a.onclick(C)},a.onmouseenter&&(l.onmouseenter=function(C){if(r.decoderState.state.isEditing)return!1;a.onmouseenter(C)}),a.onmouseleave&&(l.onmouseleave=function(C){if(r.decoderState.state.isEditing)return!1;a.onmouseleave(C)});var s=document.createElement("span");s.className="icon-move left",s.innerHTML=''),s.onclick=function(){r.editIcon(a.id,"left","footer")},l.appendChild(s);var b=document.createElement("span");b.className="icon-move right",b.innerHTML=''),b.onclick=function(){r.editIcon(a.id,"right","footer")},l.appendChild(b);var T=document.createElement("span");T.className="icon-move close",T.innerHTML='')+'',T.onclick=function(){r.editIcon(a.id,"delete","footer")},l.appendChild(T),i==="left"?document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[0].appendChild(l):document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[1].appendChild(l)}},{key:"editIcon",value:function(n,i,r){console.log("编辑组件",n,i,r);var a=this.themeData;console.log("themeData",this.themeData);var l=this.themeData[r].btnList,s=Ut.findIndex(l,function(D){return D.iconId===n}),b=l[s];switch(i){case"delete":if(n==="rec"){if(Ut.findIndex(l,function(D){return D.iconId==="cloudRec"&&D.isrender==1})===-1)return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1}else if(n==="cloudRec"&&Ut.findIndex(l,function(D){return D.iconId==="rec"&&D.isrender==1})===-1)return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1;l[s].isrender=0;break;case"right":for(var T=-1,C=s+1;C=0;h--)if(l[h].part===l[s].part&&l[h].isrender==1){y=h;break}y!==-1&&(l[s]=l[y],l[y]=b);break}console.log("new btnList",l),a[r].btnList=l,this.changeTheme(a)}},{key:"renderHeader",value:function(n,i){var r=this,a=this.matchBtn(n),l=document.createElement("div");l.className="theme-icon-item",l.style="max-width:50%;",l.innerHTML="".concat('')+'')).concat(a.domString,"")+'',l.onclick=function(b){if(r.decoderState.state.isEditing)return!1;a.onclick(b)};var s=document.createElement("span");s.className="icon-move close",s.innerHTML='')+'',s.onclick=function(){r.editIcon(a.id,"delete","header")},l.appendChild(s),i==="left"?document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(l):document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[1].appendChild(l)}},{key:"countTime",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var a=document.createElement("div");a.id=this.jSPlugin.id+"time-area",a.className="time-area",a.innerHTML='00:00',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(a)}if(this.countTimer&&clearInterval(this.countTimer),n==="add"){var l=i;document.getElementById(r.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval(function(){++l,document.getElementById(r.jSPlugin.id+"time-area").children[1].innerHTML=s(l)},1e3)}else n==="destroy"&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(r.jSPlugin.id+"time-area")&&(document.getElementById(r.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(r.jSPlugin.id+"time-area").style.display="none"));function s(b){var T=parseInt(b),C=0,y=0,h="00",D="00",_="00";return T>59&&(C=parseInt(T/60),T=parseInt(T%60),C>59&&(y=parseInt(C/60),C=parseInt(C%60))),h=parseInt(T)>9?parseInt(T):"0"+parseInt(T),D=parseInt(C)>9?parseInt(C):"0"+parseInt(C),_=parseInt(y)>9?parseInt(y):"0"+parseInt(y),y>0?_+":"+D+":"+h:C>0?D+":"+h:"00:"+h}}},{key:"setDisabled",value:function(n){var i=this.decoderState.state,r=i.sound,a=i.hd;document.getElementById(r?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon"))!=null&&document.getElementById(r?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-talk-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-talk-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById(a?"".concat(this.jSPlugin.id,"-hdSelect-icon"):"".concat(this.jSPlugin.id,"-sdSelect-icon"))!=null&&document.getElementById(a?"".concat(this.jSPlugin.id,"-hdSelect-icon"):"".concat(this.jSPlugin.id,"-sdSelect-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).setAttribute("style",document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).getAttribute("style")+";"+(n?"cursor: not-allowed;color: gray;border-color: gray;":"cursor: default;color: #ffffff;border-color: #ffffff;"))}},{key:"matchBtn",value:function(n){var i=this,r=this.themeData,a=r.header,l=r.footer,s={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}},b=a.btnList.findIndex(function(T){return T.iconId===n});switch(b===-1?(s.color=l.color,s.backgroundColor=l.backgroundColor,s.activeColor=l.activeColor):(s.color=a.color,s.backgroundColor=a.backgroundColor,s.activeColor=a.activeColor),n){case"play":return s.title="播放/结束播放",s.id=n,s.domString='
'+'`)+'')+'
',s.onclick=function(){var T=i.decoderState.state,C=T.play,y=T.isEditing,h=T.rec,D=T.cloudRec,_=T.recordvideo;if(y)return!1;C?(h||D?i.jSPlugin.pause():i.jSPlugin.stop(),_&&i.setDecoderState({recordvideo:!1}),i.jSPlugin.Zoom.stopZoom()):(h||D?i.jSPlugin.resume():i.jSPlugin.play(),i.resetMobileZoomStatus()),i.setDecoderState({zoom:!1,play:!C}),i.setDisabled(C)},s;case"sound":return s.title="声音",s.id=n,s.domString=''+'`)+' `)+"",s.onclick=function(){var T=i.decoderState.state,C=T.play,y=T.sound,h=T.talk;C&&(y?(i.jSPlugin.closeSound(),i.setDecoderState({sound:!1})):h||(i.jSPlugin.openSound(),i.setDecoderState({sound:!0})))},s;case"recordvideo":return s.title="录屏",s.id=n,s.domString='')+'',s.onclick=function(){var T=i.decoderState.state,C=T.play,y=T.recordvideo;C&&(y?(i.jSPlugin.stopSave(),i.setDecoderState({recordvideo:!1})):(i.jSPlugin.startSave("".concat(new Date().getTime())),i.setDecoderState({recordvideo:!0})))},s;case"capturePicture":return s.title="截图",s.id=n,s.domString='')+'',s.onclick=function(){var T=i.decoderState.state.play;T?i.jSPlugin.capturePicture("".concat(new Date().getTime())):console.log("视频未播放,无法截图")},s;case"talk":return s.title="对讲",s.id=n,s.domString="
"+'')+'',s.onclick=function(){var T=i.decoderState.state,C=T.talk,y=T.sound,h=T.play;if(h)if(C){console.log("结束对讲"),i.setDecoderState({talk:!1}),i.jSPlugin.Talk.stopTalk();var D=Ut.findIndex(i.themeData.footer.btnList,function(_){return _.iconId==="sound"&&_.isrender===1&&_.defaultActive===1})>-1;i.themeData&&D&&(i.jSPlugin.openSound(),i.setDecoderState({sound:!0}))}else console.log("开始对讲"),i.setDecoderState({talk:!0}),y&&(i.jSPlugin.closeSound(),i.setDecoderState({sound:!1})),i.jSPlugin.Talk.startTalk()},s;case"zoom":return s.title="电子放大",s.id=n,s.domString="
"+' `),s.onclick=function(){var T=i.decoderState.state,C=T.zoom,y=T.play;if(!y)return!1;C?(console.log("结束电子放大"),i.setDecoderState({zoom:!1}),i.jSPlugin.Zoom.stopZoom()):(console.log("开始电子放大"),i.jSPlugin.Zoom.startZoom(),i.setDecoderState({zoom:!0}))},s;case"pantile":return s.title="云台控制",s.id=n,s.domString='')+'',s.onclick=function(){var T=i.decoderState.state,C=T.play,y=T.pantile,h=T.expend;if(C)if(y)console.log("隐藏云台"),i.Ptz.hide(),i.setDecoderState({pantile:!1});else{if(console.log("显示云台"),i.isMobile&&!h)return console.log("移动端,非全屏状态不展示云台"),!1;i.Ptz.show(),i.setDecoderState({pantile:!0})}},s;case"expend":return s.title="全局全屏",s.id=n,s.domString='')+''+' `),s.onclick=function(){var T=i.decoderState.state,C=T.webExpend,y=T.expend;T.play;var h=T.pantile;if(C)return console.log("正在网站全屏"),!1;if(y)if(i.isMobile){var D=parseInt(getComputedStyle(document.getElementById("".concat(i.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(i.jSPlugin.id)).height,10);document.getElementById("".concat(i.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(i.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-32px"),document.getElementById("".concat(i.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(i.jSPlugin.id,"-headControl")).style.position="relative"),Kl(document.getElementById("".concat(i.jSPlugin.id,"-wrap")),i.jSPlugin.width,i.jSPlugin.height+D),i.jSPlugin.jSPlugin.JS_Resize(i.jSPlugin.width,i.jSPlugin.height),h&&(i.Ptz.hide(),i.setDecoderState({pantile:!1}))}else{console.log("取消全局全屏");var z=Nr();z.then(function(S){console.log("取消全屏",S,i.jSPlugin),i.jSPlugin.jSPlugin.JS_Resize(i.jSPlugin.width,i.jSPlugin.height)})}else if(console.log("执行全局全屏"),i.isMobile){var D=parseInt(getComputedStyle(document.getElementById("".concat(i.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(i.jSPlugin.id)).height,10);$o(document.getElementById("".concat(i.jSPlugin.id,"-wrap"))),setTimeout(function(){var S=document.documentElement.clientWidth,d=document.documentElement.clientHeight;document.getElementById("".concat(i.jSPlugin.id)).style["backface-visibility"]="hidden",i.jSPlugin.jSPlugin.JS_Resize(d,S-D)},100)}else{var _=window.screen.width,E=window.screen.height,w=yi(document.getElementById("".concat(i.jSPlugin.id)));w.then(function(S){i.jSPlugin.jSPlugin.JS_Resize(_,E)}).catch(function(S){console.log(S)})}i.setDecoderState({expend:!y})},s;case"webExpend":return s.title="网页全屏",s.id=n,s.domString='')+''+'",s.onclick=function(){var T=i.decoderState.state,C=T.webExpend,y=T.expend;if(T.play,y)return console.log("正在全局全屏"),!1;if(i.jSPlugin.recTimer&&clearInterval(i.jSPlugin.recTimer),C){console.log("取消网页全屏");var S=Nr();S.then(function(d){i.jSPlugin.jSPlugin.JS_Resize(i.jSPlugin.width,i.jSPlugin.height),i.jSPlugin.Theme.Rec&&i.jSPlugin.Theme.Rec.recAutoSize()})}else{console.log("执行网页全屏");var h=0,D=0,_=i;["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(d){window.addEventListener(d,function(g){var k=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;return k?document.getElementById("".concat(_.jSPlugin.id,"-loading-item-0"))&&(document.getElementById("".concat(_.jSPlugin.id,"-loading-item-0")).style.height=window.screen.height-parseInt(window.getComputedStyle(document.getElementById("".concat(_.jSPlugin.id,"-headControl"))).height,10)+"px"):document.getElementById("".concat(_.jSPlugin.id,"-loading-item-0"))&&(document.getElementById("".concat(_.jSPlugin.id,"-loading-item-0")).style.height=_.jSPlugin.height+parseInt(window.getComputedStyle(document.getElementById("".concat(_.jSPlugin.id,"-headControl"))).height,10)+"px"),k})});var E=window.screen.width,w=window.screen.height,z=yi(document.getElementById("".concat(i.jSPlugin.id,"-wrap")));z.then(function(d){document.getElementById("".concat(i.jSPlugin.id,"-canvas-container"))&&(h=parseInt(window.getComputedStyle(document.getElementById("".concat(i.jSPlugin.id,"-canvas-container"))).height,10)),document.getElementById("".concat(i.jSPlugin.id,"-headControl"))&&(D=parseInt(window.getComputedStyle(document.getElementById("".concat(i.jSPlugin.id,"-headControl"))).height,10)),i.jSPlugin.jSPlugin.JS_Resize(E,w-h-D),i.jSPlugin.Theme.Rec&&i.jSPlugin.Theme.Rec.recAutoSize()}).catch(function(d){console.log(d)})}i.setDecoderState({webExpend:!C})},s;case"hd":return s.title="画面清晰度",s.id=n,s.domString='"+'')+''+' `)+`')+"",s.onclick=function(T){var C=i.decoderState.state,y=C.hd,h=C.expend,D=C.recordvideo,_=C.play;_&&(y&&T.target.id==="".concat(i.jSPlugin.id,"-select-sd")?(console.log("切换到标清"),i.jSPlugin.changeVideoLevel(0),i.setDecoderState({hd:!1}),i.resetMobileZoomStatus(),D&&i.setDecoderState({recordvideo:!1}),i.setDecoderState({zoom:!1}),i.jSPlugin.Zoom.stopZoom()):!y&&T.target.id==="".concat(i.jSPlugin.id,"-select-hd")&&(i.jSPlugin.changeVideoLevel(1),i.setDecoderState({hd:!0}),i.resetMobileZoomStatus(),D&&i.setDecoderState({recordvideo:!1}),i.setDecoderState({zoom:!1}),i.jSPlugin.Zoom.stopZoom()),i.showHD=!i.showHD,document.getElementById("".concat(i.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-hdSelect")).style.display=document.getElementById("".concat(i.jSPlugin.id,"-hdSelect")).style.display==="none"?"block":"none",i.isMobile&&(document.getElementById("".concat(i.jSPlugin.id,"-select-hd-mask")).style.display=document.getElementById("".concat(i.jSPlugin.id,"-select-hd-mask")).style.display==="none"?"block":"none")),i.isMobile&&h&&i.showHD?document.getElementById("".concat(i.jSPlugin.id,"-hdSelect")).className="hd speed-select mobile expend":document.getElementById("".concat(i.jSPlugin.id,"-hdSelect")).className=i.isMobile?"hd speed-select mobile":"speed-select")},s;case"speed":return s.title="回放倍速",s.id=n,s.domString='"+`
`).concat(this.nextRate===1?"倍速":"".concat(this.nextRate,"倍").replace("3","0.5"),`
`)+`')+"
",this.isMobile||(s.onmouseenter=function(T){var C=i.decoderState.state.play;if(!C)return!1;console.log("鼠标移入",T),i.setDecoderState({speed:!0}),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display="block")},s.onmouseleave=function(T){var C=i.decoderState.state.play;if(!C)return!1;console.log("鼠标移出",T),i.setDecoderState({speed:!1}),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display="none")}),s.onclick=function(T){var C=i.decoderState.state,y=C.speed,h=C.expend,D=C.play;if(!D)return!1;if(!y&&i.isMobile&&(document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).className=h?"speed speed-select mobile expend":"speed speed-select mobile"),i.nextRate=1,T.target.id)switch(T.target.id){case"".concat(i.jSPlugin.id,"-select-speed1"):console.log("倍速1"),i.nextRate=1,i.jSPlugin.jSPlugin.JS_Speed(i.nextRate),i.changeRecSpeed(1),i.jSPlugin.speed=1,i.setDecoderState({speed:!y});break;case"".concat(i.jSPlugin.id,"-select-speed2"):console.log("倍速2"),i.nextRate=2,i.jSPlugin.jSPlugin.JS_Speed(i.nextRate),i.changeRecSpeed(2),i.jSPlugin.speed=2,i.setDecoderState({speed:!y});break;case"".concat(i.jSPlugin.id,"-select-speed4"):console.log("倍速4"),i.nextRate=4,i.jSPlugin.jSPlugin.JS_Speed(i.nextRate),i.changeRecSpeed(4),i.jSPlugin.speed=4,i.setDecoderState({speed:!y});break;case"".concat(i.jSPlugin.id,"-select-speed05"):console.log("倍速05"),i.nextRate=3,i.jSPlugin.jSPlugin.JS_Speed(i.nextRate),i.changeRecSpeed(.5),i.jSPlugin.speed=.5,i.setDecoderState({speed:!y});break;default:i.isMobile?i.setDecoderState({speed:!y}):i.setDecoderState({speed:!0});break}!i.isMobile&&T.target.id==="".concat(i.jSPlugin.id,"-speed-text")?document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display="block":document.getElementById("".concat(i.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display==="none"?"block":"none")},s;case"deviceName":return s.title="设备名称",s.id=n,s.domString="设备名称",s.onclick=function(){},s;case"deviceID":return s.title="设备序列号",s.id=n,s.domString="设备序列号",s.onclick=function(){},s;case"cloudRec":return s.title="云存储回放",s.id=n,s.domString=` `),s.onclick=function(){console.log("点击云回放"),i.setDecoderState({type:"cloud.rec",cloudRec:!0,rec:!1}),i.jSPlugin.changePlayUrl({type:"cloud.rec"},function(){console.log(i.jSPlugin);var T=et("begin",i.jSPlugin.url)||new Date().Format("yyyyMMdd");i.Rec.renderRec("".concat(T.slice(0,4),"-").concat(T.slice(4,6),"-").concat(T.slice(6,8)));var C=i.decoderState.state.zoom;C&&(i.setDecoderState({zoom:!1}),i.jSPlugin.Zoom.stopZoom())}),console.log(i.jSPlugin)},s;case"rec":return s.title="本地存储",s.id=n,s.domString=` `),s.onclick=function(){console.log("点击本地回放"),i.setDecoderState({type:"rec",cloudRec:!1,rec:!0}),i.jSPlugin.changePlayUrl({type:"rec"},function(){console.log("---------本地回放"),console.log(i.jSPlugin);var T=et("begin",i.jSPlugin.url)||new Date().Format("yyyyMMdd");i.Rec.renderRec("".concat(T.slice(0,4),"-").concat(T.slice(4,6),"-").concat(T.slice(6,8)));var C=i.decoderState.state.zoom;C&&(i.setDecoderState({zoom:!1}),i.jSPlugin.Zoom.stopZoom())}),console.log(i.jSPlugin)},s;default:return s}}},{key:"changeRecSpeed",value:function(n){var i=this,r=function(s){if(console.log("setLiActive",s),!document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")))return!1;document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[0].className=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[0].className.replace("active","default"),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[1].className=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[1].className.replace("active","default"),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[2].className=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[2].className.replace("active","default"),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[3].className=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[3].className.replace("active","default"),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[s].className=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[s].className.replace("default","active")},a="1";switch(n){case 1:r(2),a="倍速";break;case 2:r(1),a="".concat(n,"倍");break;case 4:r(0),a="".concat(n,"倍");break;case .5:r(3),a="".concat(n,"倍");break;default:r(2),a="".concat(n,"倍");break}document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))&&(document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).innerHTML=a)}},{key:"initThemeData",value:function(){var n=this,i=this.themeData,r=i.header,a=i.footer,l=this.jSPlugin.id;if(this.header=Qo.header,this.footer=Qo.footer,this.isNeedRenderHeader=Ut.findIndex(r.btnList,function(w){return w.isrender>0})>=0,this.isMobile&&(this.isNeedRenderHeader=Ut.findIndex(r.btnList,function(w){return w.isrender>0&&w.iconId==="deviceID"||w.isrender>0&&w.iconId==="deviceName"})>=0),this.isNeedRenderFooter=Ut.findIndex(a.btnList,function(w){return w.isrender>0})>=0,this.isNeedRenderTimeLine=Ut.findIndex(r.btnList,function(w){return w.iconId==="cloudRec"&&w.isrender===1||w.iconId==="rec"&&w.isrender===1})>=0&&!this.jSPlugin.disabledTimeLine,["date-switch-container-wrap","rec-type-container-wrap","mobile-rec-wrap","mobile-ez-ptz-container"].forEach(function(w,z){document.getElementById(w)&&document.getElementById(w).parentElement.removeChild(document.getElementById(w))}),this.isNeedRenderHeader)if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="
");else{var s=document.createElement("div");s.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),s.setAttribute("class","header-controls"),s.innerHTML="
`);var b={height:this.jSPlugin.width>Me?"48px":"32px","line-height":this.jSPlugin.width>Me?"48px":"32px",display:"flex","justify-content":"space-between",top:0,"z-index":1,background:"#000000",color:"#FFFFFF",width:"100%"};s.style=pa(b),document.getElementById("".concat(l,"-wrap")).insertBefore(s,document.getElementById(l));var T=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(T)},50)}else document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&document.getElementById("".concat(this.jSPlugin.id,"-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-headControl")));if(this.isNeedRenderFooter)if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")))document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-".concat(this.jSPlugin.width>Me?48:32,"px"),document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='`));else{var C=document.createElement("div");C.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container")),C.setAttribute("class","ez-iframe-footer-container");var y={"min-height":this.jSPlugin.width>Me?"48px":"32px","max-height":this.jSPlugin.width>Me?"96px":"80px",position:"relative","margin-top":this.jSPlugin.width>Me?"-48px":"-32px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%"};C.style=pa(y),C.innerHTML='`),Wn(C,document.getElementById(l))}else document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")));if(this.isNeedRenderHeader&&document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=r.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=r.color,r.btnList.map(function(w,z){w.isrender&&n.renderHeader(w.iconId,w.part)})),this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=a.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=a.color,a.btnList.map(function(w,z){w.isrender&&n.renderFooter(w.iconId,w.part)})),this.isNeedRenderTimeLine)if(this.isMobile)document.getElementById("".concat(this.jSPlugin.id,"-headControl-right"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl-right")).style.display="none"),this.Rec=new cs(this.jSPlugin,this.changeRecSpeed,this.resetMobileZoomStatus);else{this.Rec?(this.Rec.unSyncTimeLine(),this.Rec.recInit()):(this.jSPlugin.decoderState=this.decoderState,this.jSPlugin.setDecoderState=this.setDecoderState,this.Rec=new ls(this.jSPlugin));var h=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(h)},50)}var D=Ut.findIndex(this.themeData.footer.btnList,function(w){return w.iconId==="pantile"&&w.isrender===1})>=0&&!this.jSPlugin.disabledPTZ;D&&(this.isMobile&&(this.MobilePtz=new vs(this.jSPlugin)),this.Ptz=new hs(this.jSPlugin));var _=function(){var z=n.decoderState.state,S=z.expend,d=z.webExpend,m=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;m||(n.jSPlugin.jSPlugin.JS_Resize(n.jSPlugin.width,n.jSPlugin.height),S&&n.setDecoderState({expend:!1}),d&&n.setDecoderState({webExpend:!1})),n.jSPlugin.Theme.Rec&&n.jSPlugin.Theme.Rec.recAutoSize()};if(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(w){window.addEventListener(w,function(z){return _()})}),this.themeData.poster){this.jSPlugin.poster=this.themeData.poster;var E=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(E),n.jSPlugin.setPoster(n.themeData.poster))},50)}this.inited=!0,this.getDeviceInfo()}},{key:"resetMobileZoomStatus",value:function(){if(this.isMobile){var n=document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"));n&&n.style&&n.style.display!="none"&&(console.log("结束电子放大"),n.style.display="none"),this.jSPlugin.Zoom.resetZoom()}}},{key:"getDeviceInfo",value:function(){var n=this,i=function(a){a.code==200&&a.data&&(a.data.isEncrypt&&setTimeout(function(){n.pluginStatus.loadingClear(),n.pluginStatus.loadingSetText({text:"设备已加密",color:"red"})},1500),document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content"))&&(document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content")).style.maxWidth="100%",document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content")).style.overflow="hidden",document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content")).style.textOverflow="ellipsis",document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content")).style.whiteSpace="nowrap",document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content")).innerHTML=a.data.deviceName),document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content"))&&(document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content")).style.maxWidth="100%",document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content")).style.overflow="hidden",document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content")).style.textOverflow="ellipsis",document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content")).style.whiteSpace="nowrap",document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content")).innerHTML=Ke(n.jSPlugin.url).deviceSerial))};Gn(this.jSPlugin.env.domain+"/api/lapp/device/info","POST",{accessToken:this.jSPlugin.accessToken,deviceSerial:Ke(this.jSPlugin.url).deviceSerial},"",i)}},{key:"editStart",value:function(n){var i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),r=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));r&&r.setAttribute("class","header-controls themeEditing"),i&&i.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})}},{key:"editEnd",value:function(n){var i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),r=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));r&&r.setAttribute("class","header-controls"),i&&i.setAttribute("class","footer-controls"),this.setDecoderState({isEditing:!1})}},{key:"webExpend",value:function(){var n=this,i=this.decoderState.state;i.webExpend;var r=i.expend,a=i.play;if(!a)return!1;if(r)return console.log("正在全局全屏"),!1;console.log("执行网页全屏");var l=0,s=0,b=yi(document.getElementById("".concat(this.jSPlugin.id,"-wrap")));b.then(function(T){console.log("全屏promise",window.screen.width),document.getElementById("".concat(n.jSPlugin.id,"-canvas-container"))&&(l=parseInt(window.getComputedStyle(document.getElementById("".concat(n.jSPlugin.id,"-canvas-container"))).height,10)),document.getElementById("".concat(n.jSPlugin.id,"-headControl"))&&(s=parseInt(window.getComputedStyle(document.getElementById("".concat(n.jSPlugin.id,"-headControl"))).height,10)),console.log("this.jSPlugin.JS_Resiz",l,s,document.body.clientWidth),n.jSPlugin.jSPlugin.JS_Resize(window.screen.width,window.screen.height-l-s)}).catch(function(T){console.log(T)})}},{key:"expend",value:function(){var n=this,i=this.decoderState.state,r=i.webExpend;i.expend;var a=i.play;if(i.pantile,!a)return!1;if(r)return console.log("正在网站全屏"),!1;if(console.log("执行全局全屏"),this.isMobile){var l=parseInt(getComputedStyle(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).height,10);$o(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),setTimeout(function(){var b=document.documentElement.clientWidth,T=document.documentElement.clientHeight;document.getElementById("".concat(n.jSPlugin.id)).style["backface-visibility"]="hidden",n.jSPlugin.jSPlugin.JS_Resize(T,b-l)},100)}else{var s=yi(document.getElementById("".concat(this.jSPlugin.id)));s.then(function(b){n.jSPlugin.jSPlugin.JS_Resize(window.screen.width,window.screen.height)}).catch(function(b){console.log(b)})}}}]),f}();Date.prototype.Format=function(f){var u={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(f)&&(f=f.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in u)new RegExp("("+n+")").test(f)&&(f=f.replace(RegExp.$1,RegExp.$1.length==1?u[n]:("00"+u[n]).substr((""+u[n]).length)));return f};var Ds=function(){function f(u,n){if(fe(this,f),this.params=u,this.state={},this.jsPlugin=n,this.url="https://log.ys7.com/statistics.do?",u.env)switch(u.env){case"test12":this.url="https://test12dclog.ys7.com/statistics.do?";break;case"online":break;default:this.url=u.env;break}}return dt(f,[{key:"uuid",value:function(){for(var n=[],i="0123456789abcdef",r=0;r<36;r++)n[r]=i.substr(Math.floor(Math.random()*16),1);n[14]="4",n[19]=i.substr(n[19]&3|8,1),n[8]=n[13]=n[18]=n[23]="-";var a=n.join("");return a}},{key:"dclog",value:function(n){var i=this.url,r=Object.assign({},{systemName:"open_website_monitor"},{bn:"ezuikit-js"},n,{un:n.url},{st:new Date().getTime(),h:window.location.pathname});Object.keys(r).forEach(function(l,s){var b=r[l];typeof r[l]=="string"&&(b=r[l].replace("%","%25")),typeof r[l]!="undefined"&&(i+="".concat(s===0?"":"&").concat(l,"=").concat(encodeURIComponent(b)))});var a=new Image;a.src=i}},{key:"localInfoLog",value:function(n){var i=this.url,r=window.location.protocol+"//"+window.location.host,a={systemName:"open_netstream_localinfo",Ver:"v6.0.0",PlatAddr:r,ExterVer:"v6.0.0",OpId:this.uuid(),CltType:102,AppId:"",playurl:encodeURIComponent(this.jsPlugin.url),StartTime:new Date().Format("yyyy-MM-dd hh:mm:ss.S"),OS:navigator.platform};a=Object.assign(a,n),Object.keys(a).forEach(function(s,b){var T=a[s];typeof a[s]=="string"&&(T=a[s].replace("%","%25")),typeof a[s]!="undefined"&&(i+="".concat(b===0?"":"&").concat(s,"=").concat(encodeURIComponent(T)))});var l=new Image;l.src=i}},{key:"playLog",value:function(n){var i=this.url,r=i,a={systemName:"open_netstream_play_main",playurl:encodeURIComponent(this.jsPlugin.url),Time:new Date().Format("yyyy-MM-dd hh:mm:ss.S"),Via:2,OpId:this.uuid()};a=Object.assign(a,n),Object.keys(a).forEach(function(s,b){var T=a[s];typeof a[s]=="string"&&(T=a[s].replace("%","%25")),typeof a[s]!="undefined"&&(r+="".concat(b===0?"":"&").concat(s,"=").concat(encodeURIComponent(T)))});var l=new Image;l.src=r}}]),f}();(function(f,u){ue(ae)==="object"&&ue(ae.exports)==="object"?ae.exports=f.document?u(f,!0):function(n){if(!n.document)throw new Error("EZUIPlayer requires a window with a document");return u(n)}:u(f)})(typeof window!="undefined"?window:void 0,function(f,u){var n;function i(y,h){for(var D=document.getElementsByTagName("head")[0].getElementsByTagName("script"),_=!1,E=0;E0&&(O=h.controls.join(","),A+="&controls="+O)),h.websocketParams&&(A+="&websocketParams="+JSON.stringify(h.websocketParams)),A;case"standard":return s+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+g.opt.url.replace("?","&")+"&autoplay="+g.opt.autoplay+"&audio="+g.opt.audio+"&accessToken="+h.accessToken+"&templete=1&id="+D+"&decoderVersion="+g.opt.decoderVersion;case"security":return s+"/ezopen/h5/iframe_se?bSupporDoubleClickFull=0&url="+g.opt.url.replace("?","&")+"&autoplay="+g.opt.autoplay+"&audio="+g.opt.audio+"&accessToken="+h.accessToken+"&templete=0&id="+D+"&decoderVersion="+g.opt.decoderVersion;case"theme":return A=s+"/jssdk/theme.html?url=".concat(h.url,"&accessToken=").concat(h.accessToken,"&id=").concat(D,"&isMobile=").concat(h.isMobile),typeof h.isMobile!="undefined"&&(A+="&isMobile="+h.isMobile),typeof h.autoplay!="undefined"&&(A+="&autoplay="+h.autoplay),typeof h.domain!="undefined"&&h.domain=="https://test12open.ys7.com"&&(A+="&env=test12"),typeof h.env!="undefined"&&typeof h.env.domain!="undefined"&&h.env.domain=="https://test12open.ys7.com"&&(A+="&env=test12"),typeof h.header!="undefined"&&(A+="&header="+h.header),A;default:return s+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+g.opt.url.replace("?","&")+"&autoplay="+g.opt.autoplay+"&audio="+g.opt.audio+"&accessToken="+h.accessToken+"&templete=0&id="+D+"&decoderVersion="+g.opt.decoderVersion}}E.src=w();var z=document.getElementById(D).offsetHeight,S=document.getElementById(D).offsetWidth;h.height&&(z=parseInt(h.height),/\%$/.test(h.height)&&(S=document.getElementById(D).offsetWidth*(parseInt(h.height)/100))),h.width&&(S=parseInt(h.width),/\%$/.test(h.width)&&(S=document.getElementById(D).offsetWidth*(parseInt(h.width)/100))),E.width=S,E.height=z,E.id="EZUIKitPlayer-"+D,E.setAttribute("allowfullscreen",!0),E.setAttribute("allow","autoplay"),E.setAttribute("frameborder",0),_.appendChild(E);var d=g.opt.filePath+"/js/jquery.js",m="https://open.ys7.com/assets/layer/layer.js";i(d,function(){i(m,function(){if(ge().headerContainer){var A=document.createElement("div");A.setAttribute("class","panel-top");var O=document.createElement("div");if(O.setAttribute("class","contros"),A.appendChild(O),_.insertBefore(A,E),ge().capturePictureModule){var H=document.createElement("span");H.innerHTML=' ',H.onclick=function(){g.capturePicture()},O.appendChild(H)}if(console.log("matchHeaderOpt().saveModule",ge().saveModule),ge().saveModule){var Z=document.createElement("span");Z.innerHTML=' ',Z.onclick=function(){g.startSave(),document.getElementById("startSave").setAttribute("class","icon hide"),document.getElementById("stopSave").setAttribute("class","icon")},O.appendChild(Z);var X=document.createElement("span");X.innerHTML=' ',X.onclick=function(){g.stopSave(),document.getElementById("stopSave").setAttribute("class","icon hide"),document.getElementById("startSave").setAttribute("class","icon")},O.appendChild(X)}if(ge().zoomModule){var ne=document.createElement("span");ne.innerHTML=' ',ne.onclick=function(){g.enableZoom(),document.getElementById("enableZoom").setAttribute("class","icon hide"),document.getElementById("closeZoom").setAttribute("class","icon")},O.appendChild(ne);var Y=document.createElement("span");Y.innerHTML=' ',Y.onclick=function(){g.closeZoom(),document.getElementById("closeZoom").setAttribute("class","icon hide"),document.getElementById("enableZoom").setAttribute("class","icon")},O.appendChild(Y)}}function me(){var rt={footerContainer:!1,talkModule:!1,broadcastModule:!1,hdModule:!1,fullScreenModule:!1},Ae=g.opt.template;switch(Ae){case"simple":if(h.footer&&h.footer instanceof Array){var ye=h.footer;rt={footerContainer:!0,talkModule:ye.indexOf("talk")!==-1,broadcastModule:ye.indexOf("broadcast")!==-1,hdModule:ye.indexOf("hd")!==-1,fullScreenModule:ye.indexOf("fullScreen")!==-1}}break;case"standard":if(h.footer&&h.footer instanceof Array){var ye=h.footer;rt={footerContainer:!0,talkModule:ye.indexOf("talk")!==-1,broadcastModule:ye.indexOf("broadcast")!==-1,hdModule:ye.indexOf("hd")!==-1,fullScreenModule:ye.indexOf("fullScreen")!==-1}}break;case"security":break;case"voice":rt={footerContainer:!0,talkModule:!0,broadcastModule:!0,hdModule:!0,fullScreenModule:!0};break}return rt}function ge(){var rt={headerContainer:!1,capturePictureModule:!1,saveModule:!1,zoomModule:!1},Ae=g.opt.template;switch(Ae){case"simple":if(h.header&&h.header instanceof Array){var ye=h.header;rt={headerContainer:!0,capturePictureModule:ye.indexOf("capturePicture")!==-1,saveModule:ye.indexOf("save")!==-1,zoomModule:ye.indexOf("zoom")!==-1}}break;case"standard":break;case"security":break;case"voice":rt={headerContainer:!0,capturePictureModule:!0,saveModule:!0,zoomModule:!0};break}return rt}if(me().footerContainer||g.opt.plugin.indexOf("talk")!==-1){var ve=g.opt.filePath+"/npm/css/recoder.css",Ce=g.opt.filePath+"/npm/js/recoder.js",be=g.opt.filePath+"/recorder.js";if(r(ve,function(){}),i(Ce,function(){i(be,function(){})}),g.opt.plugin.indexOf("talk")!==-1||me().talkModule){var Pe=function(Ae){if(console.log("data",Ae),Ae.code==200){var ye=Ae.data;if(ye){var De=ye.rtcUrl;De.indexOf("ws")===-1&&(De=De.replace("https","wss").replace("rtcgw","rtcgw-ws")),g.opt.rtcUrl=De,g.opt.ttsUrl="tts://"+ye.ttsUrl;var Xe="talk://"+g.opt.deviceSerial+":0:"+g.opt.channelNo+":cas.ys7.com:6500";if(g.opt.talkLink=g.opt.ttsUrl+"/"+Xe,g.opt.stream=ye.stream,console.log("_this.opt",g.opt),!g.opt.isReliesReady){var P=g.opt.filePath+"/npm/js/adapeter.js",M=g.opt.filePath+"/npm/js/janus.js",F=g.opt.filePath+"/npm/js/tts.js";console.log("加载jquery.js"),i(P,function(){console.log("加载adapeter.js"),i(M,function(){console.log("加载janus.js"),i(F,function(){console.log("加载tts.js"),g.opt.isReliesReady=!0})})},function(){return!!f.adapter})}if(!document.getElementById("audioleft")){var j=document.createElement("div");j.style.display="none",j.id="audioleft",document.body.appendChild(j)}if(!document.getElementById("audioright")){var I=document.createElement("div");I.style.display="none",I.id="audioright",document.body.appendChild(I)}}}l.opt=g.opt,f.EZUIKit&&(f.EZUIKit.opt=g.opt)};a(g.opt.apiDomain,"POST",{accessToken:g.opt.accessToken,deviceSerial:g.opt.deviceSerial,channelNo:g.opt.channelNo},"",Pe)}if(me().footerContainer){var Ye=function(Ae,ye){if(clearInterval(l.state.countTimer),Ae==="add"){var De=ye;l.state.countTimer=setInterval(function(){++De,document.getElementById("time-area").innerHTML=Xe(De)},1e3)}else if(Ae==="sub"){var De=ye;l.state.countTimer=setInterval(function(){De>0?(De--,document.getElementById("time-area").innerHTML=Xe(De)):(clearInterval(l.state.countTimer),l.state.countTimer=void 0,console.log("倒计时结束,开启声音"))},1e3)}else Ae==="destory"&&(clearInterval(l.state.countTimer),l.state.countTimer=void 0,document.getElementById("time-area").innerHTML="00:00");function Xe(P){var M=parseInt(P),F=0,j=0,I="00",V="00",L="00";return M>59&&(F=parseInt(M/60),M=parseInt(M%60),F>59&&(j=parseInt(F/60),F=parseInt(F%60))),I=parseInt(M)>9?parseInt(M):"0"+parseInt(M),V=parseInt(F)>9?parseInt(F):"0"+parseInt(F),L=parseInt(j)>9?parseInt(j):"0"+parseInt(j),j>0?L+":"+V+":"+I:F>0?V+":"+I:"00:"+I}},N=document.createElement("div");if(N.setAttribute("class","audio-controls"),_.appendChild(N),me().hdModule||me().fullScreenModule){var K=document.createElement("div");if(K.setAttribute("class","contros"),N.appendChild(K),me().hdModule){var te=document.createElement("span");te.setAttribute("id","video-hd"),te.innerHTML=g.opt.url.indexOf(".hd")===-1?"标清":"高清",te.onclick=function(){if(g.opt.videoLoading)return layer.msg("视频加载中,请稍后"),!1;var rt=g.stop();g.opt.videoLoading=!0,rt.then(function(Ae){g.opt.videoLoading=!1,g.opt.url.indexOf(".hd")===-1?(g.opt.url=g.opt.url.replace(".live",".hd.live"),te.innerHTML=g.opt.url.indexOf(".hd")===-1?"标清":"高清"):(g.opt.url=g.opt.url.replace(".hd.live",".live"),te.innerHTML=g.opt.url.indexOf(".hd")===-1?"标清":"高清"),g.play(g.opt.url)}).catch(function(Ae){console.log("error",Ae)})},K.appendChild(te)}if(me().fullScreenModule){var ce=document.createElement("span");ce.setAttribute("class","hide"),ce.setAttribute("id","ezuikit-open-sound"),ce.setAttribute("title","打开声音"),ce.setAttribute("style","vertical-align: top;"),ce.innerHTML='',ce.onclick=function(){g.openSound(0),ce.setAttribute("class","hide"),he.setAttribute("class","")};var he=document.createElement("span");ce.setAttribute("id","ezuikit-close-sound"),he.setAttribute("class","hide"),he.setAttribute("title","关闭声音"),he.setAttribute("style","vertical-align: top;"),he.innerHTML='',he.onclick=function(){g.closeSound(0),ce.setAttribute("class",""),he.setAttribute("class","hide")},K.appendChild(ce),K.appendChild(he)}if(g.opt.audio==1?he.setAttribute("class",""):(ce.setAttribute("class",""),g.closeSound(0)),me().fullScreenModule){var Re=document.createElement("span");Re.setAttribute("title","全屏"),Re.setAttribute("style","vertical-align: top;"),Re.innerHTML=' ',Re.onclick=function(){g.fullScreen()},K.appendChild(Re)}}if(me().talkModule){var we=document.createElement("div"),ke=document.createElement("div");we.setAttribute("class","ptp-talk off"),we.innerHTML=' 开启对讲',we.onclick=function(){if(console.log("EZUIKit.state.countTimer",l.state.countTimer),l.state.countTimer)return f.layer.msg("语音设备正忙,请稍后重试"),!1;Ye("add",0),console.log("开始对讲,关闭声音"),g.closeSound(0),console.log(g.opt),g.startTalk(),this.setAttribute("class","ptp-talk off hide"),ke.setAttribute("class","ptp-talk on")},ke.setAttribute("class","ptp-talk on hide"),ke.innerHTML=' 关闭对讲',ke.onclick=function(){console.log(g.opt),g.stopTalk(),Ye("destory",0),g.openSound(0),this.setAttribute("class","ptp-talk on hide"),we.setAttribute("class","ptp-talk off")},N.appendChild(we),N.appendChild(ke)}if(me().broadcastModule){var We=function rt(Ae){function ye(De){console.log("data",De),De.code==200&&(yn(De.data,5),l.state.page=De.page.page,Ae==0&&De.data.length==0&&!l.state.fetchDefaultList&&(l.state.fetchDefaultList=!0,rt(0)))}a(s+"/api/lapp/voice/query","POST",{accessToken:g.opt.accessToken,pageStart:Ae,pageSize:l.state.pageSize,default:l.state.fetchDefaultList?"true":"false"},"",ye)},yn=function(Ae){if(console.log("renderVoliceList",Ae),Ae&&Ae.length>0){for(var ye=0;ye"+(Ae[ye].voiceName.length>10?Ae[ye].voiceName.substr(0,10)+"...":Ae[ye].voiceName)+"",document.getElementsByClassName("voice-list-ul")[0].append(De),De.onclick=function(Xe){console.log("点击元素",Xe.target,Xe.target.dataset.url);var P=Xe.target.dataset.url,M=Xe.target.dataset.time;Yt(P,M)}}Ae.length===l.state.pageSize?document.getElementById("voice-list-end").innerHTML="向下滚动加载更多":document.getElementById("voice-list-end").innerHTML="没有更多数据了"}},Yt=function(Ae,ye){console.log("播放语音",Ae,ye);function De(Xe){console.log("data.data",Xe.data),Xe.code==200?Ye("sub",parseInt(ye)):Xe.code=="10001"?f.layer.msg("未找到当前语音"):f.layer.msg(Xe.msg||"发送失败,请稍后再试")}a(s+"/api/lapp/voice/send","POST",{accessToken:g.opt.accessToken,deviceSerial:g.opt.deviceSerial,channelNo:g.opt.channelNo,fileUrl:Ae},"",De)},It=document.createElement("div"),Ht=document.createElement("div");It.setAttribute("class","broadcast off"),Ht.setAttribute("class","broadcast on hide"),It.innerHTML=' 语音播报',It.onclick=function(){this.setAttribute("class","broadcast off hide"),Ht.setAttribute("class","broadcast on")},Ht.innerHTML='
自定义语音
语音播报',Ht.onclick=function(){this.setAttribute("class","broadcast on hide"),It.setAttribute("class","broadcast off")},N.appendChild(It),N.appendChild(Ht),document.getElementById("voice-custom").onclick=function(){console.log("显示自定义语音"),Ge.setAttribute("class","speak off")},We(0);var Ge=document.createElement("div"),Ct=document.createElement("div");Ge.setAttribute("class","speak off hide"),Ct.setAttribute("class","speak on hide"),Ge.setAttribute("id","startSpeak"),Ct.setAttribute("id","stopSpeak"),Ge.innerHTML=' 按住说话',Ct.innerHTML=' 松开发送',N.appendChild(Ge),N.appendChild(Ct),document.getElementById("voice-list").onscroll=function(rt){var Ae=this.scrollHeight;console.log("sum",Ae,this.scrollTop,document.getElementById("voice-list").clientHeight),Ae<=this.scrollTop+this.clientHeight&&(console.log("拖动到底,执行加载",l.state.page),We(++l.state.page))};var kt=document.createElement("div");kt.setAttribute("class","time-area"),kt.setAttribute("id","time-area"),kt.innerHTML="00:00",N.appendChild(kt);var Oe;document.getElementById("startSpeak").onmousedown=function(){if(l.state.countTimer)return f.layer.msg("语音设备正忙,请稍后重试"),!1;console.log("按住说话"),Ge.setAttribute("class","speak off hide"),Ct.setAttribute("class","speak on"),De(),Ye("add",0),setTimeout(function(){l.state.recodeTime=0,ye()},1e3),l.state.recodeTimer&&clearInterval(l.state.recodeTimer),l.state.recodeTimer=setInterval(function(){l.state.recodeTime>=59?(g.stopTalk(),Ye("destory",0),this.setAttribute("class","ptp-talk on hide"),we.setAttribute("class","ptp-talk off"),f.layer.msg("不超过1分钟")):l.state.recodeTime=l.state.recodeTime+1},1e3);var rt;function Ae(Xe){var P=rt.createMediaStreamSource(Xe);Oe=new f.Recorder(P)}function ye(){Oe&&Oe.record()}function De(){console.log("run init");try{f.AudioContext=f.AudioContext||f.webkitAudioContext,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia,f.URL=f.URL||f.webkitURL,rt=new AudioContext,console.log("Audio context set up."),console.log("navigator.getUserMedia "+(navigator.getUserMedia?"available.":"not present!"))}catch(Xe){console.log("err",Xe),f.layer.msg("No web audio support in this browser!")}navigator.getUserMedia({audio:!0},Ae,function(Xe){console.log("No live audio input: "+Xe)})}},document.getElementById("stopSpeak").onmouseup=function(){console.log("松开发送"),Ct.setAttribute("class","speak on hide"),rt();function rt(){if(Ye("destory",0),l.state.recodeTime<1)return f.layer.msg("说话时间过短"),clearInterval(l.state.recodeTimer),!1;clearInterval(l.state.recodeTimer),Ae()}function Ae(){try{Oe&&Oe.stop(),Oe&&Oe.exportWAV(function(ye){if(console.log("wav_file",ye),ye.size<1e3)return f.layer.msg("录音失败,请重试"),l.state.recodeTime=0,!1;Ye("sub",l.state.recodeTime+2);var De=new FormData;De.append("voiceFile",ye),De.append("accessToken",g.opt.accessToken),De.append("deviceSerial",g.opt.deviceSerial),De.append("channelNo",g.opt.channelNo);function Xe(M){console.log("data.data",M.data),M.code==200?Ye("sub",l.state.recodeTime+2):M.code=="10001"?f.layer.msg("未找到当前语音"):f.layer.msg(M.msg||"发送失败,请稍后再试")}function P(M){console.log("err",M)}a(s+"/api/lapp/voice/sendonce","POST",{voiceFile:ye,accessToken:g.opt.accessToken,deviceSerial:g.opt.deviceSerial,channelNo:g.opt.channelNo},"",Xe,P)}),Oe&&Oe.clear()}catch(ye){console.log(ye)}}}}}}})});var g=this;f.addEventListener("message",function(A){A.origin;var O=g.opt.id;if(A.data.type)switch(A.data.type){case"openSound":O==A.data.id&&h.openSoundCallBack&&h.openSoundCallBack(A.data);break;case"closeSound":O==A.data.id&&h.closeSoundCallBack&&h.closeSoundCallBack(A.data);break;case"capturePicture":O==A.data.id&&h.capturePictureCallBack&&h.capturePictureCallBack(A.data);break;case"startSave":O==A.data.id&&h.startSaveCallBack&&h.startSaveCallBack(A.data);break;case"stopSave":O==A.data.id&&h.stopSaveCallBack&&h.stopSaveCallBack(A.data);break;case"fullScreen":O==A.data.id&&h.fullScreenCallBack&&h.fullScreenCallBack(A.data);break;case"getOSDTime":O==A.data.id&&h.getOSDTimeCallBack&&h.getOSDTimeCallBack(A.data);break;case"handleSuccess":O==A.data.id&&h.handleSuccess&&h.handleSuccess(A.data);break;case"handleError":O==A.data.id&&h.handleError&&h.handleError(A.data);break;case"dblclick":O==A.data.id&&g.opt.bSupporDoubleClickFull&&(g.opt.fullScreenStatus===0?g.fullScreen():g.cancelFullScreen());break;case"startTalk":g.startTalk(),g.closeSound();break;case"stopTalk":g.stopTalk(),g.openSound();break;case"clickEventHandle":console.log("event.data",A.data),h.clickEventHandle&&h.clickEventHandle(A.data);break;case"removeEventHandle":h.removeEventHandle&&h.removeEventHandle(A.data);break;case"esc":h.clickEventHandle&&h.clickEventHandle(A.data);break;case"iframeFullScreen":if(O==A.data.id){var H=function(X){var ne=X.requestFullScreen||X.webkitRequestFullScreen||X.mozRequestFullScreen||X.msRequestFullScreen;if(ne)ne.call(X);else if(typeof f.ActiveXObject!="undefined"){var Y=new ActiveXObject("WScript.Shell");Y!==null&&Y.SendKeys("{F11}")}};H(document.getElementById("EZUIKitPlayer-"+A.data.id))}break}});function k(A){g.opt.fullScreenStatus=A?1:0,h.fullScreenChangeCallBack&&h.fullScreenChangeCallBack({data:A,id:g.opt.id})}typeof document.fullScreen!="undefined"?document.addEventListener("fullscreenchange",function(){var A=document.fullscreen||!1;k(A)}):typeof document.webkitIsFullScreen!="undefined"?document.addEventListener("webkitfullscreenchange",function(){var A=document.webkitIsFullScreen||!1;k(A)}):typeof document.mozFullScreen!="undefined"&&document.addEventListener("mozfullscreenchange",function(){var A=document.mozFullScreen||!1;k(A)})};T.prototype.play=function(y){var h="EZUIKitPlayer-"+this.opt.id,D=document.getElementById(h).contentWindow;ue(y)==="object"&&y.url&&(this.opt.url=y.url),ue(y)==="object"&&y.accessToken&&(this.opt.accessToken=y.accessToken),typeof y=="string"&&(this.opt.url=y),D.postMessage({action:"play",accessToken:this.opt.accessToken,url:this.opt.url},s+"/ezopen/h5/iframe");var _=this;this.opt.videoLoading=!0;var E=new Promise(function(w,z){f.addEventListener("message",function(S){var d=_.opt.id;d==S.data.id&&S.data.type==="handleSuccess"&&(setTimeout(function(){_.opt.videoLoading=!1},1e3),w(S.data))})});return E},T.prototype.stop=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("stop",s+"/ezopen/h5/iframe");var D=this,_=new Promise(function(E,w){f.addEventListener("message",function(z){var S=D.opt.id;S==z.data.id&&z.data.type==="stop"&&E(z.data)})});return _},T.prototype.openSound=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("openSound",s+"/ezopen/h5/iframe");var D=this,_=new Promise(function(E,w){f.addEventListener("message",function(z){var S=D.opt.id;S==z.data.id&&z.data.type==="openSound"&&E(z.data)})});return _},T.prototype.closeSound=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("closeSound",s+"/ezopen/h5/iframe");var D=this,_=new Promise(function(E,w){f.addEventListener("message",function(z){var S=D.opt.id;S==z.data.id&&z.data.type==="closeSound"&&E(z.data)})});return _},T.prototype.startSave=function(y){var h="EZUIKitPlayer-"+this.opt.id,D=document.getElementById(h).contentWindow;D.postMessage({action:"startSave",fileName:y||"default"},s+"/ezopen/h5/iframe");var _=this,E=new Promise(function(w,z){f.addEventListener("message",function(S){var d=_.opt.id;d==S.data.id&&S.data.type==="startSave"&&w(S.data)})});return E},T.prototype.stopSave=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("stopSave",s+"/ezopen/h5/iframe");var D=this,_=new Promise(function(E,w){f.addEventListener("message",function(z){var S=D.opt.id;S==z.data.id&&z.data.type==="stopSave"&&E(z.data)})});return _},T.prototype.fullScreen=function(){if(this.opt.fullScreenStatus===1)return!1;var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var D=document.documentElement.clientWidth,_=document.documentElement.clientHeight,E=document.body;E=document.getElementById(y);var w="";w+="width:"+_+"px;",w+="height:"+D+"px;",w+="-webkit-transform: rotate(90deg); transform: rotate(90deg);",w+="-webkit-transform-origin: "+D/2+"px "+D/2+"px;",w+="transform-origin: "+D/2+"px "+D/2+"px;",w+="position: fixed;top: 0;left: 0;z-index:10",E.style.cssText=w,setTimeout(function(){h.postMessage("autoResize",s+"/ezopen/h5/iframe")},500)}else{var z=function(d){var m=d.requestFullScreen||d.webkitRequestFullScreen||d.mozRequestFullScreen||d.msRequestFullScreen;if(m)m.call(d);else if(typeof f.ActiveXObject!="undefined"){var g=new ActiveXObject("WScript.Shell");g!==null&&g.SendKeys("{F11}")}};z(document.getElementById(y))}this.params.fullScreenCallBack&&this.params.fullScreenCallBack(this.opt.id),this.opt.fullScreenStatus=1},T.prototype.cancelFullScreen=function(){if(this.opt.fullScreenStatus===0)return!1;var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var D=document.getElementById(y).width,_=document.getElementById(y).height,E=document.body;E=document.getElementById(y);var w="";w+="width:"+D+"px;",w+="height:"+_+"px;",w+="-webkit-transform: none; transform: none;",w+="-webkit-transform-origin: 0 0;",w+="transform-origin: 0 0;",E.style.cssText=w,setTimeout(function(){h.postMessage("autoResize",s+"/ezopen/h5/iframe")},500);var z=y+"cancel-full-screen",S=document.getElementById(z);S&&document.body.removeChild(S)}else document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen&&document.mozCancelFullScreen();this.params.cancelFullScreenCallBack&&this.params.cancelFullScreenCallBack(this.opt.id),this.opt.fullScreenStatus=0},T.prototype.capturePicture=function(y,h){var D="EZUIKitPlayer-"+this.opt.id,_=document.getElementById(D).contentWindow;_.postMessage({action:"capturePicture",fileName:y||"default",isUndownload:h},s+"/ezopen/h5/iframe");var E=this,w=new Promise(function(z,S){f.addEventListener("message",function(d){var m=E.opt.id;m==d.data.id&&d.data.type==="capturePicture"&&z(d.data)})});return w},T.prototype.enableZoom=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("enableZoom",s+"/ezopen/h5/iframe")},T.prototype.closeZoom=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("closeZoom",s+"/ezopen/h5/iframe")},T.prototype.getOSDTime=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("getOSDTime",s+"/ezopen/h5/iframe");var D=this,_=new Promise(function(E,w){f.addEventListener("message",function(z){var S=D.opt.id;S==z.data.id&&z.data.type==="getOSDTime"&&E(z.data)})});return _},T.prototype.autoResize=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("autoResize",s+"/ezopen/h5/iframe")},T.prototype.reSize=function(y,h){var D="EZUIKitPlayer-"+this.opt.id,_=document.getElementById(D).contentWindow,E=document.getElementById(this.opt.id);E.style.width=y+"px",E.style.height=h+"px",document.getElementById(this.opt.id).style.width=y+"px",document.getElementById(this.opt.id).style.height=h+"px";var w=document.getElementById(D);w.setAttribute("width",y),w.setAttribute("height",h),w.style.width=y+"px",w.style.height=h+"px",setTimeout(function(){_.postMessage({action:"autoResize"},s+"/ezopen/h5/iframe")},500)},T.prototype.startTalk=function(){console.log("执行开始对讲"),console.log(this.opt);var y=this;l.opt=this.opt,f.EZUIKit&&(f.EZUIKit.opt=this.opt);var h=function(_){if(_.code==200){var E=_.data;if(E){var w=E.rtcUrl;w.indexOf("ws")===-1&&(w=w.replace("https","wss").replace("rtcgw","rtcgw-ws")),y.opt.rtcUrl=w,y.opt.ttsUrl="tts://"+E.ttsUrl;var z="talk://"+y.opt.deviceSerial+":0:"+y.opt.channelNo+":cas.ys7.com:6500";y.opt.talkLink=y.opt.ttsUrl+"/"+z,y.opt.stream=E.stream,f.startTalk()}}};a(y.opt.apiDomain,"POST",{accessToken:y.opt.accessToken,deviceSerial:y.opt.deviceSerial,channelNo:y.opt.channelNo},"",h)},T.prototype.stopTalk=function(){console.log("执行结束对讲"),f.stopTalk()},T.prototype.edit=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("edit",s+"/ezopen/h5/iframe")},T.prototype.btnReRender=function(y){var h="EZUIKitPlayer-"+this.opt.id,D=document.getElementById(h).contentWindow;D.postMessage({action:"btnReRender",data:y},s+"/ezopen/h5/iframe")},T.prototype.changePlayUrl=function(y){y.deviceSerial&&(this.opt.deviceSerial=y.deviceSerial),y.channelNo&&(this.opt.channelNo=y.channelNo),y.accessToken&&(this.opt.accessToken=y.accessToken);var h="EZUIKitPlayer-"+this.opt.id,D=document.getElementById(h).contentWindow;D.postMessage({action:"changePlayUrl",data:y},s+"/ezopen/h5/iframe")},T.prototype.fetchThemeData=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage({action:"fetchThemeData"},s+"/ezopen/h5/iframe")},T.prototype.setThemeData=function(y,h,D){var _="EZUIKitPlayer-"+this.opt.id,E=document.getElementById(_).contentWindow;E.postMessage({action:"setThemeData",data:{accessToken:y,header:h,footer:D}},s+"/ezopen/h5/iframe")},l.EZUIKitPlayer=T,f.EZUIKitV3=l;var C=l;return C});var Ms=EZUIKitV3,Br=function(u){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=void 0,a=void 0,l=void 0,s=[];return function(){var C=Ns(n),y=new Date().getTime(),h=!r||y-r>C;r=y;for(var D=arguments.length,_=Array(D),E=0;E>>0)+"_",he=0;return K}),a("Symbol.iterator",function(N){if(N)return N;N=Symbol("Symbol.iterator");for(var K="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),te=0;te0&&r>0){var l=u.left/i,s=u.top/r,b=u.right/i,T=u.bottom/r;a=new Float32Array([b,s,l,s,b,T,l,T])}else a=new Float32Array([1,0,0,0,1,1,0,1]);var C=this.texturePosBuffer;n.bindBuffer(n.ARRAY_BUFFER,C),n.bufferSubData(n.ARRAY_BUFFER,0,a),n.bindBuffer(n.ARRAY_BUFFER,null)},f.prototype.SR_Destroy=function(){var u=this.contextGL,n=this.YUVProgram;u.deleteProgram(n);var i=this.vertexPosBuffer,r=this.texturePosBuffer;u.deleteBuffer(i),u.deleteBuffer(r);var a=this.yTextureRef,l=this.uTextureRef,s=this.vTextureRef;u.deleteTexture(a),u.deleteTexture(l),u.deleteTexture(s)},f});var fa="https://open.ys7.com",Os="".concat(fa,"/console/ezuikit_static/v66/v2"),Us="".concat(fa,"/console/ezuikit_static/v66/v1"),ha=function(u,n){var i=["theme","standard"],r=["pcLive","pcRec","mobileLive","mobileRec","noData","security","voice","simple"];if(typeof u=="undefined")return n.themeData?{templateType:"themeData",templateId:"themeData"}:{templateType:"local",templateId:""};if(typeof u=="string"){if(u.length===32)return{templateType:"remote",templateId:u};if(i.indexOf(u)!==-1)return u==="simple"&&typeof n.header=="undefined"&&typeof n.footer=="undefined"?{templateType:"local",templateId:""}:{templateType:"iframe",templateId:u};if(r.indexOf(u)!==-1)return{templateType:"local",templateId:u}}},lt=function(){var u=window.navigator.userAgent.toLowerCase(),n={sa:/version.*safari/.test(u),ch:/chrome/.test(u),ff:/gecko/.test(u)&&!/webkit/.test(u)},i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);if(i)return!1;if(n.ch){var r=function(){for(var l=window.navigator.userAgent.split(" "),s="",b=0;b91&&!!window.SharedArrayBuffer}return!1},Hs=function(){function f(u){var n=this;fe(this,f),this.isStoping=!1;var i=u.autoplay,r=i===void 0?!0:i;if((u.template||u.themeData)&&(r=!1),this.params=u,this.autoplay=r,window.EZUIKit[u.id]={state:{EZUIKitPlayer:{init:window.EZUIKit[u.id]&&window.EZUIKit[u.id].state&&window.EZUIKit[u.id].state.EZUIKitPlayer.init||!1,themeInit:window.EZUIKit[u.id]&&window.EZUIKit[u.id].state&&window.EZUIKit[u.id].state.EZUIKitPlayer.themeInit||!1,talkInit:window.EZUIKit[u.id]&&window.EZUIKit[u.id].state&&window.EZUIKit[u.id].state.EZUIKitPlayer.talkInit||!1}}},ha(this.params.template,u).templateType!=="iframe"){this.Monitor=new Ds({env:typeof u.disableMonitor!="undefined"&&u.disableMonitor?"test12":"online"},this),this.id=u.id,this.width=u.width,this.height=u.height,this.url=u.url,this.accessToken=u.accessToken,this.themeId=ha(u.template,u).templateId,this.id=u.id,this.audio=!0,this.poster=u.poster,this.speed=1,this.disabledTimeLine=!1,this.disabledPTZ=!1,this.enableSharedArrayBufferGuide=!1,this.capacity={},this.playTimer=null,this.env={domain:"https://open.ys7.com"};var a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);this.isMobile=a,document.getElementById("".concat(this.id,"-wrap"))&&(document.getElementById("".concat(this.id,"-wrap")).innerHTML="",document.getElementById("".concat(this.id,"-wrap")).id=this.id),this.staticPath=lt()?Os:Us,typeof u.staticPath=="string"&&(u.staticPath.startsWith("http")?this.staticPath=u.staticPath:this.staticPath=window.location.protocol+"//"+window.location.host+u.staticPath,lt()?this.staticPath+="/v2":this.staticPath+="/v1"),typeof u.audio!="undefined"&&(this.audio=u.audio),typeof u.env!="undefined"&&(this.env=Object.assign(this.env,u.env)),typeof u.isMobile!="undefined"&&(this.isMobile=u.isMobile),typeof u.disabledTimeLine!="undefined"&&(this.disabledTimeLine=u.disabledTimeLine),typeof u.disabledPTZ!="undefined"&&(this.disabledPTZ=u.disabledPTZ),typeof u.enableSharedArrayBufferGuide!="undefined"&&(this.enableSharedArrayBufferGuide=u.enableSharedArrayBufferGuide);var l="".concat(this.staticPath,"/js/jsPluginV1-1.0.0.min.js"),s=function(){if(window.addPluginUrlIng=!0,lt())console.log("启用多线程解析视频"),l="".concat(n.staticPath,"/js/jsPluginV2-2.0.1.min.js");else{var C=function(){for(var w=navigator.userAgent.split(" "),z="",S=0;S0&&(l=T.width),!n.height&&T.height>0&&(b=T.height)}if(!document.getElementById("".concat(r,"-wrap"))){var C=document.createElement("div");C.id="".concat(r,"-wrap"),C.style="display:inline-block;width:".concat(l,"px;position:relative;vertical-align: bottom;"),document.getElementById(r).parentNode.insertBefore(C,document.getElementById(r)),document.getElementById(r).parentNode.removeChild(document.getElementById(r)),C.innerHTML="
"),document.getElementById(r).style="display:inline-block;width:".concat(l,"px;height:").concat(b,"px;"),document.getElementById(r).style.verticalAlign="top"}this.themeId&&(this.Theme=new As(this,n.id),window.EZUIKit[n.id].state.EZUIKitPlayer.themeInit=!0,this.Monitor.dclog({url:this.url,action:2,text:this.themeId}),typeof this.params.handleThemeChange=="function"&&(this.handleThemeChange=this.params.handleThemeChange));var y=new ts(this,r);this.Message=y;var h=function(E,w){var z;if(lt()){z=new window.JSPluginV2({szId:r,iType:2,iWidth:l,iHeight:b,iMaxSplit:1,iCurrentSplit:1,szBasePath:"",staticPath:i.staticPath,oStyle:{border:"none",background:"#000000"}}),i.pluginStatus.loadingStart(r),i.pluginStatus.loadingSetText({text:"初始化播放器完成"}),z.EventCallback={pluginErrorHandler:function(m,g,k){if(console.log(m,g,k),g===1003)console.log("断流"),i.Theme.setDecoderState({play:!1}),i.pluginStatus.setPlayStatus({play:!1}),z.bPlay||(i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:"连接断开,请重试",color:"red"})),typeof i.params.handleError=="function"&&i.params.handleError({msg:"连接断开,请重试",retcode:1003,id:i.params.id,type:"handleError"});else if(k.errorCode!=1){var A=i.errorHander.matchErrorInfo(k.errorCode),O="连接断开,请重试";A&&A.msg?O=A.msg:A&&A.description&&(O=A.description),i.Theme.setDecoderState({play:!1}),i.pluginStatus.setPlayStatus({play:!1}),i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:O,color:"red"})}else i.pluginStatus.loadingClear(),i.Theme&&i.Theme.setDisabled(!1)},openStreamCallback:function(){console.log("开启取流"),i.openStreamTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:224,d:i.openStreamTime-i.gotWsUrlTime,text:"openStream",isVersion2Available:lt()?1:0})},getStreamHeaderCallback:function(){console.log("完成取流返回流头"),i.getStreamHeaderTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:225,d:i.getStreamHeaderTime-i.openStreamTime,text:"getStreamHeader",isVersion2Available:lt()?1:0})},getVideoStreamCallback:function(){console.log("返回视频流(首次)"),i.getVideoStreamTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:226,d:i.getVideoStreamTime-i.getStreamHeaderTime,text:"getVideoStream",isVersion2Available:lt()?1:0})},appearFirstFrameCallback:function(){console.log("出现首帧画面(播放成功)"),i.appearFirstFrameTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:227,d:i.appearFirstFrameTime-i.getStreamHeaderTime,text:"appearFirstFrame",isVersion2Available:lt()?1:0})},averageStreamSuccessCallback:function(){console.log("平均成功取流的出流耗时"),i.averageStreamSuccessTime=i.initSuccessTime-i.initTime+(i.gotWsUrlTime-i.startGetWsUrlTime)+(i.appearFirstFrameTime-i.openStreamTime),i.Monitor.dclog({url:i.url,action:228,d:i.averageStreamSuccessTime,text:"averageStreamSuccess",isVersion2Available:lt()?1:0})}},i.env={domain:"https://open.ys7.com"},typeof n.env!="undefined"&&(i.env=Object.assign(i.env,n.env)),typeof n.handleTalkSuccess!="undefined"&&(i.handleTalkSuccess=n.handleTalkSuccess),typeof n.handleTalkError!="undefined"&&(i.handleTalkError=n.handleTalkError),i.errorHander=new Xo,i.jSPlugin=z;var S=setInterval(function(){window.JSPlayerModuleLoaded&&(clearInterval(S),typeof i.params.handleInitSuccess=="function"&&i.params.handleInitSuccess({retcode:0,id:i.params.id,type:"handleInitSuccess"}),E({meta:{retcode:200,msg:"初始化成功"}}),n.url.indexOf("rec")!=-1&&i.Theme.changeTheme(i.isMobile?"mobileRec":"pcRec"))},50)}else z=new window.JSPluginV1({szId:r,iType:2,iWidth:l,iHeight:b,iMaxSplit:1,iCurrentSplit:1,szBasePath:"",staticPath:i.staticPath,oStyle:{border:"none",background:"#000000"}}),i.pluginStatus.loadingStart(r),i.pluginStatus.loadingSetText({text:"初始化播放器完成"}),z.EventCallback={openStreamCallback:function(){console.log("开启取流---v1"),i.openStreamTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:224,d:i.openStreamTime-i.gotWsUrlTime,text:"openStream",isVersion2Available:lt()?1:0})},getStreamHeaderCallback:function(){console.log("完成取流返回流头"),i.getStreamHeaderTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:225,d:i.getStreamHeaderTime-i.openStreamTime,text:"getStreamHeader",isVersion2Available:lt()?1:0})},getVideoStreamCallback:function(){console.log("返回视频流(首次)"),i.getVideoStreamTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:226,d:i.getVideoStreamTime-i.getStreamHeaderTime,text:"getVideoStream",isVersion2Available:lt()?1:0})},appearFirstFrameCallback:function(){console.log("出现首帧画面(播放成功)"),i.appearFirstFrameTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:227,d:i.appearFirstFrameTime-i.getStreamHeaderTime,text:"appearFirstFrame",isVersion2Available:lt()?1:0})},averageStreamSuccessCallback:function(){console.log("平均成功取流的出流耗时"),i.averageStreamSuccessTime=i.initSuccessTime-i.initTime+(i.gotWsUrlTime-i.startGetWsUrlTime)+(i.appearFirstFrameTime-i.openStreamTime),i.Monitor.dclog({url:i.url,action:228,d:i.averageStreamSuccessTime,text:"averageStreamSuccess",isVersion2Available:lt()?1:0})},loadEventHandler:function(){},zoomEventResponse:function(){},windowEventSelect:function(m){},pluginErrorHandler:function(m,g,k){if(console.log(m,g,k),g===1003)console.log("断流"),i.Theme.setDecoderState({play:!1}),i.pluginStatus.setPlayStatus({play:!1}),z.bPlay||(i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:"连接断开,请重试",color:"red"})),typeof i.params.handleError=="function"&&i.params.handleError({msg:"连接断开,请重试",retcode:1003,id:i.params.id,type:"handleError"});else if(k.errorCode!=1){var A=i.errorHander.matchErrorInfo(k.errorCode),O="连接断开,请重试";A&&A.msg?O=A.msg:A&&A.description&&(O=A.description),i.Theme.setDecoderState({play:!1}),i.pluginStatus.setPlayStatus({play:!1}),i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:O,color:"red"})}else i.pluginStatus.loadingClear(),i.Theme&&i.Theme.setDisabled(!1)},windowEventOver:function(m){},windowEventOut:function(m){},windowEventUp:function(m){},windowFullCcreenChange:function(m){},firstFrameDisplay:function(m,g,k){console.log(g,k),z.JS_SetCanFullScreen(!1)},performanceLack:function(){},mouseEvent:function(m,g,k){}},i.env={domain:"https://open.ys7.com"},typeof n.env!="undefined"&&(i.env=Object.assign(i.env,n.env)),typeof n.handleTalkSuccess!="undefined"&&(i.handleTalkSuccess=n.handleTalkSuccess),typeof n.handleTalkError!="undefined"&&(i.handleTalkError=n.handleTalkError),i.errorHander=new Xo,i.jSPlugin=z,typeof i.params.handleInitSuccess=="function"&&i.params.handleInitSuccess({retcode:0,id:i.params.id,type:"handleInitSuccess"}),E({meta:{retcode:200,msg:"初始化成功"}}),n.url.indexOf("rec")!=-1&&i.Theme.changeTheme(i.isMobile?"mobileRec":"pcRec")},D=new Promise(h);return D}},{key:"_getRealUrlPromise",value:function(n,i){var r=this;console.log("获取播放地址 url => ".concat(i," ").concat(this.accessToken)),console.log("开始获取wsurl"),this.startGetWsUrlTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:222,text:"startGetWsUrl",isVersion2Available:lt()?1:0});var a=this.env.domain;this.env&&(a=this.env.domain);var l=function(C,y){var h="",D=a+"/api/lapp/live/url/ezopen",_=new FormData;_.append("ezopen",i),_.append("isFlv",!1),_.append("userAgent",window.navigator.userAgent),_.append("isHttp",!1),_.append("accessToken",n),fetch(D,{method:"POST",body:_}).then(function(E){return E.json()}).then(function(E){if(E.code==200||E.retcode==0){var w="",z="";E.ext&&E.ext.token?(h+=E.data,z=E.ext.token,w=E.data):E.data&&E.data.token&&(h+=E.data.url,z=E.data.token,w=E.data.url);var S=i.indexOf("live")!==-1?"live":"playback";S==="live"?h=h+"&ssn="+z+"&auth=1&biz=4&cln=100":h=h+"&ssn="+z+"&auth=1&cln=100",console.log(h);var d=et("checkCode",h);if(d&&(typeof r.jSPlugin.decoderVersion!="undefined"&&r.jSPlugin.decoderVersion==="2.0"?r.validateCode=d:(console.log("设置密钥",d),r.jSPlugin.JS_SetSecretKey(0,d))),h.indexOf("playback")!==-1){var m=et("begin",w)||et("begin",i),g=et("end",w)||et("end",i);if(m)h=h.replace("&begin="+et("begin",w),"&begin="+s(m,"000000")),et("begin",h)||(h+="&begin="+s(m,"000000"));else{var k=new Date;h=h+"&begin="+k.Format("yyyyMMdd")+"T000000Z"}if(g?(h=h.replace("&end="+et("end",w),"&end="+s(g,"235959")),et("end",h)||(h+="&end="+s(g,"235959"))):h=h+"&end="+s(et("begin",h).substr(0,8),"235959"),et("stream",w)||(h=h.replace("stream","&stream")),i.indexOf(".cloud")!==-1){var A=function(Ce){if(Ce.code==200){var be=[];if(Ce.data&&Ce.data.files&&Ce.data.files.length>0){var Pe=Ce.data.files,Ye=new Date().getTime(),N=Ce.data.isAll;if(N){be=ce(Pe);var K=JSON.stringify(be).replace("\\","");h+="&recSlice="+K.replace("\\","")+"&r="+Math.random(),C(h)}else{var te=function he(){function Re(we){if(we.data&&we.data.files&&we.data.files.length>0)if(we.data.isAll==!1)we.data.files&&(Pe=Pe.concat(we.data.files)),Ye=we.data.nextFileTime>0?we.data.nextFileTime:new Date().getTime(),he();else{be=ce(Pe);var ke=JSON.stringify(be).replace("\\","");h+="&recSlice="+ke.replace("\\","")+"&r="+Math.random(),C(h)}else{be=ce(Pe);var ke=JSON.stringify(be).replace("\\","");h+="&recSlice="+ke.replace("\\","")+"&r="+Math.random(),C(h)}}Y.startTime=Ye,Gn(ne,"POST",Y,"",Re)};te()}}else y({retcode:-1,msg:"未找到录像片段"})}else y({retcode:-1,msg:"未找到录像片段"});function ce(he){var Re=[];return he.forEach(function(we,ke){Re.length==0||we.downloadPath!==Re[Re.length-1].downloadPath?Re.push({downloadPath:we.downloadPath,ownerId:we.ownerId,iStorageVersion:we.iStorageVersion,videoType:we.videoType,iPlaySpeed:0,startTime:we.startTime,endTime:we.endTime}):Re[Re.length-1].endTime=we.endTime}),Re}},O=b(et("begin",h)),H=b(et("end",h)),Z=et("serial",h),X=et("chn",h),ne=a+"/api/lapp/video/by/time",Y={accessToken:r.accessToken,recType:1,deviceSerial:Z,channelNo:X,startTime:O,endTime:H,version:"2.0"};Gn(ne,"POST",Y,"",A)}else if(i.indexOf("alarmId")!==-1){var me=function(te){if(te.code==200){var ce=[];if(te.data){ce=Re([te.data]);var he=JSON.stringify(ce).replace("\\","");h+="&recSlice="+he.replace("\\",""),console.log("realUrl",h,te.data.recType),te.data.recType==1?h=h.replace("/playback","/cloudplayback"):h=h.replace("/cloudplayback","/playback"),C(h)}}function Re(we){var ke=[];return we.forEach(function(We,yn){ke.length==0||We.downloadPath!==ke[ke.length-1].downloadPath?ke.push({downloadPath:We.downloadPath,ownerId:We.ownerId,iStorageVersion:We.iStorageVersion,videoType:We.videoType,iPlaySpeed:0,startTime:We.startTime,endTime:We.endTime}):ke[ke.length-1].endTime=We.endTime}),console.log("downloadPathArr",ke),ke}};console.log("进入alarmId回放");var ge=et("alarmId",h),O=b(et("begin",h)),H=b(et("end",h)),Z=et("serial",h),X=et("chn",h),ne=a+"/api/lapp/video/by/id",Y={accessToken:r.accessToken,deviceSerial:Z,channelNo:X,alarmId:ge};Gn(ne,"POST",Y,"",me)}else C(h)}else C(h)}else r.Theme&&r.Theme.setDisabled(!0),r.pluginStatus.loadingClear(),r.pluginStatus.loadingSetText({text:E.msg,color:"red"}),typeof r.params.handleError=="function"&&r.params.handleError({retcode:E.code,msg:E.msg,id:r.params.id,type:"handleError"}),y(E)})};return new Promise(function(T,C){return l(T,C)});function s(T,C){var y=/^[0-9]{8}T[0-9]{6}Z$/;if(y.test(T))return T;if(/[0-9]{8,14}/.test(T)){var h=6-(14-T.length),D=C.length,_=T+C.substring(h,D);return _.slice(0,8)+"T"+_.slice(8)+"Z"}throw new Error("回放时间格式有误,请确认")}function b(T){var C=T.slice(0,4),y=T.slice(4,6),h=T.slice(6,8),D=T.slice(9,11),_=T.slice(11,13),E=T.slice(13,15),w=C+"-"+y+"-"+h+" "+D+":"+_+":"+E;return new Date(w.replace(/-/g,"/")).getTime()}}},{key:"_pluginPlay",value:function(n,i,r){var a=this;if(console.log("执行播放 _pluginPlay",n),!n)return!1;function l(C){var y=C.split("?")[0].replace("/live","").replace("/playback",""),h=(C.indexOf("/live")===-1?C.indexOf("cloudplayback")!==-1?"/cloudplayback?":"/playback?":"/live?")+C.split("?")[1];return h.indexOf("/playback")!==-1&&(h=h.replace("stream=2","stream=1")),{websocketConnectUrl:y,websocketStreamingParam:h}}var s=l(n).websocketConnectUrl;this.env&&this.env.wsUrl&&(s=this.env.wsUrl),this.gotWsUrlTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:223,d:this.gotWsUrlTime-this.startGetWsUrlTime,text:"getWsUrlSuccess",isVersion2Available:lt()?1:0});var b={playURL:l(n).websocketStreamingParam};console.log("播放前 stop 阶段 结束"),this.isStoping=!1;var T=Date.now();console.log("执行播放 ... this.jSPlugin.JS_Play at ",T),this.jSPlugin.JS_Play(s,b,0).then(function(){if(console.log("执行播放 ... this.jSPlugin.JS_Play 播放成功",s,b),console.log("执行播放耗时 ",Date.now()-T),a.isStoping){console.log("现在在播放前 stop 阶段,此次应为无效播放成功触发。不执行后续回调, 此次耗时无效");return}if(a.validateCode&&typeof a.jSPlugin.decoderVersion!="undefined"&&a.jSPlugin.decoderVersion==="2.0"&&a.jSPlugin.JS_SetSecretKey(0,a.validateCode),a.pluginStatus.loadingClear(),a.pluginStatus.setPlayStatus({play:!0,loading:!1}),a.Theme){a.Theme.setDecoderState({play:!0});var C=Ut.findIndex(a.Theme.themeData.footer.btnList,function(y){return y.iconId==="sound"&&y.isrender===1&&y.defaultActive===1})>-1;a.audio=C}a.audio&&setTimeout(function(){a.openSound()},500),typeof a.params.handleSuccess=="function"&&a.params.handleSuccess({retcode:0,id:a.params.id,type:"handleSuccess"}),i(b),a.Monitor.dclog({url:a.url,action:211,d:new Date().getTime()-a.playStartTime,text:"startPlaySuccess"}),a.Monitor.playLog({Enc:a.url.indexOf("@")===-1?0:1,PlTp:a.url.indexOf("back")===-1?1:2,Via:2,ErrCd:0,Cost:new Date().getTime()-a.playStartTime,Serial:Ke(a.url).deviceSerial,Channel:Ke(a.url).channelNo,Ver:lt()?"v7.0.0":"v6.0.0"})},function(C){console.log("err",C);var y="播放失败,请检查设备及客户端网络",h=-1;if(a.jSPlugin.bPlay)return!1;if(C&&C.errorCode){var D=a.errorHander.matchErrorInfo(C.errorCode);a.Theme&&a.Theme.setDisabled(!0),D&&D.msg?y=D.msg:D&&D.description?y=D.description:y="播放失败,请检查设备及客户端网络",h=C.errorCode}a.pluginStatus.loadingClear(),a.pluginStatus.loadingSetText({text:y,color:"red"}),typeof a.params.handleError=="function"&&a.params.handleError({retcode:h,msg:y,id:a.params.id,type:"handleError"}),r(),a.Monitor.dclog({url:a.url,action:411,d:new Date().getTime()-a.playStartTime,text:"startPlayError"}),a.Monitor.playLog({Enc:a.url.indexOf("@")===-1?0:1,PlTp:a.url.indexOf("back")===-1?1:2,Via:2,ErrCd:h,Cost:-1,Serial:Ke(a.url).deviceSerial,Channel:Ke(a.url).channelNo,Ver:lt()?"v7.0.0":"v6.0.0"})})}},{key:"_play",value:function(n){var i=this;console.log("执行播放 play options.url =>",n),this.pluginStatus.setPlayStatus({play:!1,loading:!0}),this.playStartTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:1,d:new Date().getTime()-this.initTime,text:"startPlay"}),n&&(typeof n=="string"&&(this.url=n),typeof n.url=="string"&&(this.url=n.url),typeof n.accessToken=="string"&&(this.accessToken=n.accessToken),this.Theme&&(typeof n.url=="string"||typeof n.accessToken=="string")&&this.Theme.getDeviceInfo());var r=new Promise(function(a,l){console.log("执行 播放前 stop"),i.isStoping=!0,i.jSPlugin.JS_Stop(0).then(function(){console.log("播放前 stop 执行成功 this.url => ".concat(i.url," ").concat(i.accessToken)),i._getRealUrlPromise(i.accessToken,i.url).then(function(s){i._pluginPlay(s,function(b){a(!0)},function(){return l(!1)})}).catch(function(s){var b=s.msg?s.msg:"播放失败,请检查设备及客户端网络";i.Theme&&i.Theme.setDisabled(!0),i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:b,color:"red"}),typeof i.params.handleError=="function"&&i.params.handleError({retcode:s.oError?s.oError.errorCode:-1,msg:b,id:i.params.id,type:"handleError"}),l({retcode:s.oError?s.oError.errorCode:-1,msg:b,id:i.params.id,type:"handleError"})})})});return r}},{key:"stop",value:function(){var n=this;return this.pluginStatus.setPlayStatus({loading:!0}),this.reSetTheme(),this.jSPlugin.JS_Stop(0).then(function(){console.log("停止成功"),n.pluginStatus.setPlayStatus({play:!1,loading:!1}),n.Theme&&n.Theme.setDecoderState({play:!1})})}},{key:"changeVideoLevel",value:function(n){var i=this,r=this.url,a=n?r.replace(".live",".hd.live"):r.replace(".hd.live",".live");this.jSPlugin.playURL=n?this.jSPlugin.playURL.replace("stream=2","stream=1"):this.jSPlugin.playURL.replace("stream=1","stream=2"),console.log("changeVideoLevel",a,this.jSPlugin.playURL),this.url=a;var l=new Promise(function(s,b){i.pause().then(function(){console.log("暂停成功"),i.resume().then(function(T){console.log("恢复成功")})}).catch(function(){console.log("暂停失败"),i.resume().then(function(T){console.log("恢复成功")})})});return l}},{key:"reSetTheme",value:function(){this.Theme&&this.Theme.Ptz&&(this.Theme.setDecoderState({pantile:!1}),this.Theme.Ptz.hide()),this.Theme&&this.Theme.decoderState.state.recordvideo&&this.Theme.setDecoderState({recordvideo:!1}),this.Theme&&this.Theme.decoderState.state.zoom&&(this.Zoom.stopZoom(),this.Theme.setDecoderState({zoom:!1})),this.Theme&&this.Theme.decoderState.state.talk&&(this.stopTalk(),this.Theme.setDecoderState({talk:!1})),this.Theme&&this.Theme.Rec&&!this.Theme.isMobile&&this.Theme.Rec.datepickerHide(),this.Theme&&this.Theme.Rec&&(this.Theme.changeRecSpeed(1),this.Theme.nextRate=1,this.speed=1,this.Theme.setDecoderState({speed:!1}))}},{key:"_changePlayUrl",value:function(n){var i=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};console.log("_changePlayUrl"),console.log(n),this.reSetTheme(),this.getDeviceCapacity({accessToken:n.accessToken,deviceSerial:n.deviceSerial});var a=this.url,l=b(a,n);n.accessToken&&(this.accessToken=n.accessToken),this.url=l,r(),this.pluginStatus.loadingStart(this.id),this.pluginStatus.loadingSetText({text:"加载中,请稍后"});var s=new Promise(function(T,C){var y={url:l};return n.accessToken&&(y.accessToken=n.accessToken),console.log("切换播放地址 参数 ",y),i.play(y).then(function(){console.log("切换播放地址 play 执行成功 ",i.url,i.accessToken),i.Theme&&i.Theme.decoderState.state.webExpend&&i.Theme.webExpend(),i.Theme&&i.Theme.decoderState.state.expend&&i.Theme.expend(),n.type?n.type=="rec"||n.type=="cloud.rec"?i.Theme.changeTheme(i.isMobile?"mobileRec":"pcRec"):i.Theme.changeTheme(i.isMobile?"mobileLive":"pcLive"):i.url.indexOf(".rec")>-1?i.Theme.changeTheme(i.isMobile?"mobileRec":"pcRec"):i.Theme.changeTheme(i.isMobile?"mobileLive":"pcLive"),n&&n.begin&&n.deviceSerial&&i.Theme.Rec.setDatepickerDate(n.begin),i.Theme.setDisabled(!1),T(l)}).catch(function(h){C(l),h&&h.msg&&(i.Theme&&i.Theme.setDisabled(!0),i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:h.msg,color:"red"}))})});function b(T,C){if(C.url)return C.url;console.log("--------------matchInitUrl",T);var y=T.split("/")[4].split(".")[T.split("/")[4].split(".").length-1].split("?")[0];y==="rec"&&T.indexOf(".cloud.rec")!==-1&&(y="cloud.rec"),C.type&&(y=C.type);var h=T.split("/")[3];C.deviceSerial&&(h=C.deviceSerial);var D=T.split("/")[4].split(".")[0];C.channelNo&&(D=C.channelNo);var _=T.split("/")[2].split("@").length===2?T.split("/")[2].split("@")[0]:"";typeof C.validCode!="undefined"&&(_=C.validCode);var E=typeof C.hd=="undefined"?T.indexOf(".hd")!==-1:C.hd,w="ezopen://".concat(_?"".concat(_,"@"):"","open.ys7.com/").concat(h,"/").concat(D).concat(E?".hd":"",".").concat(y);return y==="live"||(w="ezopen://".concat(_?"".concat(_,"@"):"","open.ys7.com/").concat(h,"/").concat(D,".").concat(y),C.begin&&C.end?w+="?begin=".concat(C.begin,"&end=").concat(C.end):C.begin?w+="?begin=".concat(C.begin):et("begin",T)&&(w+="?begin=".concat(et("begin",T)))),w}return s}},{key:"getOSDTime",value:function(){var n=this,i=new Promise(function(r,a){n.jSPlugin.JS_GetOSDTime(0).then(function(l){r({code:0,retcode:0,data:l}),typeof n.params.getOSDTimeCallBack=="function"&&n.params.getOSDTimeCallBack({id:n.id,type:"getOSDTime",code:0,data:l})}).catch(function(l){a({code:-1,retcode:-1,data:l}),typeof n.params.getOSDTimeCallBack=="function"&&n.params.getOSDTimeCallBack({id:n.id,type:"getOSDTime",code:-1,data:-1})})});return i}},{key:"capturePicture",value:function(n){var i=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.jSPlugin.JS_CapturePicture(0,n,"JPEG",r,!!r);return ln(a)?(typeof this.params.capturePictureCallBack=="function"&&a.then(function(){i.params.capturePictureCallBack({id:i.id,type:"capturePicture",code:0})}).catch(function(){i.params.capturePictureCallBack({id:i.id,type:"capturePicture",code:-1})}),a):new Promise(function(l){l(a)})}},{key:"startSave",value:function(n){var i=this,r=this.jSPlugin.JS_StartSave(0,n);return ln(r)?(typeof this.params.startSaveCallBack=="function"&&r.then(function(){i.params.startSaveCallBack({id:i.id,type:"startSave",code:0})}).catch(function(){i.params.startSaveCallBack({id:i.id,type:"startSave",code:-1})}),r):(this.Theme&&this.Theme.setDecoderState({recordvideo:!0}),new Promise(function(a){a(r)}))}},{key:"stopSave",value:function(){var n=this,i=this.jSPlugin.JS_StopSave(0);return ln(i)?(typeof this.params.startSaveCallBack=="function"&&i.then(function(){n.params.stopSaveCallBack({id:n.id,type:"stopSave",code:0})}).catch(function(){n.params.stopSaveCallBack({id:n.id,type:"stopSave",code:-1})}),i):(this.Theme&&this.Theme.setDecoderState({recordvideo:!1}),new Promise(function(r){r(i)}))}},{key:"openSound",value:function(){var n=this.jSPlugin.JS_OpenSound(0);return console.log("打开声音",n),ln(n)?n:(this.Theme&&this.Theme.setDecoderState({sound:!0}),typeof this.params.openSoundCallBack=="function"&&this.params.openSoundCallBack({id:this.id,type:"openSound",code:n}),new Promise(function(i){i(n)}))}},{key:"closeSound",value:function(){var n=this.jSPlugin.JS_CloseSound(0);return ln(n)?n:(this.Theme&&this.Theme.setDecoderState({sound:!1}),typeof this.params.closeSoundCallBack=="function"&&this.params.closeSoundCallBack({id:this.id,type:"closeSound",code:n}),new Promise(function(i){i(n)}))}},{key:"enableZoom",value:function(){var n=this.jSPlugin.JS_EnableZoom(0);return ln(n)?n:new Promise(function(i){i(n)})}},{key:"closeZoom",value:function(){var n=this.jSPlugin.JS_DisableZoom(0);return ln(n)?n:new Promise(function(i){i(n)})}},{key:"setPoster",value:function(n){lt()?document.getElementById("".concat(this.id))&&(document.getElementById("".concat(this.id)).style.backgroundImage="url(".concat(n,")"),document.getElementById("".concat(this.id)).style.backgroundSize="100% 100%"):document.getElementById("".concat(this.id,"canvas0"))&&(document.getElementById("".concat(this.id,"canvas0")).style.backgroundImage="url(".concat(n,")"),document.getElementById("".concat(this.id,"canvas0")).style.backgroundSize="cover")}},{key:"reSize",value:function(n,i){var r=0,a=0;if(this.params.height=i,this.params.width=n,this.Theme&&this.Theme.isNeedRenderHeader&&document.getElementById("".concat(this.id,"-headControl"))&&(r=parseInt(document.getElementById("".concat(this.id,"-headControl")).style.height,10)),this.Theme&&this.Theme.isNeedRenderTimeLine&&!this.isMobile&&(a=48),i=i-r-a,this.width=n,this.height=i,document.getElementById("".concat(this.id,"-wrap")).style="width:".concat(n,"px;position:relative;display:inline-block;vertical-align: bottom;"),document.getElementById("".concat(this.id)).style.width=n+"px",document.getElementById("".concat(this.id)).style.height=i+"px",this.jSPlugin&&this.jSPlugin.bPlay)this.jSPlugin&&(this.jSPlugin.iHeight=i,this.jSPlugin.iWidth=n),this.jSPlugin.JS_Resize(n,i);else{document.getElementById("".concat(this.id,"-player"))&&(document.getElementById("".concat(this.id,"-player")).width=n,document.getElementById("".concat(this.id,"-player")).height=i,document.getElementById("".concat(this.id,"-player")).style.width=n+"px",document.getElementById("".concat(this.id,"-player")).style.height=i+"px");var l=1;if(document.getElementById("".concat(this.id,"canvas0"))){var s=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);s&&(l=2),document.getElementById("".concat(this.id,"canvas0")).style.width=n*l+"px",document.getElementById("".concat(this.id,"canvas0")).style.height=i*l+"px",document.getElementById("".concat(this.id,"canvas0")).width=n*l,document.getElementById("".concat(this.id,"canvas0")).height=i*l,document.getElementById("".concat(this.id,"canvas0")).parentNode.style.width=n*l+"px",document.getElementById("".concat(this.id,"canvas0")).parentNode.style.height=i*l+"px",document.getElementById("".concat(this.id,"canvas_draw0")).height=i*l}this.jSPlugin&&(this.jSPlugin.iHeight=i*l,this.jSPlugin.iWidth=n*l)}}},{key:"fast",value:function(n){var i=this,r=this.speed;if(n)var a=this.jSPlugin.JS_Fast(0,n);else{if(r===1)r=2;else if(r===2)r=4;else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"播放速度最大为4倍速度",retcode:1003,id:this.id,type:"handleError"}),new Promise(function(s,b){i.speed=r,b({code:-1,data:{speed:r,result:"播放速度最大为4倍速度"}})});var a=this.jSPlugin.JS_Fast(0)}return new Promise(function(l){i.speed=r,l({code:0,data:{speed:r,result:a}})})}},{key:"slow",value:function(){var n=this,i=this.speed;if(i===4)i=2;else if(i===2)i=1;else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"播放速度最小为1倍速度",retcode:1003,id:this.id,type:"handleError"}),new Promise(function(a,l){n.speed=i,l({code:-1,data:{speed:i,result:"播放速度最小为1倍速度"}})});var r=this.jSPlugin.JS_Slow(0);return new Promise(function(a){n.speed=i,a({code:0,data:{speed:i,result:r}})})}},{key:"seek",value:function(n,i){var r=this.url,a=(et("begin",r)||new Date().Format("yyyyMMdd")).substr(0,8);if(i=l(a,"235959"),n.length===6)n=l(a,n);else if(n.length===16){if(n.substr(0,8)!==a)return typeof this.params.handleError=="function"&&this.params.handleError({msg:"seek时间不能跨日期",retcode:-1,id:this.id,type:"handleError"}),!1}else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"seek时间格式错误",retcode:-1,id:this.id,type:"handleError"}),!1;function l(b,T){var C=/^[0-9]{8}T[0-9]{6}Z$/;if(C.test(b))return b;if(/[0-9]{8,14}/.test(b)){var y=6-(14-b.length),h=T.length,D=b+T.substring(y,h);return D.slice(0,8)+"T"+D.slice(8)+"Z"}throw new Error("回放时间格式有误,请确认")}var s=this.jSPlugin.JS_Seek(0,n,i);return console.log("seekRT",s),ln(s)?s:new Promise(function(b){b(s)})}},{key:"fullScreen",value:function(){var n=this,i=yi(document.getElementById("".concat(this.id)));i.then(function(a){console.log("全屏promise",window.screen.availWidth),n.jSPlugin.JS_Resize(window.screen.availWidth,window.screen.availHeight),typeof n.params.fullScreenCallBack=="function"&&n.params.fullScreenCallBack({id:n.id,type:"fullScreen",code:0})});var r=function(){var l=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;l||n.jSPlugin.JS_Resize(n.width,n.height),typeof n.params.fullScreenChangeCallBack=="function"&&n.params.fullScreenChangeCallBack({id:n.id,type:"fullScreen",code:l})};["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(a){window.addEventListener(a,function(l){return r()})})}},{key:"cancelFullScreen",value:function(){var n=this,i=Nr();i.then(function(r){console.log("取消全屏",r,n.jSPlugin),n.jSPlugin.JS_Resize(n.width,n.height)})}},{key:"startTalk",value:function(){this.Talk.startTalk()}},{key:"stopTalk",value:function(){this.Talk.stopTalk()}},{key:"destroy",value:function(){var n=this.jSPlugin.JS_DestroyWorker(0);return this.Theme&&(this.Theme=null,window.EZUIKit[this.params.id].state.EZUIKitPlayer.themeInit=!1),ln(n)?n:new Promise(function(i){i(n)})}},{key:"getDeviceCapacity",value:function(n){var i=this,r=this.env.domain;this.env&&(r=this.env.domain);var a=r+"/api/lapp/device/capacity",l=function(T){T.code==200&&T.data&&(i.capacity=T.data)},s=n||{accessToken:this.accessToken,deviceSerial:Ke(this.url).deviceSerial};Gn(a,"POST",s,"",l)}},{key:"pause",value:function(){var n=this;return new Promise(function(i,r){n.jSPlugin.JS_CloseSound(0),n.jSPlugin.JS_Pause(0,function(a){n.setPoster(a.base64)}).then(function(a){n.Theme&&n.Theme.setDecoderState({play:!1}),i()}).catch(function(a){console.log(a),r(a)})})}},{key:"_resume",value:function(n){var i=this;return new Promise(function(r,a){i.pluginStatus.setPlayStatus({play:!1,loading:!0}),i.jSPlugin.JS_Resume(n).then(function(l){if(setTimeout(function(){i.url.indexOf(".rec")!==-1&&i.speed!=1&&i.jSPlugin.JS_Speed(i.speed)},500),i.Theme){i.Theme.setDecoderState({play:!0,speed:i.speed});var s=i.Theme.decoderState.state.sound;s&&setTimeout(function(){i.openSound()},500)}r(l)}).catch(function(l){console.log("resume err",l),a(l)})})}}]),f}(),qe=null;function Vs(f,u,n,i){return new WebControl({szPluginContainer:f,iServicePortStart:14510,iServicePortEnd:14519,cbConnectSuccess:u,cbConnectError:n,cbConnectClose:i})}function Ws(){qe!=null&&(qe.JS_DestroyWnd().then(function(){console.log("JS_DestroyWnd")},function(){}),qe.JS_StopService("window").then(function(){qe.JS_Disconnect().then(function(){console.log("JS_Disconnect")},function(){})}))}function Gs(f){f.responseMsg.eventName,console.log(f.responseMsg)}function Zs(){qe.JS_SetWindowControlCallback({cbIntegrationCallBack:Gs}),qe.JS_StartService("window",{dllPath:"./chain/cloudTransform.dll"}).then(function(){qe.JS_CreateWnd("playWnd",900,500).then(function(){console.log("JS_CreateWnd success")})})}function Js(){console.log("cbConnectError"),qe=null,console.error("确认本地进程是否已安装并开启成功!")}function Ks(f){console.log("cbConnectClose"),qe=null}window.onscroll=function(){qe!=null&&qe.JS_Resize(900,500)},window.onresize=function(){qe!=null&&qe.JS_Resize(900,500)},window.onunload=function(){try{qe.JS_HideWnd(),Ws()}catch(f){console.error(f)}},window.onpagehide=function(){try{qe.JS_HideWnd()}catch(f){console.error(f)}};var qs=function(){function f(u){var n=this;fe(this,f),je(this,"changeModel",function(i,r){var a=n;n.switchVideo=parseInt(i),qe&&qe.JS_RequestInterface({funcName:"ChangeModel",arguments:encodeURI(JSON.stringify({model:i}))}).then(function(l){i==0?a.play({deviceSerial:r.deviceSerial,channelNo:r.channelNo,validateCode:r.validateCode}):a.play({deviceSerial:r.deviceSerial,channelNo:r.channelNo,validateCode:r.validateCode,startTime:r.startTime,endTime:r.endTime})})}),je(this,"init",function(i){var r,a=n;if(!i.appKey||!i.accessToken){a.showTips(!1,"请输入appkey和token");return}typeof i.appKey!="undefined"&&(n.appKey=i.appKey),typeof i.accessToken!="undefined"&&(n.accessToken=i.accessToken),typeof i.platformId!="undefined"&&(n.platformId=i.platformId);var l=(r={layout:+a.layout,userName:"",waterMark:""},je(r,"waterMark","1"),je(r,"iWndType",0),je(r,"intelligenceEnable",1),je(r,"isRecord",1),je(r,"isSetPos",1),je(r,"motionDetectEnable",0),je(r,"playBackAlarmOverlyingEnable",0),je(r,"response",{code:0,message:null,data:{appKey:i.appKey,ezvizToken:i.accessToken,videoLevel:0,logLevel:3,showMainTool:1,showSubTool:1,waterMark:"1",userName:"openteam",platformId:i.platformId}}),r);console.log("初始化入参",l),qe.JS_RequestInterface({funcName:"Init",arguments:encodeURI(JSON.stringify(l))}).then(function(s){console.log(s.responseMsg),a.showTips(!0,"视频初始化成功!")})}),je(this,"play",function(i){var r=n;if(!(!i.deviceSerial||!i.channelNo)){typeof i.deviceSerial!="undefined"&&(n.deviceSerial=i.deviceSerial),typeof i.channelNo!="undefined"&&(n.channelNo=i.channelNo),typeof i.startTime!="undefined"&&i.startTime&&(n.startTime=i.startTime+" 00:00:00"),typeof i.endTime!="undefined"&&i.endTime&&(n.endTime=i.endTime+" 23:59:59"),typeof i.validateCode!="undefined"&&i.validateCode&&(n.validateCode=i.validateCode);var a={response:{code:0,message:null,data:{deviceSerial:i.deviceSerial,channelCode:i.channelNo,channelNo:+i.channelNo,codeIsEncrypt:0,validateCode:i.validateCode,deviceClass:r.deviceClass,deviceType:"10222",channelId:"2222222222",channelName:"channelNameTest",storeName:"storeName",storeId:"storeid",startTime:n.startTime,endTime:n.endTime}}};r.deviceClass==="1"?(a.response.data.channelCode=r.channelNo,a.response.data.platformId=r.platformId):a.response.data.channelNo=+r.channelNo,n.switchVideo===1&&(n.startTime&&(a.response.data.startTime=n.startTime),n.endTime&&(a.response.data.endTime=n.endTime)),console.log("预览/回放入参",a),qe.JS_RequestInterface({funcName:n.switchVideo===0?"StartPreview":"StartPlayback",arguments:encodeURI(JSON.stringify(a))}).then(function(l){console.log(l.responseMsg),r.showTips(!0,"预览/回放成功!")}).catch(function(l){console.log("开始播放:",l)})}}),je(this,"showCBInfo",function(i){n.callbackMessage=n.callbackMessage+JSON.stringify(i)+` `,console.log(n.callbackMessage)}),je(this,"showTips",function(i,r){}),je(this,"hideVideo",function(){qe.JS_HideWnd()}),je(this,"showVideo",function(){qe.JS_ShowWnd()}),je(this,"GetLayout",function(){var i=null;qe.JS_RequestInterface({funcName:"GetLayout",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:i}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"capturePicture",function(i){var r=null;qe.JS_RequestInterface({funcName:"CaptureJPGEx",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:r}}))}).then(function(a){console.log(JSON.stringify(a.responseMsg)),console.log(a.responseMsg)})}),je(this,"stop",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;qe.JS_RequestInterface({funcName:"StopPlay",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i)}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"setLayout",function(i){var r=parseInt(i);if(isNaN(r)||r==0||r>=13){console.log("不支持实际布局大于16的窗口数");return}n.layout=r,qe.JS_RequestInterface({funcName:"SetLayout",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{layout:r}}}))}).then(function(a){console.log(JSON.stringify(a.responseMsg)),console.log(a.responseMsg)})}),je(this,"setSoundVolumn",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,r=arguments.length>1?arguments[1]:void 0;qe.JS_RequestInterface({funcName:"SoundVolumn",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i),volumn:parseInt(r)}}}))}).then(function(a){console.log(JSON.stringify(a.responseMsg)),console.log(a.responseMsg)})}),je(this,"testMute",function(){var i=parseInt(prompt("请输入窗口ID"));qe.JS_RequestInterface({funcName:"MuteOnOff",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:i}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"testSelectWnd",function(){var i=parseInt(prompt("请输入窗口ID"));qe.JS_RequestInterface({funcName:"SelectPlayWnd",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:i}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"setVideoLevel",function(i,r){qe.JS_RequestInterface({funcName:"SetVideoLevel",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:n.switchVideo==1?0:parseInt(i),level:parseInt(r,10)}}}))}).then(function(a){console.log(JSON.stringify(a.responseMsg)),console.log(a.responseMsg)})}),je(this,"startTalk",function(i){qe.JS_RequestInterface({funcName:"StartTalk",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i)}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"stopTalk",function(i){qe.JS_RequestInterface({funcName:"StopTalk",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i)}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"startSave",function(i){qe.JS_RequestInterface({funcName:"StartRecord",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i)}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"stopSave",function(i){qe.JS_RequestInterface({funcName:"StopRecord",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i)}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),this.appKey="b9a3ad6e8026410095d8252169fa430a",this.accessToken="at.2vtum8873rrcwbrv431qb6pn94dkbv23-8dw2twn355-1u3x014-wrthellzk",this.deviceSerial="C33368372",this.channelNo="1",this.validateCode="",this.deviceClass="0",this.platformId="",this.startTime="",this.endTime="",this.layout=2,this.switchVideo=0,this.tips="调用成功",this.successTip=!1,this.tipsShow=!1,qe=Vs("playWnd",Zs,Js,Ks)}return dt(f,[{key:"alarmMsg",value:function(){var n={request:{body:{alarmTypes:[10800,0,0,0,0],channelId:"066dde0465dd4abaab6afe355baf9d0b",endTime:"1621007999000",startTime:"1620921600000"},callBack:"GetAlarmMsgOrders",majorKey:"",method:"POST",storeId:"",url:"/videoplugin/message/getMessageByTypes"},response:{code:0,message:null,data:[{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620921217e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620920678e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620920586e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919513e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919483e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919333e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918913e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918616e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918305e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917858e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917658e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917244e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917064e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916994e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916668e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916529e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916343e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916081e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915825e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915676e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915531e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915394e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915197e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914971e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914644e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914533e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914457e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914376e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914284e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620913973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620913431e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912771e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912354e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912275e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912093e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912024e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091189e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911839e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911807e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091176e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911682e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091127e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911184e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910982e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910851e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910781e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910727e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910677e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910647e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910588e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910544e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910484e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091041e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091035e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910278e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910217e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910124e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909976e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909939e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909847e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909817e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909736e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909664e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909605e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909575e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909346e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909247e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909149e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090912e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909028e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908999e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908969e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908909e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090888e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908835e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090875e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090872e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908652e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908612e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908582e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908552e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908456e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908426e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908299e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908268e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090805e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907918e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907758e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907625e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907386e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907292e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907127e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906864e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906828e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906797e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906747e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906717e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906632e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906368e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906329e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906142e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906013e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905946e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905823e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905697e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905622e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905541e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905511e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905481e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905442e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905382e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905352e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905322e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905262e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905196e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090515e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904994e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904813e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090473e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16209047e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904618e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904286e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904173e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904143e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904053e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904023e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903854e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903789e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903723e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903643e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903612e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903573e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903505e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903383e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903329e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903299e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903268e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16209032e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903149e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090312e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902977e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090286e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090277e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902639e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902609e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902517e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902373e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090232e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902253e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902198e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902132e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090194e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090185e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901789e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901746e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901685e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901638e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090152e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901489e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901424e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901271e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901233e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901157e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900915e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900774e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900744e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090065e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090044e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900409e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900175e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900134e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900069e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900016e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899976e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899908e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899879e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899826e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899756e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899599e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899559e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899467e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899406e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899265e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899211e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089914e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089911e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089905e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898991e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898926e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898785e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898746e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898697e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898666e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898507e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898293e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898248e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898218e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898157e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898088e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089802e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089796e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089785e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897807e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897771e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897719e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089769e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089763e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16208976e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089757e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089754e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897475e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897369e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897339e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897279e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897237e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897207e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897172e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897142e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897024e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896985e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896874e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896843e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896814e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896783e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896736e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896621e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896478e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896447e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896358e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896307e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896277e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896247e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896214e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089604e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895953e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895921e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895868e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089577e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895704e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089559e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895559e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089548e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895442e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895377e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895347e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895293e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895171e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895136e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895017e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894926e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894896e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894864e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894738e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894599e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894539e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894426e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894359e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894297e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894213e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894183e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894051e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893964e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893934e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893843e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893754e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893676e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893606e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089353e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893452e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893423e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893357e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893288e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893143e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893051e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893006e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892904e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892824e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892764e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892541e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892479e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892311e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892281e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892209e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892063e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891991e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089187e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089181e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891708e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891655e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891585e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891531e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891401e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891297e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891257e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891178e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891128e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891033e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089094e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890879e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890794e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890714e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890616e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890586e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890469e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890414e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890346e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890288e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890179e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890108e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890041e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890011e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889937e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889719e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889635e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889481e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889451e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889317e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889227e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889139e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889034e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888902e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888837e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888767e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888737e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888706e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888633e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888413e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888353e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888323e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888249e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888162e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888e6},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887859e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887776e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887734e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887692e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887619e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887355e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088732e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887289e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887126e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887066e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887034e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088697e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886884e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886804e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886728e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886609e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886538e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886478e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886396e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886334e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886246e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886111e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886011e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885956e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885894e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885696e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885514e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885484e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885414e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885383e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885341e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885306e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885276e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885186e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885114e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885037e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885006e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884975e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884945e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884911e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884851e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088478e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884696e3}],success:!0}};console.log(n),qe.JS_RequestInterface({funcName:"TransFunctionResult",arguments:encodeURI(JSON.stringify(n))})}}]),f}();(function(f,u){ue(ae)==="object"&&ue(ae.exports)==="object"?ae.exports=f.document?u(f,!0):function(n){if(!n.document)throw new Error("EZUIPlayer requires a window with a document");return u(n)}:u(f)})(typeof window!="undefined"?window:void 0,function(f,u){var n={Core:gn,HLS:Yl,FLV:Xl,EZUIKitPlayer:Hs,EZUIKitHD:qs};return f.EZUIKit=n,n})})(Mr,Mr.exports);var vh=Mr.exports;const Bh=gh(vh),yh="/jsyApi",Th=["邛溪镇","刷经寺镇","安曲镇","龙日镇","江茸乡","查尔玛乡","瓦切镇","阿木乡","麦洼乡","色地镇"];function Sh(ae){return/^https?:\/\//.test(ae)?ae:`${yh}${ae.startsWith("/")?ae:`/${ae}`}`}function Ch(ae){if((ae==null?void 0:ae.success)===!1||(ae==null?void 0:ae.code)!==void 0&&![0,200,"0","200"].includes(ae.code)){const ue=new Error((ae==null?void 0:ae.msg)||(ae==null?void 0:ae.message)||"视频监控接口请求失败");throw ue.code=ae==null?void 0:ae.code,ue}return hh(ae)}function Pn(ae,Je,ue=""){for(const fe of Je)if((ae==null?void 0:ae[fe])!==void 0&&(ae==null?void 0:ae[fe])!==null&&(ae==null?void 0:ae[fe])!=="")return ae[fe];return ue}function bh(ae,Je){for(const ue of Je)if((ae==null?void 0:ae[ue])!==void 0&&(ae==null?void 0:ae[ue])!==null&&(ae==null?void 0:ae[ue])!=="")return{key:ue,value:ae[ue]};return null}function Gl(ae){return Pn(ae,["token","accessToken","access_token"])}function Ph(ae){return Pn(ae,["hdPlayUrl","hd_play_url","playUrl","play_url","url"])}function qo(ae){return!!(Gl(ae)&&Ph(ae))}function wh(ae){return bh(ae,["isOnline","is_online","online","onlineStatus","online_status","statusName","status_name","deviceStatus","device_status","cameraStatus","camera_status","rawStatus","raw_status","status","state","deviceState","device_state"])}function Zl(ae){const Je=qo(ae),ue=wh(ae);if(!ue)return{online:Je,raw:"",reason:Je?"后台未返回设备状态":"缺少播放地址或令牌"};const fe=ue.value;if(typeof fe=="boolean")return{online:fe,raw:fe?"在线":"离线",reason:`后台状态:${fe?"在线":"离线"}`};const St=String(fe!=null?fe:"").trim().toLowerCase();return St?typeof fe=="number"||/^-?\d+(\.\d+)?$/.test(St)?{online:Number(fe)!==0,raw:String(fe),reason:`后台状态:${fe}`}:["true","online","on","open","running","active","enabled"].includes(St)?{online:!0,raw:String(fe),reason:`后台状态:${fe}`}:["false","offline","off","closed","disabled","stop","stopped"].includes(St)?{online:!1,raw:String(fe),reason:`后台状态:${fe}`}:/(离线|不在线|未在线|断线|断开|异常|故障|停用|不可用|offline|disabled|closed|stop)/i.test(St)?{online:!1,raw:String(fe),reason:`后台状态:${fe}`}:/(在线|直播中|正常|启用|可用|online|enabled|open|running|active)/i.test(St)?{online:!0,raw:String(fe),reason:`后台状态:${fe}`}:{online:Je,raw:String(fe),reason:`后台状态:${fe}`}:{online:Je,raw:"",reason:Je?"后台状态为空":"缺少播放地址或令牌"}}function Eh(ae){return Zl(ae).online}function Ih(ae){return Pn(ae,["previewImgUrl","preview_img_url","latestCaptureUrl","latest_capture_url","img","image","cover","snapshot"])}function xh(ae){return Pn(ae,["lastCaptureTime","last_capture_time","captureTime","capture_time","latestCaptureTime","latest_capture_time"])}function _h(ae){return!!(qo(ae)&&Eh(ae))}function Rh(ae=""){const Je=String(ae);return Th.find(fe=>Je.includes(fe.replace(/[镇乡]$/,"")))||"红原县"}function kh(ae=""){const Je=String(ae);return Je.includes("养殖")?"养殖基地":Je.includes("饲草")?"饲草基地":Je.includes("种草")||Je.includes("牧草")?"牧草基地":Je.includes("虫情")?"虫情监测":Je.includes("机场")?"机场周边":"重点点位"}function Ah(ae,Je){const ue=Pn(ae,["hdPlayUrl","playUrl","url"]),fe=String(ue).match(/\/(\d+)(?:\.hd)?\.live/i);return fe?fe[1].padStart(2,"0"):String(Je+1).padStart(2,"0")}function Dh(){return new Date().toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1})}function Mh(ae,Je,ue,fe){const St=Pn(ae,["name","title","deviceName"],`视频监控${Je+1}`),dt=Pn(ae,["hdPlayUrl","hd_play_url","url"]),je=Pn(ae,["playUrl","play_url"],dt),gn=Gl(ae),ut=Zl(ae),Mt=!!(qo(ae)&&ut.online),ln=ue?Math.round(fe/ue*100):0;return{key:Pn(ae,["id","number","deviceSerial"],`${St}-${Je}`),title:St,town:Rh(St),scene:kh(St),device:Pn(ae,["number","deviceSerial","serialNumber"],`CAM-${String(Je+1).padStart(3,"0")}`),channel:Ah(ae,Je),cameraCount:ue,status:Mt?"直播中":"离线",rawStatus:ut.raw,statusReason:ut.reason,onlineRate:ln,updateTime:Dh(),operator:Mt?"萤石云 · 在线预览":ut.reason,progress:Mt?100:0,image:Ih(ae),lastCaptureTime:xh(ae),playUrl:je,hdPlayUrl:dt,token:gn,source:ae}}function zh(){return Wl(this,arguments,function*(ae={}){const gn=ae,{includeOffline:Je=!1}=gn,ue=Vl(gn,["includeOffline"]),fe=yield fh(Sh("/api/home/monitorings"),{params:ue,timeout:18e3}).then(Ch),St=Array.isArray(fe)?fe:(fe==null?void 0:fe.rows)||(fe==null?void 0:fe.list)||[],dt=St.filter(_h),je=St.map((ut,Mt)=>Mh(ut,Mt,St.length,dt.length));return Je?je.sort((ut,Mt)=>+(Mt.status==="直播中")-+(ut.status==="直播中")):je.filter(ut=>ut.status==="直播中")})}const jh=""+new URL("live-scene-1-786cdd0a-balabala-1784378651390.png",import.meta.url).href;export{Bh as E,zh as g,jh as l};