ezuikit-js 8.1.2-beta.2 → 8.1.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ezuikit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  *
3
3
  * ezuikit.js v8.1.2
4
- * Copyright (c) 2024-12-12 Ezviz-OpenBiz
4
+ * Copyright (c) 2024-12-13 Ezviz-OpenBiz
5
5
  * Released under ISC the License.
6
6
  *
7
7
  */
@@ -36,7 +36,7 @@
36
36
  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
37
37
  OTHER DEALINGS IN THE SOFTWARE.
38
38
  */
39
- ai.sessions={},ai.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){var A=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),e=33;return window.navigator.userAgent.match("Linux")&&(e=35),A>=26&&A<=e||ai.extension.isInstalled()}return!0};var ni={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(A){var e=window.setTimeout((function(){var e=new Error("NavigatorUserMediaError");return e.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',A(e)}),1e3);this.cache[e]=A,window.postMessage({type:"janusGetScreen",id:e},"*")},init:function(){var A={};this.cache=A,window.addEventListener("message",(function(e){if(e.origin==window.location.origin)if("janusGotScreen"==e.data.type&&A[e.data.id]){var t=A[e.data.id];if(delete A[e.data.id],""===e.data.sourceId){var i=new Error("NavigatorUserMediaError");i.name="You cancelled the request for permission, giving up...",t(i)}else t(null,e.data.sourceId)}else"janusGetScreenPending"==e.data.type&&(console.log("clearing ",e.data.id),window.clearTimeout(e.data.id))}))}};function ai(A){if(void 0===ai.initDone)return A.error("Library not initialized"),{};if(!ai.isWebrtcSupported())return A.error("WebRTC not supported by this browser"),{};if(ai.log("Library initialized: "+ai.initDone),(A=A||{}).success="function"==typeof A.success?A.success:ai.noop,A.error="function"==typeof A.error?A.error:ai.noop,A.destroyed="function"==typeof A.destroyed?A.destroyed:ai.noop,null===A.server||void 0===A.server)return A.error("Invalid server url"),{};var t=!1,i=null,n={},a=null,o=null,r=0,s=A.server;ai.isArray(s)?(ai.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,o=A.server,ai.debug(o)):0===s.indexOf("ws")?(t=!0,ai.log("Using WebSockets to contact Janus: "+s)):(t=!1,ai.log("Using REST API to contact Janus: "+s));var g=A.iceServers;null==g&&(g=[{urls:"stun:stun.l.google.com:19302"}]);var c=A.iceTransportPolicy,I=A.bundlePolicy,C=A.ipv6;null==C&&(C=!1);var h=!1;void 0!==A.withCredentials&&null!==A.withCredentials&&(h=!0===A.withCredentials);var B=10;void 0!==A.max_poll_events&&null!==A.max_poll_events&&(B=A.max_poll_events),B<1&&(B=1);var u=null;void 0!==A.token&&null!==A.token&&(u=A.token);var E=null;void 0!==A.apisecret&&null!==A.apisecret&&(E=A.apisecret),this.destroyOnUnload=!0,void 0!==A.destroyOnUnload&&null!==A.destroyOnUnload&&(this.destroyOnUnload=!0===A.destroyOnUnload);var f=25e3;void 0!==A.keepAlivePeriod&&null!==A.keepAlivePeriod&&(f=A.keepAlivePeriod),isNaN(f)&&(f=25e3);var Q=6e4;function x(A){var e={high:9e5,medium:3e5,low:1e5};return null!=A&&(A.high&&(e.high=A.high),A.medium&&(e.medium=A.medium),A.low&&(e.low=A.low)),e}void 0!==A.longPollTimeout&&null!==A.longPollTimeout&&(Q=A.longPollTimeout),isNaN(Q)&&(Q=6e4);var p=!1,m=null,y={},_=this,S=0,D={};function w(){if(null!=m)if(ai.debug("Long poll..."),p){var e=s+"/"+m+"?rid="+(new Date).getTime();null!=B&&(e=e+"&maxev="+B),null!=u&&(e=e+"&token="+encodeURIComponent(u)),null!=E&&(e=e+"&apisecret="+encodeURIComponent(E)),ai.httpAPICall(e,{verb:"GET",withCredentials:h,success:v,timeout:Q,error:function(e,t){if(ai.error(e+":",t),++S>3)return p=!1,void A.error("Lost connection to the server (is it down?)");w()}})}else ai.warn("Is the server down? (connected=false)")}function v(A,e){if(S=0,t||null==m||!0===e||w(),t||!ai.isArray(A))if("keepalive"!==A.rtcgw)if("ack"!==A.rtcgw)if("success"!==A.rtcgw)if("trickle"===A.rtcgw){if(null==(s=A.sender))return void ai.warn("Missing sender...");if(null==(c=y[s]))return void ai.debug("This handle is not attached to this session");var n=A.candidate;ai.debug("Got a trickled candidate on session "+m),ai.debug(n);var a=c.webrtcStuff;a.pc&&a.remoteSdp?(ai.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(ai.endOfCandidates)):(ai.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),a.candidates||(a.candidates=[]),a.candidates.push(n),ai.debug(a.candidates))}else{if("webrtcup"===A.rtcgw)return ai.debug("Got a webrtcup event on session "+m),ai.debug(A),null==(s=A.sender)?void ai.warn("Missing sender..."):null==(c=y[s])?void ai.debug("This handle is not attached to this session"):void c.webrtcState(!0);if("hangup"===A.rtcgw){if(ai.debug("Got a hangup event on session "+m),ai.debug(A),null==(s=A.sender))return void ai.warn("Missing sender...");if(null==(c=y[s]))return void ai.debug("This handle is not attached to this session");c.webrtcState(!1,A.reason),c.hangup()}else if("detached"===A.rtcgw){if(ai.debug("Got a detached event on session "+m),ai.debug(A),null==(s=A.sender))return void ai.warn("Missing sender...");if(null==(c=y[s]))return;c.detached=!0,c.ondetached(),c.detach()}else if("media"===A.rtcgw){if(ai.debug("Got a media event on session "+m),ai.debug(A),null==(s=A.sender))return void ai.warn("Missing sender...");if(null==(c=y[s]))return void ai.debug("This handle is not attached to this session");c.mediaState(A.type,A.receiving)}else if("slowlink"===A.rtcgw){if(ai.debug("Got a slowlink event on session "+m),ai.debug(A),null==(s=A.sender))return void ai.warn("Missing sender...");if(null==(c=y[s]))return void ai.debug("This handle is not attached to this session");c.slowLink(A.uplink,A.lost)}else{if("error"===A.rtcgw){var o,r;if(ai.error("Ooops: "+A.error.code+" "+A.error.reason),ai.debug(A),null!=(o=A.transaction))null!=(r=D[o])&&r(A),delete D[o];return}if("event"===A.rtcgw){var s;if(ai.debug("Got a plugin event on session "+m),ai.debug(A),null==(s=A.sender))return void ai.warn("Missing sender...");var g=A.plugindata;if(null==g)return void ai.warn("Missing plugindata...");ai.debug(" -- Event is coming from "+s+" ("+g.plugin+")");var c,l=g.data;if(ai.debug(l),null==(c=y[s]))return void ai.warn("This handle is not attached to this session");var I=A.jsep;null!=I&&(ai.debug("Handling SDP as well..."),ai.debug(I));var C=c.onmessage;null!=C?(ai.debug("Notifying application..."),C(l,I)):ai.debug("No provided notification callback")}else{if("timeout"===A.rtcgw)return ai.error("Timeout on session "+m),ai.debug(A),void(t&&i.close(3504,"Gateway timeout"));ai.warn("Unknown message/event '"+A.rtcgw+"' on session "+m),ai.debug(A)}}}else ai.debug("Got a success on session "+m),ai.debug(A),null!=(o=A.transaction)&&(null!=(r=D[o])&&r(A),delete D[o]);else ai.debug("Got an ack on session "+m),ai.debug(A),null!=(o=A.transaction)&&(null!=(r=D[o])&&r(A),delete D[o]);else ai.vdebug("Got a keepalive on session "+m);else for(var d=0;d<A.length;d++)v(A[d],!0)}function b(){if(null!==s&&t&&p){a=setTimeout(b,f);var A={rtcgw:"keepalive",session_id:m,transaction:ai.randomString(12)};null!=u&&(A.token=u),null!=E&&(A.apisecret=E),i.send(JSON.stringify(A))}}function F(e){var g=ai.randomString(12),c={rtcgw:"create",transaction:g,token:window.EZUIKit.opt.stream,device:window.EZUIKit.opt.deviceSerial,channel:window.EZUIKit.opt.channelNo,authBizType:"TALK"};if(e.reconnect&&(p=!1,c.rtcgw="claim",c.session_id=m,i&&(i.onopen=null,i.onerror=null,i.onclose=null,a&&(clearTimeout(a),a=null))),null!=u&&(c.token=u),null!=E&&(c.apisecret=E),null===s&&ai.isArray(o)&&(0===(s=o[r]).indexOf("ws")?(t=!0,ai.log("Server #"+(r+1)+": trying WebSockets to contact Janus ("+s+")")):(t=!1,ai.log("Server #"+(r+1)+": trying REST API to contact Janus ("+s+")"))),t)for(var l in i=ai.newWebSocket(s,"rtcgw-protocol"),n={error:function(){if(ai.error("Error connecting to the Janus WebSockets server... "+s),ai.isArray(o)&&!e.reconnect)return++r==o.length?void e.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout((function(){F(e)}),200));e.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){D[g]=function(A){if(ai.debug(A),"success"!==A.rtcgw)return ai.error("Ooops: "+A.error.code+" "+A.error.reason),void e.error(A.error.reason);a=setTimeout(b,f),p=!0,m=A.session_id?A.session_id:A.data.id,e.reconnect?ai.log("Claimed session: "+m):ai.log("Created session: "+m),ai.sessions[m]=_,e.success()},i.send(JSON.stringify(c))},message:function(A){v(JSON.parse(A.data))},close:function(){null!==s&&p&&(p=!1,A.error("Lost connection to the server (is it down?)"))}})i.addEventListener(l,n[l]);else ai.httpAPICall(s,{verb:"POST",withCredentials:h,body:c,success:function(A){if(ai.debug(A),"success"!==A.rtcgw)return ai.error("Ooops: "+A.error.code+" "+A.error.reason),void e.error(A.error.reason);p=!0,m=A.session_id?A.session_id:A.data.id,e.reconnect?ai.log("Claimed session: "+m):ai.log("Created session: "+m),ai.sessions[m]=_,w(),e.success()},error:function(A,t){if(ai.error(A+":",t),ai.isArray(o)&&!e.reconnect)return++r==o.length?void e.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout((function(){F(e)}),200));""===t?e.error(A+": Is the server down?"):e.error(A+": "+t)}})}function R(A,e){if((e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:ai.noop,!p)return ai.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");var n=y[A];if(null==n||null===n.webrtcStuff||void 0===n.webrtcStuff)return ai.warn("Invalid handle"),void e.error("Invalid handle");var a=e.message,o=e.jsep,r=ai.randomString(12),g={rtcgw:"message",body:a,transaction:r};if(null!==n.token&&void 0!==n.token&&(g.token=n.token),null!=E&&(g.apisecret=E),null!=o&&(g.jsep=o),ai.debug("Sending message to plugin (handle="+A+"):"),ai.debug(g),t)return g.session_id=m,g.handle_id=A,D[r]=function(A){if(ai.debug("Message sent!"),ai.debug(A),"success"===A.rtcgw){var t=A.plugindata;if(null==t)return ai.warn("Request succeeded, but missing plugindata..."),void e.success();ai.log("Synchronous transaction successful ("+t.plugin+")");var i=t.data;return ai.debug(i),void e.success(i)}"ack"===A.rtcgw?e.success():void 0!==A.error&&null!==A.error?(ai.error("Ooops: "+A.error.code+" "+A.error.reason),e.error(A.error.code+" "+A.error.reason)):(ai.error("Unknown error"),e.error("Unknown error"))},void i.send(JSON.stringify(g));ai.httpAPICall(s+"/"+m+"/"+A,{verb:"POST",withCredentials:h,body:g,success:function(A){if(ai.debug("Message sent!"),ai.debug(A),"success"===A.rtcgw){var t=A.plugindata;if(null==t)return ai.warn("Request succeeded, but missing plugindata..."),void e.success();ai.log("Synchronous transaction successful ("+t.plugin+")");var i=t.data;return ai.debug(i),void e.success(i)}"ack"===A.rtcgw?e.success():void 0!==A.error&&null!==A.error?(ai.error("Ooops: "+A.error.code+" "+A.error.reason),e.error(A.error.code+" "+A.error.reason)):(ai.error("Unknown error"),e.error("Unknown error"))},error:function(A,t){ai.error(A+":",t),e.error(A+": "+t)}})}function k(A,e){if(p){var n=y[A];if(null!=n&&null!==n.webrtcStuff&&void 0!==n.webrtcStuff){var a={rtcgw:"trickle",candidate:e,transaction:ai.randomString(12)};if(null!==n.token&&void 0!==n.token&&(a.token=n.token),null!=E&&(a.apisecret=E),ai.vdebug("Sending trickle candidate (handle="+A+"):"),ai.vdebug(a),t)return a.session_id=m,a.handle_id=A,void i.send(JSON.stringify(a));ai.httpAPICall(s+"/"+m+"/"+A,{verb:"POST",withCredentials:h,body:a,success:function(A){ai.vdebug("Candidate sent!"),ai.vdebug(A),"ack"===A.rtcgw||ai.error("Ooops: "+A.error.code+" "+A.error.reason)},error:function(A,e){ai.error(A+":",e)}})}else ai.warn("Invalid handle")}else ai.warn("Is the server down? (connected=false)")}function P(A,e,t,i){var n=y[A];if(null!=n&&null!==n.webrtcStuff&&void 0!==n.webrtcStuff){var a=n.webrtcStuff,o=function(A){ai.log("Received state change on data channel:",A);var e=A.target.label,t=a.dataChannel[e]?a.dataChannel[e].readyState:"null";if(ai.log("State change on <"+e+"> data channel: "+t),"open"===t){if(a.dataChannel[e].pending&&a.dataChannel[e].pending.length>0){for(var i in ai.log("Sending pending messages on <"+e+">:",a.dataChannel[e].pending.length),a.dataChannel[e].pending){var o=a.dataChannel[e].pending[i];ai.log("Sending string on data channel <"+e+">: "+o),a.dataChannel[e].send(o)}a.dataChannel[e].pending=[]}n.ondataopen(e)}};a.dataChannel[e]=t||a.pc.createDataChannel(e,{ordered:!1}),a.dataChannel[e].onmessage=function(A){ai.log("Received message on data channel:",A);var e=A.target.label;n.ondata(A.data,e)},a.dataChannel[e].onopen=o,a.dataChannel[e].onclose=o,a.dataChannel[e].onerror=function(A){ai.error("Got error on data channel:",A)},a.dataChannel[e].pending=[],i&&a.dataChannel[e].pending.push(i)}else ai.warn("Invalid handle")}function N(A,e){(e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:ai.noop;var t=y[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return ai.warn("Invalid handle"),void e.error("Invalid handle");var i=t.webrtcStuff,n=e.text;if(null==n)return ai.warn("Invalid text"),void e.error("Invalid text");var a=e.label?e.label:ai.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(n),void e.success()):(ai.log("Sending string on data channel <"+a+">: "+n),i.dataChannel[a].send(n),void e.success()):(P(A,a,!1,n),void e.success())}function T(A,e){(e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:ai.noop;var t=y[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return ai.warn("Invalid handle"),void e.error("Invalid handle");var i=t.webrtcStuff;if(null===i.dtmfSender||void 0===i.dtmfSender){if(void 0!==i.pc&&null!==i.pc){var n=i.pc.getSenders().find((function(A){return A.track&&"audio"===A.track.kind}));if(!n)return ai.warn("Invalid DTMF configuration (no audio track)"),void e.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=n.dtmf,i.dtmfSender&&(ai.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(A){ai.debug("Sent DTMF tone: "+A.tone)})}if(null===i.dtmfSender||void 0===i.dtmfSender)return ai.warn("Invalid DTMF configuration"),void e.error("Invalid DTMF configuration")}var a=e.dtmf;if(null==a)return ai.warn("Invalid DTMF parameters"),void e.error("Invalid DTMF parameters");var o=a.tones;if(null==o)return ai.warn("Invalid DTMF string"),void e.error("Invalid DTMF string");var r=a.duration;null==r&&(r=500);var s=a.gap;null==s&&(s=50),ai.debug("Sending DTMF string "+o+" (duration "+r+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(o,r,s),e.success()}function M(A,e){(e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:ai.noop;var n=!0;void 0!==e.asyncRequest&&null!==e.asyncRequest&&(n=!0===e.asyncRequest);var a=!0;void 0!==e.noRequest&&null!==e.noRequest&&(a=!0===e.noRequest),ai.log("Destroying handle "+A+" (async="+n+")"),X(A);var o=y[A];if(null==o||o.detached)return delete y[A],void e.success();if(a)return delete y[A],void e.success();if(!p)return ai.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");var r={rtcgw:"detach",transaction:ai.randomString(12)};if(null!==o.token&&void 0!==o.token&&(r.token=o.token),null!=E&&(r.apisecret=E),t)return r.session_id=m,r.handle_id=A,i.send(JSON.stringify(r)),delete y[A],void e.success();ai.httpAPICall(s+"/"+m+"/"+A,{verb:"POST",async:n,withCredentials:h,body:r,success:function(t){ai.log("Destroyed handle:"),ai.debug(t),"success"!==t.rtcgw&&ai.error("Ooops: "+t.error.code+" "+t.error.reason),delete y[A],e.success()},error:function(t,i){ai.error(t+":",i),delete y[A],e.success()}})}function L(A,e,t,i,n){return Y.apply(this,arguments)}function Y(){return Y=function(A){return function(){var t=this,i=arguments;return new Promise((function(n,a){var o=A.apply(t,i);function r(A){e(o,n,a,r,s,"next",A)}function s(A){e(o,n,a,r,s,"throw",A)}r(void 0)}))}}(l().mark((function A(e,t,i,n,a){var o,r,s,h,B,u,E,f,Q,p,m,_,S,D,w,v,b,F,R,N,T,M,L,Y,G,U,V;return l().wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(null!=(o=y[e])&&null!==o.webrtcStuff&&void 0!==o.webrtcStuff){A.next=5;break}return ai.warn("Invalid handle"),n.error("Invalid handle"),A.abrupt("return");case 5:if(r=o.webrtcStuff,ai.debug("streamsDone:",a),a&&(ai.debug(" -- Audio tracks:",a.getAudioTracks()),ai.debug(" -- Video tracks:",a.getVideoTracks())),s=!1,r.myStream&&i.update&&!r.streamExternal){A.next=14;break}r.myStream=a,s=!0,A.next=66;break;case 14:if(!((!i.update&&q(i)||i.update&&(i.addAudio||i.replaceAudio))&&a.getAudioTracks()&&a.getAudioTracks().length)){A.next=45;break}if(r.myStream.addTrack(a.getAudioTracks()[0]),!ai.unifiedPlan){A.next=43;break}if(ai.log((i.replaceAudio?"Replacing":"Adding")+" audio track:",a.getAudioTracks()[0]),h=null,!((B=r.pc.getTransceivers())&&B.length>0)){A.next=30;break}A.t0=l().keys(B);case 22:if((A.t1=A.t0()).done){A.next=30;break}if(u=A.t1.value,!((E=B[u]).sender&&E.sender.track&&"audio"===E.sender.track.kind||E.receiver&&E.receiver.track&&"audio"===E.receiver.track.kind)){A.next=28;break}return h=E,A.abrupt("break",30);case 28:A.next=22;break;case 30:return f=null,A.prev=31,A.next=34,n.customizeStream(a);case 34:f=A.sent,A.next=40;break;case 37:A.prev=37,A.t2=A.catch(31),n.error(A.t2);case 40:h&&h.sender?h.sender.replaceTrack((null===(Q=f)||void 0===Q||null===(p=Q.getAudioTracks)||void 0===p||null===(m=p.call(Q))||void 0===m?void 0:m[0])||a.getAudioTracks()[0]):r.pc.addTrack((null===(_=f)||void 0===_||null===(S=_.getAudioTracks)||void 0===S||null===(D=S.call(_))||void 0===D?void 0:D[0])||a.getAudioTracks()[0],f||a),A.next=45;break;case 43:ai.log((i.replaceAudio?"Replacing":"Adding")+" audio track:",a.getAudioTracks()[0]),r.pc.addTrack(a.getAudioTracks()[0],a);case 45:if(!((!i.update&&$(i)||i.update&&(i.addVideo||i.replaceVideo))&&a.getVideoTracks()&&a.getVideoTracks().length)){A.next=66;break}if(r.myStream.addTrack(a.getVideoTracks()[0]),!ai.unifiedPlan){A.next=64;break}if(ai.log((i.replaceVideo?"Replacing":"Adding")+" video track:",a.getVideoTracks()[0]),w=null,!((B=r.pc.getTransceivers())&&B.length>0)){A.next=61;break}A.t3=l().keys(B);case 53:if((A.t4=A.t3()).done){A.next=61;break}if(u=A.t4.value,!((E=B[u]).sender&&E.sender.track&&"video"===E.sender.track.kind||E.receiver&&E.receiver.track&&"video"===E.receiver.track.kind)){A.next=59;break}return w=E,A.abrupt("break",61);case 59:A.next=53;break;case 61:w&&w.sender?w.sender.replaceTrack(a.getVideoTracks()[0]):r.pc.addTrack(a.getVideoTracks()[0],a),A.next=66;break;case 64:ai.log((i.replaceVideo?"Replacing":"Adding")+" video track:",a.getVideoTracks()[0]),r.pc.addTrack(a.getVideoTracks()[0],a);case 66:if(!r.pc){if(v={iceServers:g,iceTransportPolicy:c,bundlePolicy:I},"chrome"===ai.webRTCAdapter.browserDetails.browser&&(v.sdpSemantics=ai.webRTCAdapter.browserDetails.version<72?"plan-b":"unified-plan"),b={optional:[{DtlsSrtpKeyAgreement:!0}]},!0===C&&b.optional.push({googIPv6:!0}),n.rtcConstraints&&"object"===d(n.rtcConstraints))for(u in ai.debug("Adding custom PeerConnection constraints:",n.rtcConstraints),n.rtcConstraints)b.optional.push(n.rtcConstraints[u]);"edge"===ai.webRTCAdapter.browserDetails.browser&&(v.bundlePolicy="max-bundle"),ai.log("Creating PeerConnection"),ai.debug(b),r.pc=new RTCPeerConnection(v,b),ai.debug(r.pc),r.pc.getStats&&(r.volume={},r.bitrate.value="0 kbits/sec"),ai.log("Preparing local SDP and gathering candidates (trickle="+r.trickle+")"),r.pc.oniceconnectionstatechange=function(A){r.pc&&o.iceState(r.pc.iceConnectionState)},r.pc.onicecandidate=function(A){if(null==A.candidate||"edge"===ai.webRTCAdapter.browserDetails.browser&&A.candidate.candidate.indexOf("endOfCandidates")>0)ai.log("End of candidates."),r.iceDone=!0,!0===r.trickle?k(e,{completed:!0}):K(e,n);else{var t={candidate:A.candidate.candidate,sdpMid:A.candidate.sdpMid,sdpMLineIndex:A.candidate.sdpMLineIndex};!0===r.trickle&&k(e,t)}},r.pc.ontrack=function(A){ai.log("Handling Remote Track"),ai.debug(A),A.streams&&(r.remoteStream=A.streams[0],o.onremotestream(r.remoteStream),A.track.onended||(ai.log("Adding onended callback to track:",A.track),A.track.onended=function(A){ai.log("Remote track muted/removed:",A),r.remoteStream&&(r.remoteStream.removeTrack(A.target),o.onremotestream(r.remoteStream))},A.track.onmute=A.track.onended,A.track.onunmute=function(A){try{r.remoteStream.addTrack(A.target),o.onremotestream(r.remoteStream)}catch(A){ai.error(A)}}))}}if(!s||null==a){A.next=96;break}ai.log("Adding local stream"),F=!0===n.simulcast2,R=a.getTracks(),N=0;case 72:if(!(N<R.length)){A.next=96;break}if(T=R[N],F){A.next=92;break}if("audio"!==T.kind){A.next=89;break}return U=null,A.prev=77,A.next=80,n.customizeStream(a);case 80:U=A.sent,A.next=86;break;case 83:A.prev=83,A.t5=A.catch(77),n.error(A.t5);case 86:r.pc.addTrack((null===(M=U)||void 0===M||null===(L=(Y=M).getAudioTracks)||void 0===L||null===(G=L.call(Y))||void 0===G?void 0:G[0])||T,U||a),A.next=90;break;case 89:r.pc.addTrack(T,a);case 90:A.next=93;break;case 92:"audio"===T.kind?r.pc.addTrack(T,a):(ai.log("Enabling rid-based simulcasting:",T),V=x(n.simulcastMaxBitrates),r.pc.addTransceiver(T,{direction:"sendrecv",streams:[a],sendEncodings:[{rid:"h",active:!0,maxBitrate:V.high},{rid:"m",active:!0,maxBitrate:V.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:V.low,scaleResolutionDownBy:4}]}));case 93:N++,A.next=72;break;case 96:eA(i)&&!r.dataChannel[ai.dataChanDefaultLabel]&&(ai.log("Creating data channel"),P(e,ai.dataChanDefaultLabel,!1),r.pc.ondatachannel=function(A){ai.log("Data channel created by Janus:",A),P(e,A.channel.label,A.channel)}),r.myStream&&o.onlocalstream(r.myStream),null==t?J(e,i,n):r.pc.setRemoteDescription(t).then((function(){if(ai.log("Remote description accepted!"),r.remoteSdp=t.sdp,r.candidates&&r.candidates.length>0){for(var A=0;A<r.candidates.length;A++){var a=r.candidates[A];ai.debug("Adding remote candidate:",a),a&&!0!==a.completed?r.pc.addIceCandidate(a):r.pc.addIceCandidate(ai.endOfCandidates)}r.candidates=[]}H(e,i,n)}),n.error);case 99:case"end":return A.stop()}}),A,null,[[31,37],[77,83]])}))),Y.apply(this,arguments)}function G(A,e,t){(t=t||{}).success="function"==typeof t.success?t.success:ai.noop,t.error="function"==typeof t.error?t.error:Z,t.customizeStream="function"==typeof t.customizeStream?t.customizeStream:ai.noop;var i=t.jsep;if(e&&i)return ai.error("Provided a JSEP to a createOffer"),void t.error("Provided a JSEP to a createOffer");if(!(e||i&&i.type&&i.sdp))return ai.error("A valid JSEP is required for createAnswer"),void t.error("A valid JSEP is required for createAnswer");t.media=t.media||{audio:!0,video:!0};var n=t.media,a=y[A];if(null==a||null===a.webrtcStuff||void 0===a.webrtcStuff)return ai.warn("Invalid handle"),void t.error("Invalid handle");var o,r=a.webrtcStuff;if(r.trickle=(o=t.trickle,ai.debug("isTrickleEnabled:",o),null==o||!0===o),void 0===r.pc||null===r.pc)n.update=!1,n.keepAudio=!1,n.keepVideo=!1;else if(void 0!==r.pc&&null!==r.pc){if(ai.log("Updating existing media session"),n.update=!0,null!==t.stream&&void 0!==t.stream)t.stream!==r.myStream&&ai.log("Renegotiation involves a new external stream");else{if(n.addAudio){if(n.keepAudio=!1,n.replaceAudio=!1,n.removeAudio=!1,n.audioSend=!0,r.myStream&&r.myStream.getAudioTracks()&&r.myStream.getAudioTracks().length)return ai.error("Can't add audio stream, there already is one"),void t.error("Can't add audio stream, there already is one")}else n.removeAudio?(n.keepAudio=!1,n.replaceAudio=!1,n.addAudio=!1,n.audioSend=!1):n.replaceAudio&&(n.keepAudio=!1,n.addAudio=!1,n.removeAudio=!1,n.audioSend=!0);if(null===r.myStream||void 0===r.myStream?(n.replaceAudio&&(n.keepAudio=!1,n.replaceAudio=!1,n.addAudio=!0,n.audioSend=!0),q(n)&&(n.keepAudio=!1,n.addAudio=!0)):null===r.myStream.getAudioTracks()||void 0===r.myStream.getAudioTracks()||0===r.myStream.getAudioTracks().length?(n.replaceAudio&&(n.keepAudio=!1,n.replaceAudio=!1,n.addAudio=!0,n.audioSend=!0),q(n)&&(n.keepVideo=!1,n.addAudio=!0)):!q(n)||n.removeAudio||n.replaceAudio||(n.keepAudio=!0),n.addVideo){if(n.keepVideo=!1,n.replaceVideo=!1,n.removeVideo=!1,n.videoSend=!0,r.myStream&&r.myStream.getVideoTracks()&&r.myStream.getVideoTracks().length)return ai.error("Can't add video stream, there already is one"),void t.error("Can't add video stream, there already is one")}else n.removeVideo?(n.keepVideo=!1,n.replaceVideo=!1,n.addVideo=!1,n.videoSend=!1):n.replaceVideo&&(n.keepVideo=!1,n.addVideo=!1,n.removeVideo=!1,n.videoSend=!0);null===r.myStream||void 0===r.myStream||null===r.myStream.getVideoTracks()||void 0===r.myStream.getVideoTracks()||0===r.myStream.getVideoTracks().length?(n.replaceVideo&&(n.keepVideo=!1,n.replaceVideo=!1,n.addVideo=!0,n.videoSend=!0),$(n)&&(n.keepVideo=!1,n.addVideo=!0)):!$(n)||n.removeVideo||n.replaceVideo||(n.keepVideo=!0),n.addData&&(n.data=!0)}if(q(n)&&n.keepAudio&&$(n)&&n.keepVideo)return a.consentDialog(!1),void L(A,i,n,t,r.myStream)}if(n.update&&!r.streamExternal){if(n.removeAudio||n.replaceAudio){if(r.myStream&&r.myStream.getAudioTracks()&&r.myStream.getAudioTracks().length){var s=r.myStream.getAudioTracks()[0];ai.log("Removing audio track:",s),r.myStream.removeTrack(s);try{s.stop()}catch(A){}}if(r.pc.getSenders()&&r.pc.getSenders().length){var g=!0;if(n.replaceAudio&&ai.unifiedPlan&&(g=!1),g)for(var c in r.pc.getSenders()){(s=r.pc.getSenders()[c])&&s.track&&"audio"===s.track.kind&&(ai.log("Removing audio sender:",s),r.pc.removeTrack(s))}}}if(n.removeVideo||n.replaceVideo){if(r.myStream&&r.myStream.getVideoTracks()&&r.myStream.getVideoTracks().length){s=r.myStream.getVideoTracks()[0];ai.log("Removing video track:",s),r.myStream.removeTrack(s);try{s.stop()}catch(A){}}if(r.pc.getSenders()&&r.pc.getSenders().length){var l=!0;if(n.replaceVideo&&ai.unifiedPlan&&(l=!1),l)for(var c in r.pc.getSenders()){(s=r.pc.getSenders()[c])&&s.track&&"video"===s.track.kind&&(ai.log("Removing video sender:",s),r.pc.removeTrack(s))}}}}if(null!==t.stream&&void 0!==t.stream){var I=t.stream;if(ai.log("MediaStream provided by the application"),ai.debug(I),n.update&&r.myStream&&r.myStream!==t.stream&&!r.streamExternal){try{var C=r.myStream.getTracks();for(var h in C){var B=C[h];ai.log(B),null!=B&&B.stop()}}catch(A){}r.myStream=null}return r.streamExternal=!0,a.consentDialog(!1),void L(A,i,n,t,I)}if(q(n)||$(n)){if(!ai.isGetUserMediaAvailable())return void t.error("getUserMedia not available");var u={mandatory:{},optional:[]};a.consentDialog(!0);var E=q(n);!0===E&&null!=n&&null!=n&&"object"===d(n.audio)&&(E=n.audio);var f=$(n);if(!0===f&&null!=n&&null!=n){var Q=!0===t.simulcast,x=!0===t.simulcast2;if(!Q&&!x||i||void 0!==n.video&&!1!==n.video||(n.video="hires"),n.video&&"screen"!=n.video&&"window"!=n.video)if("object"===d(n.video))f=n.video;else{var p=0,m=0;"lowres"===n.video?(m=240,p=320):"lowres-16:9"===n.video?(m=180,p=320):"hires"===n.video||"hires-16:9"===n.video||"hdres"===n.video?(m=720,p=1280):"fhdres"===n.video?(m=1080,p=1920):"4kres"===n.video?(m=2160,p=3840):"stdres"===n.video?(m=480,p=640):"stdres-16:9"===n.video?(m=360,p=640):(ai.log("Default video setting is stdres 4:3"),m=480,p=640),ai.log("Adding media constraint:",n.video),f={height:{ideal:m},width:{ideal:p}},ai.log("Adding video constraint:",f)}else if("screen"===n.video||"window"===n.video){var _=function(e,o){a.consentDialog(!1),e?t.error(e):L(A,i,n,t,o)},S=function(A,e,t){ai.log("Adding media constraint (screen capture)"),ai.debug(A),navigator.mediaDevices.getUserMedia(A).then((function(A){t?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(t){A.addTrack(t.getAudioTracks()[0]),e(null,A)})):e(null,A)})).catch((function(A){a.consentDialog(!1),e(A)}))};if(n.screenshareFrameRate||(n.screenshareFrameRate=3),navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return void navigator.mediaDevices.getDisplayMedia({video:!0}).then((function(e){a.consentDialog(!1),q(n)&&!n.keepAudio?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(a){e.addTrack(a.getAudioTracks()[0]),L(A,i,n,t,e)})):L(A,i,n,t,e)}),(function(A){a.consentDialog(!1),t.error(A)}));if("chrome"===ai.webRTCAdapter.browserDetails.browser){var D=ai.webRTCAdapter.browserDetails.version,w=33;window.navigator.userAgent.match("Linux")&&(w=35),D>=26&&D<=w?(u={video:{mandatory:{googLeakyBucket:!0,maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:n.screenshareFrameRate,maxFrameRate:n.screenshareFrameRate,chromeMediaSource:"screen"}},audio:q(n)&&!n.keepAudio},S(u,_)):ai.extension.getScreen((function(A,e){if(A)return a.consentDialog(!1),t.error(A);(u={audio:!1,video:{mandatory:{chromeMediaSource:"desktop",maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:n.screenshareFrameRate,maxFrameRate:n.screenshareFrameRate},optional:[{googLeakyBucket:!0},{googTemporalLayeredScreencast:!0}]}}).video.mandatory.chromeMediaSourceId=e,S(u,_,q(n)&&!n.keepAudio)}))}else if("firefox"===ai.webRTCAdapter.browserDetails.browser){if(!(ai.webRTCAdapter.browserDetails.version>=33)){var v=new Error("NavigatorUserMediaError");return v.name="Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)",a.consentDialog(!1),void t.error(v)}u={video:{mozMediaSource:n.video,mediaSource:n.video},audio:q(n)&&!n.keepAudio},S(u,(function(A,e){if(_(A,e),!A)var t=e.currentTime,i=window.setInterval((function(){e||window.clearInterval(i),e.currentTime==t&&(window.clearInterval(i),e.onended&&e.onended()),t=e.currentTime}),500)}))}return}}null!=n&&"screen"===n.video||navigator.mediaDevices.enumerateDevices().then((function(e){var o=e.some((function(A){return"audioinput"===A.kind})),r=function(A){if(ai.debug("isScreenSendEnabled:",A),null==A)return!1;if("object"!==d(A.video)||"object"!==d(A.video.mandatory))return!1;var e=A.video.mandatory;if(e.chromeMediaSource)return"desktop"===e.chromeMediaSource||"screen"===e.chromeMediaSource;if(e.mozMediaSource)return"window"===e.mozMediaSource||"screen"===e.mozMediaSource;if(e.mediaSource)return"window"===e.mediaSource||"screen"===e.mediaSource;return!1}(n)||e.some((function(A){return"videoinput"===A.kind})),s=q(n),g=$(n),c=function(A){return ai.debug("isAudioSendRequired:",A),null!=A&&(!1!==A.audio&&!1!==A.audioSend&&(void 0!==A.failIfNoAudio&&null!==A.failIfNoAudio&&!0===A.failIfNoAudio))}(n),l=function(A){return ai.debug("isVideoSendRequired:",A),null!=A&&(!1!==A.video&&!1!==A.videoSend&&(void 0!==A.failIfNoVideo&&null!==A.failIfNoVideo&&!0===A.failIfNoVideo))}(n);if(s||g||c||l){var C=!!s&&o,h=!!g&&r;if(!C&&!h)return a.consentDialog(!1),t.error("No capture device found"),!1;if(!C&&c)return a.consentDialog(!1),t.error("Audio capture is required, but no capture device found"),!1;if(!h&&l)return a.consentDialog(!1),t.error("Video capture is required, but no capture device found"),!1}var B={audio:!(!o||n.keepAudio)&&E,video:!(!r||n.keepVideo)&&f};ai.debug("getUserMedia constraints",B),B.audio||B.video?navigator.mediaDevices.getUserMedia(B).then((function(e){a.consentDialog(!1),L(A,i,n,t,e)})).catch((function(A){a.consentDialog(!1),t.error({code:A.code,name:A.name,message:A.message})})):(a.consentDialog(!1),L(A,i,n,t,I))})).catch((function(A){a.consentDialog(!1),t.error("enumerateDevices error",A)}))}else L(A,i,n,t)}function U(A,e){(e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:Z;var t=e.jsep,i=y[A];if(null==i||null===i.webrtcStuff||void 0===i.webrtcStuff)return ai.warn("Invalid handle"),void e.error("Invalid handle");var n=i.webrtcStuff;if(null!=t){if(null===n.pc)return ai.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void e.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.pc.setRemoteDescription(t).then((function(){if(ai.log("Remote description accepted!"),n.remoteSdp=t.sdp,n.candidates&&n.candidates.length>0){for(var A=0;A<n.candidates.length;A++){var i=n.candidates[A];ai.debug("Adding remote candidate:",i),i&&!0!==i.completed?n.pc.addIceCandidate(i):n.pc.addIceCandidate(ai.endOfCandidates)}n.candidates=[]}e.success()}),e.error)}else e.error("Invalid JSEP")}function J(A,e,t){(t=t||{}).success="function"==typeof t.success?t.success:ai.noop,t.error="function"==typeof t.error?t.error:ai.noop,t.customizeSdp="function"==typeof t.customizeSdp?t.customizeSdp:ai.noop;var i=y[A];if(null==i||null===i.webrtcStuff||void 0===i.webrtcStuff)return ai.warn("Invalid handle"),void t.error("Invalid handle");var n=i.webrtcStuff,a=!0===t.simulcast;a?ai.log("Creating offer (iceDone="+n.iceDone+", simulcast="+a+")"):ai.log("Creating offer (iceDone="+n.iceDone+")");var o={};if(ai.unifiedPlan){var r=null,s=null,g=n.pc.getTransceivers();if(g&&g.length>0)for(var c in g){var l=g[c];l.sender&&l.sender.track&&"audio"===l.sender.track.kind||l.receiver&&l.receiver.track&&"audio"===l.receiver.track.kind?r||(r=l):(l.sender&&l.sender.track&&"video"===l.sender.track.kind||l.receiver&&l.receiver.track&&"video"===l.receiver.track.kind)&&(s||(s=l))}var I=q(e),C=z(e);I||C?I&&C?r&&(r.setDirection?r.setDirection("sendrecv"):r.direction="sendrecv",ai.log("Setting audio transceiver to sendrecv:",r)):I&&!C?r&&(r.setDirection?r.setDirection("sendonly"):r.direction="sendonly",ai.log("Setting audio transceiver to sendonly:",r)):!I&&C&&(r?(r.setDirection?r.setDirection("recvonly"):r.direction="recvonly",ai.log("Setting audio transceiver to recvonly:",r)):(r=n.pc.addTransceiver("audio",{direction:"recvonly"}),ai.log("Adding recvonly audio transceiver:",r))):e.removeAudio&&r&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive",ai.log("Setting audio transceiver to inactive:",r));var d=$(e),h=AA(e);d||h?d&&h?s&&(s.setDirection?s.setDirection("sendrecv"):s.direction="sendrecv",ai.log("Setting video transceiver to sendrecv:",s)):d&&!h?s&&(s.setDirection?s.setDirection("sendonly"):s.direction="sendonly",ai.log("Setting video transceiver to sendonly:",s)):!d&&h&&(s?(s.setDirection?s.setDirection("recvonly"):s.direction="recvonly",ai.log("Setting video transceiver to recvonly:",s)):(s=n.pc.addTransceiver("video",{direction:"recvonly"}),ai.log("Adding recvonly video transceiver:",s))):e.removeVideo&&s&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive",ai.log("Setting video transceiver to inactive:",s))}else o.offerToReceiveAudio=z(e),o.offerToReceiveVideo=AA(e);!0===t.iceRestart&&(o.iceRestart=!0),ai.debug(o);var B=$(e);if(B&&a&&"firefox"===ai.webRTCAdapter.browserDetails.browser){ai.log("Enabling Simulcasting for Firefox (RID)");var u=n.pc.getSenders().find((function(A){return"video"==A.track.kind}));if(u){var E=u.getParameters();E||(E={});var f=x(t.simulcastMaxBitrates);E.encodings=[{rid:"h",active:!0,maxBitrate:f.high},{rid:"m",active:!0,maxBitrate:f.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:f.low,scaleResolutionDownBy:4}],u.setParameters(E)}}n.pc.createOffer(o).then((function(A){ai.debug(A);var e={type:A.type,sdp:A.sdp};t.customizeSdp(e),A.sdp=e.sdp,ai.log("Setting local description"),B&&a&&("chrome"===ai.webRTCAdapter.browserDetails.browser||"safari"===ai.webRTCAdapter.browserDetails.browser?(ai.log("Enabling Simulcasting for Chrome (SDP munging)"),A.sdp=function(A){for(var e=A.split("\r\n"),t=!1,i=[-1],n=[-1],a=null,o=null,r=null,s=null,g=-1,c=0;c<e.length;c++){if(I=e[c].match(/m=(\w+) */)){if("video"===I[1]){if(!(i[0]<0)){g=c;break}t=!0}else if(i[0]>-1){g=c;break}}else if(t){var l=e[c].match(/a=ssrc-group:FID (\d+) (\d+)/);if(l)i[0]=l[1],n[0]=l[2],e.splice(c,1),c--;else{if(i[0]){if((d=e[c].match("a=ssrc:"+i[0]+" cname:(.+)"))&&(a=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" msid:(.+)"))&&(o=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" mslabel:(.+)"))&&(r=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" label:(.+)"))&&(s=d[1]),0===e[c].indexOf("a=ssrc:"+n[0])){e.splice(c,1),c--;continue}if(0===e[c].indexOf("a=ssrc:"+i[0])){e.splice(c,1),c--;continue}}0!=e[c].length||(e.splice(c,1),c--)}}}if(i[0]<0){g=-1,t=!1;for(c=0;c<e.length;c++){var I;if(I=e[c].match(/m=(\w+) */)){if("video"===I[1]){if(!(i[0]<0)){g=c;break}t=!0}else if(i[0]>-1){g=c;break}}else if(t){if(i[0]<0){var C=e[c].match(/a=ssrc:(\d+)/);if(C){i[0]=C[1],e.splice(c,1),c--;continue}}else{var d;if((d=e[c].match("a=ssrc:"+i[0]+" cname:(.+)"))&&(a=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" msid:(.+)"))&&(o=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" mslabel:(.+)"))&&(r=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" label:(.+)"))&&(s=d[1]),0===e[c].indexOf("a=ssrc:"+n[0])){e.splice(c,1),c--;continue}if(0===e[c].indexOf("a=ssrc:"+i[0])){e.splice(c,1),c--;continue}}0!=e[c].length||(e.splice(c,1),c--)}}}if(i[0]<0)return ai.warn("Couldn't find the video SSRC, simulcasting NOT enabled"),A;g<0&&(g=e.length);i[1]=Math.floor(4294967295*Math.random()),i[2]=Math.floor(4294967295*Math.random()),n[1]=Math.floor(4294967295*Math.random()),n[2]=Math.floor(4294967295*Math.random());for(c=0;c<i.length;c++)a&&(e.splice(g,0,"a=ssrc:"+i[c]+" cname:"+a),g++),o&&(e.splice(g,0,"a=ssrc:"+i[c]+" msid:"+o),g++),r&&(e.splice(g,0,"a=ssrc:"+i[c]+" mslabel:"+r),g++),s&&(e.splice(g,0,"a=ssrc:"+i[c]+" label:"+s),g++),a&&(e.splice(g,0,"a=ssrc:"+n[c]+" cname:"+a),g++),o&&(e.splice(g,0,"a=ssrc:"+n[c]+" msid:"+o),g++),r&&(e.splice(g,0,"a=ssrc:"+n[c]+" mslabel:"+r),g++),s&&(e.splice(g,0,"a=ssrc:"+n[c]+" label:"+s),g++);e.splice(g,0,"a=ssrc-group:FID "+i[2]+" "+n[2]),e.splice(g,0,"a=ssrc-group:FID "+i[1]+" "+n[1]),e.splice(g,0,"a=ssrc-group:FID "+i[0]+" "+n[0]),e.splice(g,0,"a=ssrc-group:SIM "+i[0]+" "+i[1]+" "+i[2]),(A=e.join("\r\n")).endsWith("\r\n")||(A+="\r\n");return A}(A.sdp)):"firefox"!==ai.webRTCAdapter.browserDetails.browser&&ai.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),n.mySdp=A.sdp,n.pc.setLocalDescription(A).catch(t.error),n.mediaConstraints=o,n.iceDone||n.trickle?(ai.log("Offer ready"),ai.debug(t),t.success(A)):ai.log("Waiting for all candidates...")}),t.error)}function H(A,e,t){(t=t||{}).success="function"==typeof t.success?t.success:ai.noop,t.error="function"==typeof t.error?t.error:ai.noop,t.customizeSdp="function"==typeof t.customizeSdp?t.customizeSdp:ai.noop;var i=y[A];if(null==i||null===i.webrtcStuff||void 0===i.webrtcStuff)return ai.warn("Invalid handle"),void t.error("Invalid handle");var n=i.webrtcStuff,a=!0===t.simulcast;a?ai.log("Creating answer (iceDone="+n.iceDone+", simulcast="+a+")"):ai.log("Creating answer (iceDone="+n.iceDone+")");var o=null;if(ai.unifiedPlan){o={};var r=null,s=null,g=n.pc.getTransceivers();if(g&&g.length>0)for(var c in g){var l=g[c];l.sender&&l.sender.track&&"audio"===l.sender.track.kind||l.receiver&&l.receiver.track&&"audio"===l.receiver.track.kind?r||(r=l):(l.sender&&l.sender.track&&"video"===l.sender.track.kind||l.receiver&&l.receiver.track&&"video"===l.receiver.track.kind)&&(s||(s=l))}var I=q(e),C=z(e);if(I||C){if(I&&C){if(r)try{r.setDirection?r.setDirection("sendrecv"):r.direction="sendrecv",ai.log("Setting audio transceiver to sendrecv:",r)}catch(A){ai.error(A)}}else if(I&&!C)try{r&&(r.setDirection?r.setDirection("sendonly"):r.direction="sendonly",ai.log("Setting audio transceiver to sendonly:",r))}catch(A){ai.error(A)}else if(!I&&C)if(r)try{r.setDirection?r.setDirection("recvonly"):r.direction="recvonly",ai.log("Setting audio transceiver to recvonly:",r)}catch(A){ai.error(A)}else r=n.pc.addTransceiver("audio",{direction:"recvonly"}),ai.log("Adding recvonly audio transceiver:",r)}else if(e.removeAudio&&r)try{r.setDirection?r.setDirection("inactive"):r.direction="inactive",ai.log("Setting audio transceiver to inactive:",r)}catch(A){ai.error(A)}var d=$(e),h=AA(e);if(d||h){if(d&&h){if(s)try{s.setDirection?s.setDirection("sendrecv"):s.direction="sendrecv",ai.log("Setting video transceiver to sendrecv:",s)}catch(A){ai.error(A)}}else if(d&&!h){if(s)try{s.setDirection?s.setDirection("sendonly"):s.direction="sendonly",ai.log("Setting video transceiver to sendonly:",s)}catch(A){ai.error(A)}}else if(!d&&h)if(s)try{s.setDirection?s.setDirection("recvonly"):s.direction="recvonly",ai.log("Setting video transceiver to recvonly:",s)}catch(A){ai.error(A)}else s=n.pc.addTransceiver("video",{direction:"recvonly"}),ai.log("Adding recvonly video transceiver:",s)}else if(e.removeVideo&&s)try{s.setDirection?s.setDirection("inactive"):s.direction="inactive",ai.log("Setting video transceiver to inactive:",s)}catch(A){ai.error(A)}}else o="firefox"==ai.webRTCAdapter.browserDetails.browser||"edge"==ai.webRTCAdapter.browserDetails.browser?{offerToReceiveAudio:z(e),offerToReceiveVideo:AA(e)}:{mandatory:{OfferToReceiveAudio:z(e),OfferToReceiveVideo:AA(e)}};ai.debug(o);var B=$(e);if(B&&a&&"firefox"===ai.webRTCAdapter.browserDetails.browser){ai.log("Enabling Simulcasting for Firefox (RID)");var u=n.pc.getSenders()[1];ai.log(u);var E=u.getParameters();ai.log(E);var f=x(t.simulcastMaxBitrates);u.setParameters({encodings:[{rid:"high",active:!0,priority:"high",maxBitrate:f.high},{rid:"medium",active:!0,priority:"medium",maxBitrate:f.medium},{rid:"low",active:!0,priority:"low",maxBitrate:f.low}]})}n.pc.createAnswer(o).then((function(A){ai.debug(A);var e={type:A.type,sdp:A.sdp};t.customizeSdp(e),A.sdp=e.sdp,ai.log("Setting local description"),B&&a&&("chrome"===ai.webRTCAdapter.browserDetails.browser?ai.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it"):"firefox"!==ai.webRTCAdapter.browserDetails.browser&&ai.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),n.mySdp=A.sdp,n.pc.setLocalDescription(A).catch(t.error),n.mediaConstraints=o,n.iceDone||n.trickle?t.success(A):ai.log("Waiting for all candidates...")}),t.error)}function K(A,e){(e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:ai.noop;var t=y[A];if(null!=t&&null!==t.webrtcStuff&&void 0!==t.webrtcStuff){var i=t.webrtcStuff;ai.log("Sending offer/answer SDP..."),null!==i.mySdp&&void 0!==i.mySdp?(i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1),ai.debug(e),i.sdpSent=!0,e.success(i.mySdp)):ai.warn("Local SDP instance is invalid, not sending anything...")}else ai.warn("Invalid handle, not sending anything")}function V(A,e){var t=y[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return ai.warn("Invalid handle"),0;var i=e?"remote":"local",n=t.webrtcStuff;return n.volume[i]||(n.volume[i]={value:0}),n.pc.getStats&&"chrome"===ai.webRTCAdapter.browserDetails.browser?!e||null!==n.remoteStream&&void 0!==n.remoteStream?e||null!==n.myStream&&void 0!==n.myStream?null===n.volume[i].timer||void 0===n.volume[i].timer?(ai.log("Starting "+i+" volume monitor"),n.volume[i].timer=setInterval((function(){n.pc.getStats((function(A){for(var t=A.result(),a=0;a<t.length;a++){var o=t[a];"ssrc"==o.type&&(e&&o.stat("audioOutputLevel")?n.volume[i].value=parseInt(o.stat("audioOutputLevel")):!e&&o.stat("audioInputLevel")&&(n.volume[i].value=parseInt(o.stat("audioInputLevel"))))}}))}),200),0):n.volume[i].value:(ai.warn("Local stream unavailable"),0):(ai.warn("Remote stream unavailable"),0):(ai.warn("Getting the "+i+" volume unsupported by browser"),0)}function O(A,e){var t=y[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return ai.warn("Invalid handle"),!0;var i=t.webrtcStuff;return null===i.pc||void 0===i.pc?(ai.warn("Invalid PeerConnection"),!0):void 0===i.myStream||null===i.myStream?(ai.warn("Invalid local MediaStream"),!0):e?null===i.myStream.getVideoTracks()||void 0===i.myStream.getVideoTracks()||0===i.myStream.getVideoTracks().length?(ai.warn("No video track"),!0):!i.myStream.getVideoTracks()[0].enabled:null===i.myStream.getAudioTracks()||void 0===i.myStream.getAudioTracks()||0===i.myStream.getAudioTracks().length?(ai.warn("No audio track"),!0):!i.myStream.getAudioTracks()[0].enabled}function j(A,e,t){var i=y[A];if(null==i||null===i.webrtcStuff||void 0===i.webrtcStuff)return ai.warn("Invalid handle"),!1;var n=i.webrtcStuff;return null===n.pc||void 0===n.pc?(ai.warn("Invalid PeerConnection"),!1):void 0===n.myStream||null===n.myStream?(ai.warn("Invalid local MediaStream"),!1):e?null===n.myStream.getVideoTracks()||void 0===n.myStream.getVideoTracks()||0===n.myStream.getVideoTracks().length?(ai.warn("No video track"),!1):(n.myStream.getVideoTracks()[0].enabled=!t,!0):null===n.myStream.getAudioTracks()||void 0===n.myStream.getAudioTracks()||0===n.myStream.getAudioTracks().length?(ai.warn("No audio track"),!1):(n.myStream.getAudioTracks()[0].enabled=!t,!0)}function W(A){var e=y[A];if(null==e||null===e.webrtcStuff||void 0===e.webrtcStuff)return ai.warn("Invalid handle"),"Invalid handle";var t=e.webrtcStuff;return null===t.pc||void 0===t.pc?"Invalid PeerConnection":t.pc.getStats?null===t.bitrate.timer||void 0===t.bitrate.timer?(ai.log("Starting bitrate timer (via getStats)"),t.bitrate.timer=setInterval((function(){t.pc.getStats().then((function(A){A.forEach((function(A){if(A){var e=!1;if(("video"===A.mediaType||A.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===A.type&&A.id.indexOf("rtcp")<0?e=!0:"ssrc"!=A.type||!A.bytesReceived||"VP8"!==A.googCodecName&&""!==A.googCodecName||(e=!0),e)if(t.bitrate.bsnow=A.bytesReceived,t.bitrate.tsnow=A.timestamp,null===t.bitrate.bsbefore||null===t.bitrate.tsbefore)t.bitrate.bsbefore=t.bitrate.bsnow,t.bitrate.tsbefore=t.bitrate.tsnow;else{var i=t.bitrate.tsnow-t.bitrate.tsbefore;"safari"==ai.webRTCAdapter.browserDetails.browser&&(i/=1e3);var n=Math.round(8*(t.bitrate.bsnow-t.bitrate.bsbefore)/i);"safari"===ai.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),t.bitrate.value=n+" kbits/sec",t.bitrate.bsbefore=t.bitrate.bsnow,t.bitrate.tsbefore=t.bitrate.tsnow}}}))}))}),1e3),"0 kbits/sec"):t.bitrate.value:(ai.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser")}function Z(A){ai.error("WebRTC error:",A)}function X(A,e){ai.log("Cleaning WebRTC stuff");var n=y[A];if(null!=n){var a=n.webrtcStuff;if(null!=a){if(!0===e){var o={rtcgw:"hangup",transaction:ai.randomString(12)};null!==n.token&&void 0!==n.token&&(o.token=n.token),null!=E&&(o.apisecret=E),ai.debug("Sending hangup request (handle="+A+"):"),ai.debug(o),t?(o.session_id=m,o.handle_id=A,i.send(JSON.stringify(o))):ai.httpAPICall(s+"/"+m+"/"+A,{verb:"POST",withCredentials:h,body:o})}a.remoteStream=null,a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer)),a.volume={},a.bitrate.timer&&clearInterval(a.bitrate.timer),a.bitrate.timer=null,a.bitrate.bsnow=null,a.bitrate.bsbefore=null,a.bitrate.tsnow=null,a.bitrate.tsbefore=null,a.bitrate.value=null;try{if(!a.streamExternal&&null!==a.myStream&&void 0!==a.myStream){ai.log("Stopping local stream tracks");var r=a.myStream.getTracks();for(var g in r){var c=r[g];ai.log(c),null!=c&&c.stop()}}}catch(A){}a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(A){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null}n.oncleanup()}}function q(A){return ai.debug("isAudioSendEnabled:",A),null==A||!1!==A.audio&&(void 0===A.audioSend||null===A.audioSend||!0===A.audioSend)}function z(A){return ai.debug("isAudioRecvEnabled:",A),null==A||!1!==A.audio&&(void 0===A.audioRecv||null===A.audioRecv||!0===A.audioRecv)}function $(A){return ai.debug("isVideoSendEnabled:",A),null==A||!1!==A.video&&(void 0===A.videoSend||null===A.videoSend||!0===A.videoSend)}function AA(A){return ai.debug("isVideoRecvEnabled:",A),null==A||!1!==A.video&&(void 0===A.videoRecv||null===A.videoRecv||!0===A.videoRecv)}function eA(A){return ai.debug("isDataEnabled:",A),"edge"==ai.webRTCAdapter.browserDetails.browser?(ai.warn("Edge doesn't support data channels yet"),!1):null!=A&&!0===A.data}F(A),this.getServer=function(){return s},this.isConnected=function(){return p},this.reconnect=function(A){(A=A||{}).success="function"==typeof A.success?A.success:ai.noop,A.error="function"==typeof A.error?A.error:ai.noop,A.reconnect=!0,F(A)},this.getSessionId=function(){return m},this.destroy=function(e){!function(e){e=e||{},e.success="function"==typeof e.success?e.success:ai.noop;var o=!0;void 0!==e.asyncRequest&&null!==e.asyncRequest&&(o=!0===e.asyncRequest);var r=!0;void 0!==e.notifyDestroyed&&null!==e.notifyDestroyed&&(r=!0===e.notifyDestroyed);var g=!1;void 0!==e.cleanupHandles&&null!==e.cleanupHandles&&(g=!0===e.cleanupHandles);if(ai.log("Destroying session "+m+" (async="+o+")"),!p)return ai.warn("Is the server down? (connected=false)"),void e.success();if(null==m)return ai.warn("No session to destroy"),e.success(),void(r&&A.destroyed());if(g)for(var c in y)M(c,{noRequest:!0});var l={rtcgw:"destroy",transaction:ai.randomString(12)};null!=u&&(l.token=u);null!=E&&(l.apisecret=E);if(t){l.session_id=m;var I=function(){for(var A in n)i.removeEventListener(A,n[A]);i.removeEventListener("message",C),i.removeEventListener("error",d),a&&clearTimeout(a),i.close()},C=function(t){var i=JSON.parse(t.data);i.session_id==l.session_id&&i.transaction==l.transaction&&(I(),e.success(),r&&A.destroyed())},d=function(t){I(),e.error("Failed to destroy the server: Is the server down?"),r&&A.destroyed()};return i.addEventListener("message",C),i.addEventListener("error",d),void i.send(JSON.stringify(l))}ai.httpAPICall(s+"/"+m,{verb:"POST",async:o,withCredentials:h,body:l,success:function(t){ai.log("Destroyed session:"),ai.debug(t),m=null,p=!1,"success"!==t.rtcgw&&ai.error("Ooops: "+t.error.code+" "+t.error.reason),e.success(),r&&A.destroyed()},error:function(t,i){ai.error(t+":",i),m=null,p=!1,e.success(),r&&A.destroyed()}})}(e)},this.attach=function(A){!function(A){if(A=A||{},A.success="function"==typeof A.success?A.success:ai.noop,A.error="function"==typeof A.error?A.error:ai.noop,A.consentDialog="function"==typeof A.consentDialog?A.consentDialog:ai.noop,A.iceState="function"==typeof A.iceState?A.iceState:ai.noop,A.mediaState="function"==typeof A.mediaState?A.mediaState:ai.noop,A.webrtcState="function"==typeof A.webrtcState?A.webrtcState:ai.noop,A.slowLink="function"==typeof A.slowLink?A.slowLink:ai.noop,A.onmessage="function"==typeof A.onmessage?A.onmessage:ai.noop,A.onlocalstream="function"==typeof A.onlocalstream?A.onlocalstream:ai.noop,A.onremotestream="function"==typeof A.onremotestream?A.onremotestream:ai.noop,A.ondata="function"==typeof A.ondata?A.ondata:ai.noop,A.ondataopen="function"==typeof A.ondataopen?A.ondataopen:ai.noop,A.oncleanup="function"==typeof A.oncleanup?A.oncleanup:ai.noop,A.ondetached="function"==typeof A.ondetached?A.ondetached:ai.noop,!p)return ai.warn("Is the server down? (connected=false)"),void A.error("Is the server down? (connected=false)");var e=A.plugin;if(null==e)return ai.error("Invalid plugin"),void A.error("Invalid plugin");var n=A.opaqueId,a=A.token?A.token:u,o=ai.randomString(12),r={rtcgw:"attach",plugin:e,opaque_id:n,transaction:o};null!=a&&(r.token=a);null!=E&&(r.apisecret=E);if(t)return D[o]=function(t){if(ai.debug(t),"success"!==t.rtcgw)return ai.error("Ooops: "+t.error.code+" "+t.error.reason),void A.error("Ooops: "+t.error.code+" "+t.error.reason);var i=t.data.id;ai.log("Created handle: "+i);var n={session:_,plugin:e,id:i,token:a,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function(){return i},getPlugin:function(){return e},getVolume:function(){return V(i,!0)},getRemoteVolume:function(){return V(i,!0)},getLocalVolume:function(){return V(i,!1)},isAudioMuted:function(){return O(i,!1)},muteAudio:function(){return j(i,!1,!0)},unmuteAudio:function(){return j(i,!1,!1)},isVideoMuted:function(){return O(i,!0)},muteVideo:function(){return j(i,!0,!0)},unmuteVideo:function(){return j(i,!0,!1)},getBitrate:function(){return W(i)},send:function(A){R(i,A)},data:function(A){N(i,A)},dtmf:function(A){T(i,A)},consentDialog:A.consentDialog,iceState:A.iceState,mediaState:A.mediaState,webrtcState:A.webrtcState,slowLink:A.slowLink,onmessage:A.onmessage,createOffer:function(A){G(i,!0,A)},createAnswer:function(A){G(i,!1,A)},handleRemoteJsep:function(A){U(i,A)},onlocalstream:A.onlocalstream,onremotestream:A.onremotestream,ondata:A.ondata,ondataopen:A.ondataopen,oncleanup:A.oncleanup,ondetached:A.ondetached,hangup:function(A){X(i,!0===A)},detach:function(A){M(i,A)}};y[i]=n,A.success(n)},r.session_id=m,void i.send(JSON.stringify(r));ai.httpAPICall(s+"/"+m,{verb:"POST",withCredentials:h,body:r,success:function(t){if(ai.debug(t),"success"!==t.rtcgw)return ai.error("Ooops: "+t.error.code+" "+t.error.reason),void A.error("Ooops: "+t.error.code+" "+t.error.reason);var i=t.data.id;ai.log("Created handle: "+i);var n={session:_,plugin:e,id:i,token:a,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function(){return i},getPlugin:function(){return e},getVolume:function(){return V(i,!0)},getRemoteVolume:function(){return V(i,!0)},getLocalVolume:function(){return V(i,!1)},isAudioMuted:function(){return O(i,!1)},muteAudio:function(){return j(i,!1,!0)},unmuteAudio:function(){return j(i,!1,!1)},isVideoMuted:function(){return O(i,!0)},muteVideo:function(){return j(i,!0,!0)},unmuteVideo:function(){return j(i,!0,!1)},getBitrate:function(){return W(i)},send:function(A){R(i,A)},data:function(A){N(i,A)},dtmf:function(A){T(i,A)},consentDialog:A.consentDialog,iceState:A.iceState,mediaState:A.mediaState,webrtcState:A.webrtcState,slowLink:A.slowLink,onmessage:A.onmessage,createOffer:function(A){G(i,!0,A)},createAnswer:function(A){G(i,!1,A)},handleRemoteJsep:function(A){U(i,A)},onlocalstream:A.onlocalstream,onremotestream:A.onremotestream,ondata:A.ondata,ondataopen:A.ondataopen,oncleanup:A.oncleanup,ondetached:A.ondetached,hangup:function(A){X(i,!0===A)},detach:function(A){M(i,A)}};y[i]=n,A.success(n)},error:function(A,e){ai.error(A+":",e)}})}(A)}}ai.useDefaultDependencies=function(A){var e=A&&A.fetch||fetch,t=A&&A.Promise||Promise,i=A&&A.WebSocket||WebSocket;return{newWebSocket:function(A,e){return new i(A,e)},extension:A&&A.extension||ni,isArray:function(A){return Array.isArray(A)},webRTCAdapter:A&&A.adapter||window.adapter,httpAPICall:function(A,i){var n={method:i.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===i.verb&&(n.headers["Content-Type"]="application/json"),void 0!==i.withCredentials&&(n.credentials=!0===i.withCredentials?"include":i.withCredentials?i.withCredentials:"omit"),void 0!==i.body&&(n.body=JSON.stringify(i.body));var a=e(A,n).catch((function(A){return t.reject({message:"Probably a network error, is the server down?",error:A})}));if(void 0!==i.timeout){var o=new t((function(A,e){var t=setTimeout((function(){return clearTimeout(t),e({message:"Request timed out",timeout:i.timeout})}),i.timeout)}));a=t.race([a,o])}return a.then((function(A){return A.ok?d(i.success)===d(ai.noop)?A.json().then((function(A){i.success(A)})).catch((function(e){return t.reject({message:"Failed to parse response body",error:e,response:A})})):void 0:t.reject({message:"API call failed",response:A})})).catch((function(A){d(i.error)===d(ai.noop)&&i.error(A.message||"<< internal error >>",A)})),a}}},ai.useOldDependencies=function(A){var e=A&&A.jQuery||jQuery,t=A&&A.WebSocket||WebSocket;return{newWebSocket:function(A,e){return new t(A,e)},isArray:function(A){return e.isArray(A)},extension:A&&A.extension||ni,webRTCAdapter:A&&A.adapter||adapter,httpAPICall:function(A,t){var i=void 0!==t.body?{contentType:"application/json",data:JSON.stringify(t.body)}:{},n=void 0!==t.withCredentials?{xhrFields:{withCredentials:t.withCredentials}}:{};return e.ajax(e.extend(i,n,{url:A,type:t.verb,cache:!1,dataType:"json",async:t.async,timeout:t.timeout,success:function(A){d(t.success)===d(ai.noop)&&t.success(A)},error:function(A,e,i){d(t.error)===d(ai.noop)&&t.error(e,i)}}))}}},ai.noop=function(){},ai.dataChanDefaultLabel="JanusDataChannel",ai.endOfCandidates=null,ai.init=function(A){if((A=A||{}).callback="function"==typeof A.callback?A.callback:ai.noop,!0===ai.initDone)A.callback();else{if("undefined"!=typeof console&&void 0!==console.log||(console={log:function(){}}),ai.trace=ai.noop,ai.debug=ai.noop,ai.vdebug=ai.noop,ai.log=ai.noop,ai.warn=ai.noop,ai.error=ai.noop,!0===A.debug||"all"===A.debug)ai.trace=console.trace.bind(console),ai.debug=console.debug.bind(console),ai.vdebug=console.debug.bind(console),ai.log=console.log.bind(console),ai.warn=console.warn.bind(console),ai.error=console.error.bind(console);else if(Array.isArray(A.debug))for(var e in A.debug){var t=A.debug[e];switch(t){case"trace":ai.trace=console.trace.bind(console);break;case"debug":ai.debug=console.debug.bind(console);break;case"vdebug":ai.vdebug=console.debug.bind(console);break;case"log":ai.log=console.log.bind(console);break;case"warn":ai.warn=console.warn.bind(console);break;case"error":ai.error=console.error.bind(console);break;default:console.error("Unknown debugging option '"+t+"' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')")}}var i=A.dependencies||ai.useDefaultDependencies();ai.isArray=i.isArray,ai.webRTCAdapter=i.webRTCAdapter,ai.httpAPICall=i.httpAPICall,ai.newWebSocket=i.newWebSocket,ai.extension=i.extension,ai.extension.init(),ai.listDevices=function(A,e){A="function"==typeof A?A:ai.noop,null==e&&(e={audio:!0,video:!0}),ai.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(e).then((function(e){navigator.mediaDevices.enumerateDevices().then((function(t){ai.debug(t),A(t);try{var i=e.getTracks();for(var n in i){var a=i[n];null!=a&&a.stop()}}catch(A){}}))})).catch((function(e){ai.error(e),A([])})):(ai.warn("navigator.mediaDevices unavailable"),A([]))},ai.attachMediaStream=function(A,e){"chrome"===ai.webRTCAdapter.browserDetails.browser?ai.webRTCAdapter.browserDetails.version>=52?A.srcObject=e:ai.error("Error attaching stream to element"):A.srcObject=e},ai.reattachMediaStream=function(A,e){"chrome"===ai.webRTCAdapter.browserDetails.browser?ai.webRTCAdapter.browserDetails.version>=52?A.srcObject=e.srcObject:void 0!==A.src?A.src=e.src:ai.error("Error reattaching stream to element"):A.srcObject=e.srcObject};var n=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",a=window["on"+n];if(window.addEventListener(n,(function(A){for(var e in ai.log("Closing window"),ai.sessions)null!==ai.sessions[e]&&void 0!==ai.sessions[e]&&ai.sessions[e].destroyOnUnload&&(ai.log("Destroying session "+e),ai.sessions[e].destroy({asyncRequest:!1,notifyDestroyed:!1}));a&&"function"==typeof a&&a()})),ai.safariVp8=!1,"safari"===ai.webRTCAdapter.browserDetails.browser&&ai.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(var e in RTCRtpSender.getCapabilities("video").codecs){var o=RTCRtpSender.getCapabilities("video").codecs[e];if(o&&o.mimeType&&"video/vp8"===o.mimeType.toLowerCase()){ai.safariVp8=!0;break}}ai.safariVp8?ai.log("This version of Safari supports VP8"):ai.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 r=new RTCPeerConnection({},{});r.createOffer({offerToReceiveVideo:!0}).then((function(A){ai.safariVp8=-1!==A.sdp.indexOf("VP8"),ai.safariVp8?ai.log("This version of Safari supports VP8"):ai.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"),r.close(),r=null}))}if(ai.unifiedPlan=!1,"firefox"===ai.webRTCAdapter.browserDetails.browser&&ai.webRTCAdapter.browserDetails.version>=59)ai.unifiedPlan=!0;else if("chrome"===ai.webRTCAdapter.browserDetails.browser&&ai.webRTCAdapter.browserDetails.version<72)ai.unifiedPlan=!1;else if("undefined"==typeof RTCRtpTransceiver||"currentDirection"in RTCRtpTransceiver.prototype){var s=new RTCPeerConnection;try{s.addTransceiver("audio"),ai.unifiedPlan=!0}catch(A){}s.close()}else ai.unifiedPlan=!1;ai.initDone=!0,A.callback()}},ai.isWebrtcSupported=function(){return void 0!==window.RTCPeerConnection&&null!==window.RTCPeerConnection},ai.isGetUserMediaAvailable=function(){return void 0!==navigator.mediaDevices&&null!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia&&null!==navigator.mediaDevices.getUserMedia},ai.randomString=function(A){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",i=0;i<A;i++){var n=Math.floor(62*Math.random());t+=e.substring(n,n+1)}return t},window.Janus_Talk=ai;var oi=window.Janus_Talk,ri=null,si=null,gi="tts-"+Janus_Talk.randomString(12),ci=null;oi.init({debug:"all",callback:function(){window.stopTalk=function(){ri.destroy()},window.startTalk=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=A.customizeStream,t=void 0===e?null:e,i=A.audio,n=void 0===i||i;oi.isWebrtcSupported()?ri=new oi({server:window.EZUIKit.opt.rtcUrl,success:function(){ri.attach({plugin:"rtcgw.plugin.tts",opaqueId:gi,success:function(A){si=window.tts=A,oi.log("Plugin attached! ("+si.getPlugin()+", id="+si.getId()+")");var e=window.EZUIKit.opt.talkLink;console.log("ttsUlr",e);var i={request:"start",url:e,codec:"opus",dir:"sendrecv",audio_debug:1,url_version:"1"};"gb28181"===window.EZUIKit.opt.talkType&&(i.devProto="gb28181"),oi.debug("Trying a createOffer too (audio/video sendrecv)"),si.createOffer({media:{audio:n||!0,video:!1,data:!1},simulcast:!1,simulcast2:!1,customizeStream:t,success:function(A){oi.debug("Got SDP!"),oi.debug(A),si.send({message:i,jsep:A}),void 0!==window.EZUIKit.handleTalkSuccess&&window.EZUIKit.handleTalkSuccess()},error:function(A){oi.error("WebRTC error:",A),void 0!==window.EZUIKit.handleTalkError&&window.EZUIKit.handleTalkError(A)}})},error:function(A){console.error(" -- Error attaching plugin...",A),bootbox.alert("Error attaching plugin... "+A),"undefined"!==window.EZUIKit.handleTalkError&&window.EZUIKit.handleTalkError(A)},consentDialog:function(A){oi.debug("Consent dialog should be "+(A?"on":"off")+" now")},iceState:function(A){oi.log("ICE state changed to "+A)},mediaState:function(A,e){oi.log("Janus "+(e?"started":"stopped")+" receiving our "+A)},webrtcState:function(A){oi.log("Janus says our WebRTC PeerConnection is "+(A?"up":"down")+" now")},slowLink:function(A,e){oi.warn("Janus reports problems "+(A?"sending":"receiving")+" packets on this PeerConnection ("+e+" lost packets)")},onmessage:function(A,e){oi.debug(" ::: Got a message :::"),oi.debug(A),null!=e&&(oi.debug("Handling SDP as well..."),oi.debug(e),si.handleRemoteJsep({jsep:e}));var t=A.result;if(null!=t){if("done"===t)return bootbox.alert("The TTS Test is over"),null!=ci&&ci.stop(),void(ci=null);"msg"===t&&void 0!==window.EZUIKit.handleTalkMessage&&window.EZUIKit.handleTalkMessage(A),"slow_link"===t.status&&toastr.warning("Janus apparently missed many packets we sent, maybe we should reduce the bitrate","Packet loss?",{timeOut:2e3})}},onlocalstream:function(A){oi.debug(" ::: Got a local stream :::"),oi.debug(A),oi.attachMediaStream(document.getElementById("myaudio"),A),"completed"!==si.webrtcStuff.pc.iceConnectionState&&"connected"!==si.webrtcStuff.pc.iceConnectionState&&(null==ci?document.getElementById("audioright"):ci.spin());var e=A.getAudioTracks();null==e||e.length},onremotestream:function(A){oi.debug(" ::: Got a remote stream :::"),oi.debug(A),oi.attachMediaStream(document.getElementById("peeraudio"),A);var e=A.getAudioTracks();null==e||0===e.length||document.getElementById("peeraudio").play()},ondataopen:function(A){oi.log("The DataChannel is available!")},ondata:function(A){oi.debug("We got data from the DataChannel! "+A)},oncleanup:function(){oi.log(" ::: Got a cleanup notification :::"),null!=ci&&ci.stop(),ci=null}})},error:function(A){oi.error(A),"undefined"!==window.EZUIKit.handleTalkError&&window.EZUIKit.handleTalkError(A)},destroyed:function(){}}):bootbox.alert("No WebRTC support... ")}}});var li=function(){return o((function A(e){var i=this;t(this,A),this.jSPlugin=e,this.pluginStatus=new J(this,this.jSPlugin.params.id),this.talkChannelNo=e.talkChannelNo,this.gainNode=null,this.volumeGain=null,this.volumeChangeInterval=null,this.microphoneId=null;var n=document.createElement("div");n.id="audioright",n.style="display:none;";var a=document.createElement("audio");a.id="peeraudio",a.setAttribute("autoplay",!0),a.setAttribute("controls",!0),n.appendChild(a),window.EZUIKit.handleTalkError=function(A){console.log("talk err",A),void 0!==i.jSPlugin.handleTalkError&&i.jSPlugin.handleTalkError(A)},window.EZUIKit.handleTalkSuccess=function(A){console.log("talk success",A),void 0!==i.jSPlugin.handleTalkSuccess&&i.jSPlugin.handleTalkSuccess(A)},window.EZUIKit.opt={rtcUrl:"",talkLink:"",ttsUrl:"",stream:"",deviceSerial:_(this.jSPlugin.url).deviceSerial,channelNo:_(this.jSPlugin.url).channelNo},this.audioRight=n,document.body.appendChild(n)}),[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"destroy",value:function(){document.body.removeChild(this.audioRight)}},{key:"startTalk",value:function(A){var e=this,t=this;new Promise((function(A,t){e.jSPlugin.capacity&&e.jSPlugin.capacity.support_switch_talkmode&&"1"==e.jSPlugin.capacity.support_switch_talkmode?fetch(e.jSPlugin.env.domain+"/api/service/device/talkMode"+"?deviceSerial=".concat(_(e.jSPlugin.url).deviceSerial),{method:"GET",headers:{accessToken:e.jSPlugin.accessToken||e.jSPlugin.token.deviceToken.global}}).then((function(A){return A.json()})).then((function(t){t.meta&&200==t.meta.code?t.data&&t.data.valueInfo&&0==t.data.valueInfo.mode?fetch(e.jSPlugin.env.domain+"/api/v3/device/talkMode"+"?deviceSerial=".concat(_(e.jSPlugin.url).deviceSerial,"&channelNo=").concat(_(e.jSPlugin.url).channelNo,"&mode=1"),{method:"PUT",headers:{accessToken:e.jSPlugin.accessToken||e.jSPlugin.token.deviceToken.video}}).then((function(A){return A.json()})).then((function(e){e.meta&&200==e.meta.code?A():A({code:-1,msg:"对讲模式切换失败",res:e})})).catch((function(e){A({code:-1,msg:"对讲模式切换失败",res:e})})):A():A({code:-1,msg:"获取当前对讲模式失败",res:t})})).catch((function(e){A({code:-1,msg:"获取当前对讲模式失败",res:e})})):A({code:-1,msg:"当前设备不支持对讲模式切换"})})).then((function(i){if(e.jSPlugin.capacity&&e.jSPlugin.capacity.support_talk&&(!e.jSPlugin.capacity||"3"!==e.jSPlugin.capacity.support_talk&&"1"!==e.jSPlugin.capacity.support_talk))return"function"==typeof e.jSPlugin.params.handleError&&(e.pluginStatus.loadingSetText({text:"设备不支持对讲",color:"red",delayClear:2e3}),e.jSPlugin.params.handleError({msg:"设备不支持对讲",retcode:-1e3,id:e.jSPlugin.params.id,type:"handleError"})),console.log("设备不支持对讲"),!1;var n=new FormData;if(n.append("accessToken",e.jSPlugin.accessToken||e.jSPlugin.token.deviceToken.video),n.append("deviceSerial",_(e.jSPlugin.url).deviceSerial),n.append("channelNo",e.jSPlugin.channelNo||"0"),e.jSPlugin.params.extraParams&&e.jSPlugin.params.extraParams.talkParams&&"object"===d(e.jSPlugin.params.extraParams.talkParams))for(var a in e.jSPlugin.params.extraParams.talkParams)data.append(a,e.jSPlugin.params.extraParams.talkParams[a]);fetch(e.jSPlugin.env.domain+"/api/lapp/live/talk/url",{method:"POST",body:n}).then((function(A){return A.json()})).then((function(i){if(200==i.code){var n=i.data;if(n){var a=n.rtcUrl;if(-1===a.indexOf("ws")&&(a=a.replace("https","wss").replace("rtcgw","rtcgw-ws")),window.EZUIKit.opt.rtcUrl=a,window.EZUIKit.opt.ttsUrl="tts://"+n.ttsUrl,e.jSPlugin.params.extraParams&&e.jSPlugin.params.extraParams.ttsParams)if("string"==typeof e.jSPlugin.params.extraParams.ttsParams)window.EZUIKit.opt.ttsUrl+="&"+e.jSPlugin.params.extraParams.ttsParams;else if("object"===d(e.jSPlugin.params.extraParams.ttsParams))for(var o in e.jSPlugin.params.extraParams.ttsParams)window.EZUIKit.opt.ttsUrl+="&"+o+"="+e.jSPlugin.params.extraParams.ttsParams[o];window.EZUIKit.opt.deviceSerial=_(e.jSPlugin.url).deviceSerial,window.EZUIKit.opt.channelNo=e.talkChannelNo||"0";var r="talk?dev="+window.EZUIKit.opt.deviceSerial+"&chann="+window.EZUIKit.opt.channelNo+"&encodetype=2";window.EZUIKit.opt.talkLink=window.EZUIKit.opt.ttsUrl.split("?")[0]+"/"+r,n.ttsUrl.indexOf("gb28181")>-1&&(window.EZUIKit.opt.talkType="gb28181"),A&&A(n.ttsUrl.indexOf("gb28181")>-1||-1!==window.EZUIKit.opt.deviceSerial.indexOf(":")),window.EZUIKit.opt.stream=e.jSPlugin.accessToken?n.stream:e.jSPlugin.token.streamToken.talk,window.startTalk({customizeStream:t._customizeStream.bind(t),audio:!e.microphoneId||{deviceId:e.microphoneId}}),e.observeVolumeChange(),e.jSPlugin.eventEmitter&&e.jSPlugin.eventEmitter.emit("startTalk",{eventType:"startTalk",code:0,target:e,msg:"开启对讲"})}}else console.log(i.code,e.jSPlugin.i18n.t("38"+i.code)),e.pluginStatus.loadingSetText({text:i.msg||e.jSPlugin.i18n.t("38"+i.code),color:"red",delayClear:2e3}),e.jSPlugin.eventEmitter&&e.jSPlugin.eventEmitter.emit("startTalk",{eventType:"startTalk",code:-1,target:e,msg:i.msg||e.jSPlugin.i18n.t("38"+i.code)}),"function"==typeof e.jSPlugin.params.handleError&&e.jSPlugin.params.handleError({msg:i.msg||e.jSPlugin.i18n.t("38"+i.code),retcode:i.code,id:e.jSPlugin.params.id,type:"handleError"})})).catch((function(A){console.log("err",A)}))})).catch((function(A){console.log("对讲开启失败:",A)}))}},{key:"stopTalk",value:function(){var A=this;try{window.stopTalk()}catch(A){console.log("stopTalk error:",A)}this.gainNode=null,clearInterval(this.volumeChangeInterval),this.volumeChangeInterval=null,this.jSPlugin.eventEmitter&&(setTimeout((function(){A.jSPlugin.eventEmitter.emit("volumeChange",{eventType:"volumeChange",code:0,target:A,data:0,msg:"音量变化"})}),200),this.jSPlugin.eventEmitter.emit("stopTalk",{eventType:"stopTalk",code:0,target:this,msg:"结束对讲"})),document.getElementById("myaudio")&&document.getElementById("myaudio").srcObject&&document.getElementById("myaudio").srcObject.getTracks()[0].stop()}},{key:"changeTalkChannelNo",value:function(A){window.EZUIKit.opt&&window.EZUIKit.opt.channelNo&&(this.talkChannelNo=A,window.EZUIKit.opt.channelNo=A)}},{key:"_customizeStream",value:function(A){var e=this;return new Promise((function(t,i){var n,a=new window.AudioContext;e.gainNode=a.createGain();var o=a.createMediaStreamSource(A);e.gainNode.gain.value=null!==(n=e.volumeGain)&&void 0!==n?n:1;var r=a.createMediaStreamDestination();o.connect(e.gainNode),e.gainNode.connect(r),t(r.stream)}))}},{key:"setVolumeGain",value:function(A){var e=["",null].includes(A)?1:Number(A);return"number"==typeof e&&e>=0?(this.volumeGain=Math.min(e,10),this.gainNode&&(this.gainNode.gain.value=this.volumeGain),{code:0,msg:"成功",res:null}):{code:-1,msg:"参数格式有误",res:null}}},{key:"observeVolumeChange",value:function(){var A=this,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).interval,t=void 0===e?100:e;this.volumeChangeInterval&&(clearInterval(volumeChangeInterval),volumeChangeInterval=null),this.volumeChangeInterval=setInterval((function(){var e,t,i,n,a;null===(e=window.tts)||void 0===e||null===(t=e.webrtcStuff)||void 0===t||null===(i=t.pc)||void 0===i||null===(n=i.getStats)||void 0===n||null===(a=n.call(i))||void 0===a||a.then((function(e){e.forEach((function(e){var t,i;"media-source"===e.type&&(null===(t=A.jSPlugin)||void 0===t||null===(i=t.eventEmitter)||void 0===i||i.emit("volumeChange",{eventType:"volumeChange",code:0,target:A,data:e.audioLevel,msg:"音量变化"}))}))}))}),t)}},{key:"getMicrophonePermission",value:function(){return new Promise((function(A,e){navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){e.getTracks().forEach((function(A){A.stop()})),A({code:0,msg:"成功",res:null})})).catch((function(e){A({code:-1,msg:"获取麦克风权限失败",res:e})}))}))}},{key:"getMicrophonesList",value:function(){return new Promise((function(A,e){navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then((function(e){var t=[];e.map((function(A){"audioinput"==A.kind&&t.push(A)})),A({code:0,msg:"成功",res:t})})):A({code:-1,msg:"未查询到相关设备",res:null})}))}},{key:"setProfile",value:function(A){var e=this,t=A.microphoneId;t!==this.microphoneId&&(this.microphoneId=t,this.gainNode&&(window.stopTalk(),setTimeout((function(){window.startTalk({customizeStream:e._customizeStream.bind(e),audio:!e.microphoneId||{deviceId:e.microphoneId}})}),200)))}}])}(),Ii=function(){function A(e){var i=this;t(this,A),this.jSPlugin=e,this.pluginStatus=new J(this,this.jSPlugin.id),A._instanceStyle();var n=document.createElement("div");n.className="mobile-ez-ptz-container",n.id="mobile-ez-ptz-container";var a=window.innerHeight;n.style="display:inline-block;width: ".concat(this.jSPlugin.width,"px;text-align:center;height: ").concat(a-this.jSPlugin.height-5,"px");var o=document.createElement("div");o.className="live-ptz-title",o.id="live-ptz-title",o.innerHTML=this.jSPlugin.i18n.t("BTN_PTZ"),document.getElementById("live-ptz-title")||n.appendChild(o);var r=document.createElement("div");r.className="live-ptz-intro",r.id="live-ptz-intro",r.innerHTML=this.jSPlugin.i18n.t("MOBILE_PTZ_TIPS"),document.getElementById("live-ptz-intro")||n.appendChild(r);var s=document.createElement("div");s.id="mobile-ez-ptz-item",s.className="mobile-ez-ptz-wrap",s.innerHTML='\n <div class="mobile-ez-ptz-container" id="mobile-ez-ptz-container">\n <div class="ez-ptz-main center"></div>\n <div class="mobile-ez-ptz-icon top default"></div>\n <div class="mobile-ez-ptz-icon left default"></div>\n <div class="mobile-ez-ptz-icon bottom default"></div>\n <div class="mobile-ez-ptz-icon right default"></div>\n </div>\n ',document.getElementById("mobile-ez-ptz-item")||n.appendChild(s),m(n,document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),document.getElementById("mobile-ez-ptz-item").ontouchstart=function(A){A.preventDefault(),console.log("触摸开始"),i._handlePtzTouch(A,"start")},document.getElementById("mobile-ez-ptz-item").ontouchend=function(A){A.preventDefault(),console.log("触摸结束",A),i._handlePtzTouch(A,"stop")},document.getElementById("mobile-ez-ptz-item").onmousedown=function(A){A.preventDefault(),console.log("触摸开始"),i._handlePtzTouch(A,"start")},document.getElementById("mobile-ez-ptz-item").onmouseup=function(A){A.preventDefault(),console.log("触摸结束",A),i._handlePtzTouch(A,"stop")}}return o(A,[{key:"show",value:function(){document.getElementById("mobile-ez-ptz-container").style="display: inline-block"}},{key:"hide",value:function(){document.getElementById("mobile-ez-ptz-container").style="display: none"}},{key:"_handlePtzTouch",value:function(A,e){var t=this,i=document.getElementById("mobile-ez-ptz-item").getBoundingClientRect(),n=i.left+130,a=i.top+130,o=(A.x||A.changedTouches[0].clientX)-n,r=(A.y||A.changedTouches[0].clientY)-a,s=0,g=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start",c=this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video;Math.abs(o)>Math.abs(r)?o>0?(s=3,document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("default","active")):(s=2,document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("default","active")):r>0?(s=1,document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("default","active")):(s=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(0===s?180:1===s?0:2===s?90:270,"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)"),"stop"===e&&(g=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",c=this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,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 l=new FormData;l.append("deviceSerial",_(this.jSPlugin.url).deviceSerial),l.append("channelNo",_(this.jSPlugin.url).channelNo),l.append("speed",1),l.append("direction",s),l.append("accessToken",c),fetch(g,{method:"POST",body:l}).then((function(A){return A.json()})).then((function(A){if(200==A.code);else{console.log(A.code,t.jSPlugin.i18n.t("38"+A.code));var e=t.jSPlugin.i18n.t("38"+A.code)||A.msg;t.pluginStatus.loadingSetText({text:e,color:"red",delayClear:2e3}),60005!=A.code&&60002!=A.code&&60003!=A.code&&60004!=A.code||(document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(0===s?180:1===s?0:2===s?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"))}})).catch((function(A){console.log("云台调用异常",A)}))}}],[{key:"_instanceStyle",value:function(){A._STYLE||(A._STYLE=document.createElement("style"),A._STYLE.innerHTML="\n body{\n padding: 0;\n margin: 0;\n }\n #mobile-ez-ptz-container {\n display: inline-block;\n width: 375px;\n text-align: center;\n }\n .live-ptz-title{\n height: 25px;\n font-size: 18px;\n color: #2c2c2c;\n text-align: center;\n font-weight: 700;\n margin: 24px 0 12px;\n }\n .live-ptz-intro {\n margin-bottom: 24px;\n color: #aaaaaa;\n }\n .mobile-ez-ptz-wrap {\n background-image: linear-gradient(180deg, #f6f8ff 0%, #ededed6b 50%)\n }\n #mobile-ez-ptz-container .mobile-ez-ptz-container {\n position: relative;\n width: 260px;\n height: 260px;\n background: rgba(255, 255, 255, 0.80);\n border: 1px solid rgba(255, 255, 255, 0.80);\n border-radius: 100%;\n cursor: pointer;\n overflow: hidden;\n margin: auto;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n left: calc(50% - 6px);\n top: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top.active {\n border-bottom-color: #1890FF;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n left: calc(50% - 6px);\n bottom: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom.active {\n border-top-color: #1890FF;\n\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right {\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n top: calc(50% - 6px);\n right: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right.active {\n border-left-color: #1890FF;\n\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left {\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n top: calc(50% - 6px);\n left: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left.active {\n border-right-color: #1890FF;\n\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .ez-ptz-main.center {\n width: 52px;\n height: 52px;\n background: #FFFFFF;\n border: 2px solid #eee;\n border-radius: 100%;\n top: calc(50% - 26px);\n left: calc(50% - 26px);\n position: absolute;\n /* box-shadow: 0px -39px 40px 6px #1890ff; */\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-wrap {\n display: inline-block;\n padding: 24px 24px;\n border-radius: 100%;\n overflow: hidden;\n }\n\n #mobile-ez-ptz-container .ez-ptz-close {\n position: absolute;\n color: #FFFFFF;\n top: 0;\n right: 0px;\n }",document.getElementsByTagName("head")[0].appendChild(A._STYLE))}}])}();s(Ii,"_STYLE",void 0);var Ci={header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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"}]}},di={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"rgba(0,0,0,0.8)",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:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}},hi={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"rgba(0,0,0,0.8)",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:"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}]}}},Bi={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"rgba(0,0,0,0.8)",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}]}}},ui={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"rgba(0,0,0,0.8)",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}]}}},Ei={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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}]}}},fi={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"rgba(0,0,0,0.8)",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}]}}},Qi={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"cloudRecord",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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}]}}},xi={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"#00000080",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:"speed",part:"right",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}]}}},pi=[{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:Bi.data.header,footer:Bi.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:ui.data.header,footer:ui.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:fi.data.header,footer:fi.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:Ei.data.header,footer:Ei.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:Qi.data.header,footer:Qi.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:di.data.header,footer:di.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:hi.data.header,footer:hi.data.footer},{autoFocus:0,createTime:"2021-06-14T08:04:37.000Z",themeId:"miniRec",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:"",header:xi.data.header,footer:xi.data.footer}],mi=function(){return o((function A(e){var i=this;t(this,A),this.jSPlugin=e,this.enableZoom=!1,this.videoWidth=1920,this.videoHeight=1080,this.currentScale=1,this.currentPosition={left:0,top:0,right:1920,bottom:1080},this.info={},this.clientRect=document.getElementById(e.id).getBoundingClientRect(),this.DOM=document.getElementById(e.id);var n=document.createElement("div");n.id="".concat(e.id,"-zoom-container");var a=document.getElementById("".concat(e.id,"-audioControls")),o=48;a&&(o=a.offsetHeight);var r=e.isMobile?"\n -webkit-transform: scale(0.8);\n -moz-transform: scale(0.8);\n -ms-transform: scale(0.8);\n transform: scale(0.8);\n transform-origin: left bottom;":"";n.style="position: absolute;\n display:none;\n left: 12px;\n bottom: ".concat(e.isMobile?"".concat(o+6,"px"):"80px",";\n ").concat(r,"\n ");var s='\n <div\n style="display: inline-flex;justify-content: space-between;flex-direction: column;width: 36px;height: 160px;background:rgba(0,0,0,0.60);border-radius: 2px;align-items: center;">\n <div id="'.concat(this.jSPlugin.id,'-scale-value" style="font-size: 12px;color:#FFFFFF;margin:10px 0; user-select: none;">2.0X</div>\n <div style="width: 20px;height: 20px;margin-bottom:4px;" id="').concat(this.jSPlugin.id,'-addScale">\n <?xml version="1.0" encoding="utf-8"?>\n <svg version="1.1" fill="#FFFFFF" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">\n <title>').concat(this.jSPlugin.i18n.t("ZOOM_ADD"),'</title>\n <g>\n <rect class="st0" width="20" height="20" fill="none"/>\n </g>\n <g>\n <path class="st1" d="M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5\n s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z"/>\n </g>\n <g>\n <path class="st2" d="M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z"/>\n </g>\n <g>\n <path class="st2" d="M10,13.2c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C10.6,12.9,10.3,13.2,10,13.2z"/>\n </g>\n </svg>\n </div>\n <div style="\n position: relative;\n width: 2px;\n height: 64px;\n border-radius: 2px;\n background: rgba(255,255,255,0.75);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;">\n <div class="scale-body-line-dot" id="').concat(this.jSPlugin.id,'-scale-body-line-dot" style="width: 6px;\n height: 6px;\n background: #FFFFFF;\n border-radius: 100%;\n position: absolute;\n border: 1px solid #407AFF;"></div>\n <div id="').concat(this.jSPlugin.id,'-line-dot" style="width: 2px;\n height: 0%;\n border-radius: 2px;\n background: #407AFF;\n bottom: 0;"></div>\n </div>\n <div style="width: 20px;height: 20px;margin: 4px 0 10px;" id="').concat(this.jSPlugin.id,'-subScale">\n <?xml version="1.0" encoding="utf-8"?>\n <svg fill="#FFFFFF" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">\n <title>').concat(this.jSPlugin.i18n.t("ZOOM_SUB"),'</title>\n <g>\n <rect class="st0" width="20" height="20" fill="none"/>\n </g>\n <g>\n <path class="st1" d="M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5\n s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z"/>\n </g>\n <g>\n <path class="st2" d="M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z"/>\n </g>\n </svg>\n </div>\n </div>\n ');n.innerHTML=s,document.getElementById("".concat(e.id,"-audioControls-left"))&&(document.getElementById("".concat(e.id,"-audioControls-left")).parentNode.appendChild(n),document.getElementById("".concat(e.id,"-addScale")).onclick=function(){i.addScale()},document.getElementById("".concat(e.id,"-subScale")).onclick=function(){i.subScale()}),this._event()}),[{key:"_event",value:function(){var A=this,e=setInterval((function(){var t=document.getElementById("".concat(A.jSPlugin.id,"-container-0"));clearInterval(e),A.jSPlugin.isMobile?t&&(t.addEventListener("touchstart",(function(e){return A.onTouchstart(e)})),t.addEventListener("touchend",(function(e){return A.onTouchend(e)}))):t&&(t.addEventListener("mousedown",(function(e){return A.onMouseDown(e)})),t.addEventListener("mouseup",(function(e){return A.onMouseUp(e)})))}),100)}},{key:"onMouseDown",value:function(A){if(1===this.currentScale)return!1;this.moveX=A.clientX,this.moveY=A.clientY}},{key:"onMouseUp",value:function(A){var e=this.currentPosition;if(1===this.currentScale)return!1;e.left=e.left-(A.clientX-this.moveX),e.top=e.top-(A.clientY-this.moveY),this.doScale()}},{key:"onTouchstart",value:function(A){if(1===this.currentScale)return!1;if(this.jSPlugin.use3DZoom||1===this.currentScale)return!1;if(!this.jSPlugin.beforeMobileZoomVerify())return!1;if(!this.inited){var e=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=e.width,this.videoHeight=e.height,this.currentPosition.left=0,this.currentPosition.top=0,this.isMobileFullScreen?(this.currentPosition.right=e.height,this.currentPosition.bottom=e.width):(this.currentPosition.right=e.width,this.currentPosition.bottom=e.height),this.inited=!0}var t=A.touches[0];if(t){var i={clientX:0,clientY:0};i.clientX=t.clientX,i.clientY=t.clientY,this.point1=i}}},{key:"onTouchend",value:function(A){var e=this,t=this.currentPosition;if(1===this.currentScale)return!1;var i=A.changedTouches[0];this.isMobileFullScreen?(t.left=t.left-(i.clientY-e.point1.clientY),t.top=t.top+(i.clientX-e.point1.clientX)):(t.left=t.left-(i.clientX-e.point1.clientX),t.top=t.top-(i.clientY-e.point1.clientY)),e.doScale()}},{key:"renderDot",value:function(){var A=this.currentScale;document.getElementById("".concat(this.jSPlugin.id,"-scale-value"))&&(document.getElementById("".concat(this.jSPlugin.id,"-scale-value")).innerHTML="".concat(A,".0X")),document.getElementById("".concat(this.jSPlugin.id,"-line-dot"))&&(document.getElementById("".concat(this.jSPlugin.id,"-line-dot")).style.height="".concat((A-1)/7*100,"%")),document.getElementById("".concat(this.jSPlugin.id,"-scale-body-line-dot"))&&(document.getElementById("".concat(this.jSPlugin.id,"-scale-body-line-dot")).style.bottom="calc(".concat((A-1)/7*100,"% - 3px)"))}},{key:"getTopMostElement",value:function(A,e,t){var i=A?A.getBoundingClientRect():null,n=e?e.getBoundingClientRect():null,a=t?t.getBoundingClientRect():null;if(!i&&!n&&!a)return null;if(!i)return n.top<a.top?e:t;if(!n)return i.top<a.top?A:t;if(!a)return i.top<n.top?A:e;var o=[i.top,n.top,a.top],r=Math.max.apply(Math,o);return i.top===r?A:n.top===r?e:t}},{key:"handleFullscreen",value:function(A,e,t){this.clientRect={width:e,height:t}}},{key:"startZoom",value:function(){try{if(document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block"),this.dpr="v1-soft"==this.jSPlugin.decodeEngine?1:this.jSPlugin.dpr,this.jSPlugin.jSPlugin)try{var A=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.info=Object.assign({},A),this.videoWidth=(A.width||this.jSPlugin.width)*this.dpr-10,this.videoHeight=(A.height||this.jSPlugin.height)*this.dpr-10,this.currentPosition.right=A.width*this.dpr,this.currentPosition.bottom=A.height*this.dpr,this.jSPlugin.jSPlugin.bEZoom=!0}catch(A){}this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("startZoom",{eventType:"startZoom",code:0,target:this,msg:"开启电子放大"}),this.renderDot(),this.enableZoom=!0}catch(A){this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("startZoom",{eventType:"startZoom",code:-1,target:this,msg:A||"开启电子放大失败"})}}},{key:"stopZoom",value:function(){try{this._resetZoom(),this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("stopZoom",{eventType:"stopZoom",code:0,target:this,msg:"关闭电子放大"}),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none")}catch(A){this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("stopZoom",{eventType:"stopZoom",code:-1,target:this,msg:A||"关闭电子放大失败"})}}},{key:"_resetZoom",value:function(){this.currentScale=1,this.currentPosition.left=0,this.currentPosition.top=0,this.currentPosition.right=this.videoWidth,this.currentPosition.bottom=this.videoHeight,this._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight,!1),this.renderDot(),this.enableZoom=!1}},{key:"doScale",value:function(){var A=this.currentPosition,e=this.currentScale,t=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);if(console.log("infoh::",t),t.width!=this.info.width){var i=parseFloat(t.width/this.info.width);A.left=A.left*i*(i>1?1.25:.75),A.right=A.right*i*(i>1?1.25:.75),this.info.width=t.width,this.videoWidth=t.width*(i>1.25?1:.75)*this.dpr}if(t.height!=this.info.height){var n=parseFloat(t.height/this.info.height);A.top=A.top*n*(n>1?1.25:.75),A.bottom=A.bottom*n*(n>1?1.25:.75),this.info.height=t.height,this.videoHeight=t.height*(n>1?1.25:.75)*this.dpr}A.left=A.left+.5*(A.right-A.left-this.videoWidth/e),A.left<=0?A.left=0:A.left>this.videoWidth-this.videoWidth/e&&(A.left=this.videoWidth-this.videoWidth/e),A.right=A.left+this.videoWidth/e,A.top=A.top+.5*(A.bottom-A.top-this.videoHeight/e),A.top<=0?A.top=0:A.top>this.videoHeight-this.videoHeight/e&&(A.top=this.videoHeight-this.videoHeight/e),A.bottom=A.top+this.videoHeight/e,A.left=parseInt(A.left,10),A.right=parseInt(A.right,10),A.top=parseInt(A.top,10),A.bottom=parseInt(A.bottom,10);try{A.left<A.right&&A.top<A.bottom&&A.bottom<=this.videoHeight&&A.right<=this.videoWidth&&this._JSPlayM4_SetDisplayRegion(A.left,A.right,A.top,A.bottom,1!=e,this.isMobileFullScreen)}catch(A){console.log(A)}this.renderDot()}},{key:"addScale",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("zoomAdd",{eventType:"zoomAdd",code:1,target:this,msg:"执行放大"}),this.currentScale>=8?(this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_ADD_MAX"),document.getElementById("".concat(this.jSPlugin.id))),!1):(this.currentScale=this.currentScale+A,this.currentScale>8?(console.log("超出最大倍率"),this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_LIMIT_MAX"),document.getElementById("".concat(this.jSPlugin.id))),!1):void this.doScale())}},{key:"subScale",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("zoomSub",{eventType:"zoomSub",code:1,target:this,msg:"执行缩小"}),this.currentScale<=1?(this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_SUB_MIN"),document.getElementById("".concat(this.jSPlugin.id))),!1):(this.currentScale=this.currentScale-A,this.currentScale<1?(this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_LIMIT_MIN"),document.getElementById("".concat(this.jSPlugin.id))),!1):void this.doScale())}},{key:"_JSPlayM4_SetDisplayRegion",value:function(A,e,t,i,n){this.jSPlugin&&this.jSPlugin.jSPlugin&&(console.log("%c计算后,","color: red;",this.videoWidth,this.videoHeight,A,e,t,i,this.currentScale),this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(A,e,t,i,n,this.isMobileFullScreen))}},{key:"isMobileFullScreen",get:function(){return!!(w()&&this.jSPlugin.Theme&&this.jSPlugin.Theme.decoderState&&this.jSPlugin.Theme.decoderState.state.expend)}}])}(),yi=[{videoLevel:1,streamTypeIn:2},{videoLevel:2,streamTypeIn:1}],_i={0:"VIDEO_LEVEL_FLUENT",1:"VIDEO_LEVEL_SATNDARD",2:"VIDEO_LEVEL_HEIGH",3:"VIDEO_LEVEL_SPUER",4:"VIDEO_LEVEL_EXTREME",5:"VIDEO_LEVEL_3K",6:"VIDEO_LEVEL_4k"},Si="8.1.2",Di=function(A,e,t,i){var n="".concat(A.env.domain,"/api/service/media/template/getDetail?accessToken=").concat(A.accessToken||A.token.httpToken.url,"&id=").concat(e);fetch(n,{method:"GET"}).then((function(A){return A.json()})).then((function(A){var e;(e=A).meta&&t(e)})).catch((function(A){var e;e=A,console.log(e),i(e)}))},wi=function(A){var e="";return Object.keys(A).map((function(t,i){e+="".concat(t,":").concat(A[t]).concat(i<Object.keys(A).length-1?";":"")})),e},vi=500,bi=function(){return o((function A(e){var i=this;t(this,A),this.jSPlugin=e,this.isNeedRenderHeader=!1,this.isNeedRenderFooter=!1,this.autoFocus=0,this.autoFocusTimer=null,this.recordTimer=null,this.nextRate=1,this.showHD=!1,this.themeInited=!1;var n=Xt.getGlobalState();if(this.decoderState={state:{play:!1,pauseDate:null,sound:!n.sound&&!!e.audio,recordvideo:!1,recordCount:"00:00",talk:!1,zoom:!1,pantile:!1,speed:!1,expend:!1,webExpend:!1,cloudRec:"cloud.rec"===_(e.url).type,rec:"rec"===_(e.url).type,type:_(e.url).type}},this.allowZoom=!this.jSPlugin.use3DZoom,this.zoomDisable=!1,this.pluginStatus=new J(this,this.jSPlugin.params.id),this.inited=!1,this.isMobile=w(),void 0!==e.isMobile&&(this.isMobile=e.isMobile),this.pauseTime=null,this.themeData=Ci,this.jSPlugin.themeId)switch(this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"security":case"voice":case"simple":case"miniRec":var a=Rt(pi,(function(A){return A.themeId===i.jSPlugin.themeId}));a&&(this.themeData=a),this.initThemeData();break;case"themeData":this.themeData=this.jSPlugin.params.themeData,this.initThemeData();break;default:this.fetchThemeData(this.jSPlugin.themeId)}this.jSPlugin.Talk||(this.jSPlugin.Talk=new li(this.jSPlugin)),f("".concat(this.jSPlugin.staticPath,"/speed/speed.css")),f("".concat(this.jSPlugin.staticPath,"/css/theme.css")),this._fullscreenchange=null,this._fullScreenChangeEvent()}),[{key:"fetchThemeData",value:function(A){var e=this;Di(this.jSPlugin,A,(function(A){0==A.meta.code&&A.data?(e.themeData=A.data,A.data.header&&(e.themeData.header=A.data.header,e.themeData.header.btnList=e.themeData.header.btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),A.data.footer&&(e.themeData.footer=A.data.footer,e.themeData.footer.btnList=e.themeData.footer.btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),A.data.themeType&&("live"===_(e.jSPlugin.url).type?-1===A.data.themeType.toLowerCase().indexOf("live")&&console.error("当前模板类型".concat(A.data.themeType,"与播放类型").concat(_(e.jSPlugin.url).type,"不对应,请检查模板类型")):-1===A.data.themeType.toLowerCase().indexOf("rec")&&console.error("当前模板类型".concat(A.data.themeType,"与播放类型").concat(_(e.jSPlugin.url).type,"不对应,请检查模板类型"))),e.initThemeData(),e.renderThemeData()):console.log("模板获取失败:",A)}),(function(A){console.log("模板获取失败:",A),e.renderThemeData()}))}},{key:"changeTheme",value:function(A){var e=this;if("string"==typeof A)switch(this.jSPlugin.themeId=A,this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"security":case"voice":case"simple":case"miniRec":var t=Rt(pi,(function(A){return A.themeId===e.jSPlugin.themeId}));t&&(this.themeData=t),this.initThemeData();break;default:this.fetchThemeData(A)}else"object"===d(A)&&(this.themeData=A,this.initThemeData());this.jSPlugin&&this.jSPlugin.handleThemeChange&&this.jSPlugin.handleThemeChange(A)}},{key:"renderThemeData",value:function(){var A=this,e=this.themeData,t=e.header,i=e.footer;if(this.isNeedRenderHeader&&t&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=t.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=t.color.replace("-diy",""),t.btnList.map((function(e,t){e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId]))}))),this.isNeedRenderFooter&&i)document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=i.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=i.color.replace("-diy",""),this.jSPlugin.params.extraBtn&&(i.btnList=[].concat(I(i.btnList),I(this.jSPlugin.params.extraBtn))),i.btnList.map((function(e,t){if(e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId])),"play"===e.iconId&&e.defaultActive&&!A.themeInited&&A.jSPlugin.autoplay)var i=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(i),A.themeInited=!0)}),50)})),this.themeData.autoFocus>0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",(function(){document.getElementById("".concat(A.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.opacity=1,document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.pointerEvents="all"),document.getElementById("".concat(A.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(A.jSPlugin.id,"-headControl")).style.opacity=1,document.getElementById("".concat(A.jSPlugin.id,"-headControl")).style.pointerEvents="all"),A.startAutoFocus()}))),this.setDecoderState({cloudRec:"cloud.rec"===_(this.jSPlugin.url).type,rec:"rec"===_(this.jSPlugin.url).type,type:_(this.jSPlugin.url).type});else if(!this.themeInited)var n=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&A.jSPlugin.autoplay&&(clearInterval(n),A.themeInited=!0)}),50);bt(this.themeData.footer.btnList,(function(A){return"zoom"===A.iconId&&A.isrender>0}))>=0&&(this.isMobile&&!this.jSPlugin.use3DZoom&&(this.jSPlugin.beforeMobileZoomVerify=function(){return!!A.decoderState.state.play}),this.jSPlugin.Zoom=new mi(this.jSPlugin))}},{key:"setDecoderState",value:function(A){var e=this,t=this.themeData,i=t.header,n=t.footer;Object.keys(A).map((function(t,a){var o="#FFFFFF",r="#FFFFFF";switch(-1===i.btnList.findIndex((function(A){return A.iconId===t}))?(o=n.color.replace("-diy",""),r=n.activeColor.replace("-diy","")):(o=i.color.replace("-diy",""),r=n.activeColor.replace("-diy","")),t){case"play":A[t]?document.getElementById("".concat(e.jSPlugin.id,"-play"))&&(document.getElementById("".concat(e.jSPlugin.id,"-play-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-play-content")).children[0].children[1].style="display:none",document.getElementById("".concat(e.jSPlugin.id,"-play")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-play-content")).childNodes[0].children[0].style.fill=A[t]?r:o):document.getElementById("".concat(e.jSPlugin.id,"-play"))&&(document.getElementById("".concat(e.jSPlugin.id,"-play-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-play-content")).children[0].children[0].style="display:none",document.getElementById("".concat(e.jSPlugin.id,"-play")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-play-content")).childNodes[0].children[1].style.fill=A[t]?r:o);break;case"sound":document.getElementById("".concat(e.jSPlugin.id,"-sound"))&&(A[t]?(document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:none",document.getElementById("".concat(e.jSPlugin.id,"-sound")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).childNodes[0].children[1].style.fill=A[t]?r:o):(document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:none",document.getElementById("".concat(e.jSPlugin.id,"-sound")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).childNodes[0].children[0].style.fill=A[t]?r:o));break;case"recordvideo":document.getElementById("".concat(e.jSPlugin.id,"-recordvideo"))&&(document.getElementById("".concat(e.jSPlugin.id,"-recordvideo")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-recordvideo-content")).childNodes[0].style.fill=A[t]?r:o,A[t]?e.countTime("add",0):e.countTime("destroy",0));break;case"talk":document.getElementById("".concat(e.jSPlugin.id,"-talk"))&&(document.getElementById("".concat(e.jSPlugin.id,"-talk")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-talk-content")).childNodes[1].style.fill=A[t]?r:o);break;case"zoom":document.getElementById("".concat(e.jSPlugin.id,"-zoom"))&&(document.getElementById("".concat(e.jSPlugin.id,"-zoom")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-zoom-content")).childNodes[1].style.fill=A[t]?r:o);break;case"pantile":document.getElementById("".concat(e.jSPlugin.id,"-pantile"))&&(document.getElementById("".concat(e.jSPlugin.id,"-pantile")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-pantile-content")).childNodes[0].style.fill=A[t]?r:o);break;case"webExpend":A[t]?(document.getElementById("".concat(e.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(e.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-expend")).className="disabled")):(document.getElementById("".concat(e.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(e.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-expend")).className="")),document.getElementById("".concat(e.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-webExpend")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[0].style.fill=A[t]?r:o,document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[1].style.fill=A[t]?r:o);break;case"capturePicture":document.getElementById("".concat(e.jSPlugin.id,"-capturePicture"))&&(document.getElementById("".concat(e.jSPlugin.id,"-capturePicture")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-capturePicture-content")).childNodes[0].style.fill=A[t]?r:o);break;case"expend":A[t]?(document.getElementById("".concat(e.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(e.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-webExpend")).className="disabled")):(document.getElementById("".concat(e.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(e.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-webExpend")).className="")),document.getElementById("".concat(e.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-expend")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[0].style.fill=A[t]?r:o,document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[1].style.fill=A[t]?r:o);break;case"hd":break;case"speed":if(document.getElementById("".concat(e.jSPlugin.id,"-speed"))){var s=document.getElementById("".concat(e.jSPlugin.id,"-speed-content")).children[1].children[0];"not-allowed"!==s.style.cursor&&(s.style.color=A[t]?r:o,s.style.borderColor=A[t]?r:o)}document.getElementById("".concat(e.jSPlugin.id,"-select-mask"))&&(e.isMobile&&A[t]?document.getElementById("".concat(e.jSPlugin.id,"-select-mask")).style.display="block":document.getElementById("".concat(e.jSPlugin.id,"-select-mask")).style.display="none");break;case"cloudRec":document.getElementById("".concat(e.jSPlugin.id,"-cloudRec"))&&(document.getElementById("".concat(e.jSPlugin.id,"-cloudRec")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=A[t]?r:o),document.getElementById("".concat(e.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(e.jSPlugin.id,"-rec")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=A[t]?o:r);break;case"cloudRecord":var g=document.getElementById("".concat(e.jSPlugin.id,"-cloudRecord"));g&&(g.className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-cloudRecord-content")).children[0].children[0].style.fill=A[t]?r:o),document.getElementById("".concat(e.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(e.jSPlugin.id,"-rec")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=A[t]?o:r);break;case"rec":document.getElementById("".concat(e.jSPlugin.id,"-cloudRec"))&&(document.getElementById("".concat(e.jSPlugin.id,"-cloudRec")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=A[t]?o:r),document.getElementById("".concat(e.jSPlugin.id,"-cloudRecord"))&&(document.getElementById("".concat(e.jSPlugin.id,"-cloudRecord")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-cloudRecord-content")).children[0].children[0].style.fill=A[t]?o:r),document.getElementById("".concat(e.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(e.jSPlugin.id,"-rec")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=A[t]?r:o)}e.decoderState.state=Object.assign(e.decoderState.state,A)}))}},{key:"startAutoFocus",value:function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById("".concat(A.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.pointerEvents="none"),document.getElementById("".concat(A.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(A.jSPlugin.id,"-headControl")).style.opacity=0,document.getElementById("".concat(A.jSPlugin.id,"-headControl")).style.pointerEvents="none")}),1e3*e)}},{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"),document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.opacity=1,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.pointerEvents="all"),this.autoFocusTimer&&clearTimeout(this.autoFocusTimer)}},{key:"hideFooter",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.display="none")}},{key:"showFooter",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.display="block")}},{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"renderFooter",value:function(A,e){var t=this.matchBtn(A),i=document.createElement("div");i.className="theme-icon-item",i.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(t.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(t.id,'-content" title="').concat(t.title,'" style="height:').concat(this.jSPlugin.width>vi?48:32,'px;display: flex;align-items: center;position:relative;">')).concat(t.domString,"</div>")+"</span>",i.onclick=function(A){t.onclick(A)},t.onmouseenter&&(i.onmouseenter=function(A){t.onmouseenter(A)}),t.onmouseleave&&(i.onmouseleave=function(A){t.onmouseleave(A)}),"left"===e?document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[0].appendChild(i):document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[1].appendChild(i)}},{key:"renderHeader",value:function(A,e){var t=this.matchBtn(A),i=document.createElement("div");i.className="theme-icon-item",i.style="max-width:50%;",i.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(t.id,'" style="position:relative;";>')+'<span id="'.concat(this.jSPlugin.id,"-").concat(t.id,'-content" title="').concat(t.title,'" style="display:inline-block;height:').concat(this.width>vi?48:32,'px;">')).concat(t.domString,"</span>")+"</span>",i.onclick=function(A){t.onclick(A)},"left"===e?document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(i):document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[1].appendChild(i)}},{key:"countTime",value:function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='<span class="dot"></span><span class="value">00:00</span>',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",o="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),o=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?o+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))}},{key:"setDisabled",value:function(A){var e=this.decoderState.state,t=e.sound,i=e.expend,n=A?"cursor: not-allowed; color: gray; fill: gray; ":"cursor: default";null!=document.getElementById("".concat(this.jSPlugin.id,t?"-sound-icon":"-nosound-icon"))&&document.getElementById("".concat(this.jSPlugin.id,t?"-sound-icon":"-nosound-icon")).setAttribute("style",A?"cursor: not-allowed; color: gray; fill: gray;":"cursor: default"),null!=document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon"))&&document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon")).setAttribute("style",n),null!=document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon"))&&document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon")).setAttribute("style",n),null!=document.getElementById("".concat(this.jSPlugin.id,"-talk-icon"))&&document.getElementById("".concat(this.jSPlugin.id,"-talk-icon")).setAttribute("style",n),null!=document.getElementById("".concat(this.jSPlugin.id,i?"-unexpend-icon":"-expend-icon"))&&document.getElementById("".concat(this.jSPlugin.id,i?"-unexpend-icon":"-expend-icon")).setAttribute("style",n),this.allowZoom||null!=document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon"))&&document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon")).setAttribute("style",n),document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon"))&&"none"!=document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon")).style.display&&document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon")).setAttribute("style",n);var a=document.getElementsByClassName("".concat(this.jSPlugin.id,"-select-quality-btn"));if(a.length)for(var o=0;o<a.length;o++)A?(a[o].style.cursor="not-allowed",a[o].style.color="gray",a[o].style.fill="gray"):(a[o].style.cursor="default",a[o].style.fill="",a[o].style.color="");null!=document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))&&document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).setAttribute("style",document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).getAttribute("style")+";"+(A?"cursor: not-allowed; color: gray; border-color: gray;":"cursor: default; color: #ffffff;border-color: #ffffff;")),this.zoomDisable=this.jSPlugin.use3DZoom&&A}},{key:"matchBtn",value:function(A){var e=this,t=this.themeData,i=t.header,n=t.footer,a={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}};-1===i.btnList.findIndex((function(e){return e.iconId===A}))?(a.color=n.color,a.backgroundColor=n.backgroundColor,a.activeColor=n.activeColor):(a.color=i.color,a.backgroundColor=i.backgroundColor,a.activeColor=i.activeColor);var o=this.jSPlugin._isCloudRecord&&-1!==this.jSPlugin.url.indexOf("cloud.rec");switch(A){case"play":a.title=this.jSPlugin.i18n.t("BTN_PLAY"),a.id=A,a.domString='<div style="height: 100%">'+'<svg id="'.concat(this.jSPlugin.id+"-play-icon",'" class="theme-icon-item-icon" style="display:none" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" fill="').concat(a.color,'" viewBox="-6 -6 32 32">\n <path d="M10.5,1.7c-4.9,0-8.8,4-8.8,8.8s4,8.8,8.8,8.8s8.8-4,8.8-8.8S15.4,1.7,10.5,1.7z M10.5,2.7\n c4.3,0,7.8,3.5,7.8,7.8s-3.5,7.8-7.8,7.8s-7.8-3.5-7.8-7.8S6.2,2.7,10.5,2.7z"/>\n <path class="st2" d="M8.7,8C9,8,9.3,8.3,9.3,8.6v3.8C9.3,12.7,9,13,8.7,13C8.3,13,8,12.7,8,12.4V8.6C8,8.3,8.3,8,8.7,8z"/>\n <path id="Rectangle-Copy-10" class="st2" d="M12.8,8c0.3,0,0.6,0.3,0.6,0.6v3.8c0,0.3-0.3,0.6-0.6,0.6c-0.3,0-0.6-0.3-0.6-0.6V8.6\n C12.2,8.3,12.5,8,12.8,8z"/>\n </svg>')+'<svg id="'.concat(this.jSPlugin.id+"-stop-icon",'" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M13,9.8L10.1,8C9.9,7.9,9.7,7.9,9.5,7.9c-0.6,0-1,0.4-1,1v3.7c0,0.2,0.1,0.4,0.2,0.5c0.3,0.5,0.9,0.6,1.4,0.3 l2.9-1.8c0.1-0.1,0.2-0.2,0.3-0.3C13.6,10.7,13.4,10.1,13,9.8z" /><path d="M10.5,1.9c-4.9,0-8.8,4-8.8,8.8c0,4.9,4,8.8,8.8,8.8s8.8-4,8.8-8.8C19.4,5.8,15.4,1.9,10.5,1.9z M10.5,18.5 c-4.3,0-7.8-3.5-7.8-7.8s3.5-7.8,7.8-7.8c4.3,0,7.8,3.5,7.8,7.8S14.9,18.5,10.5,18.5z" /></svg></div>',a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.rec,n=A.cloudRec,a=A.recordvideo,o=A.pantile,r=A.expend,s=A.zoom,g=A.talk,c=A.sound,l=Xt.getGlobalState(),I=Xt.getInstance(e.jSPlugin.id);window.recTimer&&Array.isArray(window.recTimer[e.jSPlugin.id])&&(window.recTimer[e.jSPlugin.id].map((function(A){clearInterval(A)})),window.recTimer[e.jSPlugin.id]=[]),t?(i||n?(e.Rec&&e.Rec.unSyncTimeLine(),e.jSPlugin.pause().then((function(){e.setDecoderState({play:!t}),e.setDisabled(t)}))):(e.jSPlugin.stop((function(){}),!0).then((function(){e.setDecoderState({play:!t}),e.setDisabled(t)})),s&&(e.setDecoderState({zoom:!1}),e.jSPlugin.Zoom.stopZoom(),e.jSPlugin.close3DZoom()),g&&(e.setDecoderState({talk:!1}),document.getElementById("".concat(e.jSPlugin.id,"-volume-column"))&&(document.getElementById("".concat(e.jSPlugin.id,"-volume-column")).style.display="none"),e.jSPlugin.Talk.stopTalk(),l.talk&&Xt.setGlobalState({talk:!1}),I.getState().talk&&I.setState({talk:!1}))),a&&e.setDecoderState({recordvideo:!1}),c&&(e.jSPlugin.closeSound(),e.setDecoderState({sound:!1}),I.setState({sound:!0}))):(i||n?(e.Rec&&e.Rec.syncTimeLine(),e.jSPlugin.resume().then((function(){e.setDisabled(t),e.setDecoderState({play:!t,expend:r})}))):e.jSPlugin.play().then((function(){e.setDisabled(t),e.setDecoderState({play:!t,expend:r})})),e.jSPlugin.use3DZoom&&e.resetMobileZoomStatus()),e.jSPlugin.use3DZoom?(e.setDecoderState({zoom:!1}),e.allowZoom=!1):e.allowZoom=i||n,o&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1})),document.getElementById("".concat(e.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.display="none"),e.setDecoderState({speed:!1})};break;case"sound":a.title=this.jSPlugin.i18n.t("BTN_SOUND"),a.id=A,a.domString='<span style="height: 100%">'+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-nosound-icon" style="display:none" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">\n <path d="M8.5,4.2c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8C5,13.2,5,12.9,5.1,12.7 c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3L9.2,5L5.9,7.8 C5.6,7.9,5.3,7.9,5.1,7.7C5,7.5,5,7.3,5.1,7.1L5.2,7L8.5,4.2z"/>\n <path d="M5.5,6.9C5.8,6.9,6,7.1,6,7.4c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2C3.4,7.9,3.3,8,3.2,8.2l0,0.1v4 c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,12.5,6,12.7,6,13c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4 c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n <path d="M17.4,7.9c0.2-0.2,0.5-0.2,0.7,0c0.2,0.2,0.2,0.4,0.1,0.6l-0.1,0.1l-3.8,3.8c-0.2,0.2-0.5,0.2-0.7,0 c-0.2-0.2-0.2-0.4-0.1-0.6l0.1-0.1L17.4,7.9z"/>\n <path d="M13.7,7.9c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.8,3.8c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1-0.1 l-3.7-3.8C13.5,8.4,13.5,8.1,13.7,7.9z"/>\n </svg>')+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-sound-icon" style="display:inline-block" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" fill="').concat(a.color,'" viewBox="-6 -6 32 32">\n <path d="M13.2,7.1c0.1-0.2,0.5-0.3,0.7-0.2c1.1,0.7,1.9,2.2,1.9,3.7c0,1.6-0.7,3-1.9,3.7\n c-0.2,0.1-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7c0.8-0.5,1.4-1.6,1.4-2.9c0-1.3-0.6-2.4-1.4-2.9C13.1,7.6,13,7.3,13.2,7.1z"/>\n <path d="M15.7,4.5c0.2-0.2,0.5-0.2,0.7-0.1C18,5.8,19,8.2,19,10.7c0,2.5-1,4.8-2.7,6.3\n c-0.2,0.2-0.5,0.2-0.7-0.1c-0.2-0.2-0.2-0.5,0.1-0.7c1.4-1.2,2.3-3.3,2.3-5.5c0-2.2-0.9-4.3-2.3-5.5C15.5,5,15.5,4.7,15.7,4.5z"/>\n <path d="M8.5,4.7c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8\n C5,13.7,5,13.4,5.1,13.2c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3l-0.1,0\n L5.9,8.3C5.6,8.4,5.3,8.4,5.1,8.2C5,8,5,7.7,5.1,7.6l0.1-0.1L8.5,4.7z"/>\n <path d="M5.5,7.4C5.8,7.4,6,7.6,6,7.9c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.2,0-0.3,0.1-0.3,0.3l0,0.1v4\n c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,13,6,13.2,6,13.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4\n c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n </svg>')+"</span>",a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.sound,n=A.talk,a=A.pantile;t&&!n&&(i?(e.jSPlugin.closeSound(),e.setDecoderState({sound:!1})):e.jSPlugin.openSound(),a&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1})))};break;case"recordvideo":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_RECORDVIDEO"),a.id=A,a.domString='<svg id="'.concat(this.jSPlugin.id,'-recordvideo-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M11.6,5.3H4.7c-1.4,0-2.5,1.1-2.5,2.5v5.9c0,1.4,1.1,2.5,2.5,2.5h6.9c1.4,0,2.5-1.1,2.5-2.5V7.7 C14.1,6.4,13,5.3,11.6,5.3z M4.7,6.3h6.9c0.8,0,1.5,0.7,1.5,1.5v5.9c0,0.8-0.7,1.5-1.5,1.5H4.7c-0.8,0-1.5-0.7-1.5-1.5V7.7 C3.3,6.9,3.9,6.3,4.7,6.3z" /><path d="M16.6,6.7c0.9-0.8,2.3-0.1,2.4,1l0,0.1v5.7c0,1.2-1.3,1.9-2.3,1.2l-0.1-0.1L13.3,12 c-0.2-0.2-0.2-0.5-0.1-0.7c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.7c0.3,0.2,0.7,0.1,0.8-0.3l0-0.1V7.8c0-0.4-0.4-0.6-0.7-0.4 l-0.1,0l-3.3,2.7c-0.2,0.2-0.5,0.1-0.7-0.1c-0.2-0.2-0.1-0.5,0-0.6l0.1-0.1L16.6,6.7z" /></svg>',a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.recordvideo;t&&(i?(e.jSPlugin.stopSave(),e.setDecoderState({recordvideo:!1})):(e.jSPlugin.startSave("".concat((new Date).getTime())),e.setDecoderState({recordvideo:!0})))};break;case"capturePicture":a.title=this.jSPlugin.i18n.t("BTN_CAPTURE"),a.id=A,a.domString='<svg id="'.concat(this.jSPlugin.id,'-capturePicture-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.8,7.7c-2,0-3.7,1.6-3.7,3.7S8.7,15,10.8,15c2,0,3.7-1.6,3.7-3.7S12.8,7.7,10.8,7.7z M10.8,8.7c1.5,0,2.7,1.2,2.7,2.7S12.2,14,10.8,14c-1.5,0-2.7-1.2-2.7-2.7S9.3,8.7,10.8,8.7z" /><path d="M8.6,3.7l-0.1,0C8,3.7,7.7,4,7.5,4.3l-1,1.7l-1.3,0C4,6.1,3.1,7,3.1,8.2v7.1 c0,1.2,0.9,2.1,2.1,2.1h11.1c1.2,0,2.1-0.9,2.1-2.1V8.2l0-0.1c-0.1-1.1-1-1.9-2.1-1.9l-1.3,0l-1.1-1.8c-0.2-0.4-0.7-0.6-1.1-0.6H8.6 z M8.6,4.7h4.2c0.1,0,0.2,0.1,0.3,0.1l1.2,2c0.1,0.2,0.3,0.2,0.4,0.2h1.6c0.6,0,1.1,0.5,1.1,1.1v7.1c0,0.6-0.5,1.1-1.1,1.1H5.1 c-0.6,0-1.1-0.5-1.1-1.1V8.2c0-0.6,0.5-1.1,1.1-1.1h1.6c0.2,0,0.3-0.1,0.4-0.2l1.2-2C8.4,4.7,8.5,4.7,8.6,4.7z" /></svg>',a.onclick=function(){e.decoderState.state.play?e.jSPlugin.capturePicture("".concat((new Date).getTime()),(function(){}),e.jSPlugin.download):console.log("视频未播放,无法截图")};break;case"talk":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_TALK"),a.id=A,a.domString='<div style="height: '.concat(this.jSPlugin.width>vi?15:10,"px; width: ").concat(this.jSPlugin.width>vi?8:5,"px; position: absolute; left: ").concat(this.jSPlugin.width>vi?20:13,"px; top: ").concat(this.jSPlugin.width>vi?14:9,'px; border-radius: 50%; overflow:hidden;">')+'<div id="'.concat(this.jSPlugin.id,'-volume-column" style="height: 0; width: 100%; position: absolute; background: #00cc66; left: 0; bottom: 0; display: none;"></div>')+"</div>"+'<svg id="'.concat(this.jSPlugin.id,'-talk-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.1,2.7C8.5,2.7,7.2,4,7.2,5.6v5.2c0,1.6,1.3,2.9,2.9,2.9l0.2,0c1.5-0.1,2.7-1.4,2.7-2.9V5.6\tC13,4,11.7,2.7,10.1,2.7z M10.1,3.7c1.1,0,1.9,0.9,1.9,1.9v5.2c0,1-0.8,1.8-1.8,1.9l-0.1,0c-1,0-1.9-0.9-1.9-1.9V5.6 C8.2,4.5,9,3.7,10.1,3.7z" /><path d="M15.1,8.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,3-2.5,5.5-5.5,5.5c-3,0-5.4-2.3-5.5-5.3l0-0.2V9 c0-0.3,0.2-0.5,0.5-0.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,2.5,2,4.5,4.5,4.5c2.4,0,4.4-1.9,4.5-4.3l0-0.2V9 C14.6,8.7,14.8,8.5,15.1,8.5z" /><path d="M13.5,17.7c0.3,0,0.5,0.2,0.5,0.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-7c-0.3,0-0.5-0.2-0.5-0.5 c0-0.2,0.2-0.4,0.4-0.5l0.1,0H13.5z" /><path d="M10.1,15.2c0.2,0,0.4,0.2,0.5,0.4l0,0.1v2.5c0,0.3-0.2,0.5-0.5,0.5c-0.2,0-0.4-0.2-0.5-0.4l0-0.1 v-2.5C9.6,15.4,9.8,15.2,10.1,15.2z" /></svg>',this.jSPlugin.eventEmitter.on("volumeChange",(function(A){var t=A.data;document.getElementById("".concat(e.jSPlugin.id,"-volume-column"))&&(document.getElementById("".concat(e.jSPlugin.id,"-volume-column")).style.height="".concat(100*t,"%"))})),a.onclick=function(){var A=e.decoderState.state,t=A.talk,i=A.sound,n=A.play,a=Xt.getGlobalState(),o=Xt.getInstance(e.jSPlugin.id);if(n)if(t){e.setDecoderState({talk:!1}),document.getElementById("".concat(e.jSPlugin.id,"-volume-column"))&&(document.getElementById("".concat(e.jSPlugin.id,"-volume-column")).style.display="none"),e.jSPlugin.Talk.stopTalk();var r=bt(e.themeData.footer.btnList,(function(A){return"sound"===A.iconId&&1===A.isrender&&1===A.defaultActive}))>-1;e.themeData&&r&&e.jSPlugin.openSound(),a.talk&&Xt.setGlobalState({talk:!1}),o.getState().talk&&o.setState({talk:!1})}else{if(a.talk)return console.warn("当前已经有设备正在对讲"),void(e.jSPlugin.eventEmitter&&e.jSPlugin.eventEmitter.emit("startTalk",{eventType:"startTalk",code:430005,target:e,msg:"当前已经有设备正在对讲"}));e.setDecoderState({talk:!0}),document.getElementById("".concat(e.jSPlugin.id,"-volume-column")).style.display="block",e.jSPlugin.Talk.startTalk((function(A){i&&!A&&(e.jSPlugin.closeSound(),e.setDecoderState({sound:!1})),Xt.setGlobalState({talk:!0}),o.setState({talk:!0})}))}};break;case"zoom":if(o)break;a.title=this.jSPlugin.use3DZoom?this.jSPlugin.i18n.t("BTN_3D_ZOOM"):this.jSPlugin.i18n.t("BTN_ZOOM"),a.id=A,a.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-zoom-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="5 -6 5 32" style="enable-background:new 0 0 20 20.1;" xml:space="preserve">\n <path class="st1" d="M8.8,2.6c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2s-6.2-2.8-6.2-6.2S5.3,2.6,8.8,2.6z M8.8,3.9\n c-2.8,0-5,2.2-5,5s2.2,5,5,5s5-2.2,5-5S11.5,3.9,8.8,3.9z M12.7,12.7l3.9,3.9"/>\n <path class="st2" d="M11.2,9.5h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S11.6,9.5,11.2,9.5z"/>\n <path class="st2" d="M8.7,12c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C9.3,11.8,9.1,12,8.7,12z"/>\n <path class="st2" d="M16.9,17.6c-0.1,0-0.3-0.1-0.4-0.2l-3.9-3.9c-0.2-0.2-0.2-0.6,0-0.8s0.6-0.2,0.8,0l3.9,3.9\n c0.2,0.2,0.2,0.6,0,0.8C17.2,17.5,17,17.6,16.9,17.6z"/>\n </svg>'),a.onclick=function(){var A=e.decoderState.state,t=A.zoom,i=A.play,n=A.rec,a=A.cloudRec;if(e.jSPlugin.use3DZoom){if(!i)return!1;t?e.jSPlugin.close3DZoom():e.jSPlugin.enable3DZoom()}else{if(e.zoomDisable||!n&&!a&&!i)return!1;t?e.jSPlugin.Zoom.stopZoom():e.jSPlugin.Zoom.startZoom()}e.setDecoderState({zoom:!t})};break;case"pantile":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_PTZ"),a.id=A,a.domString='<svg id="'.concat(this.jSPlugin.id,'-pantile-icon" style="').concat(this.isMobile?this.decoderState.state.expend?"display:block;":"display:none;":"display:block;",'" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.2,7.8c1.6,0,2.9,1.3,2.9,2.9s-1.3,2.9-2.9,2.9s-2.9-1.3-2.9-2.9S8.5,7.8,10.2,7.8z M10.2,8.8c-1.1,0-1.9,0.9-1.9,1.9s0.9,1.9,1.9,1.9s1.9-0.9,1.9-1.9S11.2,8.8,10.2,8.8z" /><path d="M8.8,3.5c0.7-0.6,1.8-0.6,2.5-0.1l0.1,0.1l1.4,1.1c0.2,0.2,0.3,0.5,0.1,0.7 c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1,0l-1.4-1.1C10.5,3.9,10,3.9,9.6,4.2L9.4,4.3L8,5.4C7.8,5.5,7.5,5.5,7.3,5.3c-0.2-0.2-0.1-0.5,0-0.6 l0.1-0.1L8.8,3.5z" /><path d="M2.5,12.3c-0.6-0.7-0.6-1.8-0.1-2.5l0.1-0.1l1.1-1.4c0.2-0.2,0.5-0.3,0.7-0.1 c0.2,0.2,0.2,0.4,0.1,0.6l0,0.1l-1.1,1.4C3,10.6,3,11.1,3.2,11.5l0.1,0.1L4.4,13c0.2,0.2,0.1,0.5-0.1,0.7c-0.2,0.2-0.5,0.1-0.6,0 l-0.1-0.1L2.5,12.3z" /><path d="M17.7,12.3c0.6-0.7,0.6-1.8,0.1-2.5l-0.1-0.1l-1.1-1.4c-0.2-0.2-0.5-0.3-0.7-0.1 c-0.2,0.2-0.2,0.4-0.1,0.6l0,0.1l1.1,1.4c0.3,0.4,0.3,0.9,0.1,1.3l-0.1,0.1L15.8,13c-0.2,0.2-0.1,0.5,0.1,0.7c0.2,0.2,0.5,0.1,0.6,0 l0.1-0.1L17.7,12.3z" /><path d="M8.8,18.2c0.7,0.6,1.8,0.6,2.5,0.1l0.1-0.1l1.4-1.1c0.2-0.2,0.3-0.5,0.1-0.7 c-0.2-0.2-0.4-0.2-0.6-0.1l-0.1,0l-1.4,1.1c-0.4,0.3-0.9,0.3-1.3,0.1l-0.1-0.1L8,16.3c-0.2-0.2-0.5-0.1-0.7,0.1 c-0.2,0.2-0.1,0.5,0,0.6l0.1,0.1L8.8,18.2z" /></svg>',a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.pantile,n=A.expend;if(t)if(i)e.Ptz.hide(),e.setDecoderState({pantile:!1});else{if(e.isMobile&&!n)return console.log("移动端,非全屏状态不展示云台"),!1;e.Ptz.show(),e.setDecoderState({pantile:!0})}};break;case"expend":a.title=this.jSPlugin.i18n.t("BTN_EXPEND"),a.id=A,a.domString='<span><svg id="'.concat(this.jSPlugin.id,'-expend-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M3.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,4.1,6.9,4.1H5.2 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.9,7.4,3.7,7.6,3.4,7.6z" /><path d="M6.9,18.1H5.2c-1.2,0-2.2-1-2.2-2.2v-1.8c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8c0,0.7,0.6,1.2,1.2,1.2 h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,18.1,6.9,18.1z" /><path d="M15.7,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.9,17.1,16.9,18.1,15.7,18.1z" /><path d="M17.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-0.7-0.6-1.3-1.2-1.3h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8 c1.2,0,2.2,1,2.2,2.3v1.8C17.9,7.4,17.7,7.6,17.4,7.6z" /></svg>'+'<svg id="'.concat(this.jSPlugin.id,'-unexpend-icon" class="theme-icon-item-icon" style="display:none" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" fill="').concat(a.color,'" viewBox="-6 -6 32 32">\n <path class="st1" d="M5.7,8.1H3.9c-0.3,0-0.6-0.2-0.6-0.6S3.6,7,3.9,7h1.9c0.7,0,1.3-0.6,1.3-1.3V3.8c0-0.3,0.2-0.6,0.6-0.6\n s0.6,0.2,0.6,0.6v1.9C8.2,7,7.1,8.1,5.7,8.1z"/>\n <path class="st1" d="M7.6,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-0.7-0.6-1.3-1.3-1.3H3.9c-0.3,0-0.6-0.2-0.6-0.6s0.2-0.6,0.6-0.6h1.9\n c1.3,0,2.4,1.1,2.4,2.4v1.9C8.2,17.5,7.9,17.7,7.6,17.7z"/>\n <path class="st1" d="M13.4,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.6,0.2,0.6,0.6S17.5,14,17.2,14\n h-1.9c-0.7,0-1.3,0.6-1.3,1.3v1.9C14,17.5,13.8,17.7,13.4,17.7z"/>\n <path class="st1" d="M17.2,8.1h-1.9c-1.3,0-2.4-1.1-2.4-2.4V3.8c0-0.3,0.2-0.6,0.6-0.6S14,3.5,14,3.8v1.9C14,6.4,14.6,7,15.3,7h1.9\n c0.3,0,0.6,0.2,0.6,0.6S17.5,8.1,17.2,8.1z"/>\n </svg>\n </span>'),a.onclick=function(){var A=e.decoderState.state,t=A.expend,i=A.pantile;if(A.play)if(t)if(e.isMobile){var n=e._extendHeadeTimeLinrHight(!0);document.getElementById("".concat(e.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(e.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-32px"),document.getElementById("".concat(e.jSPlugin.id,"-select-speed"))&&(document.getElementById("".concat(e.jSPlugin.id,"-select-speed")).style.background="#ffffff"),function(A,e,t){var i="";i+="width:"+e+"px;",i+="height:"+t+"px;",i+="-webkit-transform: none; transform: none;",i+="-webkit-transform-origin: 0 0;",i+="transform-origin: 0 0;",i+="position: relative;",A.style.cssText=i}(document.getElementById("".concat(e.jSPlugin.id,"-wrap")),e.jSPlugin.width,e.jSPlugin.height),console.log("[mobile cancelMobileFullScreen]"),document.getElementById("".concat(e.jSPlugin.id,"-wrap")).classList.remove("ezuikit-player-wrap-mobile-fullscreen"),e.jSPlugin.jSPlugin.JS_Resize(e.jSPlugin.width,e.jSPlugin.height-n),i&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1})),e.jSPlugin.fullScreenWidth=e.jSPlugin.width,e.jSPlugin.fullScreenHeight=e.jSPlugin.height,e.jSPlugin.Zoom&&e.jSPlugin.Zoom.handleFullscreen&&e.jSPlugin.Zoom.handleFullscreen(!t,e.jSPlugin.width,e.jSPlugin.height),document.getElementById("".concat(e.jSPlugin.id,"-pantile-icon"))&&(document.getElementById("".concat(e.jSPlugin.id,"-pantile-icon")).style.display="none"),document.getElementById("".concat(e.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.bottom="calc(constant(safe-area-inset-bottom) + 100px)",document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.bottom="calc(env(safe-area-inset-bottom) + 100px)",document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.height=45*e.jSPlugin.videoLevelList.length+"px"),e.setDecoderState({expend:!1})}else e.jSPlugin.exitFullscreen();else if(e.isMobile){var a=e._extendHeadeTimeLinrHight(!0);y(document.getElementById("".concat(e.jSPlugin.id,"-wrap"))),document.getElementById("".concat(e.jSPlugin.id,"-wrap")).classList.add("ezuikit-player-wrap-mobile-fullscreen"),console.log("[mobile requestMobileFullScreen]");var o=document.documentElement.clientWidth,r=document.documentElement.clientHeight;document.getElementById("".concat(e.jSPlugin.id))&&(document.getElementById("".concat(e.jSPlugin.id)).style["backface-visibility"]="hidden"),document.getElementById("".concat(e.jSPlugin.id,"-select-speed"))&&(document.getElementById("".concat(e.jSPlugin.id,"-select-speed")).style.background="none"),e.jSPlugin.jSPlugin.JS_Resize(r,o-a,!0),e.jSPlugin.fullScreenWidth=r,e.jSPlugin.fullScreenHeight=o-a,e.jSPlugin.Zoom&&e.jSPlugin.Zoom.handleFullscreen&&e.jSPlugin.Zoom.handleFullscreen(!t,r,o-a),document.getElementById("".concat(e.jSPlugin.id,"-pantile-icon"))&&(document.getElementById("".concat(e.jSPlugin.id,"-pantile-icon")).style.display="block"),document.getElementById("".concat(e.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.bottom=0,document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.height="100%"),e.setDecoderState({expend:!0})}else e.jSPlugin.fullscreen()};break;case"webExpend":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_WEBEXPEND"),a.id=A,a.domString='<span><svg id="'.concat(this.jSPlugin.id,'-webExpend-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M3.1,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S6.8,4.1,6.6,4.1H4.8 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.6,7.4,3.3,7.6,3.1,7.6z" /><path d="M15.3,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.6,17.1,16.6,18.1,15.3,18.1z" /><circle class="st2" cx="10.2" cy="10.4" r="1.1"/></svg>'+'<svg class="theme-icon-item-icon" fill="'.concat(a.color,'" style="display:none;" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">\n <path class="st1" d="M5.4,8.1H3.5C3.2,8.1,3,7.9,3,7.6s0.2-0.5,0.5-0.5h1.9c0.8,0,1.4-0.6,1.4-1.4V3.8c0-0.3,0.2-0.5,0.5-0.5\n s0.5,0.2,0.5,0.5v1.9C7.7,7,6.7,8.1,5.4,8.1z"/>\n <path class="st1" d="M13.1,17.7c-0.3,0-0.5-0.2-0.5-0.5v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5H15\n c-0.8,0-1.4,0.6-1.4,1.4v1.9C13.6,17.4,13.4,17.7,13.1,17.7z"/>\n <circle class="st2" cx="10.2" cy="10.4" r="1.1"/>\n ')+"</svg></span>",a.onclick=function(){var A=e.decoderState.state,t=A.webExpend;if(A.expend)return console.log("正在全局全屏"),!1;window.recTimer&&Array.isArray(window.recTimer[e.jSPlugin.id])&&(window.recTimer[e.jSPlugin.id].map((function(A){clearInterval(A)})),window.recTimer[e.jSPlugin.id]=[]),t?e.jSPlugin.exitBrowserFullscreen():e.jSPlugin.browserFullscreen(),e.jSPlugin.Theme.Rec&&setTimeout((function(){e.jSPlugin.Theme.Rec.recAutoSize()}),100)};break;case"hd":if(o)break;var r="".concat(this.jSPlugin.id,"-select-quality"),s="".concat(r,"-item");a.title=this.jSPlugin.i18n.t("BTN_HD"),a.id=A;var g="",c="";return this.jSPlugin.videoLevelList.findIndex((function(A){return A.level==e.jSPlugin.videoLevel}))>-1?this.jSPlugin.videoLevelList.map((function(A){g+='<li class="selectOption default '.concat(s,'" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;" name="option" data-type="').concat(A.level,'" id="').concat(r,"_").concat(A.level,'">').concat(e.jSPlugin.i18n.t(_i[A.level]),"</li>"),A.level==e.jSPlugin.videoLevel&&(c+=e._videoLevelIcon(e.jSPlugin.id,r,e.jSPlugin.width,vi,A))})):this.jSPlugin.videoLevelList.map((function(A,t){0===t&&(c+=e._videoLevelIcon(e.jSPlugin.id,r,e.jSPlugin.width,vi,A)),g+='<li class="selectOption default '.concat(s,'" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;" name="option" data-type="').concat(A.level,'" id="').concat(r,"_").concat(A.level,'">').concat(e.jSPlugin.i18n.t(_i[A.level]),"</li>")})),g+='<li class="selectOption cancel" style="background: #ffffff;'.concat(this.isMobile?"":"display:none;",'" name="option" id="').concat(this.jSPlugin.id,'-select-speed">').concat(this.jSPlugin.i18n.t("SPEED_CANCEL"),"</li>"),c+='<span class=\'speed-select-mask\' style="display:none;height: 100vh;" id="'.concat(this.jSPlugin.id,'-select-hd-mask"></span>'),a.domString='<ul id="'.concat(this.jSPlugin.id,'-hdSelect" class="hd speed-select ').concat(this.isMobile?"mobile":"",'" style="display:none;bottom: calc(constant(safe-area-inset-bottom) + ').concat(this.isMobile?"100px":"50px",") !important;bottom: calc(env(safe-area-inset-bottom) + ").concat(this.isMobile?"100px":"50px",") !important;height: ").concat(45*this.jSPlugin.videoLevelList.length,'px">\n ').concat(g,'\n </ul>\n <span id="').concat(this.jSPlugin.id,'-hdSelect-icon-warp" style="user-select: none;">\n ').concat(c,"\n </span>"),a.onclick=function(A){var t=e.decoderState.state,i=t.expend,n=t.recordvideo,a=t.play,o=t.zoom,s=t.pantile,g=t.sound,c=t.talk;if(A.stopPropagation(),a){var l=A.target.id,I=A.target.getAttribute("data-type");if(0===l.indexOf(r)){if(e.jSPlugin.videoLevel+""!==I){if(c){var C=Xt.getGlobalState(),d=Xt.getInstance(e.jSPlugin.id);e.setDecoderState({talk:!1}),document.getElementById("".concat(e.jSPlugin.id,"-volume-column"))&&(document.getElementById("".concat(e.jSPlugin.id,"-volume-column")).style.display="none"),e.jSPlugin.Talk.stopTalk(),C.talk&&Xt.setGlobalState({talk:!1}),d.getState().talk&&d.setState({talk:!1})}var h=e.jSPlugin.videoLevelList.find((function(A){return A.level+""===I}));!h||h.streamTypeIn===e.jSPlugin.streamTypeIn&&h.level+""==e.jSPlugin.videoLevel+""||(e.jSPlugin.changeVideoLevel(h).then((function(A){g&&e.jSPlugin.openSound()})),o&&(e.jSPlugin.Zoom.stopZoom(),e.setDecoderState({zoom:!1})))}e.resetMobileZoomStatus(),n&&e.setDecoderState({recordvideo:!1})}e.showHD=!e.showHD,document.getElementById("".concat(e.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.display="none"===document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.display?"block":"none",e.isMobile&&(document.getElementById("".concat(e.jSPlugin.id,"-select-hd-mask")).style.display="none"===document.getElementById("".concat(e.jSPlugin.id,"-select-hd-mask")).style.display?"block":"none"),e.themeData.autoFocus>0&&("none"===document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.display?e.startAutoFocus():e.stopAutoFocus())),e.isMobile&&i&&e.showHD?document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).className="hd speed-select mobile expend":document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).className=e.isMobile?"hd speed-select mobile":"speed-select",s&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1}))}},a;case"speed":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_SPEED"),a.id=A,a.domString='<ul id="'.concat(this.jSPlugin.id,'-speedSelect" class="speed speed-select ').concat(this.isMobile?"mobile":"",'" style="display:none;bottom: calc(constant(safe-area-inset-bottom) + ').concat(this.isMobile?"100px":"50px",") !important;bottom: calc(env(safe-area-inset-bottom) + ").concat(this.isMobile?"100px":"50px",') !important;">')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed4">4').concat(this.jSPlugin.i18n.t("SPEED_RATE"),"</li>")+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed2">2').concat(this.jSPlugin.i18n.t("SPEED_RATE"),"</li>")+'<li class="selectOption active" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed1">1').concat(this.jSPlugin.i18n.t("SPEED_RATE"),"</li>")+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed05">0.5').concat(this.jSPlugin.i18n.t("SPEED_RATE"),"</li>")+'<li class="selectOption cancel" style="'.concat(this.isMobile?"":"display:none;",'" name="option" id="').concat(this.jSPlugin.id,'-select-speed">').concat(this.jSPlugin.i18n.t("SPEED_CANCEL"),"</li>")+"</ul>"+'<span>\n <div style="font-size: 12px;\n vertical-align: bottom;\n display: inline-flex;\n padding: 0px 7px;\n width: 48px;\n line-height: 24px;\n justify-content: center;\n border: 1px solid '.concat(a.color,';\n text-align: center;border-radius: 12.5px; user-select: none;"\n id="').concat(this.jSPlugin.id,'-speed-text"\n >').concat(1===this.nextRate?this.jSPlugin.i18n.t("SPEED"):"".concat(this.nextRate).concat(this.jSPlugin.i18n.t("SPEED_RATE")).replace("3","0.5"),"</div>\n ")+'<span class=\'speed-select-mask\' style="display:none;height: 100vh;" id="'.concat(this.jSPlugin.id,'-select-mask"></span>')+"</span>",a.onclick=function(A){var t=e.decoderState.state,i=t.speed,n=t.expend,a=t.play;if(A.stopPropagation(),!a)return!1;if(!i&&e.isMobile&&(document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).className=n?"speed speed-select mobile expend":"speed speed-select mobile"),e.isMobile&&(n?(document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.bottom="constant(safe-area-inset-bottom)",document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.bottom="env(safe-area-inset-bottom)"):(document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.bottom="calc(constant(safe-area-inset-bottom) + 100px)",document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.bottom="calc(env(safe-area-inset-bottom) + 100px)")),e.nextRate=1,A.target.id)switch(A.target.id){case"".concat(e.jSPlugin.id,"-select-speed1"):e.nextRate=1,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(1),e.jSPlugin.speed=1,e.setDecoderState({speed:!i});break;case"".concat(e.jSPlugin.id,"-select-speed2"):e.nextRate=2,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(2),e.jSPlugin.speed=2,e.setDecoderState({speed:!i});break;case"".concat(e.jSPlugin.id,"-select-speed4"):e.nextRate=4,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(4),e.jSPlugin.speed=4,e.setDecoderState({speed:!i});break;case"".concat(e.jSPlugin.id,"-select-speed05"):e.nextRate=3,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(.5),e.jSPlugin.speed=.5,e.setDecoderState({speed:!i});break;default:e.isMobile?e.setDecoderState({speed:!i}):e.setDecoderState({speed:!0})}e.isMobile&&A.target.id==="".concat(e.jSPlugin.id,"-speed-text")?document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.display="block":document.getElementById("".concat(e.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.display="none"===document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.display?"block":"none"),e.setDecoderState({speed:!i}),e.themeData.autoFocus>0&&("none"===document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.display?e.startAutoFocus():e.stopAutoFocus())};break;case"deviceName":a.title=this.jSPlugin.i18n.t("DEVICE_NAME"),a.id=A,a.domString="<span>".concat(this.jSPlugin.i18n.t("DEVICE_NAME"),"</span>"),a.onclick=function(){};break;case"deviceID":a.title=this.jSPlugin.i18n.t("DEVICE_ID"),a.id=A,a.domString="<span>".concat(this.jSPlugin.i18n.t("DEVICE_ID"),"</span>"),a.onclick=function(){};break;case"cloudRec":if(this.jSPlugin._isCloudRecord)break;a.title=this.jSPlugin.i18n.t("BTN_CLOUDREC"),a.id=A,a.domString='\n <span>\n <svg class="theme-icon-item-icon" fill="'.concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-10 0 40 15">\n\t<path d="M9.5,13.1c-0.3,0-0.5-0.2-0.5-0.5V8.8c0-0.3,0.2-0.5,0.5-0.5S10,8.5,10,8.8v3.8C10,12.8,9.8,13.1,9.5,13.1z"/>\n\t<path d="M7.6,10.6c-0.1,0-0.3-0.1-0.4-0.2C7,10.2,7,9.9,7.3,9.7l1.9-1.7c0.2-0.2,0.5-0.2,0.7,0l1.8,1.7\n\t\tc0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.5,0.2-0.7,0L9.5,9.1l-1.6,1.4C7.8,10.6,7.7,10.6,7.6,10.6z"/>\n\t<path d="M13.2,15.7H5.6c-2.1-0.1-3.8-1.8-3.8-3.9c0-1.8,1.3-3.4,3-3.8c0.4-2.2,2.3-3.9,4.6-3.9c2.3,0,4.2,1.7,4.6,3.8\n\t\tc1.8,0.4,3.1,1.9,3.1,3.8C17.1,13.9,15.4,15.7,13.2,15.7z M5.6,14.7h7.6c1.6,0,2.9-1.3,2.9-2.9c0-1.5-1.1-2.7-2.6-2.9l-0.4,0l0-0.4\n\t\tc-0.2-1.9-1.7-3.3-3.6-3.3C7.5,5.1,6,6.6,5.8,8.5l0,0.4l-0.4,0c-1.4,0.2-2.5,1.4-2.5,2.9C2.8,13.3,4.1,14.6,5.6,14.7z"/>\n </svg>\n </span>\n '),a.onclick=function(){var A=e.decoderState.state.sound;e.setDecoderState({type:"cloud.rec",cloudRec:!0,rec:!1}),e.jSPlugin.eventEmitter.emit("recTypeChange",{eventType:"recTypeChange",code:0,data:{type:"cloud"}}),e.jSPlugin.changePlayUrl({type:"cloud.rec"},(function(){var A=p("begin",e.jSPlugin.url)||(new Date).Format("yyyyMMdd");e.Rec.renderRec("".concat(A.slice(0,4),"-").concat(A.slice(4,6),"-").concat(A.slice(6,8))),e.decoderState.state.zoom&&(e.setDecoderState({zoom:!1}),e.jSPlugin.Zoom.stopZoom(),e.jSPlugin.close3DZoom()),e.Rec&&e.Rec.syncTimeLine()}),!1).then((function(){A&&e.jSPlugin.openSound()}))};break;case"cloudRecord":if(!this.jSPlugin._isCloudRecord)break;a.title=this.jSPlugin.i18n.t("BTN_CLOUDRECORD"),a.id=A,a.domString='<span style="font-size: 24px; width: 48px; display: inline-block; text-align: center;line-height: 56px;"> \n<svg class="theme-icon-item-icon" fill="'.concat(a.color,'" version="1.1" height="1em" viewBox="0 0 48 49">\n<g transform="translate(3.000000, 10.000000)">\n\t<g><path d="M38.1,24.2c-0.8,0-1.6-0.2-2.3-0.6L31,20.9l1.5-2.6l4.8,2.7c0.3,0.1,0.5,0.2,0.8,0.2c1,0,1.8-0.8,1.8-1.8V9.6\n\t\t\tc0-0.3-0.1-0.5-0.2-0.8c-0.2-0.4-0.6-0.8-1-0.9c-0.4-0.2-0.9-0.1-1.3,0.1l-5,2.4l-1.3-2.7l5-2.4c1.1-0.5,2.4-0.6,3.6-0.2\n\t\t\tc1.2,0.4,2.2,1.3,2.7,2.5c0.3,0.6,0.4,1.3,0.4,2v9.8C42.8,22,40.7,24.2,38.1,24.2z"/>\n\t</g>\n\t<g><path d="M27.7,30H4.9c-3.5,0-6.4-2.9-6.4-6.4V5.4C-1.5,1.9,1.4-1,4.9-1h22.8c3.5,0,6.4,2.9,6.4,6.4v18.1\n\t\t\tC34.1,27.1,31.2,30,27.7,30z M4.9,2C3,2,1.5,3.5,1.5,5.4v18.1C1.5,25.5,3,27,4.9,27h22.8c1.9,0,3.4-1.5,3.4-3.4V5.4\n\t\t\tc0-1.9-1.5-3.4-3.4-3.4H4.9z"/>\n\t</g><g><path d="M12.1,7.1c0.9,0,1.6,0.7,1.6,1.5c0,0.8-0.6,1.4-1.4,1.5l-0.2,0H8.9c-0.9,0-1.6-0.7-1.6-1.5\n\t\t\tc0-0.8,0.6-1.4,1.4-1.5l0.2,0H12.1z"/></g></g></svg></span>'),a.onclick=function(){var A=e.decoderState.state.sound;e.setDecoderState({type:"cloud.rec",cloudRec:!0,rec:!1}),e.jSPlugin.eventEmitter.emit("recTypeChange",{eventType:"recTypeChange",code:0,data:{type:"cloudRecord"}}),e.jSPlugin.url.replace(/rec\??|cloud.rec\??/,"cloud.rec?busType=7"),e.jSPlugin.changePlayUrl({type:"cloud.rec"},(function(){e.jSPlugin._isCloudRecord&&e.changeTheme("pcRec");var A=p("begin",e.jSPlugin.url)||(new Date).Format("yyyyMMdd");e.Rec.renderRec("".concat(A.slice(0,4),"-").concat(A.slice(4,6),"-").concat(A.slice(6,8))),e.decoderState.state.zoom&&(e.setDecoderState({zoom:!1}),e.jSPlugin.Zoom.stopZoom(),e.jSPlugin.close3DZoom()),e.Rec&&e.Rec.syncTimeLine()}),!1).then((function(){A&&e.jSPlugin.openSound()}))};break;case"rec":a.title=this.jSPlugin.i18n.t("BTN_REC"),a.id=A,a.domString='\n <span>\n <svg class="theme-icon-item-icon" fill='.concat(a.color,' version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="0 0 40 15">\n <path d="M13,16.3H5.5c-1.1,0-2-0.9-2-2V3.8c0-1.1,0.9-2,2-2h5.4c0.5,0,1,0.2,1.4,0.6l2.1,2.1C14.8,4.8,15,5.3,15,5.9\n v8.4C15,15.4,14.1,16.3,13,16.3z M5.5,2.8c-0.6,0-1,0.4-1,1v10.5c0,0.6,0.4,1,1,1H13c0.6,0,1-0.4,1-1V5.9c0-0.3-0.1-0.5-0.3-0.7\n L11.6,3c-0.2-0.2-0.4-0.3-0.7-0.3H5.5z"/>\n<path d="M6.3,7.3C6,7.3,5.8,7,5.8,6.8V4.5C5.8,4.2,6,4,6.3,4s0.5,0.2,0.5,0.5v2.2C6.8,7,6.6,7.3,6.3,7.3z"/>\n<path d="M8.5,7.3C8.3,7.3,8,7,8,6.8V4.5C8,4.2,8.3,4,8.5,4S9,4.2,9,4.5v2.2C9,7,8.8,7.3,8.5,7.3z"/>\n<path d="M10.8,7.3c-0.3,0-0.5-0.2-0.5-0.5V4.5c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v2.2C11.3,7,11.1,7.3,10.8,7.3z"\n />\n </svg>\n </span>\n '),a.onclick=function(){var A=e.decoderState.state.sound;e.setDecoderState({type:"rec",cloudRec:!1,rec:!0}),e.jSPlugin.eventEmitter.emit("recTypeChange",{eventType:"recTypeChange",code:0,data:{type:"local"}}),e.jSPlugin.changePlayUrl({type:"rec"},(function(){e.jSPlugin._isCloudRecord&&e.changeTheme("pcRec");var A=p("begin",e.jSPlugin.url)||(new Date).Format("yyyyMMdd");e.Rec.renderRec("".concat(A.slice(0,4),"-").concat(A.slice(4,6),"-").concat(A.slice(6,8))),e.decoderState.state.zoom&&(e.setDecoderState({zoom:!1}),e.jSPlugin.Zoom.stopZoom(),e.jSPlugin.close3DZoom()),e.Rec&&e.Rec.syncTimeLine()}),!1).then((function(){A&&e.jSPlugin.openSound()}))}}return a}},{key:"_videoLevelIcon",value:function(A,e,t,i,n){return'\n <span id="'.concat(A,'-videoLevel-icon" class="theme-icon-item-icon ').concat(e,"-btn\" data-type='").concat(n.level,"' style=\"display: inline-block;min-width: 48px;height: ").concat(t>i?48:32,"px;line-height: ").concat(t>i?48:30,'px;text-align: center;">\n ').concat(this.jSPlugin.i18n.t(_i[n.level]),"\n </span>\n ")}},{key:"_fullScreenChangeEvent",value:function(){var A=this,e=document.getElementById("".concat(this.jSPlugin.id,"-wrap")),t=document.getElementById("".concat(this.jSPlugin.id)),i=this;this._fullscreenchange=function(n){var a=i.decoderState.state.zoom;n.target===t?A.jSPlugin.isCurrentFullscreen?i.setDecoderState({expend:!0,webExpend:!1}):(i.setDecoderState({expend:!1,webExpend:!1}),a&&i.jSPlugin.use3DZoom&&i.jSPlugin.enable3DZoom()):n.target===e&&(A.jSPlugin.isCurrentBrowserFullscreen?i.setDecoderState({webExpend:!0}):i.setDecoderState({webExpend:!1})),i.Rec&&window.randomNum==i.jSPlugin.randomNum&&setTimeout((function(){i.Rec.recAutoSize((function(){if(i.jSPlugin.Zoom.currentScale>1){var A=i.jSPlugin.Zoom.currentScale;i.jSPlugin.Zoom.stopZoom(),setTimeout((function(){i.jSPlugin.Zoom.startZoom(),i.jSPlugin.Zoom.currentScale=A,i.jSPlugin.Zoom.doScale(A)}),200)}}))}),100),document.getElementById("".concat(i.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-hdSelect")).style.display="none"),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display="none"),i.isMobile&&(document.getElementById("".concat(i.jSPlugin.id,"-select-hd-mask"))&&(document.getElementById("".concat(i.jSPlugin.id,"-select-hd-mask")).style.display="none"),document.getElementById("".concat(i.jSPlugin.id,"-select-mask"))&&(document.getElementById("".concat(i.jSPlugin.id,"-select-mask")).style.display="none")),i.themeData.autoFocus>0&&i.startAutoFocus(),A.setDecoderState({speed:!1})},U.isEnabled&&U.on("change",this._fullscreenchange)}},{key:"changeRecSpeed",value:function(A){var e=this,t=function(A){if(!document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")))return!1;document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[0].className=document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[0].className.replace("active","default"),document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[1].className=document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[1].className.replace("active","default"),document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[2].className=document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[2].className.replace("active","default"),document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[3].className=document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[3].className.replace("active","default"),document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[A].className=document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[A].className.replace("default","active")},i="1";switch(A){case 1:t(2),i=this.jSPlugin.i18n.t("SPEED");break;case 2:t(1),i="".concat(A).concat(this.jSPlugin.i18n.t("SPEED_RATE"));break;case 4:t(0),i="".concat(A).concat(this.jSPlugin.i18n.t("SPEED_RATE"));break;case.5:t(3),i="".concat(A).concat(this.jSPlugin.i18n.t("SPEED_RATE"));break;default:t(2),i="".concat(A).concat(this.jSPlugin.i18n.t("SPEED_RATE"))}document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))&&(document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).innerHTML=i)}},{key:"initThemeData",value:function(){var A=this,e=this.themeData,t=e.header,i=e.footer,n=this.jSPlugin.id;if(this.header=kt,this.footer=Pt,this.isNeedRenderHeader=bt(t.btnList,(function(A){return A.isrender>0}))>=0&&"miniRec"!=this.jSPlugin.id,this.isMobile&&(this.isNeedRenderHeader=bt(t.btnList,(function(A){return A.isrender>0&&"deviceID"===A.iconId||A.isrender>0&&"deviceName"===A.iconId}))>=0&&"miniRec"!=this.jSPlugin.id),this.isNeedRenderFooter=bt(i.btnList,(function(A){return A.isrender>0}))>=0&&"miniRec"!=this.jSPlugin.id,this.isNeedRenderTimeLine=bt(t.btnList,(function(A){return"cloudRec"===A.iconId&&1===A.isrender||"rec"===A.iconId&&1===A.isrender}))>=0&&!this.jSPlugin.disabledTimeLine&&"miniRec"!=this.jSPlugin.id,["date-switch-container-wrap","rec-type-container-wrap","mobile-rec-wrap","mobile-ez-ptz-container"].forEach((function(A,e){document.getElementById(A)&&document.getElementById(A).parentElement.removeChild(document.getElementById(A))})),this.isNeedRenderHeader){if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width: calc(100% - 100px);'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>");else{var a=document.createElement("div");a.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),a.setAttribute("class","header-controls"),a.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex;width:calc(100% - 100px);overflow:hidden;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' class=\"header-controls-right\" style='display:flex;'></div>");var o={height:this.jSPlugin.width>vi?"48px":"32px","line-height":this.jSPlugin.width>vi?"48px":"32px",display:"flex","justify-content":"space-between",top:0,left:0,right:0,"z-index":999,"background-color":"rgba(0,0,0,.8)",color:"#FFFFFF",width:"100%",position:"absolute"};a.style=wi(o),document.getElementById("".concat(n,"-wrap")).insertBefore(a,document.getElementById(n))}var s=document.getElementById("".concat(n,"-wrap")).classList.contains("ezuikit-player-wrap-mobile-fullscreen");!document.getElementById("".concat(this.jSPlugin.id,"-headControl"))||this.jSPlugin._isCurrentBrowserFullscreen||s||this.jSPlugin.jSPlugin.JS_Resize(this.jSPlugin.width,this.jSPlugin.height-this._extendHeadeTimeLinrHight(!1),!0)}else document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&document.getElementById("".concat(this.jSPlugin.id,"-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))),!document.getElementById("".concat(this.jSPlugin.id,"-headControl"))||this.jSPlugin._isCurrentBrowserFullscreen||isMobileFullscreen||this.jSPlugin.jSPlugin.JS_Resize(this.jSPlugin.width,this.jSPlugin.height-this._extendHeadeTimeLinrHight(!1),!0);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>vi?48:32,"px"),document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='<div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-between;height: ').concat(this.jSPlugin.width>vi?48:32,"px;width:100%;'><div id='").concat(this.jSPlugin.id,"-audioControls-left' class=\"footer-controls-left\" style='display:flex'></div><div id='").concat(this.jSPlugin.id,"-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div></div>"));else{var g=document.createElement("div");g.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container")),g.setAttribute("class","ez-iframe-footer-container");var c={"min-height":this.jSPlugin.width>vi?"48px":"32px","max-height":this.jSPlugin.width>vi?"96px":"80px",position:"relative","margin-top":this.jSPlugin.width>vi?"-48px":"-32px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%"};g.style=wi(c),g.innerHTML='<div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;height:').concat(this.jSPlugin.width>vi?48:32,"px;justify-content: space-between;width:100%;z-index:999;position: relative;'><div id='").concat(this.jSPlugin.id,"-audioControls-left' class=\"footer-controls-left\" style='display:flex;'></div><div id='").concat(this.jSPlugin.id,"-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div></div>"),m(g,document.getElementById(n))}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=t.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=t.color;var l,I=r(t.btnList);try{for(I.s();!(l=I.n()).done;){var C=l.value;if(C.isrender)try{this.renderHeader(C.iconId,C.part)}catch(A){}}}catch(A){I.e(A)}finally{I.f()}}if(this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=i.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=i.color;var d,h=r(i.btnList);try{for(h.s();!(d=h.n()).done;){var B=d.value;if(B.isrender)try{this.renderFooter(B.iconId,B.part)}catch(A){}}}catch(A){h.e(A)}finally{h.f()}}if(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?this.Rec.recInit():this.Rec=new ei(this.jSPlugin,this.changeRecSpeed,this.resetMobileZoomStatus);else{this.Rec?this.Rec.recInit():(this.jSPlugin.decoderState=this.decoderState,this.jSPlugin.setDecoderState=this.setDecoderState,this.Rec=new qt(this.jSPlugin));var u=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(u)}),50)}if(bt(this.themeData.footer.btnList,(function(A){return"pantile"===A.iconId&&1===A.isrender}))>=0&&!this.jSPlugin.disabledPTZ&&(this.isMobile&&(this.MobilePtz=new Ii(this.jSPlugin)),this.Ptz=new ti(this.jSPlugin)),this.themeData.poster){this.jSPlugin.poster=this.themeData.poster;var E=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(E),A.jSPlugin.setPoster(A.themeData.poster))}),50)}this.inited=!0,this.jSPlugin.deviceInfo&&(document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content"))&&(document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content")).style.maxWidth="100%",document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content")).style.overflow="hidden",document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content")).style.textOverflow="ellipsis",document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content")).style.whiteSpace="nowrap",document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content")).innerHTML=this.jSPlugin.deviceInfo.deviceName||""),document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content"))&&(document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content")).style.maxWidth="100%",document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content")).style.overflow="hidden",document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content")).style.textOverflow="ellipsis",document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content")).style.whiteSpace="nowrap",document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content")).innerHTML=_(this.jSPlugin.url).deviceSerial||"")),this.renderThemeData()}},{key:"resetMobileZoomStatus",value:function(){if(this.isMobile){var A=document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"));A&&A.style&&"none"!=A.style.display&&(A.style.display="none"),this.jSPlugin.jSPlugin.Zoom&&this.jSPlugin.jSPlugin.Zoom.resetZoom()}}},{key:"webExpend",value:function(){var A=this.decoderState.state;A.webExpend;var e=A.expend;return!!A.play&&(e?(console.log("正在全局全屏"),!1):void this.jSPlugin.browserFullscreen())}},{key:"expend",value:function(){var A=this.decoderState.state,e=A.webExpend;return!!A.play&&(e?(console.log("正在网站全屏"),!1):void(this.isMobile?(y(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),document.documentElement.clientWidth,document.documentElement.clientHeight,document.getElementById("".concat(this.jSPlugin.id)).style["backface-visibility"]="hidden"):this.jSPlugin.fullscreen()))}},{key:"_extendHeadeTimeLinrHight",value:function(A){var e=0,t=document.getElementById("".concat(this.jSPlugin.id,"-canvas-container"));return t&&!A&&(e=parseInt(window.getComputedStyle(t).height,10)),e}},{key:"disabledFECBtn",value:function(){var A=["".concat(this.jSPlugin.id,"-capturePicture"),"".concat(this.jSPlugin.id,"-capturePicture-content"),"".concat(this.jSPlugin.id,"-capturePicture-icon"),"".concat(this.jSPlugin.id,"-recordvideo"),"".concat(this.jSPlugin.id,"-recordvideo-content"),"".concat(this.jSPlugin.id,"-recordvideo-icon"),"".concat(this.jSPlugin.id,"-zoom"),"".concat(this.jSPlugin.id,"-zoom-content"),"".concat(this.jSPlugin.id,"-zoom-icon")],e=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));if(this.jSPlugin.use3DZoom?this.jSPlugin.close3DZoom():this.jSPlugin.Zoom.stopZoom(),this.setDecoderState({zoom:!1}),e){var t,i=r(A);try{for(i.s();!(t=i.n()).done;){var n=t.value,a=e.querySelector("#".concat(n));a&&(a.style.display="none")}}catch(A){i.e(A)}finally{i.f()}}}},{key:"resumeFECBtn",value:function(){var A=["".concat(this.jSPlugin.id,"-capturePicture"),"".concat(this.jSPlugin.id,"-capturePicture-content"),"".concat(this.jSPlugin.id,"-capturePicture-icon"),"".concat(this.jSPlugin.id,"-recordvideo"),"".concat(this.jSPlugin.id,"-recordvideo-content"),"".concat(this.jSPlugin.id,"-recordvideo-icon"),"".concat(this.jSPlugin.id,"-zoom"),"".concat(this.jSPlugin.id,"-zoom-content"),"".concat(this.jSPlugin.id,"-zoom-icon")],e=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));if(e){var t,i=r(A);try{for(i.s();!(t=i.n()).done;){var n=t.value,a=e.querySelector("#".concat(n));a&&(a.style.display="")}}catch(A){i.e(A)}finally{i.f()}}}},{key:"destroy",value:function(){var A=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));this.Rec&&this.Rec.destroy&&this.Rec.destroy(),this.Ptz&&this.Ptz.destroy&&this.Ptz.destroy(),A&&(A.innerHTML="");var e=document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"));this._removeElement(e);var t=document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item"));this._removeElement(t);var i=document.getElementById("mobile-ez-ptz-container");this._removeElement(i);var n=document.getElementById("date-switch-container-wrap");this._removeElement(n);var a=document.getElementById("rec-type-container-wrap");this._removeElement(a);var o=document.getElementById("mobile-rec-wrap");this._removeElement(o),U.isEnabled&&this._fullscreenchange&&U.off("change",this._fullscreenchange),Q("".concat(this.jSPlugin.staticPath,"/speed/speed.css")),Q("".concat(this.jSPlugin.staticPath,"/css/theme.css"))}},{key:"_removeElement",value:function(A){A&&A.parentNode&&A.parentNode.removeChild(A)}}])}(),Fi=function(){return o((function A(e){t(this,A),this.url=e.url||"",this.method=e.method||"POST",this.headers=e.headers||{},this.body=e.body||{},this.onBeforeUpload=e.onBeforeUpload||function(){},this.onUploadProgress=e.onUploadProgress||function(){},this.onUploadComplete=e.onUploadComplete||function(){},this.controller=new AbortController}),[{key:"upload",value:function(){var A=this;this.onBeforeUpload(this.body);var e={method:this.method,headers:this.headers,signal:this.controller.signal,body:this.body};fetch(this.url,e).then((function(A){return A.json()})).then((function(e){A.onUploadComplete({body:A.body,response:e})})).catch((function(A){"AbortError"===A.name?console.log("上传被取消"):console.error("Error:",A)})),e.body&&"FormData"==e.body.constructor.name&&"signal"in e&&e.signal.addEventListener("progress",(function(e){e.lengthComputable&&A.onUploadProgress(c(c({},A.body),{},{progress:e.loaded/e.total}))}))}},{key:"cancel",value:function(){this.controller.abort()}}])}(),Ri=function(){return o((function A(e,i){t(this,A),this.jSPlugin=e,this.isMobile=i,this.timer=null,this.initToastCustom()}),[{key:"initToastCustom",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom"))?document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom")).style.display="none":this.randerToast()}},{key:"randerToast",value:function(){var A=this.jSPlugin.width,e=1;e=this.isMobile?A/375||1:A/1024||1;var t=document.getElementById("".concat(this.jSPlugin.id,"-wrap")),i=document.createElement("div");i.style="display:none;position:absolute;top:0;width: 100%;align-items: center;justify-content: center;",i.id="".concat(this.jSPlugin.id,"-wrap-Toast-custom"),this.isMobile?i.innerHTML='<div id="'.concat(this.jSPlugin.id,'-wrap-Toast-custom-content" \n style="padding: ').concat(12*e,"px ").concat(20*e,"px;font-size: ").concat(16*e,"px;line-height:").concat(16*e,"px;border-radius: ").concat(8*e,"px;margin-top: ").concat(667*e*.53,'px;\n background-color: rgba(0,0,0,0.8);color:rgba(255,255,255,0.90);box-sizing: border-box;z-index: 999;">\n </div>\n '):i.innerHTML='<div id="'.concat(this.jSPlugin.id,'-wrap-Toast-custom-content" \n style="padding: ').concat(20*e,"px ").concat(32*e,"px;font-size: ").concat(24*e,"px;line-height:").concat(24*e,"px;border-radius: ").concat(12*e,"px;margin-top: ").concat(36*e,'px;\n background-color: rgba(0,0,0,0.7);color:rgba(255,255,255,0.90);box-sizing: border-box;z-index: 999;">\n </div>\n '),t.insertBefore(i,document.getElementById(this.jSPlugin.id))}},{key:"initToastContent",value:function(A){var e=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3;console.log("content----------------",A),this.timer=null,document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom"))?(document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom-content")).innerText=A||"",this.timer=setTimeout((function(){document.getElementById("".concat(e.jSPlugin.id,"-wrap"))&&document.getElementById("".concat(e.jSPlugin.id,"-wrap-Toast-custom"))&&document.getElementById("".concat(e.jSPlugin.id,"-wrap")).removeChild(document.getElementById("".concat(e.jSPlugin.id,"-wrap-Toast-custom")))}),t)):(this.randerToast(),this.initToastContent(A))}}])}(),ki=function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},r="";o=Object.assign(o,a);var s=new Headers;Object.keys(o).map((function(A){s.append(A,o[A])})),o=s,Object.keys(Object.assign({},t)).forEach((function(A){var e=t[A];"string"==typeof t[A]&&(e=t[A].replace("%","%25")),void 0!==t[A]&&(r+="&".concat(A,"=").concat(encodeURIComponent(e)))})),r.length>0&&(r=-1!==["GET","PUT","DELETE"].indexOf(e.toUpperCase())?"?".concat(r.slice(1)):r.slice(1));var g=A+(-1!==["GET","PUT","DELETE"].indexOf(e.toUpperCase())?r:""),c={headers:o,method:e};"POST"===e&&(c.body=r),"POST"===e&&a&&"application/json"===a["Content-Type"]&&(c.body=JSON.stringify(t)),"GET"===e&&(-1===g.indexOf("?")?g+="?_r=".concat(Math.random()):g+="&_r=".concat(Math.random())),fetch(g,c).then((function(A){var e=A.headers.get("content-type");return e&&-1!==e.indexOf("application/json")?A.json():A.text()})).then((function(A){i&&i(A)})).catch((function(A){n&&n(A)}))},Pi=function(A,e,t){var i=new FormData;i.append("deviceSerial",_(A.url).deviceSerial),i.append("cmd","open"),fetch("".concat(domain,"/api/v3/device/acs/remote/door?accessToken=").concat(A.accessToken||A.token.deviceToken.globalAll),{method:"POST",body:i}).then((function(A){return A.json()})).then((function(A){console.log("get theme data",A),e(A)})).catch((function(A){t(A)}))},Ni=function(A,e,t){var i={accessToken:A.accessToken||A.token.httpToken.url,pageStart:0,pageSize:4,default:!0,voiceName:"轻应用语音文件"},n="".concat(A.env.domain,"/api/lapp/voice/query");ki(n,"POST",i,(function(A){console.log(A),e(A)}),(function(A){console.log(A),t(A)}),{"Content-Type":"application/x-www-form-urlencoded"})},Ti=function(A,e,t,i){var n="".concat(A.env.domain,"/api/lapp/voice/send"),a=new FormData;a.append("deviceSerial",_(A.url).deviceSerial),a.append("accessToken",A.accessToken||A.token.deviceToken.video),a.append("channelNo",_(A.url).channelNo||1),a.append("fileUrl",e),fetch(n,{method:"POST",body:a}).then((function(A){return A.json()})).then((function(A){!function(A){console.log(A),t(A)}(A)})).catch((function(A){var e;e=A,console.log(e),i(e)}))},Mi=function(){return o((function A(e,i){t(this,A),this.jSPlugin=e,this.videoWidth=e.width,this.switchFooter=i,this.sendLoadingStats=!1,this.toastCustom=new Ri(e,!1),this.quickReplyList=["你好,请将快递放在门口","你好,稍等","你好,请将快递放入小区快递柜","你好,请将外卖放在门口"],this.initQuickReply()}),[{key:"initQuickReply",value:function(){document.getElementById("pc-quickReply-back")||this.renderQuickReply(),document.getElementById("pc-quickReply-back-item-0")||this.getQuickReplyList()}},{key:"renderQuickReply",value:function(){var A=this,e=this.videoWidth/1024||1,t=document.createElement("div");t.style="width:100%;",t.innerHTML='<div style="width:100%;display:flex;flex-direction:row;align-items: center;">\n <div id="pc-quickReply-back" style="display: flex;align-items: center;margin: 0 '.concat(8*e,"px 0 ").concat(16*e,'px;cursor: pointer;">\n <div style="height: ').concat(32*e,'px;">\n <svg width="').concat(32*e,'px" height="').concat(32*e,'px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>返回</title>\n <defs>\n <filter id="filter-1">\n <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>\n </filter>\n </defs>\n <g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="快速回复loading" transform="translate(-16.000000, -497.000000)">\n <g id="返回" transform="translate(0.000000, 425.000000)" filter="url(#filter-1)">\n <g transform="translate(16.000000, 72.000000)">\n <rect id="Rectangle" x="0" y="0" width="32" height="32"></rect>\n <path d="M12.5,7.5 C13.2988404,7.5 13.9518304,8.12445998 13.9974537,8.91186361 L14,9 L14,21.5 L26.5,21.5 C27.2988404,21.5 27.9518304,22.12446 27.9974537,22.9118636 L28,23 C28,23.7988404 27.37554,24.4518304 26.5881364,24.4974537 L26.5,24.5 L12.5,24.5 C11.7011596,24.5 11.0481696,23.87554 11.0025463,23.0881364 L11,23 L11,9 C11,8.17157288 11.6715729,7.5 12.5,7.5 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" transform="translate(19.500000, 16.000000) rotate(45.000000) translate(-19.500000, -16.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n <span style="font-size: ').concat(24*e,'px;">返回</span>\n </div>\n <div id="pc-quickReply-content" style="display: block;width:calc(100% - ').concat(160*e,"px);margin: 0 ").concat(24*e,'px;"></div>\n <div id="pc-quickReply-loading" style="display: none;width:calc(100% - ').concat(160*e,"px);margin: 0 ").concat(24*e,'px;"></div>\n <div id="pc-quickReply-loaderror" style="display: none;width:calc(100% - ').concat(160*e,"px);margin: 0 ").concat(24*e,'px;"></div>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply")).appendChild(t),document.getElementById("pc-quickReply-back").onclick=function(){A.switchFooter("onBell")}}},{key:"matchQuickReplyBtn",value:function(){var A=this,e=this.videoWidth/1024||1,t=document.getElementById("pc-quickReply-content");this.quickReplyList&&this.quickReplyList.length>0&&this.quickReplyList.forEach((function(i,n){var a=document.createElement("div");a.id="pc-quickReply-back-item-".concat(n),a.style="margin: ".concat(8*e,"px 0 ").concat(8*e,"px ").concat(8*e,"px;cursor: pointer;\n padding: 0 ").concat(20*e,"px;min-height: ").concat(64*e,"px;width:calc(50% - ").concat(16*e,"px);\n display: inline-block;background: rgba(0,0,0,0.70);border-radius: 8px;text-align: center;\n box-sizing: border-box;font-size:").concat(24*e,"px;color: rgba(255,255,255,0.90);"),a.innerHTML='<div id="pc-quickReply-back-item-box-'.concat(n,'">\n <span id="pc-quickReply-name-').concat(n,'" style="line-height: ').concat(64*e,'px;">').concat(i.voiceName,"</span>\n </div>"),a.onclick=function(){A.sendLoadingStats||(console.log("item:"+i),A.sendQuickReply(i,n))},t.appendChild(a)}))}},{key:"setBtnCheckLoading",value:function(A,e){var t=this.videoWidth/1024||1;if(e>-1){document.getElementById("pc-quickReply-back-item-".concat(e));var i=document.getElementById("pc-quickReply-back-item-box-".concat(e)),n=document.getElementById("pc-quickReply-name-".concat(e));if(1==A){var a=document.getElementById("pc-quickReply-icon-loading-".concat(e));a&&n&&i.removeChild(a)}else if(n){var o=document.createElement("span");o.id="pc-quickReply-icon-loading-".concat(e),o.style="vertical-align: middle;margin-right:".concat(16*t,"px;"),o.innerHTML='<svg width="'.concat(30*t,'" height="').concat(30*t,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>'),i.insertBefore(o,n)}}}},{key:"getQuickReplyList",value:function(){var A=this;console.log("getQuickReplyList"),this.madeLoadingDom(0);Ni(this.jSPlugin,(function(e){if(e&&200==e.code){var t=e.data||[],i=[];e.data.forEach((function(A,e){i=A.voiceName.split("_"),t[e].voiceName=i[1]})),A.quickReplyList=t,setTimeout((function(){A.madeLoadingDom(2)}),500)}else A.madeLoadingDom(1)}),(function(e){console.log(e),A.madeLoadingDom(1)}))}},{key:"madeLoadingDom",value:function(A){var e=this,t=this.videoWidth/1024||1;if(0==A){if(document.getElementById("pc-quickReply-content").style.display="none",document.getElementById("pc-quickReply-loaderror").style.display="none",document.getElementById("pc-quickReply-loading").style.display="block",!document.getElementById("pc-quickReply-loading-box")){var i=document.createElement("div");i.id="pc-quickReply-loading-box",i.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;",i.innerHTML='<div class="" style="heigth:'.concat(40*t,'px">\n <svg width="').concat(40*t,'" height="').concat(40*t,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>\n </div>\n <div style="font-size: ').concat(28*t,"px;margin-top:").concat(10*t,"px;line-height:").concat(36*t,'px;">加载中…</div>'),document.getElementById("pc-quickReply-loading").appendChild(i)}}else if(1==A){if(document.getElementById("pc-quickReply-content").style.display="none",document.getElementById("pc-quickReply-loading").style.display="none",document.getElementById("pc-quickReply-loaderror").style.display="block",!document.getElementById("pc-quickReply-loaderror-box")){var n=document.createElement("div");n.id="pc-quickReply-loaderror-box",n.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;",n.innerHTML='<div style="font-size: '.concat(28*t,'px;color: rgba(255,255,255,0.90);">快速回复加载失败</div>\n <div id="pc-quickReply-loaderror-reload" style="font-size: ').concat(24*t,"px;margin-top:").concat(16*t,'px;color: rgba(100,143,252,0.90);cursor: pointer;">重新加载</div>'),document.getElementById("pc-quickReply-loaderror").appendChild(n),document.getElementById("pc-quickReply-loaderror-reload").onclick=function(){e.getQuickReplyList()}}}else document.getElementById("pc-quickReply-loading").style.display="none",document.getElementById("pc-quickReply-loaderror").style.display="none",document.getElementById("pc-quickReply-content").style.display="block",this.matchQuickReplyBtn()}},{key:"sendQuickReply",value:function(A,e){var t=this;this.sendLoadingStats=!0,this.setBtnCheckLoading(0,e);Ti(this.jSPlugin,A.fileUrl,(function(A){t.sendLoadingStats=!1,t.setBtnCheckLoading(1,e),A&&200==A.code?t.toastCustom.initToastContent("快捷回复成功"):t.toastCustom.initToastContent("快捷回复失败,请重试"),t.switchFooter("onBell")}),(function(A){console.log(A),t.sendLoadingStats=!1,t.setBtnCheckLoading(1,e),t.toastCustom.initToastContent("快捷回复失败,请重试"),t.switchFooter("onBell")}))}}])}(),Li=function(){return o((function A(e,i){t(this,A),this.jSPlugin=e,this.videoWidth=e.width,this.switchFooter=i,this.toastCustom=new Ri(e,!1),this.lockStatus=!1,this.initRemoteUnlock()}),[{key:"initRemoteUnlock",value:function(){document.getElementById("pc-remoteUnlock-back")?this.madeSlideEvent():this.renderRemoteUnlock()}},{key:"renderRemoteUnlock",value:function(){var A=this,e=this.videoWidth/1024||1,t=document.createElement("div");t.style="width:100%;",t.id="pc-remoteUnlock-box",t.innerHTML='<div style="width:100%;display:flex;flex-direction:row;align-items: center;">\n <div id="pc-remoteUnlock-back" style="display: flex;align-items: center;margin: 0 '.concat(8*e,"px 0 ").concat(16*e,'px;cursor: pointer;">\n <div style="height: ').concat(32*e,'px;">\n <svg width="').concat(32*e,'px" height="').concat(32*e,'px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>返回</title>\n <defs>\n <filter id="filter-1">\n <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>\n </filter>\n </defs>\n <g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="快速回复loading" transform="translate(-16.000000, -497.000000)">\n <g id="返回" transform="translate(0.000000, 425.000000)" filter="url(#filter-1)">\n <g transform="translate(16.000000, 72.000000)">\n <rect id="Rectangle" x="0" y="0" width="32" height="32"></rect>\n <path d="M12.5,7.5 C13.2988404,7.5 13.9518304,8.12445998 13.9974537,8.91186361 L14,9 L14,21.5 L26.5,21.5 C27.2988404,21.5 27.9518304,22.12446 27.9974537,22.9118636 L28,23 C28,23.7988404 27.37554,24.4518304 26.5881364,24.4974537 L26.5,24.5 L12.5,24.5 C11.7011596,24.5 11.0481696,23.87554 11.0025463,23.0881364 L11,23 L11,9 C11,8.17157288 11.6715729,7.5 12.5,7.5 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" transform="translate(19.500000, 16.000000) rotate(45.000000) translate(-19.500000, -16.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n <span style="font-size: ').concat(24*e,'px;user-select: none;">返回</span>\n </div>\n <div id="pc-remoteUnlock-content" style="display: block;width:calc(100% - ').concat(160*e,"px);margin: 0 ").concat(24*e,'px;"></div>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock")).appendChild(t),document.getElementById("pc-remoteUnlock-back").onclick=function(){A.goback()},this.renderRemoteUnlockSlide()}},{key:"renderRemoteUnlockSlide",value:function(){var A=this.videoWidth/1024||1,e=document.getElementById("pc-remoteUnlock-content"),t=document.createElement("div");t.id="pc-remoteUnlock-content-slide",t.style="width: 100%;display: flex;justify-content: center;cursor: pointer;",t.innerHTML='<div id="pc-remoteUnlock-slide-box" style="width: '.concat(400*A,"px;line-height: ").concat(80*A,"px;height: ").concat(80*A,"px;border: 1px solid rgba(255,255,255,1);border-radius: ").concat(40*A,'px;position: relative;text-align: center;">\n <div id="pc-remoteUnlock-slide-bgColor" style="border-radius: ').concat(40*A,"px;width: ").concat(64*A,"px;height: ").concat(80*A,'px;position: absolute;left: 0;top: 0;"></div>\n <div id="pc-remoteUnlock-slide-tips" style="height: ').concat(80*A,"px;line-height: ").concat(80*A,"px;font-size: ").concat(24*A,"px;border-radius: ").concat(40*A,'px;position: absolute;text-align: center;user-select: none;color: rgba(255,255,255,0.90);width: 100%;">右滑开锁</div>\n <div id="pc-remoteUnlock-slide-ball" style="top: ').concat(8*A,"px;left: ").concat(8*A,"px;width: ").concat(64*A,"px;height: ").concat(64*A,'px;background: #598FFF;position: absolute;text-align: center;border-radius:50%;display: flex;align-items: center;justify-content: center;">\n <svg id="slide-ball-start" style="display: inline;" width="').concat(36*A,'px" height="').concat(36*A,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="icon/箭头向右" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="0" y="0" width="24" height="24"></rect>\n <path d="M14.2841136,6.3689007 L19.9432338,12.0287579 L14.2863796,17.6856122 L12.8580239,16.2572565 L16.114,12.9999007 L4.00000001,13 L4.00000001,11 L16.058,10.9999007 L12.8557579,7.79725638 L14.2841136,6.3689007 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n <svg id="slide-ball-end" style="display: none;" width="').concat(36*A,'" height="').concat(36*A,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#598FFF" p-id="2400"></path></svg>\n \n </div>\n </div>'),e.appendChild(t),this.madeSlideEvent()}},{key:"getOffsetLeft",value:function(A){var e=0;do{e+=A.offsetLeft,A=A.parentNode}while(A.parentNode);return e}},{key:"madeSlideEvent",value:function(){var A=this.videoWidth/1024||1,e=document.getElementById("".concat(this.jSPlugin.id)),t=this.getOffsetLeft(e),i=document.getElementById("pc-remoteUnlock-slide-box"),n=document.getElementById("pc-remoteUnlock-slide-bgColor"),a=document.getElementById("pc-remoteUnlock-slide-tips"),o=document.getElementById("pc-remoteUnlock-slide-ball"),r=this;o.onmousedown=function(e){var s=(e=e||window.event).offsetX;o.style.transition="",n.style.transition="",document.onmouseup=function(){console.log("--------------onmouseup"),r.lockStatus||(n.style.width="0px",o.style.left=8*A+"px",o.style.transition="left 0.6s linear",n.style.transition="width 0.6s linear"),document.onmouseup=null,document.onmousemove=null},document.onmousemove=function(e){e=e||window.event;console.log("videoDom",t);var g=e.pageX-i.offsetLeft-s-t,c=i.clientWidth-o.clientWidth-8*A;g<=0&&(g=0),g>=c&&(g=c),o.style.left=g+"px",g!=c||r.lockStatus||r.lockStatus||(r.lockStatus=!0,document.getElementById("slide-ball-start").style.display="none",document.getElementById("slide-ball-end").style.display="inline",n.style.width=i.clientWidth+"px",n.style.backgroundColor="#598FFF",i.style.border="0",o.style.backgroundColor="#ffffff",a.textContent="正在开锁",o.onmousedown=null,document.onmousemove=null,r.sendRemoteUnlockApi())}}}},{key:"resetRemoteUnlockSlide",value:function(){var A=document.getElementById("pc-remoteUnlock-box"),e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock"));A&&e&&e.removeChild(A)}},{key:"sendRemoteUnlockApi",value:function(){var A=this;console.log("下发远程开锁");Pi(this.jSPlugin,(function(e){e&&200==e.code?A.toastCustom.initToastContent("开锁成功"):A.toastCustom.initToastContent("开锁失败,请重试"),A.goback()}),(function(e){console.log(e),A.toastCustom.initToastContent("开锁失败,请重试"),A.goback()}))}},{key:"goback",value:function(){this.switchFooter("onCall"),this.resetRemoteUnlockSlide()}}])}(),Yi={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0},header:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000 linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)",activeColor:"#1890FF",autoFocus:0,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"ringStatus",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"callStatus",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]}},footer:{onBell:{color:"#ffffff",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"quickReply",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"rejection",part:"left",defaultActive:0,isrender:1,color:"#2C2C2C",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"answer",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-3",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]},onCall:{color:"#2c2c2c",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"mute",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"hangUp",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]}}};function Gi(A){var e=new Ht,t=new FormData;for(var i in A)t.append(i,A[i]);return e.fetch("/api/lapp/device/info",{method:"POST",body:t})}var Ui=function(A){var e="";return Object.keys(A).map((function(t,i){e+="".concat(t,":").concat(A[t]).concat(i<Object.keys(A).length-1?";":"")})),e},Ji=function(){return o((function A(e,i,n,a){var o=this;t(this,A),s(this,"autoPlayRing",(function(){console.log("autoPlayRing");var A=document.getElementById("bellring-audio");A&&(A.muted=!1,A.src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3",A.paused&&A.play()),window.removeEventListener("click",o.autoPlayRing)})),s(this,"muteCommon",(function(A){var e=o.decoderState.state,t=e.talk,i=e.sound;t?(console.log("结束对讲"),o.setDecoderState({talk:!1,mute:!0},A.backgroundColor),o.jSPlugin.Talk.stopTalk(),i||o.jSPlugin.openSound()):(o.setDecoderState({talk:!1,mute:!0},A.backgroundColor),i||o.jSPlugin.openSound())})),s(this,"switchCallStatus",(function(A){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=o.themeData,i=t.header,n=t.footer,a=null;if("onCall"==A){console.log("接听"),o.bellStatus="onCall",o.switchFooter("onCall"),n[o.bellStatus].btnList.map((function(A,e){A.isrender&&o.renderFooter(A.iconId,A),"mute"==A.iconId&&(a=A)})),i[o.bellStatus].btnList.map((function(A,e){A.isrender&&o.renderHeader(A.iconId,A)}));var r=document.getElementById("".concat(o.jSPlugin.id,"-header-onBell"));r&&r.parentElement.removeChild(r),1==o.themeData.customConfig.bellPoster&&document.getElementById("bellring-icon")&&document.getElementById("".concat(o.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon")),0==o.themeData.customConfig.defaultMicro&&a?o.muteCommon(a):o.setDecoderState({mute:!1},a.backgroundColor),o.removeBellRing()}else console.log("响铃"),o.bellStatus="onBell",o.jSPlugin.Theme.changeTheme(o.themeData,e)})),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.themeData=i,this.setDecoderState=n,this.decoderState=a,this.isNeedRenderHeader=!1,this.isNeedRenderFooter=!1,this.autoFocus=0,this.autoFocusTimer=null,this.bellStatus="onBell",this.recordTimer=null,this.nextRate=1,this.themeInited=!1,this.inited=!1,this.activeThemeStatus=!0,this.activeThemeStatusTxt="模板未激活",this.toastCustom=new Ri(e,!1)}),[{key:"initBellRing",value:function(){var A=this,e=this.decoderState.state,t=e.play,i=e.isEditing;e.rejection;var n=this.videoWidth/1024;this.maxBellTime=1e3*this.themeData.customConfig.maxBellTime;var a=document.getElementById("bellring"),o=document.getElementById("bellring-audio");if(!a&&!o){if(this.jSPlugin.isNeedBellRing){var r=document.createElement("div");r.id="bellring",r.innerHTML='<div>\n <audio id="bellring-audio" loop autoplay>\n <source src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3" type="audio/mpeg">\n </audio>\n </div>',document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(r)}if(1!=this.themeData.customConfig.bellPoster||i)document.getElementById("bellring-icon")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"));else{var s=(this.videoHeight-180*n)/2,g=document.createElement("div");g.id="bellring-icon",g.style="position: absolute;pointer-events: none;background: none;width: 100%;\n position: absolute;top: ".concat(s,"px;display: flex;align-items: center;justify-content: center;"),g.innerHTML='<div style="width: '.concat(180*n,"px;height: ").concat(180*n,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.2);border-radius: 50%;">\n <div style="width: ').concat(100*n,"px;height: ").concat(100*n,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.3);border-radius: 50%;">\n <svg width="').concat(40*n,'px" height="').concat(40*n,'px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/响铃</title>\n <g id="icon/响铃" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <polygon id="Path" points="0 0 40.0000002 0 40.0000002 40.0000002 0 40.0000002"></polygon>\n <path d="M20.0000001,4.25000002 C22.0363461,4.25000002 23.698175,5.84879552 23.8000507,7.8591997 L23.8050001,8.05500003 L23.805316,8.99953253 C27.1874196,9.97041766 29.6921839,13.0354462 29.80936,16.723731 L29.80936,16.723731 L29.8133335,16.9800001 L29.8133335,21.6416668 C29.8133335,22.3259481 30.0858837,22.9835569 30.5703302,23.4680033 L30.5703302,23.4680033 L31.6386635,24.5363367 C32.338953,25.2366262 32.760721,26.1675592 32.8273086,27.1785295 L32.8273086,27.1785295 L32.8350001,27.4233334 C32.8350001,29.577547 31.0892137,31.3233335 28.9350001,31.3233335 L28.9350001,31.3233335 L24.5666667,31.323 L24.5650266,31.3951531 C24.4527075,33.8194458 22.4520933,35.7500001 20.0000001,35.7500001 C17.5482065,35.7500001 15.5473098,33.8197367 15.4349743,31.3967059 L15.4326667,31.323 L11.0666667,31.3233335 C9.06159524,31.3233335 7.39851917,29.8069287 7.18810198,27.8229374 L7.17194359,27.6230185 L7.1666667,27.4233334 C7.1666667,26.3411154 7.59733134,25.3020086 8.36300328,24.5363367 L8.36300328,24.5363367 L9.43133662,23.4680033 C9.91578309,22.9835569 10.1883334,22.3259481 10.1883334,21.6416668 L10.1883334,21.6416668 L10.1883334,16.9800001 C10.1883334,13.1909619 12.7263704,9.99530436 16.1948593,8.99965364 L16.1950001,8.05500003 C16.1950001,5.95360729 17.8979654,4.25000002 20.0000001,4.25000002 Z M23.0656667,31.323 L16.9336667,31.323 L16.9352114,31.3619281 C17.0285826,32.9723844 18.3649772,34.2500001 20.0000001,34.2500001 C21.6352227,34.2500001 22.9714318,32.9721919 23.0647896,31.3604131 L23.0656667,31.323 Z M21.5116668,10.1783334 L18.4900001,10.1783334 C14.7336124,10.1783334 11.6883334,13.2231481 11.6883334,16.9800001 L11.6883334,16.9800001 L11.6883334,21.6416668 C11.6883334,22.7238848 11.2576687,23.7629916 10.4919968,24.5286635 L10.4919968,24.5286635 L9.42366346,25.5969969 C8.93921698,26.0814433 8.6666667,26.7390521 8.66637526,27.402427 L8.66637526,27.402427 L8.67048222,27.560237 C8.74130967,28.8268108 9.79171396,29.8233335 11.0666667,29.8233335 L11.0666667,29.8233335 L23.7906939,29.8222289 C23.8004164,29.8218553 23.8101862,29.8216668 23.8200001,29.8216668 L23.8486667,29.823 L28.9350001,29.8233335 C30.2055455,29.8233335 31.2450456,28.8367727 31.329826,27.609522 L31.3354106,27.4481422 L31.3293607,27.2529336 C31.2880301,26.6292837 31.0210852,26.0400787 30.5780034,25.5969969 L30.5780034,25.5969969 L29.50967,24.5286635 C28.7439981,23.7629916 28.3133335,22.7238848 28.3133335,21.6416668 L28.3133335,21.6416668 L28.3134279,16.9919039 L28.3098332,16.759466 C28.1934023,13.0970787 25.1864454,10.1783334 21.5116668,10.1783334 L21.5116668,10.1783334 Z M20.0000001,5.75000002 C18.7795808,5.75000002 17.7813801,6.69770708 17.7003155,7.89717688 L17.6950001,8.05500003 L17.6952875,8.7158769 C17.9568453,8.69103758 18.2219393,8.67833337 18.4900001,8.67833337 L18.4900001,8.67833337 L21.5116668,8.67833337 C21.7792577,8.67833337 22.0439466,8.69101238 22.3051575,8.71580951 L22.3050001,8.05500003 C22.3050001,6.7819079 21.273481,5.75000002 20.0000001,5.75000002 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(g),t&&"onBell"==this.bellStatus&&this.jSPlugin.pause()}setTimeout((function(){var e=A.decoderState.state,t=e.isEditing,i=e.rejection;"onBell"!=A.bellStatus||i||(A.removeBellRing(),t||A.answerOvertime())}),this.maxBellTime)}}},{key:"removeBellRing",value:function(){document.getElementById("bellring")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring")),document.getElementById("bellring-icon")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}},{key:"matchBtn",value:function(A,e){var t=this,i=this.themeData,n=i.header,a=i.footer,o=this.decoderState.state,r=o.mute,s=o.rejection,g={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}};-1===n[this.bellStatus].btnList.findIndex((function(e){return e.iconId===A}))?(g.color=a[this.bellStatus].color,g.backgroundColor=a[this.bellStatus].backgroundColor,g.activeColor=a[this.bellStatus].activeColor):(g.color=n[this.bellStatus].color,g.backgroundColor=n[this.bellStatus].backgroundColor,g.activeColor=n[this.bellStatus].activeColor);var c=this.videoWidth/6;this.videoWidth;var l=this.videoWidth/1024||1;switch(A){case"ringStatus":return g.title=this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,g.id=A,g.domString='<span id="header-onBell-ringStatus" style="color:'.concat(e.color||"#FFFFFF",";font-size: ").concat(32*l,'px;display: block;text-align: left;font-weight: 500;" >').concat(this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,"</span>"),g.onclick=function(){},g;case"deviceCategory":return g.title="设备名称",g.id=A,g.domString='<span id="header-onBell-deviceCategory" \n style="\n color:'.concat(e.color||"#FFFFFF",";\n font-size: ").concat(24*l,"px;\n padding-top: ").concat(16*l,'px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>"),g.onclick=function(){},g;case"callStatus":return g.title="通话中",g.id=A,g.domString='<span id="header-onCall-ringStatus" style="color:'.concat(e.color||"#FFFFFF",";font-size: ").concat(32*l,'px;display: block;text-align: left;" >通话中</span>'),g.onclick=function(){},g;case"deviceCategory":return g.title="设备名称",g.id=A,g.domString='<span id="header-onCall-deviceCategory"\n style="color:'.concat(e.color||"#FFFFFF",";\n font-size: ").concat(24*l,"px;\n padding-top: ").concat(16*l,'px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>"),g.onclick=function(){},g;case"rejection":return g.title="拒绝",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width:').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>拒绝</title>\n <g id="icon/拒绝" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;user-select: none;">拒绝</div>\n </div>'),g.onclick=function(){var A=t.decoderState.state,e=A.play,i=A.isEditing,n=A.rejection;if(i||n)return!1;console.log("拒绝"),e&&t.jSPlugin.stop(),t.removeBellRing(),t.setDecoderState({play:!1,rejection:!0}),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("rejection")},g;case"quickReply":return g.title="快捷回复",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width: ').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>快捷回复</title>\n <g id="icon/web快捷回复" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M17.4723401,6.00464509 C24.1317208,5.8200623 29.613145,11.1601938 29.613145,17.806299 C29.613145,19.5506656 29.2343807,21.2437888 28.5133012,22.7904909 L28.638,22.51 L29.9802796,28.9334997 C30.0980856,29.4978889 29.6719785,30.0050773 29.131395,30.0271186 L29.0218792,30.0249315 L28.9025577,30.0074816 L22.488349,28.6446207 L22.3501503,28.7067675 C21.0679643,29.242563 19.6940914,29.5480927 18.2793303,29.6038407 L18.2793303,29.6038407 L17.8062986,29.6131454 C11.1610025,29.6131454 5.820073,24.1313212 6.00464384,17.4723718 C6.17540866,11.3038211 11.3038207,6.17540904 17.4723401,6.00464509 Z M17.8062986,16.2974446 C16.9707372,16.2974446 16.2926003,16.9755814 16.2926003,17.8111428 C16.2926003,18.6467043 16.9707372,19.3248411 17.8062986,19.3248411 C18.64186,19.3248411 19.3199969,18.6467043 19.3199969,17.8111428 C19.3199969,16.9755814 18.64186,16.2974446 17.8062986,16.2974446 Z M12.9624642,16.2974446 C12.1269027,16.2974446 11.4487659,16.9755814 11.4487659,17.8111428 C11.4487659,18.6467043 12.1269027,19.3248411 12.9624642,19.3248411 C13.7980256,19.3248411 14.4761624,18.6467043 14.4761624,17.8111428 C14.4761624,16.9755814 13.7980256,16.2974446 12.9624642,16.2974446 Z M22.650133,16.2974446 C21.8145716,16.2974446 21.1364348,16.9755814 21.1364348,17.8111428 C21.1364348,18.6467043 21.8145716,19.3248411 22.650133,19.3248411 C23.4856945,19.3248411 24.1638313,18.6467043 24.1638313,17.8111428 C24.1638313,16.9755814 23.4856945,16.2974446 22.650133,16.2974446 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;user-select: none;">快捷回复</div>\n </div>'),g.onclick=function(){if(t.decoderState.state.rejection)return!1;console.log("快捷回复"),t.switchFooter("quickReply"),t.quickReplyEle=new Mi(t.jSPlugin,t.switchFooter)},g;case"answer":return g.title="接听",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width: ').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>接听</title>\n <g id="icon/接听" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M15.7728281,19.6822968 C13.2528132,17.165123 10.8435994,14.2473605 11.9999084,13.0938925 C13.6505608,11.4432401 15.0881341,10.4261428 12.1646895,6.78675259 C9.23840386,3.14452132 7.28659974,5.94011849 5.68708632,7.53963191 C3.84324225,9.38631703 5.59049048,16.2645088 12.3891328,23.0659922 C19.1877751,29.8646345 26.0688079,31.6147238 27.9154931,29.7680386 C29.5150065,28.1685252 32.3106036,26.2195622 28.6712134,23.2932765 C25.0318232,20.3669909 24.0147259,21.8045642 22.3640735,23.4580576 C21.2077645,24.6086845 18.2928431,22.1994707 15.7728281,19.6822968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.727936, 17.728157) rotate(-360.000000) translate(-17.727936, -17.728157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;user-select: none;">接听</div>\n </div>'),g.onclick=function(){var A=t,i=t.decoderState.state,o=i.play,r=i.isEditing,s=i.talk,g=i.sound,c=i.rejection;if(r||c)return!1;console.log("接听"),t.jSPlugin.pluginStatus.loadingClear(),o||(t.jSPlugin.pluginStatus.loadingStart(t.jSPlugin.id),t.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"}),t.jSPlugin.play(),t.setDecoderState({play:!o})),s||1!=t.themeData.customConfig.defaultMicro||(t.setDecoderState({talk:!0,mute:!1}),g&&t.jSPlugin.closeSound(),t.jSPlugin.Talk.startTalk()),t.setDecoderState({sound:!1}),t.bellStatus="onCall",t.switchFooter("onCall"),a[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderFooter(A.iconId,A)})),n[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderHeader(A.iconId,A)}));var l=document.getElementById("".concat(t.jSPlugin.id,"-header-onBell"));l&&l.parentElement.removeChild(l),1==t.themeData.customConfig.bellPoster&&(document.getElementById("bellring-icon")&&document.getElementById("".concat(t.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon")),t.jSPlugin.setPoster("")),0==t.themeData.customConfig.defaultMicro&&(t.muteCommon(e),t.jSPlugin.openSound()),t.removeBellRing(),t.maxTalkTime=1e3*t.themeData.customConfig.maxTalkTime*60,setTimeout((function(){s&&(console.log("结束对讲"),A.setDecoderState({talk:!1}),A.jSPlugin.Talk.stopTalk()),o&&(A.jSPlugin.stop(),A.setDecoderState({play:!o})),t.rejectionStatusDispose(),t.remoteUnlockEle&&t.remoteUnlockEle.goback(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp")}),t.maxTalkTime)},g;case"remoteUnlock":return g.title="远程开锁",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width: ').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>开锁</title>\n <g id="icon/开锁" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M18,4 C21.3137085,4 24,6.6862915 24,10 L24,10 L24,19.787 L29.5,19.7875 C30.0522847,19.7875 30.5,20.2352153 30.5,20.7875 C30.5,21.3397847 30.0522847,21.7875 29.5,21.7875 L24,21.787 L24,26 C24,29.2383969 21.4344251,31.8775718 18.2249383,31.9958615 L18,32 C14.6862915,32 12,29.3137085 12,26 L12,26 L12,10 C12,6.6862915 14.6862915,4 18,4 Z M18,6 C15.790861,6 14,7.790861 14,10 L14,10 L14,26 C14,28.209139 15.790861,30 18,30 C20.209139,30 22,28.209139 22,26 L22,26 L22,21.787 L18.5,21.7875 C17.9477153,21.7875 17.5,21.3397847 17.5,20.7875 C17.5,20.2352153 17.9477153,19.7875 18.5,19.7875 L22,19.787 L22,10 C22,7.85780461 20.3160315,6.10892112 18.1996403,6.00489531 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;user-select: none;">远程开锁</div>\n </div>'),g.onclick=function(){var A=t.decoderState.state,e=A.isEditing,i=A.rejection;if(e||"onBell"==t.bellStatus||i)return!1;console.log("远程开锁"),t.switchFooter("remoteUnlock"),t.remoteUnlockEle=new Li(t.jSPlugin,t.switchFooter)},g;case"mute":return g.title="静音",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div id="').concat(this.jSPlugin.id,'-icon-mute" style="width: ').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;border: 1px solid ").concat(s?"#CCCCCC":e.backgroundColor,";background: ").concat(s&&r?"#cccccc":"#ffffff",';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>静音</title>\n <g id="icon/静音" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path id="icon-mute-path" d="M29.2988305,7.56559704 C29.8540627,8.1086468 29.8980234,8.97727504 29.4240597,9.57172938 L29.3223594,9.6867869 L22.585,16.574 L22.5859243,26.0592702 C22.5859243,26.9500521 21.8638029,27.6721735 20.973021,27.6721735 C20.6007147,27.6721735 20.2398727,27.5433734 19.9517149,27.3076254 L15.583,23.733 L10.4341733,28.9987008 C9.85492024,29.5909486 8.9052312,29.6014828 8.31298346,29.0222298 C7.75775121,28.47918 7.71379057,27.6105518 8.18775419,27.0160974 L8.28945454,26.9010399 L27.1776406,7.58912597 C27.7568937,6.99687823 28.7065827,6.98634397 29.2988305,7.56559704 Z M22.2503608,7.16816759 C22.4679282,7.45036017 22.5859243,7.79665625 22.5859243,8.15298221 L22.585,9.899 L10.778,21.971 L9.47580645,21.9713498 C7.69424274,21.9713498 6.25,20.5271071 6.25,18.7455434 L6.25,15.65293 C6.25,13.8713663 7.69424274,12.4271235 9.47580645,12.4271235 L12.787,12.427 L19.9882064,6.87564241 C20.6936617,6.33174431 21.7064627,6.46271229 22.2503608,7.16816759 Z" id="形状结合" fill="').concat(r?"#ffffff":s?"#cccccc":e.backgroundColor,'"></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;user-select: none;">静音</div>\n </div>'),g.onclick=function(){var A=t.decoderState.state,i=A.talk,n=A.sound;if(A.play,A.rejection)return!1;console.log("静音"),i?(console.log("结束对讲"),t.setDecoderState({talk:!1,mute:!0},e.backgroundColor),t.jSPlugin.Talk.stopTalk(),t.jSPlugin.openSound()):(console.log("开始对讲"),t.setDecoderState({talk:!0,mute:!1},e.backgroundColor),n&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})),t.jSPlugin.Talk.startTalk())},g;case"hangUp":return g.title="挂断",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width:').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>挂断</title>\n <g id="icon/挂断" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;">挂断</div>\n </div>'),g.onclick=function(){var A=t.decoderState.state,e=A.talk,i=A.play,n=A.sound;if(A.rejection)return!1;e&&(console.log("结束对讲"),t.setDecoderState({talk:!1}),t.jSPlugin.Talk.stopTalk()),i&&(t.jSPlugin.stop(),t.setDecoderState({play:!i})),n&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})),(i||e)&&(console.log("挂断"),t.removeBellRing(),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp"))},g;default:return g}}},{key:"answerOvertime",value:function(){this.toastCustom.initToastContent("应答超时");var A=this.decoderState.state.play;console.log("应答超时"),A&&this.jSPlugin.stop(),this.setDecoderState({play:!1,rejection:!0}),this.rejectionStatusDispose(),this.switchFooter("onBell"),"function"==typeof this.jSPlugin.hangUpCallback&&this.jSPlugin.hangUpCallback("rejection")}},{key:"rejectionStatusDispose",value:function(){var A=this,e=this.themeData.footer,t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")),n=document.getElementById("header-".concat(this.bellStatus,"-ringStatus"));"onBell"==this.bellStatus?(t.innerHTML="",t.style.color="#ffffff"):(i.innerHTML="",i.style.color="#ffffff"),console.log("rejectionStatusDispose"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),n.innerText="通话已结束",this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:!1,type:2})}},{key:"userNoDevice",value:function(){var A=this;this.removeBellRing(),this.setDecoderState({rejection:!0});var e=this.themeData.footer,t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));"onBell"==this.bellStatus?(t.innerHTML="",t.style.color="#ffffff"):(i.innerHTML="",i.style.color="#ffffff"),console.log("userNoDevice"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"该用户不拥有该设备",color:"white",isMobile:!1,type:2})}},{key:"renderHeader",value:function(A,e){var t=this,i=this.videoWidth/1024||1,n=this.matchBtn(A,e);if(document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content"))){var a=document.createElement("span");a.innerHTML="".concat(n.domString),document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content")).appendChild(a)}else{var o=document.createElement("div");o.id="".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus),o.style="max-width:50%;position:relative;",o.innerHTML='<span id="'.concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,'-content" style="display:inline-block;height:auto;padding-top: ').concat(32*i,'px;";>\n ').concat(n.domString,"\n </span>"),o.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onclick(A)},document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(o)}}},{key:"renderFooter",value:function(A,e){var t=this,i=this.decoderState.state.mute;if(console.log("-------------renderFooter"),"remoteUnlock"==A&&this.jSPlugin.capacity&&(!this.jSPlugin.capacity.support_unlock||0==this.jSPlugin.capacity.support_unlock))return!1;var n=this.matchBtn(A,e),a=this.videoWidth/6,o=document.createElement("div");o.className="theme-icon-item",this.jSPlugin.isWebConsole?o.style="padding:0 ".concat(.1*a,"px;"):o.style="padding:0 ".concat(.1*a,"px;cursor: pointer;"),o.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-content" title="').concat(n.title,'" style="display: flex;align-items: center;position:relative;">')).concat(n.domString,"</div>")+"</span>",o.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onclick(A)},n.onmouseenter&&(o.onmouseenter=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseenter(A)}),n.onmouseleave&&(o.onmouseleave=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseleave(A)});var r=this.videoWidth/597,s=document.createElement("span");s.className="icon-move left",s.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-left" title="左移" style="display: inline-block;border-radius: 2px;overflow: hidden;position: absolute;top: calc(50% - ').concat(35*r,"px); width: ").concat(10*r,"px; height: ").concat(40*r,'px;cursor: pointer;">\n <svg width="100%" height="100%" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-614.000000, -5024.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="箭头左" transform="translate(0.000000, 18.000000)">\n <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(1.000000, 15.000000)" fill="#FFFFFF">\n <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),s.onclick=function(){t.editIcon(n.id,"left","footer")},o.appendChild(s);var g=document.createElement("span");if(g.className="icon-move right",g.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-right" class="ezuikit-theme-icon" title="右移" style="display: inline-block;border-radius: 2px;overflow: hidden;position: absolute;top: calc(50% - ').concat(35*r,"px);left: ").concat(20*r+.5*a,"px; width: ").concat(10*r,"px; height: ").concat(40*r,'px;cursor: pointer;">\n <svg width="100%" height="100%" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-684.000000, -5024.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="箭头右" transform="translate(70.000000, 18.000000)">\n <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(5.500000, 20.000000) scale(-1, 1) translate(-5.500000, -20.000000) translate(2.000000, 15.000000)" fill="#FFFFFF">\n <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),g.onclick=function(){t.editIcon(n.id,"right","footer")},o.appendChild(g),"answer"==A||"rejection"==A||"hangUp"==A);else{var c=document.createElement("span");c.className="icon-move close",c.innerHTML='<span id="'.concat(n.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: ').concat(-15*r-1,"px;left: ").concat(20*r+.5*a-4.5*r,'px;cursor: pointer;">\n <svg width="').concat(18*r,'" height="').concat(18*r,'" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-680.000000, -5006.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="关闭1" transform="translate(66.000000, 0.000000)">\n <rect id="矩形" fill-rule="nonzero" x="0" y="0" width="18" height="18"></rect>\n <path d="M9,1.125 C4.65117188,1.125 1.125,4.65117188 1.125,9 C1.125,13.3488281 4.65117188,16.875 9,16.875 C13.3488281,16.875 16.875,13.3488281 16.875,9 C16.875,4.65117188 13.3488281,1.125 9,1.125 Z M11.9074219,11.9917969 L10.7472656,11.9865234 L9,9.90351562 L7.25449219,11.9847656 L6.09257813,11.9900391 C6.01523438,11.9900391 5.95195313,11.9285156 5.95195313,11.8494141 C5.95195313,11.8160156 5.96425781,11.784375 5.98535156,11.7580078 L8.27226563,9.03339844 L5.98535156,6.31054687 C5.96425781,6.28417969 5.95195313,6.25253906 5.95195313,6.21914062 C5.95195313,6.14179687 6.01523438,6.07851562 6.09257813,6.07851562 L7.25449219,6.08378906 L9,8.16679687 L10.7455078,6.08554688 L11.9056641,6.08027344 C11.9830078,6.08027344 12.0462891,6.14179687 12.0462891,6.22089844 C12.0462891,6.25429687 12.0339844,6.2859375 12.0128906,6.31230469 L9.72949219,9.03515625 L12.0146484,11.7597656 C12.0357422,11.7861328 12.0480469,11.8177734 12.0480469,11.8511719 C12.0480469,11.9285156 11.9847656,11.9917969 11.9074219,11.9917969 Z" id="形状" fill="#595959"></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),c.onclick=function(){t.editIcon(n.id,"delete","footer")},o.appendChild(c)}"onCall"==this.bellStatus?document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).appendChild(o):document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).appendChild(o),this.decoderState.state.isEditing&&"mute"==A&&"onCall"==this.bellStatus&&(0!=this.themeData.customConfig.defaultMicro||i?this.setDecoderState({mute:!1},e.backgroundColor):this.setDecoderState({mute:!0},e.backgroundColor))}},{key:"switchFooter",value:function(A){var e={};switch(this.themeData&&(e=this.themeData.footer),A){case"onBell":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply")).style.display="none"),document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"))?"none"==document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex"):document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex";break;case"onCall":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display="flex",this.themeData&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=e[this.bellStatus].color);break;case"quickReply":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none";break;case"remoteUnlock":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock")).style.display="flex"}}},{key:"initThemeData",value:function(){var A=this;console.log("-------------initThemeData");var e=this.decoderState.state.isEditing,t=this.themeData,i=t.header,n=t.footer,a=this.jSPlugin.id,o=this.videoWidth/1024;if(this.isNeedRenderHeader=bt(i[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderFooter=bt(n[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderHeader)if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width: calc(100% - 100px);padding-left: 3%;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>");else{var r=document.createElement("div");r.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),r.setAttribute("class","header-controls"),r.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex;width:calc(100% - 100px);overflow:hidden;padding-left: 3%;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' class=\"header-controls-right\" style='display:flex;'></div>"),console.log(this.jSPlugin.height);var s=.2*this.jSPlugin.height+"px",g={height:s,display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:"100%",position:"relative","margin-bottom":"-"+s,"align-items":"center",background:"transparent linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)"};r.style=Ui(g),document.getElementById("".concat(a,"-wrap")).insertBefore(r,document.getElementById(a));var c=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(c)}),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")));var l=.3*this.jSPlugin.height;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(l,"px"),"onCall"==this.bellStatus?document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 4%;width:100%;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '):document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 4%;width:100%;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '));else{var I=document.createElement("div");I.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container")),I.setAttribute("class","ez-iframe-footer-container");var C={"min-height":l+"px","max-height":l+"px",position:"relative","margin-top":"-"+l+"px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%","align-items":"center","background-image":"linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.60) 100%)","font-size":24*o+"px"};I.style=Ui(C),I.innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '),m(I,document.getElementById(a))}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=i[this.bellStatus].backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=i[this.bellStatus].color,i[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderHeader(e.iconId,e)}))),this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=n[this.bellStatus].backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=n[this.bellStatus].color,n[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)}))),1==this.themeData.customConfig.bellPoster&&!e){this.jSPlugin.poster="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg";var d=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(d),A.jSPlugin.setPoster(A.jSPlugin.poster))}),50)}this.activeThemeStatus&&(this.initBellRing(),window.addEventListener("click",this.autoPlayRing)),this.inited=!0,this.getCallDeviceInfo()}},{key:"renderThemeData",value:function(){var A=this,e=this.decoderState.state.isEditing,t=this.themeData,i=t.header,n=t.footer;if(this.isNeedRenderHeader&&i&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=i[this.bellStatus].backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=i[this.bellStatus].color.replace("-diy",""),i[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId]))}))),this.isNeedRenderFooter&&n)document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=n[this.bellStatus].backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=n[this.bellStatus].color.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=n[this.bellStatus].color.replace("-diy",""),n[this.bellStatus].btnList.map((function(t,i){if(t.isrender&&A.setDecoderState(s({},t.iconId,A.decoderState.state[t.iconId])),0==i&&!A.themeInited&&A.activeThemeStatus)var n=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(n),1!=A.themeData.customConfig.bellPoster||e?A.jSPlugin.play():A.jSPlugin.pluginStatus.loadingClear(),A.themeInited=!0)}),50)})),-1!==this.jSPlugin.url.indexOf("hd.live")&&this.setDecoderState({hd:!0}),this.themeData.autoFocus>0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",(function(){A.stopAutoFocus()}))),this.setDecoderState({cloudRec:"cloud.rec"===_(this.jSPlugin.url).type,rec:"rec"===_(this.jSPlugin.url).type,type:_(this.jSPlugin.url).type});else if(!this.themeInited&&this.activeThemeStatus)var a=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(a),A.themeData&&A.themeData.customConfig&&1==A.themeData.customConfig.bellPoster&&!e?A.jSPlugin.pluginStatus.loadingClear():A.jSPlugin.play(),A.themeInited=!0)}),50);var o=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(o),A.jSPlugin.reSize(A.jSPlugin.params.width,A.jSPlugin.params.height))}),50)}},{key:"setThemeData",value:function(A,e){this.themeData=A,"onCall"==e&&(this.bellStatus="onCall")}},{key:"startAutoFocus",value:function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById("".concat(A.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.pointerEvents="none")}),1e3*e)}},{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:"editIcon",value:function(A,e,t){console.log("编辑组件",A,e,t);var i=this.themeData;console.log("themeData",this.themeData);var n=this.themeData[t][this.bellStatus].btnList,a=bt(n,(function(e){return e.iconId===A})),o=n[a];switch(e){case"delete":n[a].isrender=0;break;case"right":for(var r=-1,s=a+1;s<n.length;s++)if(n[s].part===n[a].part&&1==n[s].isrender){r=s;break}-1!==r&&(n[a]=n[r],n[r]=o);break;case"left":for(var g=-1,c=a-1;c>=0;c--)if(n[c].part===n[a].part&&1==n[c].isrender){g=c;break}-1!==g&&(n[a]=n[g],n[g]=o)}console.log("new btnList",n),i[t][this.bellStatus].btnList=n,this.jSPlugin.Theme.changeTheme(i)}},{key:"countTime",value:function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='<span class="dot"></span><span class="value">00:00</span>',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",o="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),o=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?o+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))}},{key:"editStart",value:function(A){console.log("----------editStart2");var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));document.getElementById("".concat(this.jSPlugin.id,"-headControl")),e&&e.setAttribute("class","footer-controls themeEditing"),t&&t.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})}},{key:"editEnd",value:function(A){console.log("----------editEnd2");var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-headControl")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));t&&t.setAttribute("class","header-controls"),e&&e.setAttribute("class","footer-controls"),i&&i.setAttribute("class","footer-controls")}},{key:"fetchThemeData",value:function(A){var e=this;Di(this.jSPlugin,A,(function(A){0==A.meta.code&&A.data?(e.activeThemeStatus=!0,e.themeData=A.data,A.data.header&&(e.themeData.header=A.data.header,e.themeData.header[e.bellStatus].btnList=e.themeData.header[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),A.data.footer&&(e.themeData.footer=A.data.footer,e.themeData.footer[e.bellStatus].btnList=e.themeData.footer[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.jSPlugin.capacity?(e.initThemeData(),e.renderThemeData()):setTimeout((function(){e.initThemeData(),e.renderThemeData()}),300)):(e.activeThemeStatus=!1,e.jSPlugin.pluginStatus.loadingClear(),e.setDecoderState({rejection:!0}),"111021"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"无效的模板id",color:"#fff"}),e.activeThemeStatusTxt="无效的模板id"):"111023"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"您的试用特权已到期,需前往轻应用控制台购买后使用。",color:"#fff"}),e.activeThemeStatusTxt="试用特权已到期"):(e.jSPlugin.pluginStatus.loadingSetText({text:"模板未激活,请先在开放平台轻应用控制台购买模板",color:"#fff"}),e.activeThemeStatusTxt="模板未激活"),e.themeData=Yi,e.initThemeData(),e.renderThemeData())}),(function(){e.renderThemeData()}))}},{key:"getCallDeviceInfo",value:function(){var A=this;this.videoWidth,Gi({accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,deviceSerial:_(this.jSPlugin.url).deviceSerial}).then((function(e){console.log("---------getCallDeviceInfo"),A.deviceInfoData=e.data,e.data.isEncrypt&&setTimeout((function(){A.jSPlugin.pluginStatus.loadingClear(),A.jSPlugin.pluginStatus.loadingSetText({text:"视频已加密",color:"#fff"})}),500),document.getElementById("header-".concat(A.bellStatus,"-deviceCategory"))&&(document.getElementById("header-".concat(A.bellStatus,"-deviceCategory")).innerText=""+e.data.deviceName)})).catch((function(e){20018!=e.code||A.jSPlugin.isWebConsole||A.userNoDevice(),console.log("获取设备信息失败",e)}))}},{key:"setHeaderText",value:function(A){var e=this.videoWidth/1024||1;document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content"))&&(document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content")).innerHTML='<span style="font-size: '.concat(32*e,'px;display: block">').concat(A,'</span><span style="font-size: ').concat(24*e,"px;padding-top: ").concat(16*e,'px;display: block;">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"","</span>"))}}])}(),Hi=function(){function A(e,i){t(this,A),this.jSPlugin=e,this.heightPop=i||366,A._instanceStyle(),this.initPopupCustom()}return o(A,[{key:"initPopupCustom",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom"))?document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom")).style.display="flex":this.randerPopup()}},{key:"randerPopup",value:function(){var A=this,e=document.documentElement.clientWidth/375||1,t=document.getElementById("".concat(this.jSPlugin.id,"-wrap")),i=document.createElement("div");i.style="display:flex;",i.id="".concat(this.jSPlugin.id,"-wrap-popup-custom"),i.innerHTML='<div id="'.concat(this.jSPlugin.id,'-wrap-popup-custom-mask" style="height:100%;width:100%;position:fixed;top:0;left:0;z-index:9998;background-color: rgba(0,0,0,0.75);overflow:hidden;">\n </div>\n <div id="').concat(this.jSPlugin.id,'-wrap-popup-board" class="open-popup" style="bottom:0;height: ').concat(this.heightPop*e,'px;position:fixed;left: 0; width: 100%;background-color:#ffffff;z-index: 9999;border-radius: 16px 16px 0px 0px;">\n <div style="margin-top: ').concat(20*e,"px;padding: 0 ").concat(15*e,'px;width: 100%;display:flex;flex-direction: row;align-items: center;">\n <div id="').concat(this.jSPlugin.id,'-popup-board-close">\n <svg width="').concat(24*e,'px" height="').concat(24*e,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/close</title>\n <g id="icon/close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="common/Close/Dark">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z" id="形状结合" fill="#2C2C2C" fill-rule="nonzero"></path>\n </g>\n </g>\n </svg>\n </div>\n <div id="popup-board-title-content" style="width: ').concat(180*e,"px;font-size: ").concat(18*e,"px;margin-left: ").concat(59*e,'px;font-family: PingFangSC-Medium;color: #2C2C2C;font-weight: 500;text-align: center;"></div>\n </div>\n <div id="').concat(this.jSPlugin.id,'-popup-board-content" style="width:100%;padding: 0 ').concat(15*e,"px;height: ").concat((this.heightPop-48)*e,'px;box-sizing: border-box;display: flex;align-items: center;justify-content: center;flex-direction: column;"></div>\n </div>\n '),t.appendChild(i),document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom-mask")).onclick=function(){A.closePopupCustom()},document.getElementById("".concat(this.jSPlugin.id,"-popup-board-close")).onclick=function(){A.closePopupCustom()}}},{key:"closePopupCustom",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){})();var A=document.getElementById("".concat(this.jSPlugin.id,"-wrap")),e=document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom"));A&&e&&A.removeChild(e)}},{key:"initPopupContent",value:function(A,e){document.getElementById("popup-board-title-content").innerText=A||"",e&&document.getElementById("".concat(this.jSPlugin.id,"-popup-board-content")).appendChild(e)}}],[{key:"_instanceStyle",value:function(){if(!A._STYLE){var e=document.documentElement.clientWidth/375||1;A._STYLE=document.createElement("style"),A._STYLE.innerHTML="@keyframes slideContentUp {0% {bottom: -".concat(366*e,"px;}\n 25% {bottom: -").concat(244*e,"px;}\n 50% {bottom: -").concat(122*e,"px;}\n 100% {bottom:0;}} .open-popup{animation:slideContentUp 0.3s 1 linear; -webkit-animation: slideContentUp 0.3s 1 linear;}"),document.getElementsByTagName("head")[0].appendChild(A._STYLE)}}}])}();s(Hi,"_STYLE",void 0);var Ki=function(){return o((function A(e,i,n){t(this,A),this.jSPlugin=e,this.videoWidth=n,this.switchFooter=i,this.toastCustom=new Ri(e,!0),this.sendLoadingStats=!1,this.quickReplyList=["你好,请将快递放在门口","你好,稍等","你好,请将快递放入小区快递柜","你好,请将外卖放在门口"],this.popupCustom=new Hi(e,366),document.getElementById("mobile-quickReply-list")||(this.popupCustom.initPopupContent("快捷回复",this.renderQuickReply()),this.initQuickReply())}),[{key:"initQuickReply",value:function(){document.getElementById("mobile-quickReply-list-item-0")||this.getQuickReplyList()}},{key:"renderQuickReply",value:function(){document.documentElement.clientWidth;var A=document.createElement("div");return A.style="width:100%;",A.id="mobile-quickReply-list",A.innerHTML='<div id="mobile-quickReply-content" style="display: block;width:100%;margin-bottom: 36px;"></div>\n <div id="mobile-quickReply-loading" style="display: none;width:100%;"></div>\n <div id="mobile-quickReply-loaderror" style="display: none;width:100%;"></div>',A}},{key:"matchQuickReplyBtn",value:function(){var A=this,e=this.videoWidth/375||1,t=document.getElementById("mobile-quickReply-content");this.quickReplyList&&this.quickReplyList.length>0&&this.quickReplyList.forEach((function(i,n){var a=document.createElement("div");a.id="mobile-quickReply-list-item-".concat(n),a.style="margin: ".concat(14*e,"px 0;\n padding: ").concat(12*e,"px ").concat(15*e,"px;min-height: ").concat(50*e,"px;width:100%;\n background: #ffffff;border-radius: ").concat(25*e,"px;display: flex;align-items: center;\n box-sizing: border-box;font-size:").concat(16*e,"px;color: #2c2c2c;"),a.innerHTML='\n <svg id="mobile-quickReply-icon-'.concat(n,'" width="').concat(24*e,'px" height="').concat(24*e,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/快捷回复播放</title>\n <g id="icon/快捷回复播放" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M18.9877488,4.36609064 C21.024173,6.11256041 22.2495,8.93566941 22.2495,12.0024 C22.2495,15.066006 21.0272636,17.8857191 18.9943957,19.6331539 C18.6802816,19.9031635 18.2067557,19.8674098 17.9367461,19.5532957 C17.6667365,19.2391816 17.7024902,18.7656557 18.0166043,18.4956461 C19.708691,17.0411437 20.7495,14.6399857 20.7495,12.0024 C20.7495,9.36223947 19.7060688,6.95821183 18.0112512,5.50470936 C17.6968304,5.23505702 17.6605383,4.76157212 17.9301906,4.44715124 C18.199843,4.13273036 18.6733279,4.09643829 18.9877488,4.36609064 Z M12.2442357,5.87579772 L12.2496,6.0179 L12.2496,17.9819 C12.2496,19.4241617 10.6173522,20.2281184 9.48072691,19.4058312 L9.36879527,19.318145 L5.5996,16.1243865 L3.4996,16.1249 C2.581479,16.1249 1.8284129,15.4182283 1.75540159,14.518493 L1.7496,14.3749 L1.7496,9.6249 C1.7496,8.70699712 2.45696726,7.95373471 3.35611134,7.88070323 L3.4996,7.8749 L5.5996,7.8743865 L9.36863059,4.68279453 C10.4692948,3.74976994 12.1377395,4.4768074 12.2442357,5.87579772 Z M10.3952894,5.79039368 L10.338321,5.82721597 L6.35932099,9.19721597 C6.33078024,9.2209397 6.30781291,9.23786997 6.28390041,9.25347262 L6.35932099,9.19721597 C6.32908972,9.22282023 6.29742069,9.24561685 6.26463127,9.26563212 C6.24087088,9.28012218 6.21634729,9.29327785 6.19105714,9.30506452 C6.18413632,9.30829747 6.1773583,9.31133066 6.1705483,9.31425704 C6.10964585,9.34044144 6.04445985,9.35881628 5.97637056,9.36805338 C5.95756973,9.37054904 5.94148484,9.37214804 5.92538001,9.37322799 L5.8746,9.3749 L3.4996,9.3749 C3.38149734,9.3749 3.28218291,9.45734262 3.25621762,9.56766695 L3.2496,9.6249 L3.2496,14.3749 C3.2496,14.4934644 3.33170357,14.592449 3.44222164,14.6183106 L3.4996,14.6249 L5.8746,14.6249 L5.92192315,14.6263483 C5.93923255,14.627429 5.95652113,14.629109 5.97375563,14.6313909 L5.8746,14.6249 C5.9789469,14.6249 6.0783167,14.6462095 6.168595,14.6847142 C6.18010037,14.6895946 6.19235048,14.695194 6.2044823,14.7011451 C6.22547728,14.7114805 6.24528995,14.7223727 6.26453263,14.7341072 C6.266314,14.735195 6.26795143,14.7362034 6.26958602,14.7372187 L6.28086895,14.7443598 C6.30587317,14.7605037 6.32985559,14.7780945 6.3526978,14.7970136 L6.35940473,14.802655 L10.3380567,18.1733603 C10.4825575,18.2956302 10.695338,18.2179271 10.7408386,18.0492187 L10.7496,17.9819 L10.7496,6.0179 C10.7496,5.82820058 10.5532313,5.71607381 10.3952894,5.79039368 Z M15.9361636,7.38657032 C17.3580982,8.28109203 18.2498,10.0509458 18.2498,12.0044 C18.2498,13.9607796 17.3563865,15.7307985 15.9326223,16.6154437 C15.5807928,16.8340503 15.1183629,16.7260519 14.8997563,16.3742223 C14.6811497,16.0223928 14.7891481,15.5599629 15.1409777,15.3413563 C16.1036696,14.7431949 16.7498,13.4630899 16.7498,12.0044 C16.7498,10.5466827 16.103548,9.26399865 15.1374364,8.65622968 C14.7868297,8.43566726 14.6814079,7.97264316 14.9019703,7.62203641 C15.1225327,7.27142966 15.5855568,7.1660079 15.9361636,7.38657032 Z" id="形状结合" fill="#2C2C2C" fill-rule="nonzero"></path>\n </g>\n </svg>\n <span id="mobile-quickReply-name-').concat(n,'" style="padding-left: 5px;">').concat(i.voiceName,"</span>"),a.onclick=function(){console.log("item:"+i),A.sendLoadingStats||(A.setBtnCheckStatus(n),A.sendQuickReply(i))},t.appendChild(a)}))}},{key:"setBtnCheckStatus",value:function(A){var e=this,t="";this.quickReplyList.forEach((function(i,n){t=document.getElementById("mobile-quickReply-list-item-".concat(n)),n==A?(t.style.background="#F4F6FC",t.style.color="#648FFC",e.setBtnCheckLoding(0,n)):(t.style.background="#ffffff",t.style.color="#2c2c2c")}))}},{key:"setBtnCheckLoding",value:function(A,e){console.log(e);var t=this.videoWidth/375||1;if(e>-1){var i=document.getElementById("mobile-quickReply-list-item-".concat(e)),n=document.getElementById("mobile-quickReply-name-".concat(e)),a=document.getElementById("mobile-quickReply-icon-".concat(e));if(1==A){if(document.getElementById("mobile-quickReply-icon-loading-".concat(e))&&n){var o=document.createElement("span");o.id="mobile-quickReply-icon-".concat(e),o.style="height:".concat(24*t,"px;"),o.innerHTML='\n <svg width="'.concat(24*t,'px" height="').concat(24*t,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/快捷回复播放</title>\n <g id="icon/快捷回复播放" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M18.9877488,4.36609064 C21.024173,6.11256041 22.2495,8.93566941 22.2495,12.0024 C22.2495,15.066006 21.0272636,17.8857191 18.9943957,19.6331539 C18.6802816,19.9031635 18.2067557,19.8674098 17.9367461,19.5532957 C17.6667365,19.2391816 17.7024902,18.7656557 18.0166043,18.4956461 C19.708691,17.0411437 20.7495,14.6399857 20.7495,12.0024 C20.7495,9.36223947 19.7060688,6.95821183 18.0112512,5.50470936 C17.6968304,5.23505702 17.6605383,4.76157212 17.9301906,4.44715124 C18.199843,4.13273036 18.6733279,4.09643829 18.9877488,4.36609064 Z M12.2442357,5.87579772 L12.2496,6.0179 L12.2496,17.9819 C12.2496,19.4241617 10.6173522,20.2281184 9.48072691,19.4058312 L9.36879527,19.318145 L5.5996,16.1243865 L3.4996,16.1249 C2.581479,16.1249 1.8284129,15.4182283 1.75540159,14.518493 L1.7496,14.3749 L1.7496,9.6249 C1.7496,8.70699712 2.45696726,7.95373471 3.35611134,7.88070323 L3.4996,7.8749 L5.5996,7.8743865 L9.36863059,4.68279453 C10.4692948,3.74976994 12.1377395,4.4768074 12.2442357,5.87579772 Z M10.3952894,5.79039368 L10.338321,5.82721597 L6.35932099,9.19721597 C6.33078024,9.2209397 6.30781291,9.23786997 6.28390041,9.25347262 L6.35932099,9.19721597 C6.32908972,9.22282023 6.29742069,9.24561685 6.26463127,9.26563212 C6.24087088,9.28012218 6.21634729,9.29327785 6.19105714,9.30506452 C6.18413632,9.30829747 6.1773583,9.31133066 6.1705483,9.31425704 C6.10964585,9.34044144 6.04445985,9.35881628 5.97637056,9.36805338 C5.95756973,9.37054904 5.94148484,9.37214804 5.92538001,9.37322799 L5.8746,9.3749 L3.4996,9.3749 C3.38149734,9.3749 3.28218291,9.45734262 3.25621762,9.56766695 L3.2496,9.6249 L3.2496,14.3749 C3.2496,14.4934644 3.33170357,14.592449 3.44222164,14.6183106 L3.4996,14.6249 L5.8746,14.6249 L5.92192315,14.6263483 C5.93923255,14.627429 5.95652113,14.629109 5.97375563,14.6313909 L5.8746,14.6249 C5.9789469,14.6249 6.0783167,14.6462095 6.168595,14.6847142 C6.18010037,14.6895946 6.19235048,14.695194 6.2044823,14.7011451 C6.22547728,14.7114805 6.24528995,14.7223727 6.26453263,14.7341072 C6.266314,14.735195 6.26795143,14.7362034 6.26958602,14.7372187 L6.28086895,14.7443598 C6.30587317,14.7605037 6.32985559,14.7780945 6.3526978,14.7970136 L6.35940473,14.802655 L10.3380567,18.1733603 C10.4825575,18.2956302 10.695338,18.2179271 10.7408386,18.0492187 L10.7496,17.9819 L10.7496,6.0179 C10.7496,5.82820058 10.5532313,5.71607381 10.3952894,5.79039368 Z M15.9361636,7.38657032 C17.3580982,8.28109203 18.2498,10.0509458 18.2498,12.0044 C18.2498,13.9607796 17.3563865,15.7307985 15.9326223,16.6154437 C15.5807928,16.8340503 15.1183629,16.7260519 14.8997563,16.3742223 C14.6811497,16.0223928 14.7891481,15.5599629 15.1409777,15.3413563 C16.1036696,14.7431949 16.7498,13.4630899 16.7498,12.0044 C16.7498,10.5466827 16.103548,9.26399865 15.1374364,8.65622968 C14.7868297,8.43566726 14.6814079,7.97264316 14.9019703,7.62203641 C15.1225327,7.27142966 15.5855568,7.1660079 15.9361636,7.38657032 Z" id="形状结合" fill="#2C2C2C" fill-rule="nonzero"></path>\n </g>\n </svg>\n '),i.insertBefore(o,n)}}else if(a&&n){i.removeChild(a);var r=document.createElement("span");r.id="mobile-quickReply-icon-loading-".concat(e),r.style="height:".concat(20*t,"px;width: ").concat(24*t,"px;"),r.innerHTML='<svg width="'.concat(20*t,'" height="').concat(20*t,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#666666" p-id="2400"></path></svg>'),i.insertBefore(r,n)}}}},{key:"getQuickReplyList",value:function(){var A=this;console.log("getQuickReplyList"),this.madeLoadingDom(0);Ni(this.jSPlugin,(function(e){if(e&&200==e.code){var t=e.data||[],i=[];e.data.forEach((function(A,e){i=A.voiceName.split("_"),t[e].voiceName=i[1]})),A.quickReplyList=t,setTimeout((function(){A.madeLoadingDom(2)}),500)}else A.madeLoadingDom(1)}),(function(e){console.log(e),A.madeLoadingDom(1)}))}},{key:"madeLoadingDom",value:function(A){var e=this,t=this.videoWidth/375||1;if(0==A){if(document.getElementById("mobile-quickReply-content").style.display="none",document.getElementById("mobile-quickReply-loaderror").style.display="none",document.getElementById("mobile-quickReply-loading").style.display="block",!document.getElementById("mobile-quickReply-loading-box")){var i=document.createElement("div");i.id="mobile-quickReply-loading-box",i.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: row;",i.innerHTML='<div class="" style="heigth:'.concat(20*t,'px">\n <svg width="').concat(20*t,'" height="').concat(20*t,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#666666" p-id="2400"></path></svg> \n </div>\n <div style="font-size: ').concat(16*t,"px;margin-left:",10,'px;color:#666666;">正在加载,请稍候</div>'),document.getElementById("mobile-quickReply-loading").appendChild(i)}}else if(1==A){if(document.getElementById("mobile-quickReply-content").style.display="none",document.getElementById("mobile-quickReply-loading").style.display="none",document.getElementById("mobile-quickReply-loaderror").style.display="block",!document.getElementById("mobile-quickReply-loaderror-box")){var n=document.createElement("div");n.id="mobile-quickReply-loaderror-box",n.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;",n.innerHTML='<div style="">\n <img style="width:'.concat(186*t,"px;height:").concat(120*t,'px;" src="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPZ34KAAStrAAA0pZ5cGTw167.png" />\n </div>\n <div style="font-size: ').concat(16*t,'px;color: #666666;">\n <span>加载失败 </span>\n <span id="mobile-quickReply-loaderror-reload" \n style="color: #648FFC;-webkit-tap-highlight-color: transparent;">点击重试</span>\n </div>'),document.getElementById("mobile-quickReply-loaderror").appendChild(n),document.getElementById("mobile-quickReply-loaderror-reload").onclick=function(){e.getQuickReplyList()}}}else document.getElementById("mobile-quickReply-loading").style.display="none",document.getElementById("mobile-quickReply-loaderror").style.display="none",document.getElementById("mobile-quickReply-content").style.display="block",this.matchQuickReplyBtn()}},{key:"sendQuickReply",value:function(A){var e=this;this.sendLoadingStats=!0;Ti(this.jSPlugin,A.fileUrl,(function(A){e.sendLoadingStats=!1,A&&200==A.code?e.toastCustom.initToastContent("快捷回复成功"):e.toastCustom.initToastContent("快捷回复失败,请重试"),e.popupCustom.closePopupCustom()}),(function(A){console.log(A),e.sendLoadingStats=!1,e.toastCustom.initToastContent("快捷回复失败,请重试"),e.popupCustom.closePopupCustom()}))}},{key:"closeQuickReplyEle",value:function(){this.popupCustom.closePopupCustom()}}])}(),Vi=function(){return o((function A(e,i,n){t(this,A),this.jSPlugin=e,this.videoWidth=n,this.switchFooter=i,this.toastCustom=new Ri(e,!0),this.lockStatus=!1,this.popupCustom=new Hi(e,265),this.popupCustom.initPopupContent("远程开锁",this.renderRemoteUnlock()),this.renderRemoteUnlockSlide()}),[{key:"initRemoteUnlock",value:function(){document.getElementById("mobile-remoteUnlock-content")?this.madeSlideEvent():this.renderRemoteUnlock()}},{key:"renderRemoteUnlock",value:function(){var A=this.videoWidth/1024||1,e=document.createElement("div");return e.style="width:100%;",e.id="mobile-remoteUnlock-box",e.innerHTML='<div style="width:100%;display:flex;flex-direction:row;align-items: center;">\n <div id="mobile-remoteUnlock-content" style="display: block;width:calc(100% - '.concat(160*A,"px);margin: 0 ").concat(24*A,'px;"></div>\n </div>'),e}},{key:"renderRemoteUnlockSlide",value:function(){var A=this.videoWidth/375||1,e=document.getElementById("mobile-remoteUnlock-content"),t=document.createElement("div");t.id="mobile-remoteUnlock-content-slide",t.style="width: 100%;display: flex;justify-content: center;padding: 0 ".concat(15*A,"px"),t.innerHTML='<div id="mobile-remoteUnlock-slide-box" style="width: 100%;line-height: '.concat(60*A,"px;height: ").concat(60*A,"px;border: 1px solid rgba(100,143,252,1);border-radius: ").concat(30*A,'px;position: relative;text-align: center;">\n <div id="mobile-remoteUnlock-slide-bgColor" style="border-radius: ').concat(30*A,"px;width: ").concat(44*A,"px;height: ").concat(60*A,'px;position: absolute;left: 0;top: 0;"></div>\n <div id="mobile-remoteUnlock-slide-tips" style="height: ').concat(60*A,"px;line-height: ").concat(60*A,"px;font-size: ").concat(14*A,"px;border-radius: ").concat(30*A,'px;position: absolute;text-align: center;user-select: none;color: #666666;width: 100%;">右滑开锁</div>\n <div id="mobile-remoteUnlock-slide-ball" style="top: ').concat(8*A,"px;left: ").concat(8*A,"px;width: ").concat(44*A,"px;height: ").concat(44*A,'px;background: #598FFF;position: absolute;text-align: center;border-radius:50%;display:flex;align-items: center;justify-content: center;">\n <svg id="slide-ball-start" style="display: inline;" width="').concat(24*A,'px" height="').concat(24*A,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/箭头向右</title>\n <g id="icon/箭头向右" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="0" y="0" width="24" height="24"></rect>\n <path d="M14.2841136,6.3689007 L19.9432338,12.0287579 L14.2863796,17.6856122 L12.8580239,16.2572565 L16.114,12.9999007 L4.00000001,13 L4.00000001,11 L16.058,10.9999007 L12.8557579,7.79725638 L14.2841136,6.3689007 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n <svg id="slide-ball-end" style="display: none;" width="').concat(20*A,'" height="').concat(20*A,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#648ffc" p-id="2400"></path></svg>\n </div>\n </div>'),e.appendChild(t),this.madeSlideEvent()}},{key:"madeSlideEvent",value:function(){var A=this.videoWidth/375||1,e=document.getElementById("mobile-remoteUnlock-slide-box"),t=document.getElementById("mobile-remoteUnlock-slide-bgColor"),i=document.getElementById("mobile-remoteUnlock-slide-tips"),n=document.getElementById("mobile-remoteUnlock-slide-ball"),a=this;n.ontouchstart=function(o){console.log("ontouchstart");var r=(o=o||window.event).touches[0].pageX;n.style.transition="",t.style.transition="",document.ontouchmove=function(o){var s=(o=o||window.event).touches[0].pageX-e.offsetLeft-r,g=e.clientWidth-n.clientWidth-8*A;s<=0&&(s=0),s>=g&&(s=g),n.style.left=s+"px",s!=g||a.lockStatus||(a.lockStatus=!0,document.getElementById("slide-ball-start").style.display="none",document.getElementById("slide-ball-end").style.display="inline",t.style.width=e.clientWidth+"px",t.style.backgroundColor="#598FFF",e.style.border="0",n.style.backgroundColor="#ffffff",i.textContent="正在开锁",i.style.color="#ffffff",n.ontouchstart=null,a.sendRemoteUnlockApi())},document.ontouchend=function(){a.lockStatus||(t.style.width="0px",n.style.left=8*A+"px",n.style.transition="left 0.6s linear",t.style.transition="width 0.6s linear"),document.ontouchend=null,document.ontouchmove=null}}}},{key:"resetRemoteUnlockSlide",value:function(){var A=this.videoWidth/1024||1;this.lockStatus=!1;var e=document.getElementById("mobile-remoteUnlock-slide-box"),t=document.getElementById("mobile-remoteUnlock-slide-bgColor"),i=document.getElementById("mobile-remoteUnlock-slide-tips"),n=document.getElementById("mobile-remoteUnlock-slide-ball");t.style.width="0px",n.style.left=8*A+"px",i.textContent="右滑开锁",i.style.color="#666666",document.getElementById("slide-ball-start").style.display="inline",document.getElementById("slide-ball-end").style.display="none",t.style.backgroundColor="#FFFFFF",e.style.border="1px solid rgba(255,255,255,1)",n.style.backgroundColor="#598FFF"}},{key:"sendRemoteUnlockApi",value:function(){var A=this;console.log("下发远程开锁");Pi(this.jSPlugin,(function(e){e&&200==e.code?A.toastCustom.initToastContent("开锁成功"):A.toastCustom.initToastContent("开锁失败,请重试"),A.popupCustom.closePopupCustom()}),(function(e){console.log(e),A.toastCustom.initToastContent("开锁失败,请重试"),A.popupCustom.closePopupCustom()}))}},{key:"closeRemoteUnlock",value:function(){this.popupCustom.closePopupCustom()}}])}(),Oi={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0},header:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000 linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)",activeColor:"#1890FF",autoFocus:0,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"ringStatus",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"callStatus",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]}},footer:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"quickReply",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"rejection",part:"left",defaultActive:0,isrender:1,color:"#2C2C2C",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"answer",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-3",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000080",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"mute",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"hangUp",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]}}},ji=function(A){var e="";return Object.keys(A).map((function(t,i){e+="".concat(t,":").concat(A[t]).concat(i<Object.keys(A).length-1?";":"")})),e},Wi=function(){return o((function A(e,i,n,a){var o=this;t(this,A),s(this,"switchCallStatus",(function(A){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=o.themeData,i=t.header,n=t.footer,a=null;if("onCall"==A){console.log("接听"),o.bellStatus="onCall",o.switchFooter("onCall"),n[o.bellStatus].btnList.map((function(A,e){A.isrender&&o.renderFooter(A.iconId,A),"mute"==A.iconId&&(a=A)})),i[o.bellStatus].btnList.map((function(A,e){A.isrender&&o.renderHeader(A.iconId,A)}));var r=document.getElementById("".concat(o.jSPlugin.id,"-header-onBell"));r&&r.parentElement.removeChild(r),1==o.themeData.customConfig.bellPoster&&document.getElementById("bellring-icon")&&document.getElementById("".concat(o.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon")),0==o.themeData.customConfig.defaultMicro&&a?o.muteCommon(a):o.setDecoderState({mute:!1},a.backgroundColor),o.removeBellRing(),o.miniRecCloseClick()}else console.log("响铃"),o.bellStatus="onBell",o.jSPlugin.Theme.changeTheme(o.themeData,e)})),s(this,"muteCommon",(function(A){var e=o.decoderState.state,t=e.talk,i=e.sound;t?(console.log("结束对讲"),o.setDecoderState({talk:!1,mute:!0},A.backgroundColor),o.jSPlugin.Talk.stopTalk(),i||o.jSPlugin.openSound()):(o.setDecoderState({talk:!1,mute:!0},A.backgroundColor),i||o.jSPlugin.openSound())})),s(this,"autoPlayRing",(function(){console.log("autoPlayRing");var A=document.getElementById("bellring-audio");A&&(A.muted=!1,A.src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3",A.paused&&A.play()),o.checkIsAppleDevice()||!1?window.removeEventListener("touchstart",o.autoPlayRing):window.removeEventListener("click",o.autoPlayRing)})),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.themeData=i,this.setDecoderState=n,this.decoderState=a,this.isNeedRenderHeader=!1,this.isNeedRenderFooter=!1,this.autoFocus=0,this.autoFocusTimer=null,this.bellStatus="onBell",this.recordTimer=null,this.nextRate=1,this.themeInited=!1,this.inited=!1,this.miniRecStatus="rec",this.activeThemeStatus=!0,this.activeThemeStatusTxt="模板未激活",this.miniRecNum=0,this.toastCustom=new Ri(e,!0)}),[{key:"initBellRing",value:function(){var A=this,e=this.decoderState.state,t=e.play,i=e.isEditing,n=this.videoWidth,a=n/375;this.maxBellTime=1e3*this.themeData.customConfig.maxBellTime;var o=document.getElementById("bellring"),r=document.getElementById("bellring-audio");if(!o&&!r){if(this.jSPlugin.isNeedBellRing){var s=document.createElement("div");s.id="bellring",s.innerHTML='<div>\n <audio id="bellring-audio" loop autoplay>\n <source src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3" type="audio/mpeg">\n </audio>\n </div>',document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(s)}if(1!=this.themeData.customConfig.bellPoster||i)document.getElementById("bellring-icon")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"));else{var g=1.8*n,c=6;document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(c=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+.1*g+6);var l=c+(this.videoHeight-130*a)/2,I=document.createElement("div");I.id="bellring-icon",I.style="position: absolute;pointer-events: none;background: none;width: 100%;\n position: absolute;top: ".concat(l,"px;display: flex;align-items: center;justify-content: center;"),I.innerHTML='<div style="width: '.concat(130*a,"px;height: ").concat(130*a,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.2);border-radius: 50%;">\n <div style="width: ').concat(80*a,"px;height: ").concat(80*a,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.3);border-radius: 50%;">\n <svg width="').concat(40*a,'px" height="').concat(40*a,'px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/响铃</title>\n <g id="icon/响铃" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <polygon id="Path" points="0 0 40.0000002 0 40.0000002 40.0000002 0 40.0000002"></polygon>\n <path d="M20.0000001,4.25000002 C22.0363461,4.25000002 23.698175,5.84879552 23.8000507,7.8591997 L23.8050001,8.05500003 L23.805316,8.99953253 C27.1874196,9.97041766 29.6921839,13.0354462 29.80936,16.723731 L29.80936,16.723731 L29.8133335,16.9800001 L29.8133335,21.6416668 C29.8133335,22.3259481 30.0858837,22.9835569 30.5703302,23.4680033 L30.5703302,23.4680033 L31.6386635,24.5363367 C32.338953,25.2366262 32.760721,26.1675592 32.8273086,27.1785295 L32.8273086,27.1785295 L32.8350001,27.4233334 C32.8350001,29.577547 31.0892137,31.3233335 28.9350001,31.3233335 L28.9350001,31.3233335 L24.5666667,31.323 L24.5650266,31.3951531 C24.4527075,33.8194458 22.4520933,35.7500001 20.0000001,35.7500001 C17.5482065,35.7500001 15.5473098,33.8197367 15.4349743,31.3967059 L15.4326667,31.323 L11.0666667,31.3233335 C9.06159524,31.3233335 7.39851917,29.8069287 7.18810198,27.8229374 L7.17194359,27.6230185 L7.1666667,27.4233334 C7.1666667,26.3411154 7.59733134,25.3020086 8.36300328,24.5363367 L8.36300328,24.5363367 L9.43133662,23.4680033 C9.91578309,22.9835569 10.1883334,22.3259481 10.1883334,21.6416668 L10.1883334,21.6416668 L10.1883334,16.9800001 C10.1883334,13.1909619 12.7263704,9.99530436 16.1948593,8.99965364 L16.1950001,8.05500003 C16.1950001,5.95360729 17.8979654,4.25000002 20.0000001,4.25000002 Z M23.0656667,31.323 L16.9336667,31.323 L16.9352114,31.3619281 C17.0285826,32.9723844 18.3649772,34.2500001 20.0000001,34.2500001 C21.6352227,34.2500001 22.9714318,32.9721919 23.0647896,31.3604131 L23.0656667,31.323 Z M21.5116668,10.1783334 L18.4900001,10.1783334 C14.7336124,10.1783334 11.6883334,13.2231481 11.6883334,16.9800001 L11.6883334,16.9800001 L11.6883334,21.6416668 C11.6883334,22.7238848 11.2576687,23.7629916 10.4919968,24.5286635 L10.4919968,24.5286635 L9.42366346,25.5969969 C8.93921698,26.0814433 8.6666667,26.7390521 8.66637526,27.402427 L8.66637526,27.402427 L8.67048222,27.560237 C8.74130967,28.8268108 9.79171396,29.8233335 11.0666667,29.8233335 L11.0666667,29.8233335 L23.7906939,29.8222289 C23.8004164,29.8218553 23.8101862,29.8216668 23.8200001,29.8216668 L23.8486667,29.823 L28.9350001,29.8233335 C30.2055455,29.8233335 31.2450456,28.8367727 31.329826,27.609522 L31.3354106,27.4481422 L31.3293607,27.2529336 C31.2880301,26.6292837 31.0210852,26.0400787 30.5780034,25.5969969 L30.5780034,25.5969969 L29.50967,24.5286635 C28.7439981,23.7629916 28.3133335,22.7238848 28.3133335,21.6416668 L28.3133335,21.6416668 L28.3134279,16.9919039 L28.3098332,16.759466 C28.1934023,13.0970787 25.1864454,10.1783334 21.5116668,10.1783334 L21.5116668,10.1783334 Z M20.0000001,5.75000002 C18.7795808,5.75000002 17.7813801,6.69770708 17.7003155,7.89717688 L17.6950001,8.05500003 L17.6952875,8.7158769 C17.9568453,8.69103758 18.2219393,8.67833337 18.4900001,8.67833337 L18.4900001,8.67833337 L21.5116668,8.67833337 C21.7792577,8.67833337 22.0439466,8.69101238 22.3051575,8.71580951 L22.3050001,8.05500003 C22.3050001,6.7819079 21.273481,5.75000002 20.0000001,5.75000002 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(I),t&&"onBell"==this.bellStatus&&this.jSPlugin.pause()}setTimeout((function(){var e=A.decoderState.state,t=e.isEditing,i=e.rejection;"onBell"!=A.bellStatus||i||(A.removeBellRing(),t||A.answerOvertime())}),this.maxBellTime)}}},{key:"removeBellRing",value:function(){document.getElementById("bellring")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring")),document.getElementById("bellring-icon")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}},{key:"getMiniCallTimeUrl",value:function(){if(console.log("--------------getMiniCallTimeUrl"),-1!==this.jSPlugin.url.indexOf("hd.live")?this.recUrl=this.jSPlugin.url.replace("hd.live","rec"):this.recUrl=this.jSPlugin.url.replace("live","rec"),this.jSPlugin.callTime){var A=parseInt(this.jSPlugin.callTime),e=A+5e3,t=new Date(A-1e4).Format("yyyyMMddhhmmss"),i=new Date(e).Format("yyyyMMddhhmmss");this.recUrl="".concat(this.recUrl,"?begin=").concat(t,"&end=").concat(i),console.log("recurl="+this.recUrl)}}},{key:"initMiniRec",value:function(){var A=this,e=this,t=this.videoWidth,i=t/375,n=1.8*t,a=6;document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(a=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+.1*n+6);var o=a+this.videoHeight+10*i;if(console.log(a),document.getElementById("miniRecbox"))document.getElementById("miniRecbox")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniRecbox")),document.getElementById("miniClose")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniClose")),this.initMiniRec();else{var r=document.createElement("div");r.id="miniRecbox",r.style="-webkit-border-radius: 8px;border-radius: 8px;overflow: hidden;position: absolute;top: ".concat(o,"px;right: ").concat(9*i,"px;"),r.innerHTML='<div id="miniRec"></div>',document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(r),this.getMiniCallTimeUrl();var s={domain:Tt};this.miniRecPlayer=new dE({id:"miniRec",width:160*i,height:90*i,template:"miniRec",url:this.recUrl,token:this.jSPlugin.token,handleError:function(t){console.log("小窗口handleError------------",t),t&&6701==t.retcode?(A.miniRecNum=A.miniRecNum+1,console.log("小窗口miniRecNum-----------------",A.miniRecNum),A.miniRecNum<5?e.miniRecPlayer.changePlayUrl({type:"miniRec"}):(console.log("小窗口------------------已播放5次,关闭小窗口"),e.miniRecCloseClick())):(console.log("小窗口------------------播放失败,关闭小窗口"),e.miniRecCloseClick())},env:this.jSPlugin.env||s});var g=document.createElement("div");g.id="miniClose",g.style="position: absolute;top: ".concat(o+8,"px;right: ").concat(16*i,"px;"),g.innerHTML='<div id="miniClose-btn" style="width: '.concat(24*i,"px;height: ").concat(24*i,'px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background: rgba(0,0,0,0.1);">\n <svg width="').concat(24*i,'px" height="').concat(24*i,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>close</title>\n <g id="icon/close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="common/Close/Dark">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z" id="形状结合" fill="#fff" fill-rule="nonzero"></path>\n </g>\n </g>\n </svg>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(g),document.getElementById("miniClose-btn").onclick=function(){e.miniRecCloseClick()}}}},{key:"initMiniImageRec",value:function(){console.log("initMiniImageRec");var A=this.videoWidth/375,e=6;document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(e=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+26);var t=e+this.videoHeight+10*A;if(document.getElementById("miniRecbox"))document.getElementById("miniRecbox").style.top=t+"px",document.getElementById("miniClose").style.top=t+8+"px";else{var i=document.createElement("div");i.id="miniRecbox",i.style="-webkit-border-radius: 8px;border-radius: 8px;overflow: hidden;position: absolute;\n top: ".concat(t,"px;\n right: ").concat(9*A,"px;\n user-select: none;\n "),i.innerHTML='<div id="miniRec" style="width: '.concat(160*A,"px;height: ").concat(90*A,'px;display: flex;align-items: center;justify-content: center;">\n <embed id="miniRec-embed" style="z-index: 3;position: absolute;width: ').concat(160*A,"px;height: ").concat(90*A,'px;" type="image/svg+xml" src="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg" />\n <div style="color: #FFFFFF;font-size: 12px;z-index: 4;">示意小窗位置</div>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(i);var n=document.createElement("div");n.id="miniClose",n.style="z-index: 4;position: absolute;top: ".concat(t+8,"px;right: ").concat(16*A,"px;"),n.innerHTML='<div id="miniClose-btn" style="width: '.concat(24*A,"px;height: ").concat(24*A,'px;display: flex;align-items: center;justify-content: center;border-radius: 50%;">\n <svg width="').concat(24*A,'px" height="').concat(24*A,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>close</title>\n <g id="icon/close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="common/Close/Dark">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z" id="形状结合" fill="#fff" fill-rule="nonzero"></path>\n </g>\n </g>\n </svg>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(n),document.getElementById("miniClose-btn").onclick=function(){}}}},{key:"miniRecCloseClick",value:function(){document.getElementById("miniRecbox")&&(console.log("---------------------miniRecCloseClick"),"rec"==this.miniRecStatus&&(this.miniRecPlayer&&this.miniRecPlayer.stop(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniClose")),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniRecbox"))))}},{key:"miniRecSwitchClick",value:function(){console.log("---------------小窗口切换");var A=this.decoderState.state.isEditing,e=this.videoWidth,t=e/375,i=1.8*e,n=6;document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(n=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+.1*i+6),console.log("headerHeight-------",n);var a=n+this.videoHeight+10*t;if(console.log("videoTop-------",a),"rec"==this.miniRecStatus){this.miniRecStatus="live",A?(document.getElementById("miniRec-embed").style.width=this.jSPlugin.width+"px",document.getElementById("miniRec-embed").style.height=this.jSPlugin.height+"px",document.getElementById("miniRec").style.width=this.jSPlugin.width+"px",document.getElementById("miniRec").style.height=this.jSPlugin.height+"px"):this.miniRecPlayer.reSize(this.jSPlugin.width,this.jSPlugin.height),this.jSPlugin.reSize(160*t,90*t);var o=this.videoHeight+10*t,r=.2*i-90*t-10*t;document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.width=this.videoWidth+"px",document.getElementById("".concat(this.jSPlugin.id)).style.marginTop=o+"px",document.getElementById("".concat(this.jSPlugin.id)).style.marginLeft=e-160*t-9+"px",document.getElementById("".concat(this.jSPlugin.id)).style.overflow="hidden",document.getElementById("".concat(this.jSPlugin.id)).style.borderRadius="8px",document.getElementById("miniRecbox").style.top=n+"px",document.getElementById("miniRecbox").style.left="0",document.getElementById("miniRecbox").style.right="0",document.getElementById("miniRecbox").style.borderRadius="0px",document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop=r+"px"}else console.log(this.jSPlugin.width),this.miniRecStatus="rec",A?(document.getElementById("miniRec-embed").style.width=160*t+"px",document.getElementById("miniRec-embed").style.height=90*t+"px",document.getElementById("miniRec").style.width=160*t+"px",document.getElementById("miniRec").style.height=90*t+"px"):this.miniRecPlayer.reSize(160*t,90*t),this.jSPlugin.reSize(this.videoWidth,this.videoHeight),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.width=this.videoWidth+NaN,document.getElementById("".concat(this.jSPlugin.id)).style.marginTop="0",document.getElementById("".concat(this.jSPlugin.id)).style.marginLeft="0",document.getElementById("".concat(this.jSPlugin.id)).style.overflow="hidden",document.getElementById("".concat(this.jSPlugin.id)).style.borderRadius="0px",document.getElementById("miniRecbox").style.top=a+"px",document.getElementById("miniRecbox").style.right="9px",document.getElementById("miniRecbox").style.left="auto",document.getElementById("miniRecbox").style.borderRadius="8px",document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop=.2*i+"px"}},{key:"matchBtn",value:function(A,e){var t=this,i=this.themeData,n=i.header,a=i.footer,o=this.decoderState.state,r=o.mute,s=o.rejection;document.documentElement.clientHeight;var g=this.videoWidth/375,c=this.videoWidth/375||1,l={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}};-1===n[this.bellStatus].btnList.findIndex((function(e){return e.iconId===A}))?(l.color=a[this.bellStatus].color,l.backgroundColor=a[this.bellStatus].backgroundColor,l.activeColor=a[this.bellStatus].activeColor):(l.color=n[this.bellStatus].color,l.backgroundColor=n[this.bellStatus].backgroundColor,l.activeColor=n[this.bellStatus].activeColor);var I=this.videoWidth/4;switch(A){case"ringStatus":return l.title=this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,l.id=A,l.domString='<span id="header-onBell-ringStatus" style="color:'.concat(e.color||"#2C2C2C",";font-size: ").concat(24*c,'px;display: block;font-weight: 600;" >').concat(this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,"</span>"),l.onclick=function(){},l;case"deviceCategory":return l.title="设备名称",l.id=A,l.domString='<span id="header-onBell-deviceCategory" \n style="color:'.concat(e.color||"#2C2C2C",";\n font-size: ").concat(14*c,"px;\n padding-top: ").concat(5*c,'px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>"),l.onclick=function(){},l;case"callStatus":return l.title="通话中",l.id=A,l.domString='<span id="header-onCall-ringStatus" style="color:'.concat(e.color||"#2C2C2C",";font-size: ").concat(24*c,'px;display: block;font-weight: 600;" >通话中</span>'),l.onclick=function(){},l;case"deviceCategory":return l.title="设备名称",l.id=A,l.domString='<span id="header-onCall-deviceCategory" \n style="color:'.concat(e.color||"#2C2C2C",";\n font-size: ").concat(14*c,"px;\n padding-top: ").concat(5*c,'px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>"),l.onclick=function(){},l;case"rejection":return l.title="拒绝",l.id=A,l.domString='<div style="width: '.concat(.66*I,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width:').concat(.66*I,"px;height: ").concat(.66*I,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.4*I,'px" height="').concat(.4*I,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>拒绝</title>\n <g id="icon/拒绝" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*I,'px;user-select: none;">拒绝</div>\n </div>'),l.onclick=function(){var A=t,e=t.decoderState.state,i=e.play,n=e.isEditing,a=e.rejection;if(n||a)return!1;console.log("拒绝"),i&&t.jSPlugin.stop(),t.removeBellRing(),t.setDecoderState({play:!1,rejection:!0}),A.miniRecCloseClick(),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("rejection")},l;case"quickReply":return l.title="快捷回复",l.id=A,l.domString='<div id="'.concat(this.jSPlugin.id,'-btn-quickReply" style="width: ').concat(126*g,"px;height: ").concat(40*g,"px;color:").concat(s?"rgba(44,44,44,0.5)":l.color,';background: #F8F8F8;border-radius: 20px;display: flex;flex-direction: row;align-items: center;justify-content: center;-webkit-tap-highlight-color:transparent;">\n <div>\n <svg width="').concat(24*g,'px" height="').concat(24*g,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>快捷回复</title>\n <g id="icon/H5快捷回复" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M10.7238197,2.25008794 C16.2230834,2.09766093 20.7496,6.50749909 20.7496,11.9958 C20.7496,13.4362841 20.4368194,14.8344518 19.8413577,16.1117061 L19.9440524,15.8792521 L21.0527769,21.184554 C21.1496277,21.6485507 20.8013031,22.0657304 20.3577211,22.0873894 L20.2613374,22.0858497 L20.1628027,22.0714397 L14.866,20.946 L14.7518767,20.9973203 C13.6930577,21.439776 12.5585243,21.69208 11.3902258,21.7381162 L11.3902258,21.7381162 L10.9996,21.7458 C5.51196728,21.7458 1.10147008,17.2189531 1.25388722,11.7200456 C1.39490345,6.62610538 5.62990538,2.39110345 10.7238197,2.25008794 Z M11.0183931,3.74628651 L10.7653544,3.74951278 C6.46729462,3.86849655 2.87229655,7.46349462 2.75331206,11.7615803 C2.62431432,16.4155628 6.35610614,20.2458 10.9996,20.2458 C12.2165433,20.2458 13.3936843,19.9831552 14.4692454,19.4827855 C14.6166569,19.4142071 14.7823612,19.395387 14.9413973,19.4291603 L14.9413973,19.4291603 L19.349,20.365 L18.4274231,15.948046 C18.4026128,15.8291836 18.4071487,15.7066932 18.4398273,15.5909727 L18.4398273,15.5909727 L18.4818423,15.4778939 C18.9851908,14.3982208 19.2496,13.216279 19.2496,11.9958 C19.2496,7.35166383 15.4197191,3.62050444 10.7653544,3.74951278 Z M10.9996,10.7498 C11.6896,10.7498 12.2496,11.3098 12.2496,11.9998 C12.2496,12.6898 11.6896,13.2498 10.9996,13.2498 C10.3096,13.2498 9.7496,12.6898 9.7496,11.9998 C9.7496,11.3098 10.3096,10.7498 10.9996,10.7498 Z M6.9996,10.7498 C7.6896,10.7498 8.2496,11.3098 8.2496,11.9998 C8.2496,12.6898 7.6896,13.2498 6.9996,13.2498 C6.3096,13.2498 5.7496,12.6898 5.7496,11.9998 C5.7496,11.3098 6.3096,10.7498 6.9996,10.7498 Z M14.9996,10.7498 C15.6896,10.7498 16.2496,11.3098 16.2496,11.9998 C16.2496,12.6898 15.6896,13.2498 14.9996,13.2498 C14.3096,13.2498 13.7496,12.6898 13.7496,11.9998 C13.7496,11.3098 14.3096,10.7498 14.9996,10.7498 Z" id="形状结合" fill="').concat(s?"rgba(44,44,44,0.5)":"#2c2c2c",'" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n <div style="margin-left: 5px;user-select: none;font-size:14px">快捷回复<div>\n </div>'),l.onclick=function(){var A=t.decoderState.state,e=A.isEditing,i=A.rejection;if(e||i)return!1;console.log("快捷回复"),t.switchFooter("quickReply"),t.quickReplyEle=new Ki(t.jSPlugin,t.switchFooter,t.videoWidth)},l;case"answer":return l.title="接听",l.id=A,l.domString='<div style="width: '.concat(.66*I,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width: ').concat(.66*I,"px;height: ").concat(.66*I,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.4*I,'px" height="').concat(.4*I,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>接听</title>\n <g id="icon/接听" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M15.7728281,19.6822968 C13.2528132,17.165123 10.8435994,14.2473605 11.9999084,13.0938925 C13.6505608,11.4432401 15.0881341,10.4261428 12.1646895,6.78675259 C9.23840386,3.14452132 7.28659974,5.94011849 5.68708632,7.53963191 C3.84324225,9.38631703 5.59049048,16.2645088 12.3891328,23.0659922 C19.1877751,29.8646345 26.0688079,31.6147238 27.9154931,29.7680386 C29.5150065,28.1685252 32.3106036,26.2195622 28.6712134,23.2932765 C25.0318232,20.3669909 24.0147259,21.8045642 22.3640735,23.4580576 C21.2077645,24.6086845 18.2928431,22.1994707 15.7728281,19.6822968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.727936, 17.728157) rotate(-360.000000) translate(-17.727936, -17.728157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*I,'px;user-select: none;">接听</div>\n </div>'),l.onclick=function(){var A=t,i=t.decoderState.state,o=i.play,r=i.isEditing,s=i.talk,g=i.sound,c=i.rejection;if(r||c)return!1;console.log("接听"),t.jSPlugin.pluginStatus.loadingClear(),t.bellStatus="onCall",t.switchFooter("onCall"),a[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderFooter(A.iconId,A)})),n[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderHeader(A.iconId,A)}));var l=document.getElementById("".concat(t.jSPlugin.id,"-header-onBell"));l&&l.parentElement.removeChild(l),1==t.themeData.customConfig.bellPoster&&(document.getElementById("bellring-icon")&&document.getElementById("".concat(t.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon")),t.jSPlugin.setPoster("")),t.removeBellRing(),t.miniRecCloseClick(),o||(t.jSPlugin.pluginStatus.loadingStart(t.jSPlugin.id),t.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"}),t.jSPlugin.play(),t.setDecoderState({play:!o})),s||1!=t.themeData.customConfig.defaultMicro||(t.setDecoderState({talk:!0,mute:!1}),g&&t.jSPlugin.closeSound(),t.jSPlugin.Talk.startTalk()),t.setDecoderState({sound:!1}),0==t.themeData.customConfig.defaultMicro&&(t.muteCommon(e),t.jSPlugin.openSound()),t.maxTalkTime=1e3*t.themeData.customConfig.maxTalkTime*60,setTimeout((function(){s&&(console.log("结束对讲"),A.setDecoderState({talk:!1}),A.jSPlugin.Talk.stopTalk()),o&&(A.jSPlugin.stop(),A.setDecoderState({play:!o})),t.rejectionStatusDispose(),t.remoteUnlockEle&&t.remoteUnlockEle.closeRemoteUnlock(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp")}),t.maxTalkTime)},l;case"remoteUnlock":return l.title="远程开锁",l.id=A,l.domString='<div style="width: '.concat(.66*I,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width: ').concat(.66*I,"px;height: ").concat(.66*I,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.4*I,'px" height="').concat(.4*I,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>开锁</title>\n <g id="icon/开锁" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M18,4 C21.3137085,4 24,6.6862915 24,10 L24,10 L24,19.787 L29.5,19.7875 C30.0522847,19.7875 30.5,20.2352153 30.5,20.7875 C30.5,21.3397847 30.0522847,21.7875 29.5,21.7875 L24,21.787 L24,26 C24,29.2383969 21.4344251,31.8775718 18.2249383,31.9958615 L18,32 C14.6862915,32 12,29.3137085 12,26 L12,26 L12,10 C12,6.6862915 14.6862915,4 18,4 Z M18,6 C15.790861,6 14,7.790861 14,10 L14,10 L14,26 C14,28.209139 15.790861,30 18,30 C20.209139,30 22,28.209139 22,26 L22,26 L22,21.787 L18.5,21.7875 C17.9477153,21.7875 17.5,21.3397847 17.5,20.7875 C17.5,20.2352153 17.9477153,19.7875 18.5,19.7875 L22,19.787 L22,10 C22,7.85780461 20.3160315,6.10892112 18.1996403,6.00489531 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*I,'px;user-select: none;">远程开锁</div>\n </div>'),l.onclick=function(){var A=t.decoderState.state,e=A.isEditing;A.play;var i=A.rejection;if(e||"onBell"==t.bellStatus||i)return!1;console.log("远程开锁"),t.switchFooter("remoteUnlock"),t.remoteUnlockEle=new Vi(t.jSPlugin,t.switchFooter,t.videoWidth)},l;case"mute":return l.title="静音",l.id=A,l.domString='<div style="width: '.concat(.66*I,'px;display: flex;flex-direction: column;align-items: center;">\n <div id="').concat(this.jSPlugin.id,'-icon-mute" style="width: ').concat(.66*I,"px;height: ").concat(.66*I,"px;border-radius: 50%;border: 1px solid ").concat(s?"#cccccc":e.backgroundColor,";background: ").concat(s&&r?"#cccccc":"#ffffff",';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.4*I,'px" height="').concat(.4*I,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/静音</title>\n <g id="icon/静音" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path id="icon-mute-path" d="M29.2988305,7.56559704 C29.8540627,8.1086468 29.8980234,8.97727504 29.4240597,9.57172938 L29.3223594,9.6867869 L22.585,16.574 L22.5859243,26.0592702 C22.5859243,26.9500521 21.8638029,27.6721735 20.973021,27.6721735 C20.6007147,27.6721735 20.2398727,27.5433734 19.9517149,27.3076254 L15.583,23.733 L10.4341733,28.9987008 C9.85492024,29.5909486 8.9052312,29.6014828 8.31298346,29.0222298 C7.75775121,28.47918 7.71379057,27.6105518 8.18775419,27.0160974 L8.28945454,26.9010399 L27.1776406,7.58912597 C27.7568937,6.99687823 28.7065827,6.98634397 29.2988305,7.56559704 Z M22.2503608,7.16816759 C22.4679282,7.45036017 22.5859243,7.79665625 22.5859243,8.15298221 L22.585,9.899 L10.778,21.971 L9.47580645,21.9713498 C7.69424274,21.9713498 6.25,20.5271071 6.25,18.7455434 L6.25,15.65293 C6.25,13.8713663 7.69424274,12.4271235 9.47580645,12.4271235 L12.787,12.427 L19.9882064,6.87564241 C20.6936617,6.33174431 21.7064627,6.46271229 22.2503608,7.16816759 Z" id="形状结合" fill="').concat(r?"#ffffff":s?"#cccccc":e.backgroundColor,'"></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*I,'px;user-select: none;">静音</div>\n </div>'),l.onclick=function(){var A=t.decoderState.state,i=A.talk,n=A.sound;if(A.play,A.rejection)return!1;console.log("静音"),i?(console.log("结束对讲"),t.setDecoderState({talk:!1,mute:!0},e.backgroundColor),t.jSPlugin.Talk.stopTalk(),t.jSPlugin.openSound()):(console.log("开始对讲"),t.setDecoderState({talk:!0,mute:!1},e.backgroundColor),n&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})),t.jSPlugin.Talk.startTalk())},l;case"hangUp":return l.title="挂断",l.id=A,l.domString='<div style="width: '.concat(.66*I,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width:').concat(.66*I,"px;height: ").concat(.66*I,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.4*I,'px" height="').concat(.4*I,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>挂断</title>\n <g id="icon/挂断" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*I,'px;user-select: none;">挂断</div>\n </div>'),l.onclick=function(){var A=t,e=t.decoderState.state,i=e.talk,n=e.play;if(e.rejection)return!1;i&&(console.log("结束对讲"),t.setDecoderState({talk:!1}),t.jSPlugin.Talk.stopTalk()),n&&(t.jSPlugin.stop(),t.setDecoderState({play:!n})),(n||i)&&(A.miniRecCloseClick(),console.log("挂断"),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp"))},l;default:return l}}},{key:"answerOvertime",value:function(){this.toastCustom.initToastContent("应答超时");var A=this.decoderState.state.play;console.log("应答超时"),A&&this.jSPlugin.stop(),this.setDecoderState({play:!1,rejection:!0}),this.miniRecCloseClick(),this.rejectionStatusDispose(),this.quickReplyEle&&this.quickReplyEle.closeQuickReplyEle(),"function"==typeof this.jSPlugin.hangUpCallback&&this.jSPlugin.hangUpCallback("rejection")}},{key:"rejectionStatusDispose",value:function(){var A=this,e=this.themeData.footer,t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")),n=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")),a=document.getElementById("header-".concat(this.bellStatus,"-ringStatus"));"onBell"==this.bellStatus?(t.innerHTML="",n.innerHTML="",t.style.color="#2C2C2C"):(i.innerHTML="",i.style.color="#2C2C2C"),console.log("rejectionStatusDispose"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),a.innerText="通话已结束",this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:!0,type:2})}},{key:"userNoDevice",value:function(){var A=this;this.removeBellRing(),this.setDecoderState({rejection:!0});var e=this.themeData.footer,t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")),n=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn"));"onBell"==this.bellStatus?(t.innerHTML="",n.innerHTML="",t.style.color="#2C2C2C"):(i.innerHTML="",i.style.color="#2C2C2C"),console.log("userNoDevice"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"该用户不拥有该设备",color:"white",isMobile:!0,type:2})}},{key:"renderHeader",value:function(A,e){var t=this,i=this.matchBtn(A,e);if(document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content"))){var n=document.createElement("span");n.innerHTML="".concat(i.domString),document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content")).appendChild(n)}else{var a=document.createElement("div");a.id="".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus),a.style="max-width:50%;position:relative;",a.innerHTML='<span id="'.concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,'-content" style="display:inline-block;height:auto;";>\n ').concat(i.domString,"\n </span>"),a.onclick=function(A){if(t.decoderState.state.isEditing)return!1;i.onclick(A)},document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(a)}}},{key:"renderFooter",value:function(A,e){var t=this,i=this.decoderState.state.mute;if("remoteUnlock"==A&&this.jSPlugin.capacity&&(!this.jSPlugin.capacity.support_unlock||0==this.jSPlugin.capacity.support_unlock))return!1;var n=this.matchBtn(A,e),a=this.videoWidth/4,o=document.createElement("div");if(o.className="theme-icon-item","quickReply"!==n.id&&(o.style="width:".concat(.66*a,"px;padding:0 ").concat(.12*a,"px;box-sizing: content-box;-webkit-tap-highlight-color:transparent;")),o.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-content" title="').concat(n.title,'" style="display: flex;align-items: center;position:relative;">')).concat(n.domString,"</div>")+"</span>",o.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onclick(A)},n.onmouseenter&&(o.onmouseenter=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseenter(A)}),n.onmouseleave&&(o.onmouseleave=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseleave(A)}),"quickReply"!=A){var r=document.createElement("span");r.className="icon-move left",r.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-left" title="左移" style="height: 40px;position: absolute;top: calc(50% - 33px);left: 1px;display: inline-block;border-radius: 2px;overflow: hidden;cursor: pointer;">\n <svg width="10px" height="40px" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-614.000000, -5024.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="箭头左" transform="translate(0.000000, 18.000000)">\n <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(1.000000, 15.000000)" fill="#FFFFFF">\n <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),r.onclick=function(){t.editIcon(n.id,"left","footer")},o.appendChild(r);var s=document.createElement("span");s.className="icon-move right",s.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-right" class="ezuikit-theme-icon" title="右移" style="height: 40px;position: absolute;top: calc(50% - 33px);left: calc(100% - 11px);display: inline-block;border-radius: 2px;overflow: hidden;cursor: pointer;">\n <svg width="10px" height="40px" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-684.000000, -5024.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="箭头右" transform="translate(70.000000, 18.000000)">\n <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(5.500000, 20.000000) scale(-1, 1) translate(-5.500000, -20.000000) translate(2.000000, 15.000000)" fill="#FFFFFF">\n <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),s.onclick=function(){t.editIcon(n.id,"right","footer")},o.appendChild(s)}if("answer"==A||"rejection"==A||"hangUp"==A);else{var g=document.createElement("span");g.className="icon-move close",g.innerHTML='<span id="'.concat(n.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: -6px;right: -2px;cursor: pointer;">\n <svg width="16px" height="16px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-680.000000, -5006.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="关闭1" transform="translate(66.000000, 0.000000)">\n <rect id="矩形" fill-rule="nonzero" x="0" y="0" width="18" height="18"></rect>\n <path d="M9,1.125 C4.65117188,1.125 1.125,4.65117188 1.125,9 C1.125,13.3488281 4.65117188,16.875 9,16.875 C13.3488281,16.875 16.875,13.3488281 16.875,9 C16.875,4.65117188 13.3488281,1.125 9,1.125 Z M11.9074219,11.9917969 L10.7472656,11.9865234 L9,9.90351562 L7.25449219,11.9847656 L6.09257813,11.9900391 C6.01523438,11.9900391 5.95195313,11.9285156 5.95195313,11.8494141 C5.95195313,11.8160156 5.96425781,11.784375 5.98535156,11.7580078 L8.27226563,9.03339844 L5.98535156,6.31054687 C5.96425781,6.28417969 5.95195313,6.25253906 5.95195313,6.21914062 C5.95195313,6.14179687 6.01523438,6.07851562 6.09257813,6.07851562 L7.25449219,6.08378906 L9,8.16679687 L10.7455078,6.08554688 L11.9056641,6.08027344 C11.9830078,6.08027344 12.0462891,6.14179687 12.0462891,6.22089844 C12.0462891,6.25429687 12.0339844,6.2859375 12.0128906,6.31230469 L9.72949219,9.03515625 L12.0146484,11.7597656 C12.0357422,11.7861328 12.0480469,11.8177734 12.0480469,11.8511719 C12.0480469,11.9285156 11.9847656,11.9917969 11.9074219,11.9917969 Z" id="形状" fill="#595959"></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),g.onclick=function(){t.editIcon(n.id,"delete","footer")},o.appendChild(g)}"onCall"==this.bellStatus?document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).appendChild(o):(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).appendChild(o),"quickReply"===n.id&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")).appendChild(o)),this.decoderState.state.isEditing&&"mute"==A&&"onCall"==this.bellStatus&&(0!=this.themeData.customConfig.defaultMicro||i?this.setDecoderState({mute:!1},e.backgroundColor):this.setDecoderState({mute:!0},e.backgroundColor))}},{key:"switchFooter",value:function(A){var e=this.themeData.footer;switch(A){case"onBell":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"))?"none"==document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-btn-quickReply")).style.display="flex"):(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-btn-quickReply")).style.display="flex");break;case"onCall":document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-btn-quickReply")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display="flex",this.themeData&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=e[this.bellStatus].color)}}},{key:"initThemeData",value:function(){var A=this;console.log("-------------initThemeData");var e=this.themeData,t=e.header,i=e.footer,n=this.decoderState.state.isEditing,a=this.videoWidth,o=a/375,r=1.8*a,g=this.jSPlugin.id;if(this.isNeedRenderHeader=bt(t[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderFooter=bt(i[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderHeader)if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width:100%;overflow:hidden;justify-content: center;'></div>");else{var c=document.createElement("div");c.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),c.setAttribute("class","header-controls"),c.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex;width:100%;overflow:hidden;justify-content: center;'></div>"),console.log(this.jSPlugin.height),this.jSPlugin.height;var l=s(s({display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:"100%",position:"relative","margin-bottom":.1*r+"px","align-items":"center","text-align":"center","font-size":"24ox"},"color","#2c2c2c"),"margin-top","6px");c.style=ji(l),document.getElementById("".concat(g,"-wrap")).insertBefore(c,document.getElementById(g));var I=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(I)}),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.jSPlugin.height,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(.2*r,"px"),"onCall"==this.bellStatus?document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls-quickReplyBtn" class="footer-controls" style=\'min-height: ').concat(40*o,"px;margin-bottom: ").concat(40*o,"px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n <div id=\"").concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '):document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls-quickReplyBtn" class="footer-controls" style=\'min-height: ').concat(40*o,"px;margin-bottom: ").concat(40*o,"px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n <div id=\"").concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '));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 d={position:"relative","margin-top":.2*r+"px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%","align-items":"center","font-size":"12px"};C.style=ji(d),C.innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls-quickReplyBtn" class="footer-controls" style=\'min-height: ').concat(40*o,"px;margin-bottom: ").concat(40*o,"px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n <div id=\"").concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '),m(C,document.getElementById(g))}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"))&&t[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderHeader(e.iconId,e)})),this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=i[this.bellStatus].backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=i[this.bellStatus].color,i[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)}))),1!=this.themeData.customConfig.bellPoster||n)this.jSPlugin.setPoster("");else{this.jSPlugin.poster="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg";var h=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(h),A.jSPlugin.setPoster(A.jSPlugin.poster))}),50)}this.activeThemeStatus&&(this.initBellRing(),this.checkIsAppleDevice()||!1?window.addEventListener("touchstart",this.autoPlayRing):window.addEventListener("click",this.autoPlayRing));this.inited=!0,this.getCallDeviceInfo()}},{key:"checkIsAppleDevice",value:function(){var A=navigator.userAgent,e=!!A.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),t=A.indexOf("iPad")>-1,i=A.indexOf("iPhone")>-1||A.indexOf("Mac")>-1;return!!(e||t||i)}},{key:"renderThemeData",value:function(){var A=this,e=this.themeData,t=e.header,i=e.footer,n=this.decoderState.state.isEditing;if(this.isNeedRenderHeader&&t&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=t[this.bellStatus].color.replace("-diy",""),t[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId]))}))),this.isNeedRenderFooter&&i)document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=i[this.bellStatus].backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=i[this.bellStatus].color.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=i[this.bellStatus].color.replace("-diy",""),i[this.bellStatus].btnList.map((function(e,t){if(e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId])),console.log("-------------activeThemeStatus"),0==t&&!A.themeInited&&A.activeThemeStatus)var i=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(i),1!=A.themeData.customConfig.bellPoster||n?A.jSPlugin.play():A.jSPlugin.pluginStatus.loadingClear(),A.themeInited=!0)}),50)})),-1!==this.jSPlugin.url.indexOf("hd.live")&&this.setDecoderState({hd:!0}),this.themeData.autoFocus>0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",(function(){A.stopAutoFocus()}))),this.setDecoderState({cloudRec:"cloud.rec"===_(this.jSPlugin.url).type,rec:"rec"===_(this.jSPlugin.url).type,type:_(this.jSPlugin.url).type});else if(!this.themeInited&&this.activeThemeStatus)var a=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(a),A.themeData&&A.themeData.customConfig&&1==A.themeData.customConfig.bellPoster&&!n?A.jSPlugin.pluginStatus.loadingClear():A.jSPlugin.play(),A.themeInited=!0)}),50);var o=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(o),A.jSPlugin.reSize(A.jSPlugin.params.width,A.jSPlugin.params.height))}),50);n||this.jSPlugin.isWebConsole?1==this.themeData.customConfig.miniWinRec?this.initMiniImageRec():this.miniRecCloseClick():setTimeout((function(){"onBell"==A.bellStatus&&A.jSPlugin.capacity&&1==A.jSPlugin.capacity.support_doorcall_playback&&(console.log("小窗口initMiniRec-------------设备能力集成功"),1==A.themeData.customConfig.miniWinRec&&(console.log("小窗口initMiniRec---------------画中画设置已开启"),(!A.deviceInfoData||A.deviceInfoData&&!A.deviceInfoData.isEncrypt)&&(console.log("小窗口initMiniRec---------------设备未加密"),A.miniRecNum=0,A.initMiniRec())))}),1e3)}},{key:"setThemeData",value:function(A,e){this.themeData=A,"onCall"==e&&(this.bellStatus="onCall")}},{key:"startAutoFocus",value:function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById("".concat(A.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.pointerEvents="none")}),1e3*e)}},{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:"editIcon",value:function(A,e,t){console.log("编辑组件",A,e,t);var i=this.themeData;console.log("themeData",this.themeData);var n=this.themeData[t][this.bellStatus].btnList,a=bt(n,(function(e){return e.iconId===A})),o=n[a];switch(e){case"delete":n[a].isrender=0;break;case"right":for(var r=-1,s=a+1;s<n.length;s++)if(n[s].part===n[a].part&&1==n[s].isrender){r=s;break}-1!==r&&(n[a]=n[r],n[r]=o);break;case"left":for(var g=-1,c=a-1;c>=0;c--)if(n[c].part===n[a].part&&1==n[c].isrender){g=c;break}-1!==g&&(n[a]=n[g],n[g]=o)}console.log("new btnList",n),i[t][this.bellStatus].btnList=n,this.jSPlugin.Theme.changeTheme(i)}},{key:"countTime",value:function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='<span class="dot"></span><span class="value">00:00</span>',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",o="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),o=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?o+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))}},{key:"editStart",value:function(A){console.log("----------editStart1");var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));document.getElementById("".concat(this.jSPlugin.id,"-headControl")),e&&e.setAttribute("class","footer-controls themeEditing"),t&&t.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})}},{key:"editEnd",value:function(A){console.log("----------editEnd1");var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-headControl")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));t&&t.setAttribute("class","header-controls"),e&&e.setAttribute("class","footer-controls"),i&&i.setAttribute("class","footer-controls")}},{key:"fetchThemeData",value:function(A){var e=this;switch(this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"miniRec":break;default:Di(this.jSPlugin,A,(function(A){0==A.meta.code&&A.data?(e.activeThemeStatus=!0,e.themeData=A.data,A.data.header&&(e.themeData.header=A.data.header,e.themeData.header[e.bellStatus].btnList=e.themeData.header[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),A.data.footer&&(e.themeData.footer=A.data.footer,e.themeData.footer[e.bellStatus].btnList=e.themeData.footer[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.jSPlugin.capacity?(e.initThemeData(),e.renderThemeData()):setTimeout((function(){e.initThemeData(),e.renderThemeData()}),300)):(e.activeThemeStatus=!1,e.jSPlugin.pluginStatus.loadingClear(),e.setDecoderState({rejection:!0}),"111021"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"无效的模板id",color:"#fff",type:1}),e.activeThemeStatusTxt="无效的模板id"):"111023"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"您的试用特权已到期,需前往轻应用控制台购买后使用。",color:"#fff",type:1}),e.activeThemeStatusTxt="试用特权已到期"):(e.jSPlugin.pluginStatus.loadingSetText({text:"模板未激活,请先在开放平台轻应用控制台购买模板",color:"#fff",type:1}),e.activeThemeStatusTxt="模板未激活"),e.themeData=Oi,e.initThemeData(),e.renderThemeData())}),(function(){e.renderThemeData()}))}}},{key:"getCallDeviceInfo",value:function(){var A=this;this.videoWidth,Gi({accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,deviceSerial:_(this.jSPlugin.url).deviceSerial}).then((function(e){e.data&&(A.deviceInfoData=e.data,e.data.isEncrypt&&(console.log("小窗口miniRecCloseClick------------设备已加密"),A.miniRecCloseClick(),setTimeout((function(){A.jSPlugin.pluginStatus.loadingClear(),A.jSPlugin.pluginStatus.loadingSetText({text:"视频已加密",color:"#fff"})}),1e3)),document.getElementById("header-".concat(A.bellStatus,"-deviceCategory"))&&(document.getElementById("header-".concat(A.bellStatus,"-deviceCategory")).innerText=""+e.data.deviceName))})).catch((function(e){console.log("获取设备信息失败",e),20018!=e.code||A.jSPlugin.isWebConsole||A.userNoDevice()}))}},{key:"setHeaderText",value:function(A){console.log("setHeaderText");var e=this.videoWidth/375||1;document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content"))&&(document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content")).innerHTML='<span style="font-size: '.concat(24*e,'px;display: block">').concat(A,'</span><span style="font-size: ').concat(14*e,"px;padding-top: ").concat(5*e,'px;display: block;">').concat(this.deviceInfoData&&this.deviceInfoData.category||"","</span>"))}}])}(),Zi=function(){return o((function A(e){if(t(this,A),this.jSPlugin=e,this.videoWidth=e.width,this.autoFocus=0,this.autoFocusTimer=null,this.decoderState={state:{isEditing:!1,play:!1,sound:!1,recordvideo:!1,recordCount:"00:00",talk:!1,mute:!1,rejection:!1,cloudRec:"cloud.rec"===_(e.url).type,rec:"rec"===_(e.url).type,type:_(e.url).type}},console.log("matchEzopenUrl(jSPlugin.url)",_(e.url),this.decoderState.state),this.isMobile=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i),void 0!==e.isMobile&&(this.isMobile=e.isMobile),this.themeData={},"themeData"==this.jSPlugin.themeId&&(this.themeData=this.jSPlugin.params.themeData),this.jSPlugin.themeId)if(this.isMobile?this.call=new Wi(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState):this.call=new Ji(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState),"themeData"===this.jSPlugin.themeId)this.themeData=this.jSPlugin.params.themeData,this.call.initThemeData(),this.call.renderThemeData();else this.call.fetchThemeData(this.jSPlugin.themeId);this.jSPlugin.Talk||(this.jSPlugin.Talk=new li(this.jSPlugin)),f("".concat(this.jSPlugin.staticPath,"/speed/speed.css")),f("".concat(this.jSPlugin.staticPath,"/css/theme.css"))}),[{key:"changeTheme",value:function(A){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"onBell";if("string"==typeof A)switch(this.jSPlugin.themeId=A,this.jSPlugin.themeId){case"pcLive":case"mobileCall":case"webCall":this.call.initThemeData(),this.call.renderThemeData();break;default:this.call.fetchThemeData(A)}else"object"===d(A)&&(this.themeData=A,this.call.setThemeData(A,t),this.call.initThemeData(),this.call.renderThemeData(),this.decoderState.state.isEditing&&e&&this.call.editStart());this.jSPlugin&&this.jSPlugin.handleThemeChange&&this.jSPlugin.handleThemeChange(A)}},{key:"setDecoderState",value:function(A,e){var t=this,i=this.themeData;i.header,i.footer,Object.keys(A).map((function(i){if("mute"===i)document.getElementById("".concat(t.jSPlugin.id,"-icon-mute"))&&(console.log("mute"),A[i]?(document.getElementById("".concat(t.jSPlugin.id,"-icon-mute")).style.background=e,document.getElementById("".concat(t.jSPlugin.id,"-icon-mute")).style.border=" 1px solid ".concat(e),document.getElementById("icon-mute-path").style.fill="#ffffff"):(document.getElementById("".concat(t.jSPlugin.id,"-icon-mute")).style.background="#ffffff",document.getElementById("".concat(t.jSPlugin.id,"-icon-mute")).style.border="1px solid ".concat(e),document.getElementById("icon-mute-path").style.fill=e));t.decoderState.state=Object.assign(t.decoderState.state,A)}))}},{key:"startAutoFocus",value:function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById("".concat(A.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.pointerEvents="none")}),1e3*e)}},{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:"editIcon",value:function(A,e,t){console.log("编辑组件",A,e,t);var i=this.themeData;console.log("themeData",this.themeData);var n=this.themeData[t].btnList,a=bt(n,(function(e){return e.iconId===A})),o=n[a];switch(e){case"delete":if("rec"===A){if(-1===bt(n,(function(A){return"cloudRec"===A.iconId&&1==A.isrender})))return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1}else if("cloudRec"===A&&-1===bt(n,(function(A){return"rec"===A.iconId&&1==A.isrender})))return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1;n[a].isrender=0;break;case"right":for(var r=-1,s=a+1;s<n.length;s++)if(n[s].part===n[a].part&&1==n[s].isrender){r=s;break}-1!==r&&(n[a]=n[r],n[r]=o);break;case"left":for(var g=-1,c=a-1;c>=0;c--)if(n[c].part===n[a].part&&1==n[c].isrender){g=c;break}-1!==g&&(n[a]=n[g],n[g]=o)}console.log("new btnList",n),i[t].btnList=n,this.changeTheme(i)}},{key:"countTime",value:function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='<span class="dot"></span><span class="value">00:00</span>',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",o="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),o=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?o+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))}},{key:"editStart",value:function(A){var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")),i=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));i&&i.setAttribute("class","header-controls themeEditing"),e&&e.setAttribute("class","footer-controls themeEditing"),t&&t.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})}},{key:"editEnd",value:function(A){var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));t&&t.setAttribute("class","header-controls"),e&&e.setAttribute("class","footer-controls"),this.setDecoderState({isEditing:!1})}},{key:"setDisabled",value:function(A){}},{key:"getDeviceInfo",value:function(){var A=this,e=this.videoWidth/1024||1;Gi({accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,deviceSerial:_(this.jSPlugin.url).deviceSerial}).then((function(t){200==t.code&&t.data&&document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content"))&&(document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content")).style.maxWidth="100%",document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content")).style.overflow="hidden",document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content")).style.textOverflow="ellipsis",document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content")).style.whiteSpace="nowrap",document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content")).innerHTML='<span style="font-size: '.concat(32*e,'px;display: block">有人按门铃</span><span style="font-size: ').concat(24*e,"px;padding-top: ").concat(16*e,'px;display: block;">').concat(t.data.category,"</span>"))})).catch((function(A){console.log("获取设备信息失败",A)}))}}])}(),Xi=function(){return o((function A(e){t(this,A),this.jSPlugin=e;var i=window["EZUIKIT_TIMER_INTERVAL_".concat(e.id)];i&&Object.keys(i).length>0&&this.resetTimer(),window["EZUIKIT_TIMER_INTERVAL_".concat(e.id)]={}}),[{key:"createInterval",value:function(A,e,t){window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)][A]=setInterval(e,t)}},{key:"clearTimer",value:function(A){var e=window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)];e[A]&&(clearInterval(e[A]),delete e[A])}},{key:"resetTimer",value:function(){var A=window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)];for(var e in A)clearInterval(A[e]),delete A[e]}}])}(),qi=o((function A(e){var i=this;t(this,A),s(this,"initMap",(function(){var A=i,e=i.videoWidth,t=i.videoHeight;if(document.getElementById("".concat(i.jSPlugin.id,"-miniRecbox")))document.getElementById("".concat(i.jSPlugin.id,"-wrap")).removeChild(document.getElementById("".concat(i.jSPlugin.id,"-miniRecbox"))),i.initMap();else{var n=document.createElement("div");n.id="".concat(i.jSPlugin.id,"-miniRecbox"),n.style=";position: absolute; bottom:96px;right:".concat(i.jSPlugin.inspectVideoWidth,"px;"),n.innerHTML='<div id="'.concat(i.jSPlugin.id,'-mapbox" style="\n width: ').concat(.3333*e,"px;\n height: ").concat(.3333*t,'px;\n "></div>'),document.getElementById("".concat(i.jSPlugin.id,"-wrap")).insertBefore(n,document.getElementById("".concat(i.jSPlugin.id,"-ez-iframe-footer-container"))),A.map=A.loadMap("".concat(i.jSPlugin.id,"-mapbox"))}return A.map})),s(this,"loadMap",(function(A){var e=new BMapGL.Map(A);return e.centerAndZoom(new BMapGL.Point(116.297611,40.047363),15),e.enableScrollWheelZoom(!0),e})),s(this,"createCircle",(function(A,e,t,n){var a=new BMapGL.Point(A,e),o=new BMapGL.Marker(a,{title:n});if(i.map.addOverlay(o),0!=t){var r=new BMapGL.Circle(new BMapGL.Point(A,e),t,{strokeColor:"#ff4d4f",strokeWeight:4,strokeOpacity:1,strokeStyle:"dashed",fillOpacity:0});i.map.addOverlay(r)}})),s(this,"createInspectPoints",(function(A){A.map((function(A){i.createCircle(A.longitude,A.latitude,A.radius,A.inspectPointName)}))})),s(this,"createPolygon",(function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#407AFF",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"solid",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"407AFF",r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=[];A.split(";").map((function(A){var e=A.split(",");s.push(new BMapGL.Point(e[0],e[1]))})),i.inspectRange=new BMapGL.Polygon(s,{strokeColor:e,strokeWeight:n,strokeOpacity:a,strokeStyle:t,fillOpacity:r,fillColor:o}),i.map.addOverlay(i.inspectRange)})),s(this,"createTrack",(function(A){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#18C796",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"solid",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,g=arguments.length>8&&void 0!==arguments[8]?arguments[8]:500,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,l=arguments.length>10&&void 0!==arguments[10]&&arguments[10],I=[];if(A.map((function(A){var e=!1;i.currentTrack.length>0&&i.currentTrack.map((function(t){t.longitude===A.longitude&&t.latitude===A.latitude&&t.reportTime===A.reportTime&&(e=!0)})),e||(0==I.length&&i.currentTrack.length>0&&I.push(new BMapGL.Point(i.currentTrack[i.currentTrack.length-1].longitude,i.currentTrack[i.currentTrack.length-1].latitude)),I.push(new BMapGL.Point(A.longitude,A.latitude)))})),0!=I.length){var C=new BMapGL.Polyline(I,{strokeColor:t,strokeWeight:a,strokeOpacity:o,strokeStyle:n,fillOpacity:r});if(e?(i.map.addOverlay(C),i.map.centerAndZoom(I[I.length-1],15)):(i.trackAni=new BMapGLLib.TrackAnimation(i.map,C,{overallView:l,tilt:s,duration:g,delay:c}),i.trackAni.start()),i.currentTrack=A,i.currentTrack.length>0&&i.currentTrack.length>0){var d=new BMapGL.Point(i.currentTrack[0].longitude,i.currentTrack[0].latitude);if(i.startPoint=new BMapGL.Marker(d,{icon:new BMapGL.Icon("".concat(i.jSPlugin.staticPath,"/imgs/start.png"),new BMapGL.Size(32,47)),offset:new BMapGL.Size(0,-17)}),i.map.addOverlay(i.startPoint),1==i.currentTrack.length)return;var h=new BMapGL.Point(i.currentTrack[i.currentTrack.length-1].longitude,i.currentTrack[i.currentTrack.length-1].latitude);i.endPoint&&i.map.removeOverlay(i.endPoint),setTimeout((function(){i.endPoint=new BMapGL.Marker(h,{icon:new BMapGL.Icon("".concat(i.jSPlugin.staticPath,"/imgs/end.png"),new BMapGL.Size(30,30))}),i.map.addOverlay(i.endPoint)}),e?0:g)}}})),s(this,"centerToTrack",(function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;i.currentTrack.length>0&&(1==i.currentTrack.length?i.map.centerAndZoom(new BMapGL.Point(i.currentTrack[0].longitude,i.currentTrack[0].latitude),A):i.map.centerAndZoom(new BMapGL.Point(i.currentTrack[i.currentTrack.length-1].longitude,i.currentTrack[i.currentTrack.length-1].latitude),A))})),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.toastCustom=new Ri(e,!1),this.currentTrack=[],this.startPoint=null,this.endPoint=null,this.trackAni=null,this.inspectRange=null,this.map=this.initMap()})),zi=o((function A(e){var i=this;t(this,A),s(this,"init",(function(){var A=i;if(i.videoWidth,i.videoHeight,document.getElementById("".concat(i.jSPlugin.id,"-inspect-global-box")))document.getElementById("".concat(i.jSPlugin.id,"-inspect-global-box"))&&document.getElementById("".concat(i.jSPlugin.id,"-wrap")).removeChild(document.getElementById("".concat(i.jSPlugin.id,"-inspect-global-box"))),A.init();else{var e=document.createElement("div");e.id="".concat(i.jSPlugin.id,"-inspect-global-box"),e.style=";position: absolute; left:0; top: 0; width: 100%; height: 100%; z-index: 10000; background: #fff;",e.innerHTML='<div id="'.concat(i.jSPlugin.id,'-inspect-loading-box" style="\n overflow: auto;\n box-sizing: border-box;\n font-size: 14px;\n color: #595959;\n line-height: 24px;\n font-weight: bold;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n ">\n <div>\n <div style="text-align:center;"><div type="default" class="ezuikit-spin ezuikit-spin-spinning"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div></div>\n <div style="color: #595959; font-size:14px; font-weight: 400; text-align: center;">加载中…</div>\n </div></div>\n '),document.getElementById("".concat(i.jSPlugin.id,"-wrap")).appendChild(e)}})),s(this,"deviceErrorInfo",(function(A,e){var t=Object.assign({tips:"",refreshBtn:"",refreshShow:!1},A);if(document.getElementById("".concat(i.jSPlugin.id,"-no-inspect-box")))document.getElementById("".concat(i.jSPlugin.id,"-no-inspect-box"))&&document.getElementById("".concat(i.jSPlugin.id,"-inspect-global-box")).removeChild(document.getElementById("".concat(i.jSPlugin.id,"-no-inspect-box"))),i.deviceErrorInfo(A,e);else{i.videoHeight;var n=document.createElement("div");n.id="".concat(i.jSPlugin.id,"-no-inspect-box"),n.style="width:100%;height:100%; background: #ffffff; display: flex; justify-content: center; align-items: center",n.innerHTML='<div style="\n overflow: auto;\n box-sizing: border-box;\n font-size: 14px;\n color: #595959;\n text-align: center;\n ">\n <div style="text-align:center; height: 21px;">\n <svg t="1689074472491" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7172" xmlns:xlink="http://www.w3.org/1999/xlink" width="21" height="21"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z" fill="#FF4D4F" p-id="7173"></path></svg>\n </div>\n <div style="color: #595959; font-size:14px; margin: 5px 0 16px;font-weight: 400; text-align: center;">'.concat(t.tips,'</div>\n <button id="').concat(i.jSPlugin.id,'-inspect-device-status-refresh" style="display: ').concat(t.refreshShow?"block":"none",'; width: 80px; margin: 0 auto;" type="button" class="ezuikit-btn ezuikit-btn-primary"><span>').concat(t.refreshBtn,"</span></button>\n </div>\n "),document.getElementById("".concat(i.jSPlugin.id,"-inspect-global-box")).appendChild(n),document.getElementById("".concat(i.jSPlugin.id,"-inspect-device-status-refresh")).addEventListener("click",(function(){e&&e()}))}})),s(this,"globalContainerToggle",(function(A,e){document.getElementById(A)&&(document.getElementById(A).style.display=e?"flex":"none")})),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.toastCustom=new Ri(e,!1),this.init()})),$i=function(){return o((function A(e){t(this,A),this.timer=null;var i={wrapNode:document.body,time:2e3,content:"",type:"info",center:!1,top:8};this.params=c(c({},i),e),this.init()}),[{key:"init",value:function(){var A=this;this.timer=null;var e=this.params,t=e.wrapNode,i=e.content,n=e.time,a=e.type,o=e.center,r=e.top;this.wrapNode=t;var s=document.createElement("div");s.setAttribute("class","ezuikit-message"),o?s.setAttribute("style","top: 50%; transform: translateY(-50%);"):s.setAttribute("style","top: ".concat(r||0,"px;")),this.wrapNode.appendChild(s),this.initMessageContent(a,i,s),0!==n&&(this.timer=setTimeout((function(){A.wrapNode.removeChild(s)}),n||2e3))}},{key:"initMessageContent",value:function(A,e,t){var i=document.createElement("div");i.setAttribute("class","ezuikit-message-notice"),i.innerHTML='\n\t\t\t<div class="ezuikit-message-notice-content">\n\t\t\t\t<div class="ezuikit-message-custom-content ezuikit-message-'.concat(A,'">\n\t\t\t\t\t<span role="img" aria-label="check-circle" class="ezdicon ezdicon-check-circle">\n\t\t\t\t\t\t').concat("warning"===A?'<svg fill="currentColor" t="1691567271942" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z"></path></svg>':"","\n\t\t\t\t\t\t").concat("info"===A?'<svg fill="currentColor" t="1691567317943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z"></path></svg>':"","\n\t\t\t\t\t\t").concat("error"===A?'<svg fill="currentColor" t="1691567308585" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m165.376 618.24l-65.92-0.32L512 563.392l-99.328 118.4-66.048 0.32a7.936 7.936 0 0 1-8-8c0-1.92 0.64-3.712 1.92-5.184L470.528 513.92 340.48 359.04a8 8 0 0 1 6.08-13.184l66.112 0.256L512 464.576l99.328-118.4 65.92-0.256c4.48 0 8.064 3.456 8.064 8a8.32 8.32 0 0 1-1.92 5.12l-129.92 154.944 130.048 155.008a8 8 0 0 1-6.08 13.184z"></path></svg>':"","\n\t\t\t\t\t\t").concat("success"===A?'<svg fill="currentColor" viewBox="64 64 896 896" focusable="false" data-icon="check-circle" width="1em" height="1em" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path></svg>':"","\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>").concat(e,"</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t"),t.appendChild(i)}}])}(),An=function(){return o((function A(e){t(this,A),this.params=c(c({},{id:"",width:"100%",height:"100%",preview:!0,showIcon:!0,src:"",alt:"",fallback:"https://img.ys7.com/group32/M00/81/9D/CtxIA2HnrGyADm_jAAAFfWjIDJs811.png"}),e),this.id=Math.random().toString(36).substr(2),this.init()}),[{key:"init",value:function(){var A=this.params,e=A.id,t=A.width,i=A.height,n=A.preview;if(document.getElementById(e)){var a=document.createElement("div");a.setAttribute("class","ezuikit-image"),a.setAttribute("style","width:".concat(t,";height:").concat(i,";")),document.getElementById(e).appendChild(a),this.initImage(a),n&&this.initPreview(a)}}},{key:"previewImg",value:function(){var A=this.params,e=A.src,t=A.alt,i=A.fallback,n=document.createElement("div");n.setAttribute("id",this.id+"-preview"),n.setAttribute("class","ezuikit-image-preview"),n.innerHTML='\n\t\t\t<div class="ezuikit-image-preview-mask"></div>\n\t\t\t<div class="ezuikit-image-preview-img-wrapper">\n\t\t\t\t<div class="ezuikit-image-preview-operations" id="'.concat(this.id,'-ezuikit-image-preview-operations">\n\t\t\t\t\t<div class="ezuikit-image-preview-operations-operation">\n\t\t\t\t\t\t<span role="img" aria-label="close" class="anticon anticon-close ezuikit-image-preview-operations-icon">\n\t\t\t\t\t\t\t<svg viewBox="64 64 896 896" focusable="false" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ezuikit-image-preview-wrap">\n\t\t\t\t\t<div class="ezuikit-image-preview-img-main"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t');var a=document.createElement("img");a.setAttribute("class","ezuikit-image-preview-img"),a.setAttribute("alt",t),a.setAttribute("src",e),a.addEventListener("error",(function(){a.setAttribute("src",i)})),document.body.appendChild(n),n.querySelector(".ezuikit-image-preview-img-main").appendChild(a),document.getElementById(this.id+"-ezuikit-image-preview-operations").addEventListener("click",(function(){document.body.removeChild(n)}))}},{key:"initImage",value:function(A){var e=this.params,t=e.src,i=e.alt,n=e.fallback,a=document.createElement("img");a.setAttribute("class","ezuikit-image-img"),a.setAttribute("alt",i),a.setAttribute("src",t),a.addEventListener("error",(function(){a.setAttribute("src",n)})),A.appendChild(a)}},{key:"initPreview",value:function(A){var e=this,t=this.params.showIcon,i=document.createElement("div");i.setAttribute("class","ezuikit-image-mask"),t&&(i.innerHTML='\n\t\t\t\t<div class="ezuikit-image-mask-info">\n\t\t\t\t\t<span class="ezuikit-image-anticon-eye">\n\t\t\t\t\t\t<svg viewBox="64 64 896 896" focusable="false" data-icon="eye" width="1em" height="1em" aria-hidden="true"><path d="M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"></path></svg>\n\t\t\t\t\t\t预览\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t'),A.appendChild(i),A.onclick=function(){e.previewImg()}}}])}(),en=function(){return o((function A(e){t(this,A),this.params=c(c({},{id:"",parentNodeId:"",title:"",content:"",placement:"top",cancelText:"取消",arrowPointAtCenter:!1,okText:"确定",onCancel:function(){},onConfirm:function(){}}),e),this.initState=!1,this.init(e)}),[{key:"init",value:function(){var A=this,e=this.params,t=e.id,i=e.content,n=e.placement,a=e.title,o=document.getElementById(t);if(o){var r=document.createElement("div");if(r.setAttribute("id",t+"-popover"),r.setAttribute("class","ezuikit-popover"),r.setAttribute("style","display:none;"),r.innerHTML='\n\t\t\t\t\t<div class="ezuikit-popover-arrow">\n\t\t\t\t\t\t<span class="ezuikit-popover-arrow-content"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ezuikit-popover-inner">\n\t\t\t\t\t\t'.concat(a?'<div class="ezuikit-popover-title">'.concat(a,"</div>"):"",'\n\t\t\t\t\t\t<div class="ezuikit-popover-inner-content">').concat(i,"</div>\n\t\t\t\t\t</div>\n\t\t\t\t"),!document.getElementById(t+"-popover")){var s=document.body;this.params.parentNodeId&&(s=document.getElementById(this.params.parentNodeId)),s.appendChild(r),this.renderPopover(r,o,n)}document.body.addEventListener("click",(function(e){A.addEventListenerFn(e)}))}}},{key:"addEventListenerFn",value:function(A){var e=this.params.id,t=document.getElementById(e),i=document.getElementById(e+"-popover");t&&A.target!==t&&!t.contains(A.target)&&i&&A.target!==i&&!i.contains(A.target)&&this.hidePopover()}},{key:"hidePopover",value:function(){var A=this.params.id,e=document.getElementById(A+"-popover");e&&document.body.removeChild(e)}},{key:"renderPopover",value:function(A,e,t,i,n){A.style.display="block";var a=e.getBoundingClientRect(),o=a.top,r=a.left,s=a.width,g=a.height,c=A.getBoundingClientRect(),l=c.width,I=c.height;i&&(l=i),n&&(I=n);var C=document.body;this.params.parentNodeId&&(C=document.getElementById(this.params.parentNodeId));var d=this.params.arrowPointAtCenter,h=0,B=0,u=A.getElementsByClassName("ezuikit-popover-arrow")[0],E=u.getBoundingClientRect(),f=E.width,Q=E.height;if(d){var x=0,p=0;switch(t){case"top":default:x=l/2,p=I;break;case"bottom":x=l/2,p=0;break;case"left":x=l,p=I/2;break;case"right":x=0,p=I/2;break;case"topLeft":x=(s-f)/2,p=I;break;case"topRight":x=l-(s+f)/2,p=I;break;case"bottomLeft":x=(s-f)/2,p=0;break;case"bottomRight":x=l-(s+f)/2,p=0;break;case"leftTop":x=l,p=(g-Q)/2;break;case"leftBottom":x=l,p=I-(g+Q)/2;break;case"rightTop":x=0,p=(g-10)/2;break;case"rightBottom":x=0,p=I-(g+Q)/2}u.style.left=x+"px",u.style.top=p+"px"}switch(t){case"top":h=-(I+Q),B=(s-l)/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-top");break;case"bottom":h=g-Q/2,B=(s-l)/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottom");break;case"left":h=(g-I)/2,B=-(l+f/2),A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-left");break;case"right":h=(g-I)/2,B=s-f/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-right");break;case"topLeft":h=-(I+Q),B=0,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-topLeft");break;case"topRight":h=-(I+Q),B=s-l,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-topRight");break;case"bottomLeft":h=g-Q/2,B=0,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottomLeft");break;case"bottomRight":h=g-Q/2,B=s-l,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottomRight");break;case"leftTop":h=0,B=-(l+f/2),A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-leftTop");break;case"leftBottom":h=g-I,B=-(l+f/2),A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-leftBottom");break;case"rightTop":h=0,B=s-f/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-rightTop");break;case"rightBottom":h=g-I,B=s-f/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-rightBottom");break;default:h=-I,B=(s-l)/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-top")}var m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft;A.style.top=o+m+h+"px",A.style.left=r+y+B+"px";var _=A.getBoundingClientRect(),S=C===document.body?{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}:C.getBoundingClientRect(),D=t;_.left<S.left&&(D=(D=D.replace("Right","Left")).replace("right","left")),_.right>S.right&&(D=(D=D.replace("Left","Right")).replace("left","right")),_.top<S.top&&(D=(D=D.replace("Top","Bottom")).replace("top","bottom")),_.bottom>S.bottom&&(D=(D=D.replace("Bottom","Top")).replace("bottom","top")),D!==t&&this.renderPopover(A,e,D,l,I)}}])}(),tn=function(){return o((function A(e){t(this,A),this.params=c(c({},{id:"",content:"",placement:"top",cancelText:"取消",arrowPointAtCenter:!1,okText:"确定",onCancel:function(){},onConfirm:function(){}}),e),this.PopconfirmDom=null,this.init(e)}),[{key:"init",value:function(){var A=this,e=this.params,t=e.content,i=e.cancelText,n=e.okText,a=e.onCancel,o=e.onConfirm,r=document.createElement("div");r.innerHTML='\n <div class="ezuikit-confirm">\n <div class="ezuikit-confirm-content">\n\t\t\t\t\t<span class="ezuikit-confirm-icon">\n \t<svg fill="currentColor" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z"></path></svg>\n </span>\n\t\t\t\t\t<span class="ezuikit-confirm-content-label">'.concat(t,'</span>\n </div>\n <div class="ezuikit-popover-buttons"></div>\n </div>\n ');var s=document.createElement("button");s.className="ezuikit-btn ezuikit-cancel-btn",s.innerText=i;var g=document.createElement("button");return g.className="ezuikit-btn ezuikit-ok-btn ezuikit-btn-primary",g.innerText=n,r.querySelector(".ezuikit-popover-buttons").appendChild(s),r.querySelector(".ezuikit-popover-buttons").appendChild(g),this.PopconfirmDom=new en(c(c({},this.params),{},{content:r.innerHTML})),document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-cancel-btn")&&(document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-cancel-btn").onclick=function(){a?a():A.hide()}),document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-ok-btn")&&(document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-ok-btn").onclick=function(){o?o():A.hide()}),this.PopconfirmDom}},{key:"hide",value:function(){this.PopconfirmDom.hidePopover()}}])}(),nn=function(){return o((function A(e){t(this,A),this.params=c(c({},{id:"",width:"100%",height:"100%",preview:!0,poster:"",fallback:"https://img.ys7.com/group32/M00/81/9D/CtxIA2HnrGyADm_jAAAFfWjIDJs811.png",src:""}),e),this.id=Math.random().toString(36).substr(2),this.init()}),[{key:"init",value:function(){var A=this.params,e=A.id,t=A.width,i=A.height,n=A.preview;if(document.getElementById(e)){var a=document.createElement("div");a.setAttribute("class","ezuikit-video"),a.setAttribute("style","width:".concat(t,";height:").concat(i,";")),document.getElementById(e).appendChild(a),this.initVideo(a),n&&this.initPreview(a)}}},{key:"previewVideo",value:function(){var A=this.params.src,e=document.createElement("div");e.setAttribute("id",this.id+"-preview"),e.setAttribute("class","ezuikit-image-video"),e.innerHTML='\n\t\t\t<div class="ezuikit-video-preview-mask"></div>\n\t\t\t<div class="ezuikit-video-preview-img-wrapper">\n\t\t\t\t<div class="ezuikit-video-preview-operations" id="'.concat(this.id,'-ezuikit-video-preview-operations">\n\t\t\t\t\t<div class="ezuikit-video-preview-operations-operation">\n\t\t\t\t\t\t<span role="img" aria-label="close" class="anticon anticon-close ezuikit-video-preview-operations-icon">\n\t\t\t\t\t\t\t<svg viewBox="64 64 896 896" focusable="false" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ezuikit-video-preview-wrap">\n\t\t\t\t\t<div class="ezuikit-video-preview-img-wrapper">\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclass="ezuikit-video-preview-img custom-controls"\n\t\t\t\t\t\t\tsrc="').concat(A,'"\n\t\t\t\t\t\t\tautoplay \n\t\t\t\t\t\t\tcontrols \n\t\t\t\t\t\t\tcontrolslist="nodownload noremoteplayback noplaybackrate"\n\t\t\t\t\t\t\tdisablePictureInPicture\n\t\t\t\t\t\t\tdisableRemotePlayback\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t'),document.body.appendChild(e),document.getElementById(this.id+"-ezuikit-video-preview-operations").addEventListener("click",(function(){document.body.removeChild(e)}))}},{key:"initVideo",value:function(A){var e=this.params,t=e.poster,i=e.fallback,n=document.createElement("img");n.setAttribute("class","ezuikit-video-img"),n.setAttribute("src",t),n.addEventListener("error",(function(){n.setAttribute("src",i)})),A.appendChild(n)}},{key:"initPreview",value:function(A){var e=this,t=document.createElement("div");t.setAttribute("class","ezuikit-video-mask"),t.innerHTML='\n\t\t\t<div class="ezuikit-video-mask-info">\n\t\t\t\t<span class="ezuikit-video-anticon-eye">\n\t\t\t\t\t<svg width="28" height="28" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 28 28" style="enable-background:new 0 0 28 28;" xml:space="preserve">\n\t\t\t\t\t<circle cx="14" cy="14" r="14" style="opacity:0.7;fill-rule:evenodd;clip-rule:evenodd;enable-background:new;"/>\n\t\t\t\t\t<path style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;" d="M18.3,15.2l-5.3,3.3c-0.7,0.4-1.6,0.2-2.1-0.5c-0.1-0.2-0.2-0.5-0.2-0.8v-6.6\n\t\t\t\t\t\tc0-0.8,0.7-1.5,1.5-1.5c0.3,0,0.6,0.1,0.8,0.2l5.3,3.3c0.7,0.4,0.9,1.4,0.5,2.1C18.6,14.9,18.4,15,18.3,15.2z"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t',A.appendChild(t),A.onclick=function(){e.previewVideo()}}}])}(),an=function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:e,page:0},a="".concat(A.env.domain,"/api/service/devicekit/bodycamera/device/trace");ki(a,"GET",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})},on=function(A,e,t,i){var n={accessToken:A.accessToken||A.token.deviceToken.video,deviceSerial:_(A.url).deviceSerial,validateCode:_(A.url).validCode,channelNo:_(A.url).channelNo,evidenceFileType:e},a="".concat(A.env.domain,"/api/service/devicekit/common/file/evidence");ki(a,"POST",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})},rn=function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,taskId:e},a="".concat(A.env.domain,"/api/service/devicekit/opencloud/task/info");ki(a,"GET",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})};var sn=function(){return o((function A(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};t(this,A),this.jSPlugin=e,this.currentEventInfo=i,this.inspectInfo=e.Theme.inspect.inspectInfo,this.type=a,this.timer=n,this.startTime=1e3,this.videoRecordingStatus=!0,this.saveSuccessCallback=o,this.init()}),[{key:"init",value:function(){this.renderEventDetail(),this.eventDetailDomEvent()}},{key:"show",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-wrap")).setAttribute("class","inspect-event-detail-wrap show")}},{key:"hide",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-wrap")).setAttribute("class","inspect-event-detail-wrap"),document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-box")).innerHTML=""}},{key:"validationEventTag",value:function(){return 0==document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).value.length?(document.getElementById("".concat(this.jSPlugin.id,"-event-tag-error")).style.display="block",document.getElementById("".concat(this.jSPlugin.id,"-event-tag-error")).innerHTML="请输入事件标签",document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).setAttribute("class","ezuikit-input input-has-error"),!1):(document.getElementById("".concat(this.jSPlugin.id,"-event-tag-error")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).setAttribute("class","ezuikit-input"),!0)}},{key:"renderVideo",value:function(A,e,t){var i=this;if(document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview")).innerHTML="",1===A||2===A){if(document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview")).innerHTML='\n <div class="video-stroage-exceptional-status-tips-wrap" style="background:url('.concat(this.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n <div class="video-stroage-exceptional-status-icon">\n <div type="default" class="ezuikit-spin ezuikit-spin-sm ezuikit-spin-spinning ezuikit-spin-dot-white"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n </div>\n <span class="video-stroage-exceptional-status-tips">视频正在存储中…</span>\n </div>\n '),1!==this.type){var n=this.currentEventInfo.evidenceId;this.timer.clearTimer("videoRecordingStatusTimer"),this.timer.createInterval("videoRecordingStatusTimer",(function(){rn(i.jSPlugin,n,(function(A){if(A.meta&&200===A.meta.code){var e=A.data,t=e.taskStatus,n=e.fileUrl,a=e.videoCoverPic||"".concat(i.jSPlugin.staticPath,"/imgs/bg.svg");i.renderVideo(t,a,n)}}))}),1e3)}}else 4===A||5===A||6===A||7===A?(document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview")).innerHTML='\n <div class="video-stroage-exceptional-status-tips-wrap video-stroage-exceptional-status-tips-error" style="background:url('.concat(this.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n <div class="video-stroage-exceptional-status-icon">\n <svg fill="currentColor" t="1691567317943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z"></path></svg>\n </div>\n <span class="video-stroage-exceptional-status-tips">视频存储失败</span>\n </div>\n '),this.timer.clearTimer("videoRecordingStatusTimer")):0!==A&&3!==A||(new nn({id:"".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview"),poster:e,fallback:"".concat(this.jSPlugin.staticPath,"/imgs/bg.svg"),src:t}),this.timer.clearTimer("videoRecordingStatusTimer"))}},{key:"renderEventDetail",value:function(){var A=this,e=this.currentEventInfo,t=e.evidenceFileType,i=e.fileUrl,n=e.taskStatus,a=e.videoCoverPic,o=document.createElement("div");o.setAttribute("class","inspectEventDetail");var r="";if(r=1===t?a||"".concat(this.jSPlugin.staticPath,"/imgs/bg.svg"):i||"".concat(this.jSPlugin.staticPath,"/imgs/bg.svg"),o.innerHTML='\n <div class="inspectEventDetail-header">\n <div class="inspectEventDetail-back" id="'.concat(this.jSPlugin.id,'-inspectEventDetail-back">\n <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M605.888 137.344a6.4 6.4 0 0 1 1.472 4.032l0.64 70.784a6.4 6.4 0 0 1-2.368 5.056L281.6 480H876.8v64H279.744l325.376 264a6.4 6.4 0 0 1 2.368 4.928l0.128 69.632a6.4 6.4 0 0 1-10.432 4.992l-422.016-342.4a42.24 42.24 0 0 1-7.04-57.344l3.264-3.904 3.776-3.456 421.76-344a6.4 6.4 0 0 1 8.96 0.896z"></path></svg>\n </div>\n <div class="inspectEventDetail-type">').concat(1===this.type?"编辑":"").concat(0===t?"图片存证":"视频存证",'</div>\n </div>\n <div class="inspectEventDetail-content" style="\n height: ').concat(document.getElementById("".concat(this.jSPlugin.id,"-wrap")).clientHeight-58-158,'px;\n overflow: auto;\n ">\n ').concat(0===t?'<div class="inspectEventDetail-content-img-box">\n <p class="inspectEventDetail-content-img-tips" style="display: '.concat(1==this.type?"none":"blcok",';">图片已取证,请填写存证信息:</p>\n <div class="inspectEventDetail-content-img-detail" id="').concat(this.jSPlugin.id,'-inspectEventDetail-picUrl"></div>\n </div>'):'<div class="inspectEventDetail-content-video-box">\n <div\n id="'.concat(this.jSPlugin.id,'-inspectEventDetail-content-video-timer"\n class="inspectEventDetail-content-video-timer"\n style="display: ').concat(1==this.type?"none":"flex",';"\n >\n <div class="video-recording-time-wrap">\n <svg fill="currentColor" width="10" height="10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 10 10" style="enable-background:new 0 0 10 10;" xml:space="preserve"><circle class="st0" cx="5" cy="5" r="3"/><path class="st1" d="M5,10c-2.8,0-5-2.2-5-5c0-2.8,2.2-5,5-5s5,2.2,5,5C10,7.8,7.8,10,5,10z M5,0.5c-2.5,0-4.5,2-4.5,4.5c0,2.5,2,4.5,4.5,4.5s4.5-2,4.5-4.5C9.5,2.5,7.5,0.5,5,0.5z"/></svg>\n <div id="').concat(this.jSPlugin.id,'-video-recording-time" class="video-recording-time">00:00:00</div>\n </div>\n <button id="').concat(this.jSPlugin.id,'-video-recording-stop-btn" class="inspectEventDetail-stop-btn ezuikit-btn">\n <span style="display:none" class="ezuikit-btn-loading-icon" style=""><span role="img" aria-label="loading" class="anticon anticon-loading anticon-spin"><svg viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></span>\n 停止录制\n </button>\n </div>\n <div id="').concat(this.jSPlugin.id,'-inspectEventDetail-content-video-info" class="inspectEventDetail-content-video-info" style="display: ').concat(1==this.type?"block":"none",';">\n <p class="inspectEventDetail-content-video-tips" style="display: ').concat(1==this.type?"none":"blcok",';">视频已取证:</p>\n <div class="inspectEventDetail-content-video-detail" id="').concat(this.jSPlugin.id,'-inspectEventDetail-videoPreview"></div>\n </div>\n </div>'),'\n <div class="inspectEventDetail-content-info">\n <div class="inspectEventDetail-content-info-item">\n <div class="inspectEventDetail-content-info-item-title">事件时间:</div>\n <div id="').concat(this.jSPlugin.id,'-inspectEventDetail-content-info-time" class="inspectEventDetail-content-info-item-value"></div>\n </div>\n <div class="inspectEventDetail-content-info-item">\n <div class="inspectEventDetail-content-info-item-title">存证人员:</div>\n <div class="inspectEventDetail-content-info-item-value">\n ').concat(1===this.type?this.currentEventInfo.depositaryOfficer?"null"===this.currentEventInfo.depositaryOfficer?"-":this.currentEventInfo.depositaryOfficer:"-":this.inspectInfo.inspectPerson?"null"===this.inspectInfo.inspectPerson?"-":this.inspectInfo.inspectPerson:"-",'\n </div>\n </div>\n <div class="inspectEventDetail-content-info-item">\n <div class="inspectEventDetail-content-info-item-title inspectEventDetail-content-info-item-title-required">事件标签:</div>\n <div class="ezuikit-form-item-control-input">\n <div class="ezuikit-form-item-control-input-content">\n <input\n id="').concat(this.jSPlugin.id,'-event-tag"\n maxlength="32"\n type="text"\n autocomplete="off"\n id="control-ref_note"\n class="ezuikit-input"\n placeholder="请输入事件标签"\n value="').concat(1===this.type&&this.currentEventInfo.eventType||"",'"\n />\n </div>\n <div class="ezuikit-form-item-explain ezuikit-form-item-explain-connected">\n <div id="').concat(this.jSPlugin.id,'-event-tag-error" class="ezuikit-form-item-explain-error" style="display: none">请输入事件标签</div>\n </div>\n </div>\n </div>\n <div class="inspectEventDetail-content-info-item">\n <div class="inspectEventDetail-content-info-item-title">事件备注:</div>\n <div class="ezuikit-input-textarea ezuikit-input-textarea-show-count" data-count="').concat(1===this.type&&this.currentEventInfo.eventRemark?this.currentEventInfo.eventRemark.length:0,' / 100">\n <textarea\n id="').concat(this.jSPlugin.id,'-event-remark"\n maxlength="100"\n class="ezuikit-input"\n maxlength="100"\n placeholder="请输入事件备注"\n autocomplete="off"\n >').concat(1===this.type&&this.currentEventInfo.eventRemark||"",'</textarea>\n </div>\n </div>\n </div>\n </div>\n <div class="inspectEventDetail-footer">\n <button id="').concat(this.jSPlugin.id,'-event-cancel" class="inspectEventDetail-footer-btn ezuikit-btn">取消</button>\n <button id="').concat(this.jSPlugin.id,'-event-ok" class="inspectEventDetail-footer-btn ezuikit-btn ezuikit-btn-primary">保存</button>\n </div>\n '),document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-box")).appendChild(o),1===this.type?document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML="".concat(1===t?this.currentEventInfo.eventBeginTime+" ~ "+this.currentEventInfo.eventEndTime:this.currentEventInfo.eventTime):(document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML="".concat((new Date).Format("yyyy-MM-dd hh:mm:ss")).concat(1===t?" ~ -":""),1===t&&document.getElementById("".concat(this.jSPlugin.id,"-video-recording-time"))&&this.videoRecordingStatus&&(0===this.type&&document.getElementById("".concat(this.jSPlugin.id,"-event-ok")).setAttribute("disabled","disabled"),this.timer.createInterval("videoRecordingTimer",(function(){var e,t,i,n;A.startTime&&(document.getElementById("".concat(A.jSPlugin.id,"-video-recording-time")).innerHTML=(e=A.startTime,t=parseInt(e%864e5/36e5),i=parseInt(e%36e5/6e4),n=parseInt(e%6e4/1e3),(t<10?"0".concat(t):t)+":"+(i<10?"0".concat(i):i)+":"+(n<10?"0".concat(n):n))),A.startTime+=1e3,A.startTime>A.jSPlugin.inspectRecordingDuration&&(document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).click(),A.timer&&A.timer.clearTimer("videoRecordingTimer"))}),1e3))),1===t){var s=this.currentEventInfo&&this.currentEventInfo.fileUrl;this.renderVideo(n,r,s)}else new An({id:"".concat(this.jSPlugin.id,"-inspectEventDetail-picUrl"),src:r,fallback:"".concat(this.jSPlugin.staticPath,"/imgs/fallback.svg"),showIcon:!1});this.show()}},{key:"eventDetailDomEvent",value:function(){var A=this,e=this.currentEventInfo,t=e.evidenceFileType,i=e.evidenceId;document.getElementById("".concat(this.jSPlugin.id,"-event-cancel")).addEventListener("click",(function(e){A.cancelPopover=new tn({id:"".concat(A.jSPlugin.id,"-event-cancel"),content:"确定要取消吗?".concat(1===A.type?"取消后编辑的内容将不会保存。":"取消后对应存证也将删除。"),placement:"topRight",arrowPointAtCenter:!0,onCancel:function(){A.cancelPopover.hide()},onConfirm:function(){1===t&&(A.videoRecordingStatus&&0===A.type&&(A.timer&&A.timer.clearTimer("videoRecordingTimer"),A.startTime=1e3,document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).click()),A.timer.clearTimer("videoRecordingStatusTimer")),A.cancelPopover.hide(),A.hide()}})})),document.getElementById("".concat(this.jSPlugin.id,"-event-ok")).addEventListener("click",(function(){if(A.validationEventTag()){var e=A.currentEventInfo,t=e.evidenceFileType,i=e.evidenceId,n=A.inspectInfo,a=n.inspectRecordId,o=n.inspectPerson,r=document.getElementById("".concat(A.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML,s={inspectRecordId:a,depositaryOfficer:o,evidenceFileId:i,evidenceFileType:t,eventType:document.getElementById("".concat(A.jSPlugin.id,"-event-tag")).value,eventRemark:document.getElementById("".concat(A.jSPlugin.id,"-event-remark")).value};1===t&&(s.eventBeginTime=r.split("~")[0].trim(),s.eventEndTime=r.split("~")[1].trim(),A.timer.clearTimer("videoRecordingStatusTimer")),0===t&&(s.eventTime=r),1===A.type&&(s.inspectEventId=A.currentEventInfo.inspectEventId,delete s.depositaryOfficer,delete s.eventTime,delete s.eventBeginTime,delete s.eventEndTime,delete s.evidenceFileId,delete s.evidenceFileType,function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:"",inspectEventId:"",eventType:"",eventRemark:""},a=Object.assign(n,e),o="".concat(A.env.domain,"/api/service/devicekit/bodycamera/inspect/event/update");ki(o,"POST",a,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A.jSPlugin,s,(function(e){e.meta&&200===e.meta.code?(A.hide(),A.saveSuccessCallback&&A.saveSuccessCallback({eventType:s.eventType,eventRemark:s.eventRemark})):new $i({type:"error",content:"保存失败,".concat(e.meta&&e.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){new $i({type:"error",content:"保存失败,请稍后重试!",wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}))),0===A.type&&function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:"",eventType:"",evidenceFileId:"",eventTime:"",eventBeginTime:"",eventEndTime:"",depositaryOfficer:"",eventRemark:"",evidenceFileType:""},a=Object.assign(n,e),o="".concat(A.env.domain,"/api/service/devicekit/bodycamera/inspect/event");ki(o,"POST",a,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A.jSPlugin,s,(function(e){e.meta&&200===e.meta.code?(A.hide(),A.saveSuccessCallback&&A.saveSuccessCallback()):new $i({type:"error",content:"保存失败,".concat(e.meta&&e.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){new $i({type:"error",content:"保存失败,请稍后重试!",wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}))}})),document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-back")).addEventListener("click",(function(){A.backPopover=new tn({id:"".concat(A.jSPlugin.id,"-inspectEventDetail-back"),content:"确定要返回吗?".concat(1===A.type?"返回后编辑的内容将不会保存。":"返回后对应存证也将删除。"),placement:"bottomRight",arrowPointAtCenter:!0,onCancel:function(){A.backPopover.hide()},onConfirm:function(){1===t&&(A.videoRecordingStatus&&0===A.type&&(A.timer&&A.timer.clearTimer("videoRecordingTimer"),A.startTime=1e3,document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).click()),A.timer.clearTimer("videoRecordingStatusTimer")),A.backPopover.hide(),A.hide()}})})),document.getElementById("".concat(this.jSPlugin.id,"-video-recording-stop-btn"))&&document.getElementById("".concat(this.jSPlugin.id,"-video-recording-stop-btn")).addEventListener("click",(function(){document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn ezuikit-btn-loading"),document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).querySelector(".ezuikit-btn-loading-icon").style.display="inline-block",function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,taskId:e},a="".concat(A.env.domain,"/api/v3/open/cloud/video/frame/stop");ki(a,"POST",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A.jSPlugin,i,(function(e){document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn"))&&(document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn"),document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).querySelector(".ezuikit-btn-loading-icon").style.display="none"),e.meta&&200===e.meta.code?rn(A.jSPlugin,i,(function(e){if(e.meta&&200===e.meta.code){var t=e.data,i=t.taskStatus,n=t.fileUrl,a=t.videoCoverPic;A.timer&&A.timer.clearTimer("videoRecordingTimer");var o=a||"".concat(A.jSPlugin.staticPath,"/imgs/bg.svg");A.renderVideo(i,o,n),document.getElementById("".concat(A.jSPlugin.id,"-inspectEventDetail-content-video-info")).style.display="block",document.getElementById("".concat(A.jSPlugin.id,"-inspectEventDetail-content-video-timer")).style.display="none";var r=document.getElementById("".concat(A.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML;document.getElementById("".concat(A.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML="".concat(r.split("~")[0]," ~ ").concat((new Date).Format("yyyy-MM-dd hh:mm:ss")),A.videoRecordingStatus=!1,document.getElementById("".concat(A.jSPlugin.id,"-event-ok")).removeAttribute("disabled")}})):new $i({type:"error",content:"停止录制失败,请稍后重试!",wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn"))&&(document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn"),document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).querySelector(".ezuikit-btn-loading-icon").style.display="none"),new $i({type:"error",content:"停止录制失败,请稍后重试!",wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}))})),document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).addEventListener("input",(function(){A.validationEventTag()})),document.getElementById("".concat(this.jSPlugin.id,"-event-remark")).addEventListener("input",(function(A){var e=A.target.value;A.target.parentNode.setAttribute("data-count","".concat(e.length," / 100"))})),document.getElementById("".concat(this.jSPlugin.id,"-event-remark")).addEventListener("focus",(function(A){A.target.parentNode.setAttribute("class","ezuikit-input-textarea ezuikit-input-textarea-show-count ezuikit-input-textarea-focus")})),document.getElementById("".concat(this.jSPlugin.id,"-event-remark")).addEventListener("blur",(function(A){A.target.parentNode.setAttribute("class","ezuikit-input-textarea ezuikit-input-textarea-show-count")}))}}])}(),gn=function(){return o((function A(e,i,n){var a=this;t(this,A),s(this,"hideDelEConfirm",(function(){for(var A=0;A<a.delEConfirmList.length;A++)a.delEConfirmList[A].hide()})),s(this,"initRender",(function(){var A=a;if(document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")))document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box"))&&document.getElementById("".concat(a.jSPlugin.id,"-wrap")).removeChild(document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box"))),A.initRender();else{var e=document.createElement("div");e.id="".concat(a.jSPlugin.id,"-inspect-event-box"),e.setAttribute("class","inspect-event-box");var t=0;document.getElementById("".concat(a.jSPlugin.id,"-inspectInfoControl"))&&(t=document.getElementById("".concat(a.jSPlugin.id,"-inspectInfoControl")).clientHeight),e.style="background: #fff;position: absolute;right: 0;bottom: 0; top:".concat(t,"px;"),e.innerHTML='\n <div id="'.concat(a.jSPlugin.id,'-inspect-event-list-box" style="\n width: 290px;\n height: 100%;\n overflow: hidden;\n padding: 0;\n box-sizing: border-box;\n ">\n <h1 style="\n font-size: 16px;\n color: #262626;\n line-height: 24px;\n font-weight: bold;\n margin: 16px 16px 0;\n ">巡检事件</h1>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-btn-wrap" style="\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 16px;\n ">\n <div>\n <button\n id="').concat(a.jSPlugin.id,'-inspect-event-img"\n style="min-width: 88px; margin: 0 auto;"\n type="button"\n class="ezuikit-btn ezuikit-btn-primary"\n >\n <span style="display:none" class="ezuikit-btn-loading-icon" style=""><span role="img" aria-label="loading" class="anticon anticon-loading anticon-spin"><svg viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></span>\n 图片存证\n </button>\n <button\n id="').concat(a.jSPlugin.id,'-inspect-event-video"\n style="min-width: 88px; margin: 0 auto;"\n type="button"\n class="ezuikit-btn ezuikit-btn-primary"\n >\n <span style="display:none" class="ezuikit-btn-loading-icon" style=""><span role="img" aria-label="loading" class="anticon anticon-loading anticon-spin"><svg viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></span>\n 视频存证</button>\n </div>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-list-refresh" style="\n width: 17px;\n height: 32px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n ">\n <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="13" height="13" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path fill="currentColor" d="M960 416V192l-73.056 73.056a447.712 447.712 0 0 0-373.6-201.088C265.92 63.968 65.312 264.544 65.312 512S265.92 960.032 513.344 960.032a448.064 448.064 0 0 0 415.232-279.488 38.368 38.368 0 1 0-71.136-28.896 371.36 371.36 0 0 1-344.096 231.584C308.32 883.232 142.112 717.024 142.112 512S308.32 140.768 513.344 140.768c132.448 0 251.936 70.08 318.016 179.84L736 416h224z"></path>\n </svg>\n </div>\n </div>\n <div\n id="').concat(a.jSPlugin.id,'-inspect-loading"\n class="inspect-loading"\n style="\n height: calc(100% - 104px);\n position: absolute; bottom: 0; right: 0;background: #fff; bottom: 0; right: 0; z-index: 99; width: 100%; align-items: center; justify-content: center;\n display: ').concat(a.listLoading?"flex":"none",'\n ">\n <div type="default" class="ezuikit-spin ezuikit-spin-spinning"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n </div>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-list-nodata-wrap" style="\n display: none;\n height: calc(100% - 104px);\n text-align: center;overflow: auto;\n "> \n <img style="width: 85px;height: 85px; margin: 120px auto 0;" src="').concat(a.jSPlugin.staticPath,'/imgs/empty.png" />\n <p style="font-size: 14px;color: #595959;text-align: center;line-height: 22px;margin: 0;">暂无事件</p>\n </div>\n <div class="inspect-event-list-wrap" id="').concat(a.jSPlugin.id,'-inspect-event-list-wrap"\n style="display: none; height: calc(100% - 104px); overflow-x: hidden; overflow-y: auto; padding-top: 4px; box-sizing: border-box; ">\n <div id="').concat(a.jSPlugin.id,'-inspect-event-list-wrap-main"></div>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-list-more-loading" style="display: none;align-items: center;justify-content: center;" class="inspect-event-list-more-loading">\n <div type="default" class="ezuikit-spin ezuikit-spin-spinning"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n </div>\n </div>\n </div>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-detail-wrap" class="inspect-event-detail-wrap" style="\n height: 100%;\n ">\n <h1 style="\n font-size: 16px;\n color: #262626;\n line-height: 24px;\n font-weight: bold;\n margin: 16px 16px 0;\n ">巡检事件</h1>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-detail-box"></div>\n </div>\n '),document.getElementById("".concat(a.jSPlugin.id,"-wrap")).appendChild(e),a.jSPlugin.Theme.decoderState.state.play?a.enableEvidenceBtn():a.disableEvidenceBtn(),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).onclick=function(){a.listLoading||a.startEvidence||(a.startEvidence=!0,a.hideDelEConfirm(),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).setAttribute("class","ezuikit-btn ezuikit-btn-primary ezuikit-btn-loading"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).querySelector(".ezuikit-btn-loading-icon").style.display="inline-block",on(a.jSPlugin,0,(function(A){a.startEvidence=!1,document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).querySelector(".ezuikit-btn-loading-icon").style.display="none",A.meta&&200===A.meta.code?new sn(a.jSPlugin,A.data,a.timer,0,(function(){a.initEvent(),new $i({type:"success",content:"保存成功",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})})):new $i({type:"error",content:"图片存证失败,".concat(A.meta&&A.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){a.startEvidence=!1,document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).querySelector(".ezuikit-btn-loading-icon").style.display="none",new $i({type:"error",content:"图片存证失败,请稍后重试!",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})})))},document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).onclick=function(){a.listLoading||a.startEvidence||(a.startEvidence=!0,a.hideDelEConfirm(),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).setAttribute("class","ezuikit-btn ezuikit-btn-primary ezuikit-btn-loading"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).querySelector(".ezuikit-btn-loading-icon").style.display="inline-block",on(a.jSPlugin,1,(function(A){a.startEvidence=!1,document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).querySelector(".ezuikit-btn-loading-icon").style.display="none",A.meta&&200===A.meta.code?new sn(a.jSPlugin,A.data,a.timer,0,(function(){a.initEvent(),new $i({type:"success",content:"保存成功",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})})):new $i({type:"error",content:"视频存证失败,".concat(A.meta&&A.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){a.startEvidence=!1,document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).querySelector(".ezuikit-btn-loading-icon").style.display="none",new $i({type:"error",content:"视频存证失败,请稍后重试!",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})})))},document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-refresh")).onclick=function(){a.listLoading||a.startEvidence||(a.hideDelEConfirm(),document.getElementById("".concat(a.jSPlugin.id,"-inspect-loading")).style.display="block",document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-wrap")).style.display="none",document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-nodata-wrap")).style.display="none",A.initEvent())}}})),s(this,"renderList",(function(A){document.getElementById("".concat(a.jSPlugin.id,"-inspect-loading")).style.display="none";var e=A.data||[];if(e.length>0){document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-wrap")).style.display="block",document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-nodata-wrap")).style.display="none";for(var t=function(){var t=document.createElement("div");t.setAttribute("class","inspect-event-item");var n=e[i];t.setAttribute("id","".concat(a.jSPlugin.id,"-inspect-event-item-").concat(n.inspectEventId)),t.innerHTML="",document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-wrap-main")).appendChild(t);var o,r=document.createElement("div");r.setAttribute("class","inspect-event-item-header-wrap"),1==n.evidenceFileType&&(o="".concat(n.eventBeginTime.split(" ")[1],"~").concat(n.eventEndTime.split(" ")[1])),0==n.evidenceFileType&&(o="".concat(n.eventTime.split(" ")[1]));var s="";1===n.evidenceFileType&&(1===n.taskStatus||2===n.taskStatus?s="storage":4===n.taskStatus||5===n.taskStatus||6===n.taskStatus||7===n.taskStatus?s="storage-error":0!==n.taskStatus&&3!==n.taskStatus||(s="storage-success")),r.innerHTML='\n <div class="inspect-event-item-header '.concat(s,'">\n <div class="inspect-event-item-header-left">\n <span class="inspect-event-item-status-wrap">\n <span class="inspect-event-item-status"></span>\n </span>\n <svg fill="currentColor" style="display: ').concat(1===n.evidenceFileType?"block":"none",'" width="16" height="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 14 12" style="enable-background:new 0 0 14 12;" xml:space="preserve">\n <path d="M1,12c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1h12c0.6,0,1,0.4,1,1v10c0,0.6-0.4,1-1,1H1z M1,11h1.6l0-3.5H1V11z\n M10.5,1h-7v10h7V1z M13,7.5h-1.6l0,3.5H13V7.5z M6.1,4.2l2.3,1.2c0.4,0.2,0.4,0.6,0,0.8L8.1,6.3l-2,1c-0.2,0.1-0.4,0-0.4-0.2V4.4\n C5.7,4.2,5.9,4.1,6.1,4.2z M13,6.6V4.9h-1.6v1.8H13z M1,6.6h1.6V4.9H1V6.6z M13,4V1h-1.6l0,3H13z M2.6,1H1v3h1.6L2.6,1z"/>\n </svg>\n <svg fill="currentColor" style="display: ').concat(1===n.evidenceFileType?"none":"block",'" width="16" height="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n viewBox="0 0 14 12" style="enable-background:new 0 0 14 12;" xml:space="preserve">\n <path class="st0" d="M13,0c0.6,0,1,0.4,1,1v10c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1H13z M10.4,6.2L5.6,9.8L3.8,8\n L1,10v1h12V9L10.4,6.2z M13,1H1v7.8l2.9-2.1l1.8,1.8l4.9-3.6L13,7.5V1z M5.5,2C6.3,2,7,2.7,7,3.5S6.3,5,5.5,5S4,4.3,4,3.5\n S4.7,2,5.5,2z M5.5,3C5.2,3,5,3.2,5,3.5S5.2,4,5.5,4S6,3.8,6,3.5S5.8,3,5.5,3z"/>\n </svg>\n <span class="inspect-event-item-time">').concat(o||"-",'</span>\n </div>\n <div class="inspect-event-item-header-right">\n <span class="inspect-event-item-header-toggle">\n <svg fill="currentColor" class="inspect-event-item-header-toggle-up" style="display: none;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M218.496 645.312l46.464 44.032 247.616-261.568 246.4 261.504 46.528-43.904-292.8-310.72z"></path></svg> \n <svg fill="currentColor" class="inspect-event-item-header-toggle-down" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M218.496 378.688l46.464-44.032 247.616 261.568 246.4-261.504 46.528 43.904-292.8 310.72z"></path></svg>\n </span>\n </div>\n </div>\n '),t.appendChild(r),r.onclick=function(A){"none"===r.querySelector(".inspect-event-item-header-toggle-up").style.display?(r.querySelector(".inspect-event-item-header-toggle-up").style.display="block",r.querySelector(".inspect-event-item-header-toggle-down").style.display="none",t.querySelector(".inspect-event-item-body").style.display="block"):(r.querySelector(".inspect-event-item-header-toggle-up").style.display="none",r.querySelector(".inspect-event-item-header-toggle-down").style.display="block",t.querySelector(".inspect-event-item-body").style.display="none")};var g=document.createElement("div");g.setAttribute("class","inspect-event-item-body"),g.style.display="none";var c=(1===n.evidenceFileType?n.videoCoverPic:n.fileUrl)||"".concat(a.jSPlugin.staticPath,"/imgs/bg.svg");g.innerHTML='\n <div class="inspect-event-item-img" id="'.concat(a.jSPlugin.id,"-inspect-view-").concat(n.inspectEventId,'"></div>\n <div class="inspect-event-item-body-info">\n <div class="inspect-event-item-body-info-tag">\n <span class="inspect-event-item-body-info-tag-label" title="').concat(n.eventType,'">').concat(n.eventType,"</span>\n </div>\n </div>\n "),t.appendChild(g),1==n.evidenceFileType&&(1===n.taskStatus||2===n.taskStatus?document.getElementById("".concat(a.jSPlugin.id,"-inspect-view-").concat(n.inspectEventId)).innerHTML='\n <div class="video-stroage-exceptional-status-tips-wrap" style="background:url('.concat(a.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n <div class="video-stroage-exceptional-status-icon">\n <div type="default" class="ezuikit-spin ezuikit-spin-sm ezuikit-spin-spinning ezuikit-spin-dot-white"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n </div>\n <span class="video-stroage-exceptional-status-tips">视频正在存储中…</span>\n </div>\n '):4===n.taskStatus?document.getElementById("".concat(a.jSPlugin.id,"-inspect-view-").concat(n.inspectEventId)).innerHTML='\n <div class="video-stroage-exceptional-status-tips-wrap video-stroage-exceptional-status-tips-error" style="background:url('.concat(a.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n <div class="video-stroage-exceptional-status-icon">\n <svg fill="currentColor" t="1691567317943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z"></path></svg>\n </div>\n <span class="video-stroage-exceptional-status-tips">视频存储失败</span>\n </div>\n '):0!==n.taskStatus&&3!==n.taskStatus||new nn({id:"".concat(a.jSPlugin.id,"-inspect-view-").concat(n.inspectEventId),src:n.fileUrl,poster:c,fallback:"".concat(a.jSPlugin.staticPath,"/imgs/bg.svg")})),0==n.evidenceFileType&&new An({id:"".concat(a.jSPlugin.id,"-inspect-view-").concat(n.inspectEventId),src:c,fallback:"".concat(a.jSPlugin.staticPath,"/imgs/bg.svg"),showIcon:!1});var l=document.createElement("div");l.setAttribute("class","inspect-event-item-body-info-opr");var I=document.createElement("span");I.setAttribute("class","inspect-event-item-body-info-opr-icon"),I.innerHTML='\n <svg fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M612.992 121.984a64 64 0 0 1 90.496 0l153.92 153.92a64 64 0 0 1 0 90.496l-435.2 435.2a96 96 0 0 1-23.04 17.024l525.312-0.128v64H175.808v-2.304a64 64 0 0 1-66.496-77.632l43.776-199.296a96 96 0 0 1 25.92-47.296zM523.072 302.4l-298.88 298.88a32 32 0 0 0-8.576 15.744l-43.776 199.296 190.848-51.712a32 32 0 0 0 14.272-8.256l300.032-300.032-153.92-153.92z m135.168-135.168L568.32 257.088l153.92 153.984 89.92-89.92-153.92-153.92z"></path></svg>\n ',l.appendChild(I);var C=document.createElement("span");C.setAttribute("class","inspect-event-item-body-info-opr-icon"),C.id="".concat(a.jSPlugin.id,"-inspect-event-del-").concat(n.inspectEventId),C.innerHTML=' \n <svg fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M128 320V256h767.872v64H832v512a64 64 0 0 1-64 64H256a64 64 0 0 1-64-64V320H128z m640 0H256v512h512V320zM464 432v256h-64v-256h64z m160 0v256h-64v-256h64zM704 128v64H320V128h384z"></path></svg>\n ',l.appendChild(C),I.onclick=function(A){a.startEvidence||new sn(a.jSPlugin,n,a.timer,1,(function(A){new $i({type:"success",content:"保存成功",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40}),n=Object.assign(n,A),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-item-").concat(n.inspectEventId)).querySelector(".inspect-event-item-body-info-tag-label").innerHTML=n.eventType,document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-item-").concat(n.inspectEventId)).querySelector(".inspect-event-item-body-info-tag-label").setAttribute("title",n.eventType)}))},C.onclick=function(A){a.startEvidence||(a.delE=new tn({id:"".concat(a.jSPlugin.id,"-inspect-event-del-").concat(n.inspectEventId),content:"确定要删除该事件吗?",placement:"topRight",arrowPointAtCenter:!0,onCancel:function(){a.delE.hide()},onConfirm:function(){!function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectEventId:""},a=Object.assign(n,e),o="".concat(A.env.domain,"/api/service/devicekit/bodycamera/inspect/event/delete");ki(o,"POST",a,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(a.jSPlugin,{inspectEventId:n.inspectEventId},(function(A){A.meta&&200===A.meta.code?(a.delE.hide(),a.initEvent(),setTimeout((function(){new $i({type:"success",content:"删除成功",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})}),10)):new $i({type:"error",content:"删除失败,".concat(A.meta&&A.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){new $i({type:"error",content:"删除失败,请稍后重试!",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})}))}}),a.delEConfirmList.push(a.delE))},t.querySelector(".inspect-event-item-body-info").appendChild(l),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-wrap")).onscroll=function(e){var t=e.target;a.hideDelEConfirm(),t.scrollTop+t.offsetHeight>=t.scrollHeight-48&&!a.listLoading&&(A.start+1)*A.size<A.total&&a.initEvent(A.start+1)}},i=0;i<e.length;i++)t()}else document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-wrap")).style.display="none",document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-nodata-wrap")).style.display="block"})),this.jSPlugin=e,this.videoWidth=e.width,this.inspectRecordId=i,this.timer=n,this.listLoading=!1,this.startEvidence=!1,this.delEConfirmList=[],this.videoHeight=document.getElementById("".concat(e.id,"-wrap")).clientHeight-document.getElementById("".concat(e.id,"-inspectInfoControl")).clientHeight||e.height,this.initEvent()}),[{key:"initEvent",value:function(){var A=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,i=this;i.listLoading=!0,0===e?i.initRender(e):document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="flex";var n=function(e){new $i({type:"error",content:e.meta&&e.meta.message||"列表获取失败,请稍后重试!",wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40}),i.renderList({})};i.inspectRecordId?function(A,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,o={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:e,pageStart:t,pageSize:i},r="".concat(A.env.domain,"/api/service/devicekit/bodycamera/inspect/event/page");ki(r,"GET",o,(function(A){n&&n(A)}),(function(A){a&&a(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(i.jSPlugin,i.inspectRecordId,e,t,(function(e){i.listLoading=!1,document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="none",e.meta&&200===e.meta.code?i.renderList(e.data||{}):n(e)}),(function(e){i.listLoading=!1,document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="none",n(e)})):(i.listLoading=!1,document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="none",i.renderList({}))}},{key:"disableEvidenceBtn",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-img")).setAttribute("disabled","disabled"),document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-video")).setAttribute("disabled","disabled")}},{key:"enableEvidenceBtn",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-img")).removeAttribute("disabled"),document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-video")).removeAttribute("disabled")}}])}(),cn=function(){return o((function A(e,i,n,a,o){var r=this;t(this,A),s(this,"createLocationControl",(function(){var A=r;function e(){this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT,this.defaultOffset=new BMapGL.Size(40,105)}return e.prototype=new BMapGL.Control,e.prototype.initialize=function(e){var t=document.createElement("div");return t.style.cssText="width: 26px;height: 26px;display: flex;align-items: center;justify-content: center; box-shadow: 1px 2px 1px rgb(0 0 0 / 15%); background: #fff; cursor: pointer;",t.id="".concat(A.jSPlugin.id,"-location-btn"),t.innerHTML='<svg fill="#3385ff" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path d="M510.976716 128.626761c-211.205756 0-382.401119 171.195363-382.401119 382.401119s171.195363 382.401119 382.401119 382.401119S893.377836 722.131308 893.377836 510.925552 722.182472 128.626761 510.976716 128.626761zM736.508444 736.45728c-29.265914 29.265914-63.443589 52.289797-101.407415 68.355351-29.265914 12.381733-59.964425 20.158689-91.481563 23.433197L543.619466 704.019187l-63.443589 0 0 124.431298c-32.233437-3.069851-63.443589-10.949136-93.323474-23.535525-37.963825-16.065554-72.039173-39.089437-101.407415-68.355351-29.265914-29.265914-52.289797-63.443589-68.355351-101.407415-12.381733-29.265914-20.158689-59.964425-23.433197-91.481563l126.273209 0 0-63.443589L193.554112 480.227041c3.069851-32.233437 10.949136-63.443589 23.535525-93.323474 16.065554-37.963825 39.089437-72.039173 68.355351-101.407415 29.265914-29.265914 63.443589-52.289797 101.407415-68.355351 29.879884-12.58639 61.090037-20.465674 93.323474-23.535525l0 125.863895 63.443589 0L543.619466 193.707605c31.517138 3.172179 62.215649 11.051464 91.481563 23.433197 37.963825 16.065554 72.039173 39.089437 101.407415 68.355351 29.265914 29.265914 52.289797 63.443589 68.355351 101.407415 12.58639 29.879884 20.465674 61.090037 23.535525 93.323474L703.251724 480.227041l0 63.443589 125.045268 0c-3.172179 31.517138-11.051464 62.215649-23.433197 91.481563C788.798241 673.01369 765.876686 707.089038 736.508444 736.45728z" p-id="1506"></path><path d="M516.093135 415.248526c-56.280604 0-100.793445 43.489557-100.793445 99.770161s44.512841 101.816728 100.793445 101.816728S616.886579 571.29929 616.886579 515.018687 572.373738 415.248526 516.093135 415.248526z" p-id="1507"></path>\n </svg>',t.onclick=function(e){setTimeout((function(){A.inspectMapWin.centerToTrack(18)}),100)},e.getContainer().appendChild(t),t},new e})),s(this,"initSwithcBtn",(function(){var A=document.createElement("div");A.id="".concat(r.jSPlugin.id,"-miniSwitch"),A.style="cursor: pointer;position: absolute; bottom: 106px; right: ".concat(r.jSPlugin.inspectVideoWidth+10,"px; z-index: 999;"),A.innerHTML="<div id='".concat(r.jSPlugin.id,'-miniSwitch-btn\' style="width: 32px;height: 32px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background: rgba(0,0,0,0.70);">\n <svg width="20px" height="20px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>大小窗切换</title>\n <g id="icon/大小窗切换" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="矩形" x="0" y="0" width="24" height="24"></rect>\n <path d="M16,3.25 C17.5187831,3.25 18.75,4.48121694 18.75,6 L18.75,6 L18.75,6.644 L19.095177,6.64456257 C20.6299163,6.64456257 21.9388658,7.64624846 22.0337198,8.99291851 L22.0392202,9.14979714 L22.0392202,17.639328 C22.0392202,19.0115638 20.7871129,20.0640733 19.2712041,20.1401546 L19.095177,20.1445626 L8.48326347,20.1445626 C6.94852423,20.1445626 5.63957467,19.1428767 5.54472071,17.7962066 L5.53922025,17.639328 L5.539,16.75 L5,16.75 C3.53746816,16.75 2.34159572,15.6082954 2.25501879,14.1675223 L2.25,14 L2.25,6 C2.25,4.48121694 3.48121694,3.25 5,3.25 L5,3.25 Z M18.75,14 C18.75,15.5187831 17.5187831,16.75 16,16.75 L16,16.75 L7.039,16.75 L7.03922025,17.639328 C7.03922025,18.1209822 7.57916546,18.5830417 8.33031492,18.6389177 L8.48326347,18.6445626 L19.095177,18.6445626 C19.873026,18.6445626 20.4615868,18.2126064 20.5321184,17.735283 L20.5392202,17.639328 L20.5392202,9.14979714 C20.5392202,8.66814298 19.999275,8.20608342 19.2481256,8.15020744 L19.095177,8.14456257 L18.75,8.144 Z M16,4.75 L5,4.75 C4.30964406,4.75 3.75,5.30964406 3.75,6 L3.75,6 L3.75,14 C3.75,14.6903559 4.30964406,15.25 5,15.25 L5,15.25 L16,15.25 C16.6903559,15.25 17.25,14.6903559 17.25,14 L17.25,14 L17.25,8.144 L17.2422027,8.14456257 L17.2422027,6.64456257 L17.25,6.644 L17.25,6 C17.25,5.35279131 16.7581253,4.8204661 16.1278052,4.75645361 L16,4.75 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>'),document.getElementById("".concat(r.jSPlugin.id,"-wrap")).appendChild(A),document.getElementById("".concat(r.jSPlugin.id,"-miniSwitch-btn")).onclick=function(){!function(A,e,t){var i=!0,n=!0;if("function"!=typeof A)throw new TypeError("Expected a function");return CA(t)&&(i="leading"in t?!!t.leading:i,n="trailing"in t?!!t.trailing:n),wt(A,e,{leading:i,maxWait:e,trailing:n})}((function(){return r.miniRecSwitchClick()}),1e3)()}})),s(this,"initMiniWinToggleBtn",(function(){var A=.3333*r.videoWidth,e=.3333*r.videoHeight,t=document.createElement("div");t.id="".concat(r.jSPlugin.id,"-miniToggle"),t.style="cursor: pointer;position: absolute; bottom: ".concat(e/2+96-30,"px; right: ").concat(r.jSPlugin.inspectVideoWidth+A,"px; z-index: 999; height:60px; box-sizing: border-box; padding-top: 20px; text-align: center; width:20px; overflow: hidden; background: #000000; border-radius: 2px 0px 0px 2px; opacity: 0.7;"),t.innerHTML="<div id='".concat(r.jSPlugin.id,"-miniToggle-btn'>\n <svg id=\"").concat(r.jSPlugin.id,'-min-win-close-icon" style="display: inline-block" width="20px" height="20px" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10867" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path d="M378.688 217.856l-44.032 46.464 261.568 247.616-261.504 246.4 43.904 46.528 310.72-292.8z" fill="#ffffff" p-id="10868"></path>\n </svg>\n <svg id="').concat(r.jSPlugin.id,'-min-win-open-icon" style="display: none" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10671" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20">\n <path d="M645.312 217.856l44.032 46.464-261.568 247.616 261.504 246.4-43.904 46.528-310.72-292.8z" fill="#ffffff" p-id="10672"></path>\n </svg>\n </div>'),document.getElementById("".concat(r.jSPlugin.id,"-wrap")).appendChild(t),document.getElementById("".concat(r.jSPlugin.id,"-miniToggle")).onclick=function(){r.miniWinToggleClick()}})),s(this,"init",(function(){r.initSwithcBtn(),r.initMiniWinToggleBtn()})),s(this,"setStyleListByIds",(function(A){A.map((function(A){var e=document.getElementById(A.id);e&&Object.keys(A.styleList).map((function(t){e.style[t]=A.styleList[t]}))}))})),this.jSPlugin=e,this.inspectMode=i,this.inspectMapWin=n,this.changeInspectMode=a,this.videoWidth=e.width,this.videoHeight=e.height,this.minWinStatus="open",this.decoderState=o,this.ZoomControl=new BMapGL.ZoomControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT,offset:new BMapGL.Size(40,50)}),this.LocationControl=this.createLocationControl(),this.NavigationControl3D=new BMapGL.NavigationControl3D({anchor:BMAP_ANCHOR_BOTTOM_LEFT,offset:new BMapGL.Size(28,105)}),this.init()}),[{key:"miniWinToggleClick",value:function(){var A=.3333*this.jSPlugin.width;"open"===this.minWinStatus?(this.setStyleListByIds([{id:"video"===this.inspectMode?"".concat(this.jSPlugin.id,"-mapbox"):"".concat(this.jSPlugin.id),styleList:{width:"0px"}},{id:"".concat(this.jSPlugin.id,"-miniSwitch"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-miniToggle"),styleList:{right:"".concat(this.jSPlugin.inspectVideoWidth,"px")}},{id:"".concat(this.jSPlugin.id,"-min-win-close-icon"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-min-win-open-icon"),styleList:{display:"inline-block"}}]),this.minWinStatus="close"):(this.setStyleListByIds([{id:"video"===this.inspectMode?"".concat(this.jSPlugin.id,"-mapbox"):"".concat(this.jSPlugin.id),styleList:{width:A+"px"}},{id:"".concat(this.jSPlugin.id,"-miniSwitch"),styleList:{display:"block"}},{id:"".concat(this.jSPlugin.id,"-miniToggle"),styleList:{right:"".concat(this.jSPlugin.inspectVideoWidth+A,"px")}},{id:"".concat(this.jSPlugin.id,"-min-win-close-icon"),styleList:{display:"inline-block"}},{id:"".concat(this.jSPlugin.id,"-min-win-open-icon"),styleList:{display:"none"}}]),this.minWinStatus="open")}},{key:"miniRecSwitchClick",value:function(){var A=this,e=.3333*this.jSPlugin.width,t=.3333*this.jSPlugin.height;"video"===this.inspectMode?(this.jSPlugin.Zoom&&this.jSPlugin.Zoom.stopZoom(),this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-mapbox"),styleList:{width:this.jSPlugin.width+"px",height:this.jSPlugin.height+"px",marginBottom:"-40px"}},{id:"".concat(this.jSPlugin.id,"-ez-iframe-footer-container"),styleList:{top:this.jSPlugin.height+"px"}},{id:"".concat(this.jSPlugin.id),styleList:{position:"absolute",zIndex:"100",bottom:"96px",right:"".concat(this.jSPlugin.inspectVideoWidth,"px"),overflow:"hidden"}}]),this.jSPlugin.Theme.inspect.reSizeVideo(e,t),this.inspectMode="map",this.changeInspectMode("map"),this.inspectMapWin.map.addControl(this.NavigationControl3D),this.inspectMapWin.map.addControl(this.LocationControl),this.inspectMapWin.map.addControl(this.ZoomControl),this.inspectMapWin.map.addOverlay(this.inspectMapWin.inspectRange),document.getElementById("".concat(this.jSPlugin.id,"-loading-item-btn-wrap"))&&this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-loading-item-btn"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-svg"),styleList:{display:"block"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-wrap"),styleList:{border:"none",width:"32px",height:"14px"}}]),setTimeout((function(){A.inspectMapWin.centerToTrack(18)}),100)):(this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-mapbox"),styleList:{width:e+"px",height:t+"px",marginBottom:"0"}},{id:"".concat(this.jSPlugin.id,"-ez-iframe-footer-container"),styleList:{top:"0px"}},{id:"".concat(this.jSPlugin.id),styleList:{position:"relative",zIndex:"0",bottom:"0",right:"0"}}]),this.jSPlugin.Theme.inspect.reSizeVideo(this.jSPlugin.width,this.jSPlugin.height),this.inspectMode="video",this.changeInspectMode("video"),this.inspectMapWin.map.removeControl(this.ZoomControl),this.inspectMapWin.map.removeControl(this.NavigationControl3D),this.inspectMapWin.map.removeControl(this.LocationControl),this.inspectMapWin.map.removeOverlay(this.inspectMapWin.inspectRange),document.getElementById("".concat(this.jSPlugin.id,"-loading-item-btn-wrap"))&&this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-loading-item-btn"),styleList:{display:"block"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-svg"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-wrap"),styleList:{border:"1px solid rgb(255, 255, 255)",width:"80px",height:"32px",color:"#fff","text-align":"center","line-height":"32px","font-size":"14px"}}]),setTimeout((function(){A.inspectMapWin.centerToTrack()}),100),this.jSPlugin.Zoom&&this.decoderState.state.play&&this.jSPlugin.Zoom.startZoom()),this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-wrap"),styleList:{width:this.jSPlugin.width+this.jSPlugin.inspectVideoWidth+"px",height:this.jSPlugin.height+this.jSPlugin.inspectVideoHeight+"px"}}])}}])}(),ln={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0,inspectInfo:{color:"#000000",backgroundColor:"#ffffff",activeColor:"#1890FF",btnList:[{btnKey:"inspectName",iconId:"inspectName",part:"left",defaultActive:0,isrender:1,color:"#262626"},{btnKey:"inspectBeginTime",iconId:"inspectBeginTime",part:"left",defaultActive:0,isrender:1,color:"#262626"},{btnKey:"inspectPerson",iconId:"inspectPerson",part:"right",defaultActive:0,isrender:1,color:"#262626"}]}},header:{color:"#2c2c2c",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{btnKey:"deviceName",iconId:"deviceName",part:"left",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"inspectTime",iconId:"inspectTime",part:"left",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"signalType",iconId:"signalType",part:"right",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"batteryStatus",iconId:"batteryStatus",part:"right",defaultActive:0,isrender:1,color:"#ffffff"}]},footer:{color:"#ffffff",backgroundColor:"#000000",activeColor:"blue",btnList:[{btnKey:"talk",iconId:"talk",part:"left",defaultActive:1,isrender:1,backgroundColor:"#cccccc"},{btnKey:"sound",iconId:"sound",part:"left",defaultActive:1,isrender:1,backgroundColor:"#cccccc"}]}},In=function(A){var e="";return Object.keys(A).map((function(t,i){e+="".concat(t,":").concat(A[t]).concat(i<Object.keys(A).length-1?";":"")})),e};var Cn=500,dn=function(){return o((function A(e,i,n,a,o,r,s){t(this,A),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.themeData=i,this.setDecoderState=n,this.decoderState=a,this.isNeedRenderInspectInfo=!1,this.isNeedRenderHeader=!1,this.isNeedRenderFooter=!1,this.inspectMode=o,this.changeInspectMode=r,this.themeInited=!1,this.inspectRecordId=null,this.inspectInfo={},this.activeThemeStatus=!0,this.activeThemeStatusTxt="模板未激活",this.globalContainer=new zi(this.jSPlugin),this.toastCustom=new Ri(e,!1),this.InspectEvent=null,this.timer=s}),[{key:"renderSignalType",value:function(A){return A?"WIFI"===A.toUpperCase()?'<span><svg t="1688983236732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path d="M0 352.832l93.12 98.752c231.296-245.44 606.464-245.44 837.76 0L1024 352.832C741.44 53.056 283.008 53.056 0 352.832z m372.352 395.008L512 896l139.648-148.16c-76.8-81.92-202.048-81.92-279.296 0zM186.24 550.4l93.12 98.752c128.448-136.32 336.96-136.32 465.408 0L837.824 550.4c-179.648-190.592-471.488-190.592-651.648 0z" fill="#ffffff" p-id="1530"></path>\n </svg></span>':"<span>".concat(A,"</span>"):null}},{key:"renderBatteryStatus",value:function(A){return A&&0!=A?'\n <div style="\n display: flex;\n align-items: center;\n position: relative;\n ">\n <span style="\n margin-right: 3px; \n color: '.concat(A<=20?"#FF4D4F":"#FFFFFF",'\n ">').concat(A,'%</span>\n <div style="\n position: absolute;\n right: 6px;\n height: 8px;\n width: 15px;\n ">\n <div style="\n width: ').concat(A,"%;\n height: 100%;\n background: ").concat(A<=20?"#FF4D4F":"#FFFFFF",'\n "></div>\n </div>\n <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="32" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path fill="').concat(A<=20?"#FF4D4F":"#FFFFFF",'" d="M128 213.333333l640 0q52.992 0 90.496 37.504t37.504 90.496q52.992 0 90.496 37.504t37.504 90.496l0 85.333333q0 52.992-37.504 90.496t-90.496 37.504q0 52.992-37.504 90.496t-90.496 37.504l-640 0q-52.992 0-90.496-37.504t-37.504-90.496l0-341.333333q0-52.992 37.504-90.496t90.496-37.504zM768 298.666667l-640 0q-17.664 0-30.165333 12.501333t-12.501333 30.165333l0 341.333333q0 17.664 12.501333 30.165333t30.165333 12.501333l640 0q17.664 0 30.165333-12.501333t12.501333-30.165333l0-341.333333q0-17.664-12.501333-30.165333t-30.165333-12.501333zM896 426.666667l0 170.666667q17.664 0 30.165333-12.501333t12.501333-30.165333l0-85.333333q0-17.664-12.501333-30.165333t-30.165333-12.501333z"></path>\n </svg>\n </div>\n '):null}},{key:"renderInspectTime",value:function(A){if(!A)return null;var e,t,i,n,a=A.split(" "),o=a[0].split("-"),r=a[1].split(":"),s=new Date(o[0],o[1]-1,o[2],r[0],r[1],r[2]),g=(new Date).getTime()-new Date(s).getTime();return'\n <span style="\n display: inline-block;\n width:8px;\n height:8px;\n border-radius: 100%;\n background: #FF4D4F;\n margin-right: 4px;\n "></span>\n '.concat((e=g,t=parseInt(e%864e5/36e5),i=parseInt(e%36e5/6e4),n=parseInt(e%6e4/1e3),(t<10?"0".concat(t):t)+":"+(i<10?"0".concat(i):i)+":"+(n<10?"0".concat(n):n)),"\n ")}},{key:"matchBtn",value:function(A,e){var t=this,i=this.themeData,n=i.customConfig,a=i.header,o=i.footer,r=n.inspectInfo,s={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}},g=r.btnList.findIndex((function(e){return e.iconId===A}));switch(-1!==g?(s.color=r.color,s.backgroundColor=r.backgroundColor,s.activeColor=r.activeColor):-1!==(g=a.btnList.findIndex((function(e){return e.iconId===A})))?(s.color=a.color,s.backgroundColor=a.backgroundColor,s.activeColor=a.activeColor):(s.color=o.color,s.backgroundColor=o.backgroundColor,s.activeColor=o.activeColor),A){case"inspectName":return s.title="巡检名称",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-inspectInfo-inspectName" \n style="\n color:').concat(e.color||"#262626",';\n font-size: 18px;\n text-align: left;\n font-weight: bold;\n padding: 0 16px;\n ">巡检名称</span>'),s.onclick=function(){},s;case"inspectBeginTime":return s.title="巡检开始时间",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-inspectInfo-inspectBeginTime" \n style="\n color:').concat(e.color||"#FFFFFF",';\n font-size: 14px;\n text-align: left;\n padding-left: 16px;\n border-left: 1px solid #d9d9d9;\n line-height: 16px;\n margin-top: 1px;\n ">巡检开始时间:-</span>'),s.onclick=function(){},s;case"inspectPerson":return s.title="本地巡检员",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-inspectInfo-inspectPerson" \n style="\n color:').concat(e.color||"#FFFFFF",';\n font-size: 14px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n padding-right: 16px;\n ">本地巡检员:-</span>'),s.onclick=function(){},s;case"deviceName":return s.title="设备名称",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-header-deviceName" \n style="\n color:').concat(e.color||"#FFFFFF",";\n font-size: 16px;\n display: block;\n max-width: ").concat(.33*this.jSPlugin.width,'px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n ">设备名称</span>'),s.onclick=function(){},s;case"inspectTime":return s.title="巡检时长",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-header-inspectTime-wrap" \n style="\n color:').concat(e.color||"#FFFFFF",';\n font-size: 14px;\n display: flex;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n margin-left: 32px;\n ">巡检时长:<span id="').concat(this.jSPlugin.id,'-header-inspectTime" style="display: flex; align-items: center;">-</span></span>'),s.onclick=function(){},s;case"signalType":return s.title="信号类型",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-header-signalType" \n style="\n color:').concat(e.color||"#FFFFFF",';\n font-size: 14px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n "></span>'),s.onclick=function(){},s;case"batteryStatus":return s.title="设备电量",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-header-batteryStatus" \n style="\n color:').concat(e.color||"#FFFFFF",';\n font-size: 14px;\n display: flex;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n margin-left: 12px;\n align-items: center;\n "></span>'),s.onclick=function(){},s;case"talk":return s.title="对讲",s.id=A,s.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-talk-icon" class="theme-icon-item-icon" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Cn?48:32,'" height="').concat(this.jSPlugin.width>Cn?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.1,2.7C8.5,2.7,7.2,4,7.2,5.6v5.2c0,1.6,1.3,2.9,2.9,2.9l0.2,0c1.5-0.1,2.7-1.4,2.7-2.9V5.6\tC13,4,11.7,2.7,10.1,2.7z M10.1,3.7c1.1,0,1.9,0.9,1.9,1.9v5.2c0,1-0.8,1.8-1.8,1.9l-0.1,0c-1,0-1.9-0.9-1.9-1.9V5.6 C8.2,4.5,9,3.7,10.1,3.7z" /><path d="M15.1,8.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,3-2.5,5.5-5.5,5.5c-3,0-5.4-2.3-5.5-5.3l0-0.2V9 c0-0.3,0.2-0.5,0.5-0.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,2.5,2,4.5,4.5,4.5c2.4,0,4.4-1.9,4.5-4.3l0-0.2V9 C14.6,8.7,14.8,8.5,15.1,8.5z" /><path d="M13.5,17.7c0.3,0,0.5,0.2,0.5,0.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-7c-0.3,0-0.5-0.2-0.5-0.5 c0-0.2,0.2-0.4,0.4-0.5l0.1,0H13.5z" /><path d="M10.1,15.2c0.2,0,0.4,0.2,0.5,0.4l0,0.1v2.5c0,0.3-0.2,0.5-0.5,0.5c-0.2,0-0.4-0.2-0.5-0.4l0-0.1 v-2.5C9.6,15.4,9.8,15.2,10.1,15.2z" />'+'</svg><span id="'.concat(this.jSPlugin.id,'-talk-label" style="margin-left: -3px">对讲</span>'),s.onclick=function(){var A=t.decoderState.state,e=A.talk,i=A.sound;if(A.play)if(e){console.log("结束对讲"),t.setDecoderState({talk:!1}),t.jSPlugin.Talk.stopTalk();var n=bt(t.themeData.footer.btnList,(function(A){return"sound"===A.iconId&&1===A.isrender&&1===A.defaultActive}))>-1;t.themeData&&n&&t.jSPlugin.openSound()}else console.log("开始对讲"),t.setDecoderState({talk:!0}),t.jSPlugin.Talk.startTalk((function(A){i&&!A&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1}))}))},s;case"sound":return s.title="音量",s.id=A,s.domString='<span style="height: 100%">'+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-nosound-icon" style="display:none" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Cn?48:32,'" height="').concat(this.jSPlugin.width>Cn?48:32,'" viewBox="-6 -7 32 31">\n <path d="M8.5,4.2c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8C5,13.2,5,12.9,5.1,12.7 c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3L9.2,5L5.9,7.8 C5.6,7.9,5.3,7.9,5.1,7.7C5,7.5,5,7.3,5.1,7.1L5.2,7L8.5,4.2z"/>\n <path d="M5.5,6.9C5.8,6.9,6,7.1,6,7.4c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2C3.4,7.9,3.3,8,3.2,8.2l0,0.1v4 c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,12.5,6,12.7,6,13c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4 c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n <path d="M17.4,7.9c0.2-0.2,0.5-0.2,0.7,0c0.2,0.2,0.2,0.4,0.1,0.6l-0.1,0.1l-3.8,3.8c-0.2,0.2-0.5,0.2-0.7,0 c-0.2-0.2-0.2-0.4-0.1-0.6l0.1-0.1L17.4,7.9z"/>\n <path d="M13.7,7.9c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.8,3.8c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1-0.1 l-3.7-3.8C13.5,8.4,13.5,8.1,13.7,7.9z"/>\n </svg>')+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-sound-icon" style="display:inline-block" width="').concat(this.jSPlugin.width>Cn?48:32,'" height="').concat(this.jSPlugin.width>Cn?48:32,'" fill="').concat(s.color,'" viewBox="-6 -7 32 32">\n <path d="M13.2,7.1c0.1-0.2,0.5-0.3,0.7-0.2c1.1,0.7,1.9,2.2,1.9,3.7c0,1.6-0.7,3-1.9,3.7\n c-0.2,0.1-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7c0.8-0.5,1.4-1.6,1.4-2.9c0-1.3-0.6-2.4-1.4-2.9C13.1,7.6,13,7.3,13.2,7.1z"/>\n <path d="M15.7,4.5c0.2-0.2,0.5-0.2,0.7-0.1C18,5.8,19,8.2,19,10.7c0,2.5-1,4.8-2.7,6.3\n c-0.2,0.2-0.5,0.2-0.7-0.1c-0.2-0.2-0.2-0.5,0.1-0.7c1.4-1.2,2.3-3.3,2.3-5.5c0-2.2-0.9-4.3-2.3-5.5C15.5,5,15.5,4.7,15.7,4.5z"/>\n <path id="Stroke-5" class="st1" d="M8.5,4.7c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8\n C5,13.7,5,13.4,5.1,13.2c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3l-0.1,0\n L5.9,8.3C5.6,8.4,5.3,8.4,5.1,8.2C5,8,5,7.7,5.1,7.6l0.1-0.1L8.5,4.7z"/>\n <path d="M5.5,7.4C5.8,7.4,6,7.6,6,7.9c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.2,0-0.3,0.1-0.3,0.3l0,0.1v4\n c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,13,6,13.2,6,13.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4\n c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n </svg>')+'</span><span id="'.concat(this.jSPlugin.id,'-sound-label" style="margin-left: -3px; color: ').concat(s.color,'">音量</span>'),s.onclick=function(){var A=t.decoderState.state,e=A.play,i=A.sound,n=A.talk;e&&!n&&(i?(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})):t.jSPlugin.openSound())},s;default:return s}}},{key:"renderInspectInfo",value:function(A,e){var t=this.matchBtn(A,e),i=document.createElement("sapn");i.innerHTML="".concat(t.domString),"left"===e.part?document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl-left")).appendChild(i):document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl-right")).appendChild(i)}},{key:"renderHeader",value:function(A,e){var t=this.matchBtn(A,e),i=document.createElement("span");i.className="".concat(this.jSPlugin.id,"-header-content"),i.style="display: flex; align-items: center; ",i.innerHTML="\n ".concat(t.domString,"\n "),"left"===e.part?document.getElementById("".concat(this.jSPlugin.id,"-headControl-left")).appendChild(i):document.getElementById("".concat(this.jSPlugin.id,"-headControl-right")).appendChild(i)}},{key:"renderFooter",value:function(A,e){var t=this,i=this.matchBtn(A,e),n=this.videoWidth/6,a=document.createElement("div");a.className="theme-icon-item",this.jSPlugin.isWebConsole?a.style="padding:0 ".concat(.1*n,"px;"):a.style="padding:0 ".concat(.1*n,"px;cursor: pointer;"),a.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(i.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(i.id,'-content" title="').concat(i.title,'" style="display: flex;align-items: center;position:relative;">')).concat(i.domString,"</div>")+"</span>",a.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;i.onclick(A)},i.onmouseenter&&(a.onmouseenter=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;i.onmouseenter(A)}),i.onmouseleave&&(a.onmouseleave=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;i.onmouseleave(A)}),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).appendChild(a)}},{key:"initThemeData",value:function(){var A=this,e=this.themeData,t=e.customConfig,i=e.header,n=e.footer,a=t.inspectInfo,o=this.jSPlugin.id;if(this.isNeedRenderInspectInfo=bt(a.btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderHeader=bt(i.btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderFooter=bt(n.btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderInspectInfo)if(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")))document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-inspectInfoControl-left' style='display:flex;'></div><div id='").concat(this.jSPlugin.id,"-inspectInfoControl-right' style='display:flex'></div>");else{var r=document.createElement("div");r.setAttribute("id","".concat(this.jSPlugin.id,"-inspectInfoControl")),r.setAttribute("class","inspectInfo-controls"),r.innerHTML="<div id='".concat(this.jSPlugin.id,"-inspectInfoControl-left' class=\"inspectInfo-controls-left\" style='display:flex;overflow:hidden;'></div><div id='").concat(this.jSPlugin.id,"-inspectInfoControl-right' class=\"inspectInfo-controls-right\" style='display:flex;'></div>");var s={height:"58px",display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#000000",width:"".concat(this.jSPlugin.width+290,"px"),position:"relative","align-items":"center",background:"#ffffff","border-bottom":"1px solid #D9D9D9","box-sizing":"border-box"};r.style=In(s),document.getElementById("".concat(o,"-wrap")).insertBefore(r,document.getElementById(this.jSPlugin.id));var g=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(g)}),50)}else document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl"))&&document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")));if(this.isNeedRenderHeader)if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>");else{var c=document.createElement("div");c.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),c.setAttribute("class","header-controls"),c.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex; max-width: 70%; align-items: center; overflow: hidder;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' class=\"header-controls-right\" style='display:flex; align-items: center;'></div>");var l={height:"56px",display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:this.jSPlugin.width+"px",padding:"0 16px","box-sizing":"border-box",position:"relative","align-items":"center",background:"#000000"};c.style=In(l),document.getElementById("".concat(o,"-wrap")).insertBefore(c,document.getElementById(o));var I=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(I)}),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("56px","px"));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 d={position:"relative",display:"flex",height:"56px","flex-wrap":"wrap","justify-content":"center","z-index":999,top:0,color:"#FFFFFF",width:this.jSPlugin.width+"px","align-items":"center","background-color":"#000000","font-size":"14px"};C.style=In(d),C.innerHTML='\n <div id="'.concat(this.jSPlugin.id,"-audioControls\" class=\"footer-controls\" style='display:flex;justify-content: center;padding: 0 4%;width:100%;z-index:999;position: relative;'>\n <div id='").concat(this.jSPlugin.id,"-audioControls-left' class=\"footer-controls-left\" style='display:flex;margin-lefacti'></div><div id='").concat(this.jSPlugin.id,"-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div>\n </div>\n "),m(C,document.getElementById(o))}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")));this.isNeedRenderInspectInfo&&document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.background=a.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.color=a.color,a.btnList.map((function(e,t){e.isrender&&A.renderInspectInfo(e.iconId,e)}))),this.isNeedRenderHeader&&document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=i.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=i.color,i.btnList.map((function(e,t){e.isrender&&A.renderHeader(e.iconId,e)}))),this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=n.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=n.color,n.btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)}))),this.inspectMapWin=new qi(this.jSPlugin),this.inspectSmallWin=new cn(this.jSPlugin,this.inspectMode,this.inspectMapWin,this.changeInspectMode,this.decoderState)}},{key:"renderThemeData",value:function(){var A=this,e=this.decoderState.state.isEditing,t=this.themeData,i=t.inspectInfo,n=t.header,a=t.footer;if(this.isNeedRenderInspectInfo&&i&&(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.background=i.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.color=i.color.replace("-diy",""),i.btnList.map((function(e,t){e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId]))}))),this.isNeedRenderHeader&&n&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=n.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=n.color.replace("-diy",""),n.btnList&&n.btnList.map((function(e,t){e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId]))}))),this.isNeedRenderFooter&&a)document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=a.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=a.color.replace("-diy",""),a.btnList.map((function(t,i){if(t.isrender&&A.setDecoderState(s({},t.iconId,A.decoderState.state[t.iconId])),0==i&&!A.themeInited&&A.activeThemeStatus)var n=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(n),1!=A.themeData.customConfig.bellPoster||e?A.jSPlugin.play():A.jSPlugin.pluginStatus.loadingClear(),A.themeInited=!0)}),50)})),this.setDecoderState({cloudRec:"cloud.rec"===_(this.jSPlugin.url).type,rec:"rec"===_(this.jSPlugin.url).type,type:_(this.jSPlugin.url).type});else if(!this.themeInited&&this.activeThemeStatus)var o=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(o),A.themeData&&A.themeData.customConfig&&1==A.themeData.customConfig.bellPoster&&!e?A.jSPlugin.pluginStatus.loadingClear():A.jSPlugin.play(),A.themeInited=!0)}),50);var r=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(r),A.reSizeVideo(A.videoWidth,A.videoHeight))}),50);this.jSPlugin.Zoom||(this.jSPlugin.Zoom=new mi(this.jSPlugin)),this.getInspectDevInfo(this.jSPlugin,!0,!1)}},{key:"getInspectRecord",value:function(){var A=this;!function(A,e,t){var i={accessToken:A.accessToken||A.token.deviceToken.video,deviceSerial:_(A.url).deviceSerial},n="".concat(A.env.domain,"/api/service/devicekit/bodycamera/inspect/detail/latest");ki(n,"GET",i,(function(A){e&&e(A)}),(function(A){t&&t(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(this.jSPlugin,(function(e){if(200==e.meta.code&&e.data){var t=e.data;t.inspectRange&&A.inspectMapWin.createPolygon(t.inspectRange,"#407AFF","dashed",4,1,"#407AFF",.08),t.inspectPoints&&t.inspectPoints.length>0&&A.inspectMapWin.createInspectPoints(t.inspectPoints),"video"===A.inspectMode&&A.inspectMapWin.map.removeOverlay(A.inspectMapWin.inspectRange),document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectName"))&&t.inspectName&&(document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectName")).innerText=""+t.inspectName),document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectBeginTime"))&&t.beginTime&&(document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectBeginTime")).innerText="巡检开始时间:"+t.beginTime),document.getElementById("".concat(A.jSPlugin.id,"-header-inspectTime"))&&A.timer.createInterval("InspectTimer",(function(){document.getElementById("".concat(A.jSPlugin.id,"-header-inspectTime")).innerHTML=A.renderInspectTime(t.beginTime)}),1e3),document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectPerson"))&&t.inspectPerson&&(document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectPerson")).innerText="本地巡检员:"+t.inspectPerson),A.inspectInfo=t,t.inspectRecordId&&an(A.jSPlugin,t.inspectRecordId,(function(e){200==e.meta.code&&e.data&&(A.inspectMapWin.createTrack(e.data,!0),A.timer.createInterval("TraceTimer",(function(){t.inspectRecordId&&an(A.jSPlugin,t.inspectRecordId,(function(e){200==e.meta.code&&e.data&&A.inspectMapWin.createTrack(e.data,!1)}),(function(){}))}),5e3))}),(function(){})),A.InspectEvent=new gn(A.jSPlugin,t.inspectRecordId,A.timer)}else A.InspectEvent=new gn(A.jSPlugin,null,A.timer)}),(function(A){}))}},{key:"getInspectDevInfo",value:function(A){var e=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!function(A,e,t){var i={accessToken:A.accessToken||A.token.deviceToken.video,deviceSerial:_(A.url).deviceSerial},n="".concat(A.env.domain,"/api/service/devicekit/bodycamera");ki(n,"GET",i,(function(A){e&&e(A)}),(function(A){t&&t(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A,(function(n){n.meta&&200==n.meta.code&&n.data?1===n.data.status?(i&&!e.decoderState.state.play&&(e.jSPlugin.pluginStatus.loadingStart(e.jSPlugin.id),e.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"}),e.jSPlugin.play()),e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-global-box"),!1),document.getElementById("".concat(e.jSPlugin.id,"-header-deviceName"))&&(document.getElementById("".concat(e.jSPlugin.id,"-header-deviceName")).innerText="".concat(n.data.deviceName,"(").concat(n.data.deviceSerial,")"),document.getElementById("".concat(e.jSPlugin.id,"-header-deviceName")).setAttribute("title","".concat(n.data.deviceName,"(").concat(n.data.deviceSerial,")"))),document.getElementById("".concat(e.jSPlugin.id,"-header-signalType"))&&(document.getElementById("".concat(e.jSPlugin.id,"-header-signalType")).innerHTML=e.renderSignalType(n.data.signalType)),document.getElementById("".concat(e.jSPlugin.id,"-header-batteryStatus"))&&(document.getElementById("".concat(e.jSPlugin.id,"-header-batteryStatus")).innerHTML=e.renderBatteryStatus(n.data.batteryStatus)),e.timer.createInterval("InspectDevInfoTimer",(function(){e.getInspectDevInfo(A,!1,!1)}),3e5),t&&e.getInspectRecord()):(e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"当前设备未在巡检中",refreshBtn:"刷新",refreshShow:!0},(function(){e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-no-inspect-box"),!1),e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!0),e.getInspectDevInfo(A,!0,!0)}))):(e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:n.meta.message,refreshShow:!1}))}),(function(){e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-global-box"),!1)}))}},{key:"fetchThemeData",value:function(A){var e=this;Di(this.jSPlugin,A,(function(A){if(0!==A.meta.code||!A.data)return e.activeThemeStatus=!1,e.jSPlugin.pluginStatus.loadingClear(),"111021"==A.meta.code?(e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"无效的模板id",refreshBtn:"刷新",refreshShow:!1}),void(e.activeThemeStatusTxt="无效的模板id")):"111023"==A.meta.code?(e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"您的试用特权已到期,需前往轻应用控制台购买后使用。",refreshBtn:"刷新",refreshShow:!1}),void(e.activeThemeStatusTxt="试用特权已到期")):(e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"模板未激活,请先在开放平台轻应用控制台购买模板",refreshBtn:"刷新",refreshShow:!1}),void(e.activeThemeStatusTxt="模板未激活"));e.activeThemeStatus=!0,e.themeData=A.data,e.jSPlugin.capacity?(e.initThemeData(),e.renderThemeData()):setTimeout((function(){e.initThemeData(),e.renderThemeData()}),300)}),(function(){e.themeData=ln,e.themeData.header&&(e.themeData.header.btnList=e.themeData.header.btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.themeData.footer&&(e.themeData.footer.btnList=e.themeData.footer.btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.initThemeData(),e.renderThemeData()}))}},{key:"reSizeVideo",value:function(A,e){if(document.getElementById("".concat(this.jSPlugin.id)).style.width=A+"px",document.getElementById("".concat(this.jSPlugin.id)).style.height=e+"px",this.jSPlugin&&this.jSPlugin.bPlay)this.jSPlugin.JS_Resize(A,e);else{document.getElementById("".concat(this.jSPlugin.id,"-player"))&&(document.getElementById("".concat(this.jSPlugin.id,"-player")).width=A,document.getElementById("".concat(this.jSPlugin.id,"-player")).height=e,document.getElementById("".concat(this.jSPlugin.id,"-player")).style.width=A+"px",document.getElementById("".concat(this.jSPlugin.id,"-player")).style.height=e+"px",document.getElementById("".concat(this.jSPlugin.id,"-container-0")).style.height=e+"px");var t=1;if(document.getElementById("".concat(this.jSPlugin.id,"canvas0")))navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)&&(t=2),document.getElementById("".concat(this.jSPlugin.id,"canvas0")).style.width=A*t+"px",document.getElementById("".concat(this.jSPlugin.id,"canvas0")).style.height=e*t+"px",document.getElementById("".concat(this.jSPlugin.id,"canvas0")).width=A*t,document.getElementById("".concat(this.jSPlugin.id,"canvas0")).height=e*t,document.getElementById("".concat(this.jSPlugin.id,"canvas0")).parentNode.style.width=A*t+"px",document.getElementById("".concat(this.jSPlugin.id,"canvas0")).parentNode.style.height=e*t+"px",document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).height=e*t}}},{key:"reSize",value:function(A,e){var t=.3333*A,i=.3333*e;document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.width=A+this.jSPlugin.inspectVideoWidth+"px"),document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.width=A+"px"),document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.width=A+"px"),"video"===this.jSPlugin.Theme.inspectMode?(this.reSizeVideo(A,e),document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.top=0),document.getElementById("".concat(this.jSPlugin.id,"-mapbox")).style.width=t+"px",document.getElementById("".concat(this.jSPlugin.id,"-mapbox")).style.height=i+"px"):(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.top=e+"px"),this.reSizeVideo(t,i),document.getElementById("".concat(this.jSPlugin.id,"-mapbox")).style.width=A+"px",document.getElementById("".concat(this.jSPlugin.id,"-mapbox")).style.height=e+"px"),document.getElementById("".concat(this.jSPlugin.id,"-miniToggle")).style.bottom=i/2+96-30+"px",document.getElementById("".concat(this.jSPlugin.id,"-miniToggle")).style.right=this.jSPlugin.inspectVideoWidth+t+"px"}}])}(),hn=function(){return o((function A(e){var i=this;if(t(this,A),s(this,"changeInspectMode",(function(A){i.inspectMode=A})),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.inspectMode="video",this.autoFocus=0,this.decoderState={state:{isEditing:!1,play:!1,sound:!1,recordvideo:!1,recordCount:"00:00",talk:!1,mute:!1,cloudRec:"cloud.rec"===_(e.url).type,rec:"rec"===_(e.url).type,type:_(e.url).type}},this.isMobile=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i),void 0!==e.isMobile&&(this.isMobile=e.isMobile),this.themeData=ln,"themeData"==this.jSPlugin.themeId&&(this.themeData=this.jSPlugin.params.themeData),this.timer||(this.timer=new Xi(e)),this.jSPlugin.themeId)if(this.isMobile||(this.inspect=new dn(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState,this.inspectMode,this.changeInspectMode,this.timer)),"themeData"===this.jSPlugin.themeId)this.themeData=this.jSPlugin.params.themeData,this.inspect.initThemeData(),this.inspect.renderThemeData();else this.inspect.fetchThemeData(this.jSPlugin.themeId);this.jSPlugin.Talk||(this.jSPlugin.Talk=new li(this.jSPlugin)),f("".concat(this.jSPlugin.staticPath,"/css/theme.css")),f("".concat(this.jSPlugin.staticPath,"/css/component.css")),f("".concat(this.jSPlugin.staticPath,"/css/inspectTheme.css"))}),[{key:"setDecoderState",value:function(A,e){var t=this,i="#FFFFFF",n="#1890FF";Object.keys(A).map((function(e){switch(e){case"talk":document.getElementById("".concat(t.jSPlugin.id,"-talk"))&&(document.getElementById("".concat(t.jSPlugin.id,"-talk")).className=A[e]?"active":"",document.getElementById("".concat(t.jSPlugin.id,"-talk-content")).childNodes[1].style.fill=A[e]?n:i,document.getElementById("".concat(t.jSPlugin.id,"-talk-content")).childNodes[2].style.color=A[e]?n:i);break;case"sound":document.getElementById("".concat(t.jSPlugin.id,"-sound"))&&(A[e]?(document.getElementById("".concat(t.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(t.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:none",document.getElementById("".concat(t.jSPlugin.id,"-sound")).className=A[e]?"active":"",document.getElementById("".concat(t.jSPlugin.id,"-sound-content")).childNodes[0].children[1].style.fill=A[e]?n:i,document.getElementById("".concat(t.jSPlugin.id,"-sound-label")).style.color=A[e]?n:i):(document.getElementById("".concat(t.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(t.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:none",document.getElementById("".concat(t.jSPlugin.id,"-sound")).className=A[e]?"active":"",document.getElementById("".concat(t.jSPlugin.id,"-sound-label")).style.color=A[e]?n:i))}t.decoderState.state=Object.assign(t.decoderState.state,A)}))}},{key:"setDisabled",value:function(A){var e=this.decoderState.state,t=e.sound;e.hd,null!=document.getElementById("".concat(this.jSPlugin.id,t?"-sound-icon":"-nosound-icon"))&&document.getElementById("".concat(this.jSPlugin.id,t?"-sound-icon":"-nosound-icon")).setAttribute("style",A?"cursor: not-allowed;fill: gray":"cursor: default"),null!=document.getElementById("".concat(this.jSPlugin.id,"-sound-label"))&&document.getElementById("".concat(this.jSPlugin.id,"-sound-label")).setAttribute("style",A?"cursor: not-allowed; color: gray":"cursor: default"),null!=document.getElementById("".concat(this.jSPlugin.id,"-talk-icon"))&&document.getElementById("".concat(this.jSPlugin.id,"-talk-icon")).setAttribute("style",A?"cursor: not-allowed;fill: gray":"cursor: default"),null!=document.getElementById("".concat(this.jSPlugin.id,"-talk-label"))&&document.getElementById("".concat(this.jSPlugin.id,"-talk-label")).setAttribute("style",A?"cursor: not-allowed; color: gray":"cursor: default")}},{key:"inspectEnding",value:function(){var A=document.createElement("div");A.id="".concat(this.jSPlugin.id,"-inspect-ending-box"),A.style="width:100%; position: absolute; z-index: 10000; top:58px; bottom:0; left:0; background: #ffffff;",A.innerHTML='<div style="\n overflow: auto;\n box-sizing: border-box;\n font-size: 14px;\n color: #595959;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n ">\n <div>\n <div style="text-align:center; height: 21px;">\n <svg t="1689074472491" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7172" xmlns:xlink="http://www.w3.org/1999/xlink" width="21" height="21"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z" fill="#FF4D4F" p-id="7173"></path></svg>\n </div>\n <div style="color: #595959; font-size:14px; margin: 5px 0 16px;font-weight: 400; text-align: center;">巡检已结束</div>\n </div>\n </div>\n ',document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(A),this.jSPlugin.Zoom&&this.jSPlugin.Zoom.stopZoom()}}])}(),Bn=function(){return o((function A(){t(this,A),this.events={}}),[{key:"on",value:function(A,e){A&&e&&(this.events[A]=this.events[A]||[],this.events[A].push(e))}},{key:"emit",value:function(A,e){A&&this.events[A]&&this.events[A].forEach((function(A){return A(e)}))}},{key:"off",value:function(A,e){A&&e&&this.events[A]&&this.events[A].splice(this.events[A].indexOf(e),1)}},{key:"once",value:function(A,e){var t=this;this.on(A,(function i(){var n=Array.prototype.slice.call(arguments);e.apply(null,n),t.off(A,i)}))}},{key:"removeAllListener",value:function(){this.events={}}}])}(),un=function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0,n=void 0,a=void 0,o=[];return function(){var s=function(A){return"function"==typeof A?A():A}(e),g=(new Date).getTime(),c=!i||g-i>s;i=g;for(var l=arguments.length,I=Array(l),C=0;C<l;C++)I[C]=arguments[C];if(c&&t.leading)return t.accumulate?Promise.resolve(A.call(this,[I])).then((function(A){return A[0]})):Promise.resolve(A.call.apply(A,[this].concat(I)));if(n?clearTimeout(a):n=function(){var A={};return A.promise=new Promise((function(e,t){A.resolve=e,A.reject=t})),A}(),o.push(I),a=setTimeout(r.bind(this),s),t.accumulate){var d=o.length-1;return n.promise.then((function(A){return A[d]}))}return n.promise};function r(){var e=n;clearTimeout(a),Promise.resolve(t.accumulate?A.call(this,o):A.apply(this,o[o.length-1])).then(e.resolve,e.reject),o=[],n=null}};var En=R(un);function fn(A){document.getElementById("".concat(A,"-player"))&&document.getElementById("".concat(A,"-container-0")).removeChild(document.getElementById("".concat(A,"-player")))}!function(){var A;function e(A){var e=0;return function(){return e<A.length?{done:!1,value:A[e++]}:{done:!0}}}var t="function"==typeof Object.defineProperties?Object.defineProperty:function(A,e,t){return A==Array.prototype||A==Object.prototype||(A[e]=t.value),A};var i,n=function(A){A=["object"==typeof globalThis&&globalThis,A,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof F&&F];for(var e=0;e<A.length;++e){var t=A[e];if(t&&t.Math==Math)return t}throw Error("Cannot find global object")}(this);function a(A,e){if(e)A:{var i=n;A=A.split(".");for(var a=0;a<A.length-1;a++){var o=A[a];if(!(o in i))break A;i=i[o]}(e=e(a=i[A=A[A.length-1]]))!=a&&null!=e&&t(i,A,{configurable:!0,writable:!0,value:e})}}function o(A){return(A={next:A})[Symbol.iterator]=function(){return this},A}function r(A){var t="undefined"!=typeof Symbol&&Symbol.iterator&&A[Symbol.iterator];return t?t.call(A):{next:e(A)}}if(a("Symbol",(function(A){function e(A,e){this.A=A,t(this,"description",{configurable:!0,writable:!0,value:e})}if(A)return A;e.prototype.toString=function(){return this.A};var i="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",n=0;return function A(t){if(this instanceof A)throw new TypeError("Symbol is not a constructor");return new e(i+(t||"")+"_"+n++,t)}})),a("Symbol.iterator",(function(A){if(A)return A;A=Symbol("Symbol.iterator");for(var i="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),a=0;a<i.length;a++){var r=n[i[a]];"function"==typeof r&&"function"!=typeof r.prototype[A]&&t(r.prototype,A,{configurable:!0,writable:!0,value:function(){return o(e(this))}})}return A})),"function"==typeof Object.setPrototypeOf)i=Object.setPrototypeOf;else{var s;A:{var g={};try{g.__proto__={a:!0},s=g.a;break A}catch(A){}s=!1}i=s?function(A,e){if(A.__proto__=e,A.__proto__!==e)throw new TypeError(A+" is not extensible");return A}:null}var c=i;function l(){this.m=!1,this.j=null,this.v=void 0,this.h=1,this.u=this.C=0,this.l=null}function I(A){if(A.m)throw new TypeError("Generator is already running");A.m=!0}function C(A,e){return A.h=3,{value:e}}function d(A){this.g=new l,this.G=A}function h(A,e,t,i){try{var n=e.call(A.g.j,t);if(!(n instanceof Object))throw new TypeError("Iterator result "+n+" is not an object");if(!n.done)return A.g.m=!1,n;var a=n.value}catch(e){return A.g.j=null,A.g.s(e),B(A)}return A.g.j=null,i.call(A.g,a),B(A)}function B(A){for(;A.g.h;)try{var e=A.G(A.g);if(e)return A.g.m=!1,{value:e.value,done:!1}}catch(e){A.g.v=void 0,A.g.s(e)}if(A.g.m=!1,A.g.l){if(e=A.g.l,A.g.l=null,e.F)throw e.D;return{value:e.return,done:!0}}return{value:void 0,done:!0}}function u(A){this.next=function(e){return A.o(e)},this.throw=function(e){return A.s(e)},this.return=function(e){return function(A,e){I(A.g);var t=A.g.j;return t?h(A,"return"in t?t.return:function(A){return{value:A,done:!0}},e,A.g.return):(A.g.return(e),B(A))}(A,e)},this[Symbol.iterator]=function(){return this}}function E(A,e){return e=new u(new d(e)),c&&A.prototype&&c(e,A.prototype),e}if(l.prototype.o=function(A){this.v=A},l.prototype.s=function(A){this.l={D:A,F:!0},this.h=this.C||this.u},l.prototype.return=function(A){this.l={return:A},this.h=this.u},d.prototype.o=function(A){return I(this.g),this.g.j?h(this,this.g.j.next,A,this.g.o):(this.g.o(A),B(this))},d.prototype.s=function(A){return I(this.g),this.g.j?h(this,this.g.j.throw,A,this.g.o):(this.g.s(A),B(this))},a("Array.prototype.entries",(function(A){return A||function(){return function(A,e){A instanceof String&&(A+="");var t=0,i=!1,n={next:function(){if(!i&&t<A.length){var n=t++;return{value:e(n,A[n]),done:!1}}return i=!0,{done:!0,value:void 0}}};return n[Symbol.iterator]=function(){return n},n}(this,(function(A,e){return[A,e]}))}})),"undefined"!=typeof Blob&&("undefined"==typeof FormData||!FormData.prototype.keys)){var f=function(A,e){for(var t=0;t<A.length;t++)e(A[t])},Q=function(A){return A.replace(/\r?\n|\r/g,"\r\n")},x=function(A,e,t){return e instanceof Blob?(t=void 0!==t?String(t+""):"string"==typeof e.name?e.name:"blob",e.name===t&&"[object Blob]"!==Object.prototype.toString.call(e)||(e=new File([e],t)),[String(A),e]):[String(A),String(e)]},p=function(A,e){if(A.length<e)throw new TypeError(e+" argument required, but only "+A.length+" present.")},m="object"==typeof globalThis?globalThis:"object"==typeof window?window:"object"==typeof self?self:this,y=m.FormData,_=m.XMLHttpRequest&&m.XMLHttpRequest.prototype.send,S=m.Request&&m.fetch,D=m.navigator&&m.navigator.sendBeacon,w=m.Element&&m.Element.prototype,v=m.Symbol&&Symbol.toStringTag;v&&(Blob.prototype[v]||(Blob.prototype[v]="Blob"),"File"in m&&!File.prototype[v]&&(File.prototype[v]="File"));try{new File([],"")}catch(A){m.File=function(A,e,t){return A=new Blob(A,t||{}),Object.defineProperties(A,{name:{value:e},lastModified:{value:+(t&&void 0!==t.lastModified?new Date(t.lastModified):new Date)},toString:{value:function(){return"[object File]"}}}),v&&Object.defineProperty(A,v,{value:"File"}),A}}var b=function(A){return A.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")},R=function(A){this.i=[];var e=this;A&&f(A.elements,(function(A){if(A.name&&!A.disabled&&"submit"!==A.type&&"button"!==A.type&&!A.matches("form fieldset[disabled] *"))if("file"===A.type){var t=A.files&&A.files.length?A.files:[new File([],"",{type:"application/octet-stream"})];f(t,(function(t){e.append(A.name,t)}))}else"select-multiple"===A.type||"select-one"===A.type?f(A.options,(function(t){!t.disabled&&t.selected&&e.append(A.name,t.value)})):"checkbox"===A.type||"radio"===A.type?A.checked&&e.append(A.name,A.value):(t="textarea"===A.type?Q(A.value):A.value,e.append(A.name,t))}))};if((A=R.prototype).append=function(A,e,t){p(arguments,2),this.i.push(x(A,e,t))},A.delete=function(A){p(arguments,1);var e=[];A=String(A),f(this.i,(function(t){t[0]!==A&&e.push(t)})),this.i=e},A.entries=function A(){var e,t=this;return E(A,(function(A){if(1==A.h&&(e=0),3!=A.h)return e<t.i.length?A=C(A,t.i[e]):(A.h=0,A=void 0),A;e++,A.h=2}))},A.forEach=function(A,e){p(arguments,1);for(var t=r(this),i=t.next();!i.done;i=t.next()){var n=r(i.value);i=n.next().value,n=n.next().value,A.call(e,n,i,this)}},A.get=function(A){p(arguments,1);var e=this.i;A=String(A);for(var t=0;t<e.length;t++)if(e[t][0]===A)return e[t][1];return null},A.getAll=function(A){p(arguments,1);var e=[];return A=String(A),f(this.i,(function(t){t[0]===A&&e.push(t[1])})),e},A.has=function(A){p(arguments,1),A=String(A);for(var e=0;e<this.i.length;e++)if(this.i[e][0]===A)return!0;return!1},A.keys=function A(){var e,t,i,n,a=this;return E(A,(function(A){if(1==A.h&&(e=r(a),t=e.next()),3!=A.h)return t.done?void(A.h=0):(i=t.value,n=r(i),C(A,n.next().value));t=e.next(),A.h=2}))},A.set=function(A,e,t){p(arguments,2),A=String(A);var i=[],n=x(A,e,t),a=!0;f(this.i,(function(e){e[0]===A?a&&(a=!i.push(n)):i.push(e)})),a&&i.push(n),this.i=i},A.values=function A(){var e,t,i,n,a=this;return E(A,(function(A){if(1==A.h&&(e=r(a),t=e.next()),3!=A.h)return t.done?void(A.h=0):(i=t.value,(n=r(i)).next(),C(A,n.next().value));t=e.next(),A.h=2}))},R.prototype._asNative=function(){for(var A=new y,e=r(this),t=e.next();!t.done;t=e.next()){var i=r(t.value);t=i.next().value,i=i.next().value,A.append(t,i)}return A},R.prototype._blob=function(){var A="----formdata-polyfill-"+Math.random(),e=[],t="--"+A+'\r\nContent-Disposition: form-data; name="';return this.forEach((function(A,i){return"string"==typeof A?e.push(t+b(Q(i))+'"\r\n\r\n'+Q(A)+"\r\n"):e.push(t+b(Q(i))+'"; filename="'+b(A.name)+'"\r\nContent-Type: '+(A.type||"application/octet-stream")+"\r\n\r\n",A,"\r\n")})),e.push("--"+A+"--"),new Blob(e,{type:"multipart/form-data; boundary="+A})},R.prototype[Symbol.iterator]=function(){return this.entries()},R.prototype.toString=function(){return"[object FormData]"},w&&!w.matches&&(w.matches=w.matchesSelector||w.mozMatchesSelector||w.msMatchesSelector||w.oMatchesSelector||w.webkitMatchesSelector||function(A){for(var e=(A=(this.document||this.ownerDocument).querySelectorAll(A)).length;0<=--e&&A.item(e)!==this;);return-1<e}),v&&(R.prototype[v]="FormData"),_){var k=m.XMLHttpRequest.prototype.setRequestHeader;m.XMLHttpRequest.prototype.setRequestHeader=function(A,e){k.call(this,A,e),"content-type"===A.toLowerCase()&&(this.B=!0)},m.XMLHttpRequest.prototype.send=function(A){A instanceof R?(A=A._blob(),this.B||this.setRequestHeader("Content-Type",A.type),_.call(this,A)):_.call(this,A)}}S&&(m.fetch=function(A,e){return e&&e.body&&e.body instanceof R&&(e.body=e.body._blob()),S.call(this,A,e)}),D&&(m.navigator.sendBeacon=function(A,e){return e instanceof R&&(e=e._asNative()),D.call(this,A,e)}),m.FormData=R}}();var Qn=function(A,e){if(void 0===A)return e.themeData?{templateType:"themeData",templateId:"themeData"}:{templateType:"local",templateId:""};if("string"==typeof A){if(32===A.length)return{templateType:"remote",templateId:A};if(-1!==["theme","standard"].indexOf(A))return"simple"===A&&void 0===e.header&&void 0===e.footer?{templateType:"local",templateId:""}:{templateType:"iframe",templateId:A};if(-1!==["pcLive","pcRec","mobileLive","mobileRec","noData","security","voice","simple","mobileCall","miniRec"].indexOf(A))return-1!=e.url.indexOf("rec")&&"simple"!=e.template&&"miniRec"!=e.id?{templateType:"local",templateId:w()?"mobileRec":"pcRec"}:{templateType:"local",templateId:A};if(e&&e.isCall)return{templateType:"invalid",templateId:A}}},xn=function(){var A=window.navigator.userAgent.toLowerCase(),e=(/version.*safari/.test(A),/chrome/.test(A));/gecko/.test(A)&&/webkit/.test(A);if(w())return!1;if(e){return function(){for(var A=window.navigator.userAgent.split(" "),e="",t=0;t<A.length;t++)/chrome/i.test(A[t])&&(e=A[t]);return!!e&&Number(e.split("/")[1].split(".")[0])}()>91&&!!window.SharedArrayBuffer}return!1};var pn=function(A){if(console.log("err",A),A&&A.retcode)return String(A.retcode);if(A&&A.code){var e=String(A.code);return"1".concat(e.padStart(5,"0"))}if(A&&A.errorCode){var t=String(A.errorCode);return"39".concat(t.padStart(4,"0"))}return"400001"};var mn={exports:{}};!function(A){!function(e,t){A.exports=e.document?t(e,!0):function(A){if(!A.document)throw new Error("jQuery requires a window with a document");return t(A)}}("undefined"!=typeof window?window:F,(function(A,e){var t=[],i=Object.getPrototypeOf,n=t.slice,a=t.flat?function(A){return t.flat.call(A)}:function(A){return t.concat.apply([],A)},o=t.push,r=t.indexOf,s={},g=s.toString,c=s.hasOwnProperty,l=c.toString,I=l.call(Object),C={},d=function(A){return"function"==typeof A&&"number"!=typeof A.nodeType&&"function"!=typeof A.item},h=function(A){return null!=A&&A===A.window},B=A.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function E(A,e,t){var i,n,a=(t=t||B).createElement("script");if(a.text=A,e)for(i in u)(n=e[i]||e.getAttribute&&e.getAttribute(i))&&a.setAttribute(i,n);t.head.appendChild(a).parentNode.removeChild(a)}function f(A){return null==A?A+"":"object"==typeof A||"function"==typeof A?s[g.call(A)]||"object":typeof A}var Q="3.7.1",x=/HTML$/i,p=function(A,e){return new p.fn.init(A,e)};function m(A){var e=!!A&&"length"in A&&A.length,t=f(A);return!d(A)&&!h(A)&&("array"===t||0===e||"number"==typeof e&&e>0&&e-1 in A)}function y(A,e){return A.nodeName&&A.nodeName.toLowerCase()===e.toLowerCase()}p.fn=p.prototype={jquery:Q,constructor:p,length:0,toArray:function(){return n.call(this)},get:function(A){return null==A?n.call(this):A<0?this[A+this.length]:this[A]},pushStack:function(A){var e=p.merge(this.constructor(),A);return e.prevObject=this,e},each:function(A){return p.each(this,A)},map:function(A){return this.pushStack(p.map(this,(function(e,t){return A.call(e,t,e)})))},slice:function(){return this.pushStack(n.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(p.grep(this,(function(A,e){return(e+1)%2})))},odd:function(){return this.pushStack(p.grep(this,(function(A,e){return e%2})))},eq:function(A){var e=this.length,t=+A+(A<0?e:0);return this.pushStack(t>=0&&t<e?[this[t]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:t.sort,splice:t.splice},p.extend=p.fn.extend=function(){var A,e,t,i,n,a,o=arguments[0]||{},r=1,s=arguments.length,g=!1;for("boolean"==typeof o&&(g=o,o=arguments[r]||{},r++),"object"==typeof o||d(o)||(o={}),r===s&&(o=this,r--);r<s;r++)if(null!=(A=arguments[r]))for(e in A)i=A[e],"__proto__"!==e&&o!==i&&(g&&i&&(p.isPlainObject(i)||(n=Array.isArray(i)))?(t=o[e],a=n&&!Array.isArray(t)?[]:n||p.isPlainObject(t)?t:{},n=!1,o[e]=p.extend(g,a,i)):void 0!==i&&(o[e]=i));return o},p.extend({expando:"jQuery"+(Q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(A){throw new Error(A)},noop:function(){},isPlainObject:function(A){var e,t;return!(!A||"[object Object]"!==g.call(A))&&(!(e=i(A))||"function"==typeof(t=c.call(e,"constructor")&&e.constructor)&&l.call(t)===I)},isEmptyObject:function(A){var e;for(e in A)return!1;return!0},globalEval:function(A,e,t){E(A,{nonce:e&&e.nonce},t)},each:function(A,e){var t,i=0;if(m(A))for(t=A.length;i<t&&!1!==e.call(A[i],i,A[i]);i++);else for(i in A)if(!1===e.call(A[i],i,A[i]))break;return A},text:function(A){var e,t="",i=0,n=A.nodeType;if(!n)for(;e=A[i++];)t+=p.text(e);return 1===n||11===n?A.textContent:9===n?A.documentElement.textContent:3===n||4===n?A.nodeValue:t},makeArray:function(A,e){var t=e||[];return null!=A&&(m(Object(A))?p.merge(t,"string"==typeof A?[A]:A):o.call(t,A)),t},inArray:function(A,e,t){return null==e?-1:r.call(e,A,t)},isXMLDoc:function(A){var e=A&&A.namespaceURI,t=A&&(A.ownerDocument||A).documentElement;return!x.test(e||t&&t.nodeName||"HTML")},merge:function(A,e){for(var t=+e.length,i=0,n=A.length;i<t;i++)A[n++]=e[i];return A.length=n,A},grep:function(A,e,t){for(var i=[],n=0,a=A.length,o=!t;n<a;n++)!e(A[n],n)!==o&&i.push(A[n]);return i},map:function(A,e,t){var i,n,o=0,r=[];if(m(A))for(i=A.length;o<i;o++)null!=(n=e(A[o],o,t))&&r.push(n);else for(o in A)null!=(n=e(A[o],o,t))&&r.push(n);return a(r)},guid:1,support:C}),"function"==typeof Symbol&&(p.fn[Symbol.iterator]=t[Symbol.iterator]),p.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(A,e){s["[object "+e+"]"]=e.toLowerCase()}));var _=t.pop,S=t.sort,D=t.splice,w="[\\x20\\t\\r\\n\\f]",v=new RegExp("^"+w+"+|((?:^|[^\\\\])(?:\\\\.)*)"+w+"+$","g");p.contains=function(A,e){var t=e&&e.parentNode;return A===t||!(!t||1!==t.nodeType||!(A.contains?A.contains(t):A.compareDocumentPosition&&16&A.compareDocumentPosition(t)))};var b=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function F(A,e){return e?"\0"===A?"�":A.slice(0,-1)+"\\"+A.charCodeAt(A.length-1).toString(16)+" ":"\\"+A}p.escapeSelector=function(A){return(A+"").replace(b,F)};var R=B,k=o;!function(){var e,i,a,o,s,g,l,I,d,h,B=k,u=p.expando,E=0,f=0,Q=AA(),x=AA(),m=AA(),b=AA(),F=function(A,e){return A===e&&(s=!0),0},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",N="(?:\\\\[\\da-fA-F]{1,6}"+w+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",T="\\["+w+"*("+N+")(?:"+w+"*([*^$|!~]?=)"+w+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+w+"*\\]",M=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+T+")*)|.*)\\)|)",L=new RegExp(w+"+","g"),Y=new RegExp("^"+w+"*,"+w+"*"),G=new RegExp("^"+w+"*([>+~]|"+w+")"+w+"*"),U=new RegExp(w+"|>"),J=new RegExp(M),H=new RegExp("^"+N+"$"),K={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N+"|[*])"),ATTR:new RegExp("^"+T),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+w+"*(even|odd|(([+-]|)(\\d*)n|)"+w+"*(?:([+-]|)"+w+"*(\\d+)|))"+w+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+w+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+w+"*((?:-\\d)?\\d*)"+w+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,O=/^h\d$/i,j=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,W=/[+~]/,Z=new RegExp("\\\\[\\da-fA-F]{1,6}"+w+"?|\\\\([^\\r\\n\\f])","g"),X=function(A,e){var t="0x"+A.slice(1)-65536;return e||(t<0?String.fromCharCode(t+65536):String.fromCharCode(t>>10|55296,1023&t|56320))},q=function(){sA()},z=IA((function(A){return!0===A.disabled&&y(A,"fieldset")}),{dir:"parentNode",next:"legend"});try{B.apply(t=n.call(R.childNodes),R.childNodes),t[R.childNodes.length].nodeType}catch(A){B={apply:function(A,e){k.apply(A,n.call(e))},call:function(A){k.apply(A,n.call(arguments,1))}}}function $(A,e,t,i){var n,a,o,r,s,c,l,h=e&&e.ownerDocument,E=e?e.nodeType:9;if(t=t||[],"string"!=typeof A||!A||1!==E&&9!==E&&11!==E)return t;if(!i&&(sA(e),e=e||g,I)){if(11!==E&&(s=j.exec(A)))if(n=s[1]){if(9===E){if(!(o=e.getElementById(n)))return t;if(o.id===n)return B.call(t,o),t}else if(h&&(o=h.getElementById(n))&&$.contains(e,o)&&o.id===n)return B.call(t,o),t}else{if(s[2])return B.apply(t,e.getElementsByTagName(A)),t;if((n=s[3])&&e.getElementsByClassName)return B.apply(t,e.getElementsByClassName(n)),t}if(!(b[A+" "]||d&&d.test(A))){if(l=A,h=e,1===E&&(U.test(A)||G.test(A))){for((h=W.test(A)&&rA(e.parentNode)||e)==e&&C.scope||((r=e.getAttribute("id"))?r=p.escapeSelector(r):e.setAttribute("id",r=u)),a=(c=cA(A)).length;a--;)c[a]=(r?"#"+r:":scope")+" "+lA(c[a]);l=c.join(",")}try{return B.apply(t,h.querySelectorAll(l)),t}catch(e){b(A,!0)}finally{r===u&&e.removeAttribute("id")}}}return EA(A.replace(v,"$1"),e,t,i)}function AA(){var A=[];return function e(t,n){return A.push(t+" ")>i.cacheLength&&delete e[A.shift()],e[t+" "]=n}}function eA(A){return A[u]=!0,A}function tA(A){var e=g.createElement("fieldset");try{return!!A(e)}catch(A){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function iA(A){return function(e){return y(e,"input")&&e.type===A}}function nA(A){return function(e){return(y(e,"input")||y(e,"button"))&&e.type===A}}function aA(A){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===A:e.disabled===A:e.isDisabled===A||e.isDisabled!==!A&&z(e)===A:e.disabled===A:"label"in e&&e.disabled===A}}function oA(A){return eA((function(e){return e=+e,eA((function(t,i){for(var n,a=A([],t.length,e),o=a.length;o--;)t[n=a[o]]&&(t[n]=!(i[n]=t[n]))}))}))}function rA(A){return A&&void 0!==A.getElementsByTagName&&A}function sA(A){var e,t=A?A.ownerDocument||A:R;return t!=g&&9===t.nodeType&&t.documentElement?(l=(g=t).documentElement,I=!p.isXMLDoc(g),h=l.matches||l.webkitMatchesSelector||l.msMatchesSelector,l.msMatchesSelector&&R!=g&&(e=g.defaultView)&&e.top!==e&&e.addEventListener("unload",q),C.getById=tA((function(A){return l.appendChild(A).id=p.expando,!g.getElementsByName||!g.getElementsByName(p.expando).length})),C.disconnectedMatch=tA((function(A){return h.call(A,"*")})),C.scope=tA((function(){return g.querySelectorAll(":scope")})),C.cssHas=tA((function(){try{return g.querySelector(":has(*,:jqfake)"),!1}catch(A){return!0}})),C.getById?(i.filter.ID=function(A){var e=A.replace(Z,X);return function(A){return A.getAttribute("id")===e}},i.find.ID=function(A,e){if(void 0!==e.getElementById&&I){var t=e.getElementById(A);return t?[t]:[]}}):(i.filter.ID=function(A){var e=A.replace(Z,X);return function(A){var t=void 0!==A.getAttributeNode&&A.getAttributeNode("id");return t&&t.value===e}},i.find.ID=function(A,e){if(void 0!==e.getElementById&&I){var t,i,n,a=e.getElementById(A);if(a){if((t=a.getAttributeNode("id"))&&t.value===A)return[a];for(n=e.getElementsByName(A),i=0;a=n[i++];)if((t=a.getAttributeNode("id"))&&t.value===A)return[a]}return[]}}),i.find.TAG=function(A,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(A):e.querySelectorAll(A)},i.find.CLASS=function(A,e){if(void 0!==e.getElementsByClassName&&I)return e.getElementsByClassName(A)},d=[],tA((function(A){var e;l.appendChild(A).innerHTML="<a id='"+u+"' href='' disabled='disabled'></a><select id='"+u+"-\r\\' disabled='disabled'><option selected=''></option></select>",A.querySelectorAll("[selected]").length||d.push("\\["+w+"*(?:value|"+P+")"),A.querySelectorAll("[id~="+u+"-]").length||d.push("~="),A.querySelectorAll("a#"+u+"+*").length||d.push(".#.+[+~]"),A.querySelectorAll(":checked").length||d.push(":checked"),(e=g.createElement("input")).setAttribute("type","hidden"),A.appendChild(e).setAttribute("name","D"),l.appendChild(A).disabled=!0,2!==A.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(e=g.createElement("input")).setAttribute("name",""),A.appendChild(e),A.querySelectorAll("[name='']").length||d.push("\\["+w+"*name"+w+"*="+w+"*(?:''|\"\")")})),C.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),F=function(A,e){if(A===e)return s=!0,0;var t=!A.compareDocumentPosition-!e.compareDocumentPosition;return t||(1&(t=(A.ownerDocument||A)==(e.ownerDocument||e)?A.compareDocumentPosition(e):1)||!C.sortDetached&&e.compareDocumentPosition(A)===t?A===g||A.ownerDocument==R&&$.contains(R,A)?-1:e===g||e.ownerDocument==R&&$.contains(R,e)?1:o?r.call(o,A)-r.call(o,e):0:4&t?-1:1)},g):g}for(e in $.matches=function(A,e){return $(A,null,null,e)},$.matchesSelector=function(A,e){if(sA(A),I&&!b[e+" "]&&(!d||!d.test(e)))try{var t=h.call(A,e);if(t||C.disconnectedMatch||A.document&&11!==A.document.nodeType)return t}catch(A){b(e,!0)}return $(e,g,null,[A]).length>0},$.contains=function(A,e){return(A.ownerDocument||A)!=g&&sA(A),p.contains(A,e)},$.attr=function(A,e){(A.ownerDocument||A)!=g&&sA(A);var t=i.attrHandle[e.toLowerCase()],n=t&&c.call(i.attrHandle,e.toLowerCase())?t(A,e,!I):void 0;return void 0!==n?n:A.getAttribute(e)},$.error=function(A){throw new Error("Syntax error, unrecognized expression: "+A)},p.uniqueSort=function(A){var e,t=[],i=0,a=0;if(s=!C.sortStable,o=!C.sortStable&&n.call(A,0),S.call(A,F),s){for(;e=A[a++];)e===A[a]&&(i=t.push(a));for(;i--;)D.call(A,t[i],1)}return o=null,A},p.fn.uniqueSort=function(){return this.pushStack(p.uniqueSort(n.apply(this)))},i=p.expr={cacheLength:50,createPseudo:eA,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(A){return A[1]=A[1].replace(Z,X),A[3]=(A[3]||A[4]||A[5]||"").replace(Z,X),"~="===A[2]&&(A[3]=" "+A[3]+" "),A.slice(0,4)},CHILD:function(A){return A[1]=A[1].toLowerCase(),"nth"===A[1].slice(0,3)?(A[3]||$.error(A[0]),A[4]=+(A[4]?A[5]+(A[6]||1):2*("even"===A[3]||"odd"===A[3])),A[5]=+(A[7]+A[8]||"odd"===A[3])):A[3]&&$.error(A[0]),A},PSEUDO:function(A){var e,t=!A[6]&&A[2];return K.CHILD.test(A[0])?null:(A[3]?A[2]=A[4]||A[5]||"":t&&J.test(t)&&(e=cA(t,!0))&&(e=t.indexOf(")",t.length-e)-t.length)&&(A[0]=A[0].slice(0,e),A[2]=t.slice(0,e)),A.slice(0,3))}},filter:{TAG:function(A){var e=A.replace(Z,X).toLowerCase();return"*"===A?function(){return!0}:function(A){return y(A,e)}},CLASS:function(A){var e=Q[A+" "];return e||(e=new RegExp("(^|"+w+")"+A+"("+w+"|$)"))&&Q(A,(function(A){return e.test("string"==typeof A.className&&A.className||void 0!==A.getAttribute&&A.getAttribute("class")||"")}))},ATTR:function(A,e,t){return function(i){var n=$.attr(i,A);return null==n?"!="===e:!e||(n+="","="===e?n===t:"!="===e?n!==t:"^="===e?t&&0===n.indexOf(t):"*="===e?t&&n.indexOf(t)>-1:"$="===e?t&&n.slice(-t.length)===t:"~="===e?(" "+n.replace(L," ")+" ").indexOf(t)>-1:"|="===e&&(n===t||n.slice(0,t.length+1)===t+"-"))}},CHILD:function(A,e,t,i,n){var a="nth"!==A.slice(0,3),o="last"!==A.slice(-4),r="of-type"===e;return 1===i&&0===n?function(A){return!!A.parentNode}:function(e,t,s){var g,c,l,I,C,d=a!==o?"nextSibling":"previousSibling",h=e.parentNode,B=r&&e.nodeName.toLowerCase(),f=!s&&!r,Q=!1;if(h){if(a){for(;d;){for(l=e;l=l[d];)if(r?y(l,B):1===l.nodeType)return!1;C=d="only"===A&&!C&&"nextSibling"}return!0}if(C=[o?h.firstChild:h.lastChild],o&&f){for(Q=(I=(g=(c=h[u]||(h[u]={}))[A]||[])[0]===E&&g[1])&&g[2],l=I&&h.childNodes[I];l=++I&&l&&l[d]||(Q=I=0)||C.pop();)if(1===l.nodeType&&++Q&&l===e){c[A]=[E,I,Q];break}}else if(f&&(Q=I=(g=(c=e[u]||(e[u]={}))[A]||[])[0]===E&&g[1]),!1===Q)for(;(l=++I&&l&&l[d]||(Q=I=0)||C.pop())&&(!(r?y(l,B):1===l.nodeType)||!++Q||(f&&((c=l[u]||(l[u]={}))[A]=[E,Q]),l!==e)););return(Q-=n)===i||Q%i==0&&Q/i>=0}}},PSEUDO:function(A,e){var t,n=i.pseudos[A]||i.setFilters[A.toLowerCase()]||$.error("unsupported pseudo: "+A);return n[u]?n(e):n.length>1?(t=[A,A,"",e],i.setFilters.hasOwnProperty(A.toLowerCase())?eA((function(A,t){for(var i,a=n(A,e),o=a.length;o--;)A[i=r.call(A,a[o])]=!(t[i]=a[o])})):function(A){return n(A,0,t)}):n}},pseudos:{not:eA((function(A){var e=[],t=[],i=uA(A.replace(v,"$1"));return i[u]?eA((function(A,e,t,n){for(var a,o=i(A,null,n,[]),r=A.length;r--;)(a=o[r])&&(A[r]=!(e[r]=a))})):function(A,n,a){return e[0]=A,i(e,null,a,t),e[0]=null,!t.pop()}})),has:eA((function(A){return function(e){return $(A,e).length>0}})),contains:eA((function(A){return A=A.replace(Z,X),function(e){return(e.textContent||p.text(e)).indexOf(A)>-1}})),lang:eA((function(A){return H.test(A||"")||$.error("unsupported lang: "+A),A=A.replace(Z,X).toLowerCase(),function(e){var t;do{if(t=I?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===A||0===t.indexOf(A+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var t=A.location&&A.location.hash;return t&&t.slice(1)===e.id},root:function(A){return A===l},focus:function(A){return A===function(){try{return g.activeElement}catch(A){}}()&&g.hasFocus()&&!!(A.type||A.href||~A.tabIndex)},enabled:aA(!1),disabled:aA(!0),checked:function(A){return y(A,"input")&&!!A.checked||y(A,"option")&&!!A.selected},selected:function(A){return A.parentNode&&A.parentNode.selectedIndex,!0===A.selected},empty:function(A){for(A=A.firstChild;A;A=A.nextSibling)if(A.nodeType<6)return!1;return!0},parent:function(A){return!i.pseudos.empty(A)},header:function(A){return O.test(A.nodeName)},input:function(A){return V.test(A.nodeName)},button:function(A){return y(A,"input")&&"button"===A.type||y(A,"button")},text:function(A){var e;return y(A,"input")&&"text"===A.type&&(null==(e=A.getAttribute("type"))||"text"===e.toLowerCase())},first:oA((function(){return[0]})),last:oA((function(A,e){return[e-1]})),eq:oA((function(A,e,t){return[t<0?t+e:t]})),even:oA((function(A,e){for(var t=0;t<e;t+=2)A.push(t);return A})),odd:oA((function(A,e){for(var t=1;t<e;t+=2)A.push(t);return A})),lt:oA((function(A,e,t){var i;for(i=t<0?t+e:t>e?e:t;--i>=0;)A.push(i);return A})),gt:oA((function(A,e,t){for(var i=t<0?t+e:t;++i<e;)A.push(i);return A}))}},i.pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=iA(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=nA(e);function gA(){}function cA(A,e){var t,n,a,o,r,s,g,c=x[A+" "];if(c)return e?0:c.slice(0);for(r=A,s=[],g=i.preFilter;r;){for(o in t&&!(n=Y.exec(r))||(n&&(r=r.slice(n[0].length)||r),s.push(a=[])),t=!1,(n=G.exec(r))&&(t=n.shift(),a.push({value:t,type:n[0].replace(v," ")}),r=r.slice(t.length)),i.filter)!(n=K[o].exec(r))||g[o]&&!(n=g[o](n))||(t=n.shift(),a.push({value:t,type:o,matches:n}),r=r.slice(t.length));if(!t)break}return e?r.length:r?$.error(A):x(A,s).slice(0)}function lA(A){for(var e=0,t=A.length,i="";e<t;e++)i+=A[e].value;return i}function IA(A,e,t){var i=e.dir,n=e.next,a=n||i,o=t&&"parentNode"===a,r=f++;return e.first?function(e,t,n){for(;e=e[i];)if(1===e.nodeType||o)return A(e,t,n);return!1}:function(e,t,s){var g,c,l=[E,r];if(s){for(;e=e[i];)if((1===e.nodeType||o)&&A(e,t,s))return!0}else for(;e=e[i];)if(1===e.nodeType||o)if(c=e[u]||(e[u]={}),n&&y(e,n))e=e[i]||e;else{if((g=c[a])&&g[0]===E&&g[1]===r)return l[2]=g[2];if(c[a]=l,l[2]=A(e,t,s))return!0}return!1}}function CA(A){return A.length>1?function(e,t,i){for(var n=A.length;n--;)if(!A[n](e,t,i))return!1;return!0}:A[0]}function dA(A,e,t,i,n){for(var a,o=[],r=0,s=A.length,g=null!=e;r<s;r++)(a=A[r])&&(t&&!t(a,i,n)||(o.push(a),g&&e.push(r)));return o}function hA(A,e,t,i,n,a){return i&&!i[u]&&(i=hA(i)),n&&!n[u]&&(n=hA(n,a)),eA((function(a,o,s,g){var c,l,I,C,d=[],h=[],u=o.length,E=a||function(A,e,t){for(var i=0,n=e.length;i<n;i++)$(A,e[i],t);return t}(e||"*",s.nodeType?[s]:s,[]),f=!A||!a&&e?E:dA(E,d,A,s,g);if(t?t(f,C=n||(a?A:u||i)?[]:o,s,g):C=f,i)for(c=dA(C,h),i(c,[],s,g),l=c.length;l--;)(I=c[l])&&(C[h[l]]=!(f[h[l]]=I));if(a){if(n||A){if(n){for(c=[],l=C.length;l--;)(I=C[l])&&c.push(f[l]=I);n(null,C=[],c,g)}for(l=C.length;l--;)(I=C[l])&&(c=n?r.call(a,I):d[l])>-1&&(a[c]=!(o[c]=I))}}else C=dA(C===o?C.splice(u,C.length):C),n?n(null,o,C,g):B.apply(o,C)}))}function BA(A){for(var e,t,n,o=A.length,s=i.relative[A[0].type],g=s||i.relative[" "],c=s?1:0,l=IA((function(A){return A===e}),g,!0),I=IA((function(A){return r.call(e,A)>-1}),g,!0),C=[function(A,t,i){var n=!s&&(i||t!=a)||((e=t).nodeType?l(A,t,i):I(A,t,i));return e=null,n}];c<o;c++)if(t=i.relative[A[c].type])C=[IA(CA(C),t)];else{if((t=i.filter[A[c].type].apply(null,A[c].matches))[u]){for(n=++c;n<o&&!i.relative[A[n].type];n++);return hA(c>1&&CA(C),c>1&&lA(A.slice(0,c-1).concat({value:" "===A[c-2].type?"*":""})).replace(v,"$1"),t,c<n&&BA(A.slice(c,n)),n<o&&BA(A=A.slice(n)),n<o&&lA(A))}C.push(t)}return CA(C)}function uA(A,e){var t,n=[],o=[],r=m[A+" "];if(!r){for(e||(e=cA(A)),t=e.length;t--;)(r=BA(e[t]))[u]?n.push(r):o.push(r);r=m(A,function(A,e){var t=e.length>0,n=A.length>0,o=function(o,r,s,c,l){var C,d,h,u=0,f="0",Q=o&&[],x=[],m=a,y=o||n&&i.find.TAG("*",l),S=E+=null==m?1:Math.random()||.1,D=y.length;for(l&&(a=r==g||r||l);f!==D&&null!=(C=y[f]);f++){if(n&&C){for(d=0,r||C.ownerDocument==g||(sA(C),s=!I);h=A[d++];)if(h(C,r||g,s)){B.call(c,C);break}l&&(E=S)}t&&((C=!h&&C)&&u--,o&&Q.push(C))}if(u+=f,t&&f!==u){for(d=0;h=e[d++];)h(Q,x,r,s);if(o){if(u>0)for(;f--;)Q[f]||x[f]||(x[f]=_.call(c));x=dA(x)}B.apply(c,x),l&&!o&&x.length>0&&u+e.length>1&&p.uniqueSort(c)}return l&&(E=S,a=m),Q};return t?eA(o):o}(o,n)),r.selector=A}return r}function EA(A,e,t,n){var a,o,r,s,g,c="function"==typeof A&&A,l=!n&&cA(A=c.selector||A);if(t=t||[],1===l.length){if((o=l[0]=l[0].slice(0)).length>2&&"ID"===(r=o[0]).type&&9===e.nodeType&&I&&i.relative[o[1].type]){if(!(e=(i.find.ID(r.matches[0].replace(Z,X),e)||[])[0]))return t;c&&(e=e.parentNode),A=A.slice(o.shift().value.length)}for(a=K.needsContext.test(A)?0:o.length;a--&&(r=o[a],!i.relative[s=r.type]);)if((g=i.find[s])&&(n=g(r.matches[0].replace(Z,X),W.test(o[0].type)&&rA(e.parentNode)||e))){if(o.splice(a,1),!(A=n.length&&lA(o)))return B.apply(t,n),t;break}}return(c||uA(A,l))(n,e,!I,t,!e||W.test(A)&&rA(e.parentNode)||e),t}gA.prototype=i.filters=i.pseudos,i.setFilters=new gA,C.sortStable=u.split("").sort(F).join("")===u,sA(),C.sortDetached=tA((function(A){return 1&A.compareDocumentPosition(g.createElement("fieldset"))})),p.find=$,p.expr[":"]=p.expr.pseudos,p.unique=p.uniqueSort,$.compile=uA,$.select=EA,$.setDocument=sA,$.tokenize=cA,$.escape=p.escapeSelector,$.getText=p.text,$.isXML=p.isXMLDoc,$.selectors=p.expr,$.support=p.support,$.uniqueSort=p.uniqueSort}();var P=function(A,e,t){for(var i=[],n=void 0!==t;(A=A[e])&&9!==A.nodeType;)if(1===A.nodeType){if(n&&p(A).is(t))break;i.push(A)}return i},N=function(A,e){for(var t=[];A;A=A.nextSibling)1===A.nodeType&&A!==e&&t.push(A);return t},T=p.expr.match.needsContext,M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(A,e,t){return d(e)?p.grep(A,(function(A,i){return!!e.call(A,i,A)!==t})):e.nodeType?p.grep(A,(function(A){return A===e!==t})):"string"!=typeof e?p.grep(A,(function(A){return r.call(e,A)>-1!==t})):p.filter(e,A,t)}p.filter=function(A,e,t){var i=e[0];return t&&(A=":not("+A+")"),1===e.length&&1===i.nodeType?p.find.matchesSelector(i,A)?[i]:[]:p.find.matches(A,p.grep(e,(function(A){return 1===A.nodeType})))},p.fn.extend({find:function(A){var e,t,i=this.length,n=this;if("string"!=typeof A)return this.pushStack(p(A).filter((function(){for(e=0;e<i;e++)if(p.contains(n[e],this))return!0})));for(t=this.pushStack([]),e=0;e<i;e++)p.find(A,n[e],t);return i>1?p.uniqueSort(t):t},filter:function(A){return this.pushStack(L(this,A||[],!1))},not:function(A){return this.pushStack(L(this,A||[],!0))},is:function(A){return!!L(this,"string"==typeof A&&T.test(A)?p(A):A||[],!1).length}});var Y,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,U=p.fn.init=function(A,e,t){var i,n;if(!A)return this;if(t=t||Y,"string"==typeof A){if(!(i="<"===A[0]&&">"===A[A.length-1]&&A.length>=3?[null,A,null]:G.exec(A))||!i[1]&&e)return!e||e.jquery?(e||t).find(A):this.constructor(e).find(A);if(i[1]){if(e=e instanceof p?e[0]:e,p.merge(this,p.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:B,!0)),M.test(i[1])&&p.isPlainObject(e))for(i in e)d(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(n=B.getElementById(i[2]))&&(this[0]=n,this.length=1),this}return A.nodeType?(this[0]=A,this.length=1,this):d(A)?void 0!==t.ready?t.ready(A):A(p):p.makeArray(A,this)};U.prototype=p.fn,Y=p(B);var J=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function K(A,e){for(;(A=A[e])&&1!==A.nodeType;);return A}p.fn.extend({has:function(A){var e=p(A,this),t=e.length;return this.filter((function(){for(var A=0;A<t;A++)if(p.contains(this,e[A]))return!0}))},closest:function(A,e){var t,i=0,n=this.length,a=[],o="string"!=typeof A&&p(A);if(!T.test(A))for(;i<n;i++)for(t=this[i];t&&t!==e;t=t.parentNode)if(t.nodeType<11&&(o?o.index(t)>-1:1===t.nodeType&&p.find.matchesSelector(t,A))){a.push(t);break}return this.pushStack(a.length>1?p.uniqueSort(a):a)},index:function(A){return A?"string"==typeof A?r.call(p(A),this[0]):r.call(this,A.jquery?A[0]:A):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(A,e){return this.pushStack(p.uniqueSort(p.merge(this.get(),p(A,e))))},addBack:function(A){return this.add(null==A?this.prevObject:this.prevObject.filter(A))}}),p.each({parent:function(A){var e=A.parentNode;return e&&11!==e.nodeType?e:null},parents:function(A){return P(A,"parentNode")},parentsUntil:function(A,e,t){return P(A,"parentNode",t)},next:function(A){return K(A,"nextSibling")},prev:function(A){return K(A,"previousSibling")},nextAll:function(A){return P(A,"nextSibling")},prevAll:function(A){return P(A,"previousSibling")},nextUntil:function(A,e,t){return P(A,"nextSibling",t)},prevUntil:function(A,e,t){return P(A,"previousSibling",t)},siblings:function(A){return N((A.parentNode||{}).firstChild,A)},children:function(A){return N(A.firstChild)},contents:function(A){return null!=A.contentDocument&&i(A.contentDocument)?A.contentDocument:(y(A,"template")&&(A=A.content||A),p.merge([],A.childNodes))}},(function(A,e){p.fn[A]=function(t,i){var n=p.map(this,e,t);return"Until"!==A.slice(-5)&&(i=t),i&&"string"==typeof i&&(n=p.filter(i,n)),this.length>1&&(H[A]||p.uniqueSort(n),J.test(A)&&n.reverse()),this.pushStack(n)}}));var V=/[^\x20\t\r\n\f]+/g;function O(A){return A}function j(A){throw A}function W(A,e,t,i){var n;try{A&&d(n=A.promise)?n.call(A).done(e).fail(t):A&&d(n=A.then)?n.call(A,e,t):e.apply(void 0,[A].slice(i))}catch(A){t.apply(void 0,[A])}}p.Callbacks=function(A){A="string"==typeof A?function(A){var e={};return p.each(A.match(V)||[],(function(A,t){e[t]=!0})),e}(A):p.extend({},A);var e,t,i,n,a=[],o=[],r=-1,s=function(){for(n=n||A.once,i=e=!0;o.length;r=-1)for(t=o.shift();++r<a.length;)!1===a[r].apply(t[0],t[1])&&A.stopOnFalse&&(r=a.length,t=!1);A.memory||(t=!1),e=!1,n&&(a=t?[]:"")},g={add:function(){return a&&(t&&!e&&(r=a.length-1,o.push(t)),function e(t){p.each(t,(function(t,i){d(i)?A.unique&&g.has(i)||a.push(i):i&&i.length&&"string"!==f(i)&&e(i)}))}(arguments),t&&!e&&s()),this},remove:function(){return p.each(arguments,(function(A,e){for(var t;(t=p.inArray(e,a,t))>-1;)a.splice(t,1),t<=r&&r--})),this},has:function(A){return A?p.inArray(A,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return n=o=[],a=t="",this},disabled:function(){return!a},lock:function(){return n=o=[],t||e||(a=t=""),this},locked:function(){return!!n},fireWith:function(A,t){return n||(t=[A,(t=t||[]).slice?t.slice():t],o.push(t),e||s()),this},fire:function(){return g.fireWith(this,arguments),this},fired:function(){return!!i}};return g},p.extend({Deferred:function(e){var t=[["notify","progress",p.Callbacks("memory"),p.Callbacks("memory"),2],["resolve","done",p.Callbacks("once memory"),p.Callbacks("once memory"),0,"resolved"],["reject","fail",p.Callbacks("once memory"),p.Callbacks("once memory"),1,"rejected"]],i="pending",n={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},catch:function(A){return n.then(null,A)},pipe:function(){var A=arguments;return p.Deferred((function(e){p.each(t,(function(t,i){var n=d(A[i[4]])&&A[i[4]];a[i[1]]((function(){var A=n&&n.apply(this,arguments);A&&d(A.promise)?A.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,n?[A]:arguments)}))})),A=null})).promise()},then:function(e,i,n){var a=0;function o(e,t,i,n){return function(){var r=this,s=arguments,g=function(){var A,g;if(!(e<a)){if((A=i.apply(r,s))===t.promise())throw new TypeError("Thenable self-resolution");g=A&&("object"==typeof A||"function"==typeof A)&&A.then,d(g)?n?g.call(A,o(a,t,O,n),o(a,t,j,n)):(a++,g.call(A,o(a,t,O,n),o(a,t,j,n),o(a,t,O,t.notifyWith))):(i!==O&&(r=void 0,s=[A]),(n||t.resolveWith)(r,s))}},c=n?g:function(){try{g()}catch(A){p.Deferred.exceptionHook&&p.Deferred.exceptionHook(A,c.error),e+1>=a&&(i!==j&&(r=void 0,s=[A]),t.rejectWith(r,s))}};e?c():(p.Deferred.getErrorHook?c.error=p.Deferred.getErrorHook():p.Deferred.getStackHook&&(c.error=p.Deferred.getStackHook()),A.setTimeout(c))}}return p.Deferred((function(A){t[0][3].add(o(0,A,d(n)?n:O,A.notifyWith)),t[1][3].add(o(0,A,d(e)?e:O)),t[2][3].add(o(0,A,d(i)?i:j))})).promise()},promise:function(A){return null!=A?p.extend(A,n):n}},a={};return p.each(t,(function(A,e){var o=e[2],r=e[5];n[e[1]]=o.add,r&&o.add((function(){i=r}),t[3-A][2].disable,t[3-A][3].disable,t[0][2].lock,t[0][3].lock),o.add(e[3].fire),a[e[0]]=function(){return a[e[0]+"With"](this===a?void 0:this,arguments),this},a[e[0]+"With"]=o.fireWith})),n.promise(a),e&&e.call(a,a),a},when:function(A){var e=arguments.length,t=e,i=Array(t),a=n.call(arguments),o=p.Deferred(),r=function(A){return function(t){i[A]=this,a[A]=arguments.length>1?n.call(arguments):t,--e||o.resolveWith(i,a)}};if(e<=1&&(W(A,o.done(r(t)).resolve,o.reject,!e),"pending"===o.state()||d(a[t]&&a[t].then)))return o.then();for(;t--;)W(a[t],r(t),o.reject);return o.promise()}});var Z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;p.Deferred.exceptionHook=function(e,t){A.console&&A.console.warn&&e&&Z.test(e.name)&&A.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},p.readyException=function(e){A.setTimeout((function(){throw e}))};var X=p.Deferred();function q(){B.removeEventListener("DOMContentLoaded",q),A.removeEventListener("load",q),p.ready()}p.fn.ready=function(A){return X.then(A).catch((function(A){p.readyException(A)})),this},p.extend({isReady:!1,readyWait:1,ready:function(A){(!0===A?--p.readyWait:p.isReady)||(p.isReady=!0,!0!==A&&--p.readyWait>0||X.resolveWith(B,[p]))}}),p.ready.then=X.then,"complete"===B.readyState||"loading"!==B.readyState&&!B.documentElement.doScroll?A.setTimeout(p.ready):(B.addEventListener("DOMContentLoaded",q),A.addEventListener("load",q));var z=function(A,e,t,i,n,a,o){var r=0,s=A.length,g=null==t;if("object"===f(t))for(r in n=!0,t)z(A,e,r,t[r],!0,a,o);else if(void 0!==i&&(n=!0,d(i)||(o=!0),g&&(o?(e.call(A,i),e=null):(g=e,e=function(A,e,t){return g.call(p(A),t)})),e))for(;r<s;r++)e(A[r],t,o?i:i.call(A[r],r,e(A[r],t)));return n?A:g?e.call(A):s?e(A[0],t):a},$=/^-ms-/,AA=/-([a-z])/g;function eA(A,e){return e.toUpperCase()}function tA(A){return A.replace($,"ms-").replace(AA,eA)}var iA=function(A){return 1===A.nodeType||9===A.nodeType||!+A.nodeType};function nA(){this.expando=p.expando+nA.uid++}nA.uid=1,nA.prototype={cache:function(A){var e=A[this.expando];return e||(e={},iA(A)&&(A.nodeType?A[this.expando]=e:Object.defineProperty(A,this.expando,{value:e,configurable:!0}))),e},set:function(A,e,t){var i,n=this.cache(A);if("string"==typeof e)n[tA(e)]=t;else for(i in e)n[tA(i)]=e[i];return n},get:function(A,e){return void 0===e?this.cache(A):A[this.expando]&&A[this.expando][tA(e)]},access:function(A,e,t){return void 0===e||e&&"string"==typeof e&&void 0===t?this.get(A,e):(this.set(A,e,t),void 0!==t?t:e)},remove:function(A,e){var t,i=A[this.expando];if(void 0!==i){if(void 0!==e){t=(e=Array.isArray(e)?e.map(tA):(e=tA(e))in i?[e]:e.match(V)||[]).length;for(;t--;)delete i[e[t]]}(void 0===e||p.isEmptyObject(i))&&(A.nodeType?A[this.expando]=void 0:delete A[this.expando])}},hasData:function(A){var e=A[this.expando];return void 0!==e&&!p.isEmptyObject(e)}};var aA=new nA,oA=new nA,rA=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,sA=/[A-Z]/g;function gA(A,e,t){var i;if(void 0===t&&1===A.nodeType)if(i="data-"+e.replace(sA,"-$&").toLowerCase(),"string"==typeof(t=A.getAttribute(i))){try{t=function(A){return"true"===A||"false"!==A&&("null"===A?null:A===+A+""?+A:rA.test(A)?JSON.parse(A):A)}(t)}catch(A){}oA.set(A,e,t)}else t=void 0;return t}p.extend({hasData:function(A){return oA.hasData(A)||aA.hasData(A)},data:function(A,e,t){return oA.access(A,e,t)},removeData:function(A,e){oA.remove(A,e)},_data:function(A,e,t){return aA.access(A,e,t)},_removeData:function(A,e){aA.remove(A,e)}}),p.fn.extend({data:function(A,e){var t,i,n,a=this[0],o=a&&a.attributes;if(void 0===A){if(this.length&&(n=oA.get(a),1===a.nodeType&&!aA.get(a,"hasDataAttrs"))){for(t=o.length;t--;)o[t]&&0===(i=o[t].name).indexOf("data-")&&(i=tA(i.slice(5)),gA(a,i,n[i]));aA.set(a,"hasDataAttrs",!0)}return n}return"object"==typeof A?this.each((function(){oA.set(this,A)})):z(this,(function(e){var t;if(a&&void 0===e)return void 0!==(t=oA.get(a,A))||void 0!==(t=gA(a,A))?t:void 0;this.each((function(){oA.set(this,A,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(A){return this.each((function(){oA.remove(this,A)}))}}),p.extend({queue:function(A,e,t){var i;if(A)return e=(e||"fx")+"queue",i=aA.get(A,e),t&&(!i||Array.isArray(t)?i=aA.access(A,e,p.makeArray(t)):i.push(t)),i||[]},dequeue:function(A,e){e=e||"fx";var t=p.queue(A,e),i=t.length,n=t.shift(),a=p._queueHooks(A,e);"inprogress"===n&&(n=t.shift(),i--),n&&("fx"===e&&t.unshift("inprogress"),delete a.stop,n.call(A,(function(){p.dequeue(A,e)}),a)),!i&&a&&a.empty.fire()},_queueHooks:function(A,e){var t=e+"queueHooks";return aA.get(A,t)||aA.access(A,t,{empty:p.Callbacks("once memory").add((function(){aA.remove(A,[e+"queue",t])}))})}}),p.fn.extend({queue:function(A,e){var t=2;return"string"!=typeof A&&(e=A,A="fx",t--),arguments.length<t?p.queue(this[0],A):void 0===e?this:this.each((function(){var t=p.queue(this,A,e);p._queueHooks(this,A),"fx"===A&&"inprogress"!==t[0]&&p.dequeue(this,A)}))},dequeue:function(A){return this.each((function(){p.dequeue(this,A)}))},clearQueue:function(A){return this.queue(A||"fx",[])},promise:function(A,e){var t,i=1,n=p.Deferred(),a=this,o=this.length,r=function(){--i||n.resolveWith(a,[a])};for("string"!=typeof A&&(e=A,A=void 0),A=A||"fx";o--;)(t=aA.get(a[o],A+"queueHooks"))&&t.empty&&(i++,t.empty.add(r));return r(),n.promise(e)}});var cA=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,lA=new RegExp("^(?:([+-])=|)("+cA+")([a-z%]*)$","i"),IA=["Top","Right","Bottom","Left"],CA=B.documentElement,dA=function(A){return p.contains(A.ownerDocument,A)},hA={composed:!0};CA.getRootNode&&(dA=function(A){return p.contains(A.ownerDocument,A)||A.getRootNode(hA)===A.ownerDocument});var BA=function(A,e){return"none"===(A=e||A).style.display||""===A.style.display&&dA(A)&&"none"===p.css(A,"display")};function uA(A,e,t,i){var n,a,o=20,r=i?function(){return i.cur()}:function(){return p.css(A,e,"")},s=r(),g=t&&t[3]||(p.cssNumber[e]?"":"px"),c=A.nodeType&&(p.cssNumber[e]||"px"!==g&&+s)&&lA.exec(p.css(A,e));if(c&&c[3]!==g){for(s/=2,g=g||c[3],c=+s||1;o--;)p.style(A,e,c+g),(1-a)*(1-(a=r()/s||.5))<=0&&(o=0),c/=a;c*=2,p.style(A,e,c+g),t=t||[]}return t&&(c=+c||+s||0,n=t[1]?c+(t[1]+1)*t[2]:+t[2],i&&(i.unit=g,i.start=c,i.end=n)),n}var EA={};function fA(A){var e,t=A.ownerDocument,i=A.nodeName,n=EA[i];return n||(e=t.body.appendChild(t.createElement(i)),n=p.css(e,"display"),e.parentNode.removeChild(e),"none"===n&&(n="block"),EA[i]=n,n)}function QA(A,e){for(var t,i,n=[],a=0,o=A.length;a<o;a++)(i=A[a]).style&&(t=i.style.display,e?("none"===t&&(n[a]=aA.get(i,"display")||null,n[a]||(i.style.display="")),""===i.style.display&&BA(i)&&(n[a]=fA(i))):"none"!==t&&(n[a]="none",aA.set(i,"display",t)));for(a=0;a<o;a++)null!=n[a]&&(A[a].style.display=n[a]);return A}p.fn.extend({show:function(){return QA(this,!0)},hide:function(){return QA(this)},toggle:function(A){return"boolean"==typeof A?A?this.show():this.hide():this.each((function(){BA(this)?p(this).show():p(this).hide()}))}});var xA,pA,mA=/^(?:checkbox|radio)$/i,yA=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,_A=/^$|^module$|\/(?:java|ecma)script/i;xA=B.createDocumentFragment().appendChild(B.createElement("div")),(pA=B.createElement("input")).setAttribute("type","radio"),pA.setAttribute("checked","checked"),pA.setAttribute("name","t"),xA.appendChild(pA),C.checkClone=xA.cloneNode(!0).cloneNode(!0).lastChild.checked,xA.innerHTML="<textarea>x</textarea>",C.noCloneChecked=!!xA.cloneNode(!0).lastChild.defaultValue,xA.innerHTML="<option></option>",C.option=!!xA.lastChild;var SA={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function DA(A,e){var t;return t=void 0!==A.getElementsByTagName?A.getElementsByTagName(e||"*"):void 0!==A.querySelectorAll?A.querySelectorAll(e||"*"):[],void 0===e||e&&y(A,e)?p.merge([A],t):t}function wA(A,e){for(var t=0,i=A.length;t<i;t++)aA.set(A[t],"globalEval",!e||aA.get(e[t],"globalEval"))}SA.tbody=SA.tfoot=SA.colgroup=SA.caption=SA.thead,SA.th=SA.td,C.option||(SA.optgroup=SA.option=[1,"<select multiple='multiple'>","</select>"]);var vA=/<|&#?\w+;/;function bA(A,e,t,i,n){for(var a,o,r,s,g,c,l=e.createDocumentFragment(),I=[],C=0,d=A.length;C<d;C++)if((a=A[C])||0===a)if("object"===f(a))p.merge(I,a.nodeType?[a]:a);else if(vA.test(a)){for(o=o||l.appendChild(e.createElement("div")),r=(yA.exec(a)||["",""])[1].toLowerCase(),s=SA[r]||SA._default,o.innerHTML=s[1]+p.htmlPrefilter(a)+s[2],c=s[0];c--;)o=o.lastChild;p.merge(I,o.childNodes),(o=l.firstChild).textContent=""}else I.push(e.createTextNode(a));for(l.textContent="",C=0;a=I[C++];)if(i&&p.inArray(a,i)>-1)n&&n.push(a);else if(g=dA(a),o=DA(l.appendChild(a),"script"),g&&wA(o),t)for(c=0;a=o[c++];)_A.test(a.type||"")&&t.push(a);return l}var FA=/^([^.]*)(?:\.(.+)|)/;function RA(){return!0}function kA(){return!1}function PA(A,e,t,i,n,a){var o,r;if("object"==typeof e){for(r in"string"!=typeof t&&(i=i||t,t=void 0),e)PA(A,r,t,i,e[r],a);return A}if(null==i&&null==n?(n=t,i=t=void 0):null==n&&("string"==typeof t?(n=i,i=void 0):(n=i,i=t,t=void 0)),!1===n)n=kA;else if(!n)return A;return 1===a&&(o=n,n=function(A){return p().off(A),o.apply(this,arguments)},n.guid=o.guid||(o.guid=p.guid++)),A.each((function(){p.event.add(this,e,n,i,t)}))}function NA(A,e,t){t?(aA.set(A,e,!1),p.event.add(A,e,{namespace:!1,handler:function(A){var t,i=aA.get(this,e);if(1&A.isTrigger&&this[e]){if(i)(p.event.special[e]||{}).delegateType&&A.stopPropagation();else if(i=n.call(arguments),aA.set(this,e,i),this[e](),t=aA.get(this,e),aA.set(this,e,!1),i!==t)return A.stopImmediatePropagation(),A.preventDefault(),t}else i&&(aA.set(this,e,p.event.trigger(i[0],i.slice(1),this)),A.stopPropagation(),A.isImmediatePropagationStopped=RA)}})):void 0===aA.get(A,e)&&p.event.add(A,e,RA)}p.event={global:{},add:function(A,e,t,i,n){var a,o,r,s,g,c,l,I,C,d,h,B=aA.get(A);if(iA(A))for(t.handler&&(t=(a=t).handler,n=a.selector),n&&p.find.matchesSelector(CA,n),t.guid||(t.guid=p.guid++),(s=B.events)||(s=B.events=Object.create(null)),(o=B.handle)||(o=B.handle=function(e){return void 0!==p&&p.event.triggered!==e.type?p.event.dispatch.apply(A,arguments):void 0}),g=(e=(e||"").match(V)||[""]).length;g--;)C=h=(r=FA.exec(e[g])||[])[1],d=(r[2]||"").split(".").sort(),C&&(l=p.event.special[C]||{},C=(n?l.delegateType:l.bindType)||C,l=p.event.special[C]||{},c=p.extend({type:C,origType:h,data:i,handler:t,guid:t.guid,selector:n,needsContext:n&&p.expr.match.needsContext.test(n),namespace:d.join(".")},a),(I=s[C])||((I=s[C]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(A,i,d,o)||A.addEventListener&&A.addEventListener(C,o)),l.add&&(l.add.call(A,c),c.handler.guid||(c.handler.guid=t.guid)),n?I.splice(I.delegateCount++,0,c):I.push(c),p.event.global[C]=!0)},remove:function(A,e,t,i,n){var a,o,r,s,g,c,l,I,C,d,h,B=aA.hasData(A)&&aA.get(A);if(B&&(s=B.events)){for(g=(e=(e||"").match(V)||[""]).length;g--;)if(C=h=(r=FA.exec(e[g])||[])[1],d=(r[2]||"").split(".").sort(),C){for(l=p.event.special[C]||{},I=s[C=(i?l.delegateType:l.bindType)||C]||[],r=r[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=I.length;a--;)c=I[a],!n&&h!==c.origType||t&&t.guid!==c.guid||r&&!r.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(I.splice(a,1),c.selector&&I.delegateCount--,l.remove&&l.remove.call(A,c));o&&!I.length&&(l.teardown&&!1!==l.teardown.call(A,d,B.handle)||p.removeEvent(A,C,B.handle),delete s[C])}else for(C in s)p.event.remove(A,C+e[g],t,i,!0);p.isEmptyObject(s)&&aA.remove(A,"handle events")}},dispatch:function(A){var e,t,i,n,a,o,r=new Array(arguments.length),s=p.event.fix(A),g=(aA.get(this,"events")||Object.create(null))[s.type]||[],c=p.event.special[s.type]||{};for(r[0]=s,e=1;e<arguments.length;e++)r[e]=arguments[e];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(o=p.event.handlers.call(this,s,g),e=0;(n=o[e++])&&!s.isPropagationStopped();)for(s.currentTarget=n.elem,t=0;(a=n.handlers[t++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==a.namespace&&!s.rnamespace.test(a.namespace)||(s.handleObj=a,s.data=a.data,void 0!==(i=((p.event.special[a.origType]||{}).handle||a.handler).apply(n.elem,r))&&!1===(s.result=i)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(A,e){var t,i,n,a,o,r=[],s=e.delegateCount,g=A.target;if(s&&g.nodeType&&!("click"===A.type&&A.button>=1))for(;g!==this;g=g.parentNode||this)if(1===g.nodeType&&("click"!==A.type||!0!==g.disabled)){for(a=[],o={},t=0;t<s;t++)void 0===o[n=(i=e[t]).selector+" "]&&(o[n]=i.needsContext?p(n,this).index(g)>-1:p.find(n,this,null,[g]).length),o[n]&&a.push(i);a.length&&r.push({elem:g,handlers:a})}return g=this,s<e.length&&r.push({elem:g,handlers:e.slice(s)}),r},addProp:function(A,e){Object.defineProperty(p.Event.prototype,A,{enumerable:!0,configurable:!0,get:d(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[A]},set:function(e){Object.defineProperty(this,A,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(A){return A[p.expando]?A:new p.Event(A)},special:{load:{noBubble:!0},click:{setup:function(A){var e=this||A;return mA.test(e.type)&&e.click&&y(e,"input")&&NA(e,"click",!0),!1},trigger:function(A){var e=this||A;return mA.test(e.type)&&e.click&&y(e,"input")&&NA(e,"click"),!0},_default:function(A){var e=A.target;return mA.test(e.type)&&e.click&&y(e,"input")&&aA.get(e,"click")||y(e,"a")}},beforeunload:{postDispatch:function(A){void 0!==A.result&&A.originalEvent&&(A.originalEvent.returnValue=A.result)}}}},p.removeEvent=function(A,e,t){A.removeEventListener&&A.removeEventListener(e,t)},p.Event=function(A,e){if(!(this instanceof p.Event))return new p.Event(A,e);A&&A.type?(this.originalEvent=A,this.type=A.type,this.isDefaultPrevented=A.defaultPrevented||void 0===A.defaultPrevented&&!1===A.returnValue?RA:kA,this.target=A.target&&3===A.target.nodeType?A.target.parentNode:A.target,this.currentTarget=A.currentTarget,this.relatedTarget=A.relatedTarget):this.type=A,e&&p.extend(this,e),this.timeStamp=A&&A.timeStamp||Date.now(),this[p.expando]=!0},p.Event.prototype={constructor:p.Event,isDefaultPrevented:kA,isPropagationStopped:kA,isImmediatePropagationStopped:kA,isSimulated:!1,preventDefault:function(){var A=this.originalEvent;this.isDefaultPrevented=RA,A&&!this.isSimulated&&A.preventDefault()},stopPropagation:function(){var A=this.originalEvent;this.isPropagationStopped=RA,A&&!this.isSimulated&&A.stopPropagation()},stopImmediatePropagation:function(){var A=this.originalEvent;this.isImmediatePropagationStopped=RA,A&&!this.isSimulated&&A.stopImmediatePropagation(),this.stopPropagation()}},p.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},p.event.addProp),p.each({focus:"focusin",blur:"focusout"},(function(A,e){function t(A){if(B.documentMode){var t=aA.get(this,"handle"),i=p.event.fix(A);i.type="focusin"===A.type?"focus":"blur",i.isSimulated=!0,t(A),i.target===i.currentTarget&&t(i)}else p.event.simulate(e,A.target,p.event.fix(A))}p.event.special[A]={setup:function(){var i;if(NA(this,A,!0),!B.documentMode)return!1;(i=aA.get(this,e))||this.addEventListener(e,t),aA.set(this,e,(i||0)+1)},trigger:function(){return NA(this,A),!0},teardown:function(){var A;if(!B.documentMode)return!1;(A=aA.get(this,e)-1)?aA.set(this,e,A):(this.removeEventListener(e,t),aA.remove(this,e))},_default:function(e){return aA.get(e.target,A)},delegateType:e},p.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,n=B.documentMode?this:i,a=aA.get(n,e);a||(B.documentMode?this.addEventListener(e,t):i.addEventListener(A,t,!0)),aA.set(n,e,(a||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,n=B.documentMode?this:i,a=aA.get(n,e)-1;a?aA.set(n,e,a):(B.documentMode?this.removeEventListener(e,t):i.removeEventListener(A,t,!0),aA.remove(n,e))}}})),p.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(A,e){p.event.special[A]={delegateType:e,bindType:e,handle:function(A){var t,i=A.relatedTarget,n=A.handleObj;return i&&(i===this||p.contains(this,i))||(A.type=n.origType,t=n.handler.apply(this,arguments),A.type=e),t}}})),p.fn.extend({on:function(A,e,t,i){return PA(this,A,e,t,i)},one:function(A,e,t,i){return PA(this,A,e,t,i,1)},off:function(A,e,t){var i,n;if(A&&A.preventDefault&&A.handleObj)return i=A.handleObj,p(A.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof A){for(n in A)this.off(n,e,A[n]);return this}return!1!==e&&"function"!=typeof e||(t=e,e=void 0),!1===t&&(t=kA),this.each((function(){p.event.remove(this,A,t,e)}))}});var TA=/<script|<style|<link/i,MA=/checked\s*(?:[^=]|=\s*.checked.)/i,LA=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function YA(A,e){return y(A,"table")&&y(11!==e.nodeType?e:e.firstChild,"tr")&&p(A).children("tbody")[0]||A}function GA(A){return A.type=(null!==A.getAttribute("type"))+"/"+A.type,A}function UA(A){return"true/"===(A.type||"").slice(0,5)?A.type=A.type.slice(5):A.removeAttribute("type"),A}function JA(A,e){var t,i,n,a,o,r;if(1===e.nodeType){if(aA.hasData(A)&&(r=aA.get(A).events))for(n in aA.remove(e,"handle events"),r)for(t=0,i=r[n].length;t<i;t++)p.event.add(e,n,r[n][t]);oA.hasData(A)&&(a=oA.access(A),o=p.extend({},a),oA.set(e,o))}}function HA(A,e){var t=e.nodeName.toLowerCase();"input"===t&&mA.test(A.type)?e.checked=A.checked:"input"!==t&&"textarea"!==t||(e.defaultValue=A.defaultValue)}function KA(A,e,t,i){e=a(e);var n,o,r,s,g,c,l=0,I=A.length,h=I-1,B=e[0],u=d(B);if(u||I>1&&"string"==typeof B&&!C.checkClone&&MA.test(B))return A.each((function(n){var a=A.eq(n);u&&(e[0]=B.call(this,n,a.html())),KA(a,e,t,i)}));if(I&&(o=(n=bA(e,A[0].ownerDocument,!1,A,i)).firstChild,1===n.childNodes.length&&(n=o),o||i)){for(s=(r=p.map(DA(n,"script"),GA)).length;l<I;l++)g=n,l!==h&&(g=p.clone(g,!0,!0),s&&p.merge(r,DA(g,"script"))),t.call(A[l],g,l);if(s)for(c=r[r.length-1].ownerDocument,p.map(r,UA),l=0;l<s;l++)g=r[l],_A.test(g.type||"")&&!aA.access(g,"globalEval")&&p.contains(c,g)&&(g.src&&"module"!==(g.type||"").toLowerCase()?p._evalUrl&&!g.noModule&&p._evalUrl(g.src,{nonce:g.nonce||g.getAttribute("nonce")},c):E(g.textContent.replace(LA,""),g,c))}return A}function VA(A,e,t){for(var i,n=e?p.filter(e,A):A,a=0;null!=(i=n[a]);a++)t||1!==i.nodeType||p.cleanData(DA(i)),i.parentNode&&(t&&dA(i)&&wA(DA(i,"script")),i.parentNode.removeChild(i));return A}p.extend({htmlPrefilter:function(A){return A},clone:function(A,e,t){var i,n,a,o,r=A.cloneNode(!0),s=dA(A);if(!(C.noCloneChecked||1!==A.nodeType&&11!==A.nodeType||p.isXMLDoc(A)))for(o=DA(r),i=0,n=(a=DA(A)).length;i<n;i++)HA(a[i],o[i]);if(e)if(t)for(a=a||DA(A),o=o||DA(r),i=0,n=a.length;i<n;i++)JA(a[i],o[i]);else JA(A,r);return(o=DA(r,"script")).length>0&&wA(o,!s&&DA(A,"script")),r},cleanData:function(A){for(var e,t,i,n=p.event.special,a=0;void 0!==(t=A[a]);a++)if(iA(t)){if(e=t[aA.expando]){if(e.events)for(i in e.events)n[i]?p.event.remove(t,i):p.removeEvent(t,i,e.handle);t[aA.expando]=void 0}t[oA.expando]&&(t[oA.expando]=void 0)}}}),p.fn.extend({detach:function(A){return VA(this,A,!0)},remove:function(A){return VA(this,A)},text:function(A){return z(this,(function(A){return void 0===A?p.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=A)}))}),null,A,arguments.length)},append:function(){return KA(this,arguments,(function(A){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||YA(this,A).appendChild(A)}))},prepend:function(){return KA(this,arguments,(function(A){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=YA(this,A);e.insertBefore(A,e.firstChild)}}))},before:function(){return KA(this,arguments,(function(A){this.parentNode&&this.parentNode.insertBefore(A,this)}))},after:function(){return KA(this,arguments,(function(A){this.parentNode&&this.parentNode.insertBefore(A,this.nextSibling)}))},empty:function(){for(var A,e=0;null!=(A=this[e]);e++)1===A.nodeType&&(p.cleanData(DA(A,!1)),A.textContent="");return this},clone:function(A,e){return A=null!=A&&A,e=null==e?A:e,this.map((function(){return p.clone(this,A,e)}))},html:function(A){return z(this,(function(A){var e=this[0]||{},t=0,i=this.length;if(void 0===A&&1===e.nodeType)return e.innerHTML;if("string"==typeof A&&!TA.test(A)&&!SA[(yA.exec(A)||["",""])[1].toLowerCase()]){A=p.htmlPrefilter(A);try{for(;t<i;t++)1===(e=this[t]||{}).nodeType&&(p.cleanData(DA(e,!1)),e.innerHTML=A);e=0}catch(A){}}e&&this.empty().append(A)}),null,A,arguments.length)},replaceWith:function(){var A=[];return KA(this,arguments,(function(e){var t=this.parentNode;p.inArray(this,A)<0&&(p.cleanData(DA(this)),t&&t.replaceChild(e,this))}),A)}}),p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(A,e){p.fn[A]=function(A){for(var t,i=[],n=p(A),a=n.length-1,r=0;r<=a;r++)t=r===a?this:this.clone(!0),p(n[r])[e](t),o.apply(i,t.get());return this.pushStack(i)}}));var OA=new RegExp("^("+cA+")(?!px)[a-z%]+$","i"),jA=/^--/,WA=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=A),t.getComputedStyle(e)},ZA=function(A,e,t){var i,n,a={};for(n in e)a[n]=A.style[n],A.style[n]=e[n];for(n in i=t.call(A),e)A.style[n]=a[n];return i},XA=new RegExp(IA.join("|"),"i");function qA(A,e,t){var i,n,a,o,r=jA.test(e),s=A.style;return(t=t||WA(A))&&(o=t.getPropertyValue(e)||t[e],r&&o&&(o=o.replace(v,"$1")||void 0),""!==o||dA(A)||(o=p.style(A,e)),!C.pixelBoxStyles()&&OA.test(o)&&XA.test(e)&&(i=s.width,n=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=t.width,s.width=i,s.minWidth=n,s.maxWidth=a)),void 0!==o?o+"":o}function zA(A,e){return{get:function(){if(!A())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){g.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",CA.appendChild(g).appendChild(c);var e=A.getComputedStyle(c);i="1%"!==e.top,s=12===t(e.marginLeft),c.style.right="60%",o=36===t(e.right),n=36===t(e.width),c.style.position="absolute",a=12===t(c.offsetWidth/3),CA.removeChild(g),c=null}}function t(A){return Math.round(parseFloat(A))}var i,n,a,o,r,s,g=B.createElement("div"),c=B.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",C.clearCloneStyle="content-box"===c.style.backgroundClip,p.extend(C,{boxSizingReliable:function(){return e(),n},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),a},reliableTrDimensions:function(){var e,t,i,n;return null==r&&(e=B.createElement("table"),t=B.createElement("tr"),i=B.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",i.style.height="9px",i.style.display="block",CA.appendChild(e).appendChild(t).appendChild(i),n=A.getComputedStyle(t),r=parseInt(n.height,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10)===t.offsetHeight,CA.removeChild(e)),r}}))}();var $A=["Webkit","Moz","ms"],Ae=B.createElement("div").style,ee={};function te(A){var e=p.cssProps[A]||ee[A];return e||(A in Ae?A:ee[A]=function(A){for(var e=A[0].toUpperCase()+A.slice(1),t=$A.length;t--;)if((A=$A[t]+e)in Ae)return A}(A)||A)}var ie=/^(none|table(?!-c[ea]).+)/,ne={position:"absolute",visibility:"hidden",display:"block"},ae={letterSpacing:"0",fontWeight:"400"};function oe(A,e,t){var i=lA.exec(e);return i?Math.max(0,i[2]-(t||0))+(i[3]||"px"):e}function re(A,e,t,i,n,a){var o="width"===e?1:0,r=0,s=0,g=0;if(t===(i?"border":"content"))return 0;for(;o<4;o+=2)"margin"===t&&(g+=p.css(A,t+IA[o],!0,n)),i?("content"===t&&(s-=p.css(A,"padding"+IA[o],!0,n)),"margin"!==t&&(s-=p.css(A,"border"+IA[o]+"Width",!0,n))):(s+=p.css(A,"padding"+IA[o],!0,n),"padding"!==t?s+=p.css(A,"border"+IA[o]+"Width",!0,n):r+=p.css(A,"border"+IA[o]+"Width",!0,n));return!i&&a>=0&&(s+=Math.max(0,Math.ceil(A["offset"+e[0].toUpperCase()+e.slice(1)]-a-s-r-.5))||0),s+g}function se(A,e,t){var i=WA(A),n=(!C.boxSizingReliable()||t)&&"border-box"===p.css(A,"boxSizing",!1,i),a=n,o=qA(A,e,i),r="offset"+e[0].toUpperCase()+e.slice(1);if(OA.test(o)){if(!t)return o;o="auto"}return(!C.boxSizingReliable()&&n||!C.reliableTrDimensions()&&y(A,"tr")||"auto"===o||!parseFloat(o)&&"inline"===p.css(A,"display",!1,i))&&A.getClientRects().length&&(n="border-box"===p.css(A,"boxSizing",!1,i),(a=r in A)&&(o=A[r])),(o=parseFloat(o)||0)+re(A,e,t||(n?"border":"content"),a,i,o)+"px"}function ge(A,e,t,i,n){return new ge.prototype.init(A,e,t,i,n)}p.extend({cssHooks:{opacity:{get:function(A,e){if(e){var t=qA(A,"opacity");return""===t?"1":t}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(A,e,t,i){if(A&&3!==A.nodeType&&8!==A.nodeType&&A.style){var n,a,o,r=tA(e),s=jA.test(e),g=A.style;if(s||(e=te(r)),o=p.cssHooks[e]||p.cssHooks[r],void 0===t)return o&&"get"in o&&void 0!==(n=o.get(A,!1,i))?n:g[e];"string"===(a=typeof t)&&(n=lA.exec(t))&&n[1]&&(t=uA(A,e,n),a="number"),null!=t&&t==t&&("number"!==a||s||(t+=n&&n[3]||(p.cssNumber[r]?"":"px")),C.clearCloneStyle||""!==t||0!==e.indexOf("background")||(g[e]="inherit"),o&&"set"in o&&void 0===(t=o.set(A,t,i))||(s?g.setProperty(e,t):g[e]=t))}},css:function(A,e,t,i){var n,a,o,r=tA(e);return jA.test(e)||(e=te(r)),(o=p.cssHooks[e]||p.cssHooks[r])&&"get"in o&&(n=o.get(A,!0,t)),void 0===n&&(n=qA(A,e,i)),"normal"===n&&e in ae&&(n=ae[e]),""===t||t?(a=parseFloat(n),!0===t||isFinite(a)?a||0:n):n}}),p.each(["height","width"],(function(A,e){p.cssHooks[e]={get:function(A,t,i){if(t)return!ie.test(p.css(A,"display"))||A.getClientRects().length&&A.getBoundingClientRect().width?se(A,e,i):ZA(A,ne,(function(){return se(A,e,i)}))},set:function(A,t,i){var n,a=WA(A),o=!C.scrollboxSize()&&"absolute"===a.position,r=(o||i)&&"border-box"===p.css(A,"boxSizing",!1,a),s=i?re(A,e,i,r,a):0;return r&&o&&(s-=Math.ceil(A["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(a[e])-re(A,e,"border",!1,a)-.5)),s&&(n=lA.exec(t))&&"px"!==(n[3]||"px")&&(A.style[e]=t,t=p.css(A,e)),oe(0,t,s)}}})),p.cssHooks.marginLeft=zA(C.reliableMarginLeft,(function(A,e){if(e)return(parseFloat(qA(A,"marginLeft"))||A.getBoundingClientRect().left-ZA(A,{marginLeft:0},(function(){return A.getBoundingClientRect().left})))+"px"})),p.each({margin:"",padding:"",border:"Width"},(function(A,e){p.cssHooks[A+e]={expand:function(t){for(var i=0,n={},a="string"==typeof t?t.split(" "):[t];i<4;i++)n[A+IA[i]+e]=a[i]||a[i-2]||a[0];return n}},"margin"!==A&&(p.cssHooks[A+e].set=oe)})),p.fn.extend({css:function(A,e){return z(this,(function(A,e,t){var i,n,a={},o=0;if(Array.isArray(e)){for(i=WA(A),n=e.length;o<n;o++)a[e[o]]=p.css(A,e[o],!1,i);return a}return void 0!==t?p.style(A,e,t):p.css(A,e)}),A,e,arguments.length>1)}}),p.Tween=ge,ge.prototype={constructor:ge,init:function(A,e,t,i,n,a){this.elem=A,this.prop=t,this.easing=n||p.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=a||(p.cssNumber[t]?"":"px")},cur:function(){var A=ge.propHooks[this.prop];return A&&A.get?A.get(this):ge.propHooks._default.get(this)},run:function(A){var e,t=ge.propHooks[this.prop];return this.options.duration?this.pos=e=p.easing[this.easing](A,this.options.duration*A,0,1,this.options.duration):this.pos=e=A,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):ge.propHooks._default.set(this),this}},ge.prototype.init.prototype=ge.prototype,ge.propHooks={_default:{get:function(A){var e;return 1!==A.elem.nodeType||null!=A.elem[A.prop]&&null==A.elem.style[A.prop]?A.elem[A.prop]:(e=p.css(A.elem,A.prop,""))&&"auto"!==e?e:0},set:function(A){p.fx.step[A.prop]?p.fx.step[A.prop](A):1!==A.elem.nodeType||!p.cssHooks[A.prop]&&null==A.elem.style[te(A.prop)]?A.elem[A.prop]=A.now:p.style(A.elem,A.prop,A.now+A.unit)}}},ge.propHooks.scrollTop=ge.propHooks.scrollLeft={set:function(A){A.elem.nodeType&&A.elem.parentNode&&(A.elem[A.prop]=A.now)}},p.easing={linear:function(A){return A},swing:function(A){return.5-Math.cos(A*Math.PI)/2},_default:"swing"},p.fx=ge.prototype.init,p.fx.step={};var ce,le,Ie=/^(?:toggle|show|hide)$/,Ce=/queueHooks$/;function de(){le&&(!1===B.hidden&&A.requestAnimationFrame?A.requestAnimationFrame(de):A.setTimeout(de,p.fx.interval),p.fx.tick())}function he(){return A.setTimeout((function(){ce=void 0})),ce=Date.now()}function Be(A,e){var t,i=0,n={height:A};for(e=e?1:0;i<4;i+=2-e)n["margin"+(t=IA[i])]=n["padding"+t]=A;return e&&(n.opacity=n.width=A),n}function ue(A,e,t){for(var i,n=(Ee.tweeners[e]||[]).concat(Ee.tweeners["*"]),a=0,o=n.length;a<o;a++)if(i=n[a].call(t,e,A))return i}function Ee(A,e,t){var i,n,a=0,o=Ee.prefilters.length,r=p.Deferred().always((function(){delete s.elem})),s=function(){if(n)return!1;for(var e=ce||he(),t=Math.max(0,g.startTime+g.duration-e),i=1-(t/g.duration||0),a=0,o=g.tweens.length;a<o;a++)g.tweens[a].run(i);return r.notifyWith(A,[g,i,t]),i<1&&o?t:(o||r.notifyWith(A,[g,1,0]),r.resolveWith(A,[g]),!1)},g=r.promise({elem:A,props:p.extend({},e),opts:p.extend(!0,{specialEasing:{},easing:p.easing._default},t),originalProperties:e,originalOptions:t,startTime:ce||he(),duration:t.duration,tweens:[],createTween:function(e,t){var i=p.Tween(A,g.opts,e,t,g.opts.specialEasing[e]||g.opts.easing);return g.tweens.push(i),i},stop:function(e){var t=0,i=e?g.tweens.length:0;if(n)return this;for(n=!0;t<i;t++)g.tweens[t].run(1);return e?(r.notifyWith(A,[g,1,0]),r.resolveWith(A,[g,e])):r.rejectWith(A,[g,e]),this}}),c=g.props;for(!function(A,e){var t,i,n,a,o;for(t in A)if(n=e[i=tA(t)],a=A[t],Array.isArray(a)&&(n=a[1],a=A[t]=a[0]),t!==i&&(A[i]=a,delete A[t]),(o=p.cssHooks[i])&&"expand"in o)for(t in a=o.expand(a),delete A[i],a)t in A||(A[t]=a[t],e[t]=n);else e[i]=n}(c,g.opts.specialEasing);a<o;a++)if(i=Ee.prefilters[a].call(g,A,c,g.opts))return d(i.stop)&&(p._queueHooks(g.elem,g.opts.queue).stop=i.stop.bind(i)),i;return p.map(c,ue,g),d(g.opts.start)&&g.opts.start.call(A,g),g.progress(g.opts.progress).done(g.opts.done,g.opts.complete).fail(g.opts.fail).always(g.opts.always),p.fx.timer(p.extend(s,{elem:A,anim:g,queue:g.opts.queue})),g}p.Animation=p.extend(Ee,{tweeners:{"*":[function(A,e){var t=this.createTween(A,e);return uA(t.elem,A,lA.exec(e),t),t}]},tweener:function(A,e){d(A)?(e=A,A=["*"]):A=A.match(V);for(var t,i=0,n=A.length;i<n;i++)t=A[i],Ee.tweeners[t]=Ee.tweeners[t]||[],Ee.tweeners[t].unshift(e)},prefilters:[function(A,e,t){var i,n,a,o,r,s,g,c,l="width"in e||"height"in e,I=this,C={},d=A.style,h=A.nodeType&&BA(A),B=aA.get(A,"fxshow");for(i in t.queue||(null==(o=p._queueHooks(A,"fx")).unqueued&&(o.unqueued=0,r=o.empty.fire,o.empty.fire=function(){o.unqueued||r()}),o.unqueued++,I.always((function(){I.always((function(){o.unqueued--,p.queue(A,"fx").length||o.empty.fire()}))}))),e)if(n=e[i],Ie.test(n)){if(delete e[i],a=a||"toggle"===n,n===(h?"hide":"show")){if("show"!==n||!B||void 0===B[i])continue;h=!0}C[i]=B&&B[i]||p.style(A,i)}if((s=!p.isEmptyObject(e))||!p.isEmptyObject(C))for(i in l&&1===A.nodeType&&(t.overflow=[d.overflow,d.overflowX,d.overflowY],null==(g=B&&B.display)&&(g=aA.get(A,"display")),"none"===(c=p.css(A,"display"))&&(g?c=g:(QA([A],!0),g=A.style.display||g,c=p.css(A,"display"),QA([A]))),("inline"===c||"inline-block"===c&&null!=g)&&"none"===p.css(A,"float")&&(s||(I.done((function(){d.display=g})),null==g&&(c=d.display,g="none"===c?"":c)),d.display="inline-block")),t.overflow&&(d.overflow="hidden",I.always((function(){d.overflow=t.overflow[0],d.overflowX=t.overflow[1],d.overflowY=t.overflow[2]}))),s=!1,C)s||(B?"hidden"in B&&(h=B.hidden):B=aA.access(A,"fxshow",{display:g}),a&&(B.hidden=!h),h&&QA([A],!0),I.done((function(){for(i in h||QA([A]),aA.remove(A,"fxshow"),C)p.style(A,i,C[i])}))),s=ue(h?B[i]:0,i,I),i in B||(B[i]=s.start,h&&(s.end=s.start,s.start=0))}],prefilter:function(A,e){e?Ee.prefilters.unshift(A):Ee.prefilters.push(A)}}),p.speed=function(A,e,t){var i=A&&"object"==typeof A?p.extend({},A):{complete:t||!t&&e||d(A)&&A,duration:A,easing:t&&e||e&&!d(e)&&e};return p.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in p.fx.speeds?i.duration=p.fx.speeds[i.duration]:i.duration=p.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){d(i.old)&&i.old.call(this),i.queue&&p.dequeue(this,i.queue)},i},p.fn.extend({fadeTo:function(A,e,t,i){return this.filter(BA).css("opacity",0).show().end().animate({opacity:e},A,t,i)},animate:function(A,e,t,i){var n=p.isEmptyObject(A),a=p.speed(e,t,i),o=function(){var e=Ee(this,p.extend({},A),a);(n||aA.get(this,"finish"))&&e.stop(!0)};return o.finish=o,n||!1===a.queue?this.each(o):this.queue(a.queue,o)},stop:function(A,e,t){var i=function(A){var e=A.stop;delete A.stop,e(t)};return"string"!=typeof A&&(t=e,e=A,A=void 0),e&&this.queue(A||"fx",[]),this.each((function(){var e=!0,n=null!=A&&A+"queueHooks",a=p.timers,o=aA.get(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Ce.test(n)&&i(o[n]);for(n=a.length;n--;)a[n].elem!==this||null!=A&&a[n].queue!==A||(a[n].anim.stop(t),e=!1,a.splice(n,1));!e&&t||p.dequeue(this,A)}))},finish:function(A){return!1!==A&&(A=A||"fx"),this.each((function(){var e,t=aA.get(this),i=t[A+"queue"],n=t[A+"queueHooks"],a=p.timers,o=i?i.length:0;for(t.finish=!0,p.queue(this,A,[]),n&&n.stop&&n.stop.call(this,!0),e=a.length;e--;)a[e].elem===this&&a[e].queue===A&&(a[e].anim.stop(!0),a.splice(e,1));for(e=0;e<o;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete t.finish}))}}),p.each(["toggle","show","hide"],(function(A,e){var t=p.fn[e];p.fn[e]=function(A,i,n){return null==A||"boolean"==typeof A?t.apply(this,arguments):this.animate(Be(e,!0),A,i,n)}})),p.each({slideDown:Be("show"),slideUp:Be("hide"),slideToggle:Be("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(A,e){p.fn[A]=function(A,t,i){return this.animate(e,A,t,i)}})),p.timers=[],p.fx.tick=function(){var A,e=0,t=p.timers;for(ce=Date.now();e<t.length;e++)(A=t[e])()||t[e]!==A||t.splice(e--,1);t.length||p.fx.stop(),ce=void 0},p.fx.timer=function(A){p.timers.push(A),p.fx.start()},p.fx.interval=13,p.fx.start=function(){le||(le=!0,de())},p.fx.stop=function(){le=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fn.delay=function(e,t){return e=p.fx&&p.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,i){var n=A.setTimeout(t,e);i.stop=function(){A.clearTimeout(n)}}))},function(){var A=B.createElement("input"),e=B.createElement("select").appendChild(B.createElement("option"));A.type="checkbox",C.checkOn=""!==A.value,C.optSelected=e.selected,(A=B.createElement("input")).value="t",A.type="radio",C.radioValue="t"===A.value}();var fe,Qe=p.expr.attrHandle;p.fn.extend({attr:function(A,e){return z(this,p.attr,A,e,arguments.length>1)},removeAttr:function(A){return this.each((function(){p.removeAttr(this,A)}))}}),p.extend({attr:function(A,e,t){var i,n,a=A.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===A.getAttribute?p.prop(A,e,t):(1===a&&p.isXMLDoc(A)||(n=p.attrHooks[e.toLowerCase()]||(p.expr.match.bool.test(e)?fe:void 0)),void 0!==t?null===t?void p.removeAttr(A,e):n&&"set"in n&&void 0!==(i=n.set(A,t,e))?i:(A.setAttribute(e,t+""),t):n&&"get"in n&&null!==(i=n.get(A,e))?i:null==(i=p.find.attr(A,e))?void 0:i)},attrHooks:{type:{set:function(A,e){if(!C.radioValue&&"radio"===e&&y(A,"input")){var t=A.value;return A.setAttribute("type",e),t&&(A.value=t),e}}}},removeAttr:function(A,e){var t,i=0,n=e&&e.match(V);if(n&&1===A.nodeType)for(;t=n[i++];)A.removeAttribute(t)}}),fe={set:function(A,e,t){return!1===e?p.removeAttr(A,t):A.setAttribute(t,t),t}},p.each(p.expr.match.bool.source.match(/\w+/g),(function(A,e){var t=Qe[e]||p.find.attr;Qe[e]=function(A,e,i){var n,a,o=e.toLowerCase();return i||(a=Qe[o],Qe[o]=n,n=null!=t(A,e,i)?o:null,Qe[o]=a),n}}));var xe=/^(?:input|select|textarea|button)$/i,pe=/^(?:a|area)$/i;function me(A){return(A.match(V)||[]).join(" ")}function ye(A){return A.getAttribute&&A.getAttribute("class")||""}function _e(A){return Array.isArray(A)?A:"string"==typeof A&&A.match(V)||[]}p.fn.extend({prop:function(A,e){return z(this,p.prop,A,e,arguments.length>1)},removeProp:function(A){return this.each((function(){delete this[p.propFix[A]||A]}))}}),p.extend({prop:function(A,e,t){var i,n,a=A.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&p.isXMLDoc(A)||(e=p.propFix[e]||e,n=p.propHooks[e]),void 0!==t?n&&"set"in n&&void 0!==(i=n.set(A,t,e))?i:A[e]=t:n&&"get"in n&&null!==(i=n.get(A,e))?i:A[e]},propHooks:{tabIndex:{get:function(A){var e=p.find.attr(A,"tabindex");return e?parseInt(e,10):xe.test(A.nodeName)||pe.test(A.nodeName)&&A.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),C.optSelected||(p.propHooks.selected={get:function(A){var e=A.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(A){var e=A.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),p.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){p.propFix[this.toLowerCase()]=this})),p.fn.extend({addClass:function(A){var e,t,i,n,a,o;return d(A)?this.each((function(e){p(this).addClass(A.call(this,e,ye(this)))})):(e=_e(A)).length?this.each((function(){if(i=ye(this),t=1===this.nodeType&&" "+me(i)+" "){for(a=0;a<e.length;a++)n=e[a],t.indexOf(" "+n+" ")<0&&(t+=n+" ");o=me(t),i!==o&&this.setAttribute("class",o)}})):this},removeClass:function(A){var e,t,i,n,a,o;return d(A)?this.each((function(e){p(this).removeClass(A.call(this,e,ye(this)))})):arguments.length?(e=_e(A)).length?this.each((function(){if(i=ye(this),t=1===this.nodeType&&" "+me(i)+" "){for(a=0;a<e.length;a++)for(n=e[a];t.indexOf(" "+n+" ")>-1;)t=t.replace(" "+n+" "," ");o=me(t),i!==o&&this.setAttribute("class",o)}})):this:this.attr("class","")},toggleClass:function(A,e){var t,i,n,a,o=typeof A,r="string"===o||Array.isArray(A);return d(A)?this.each((function(t){p(this).toggleClass(A.call(this,t,ye(this),e),e)})):"boolean"==typeof e&&r?e?this.addClass(A):this.removeClass(A):(t=_e(A),this.each((function(){if(r)for(a=p(this),n=0;n<t.length;n++)i=t[n],a.hasClass(i)?a.removeClass(i):a.addClass(i);else void 0!==A&&"boolean"!==o||((i=ye(this))&&aA.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||!1===A?"":aA.get(this,"__className__")||""))})))},hasClass:function(A){var e,t,i=0;for(e=" "+A+" ";t=this[i++];)if(1===t.nodeType&&(" "+me(ye(t))+" ").indexOf(e)>-1)return!0;return!1}});var Se=/\r/g;p.fn.extend({val:function(A){var e,t,i,n=this[0];return arguments.length?(i=d(A),this.each((function(t){var n;1===this.nodeType&&(null==(n=i?A.call(this,t,p(this).val()):A)?n="":"number"==typeof n?n+="":Array.isArray(n)&&(n=p.map(n,(function(A){return null==A?"":A+""}))),(e=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,n,"value")||(this.value=n))}))):n?(e=p.valHooks[n.type]||p.valHooks[n.nodeName.toLowerCase()])&&"get"in e&&void 0!==(t=e.get(n,"value"))?t:"string"==typeof(t=n.value)?t.replace(Se,""):null==t?"":t:void 0}}),p.extend({valHooks:{option:{get:function(A){var e=p.find.attr(A,"value");return null!=e?e:me(p.text(A))}},select:{get:function(A){var e,t,i,n=A.options,a=A.selectedIndex,o="select-one"===A.type,r=o?null:[],s=o?a+1:n.length;for(i=a<0?s:o?a:0;i<s;i++)if(((t=n[i]).selected||i===a)&&!t.disabled&&(!t.parentNode.disabled||!y(t.parentNode,"optgroup"))){if(e=p(t).val(),o)return e;r.push(e)}return r},set:function(A,e){for(var t,i,n=A.options,a=p.makeArray(e),o=n.length;o--;)((i=n[o]).selected=p.inArray(p.valHooks.option.get(i),a)>-1)&&(t=!0);return t||(A.selectedIndex=-1),a}}}}),p.each(["radio","checkbox"],(function(){p.valHooks[this]={set:function(A,e){if(Array.isArray(e))return A.checked=p.inArray(p(A).val(),e)>-1}},C.checkOn||(p.valHooks[this].get=function(A){return null===A.getAttribute("value")?"on":A.value})}));var De=A.location,we={guid:Date.now()},ve=/\?/;p.parseXML=function(e){var t,i;if(!e||"string"!=typeof e)return null;try{t=(new A.DOMParser).parseFromString(e,"text/xml")}catch(A){}return i=t&&t.getElementsByTagName("parsererror")[0],t&&!i||p.error("Invalid XML: "+(i?p.map(i.childNodes,(function(A){return A.textContent})).join("\n"):e)),t};var be=/^(?:focusinfocus|focusoutblur)$/,Fe=function(A){A.stopPropagation()};p.extend(p.event,{trigger:function(e,t,i,n){var a,o,r,s,g,l,I,C,u=[i||B],E=c.call(e,"type")?e.type:e,f=c.call(e,"namespace")?e.namespace.split("."):[];if(o=C=r=i=i||B,3!==i.nodeType&&8!==i.nodeType&&!be.test(E+p.event.triggered)&&(E.indexOf(".")>-1&&(f=E.split("."),E=f.shift(),f.sort()),g=E.indexOf(":")<0&&"on"+E,(e=e[p.expando]?e:new p.Event(E,"object"==typeof e&&e)).isTrigger=n?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:p.makeArray(t,[e]),I=p.event.special[E]||{},n||!I.trigger||!1!==I.trigger.apply(i,t))){if(!n&&!I.noBubble&&!h(i)){for(s=I.delegateType||E,be.test(s+E)||(o=o.parentNode);o;o=o.parentNode)u.push(o),r=o;r===(i.ownerDocument||B)&&u.push(r.defaultView||r.parentWindow||A)}for(a=0;(o=u[a++])&&!e.isPropagationStopped();)C=o,e.type=a>1?s:I.bindType||E,(l=(aA.get(o,"events")||Object.create(null))[e.type]&&aA.get(o,"handle"))&&l.apply(o,t),(l=g&&o[g])&&l.apply&&iA(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=E,n||e.isDefaultPrevented()||I._default&&!1!==I._default.apply(u.pop(),t)||!iA(i)||g&&d(i[E])&&!h(i)&&((r=i[g])&&(i[g]=null),p.event.triggered=E,e.isPropagationStopped()&&C.addEventListener(E,Fe),i[E](),e.isPropagationStopped()&&C.removeEventListener(E,Fe),p.event.triggered=void 0,r&&(i[g]=r)),e.result}},simulate:function(A,e,t){var i=p.extend(new p.Event,t,{type:A,isSimulated:!0});p.event.trigger(i,null,e)}}),p.fn.extend({trigger:function(A,e){return this.each((function(){p.event.trigger(A,e,this)}))},triggerHandler:function(A,e){var t=this[0];if(t)return p.event.trigger(A,e,t,!0)}});var Re=/\[\]$/,ke=/\r?\n/g,Pe=/^(?:submit|button|image|reset|file)$/i,Ne=/^(?:input|select|textarea|keygen)/i;function Te(A,e,t,i){var n;if(Array.isArray(e))p.each(e,(function(e,n){t||Re.test(A)?i(A,n):Te(A+"["+("object"==typeof n&&null!=n?e:"")+"]",n,t,i)}));else if(t||"object"!==f(e))i(A,e);else for(n in e)Te(A+"["+n+"]",e[n],t,i)}p.param=function(A,e){var t,i=[],n=function(A,e){var t=d(e)?e():e;i[i.length]=encodeURIComponent(A)+"="+encodeURIComponent(null==t?"":t)};if(null==A)return"";if(Array.isArray(A)||A.jquery&&!p.isPlainObject(A))p.each(A,(function(){n(this.name,this.value)}));else for(t in A)Te(t,A[t],e,n);return i.join("&")},p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var A=p.prop(this,"elements");return A?p.makeArray(A):this})).filter((function(){var A=this.type;return this.name&&!p(this).is(":disabled")&&Ne.test(this.nodeName)&&!Pe.test(A)&&(this.checked||!mA.test(A))})).map((function(A,e){var t=p(this).val();return null==t?null:Array.isArray(t)?p.map(t,(function(A){return{name:e.name,value:A.replace(ke,"\r\n")}})):{name:e.name,value:t.replace(ke,"\r\n")}})).get()}});var Me=/%20/g,Le=/#.*$/,Ye=/([?&])_=[^&]*/,Ge=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ue=/^(?:GET|HEAD)$/,Je=/^\/\//,He={},Ke={},Ve="*/".concat("*"),Oe=B.createElement("a");function je(A){return function(e,t){"string"!=typeof e&&(t=e,e="*");var i,n=0,a=e.toLowerCase().match(V)||[];if(d(t))for(;i=a[n++];)"+"===i[0]?(i=i.slice(1)||"*",(A[i]=A[i]||[]).unshift(t)):(A[i]=A[i]||[]).push(t)}}function We(A,e,t,i){var n={},a=A===Ke;function o(r){var s;return n[r]=!0,p.each(A[r]||[],(function(A,r){var g=r(e,t,i);return"string"!=typeof g||a||n[g]?a?!(s=g):void 0:(e.dataTypes.unshift(g),o(g),!1)})),s}return o(e.dataTypes[0])||!n["*"]&&o("*")}function Ze(A,e){var t,i,n=p.ajaxSettings.flatOptions||{};for(t in e)void 0!==e[t]&&((n[t]?A:i||(i={}))[t]=e[t]);return i&&p.extend(!0,A,i),A}Oe.href=De.href,p.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:De.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(De.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ve,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":p.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(A,e){return e?Ze(Ze(A,p.ajaxSettings),e):Ze(p.ajaxSettings,A)},ajaxPrefilter:je(He),ajaxTransport:je(Ke),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,n,a,o,r,s,g,c,l,I,C=p.ajaxSetup({},t),d=C.context||C,h=C.context&&(d.nodeType||d.jquery)?p(d):p.event,u=p.Deferred(),E=p.Callbacks("once memory"),f=C.statusCode||{},Q={},x={},m="canceled",y={readyState:0,getResponseHeader:function(A){var e;if(g){if(!o)for(o={};e=Ge.exec(a);)o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=o[A.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return g?a:null},setRequestHeader:function(A,e){return null==g&&(A=x[A.toLowerCase()]=x[A.toLowerCase()]||A,Q[A]=e),this},overrideMimeType:function(A){return null==g&&(C.mimeType=A),this},statusCode:function(A){var e;if(A)if(g)y.always(A[y.status]);else for(e in A)f[e]=[f[e],A[e]];return this},abort:function(A){var e=A||m;return i&&i.abort(e),_(0,e),this}};if(u.promise(y),C.url=((e||C.url||De.href)+"").replace(Je,De.protocol+"//"),C.type=t.method||t.type||C.method||C.type,C.dataTypes=(C.dataType||"*").toLowerCase().match(V)||[""],null==C.crossDomain){s=B.createElement("a");try{s.href=C.url,s.href=s.href,C.crossDomain=Oe.protocol+"//"+Oe.host!=s.protocol+"//"+s.host}catch(A){C.crossDomain=!0}}if(C.data&&C.processData&&"string"!=typeof C.data&&(C.data=p.param(C.data,C.traditional)),We(He,C,t,y),g)return y;for(l in(c=p.event&&C.global)&&0==p.active++&&p.event.trigger("ajaxStart"),C.type=C.type.toUpperCase(),C.hasContent=!Ue.test(C.type),n=C.url.replace(Le,""),C.hasContent?C.data&&C.processData&&0===(C.contentType||"").indexOf("application/x-www-form-urlencoded")&&(C.data=C.data.replace(Me,"+")):(I=C.url.slice(n.length),C.data&&(C.processData||"string"==typeof C.data)&&(n+=(ve.test(n)?"&":"?")+C.data,delete C.data),!1===C.cache&&(n=n.replace(Ye,"$1"),I=(ve.test(n)?"&":"?")+"_="+we.guid+++I),C.url=n+I),C.ifModified&&(p.lastModified[n]&&y.setRequestHeader("If-Modified-Since",p.lastModified[n]),p.etag[n]&&y.setRequestHeader("If-None-Match",p.etag[n])),(C.data&&C.hasContent&&!1!==C.contentType||t.contentType)&&y.setRequestHeader("Content-Type",C.contentType),y.setRequestHeader("Accept",C.dataTypes[0]&&C.accepts[C.dataTypes[0]]?C.accepts[C.dataTypes[0]]+("*"!==C.dataTypes[0]?", "+Ve+"; q=0.01":""):C.accepts["*"]),C.headers)y.setRequestHeader(l,C.headers[l]);if(C.beforeSend&&(!1===C.beforeSend.call(d,y,C)||g))return y.abort();if(m="abort",E.add(C.complete),y.done(C.success),y.fail(C.error),i=We(Ke,C,t,y)){if(y.readyState=1,c&&h.trigger("ajaxSend",[y,C]),g)return y;C.async&&C.timeout>0&&(r=A.setTimeout((function(){y.abort("timeout")}),C.timeout));try{g=!1,i.send(Q,_)}catch(A){if(g)throw A;_(-1,A)}}else _(-1,"No Transport");function _(e,t,o,s){var l,I,B,Q,x,m=t;g||(g=!0,r&&A.clearTimeout(r),i=void 0,a=s||"",y.readyState=e>0?4:0,l=e>=200&&e<300||304===e,o&&(Q=function(A,e,t){for(var i,n,a,o,r=A.contents,s=A.dataTypes;"*"===s[0];)s.shift(),void 0===i&&(i=A.mimeType||e.getResponseHeader("Content-Type"));if(i)for(n in r)if(r[n]&&r[n].test(i)){s.unshift(n);break}if(s[0]in t)a=s[0];else{for(n in t){if(!s[0]||A.converters[n+" "+s[0]]){a=n;break}o||(o=n)}a=a||o}if(a)return a!==s[0]&&s.unshift(a),t[a]}(C,y,o)),!l&&p.inArray("script",C.dataTypes)>-1&&p.inArray("json",C.dataTypes)<0&&(C.converters["text script"]=function(){}),Q=function(A,e,t,i){var n,a,o,r,s,g={},c=A.dataTypes.slice();if(c[1])for(o in A.converters)g[o.toLowerCase()]=A.converters[o];for(a=c.shift();a;)if(A.responseFields[a]&&(t[A.responseFields[a]]=e),!s&&i&&A.dataFilter&&(e=A.dataFilter(e,A.dataType)),s=a,a=c.shift())if("*"===a)a=s;else if("*"!==s&&s!==a){if(!(o=g[s+" "+a]||g["* "+a]))for(n in g)if((r=n.split(" "))[1]===a&&(o=g[s+" "+r[0]]||g["* "+r[0]])){!0===o?o=g[n]:!0!==g[n]&&(a=r[0],c.unshift(r[1]));break}if(!0!==o)if(o&&A.throws)e=o(e);else try{e=o(e)}catch(A){return{state:"parsererror",error:o?A:"No conversion from "+s+" to "+a}}}return{state:"success",data:e}}(C,Q,y,l),l?(C.ifModified&&((x=y.getResponseHeader("Last-Modified"))&&(p.lastModified[n]=x),(x=y.getResponseHeader("etag"))&&(p.etag[n]=x)),204===e||"HEAD"===C.type?m="nocontent":304===e?m="notmodified":(m=Q.state,I=Q.data,l=!(B=Q.error))):(B=m,!e&&m||(m="error",e<0&&(e=0))),y.status=e,y.statusText=(t||m)+"",l?u.resolveWith(d,[I,m,y]):u.rejectWith(d,[y,m,B]),y.statusCode(f),f=void 0,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[y,C,l?I:B]),E.fireWith(d,[y,m]),c&&(h.trigger("ajaxComplete",[y,C]),--p.active||p.event.trigger("ajaxStop")))}return y},getJSON:function(A,e,t){return p.get(A,e,t,"json")},getScript:function(A,e){return p.get(A,void 0,e,"script")}}),p.each(["get","post"],(function(A,e){p[e]=function(A,t,i,n){return d(t)&&(n=n||i,i=t,t=void 0),p.ajax(p.extend({url:A,type:e,dataType:n,data:t,success:i},p.isPlainObject(A)&&A))}})),p.ajaxPrefilter((function(A){var e;for(e in A.headers)"content-type"===e.toLowerCase()&&(A.contentType=A.headers[e]||"")})),p._evalUrl=function(A,e,t){return p.ajax({url:A,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(A){p.globalEval(A,e,t)}})},p.fn.extend({wrapAll:function(A){var e;return this[0]&&(d(A)&&(A=A.call(this[0])),e=p(A,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var A=this;A.firstElementChild;)A=A.firstElementChild;return A})).append(this)),this},wrapInner:function(A){return d(A)?this.each((function(e){p(this).wrapInner(A.call(this,e))})):this.each((function(){var e=p(this),t=e.contents();t.length?t.wrapAll(A):e.append(A)}))},wrap:function(A){var e=d(A);return this.each((function(t){p(this).wrapAll(e?A.call(this,t):A)}))},unwrap:function(A){return this.parent(A).not("body").each((function(){p(this).replaceWith(this.childNodes)})),this}}),p.expr.pseudos.hidden=function(A){return!p.expr.pseudos.visible(A)},p.expr.pseudos.visible=function(A){return!!(A.offsetWidth||A.offsetHeight||A.getClientRects().length)},p.ajaxSettings.xhr=function(){try{return new A.XMLHttpRequest}catch(A){}};var Xe={0:200,1223:204},qe=p.ajaxSettings.xhr();C.cors=!!qe&&"withCredentials"in qe,C.ajax=qe=!!qe,p.ajaxTransport((function(e){var t,i;if(C.cors||qe&&!e.crossDomain)return{send:function(n,a){var o,r=e.xhr();if(r.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)r[o]=e.xhrFields[o];for(o in e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)r.setRequestHeader(o,n[o]);t=function(A){return function(){t&&(t=i=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===A?r.abort():"error"===A?"number"!=typeof r.status?a(0,"error"):a(r.status,r.statusText):a(Xe[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=t(),i=r.onerror=r.ontimeout=t("error"),void 0!==r.onabort?r.onabort=i:r.onreadystatechange=function(){4===r.readyState&&A.setTimeout((function(){t&&i()}))},t=t("abort");try{r.send(e.hasContent&&e.data||null)}catch(A){if(t)throw A}},abort:function(){t&&t()}}})),p.ajaxPrefilter((function(A){A.crossDomain&&(A.contents.script=!1)})),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(A){return p.globalEval(A),A}}}),p.ajaxPrefilter("script",(function(A){void 0===A.cache&&(A.cache=!1),A.crossDomain&&(A.type="GET")})),p.ajaxTransport("script",(function(A){var e,t;if(A.crossDomain||A.scriptAttrs)return{send:function(i,n){e=p("<script>").attr(A.scriptAttrs||{}).prop({charset:A.scriptCharset,src:A.url}).on("load error",t=function(A){e.remove(),t=null,A&&n("error"===A.type?404:200,A.type)}),B.head.appendChild(e[0])},abort:function(){t&&t()}}}));var ze,$e=[],At=/(=)\?(?=&|$)|\?\?/;p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var A=$e.pop()||p.expando+"_"+we.guid++;return this[A]=!0,A}}),p.ajaxPrefilter("json jsonp",(function(e,t,i){var n,a,o,r=!1!==e.jsonp&&(At.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&At.test(e.data)&&"data");if(r||"jsonp"===e.dataTypes[0])return n=e.jsonpCallback=d(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,r?e[r]=e[r].replace(At,"$1"+n):!1!==e.jsonp&&(e.url+=(ve.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return o||p.error(n+" was not called"),o[0]},e.dataTypes[0]="json",a=A[n],A[n]=function(){o=arguments},i.always((function(){void 0===a?p(A).removeProp(n):A[n]=a,e[n]&&(e.jsonpCallback=t.jsonpCallback,$e.push(n)),o&&d(a)&&a(o[0]),o=a=void 0})),"script"})),C.createHTMLDocument=((ze=B.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===ze.childNodes.length),p.parseHTML=function(A,e,t){return"string"!=typeof A?[]:("boolean"==typeof e&&(t=e,e=!1),e||(C.createHTMLDocument?((i=(e=B.implementation.createHTMLDocument("")).createElement("base")).href=B.location.href,e.head.appendChild(i)):e=B),a=!t&&[],(n=M.exec(A))?[e.createElement(n[1])]:(n=bA([A],e,a),a&&a.length&&p(a).remove(),p.merge([],n.childNodes)));var i,n,a},p.fn.load=function(A,e,t){var i,n,a,o=this,r=A.indexOf(" ");return r>-1&&(i=me(A.slice(r)),A=A.slice(0,r)),d(e)?(t=e,e=void 0):e&&"object"==typeof e&&(n="POST"),o.length>0&&p.ajax({url:A,type:n||"GET",dataType:"html",data:e}).done((function(A){a=arguments,o.html(i?p("<div>").append(p.parseHTML(A)).find(i):A)})).always(t&&function(A,e){o.each((function(){t.apply(this,a||[A.responseText,e,A])}))}),this},p.expr.pseudos.animated=function(A){return p.grep(p.timers,(function(e){return A===e.elem})).length},p.offset={setOffset:function(A,e,t){var i,n,a,o,r,s,g=p.css(A,"position"),c=p(A),l={};"static"===g&&(A.style.position="relative"),r=c.offset(),a=p.css(A,"top"),s=p.css(A,"left"),("absolute"===g||"fixed"===g)&&(a+s).indexOf("auto")>-1?(o=(i=c.position()).top,n=i.left):(o=parseFloat(a)||0,n=parseFloat(s)||0),d(e)&&(e=e.call(A,t,p.extend({},r))),null!=e.top&&(l.top=e.top-r.top+o),null!=e.left&&(l.left=e.left-r.left+n),"using"in e?e.using.call(A,l):c.css(l)}},p.fn.extend({offset:function(A){if(arguments.length)return void 0===A?this:this.each((function(e){p.offset.setOffset(this,A,e)}));var e,t,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),t=i.ownerDocument.defaultView,{top:e.top+t.pageYOffset,left:e.left+t.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var A,e,t,i=this[0],n={top:0,left:0};if("fixed"===p.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),t=i.ownerDocument,A=i.offsetParent||t.documentElement;A&&(A===t.body||A===t.documentElement)&&"static"===p.css(A,"position");)A=A.parentNode;A&&A!==i&&1===A.nodeType&&((n=p(A).offset()).top+=p.css(A,"borderTopWidth",!0),n.left+=p.css(A,"borderLeftWidth",!0))}return{top:e.top-n.top-p.css(i,"marginTop",!0),left:e.left-n.left-p.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var A=this.offsetParent;A&&"static"===p.css(A,"position");)A=A.offsetParent;return A||CA}))}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(A,e){var t="pageYOffset"===e;p.fn[A]=function(i){return z(this,(function(A,i,n){var a;if(h(A)?a=A:9===A.nodeType&&(a=A.defaultView),void 0===n)return a?a[e]:A[i];a?a.scrollTo(t?a.pageXOffset:n,t?n:a.pageYOffset):A[i]=n}),A,i,arguments.length)}})),p.each(["top","left"],(function(A,e){p.cssHooks[e]=zA(C.pixelPosition,(function(A,t){if(t)return t=qA(A,e),OA.test(t)?p(A).position()[e]+"px":t}))})),p.each({Height:"height",Width:"width"},(function(A,e){p.each({padding:"inner"+A,content:e,"":"outer"+A},(function(t,i){p.fn[i]=function(n,a){var o=arguments.length&&(t||"boolean"!=typeof n),r=t||(!0===n||!0===a?"margin":"border");return z(this,(function(e,t,n){var a;return h(e)?0===i.indexOf("outer")?e["inner"+A]:e.document.documentElement["client"+A]:9===e.nodeType?(a=e.documentElement,Math.max(e.body["scroll"+A],a["scroll"+A],e.body["offset"+A],a["offset"+A],a["client"+A])):void 0===n?p.css(e,t,r):p.style(e,t,n,r)}),e,o?n:void 0,o)}}))})),p.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(A,e){p.fn[e]=function(A){return this.on(e,A)}})),p.fn.extend({bind:function(A,e,t){return this.on(A,null,e,t)},unbind:function(A,e){return this.off(A,null,e)},delegate:function(A,e,t,i){return this.on(e,A,t,i)},undelegate:function(A,e,t){return 1===arguments.length?this.off(A,"**"):this.off(e,A||"**",t)},hover:function(A,e){return this.on("mouseenter",A).on("mouseleave",e||A)}}),p.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(A,e){p.fn[e]=function(A,t){return arguments.length>0?this.on(e,null,A,t):this.trigger(e)}}));var et=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;p.proxy=function(A,e){var t,i,a;if("string"==typeof e&&(t=A[e],e=A,A=t),d(A))return i=n.call(arguments,2),a=function(){return A.apply(e||this,i.concat(n.call(arguments)))},a.guid=A.guid=A.guid||p.guid++,a},p.holdReady=function(A){A?p.readyWait++:p.ready(!0)},p.isArray=Array.isArray,p.parseJSON=JSON.parse,p.nodeName=y,p.isFunction=d,p.isWindow=h,p.camelCase=tA,p.type=f,p.now=Date.now,p.isNumeric=function(A){var e=p.type(A);return("number"===e||"string"===e)&&!isNaN(A-parseFloat(A))},p.trim=function(A){return null==A?"":(A+"").replace(et,"$1")};var tt=A.jQuery,it=A.$;return p.noConflict=function(e){return A.$===p&&(A.$=it),e&&A.jQuery===p&&(A.jQuery=tt),p},void 0===e&&(A.jQuery=A.$=p),p}))}(mn);var yn=R(mn.exports),_n={info:"",log:"background: #4096ff; color: #FFF;",warn:"background: yellow; color: #FFF;",error:"background: red; color: #FFF;"},Sn=function(){function A(A){void 0===A&&(A={}),this._options={level:"INFO",showTime:!1},this._levelNum=3,this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0),this.setOptions(A)}var e=A.prototype;return e.setOptions=function(A){var e;this._options=Object.assign({},this._options,A),this._levelNum=this._matchLevel(null!=(e=this._options.level)?e:"INFO"),this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0)},e._matchLevel=function(A){var e=3;switch(A){case"INFO":e=3;break;case"LOG":e=2;break;case"WARN":e=1;break;case"ERROR":e=0}return e},e._loggerFactory=function(e,t){var i=console[e];if(t&&i){var n,a=this._options.name?"%c["+this._options.name+"]%c %c["+e.toUpperCase()+"]":"%c["+e.toUpperCase()+"]",o=[this._options.name?"background: green;color: #fff":null,this._options.name?"":null,_n[e]].filter((function(A){return null!=A}));return(n=i).bind.apply(n,[].concat([console,a],o))}return A.noop},e.getOptions=function(){return this._options},e.getVersion=function(){return"1.0.1"},A}();function Dn(A){return(A=+A)<10&&(A="0"+A),A+""}Sn.noop=function(){};var wn=["info","log","warn","error"];
39
+ ai.sessions={},ai.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){var A=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),e=33;return window.navigator.userAgent.match("Linux")&&(e=35),A>=26&&A<=e||ai.extension.isInstalled()}return!0};var ni={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(A){var e=window.setTimeout((function(){var e=new Error("NavigatorUserMediaError");return e.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',A(e)}),1e3);this.cache[e]=A,window.postMessage({type:"janusGetScreen",id:e},"*")},init:function(){var A={};this.cache=A,window.addEventListener("message",(function(e){if(e.origin==window.location.origin)if("janusGotScreen"==e.data.type&&A[e.data.id]){var t=A[e.data.id];if(delete A[e.data.id],""===e.data.sourceId){var i=new Error("NavigatorUserMediaError");i.name="You cancelled the request for permission, giving up...",t(i)}else t(null,e.data.sourceId)}else"janusGetScreenPending"==e.data.type&&(console.log("clearing ",e.data.id),window.clearTimeout(e.data.id))}))}};function ai(A){if(void 0===ai.initDone)return A.error("Library not initialized"),{};if(!ai.isWebrtcSupported())return A.error("WebRTC not supported by this browser"),{};if(ai.log("Library initialized: "+ai.initDone),(A=A||{}).success="function"==typeof A.success?A.success:ai.noop,A.error="function"==typeof A.error?A.error:ai.noop,A.destroyed="function"==typeof A.destroyed?A.destroyed:ai.noop,null===A.server||void 0===A.server)return A.error("Invalid server url"),{};var t=!1,i=null,n={},a=null,o=null,r=0,s=A.server;ai.isArray(s)?(ai.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,o=A.server,ai.debug(o)):0===s.indexOf("ws")?(t=!0,ai.log("Using WebSockets to contact Janus: "+s)):(t=!1,ai.log("Using REST API to contact Janus: "+s));var g=A.iceServers;null==g&&(g=[{urls:"stun:stun.l.google.com:19302"}]);var c=A.iceTransportPolicy,I=A.bundlePolicy,C=A.ipv6;null==C&&(C=!1);var h=!1;void 0!==A.withCredentials&&null!==A.withCredentials&&(h=!0===A.withCredentials);var B=10;void 0!==A.max_poll_events&&null!==A.max_poll_events&&(B=A.max_poll_events),B<1&&(B=1);var u=null;void 0!==A.token&&null!==A.token&&(u=A.token);var E=null;void 0!==A.apisecret&&null!==A.apisecret&&(E=A.apisecret),this.destroyOnUnload=!0,void 0!==A.destroyOnUnload&&null!==A.destroyOnUnload&&(this.destroyOnUnload=!0===A.destroyOnUnload);var f=25e3;void 0!==A.keepAlivePeriod&&null!==A.keepAlivePeriod&&(f=A.keepAlivePeriod),isNaN(f)&&(f=25e3);var Q=6e4;function x(A){var e={high:9e5,medium:3e5,low:1e5};return null!=A&&(A.high&&(e.high=A.high),A.medium&&(e.medium=A.medium),A.low&&(e.low=A.low)),e}void 0!==A.longPollTimeout&&null!==A.longPollTimeout&&(Q=A.longPollTimeout),isNaN(Q)&&(Q=6e4);var p=!1,m=null,y={},_=this,S=0,D={};function w(){if(null!=m)if(ai.debug("Long poll..."),p){var e=s+"/"+m+"?rid="+(new Date).getTime();null!=B&&(e=e+"&maxev="+B),null!=u&&(e=e+"&token="+encodeURIComponent(u)),null!=E&&(e=e+"&apisecret="+encodeURIComponent(E)),ai.httpAPICall(e,{verb:"GET",withCredentials:h,success:v,timeout:Q,error:function(e,t){if(ai.error(e+":",t),++S>3)return p=!1,void A.error("Lost connection to the server (is it down?)");w()}})}else ai.warn("Is the server down? (connected=false)")}function v(A,e){if(S=0,t||null==m||!0===e||w(),t||!ai.isArray(A))if("keepalive"!==A.rtcgw)if("ack"!==A.rtcgw)if("success"!==A.rtcgw)if("trickle"===A.rtcgw){if(null==(s=A.sender))return void ai.warn("Missing sender...");if(null==(c=y[s]))return void ai.debug("This handle is not attached to this session");var n=A.candidate;ai.debug("Got a trickled candidate on session "+m),ai.debug(n);var a=c.webrtcStuff;a.pc&&a.remoteSdp?(ai.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(ai.endOfCandidates)):(ai.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),a.candidates||(a.candidates=[]),a.candidates.push(n),ai.debug(a.candidates))}else{if("webrtcup"===A.rtcgw)return ai.debug("Got a webrtcup event on session "+m),ai.debug(A),null==(s=A.sender)?void ai.warn("Missing sender..."):null==(c=y[s])?void ai.debug("This handle is not attached to this session"):void c.webrtcState(!0);if("hangup"===A.rtcgw){if(ai.debug("Got a hangup event on session "+m),ai.debug(A),null==(s=A.sender))return void ai.warn("Missing sender...");if(null==(c=y[s]))return void ai.debug("This handle is not attached to this session");c.webrtcState(!1,A.reason),c.hangup()}else if("detached"===A.rtcgw){if(ai.debug("Got a detached event on session "+m),ai.debug(A),null==(s=A.sender))return void ai.warn("Missing sender...");if(null==(c=y[s]))return;c.detached=!0,c.ondetached(),c.detach()}else if("media"===A.rtcgw){if(ai.debug("Got a media event on session "+m),ai.debug(A),null==(s=A.sender))return void ai.warn("Missing sender...");if(null==(c=y[s]))return void ai.debug("This handle is not attached to this session");c.mediaState(A.type,A.receiving)}else if("slowlink"===A.rtcgw){if(ai.debug("Got a slowlink event on session "+m),ai.debug(A),null==(s=A.sender))return void ai.warn("Missing sender...");if(null==(c=y[s]))return void ai.debug("This handle is not attached to this session");c.slowLink(A.uplink,A.lost)}else{if("error"===A.rtcgw){var o,r;if(ai.error("Ooops: "+A.error.code+" "+A.error.reason),ai.debug(A),null!=(o=A.transaction))null!=(r=D[o])&&r(A),delete D[o];return}if("event"===A.rtcgw){var s;if(ai.debug("Got a plugin event on session "+m),ai.debug(A),null==(s=A.sender))return void ai.warn("Missing sender...");var g=A.plugindata;if(null==g)return void ai.warn("Missing plugindata...");ai.debug(" -- Event is coming from "+s+" ("+g.plugin+")");var c,l=g.data;if(ai.debug(l),null==(c=y[s]))return void ai.warn("This handle is not attached to this session");var I=A.jsep;null!=I&&(ai.debug("Handling SDP as well..."),ai.debug(I));var C=c.onmessage;null!=C?(ai.debug("Notifying application..."),C(l,I)):ai.debug("No provided notification callback")}else{if("timeout"===A.rtcgw)return ai.error("Timeout on session "+m),ai.debug(A),void(t&&i.close(3504,"Gateway timeout"));ai.warn("Unknown message/event '"+A.rtcgw+"' on session "+m),ai.debug(A)}}}else ai.debug("Got a success on session "+m),ai.debug(A),null!=(o=A.transaction)&&(null!=(r=D[o])&&r(A),delete D[o]);else ai.debug("Got an ack on session "+m),ai.debug(A),null!=(o=A.transaction)&&(null!=(r=D[o])&&r(A),delete D[o]);else ai.vdebug("Got a keepalive on session "+m);else for(var d=0;d<A.length;d++)v(A[d],!0)}function b(){if(null!==s&&t&&p){a=setTimeout(b,f);var A={rtcgw:"keepalive",session_id:m,transaction:ai.randomString(12)};null!=u&&(A.token=u),null!=E&&(A.apisecret=E),i.send(JSON.stringify(A))}}function F(e){var g=ai.randomString(12),c={rtcgw:"create",transaction:g,token:window.EZUIKit.opt.stream,device:window.EZUIKit.opt.deviceSerial,channel:window.EZUIKit.opt.channelNo,authBizType:"TALK"};if(e.reconnect&&(p=!1,c.rtcgw="claim",c.session_id=m,i&&(i.onopen=null,i.onerror=null,i.onclose=null,a&&(clearTimeout(a),a=null))),null!=u&&(c.token=u),null!=E&&(c.apisecret=E),null===s&&ai.isArray(o)&&(0===(s=o[r]).indexOf("ws")?(t=!0,ai.log("Server #"+(r+1)+": trying WebSockets to contact Janus ("+s+")")):(t=!1,ai.log("Server #"+(r+1)+": trying REST API to contact Janus ("+s+")"))),t)for(var l in i=ai.newWebSocket(s,"rtcgw-protocol"),n={error:function(){if(ai.error("Error connecting to the Janus WebSockets server... "+s),ai.isArray(o)&&!e.reconnect)return++r==o.length?void e.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout((function(){F(e)}),200));e.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){D[g]=function(A){if(ai.debug(A),"success"!==A.rtcgw)return ai.error("Ooops: "+A.error.code+" "+A.error.reason),void e.error(A.error.reason);a=setTimeout(b,f),p=!0,m=A.session_id?A.session_id:A.data.id,e.reconnect?ai.log("Claimed session: "+m):ai.log("Created session: "+m),ai.sessions[m]=_,e.success()},i.send(JSON.stringify(c))},message:function(A){v(JSON.parse(A.data))},close:function(){null!==s&&p&&(p=!1,A.error("Lost connection to the server (is it down?)"))}})i.addEventListener(l,n[l]);else ai.httpAPICall(s,{verb:"POST",withCredentials:h,body:c,success:function(A){if(ai.debug(A),"success"!==A.rtcgw)return ai.error("Ooops: "+A.error.code+" "+A.error.reason),void e.error(A.error.reason);p=!0,m=A.session_id?A.session_id:A.data.id,e.reconnect?ai.log("Claimed session: "+m):ai.log("Created session: "+m),ai.sessions[m]=_,w(),e.success()},error:function(A,t){if(ai.error(A+":",t),ai.isArray(o)&&!e.reconnect)return++r==o.length?void e.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout((function(){F(e)}),200));""===t?e.error(A+": Is the server down?"):e.error(A+": "+t)}})}function R(A,e){if((e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:ai.noop,!p)return ai.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");var n=y[A];if(null==n||null===n.webrtcStuff||void 0===n.webrtcStuff)return ai.warn("Invalid handle"),void e.error("Invalid handle");var a=e.message,o=e.jsep,r=ai.randomString(12),g={rtcgw:"message",body:a,transaction:r};if(null!==n.token&&void 0!==n.token&&(g.token=n.token),null!=E&&(g.apisecret=E),null!=o&&(g.jsep=o),ai.debug("Sending message to plugin (handle="+A+"):"),ai.debug(g),t)return g.session_id=m,g.handle_id=A,D[r]=function(A){if(ai.debug("Message sent!"),ai.debug(A),"success"===A.rtcgw){var t=A.plugindata;if(null==t)return ai.warn("Request succeeded, but missing plugindata..."),void e.success();ai.log("Synchronous transaction successful ("+t.plugin+")");var i=t.data;return ai.debug(i),void e.success(i)}"ack"===A.rtcgw?e.success():void 0!==A.error&&null!==A.error?(ai.error("Ooops: "+A.error.code+" "+A.error.reason),e.error(A.error.code+" "+A.error.reason)):(ai.error("Unknown error"),e.error("Unknown error"))},void i.send(JSON.stringify(g));ai.httpAPICall(s+"/"+m+"/"+A,{verb:"POST",withCredentials:h,body:g,success:function(A){if(ai.debug("Message sent!"),ai.debug(A),"success"===A.rtcgw){var t=A.plugindata;if(null==t)return ai.warn("Request succeeded, but missing plugindata..."),void e.success();ai.log("Synchronous transaction successful ("+t.plugin+")");var i=t.data;return ai.debug(i),void e.success(i)}"ack"===A.rtcgw?e.success():void 0!==A.error&&null!==A.error?(ai.error("Ooops: "+A.error.code+" "+A.error.reason),e.error(A.error.code+" "+A.error.reason)):(ai.error("Unknown error"),e.error("Unknown error"))},error:function(A,t){ai.error(A+":",t),e.error(A+": "+t)}})}function k(A,e){if(p){var n=y[A];if(null!=n&&null!==n.webrtcStuff&&void 0!==n.webrtcStuff){var a={rtcgw:"trickle",candidate:e,transaction:ai.randomString(12)};if(null!==n.token&&void 0!==n.token&&(a.token=n.token),null!=E&&(a.apisecret=E),ai.vdebug("Sending trickle candidate (handle="+A+"):"),ai.vdebug(a),t)return a.session_id=m,a.handle_id=A,void i.send(JSON.stringify(a));ai.httpAPICall(s+"/"+m+"/"+A,{verb:"POST",withCredentials:h,body:a,success:function(A){ai.vdebug("Candidate sent!"),ai.vdebug(A),"ack"===A.rtcgw||ai.error("Ooops: "+A.error.code+" "+A.error.reason)},error:function(A,e){ai.error(A+":",e)}})}else ai.warn("Invalid handle")}else ai.warn("Is the server down? (connected=false)")}function P(A,e,t,i){var n=y[A];if(null!=n&&null!==n.webrtcStuff&&void 0!==n.webrtcStuff){var a=n.webrtcStuff,o=function(A){ai.log("Received state change on data channel:",A);var e=A.target.label,t=a.dataChannel[e]?a.dataChannel[e].readyState:"null";if(ai.log("State change on <"+e+"> data channel: "+t),"open"===t){if(a.dataChannel[e].pending&&a.dataChannel[e].pending.length>0){for(var i in ai.log("Sending pending messages on <"+e+">:",a.dataChannel[e].pending.length),a.dataChannel[e].pending){var o=a.dataChannel[e].pending[i];ai.log("Sending string on data channel <"+e+">: "+o),a.dataChannel[e].send(o)}a.dataChannel[e].pending=[]}n.ondataopen(e)}};a.dataChannel[e]=t||a.pc.createDataChannel(e,{ordered:!1}),a.dataChannel[e].onmessage=function(A){ai.log("Received message on data channel:",A);var e=A.target.label;n.ondata(A.data,e)},a.dataChannel[e].onopen=o,a.dataChannel[e].onclose=o,a.dataChannel[e].onerror=function(A){ai.error("Got error on data channel:",A)},a.dataChannel[e].pending=[],i&&a.dataChannel[e].pending.push(i)}else ai.warn("Invalid handle")}function N(A,e){(e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:ai.noop;var t=y[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return ai.warn("Invalid handle"),void e.error("Invalid handle");var i=t.webrtcStuff,n=e.text;if(null==n)return ai.warn("Invalid text"),void e.error("Invalid text");var a=e.label?e.label:ai.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(n),void e.success()):(ai.log("Sending string on data channel <"+a+">: "+n),i.dataChannel[a].send(n),void e.success()):(P(A,a,!1,n),void e.success())}function T(A,e){(e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:ai.noop;var t=y[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return ai.warn("Invalid handle"),void e.error("Invalid handle");var i=t.webrtcStuff;if(null===i.dtmfSender||void 0===i.dtmfSender){if(void 0!==i.pc&&null!==i.pc){var n=i.pc.getSenders().find((function(A){return A.track&&"audio"===A.track.kind}));if(!n)return ai.warn("Invalid DTMF configuration (no audio track)"),void e.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=n.dtmf,i.dtmfSender&&(ai.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(A){ai.debug("Sent DTMF tone: "+A.tone)})}if(null===i.dtmfSender||void 0===i.dtmfSender)return ai.warn("Invalid DTMF configuration"),void e.error("Invalid DTMF configuration")}var a=e.dtmf;if(null==a)return ai.warn("Invalid DTMF parameters"),void e.error("Invalid DTMF parameters");var o=a.tones;if(null==o)return ai.warn("Invalid DTMF string"),void e.error("Invalid DTMF string");var r=a.duration;null==r&&(r=500);var s=a.gap;null==s&&(s=50),ai.debug("Sending DTMF string "+o+" (duration "+r+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(o,r,s),e.success()}function M(A,e){(e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:ai.noop;var n=!0;void 0!==e.asyncRequest&&null!==e.asyncRequest&&(n=!0===e.asyncRequest);var a=!0;void 0!==e.noRequest&&null!==e.noRequest&&(a=!0===e.noRequest),ai.log("Destroying handle "+A+" (async="+n+")"),X(A);var o=y[A];if(null==o||o.detached)return delete y[A],void e.success();if(a)return delete y[A],void e.success();if(!p)return ai.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");var r={rtcgw:"detach",transaction:ai.randomString(12)};if(null!==o.token&&void 0!==o.token&&(r.token=o.token),null!=E&&(r.apisecret=E),t)return r.session_id=m,r.handle_id=A,i.send(JSON.stringify(r)),delete y[A],void e.success();ai.httpAPICall(s+"/"+m+"/"+A,{verb:"POST",async:n,withCredentials:h,body:r,success:function(t){ai.log("Destroyed handle:"),ai.debug(t),"success"!==t.rtcgw&&ai.error("Ooops: "+t.error.code+" "+t.error.reason),delete y[A],e.success()},error:function(t,i){ai.error(t+":",i),delete y[A],e.success()}})}function L(A,e,t,i,n){return Y.apply(this,arguments)}function Y(){return Y=function(A){return function(){var t=this,i=arguments;return new Promise((function(n,a){var o=A.apply(t,i);function r(A){e(o,n,a,r,s,"next",A)}function s(A){e(o,n,a,r,s,"throw",A)}r(void 0)}))}}(l().mark((function A(e,t,i,n,a){var o,r,s,h,B,u,E,f,Q,p,m,_,S,D,w,v,b,F,R,N,T,M,L,Y,G,U,V;return l().wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(null!=(o=y[e])&&null!==o.webrtcStuff&&void 0!==o.webrtcStuff){A.next=5;break}return ai.warn("Invalid handle"),n.error("Invalid handle"),A.abrupt("return");case 5:if(r=o.webrtcStuff,ai.debug("streamsDone:",a),a&&(ai.debug(" -- Audio tracks:",a.getAudioTracks()),ai.debug(" -- Video tracks:",a.getVideoTracks())),s=!1,r.myStream&&i.update&&!r.streamExternal){A.next=14;break}r.myStream=a,s=!0,A.next=66;break;case 14:if(!((!i.update&&q(i)||i.update&&(i.addAudio||i.replaceAudio))&&a.getAudioTracks()&&a.getAudioTracks().length)){A.next=45;break}if(r.myStream.addTrack(a.getAudioTracks()[0]),!ai.unifiedPlan){A.next=43;break}if(ai.log((i.replaceAudio?"Replacing":"Adding")+" audio track:",a.getAudioTracks()[0]),h=null,!((B=r.pc.getTransceivers())&&B.length>0)){A.next=30;break}A.t0=l().keys(B);case 22:if((A.t1=A.t0()).done){A.next=30;break}if(u=A.t1.value,!((E=B[u]).sender&&E.sender.track&&"audio"===E.sender.track.kind||E.receiver&&E.receiver.track&&"audio"===E.receiver.track.kind)){A.next=28;break}return h=E,A.abrupt("break",30);case 28:A.next=22;break;case 30:return f=null,A.prev=31,A.next=34,n.customizeStream(a);case 34:f=A.sent,A.next=40;break;case 37:A.prev=37,A.t2=A.catch(31),n.error(A.t2);case 40:h&&h.sender?h.sender.replaceTrack((null===(Q=f)||void 0===Q||null===(p=Q.getAudioTracks)||void 0===p||null===(m=p.call(Q))||void 0===m?void 0:m[0])||a.getAudioTracks()[0]):r.pc.addTrack((null===(_=f)||void 0===_||null===(S=_.getAudioTracks)||void 0===S||null===(D=S.call(_))||void 0===D?void 0:D[0])||a.getAudioTracks()[0],f||a),A.next=45;break;case 43:ai.log((i.replaceAudio?"Replacing":"Adding")+" audio track:",a.getAudioTracks()[0]),r.pc.addTrack(a.getAudioTracks()[0],a);case 45:if(!((!i.update&&$(i)||i.update&&(i.addVideo||i.replaceVideo))&&a.getVideoTracks()&&a.getVideoTracks().length)){A.next=66;break}if(r.myStream.addTrack(a.getVideoTracks()[0]),!ai.unifiedPlan){A.next=64;break}if(ai.log((i.replaceVideo?"Replacing":"Adding")+" video track:",a.getVideoTracks()[0]),w=null,!((B=r.pc.getTransceivers())&&B.length>0)){A.next=61;break}A.t3=l().keys(B);case 53:if((A.t4=A.t3()).done){A.next=61;break}if(u=A.t4.value,!((E=B[u]).sender&&E.sender.track&&"video"===E.sender.track.kind||E.receiver&&E.receiver.track&&"video"===E.receiver.track.kind)){A.next=59;break}return w=E,A.abrupt("break",61);case 59:A.next=53;break;case 61:w&&w.sender?w.sender.replaceTrack(a.getVideoTracks()[0]):r.pc.addTrack(a.getVideoTracks()[0],a),A.next=66;break;case 64:ai.log((i.replaceVideo?"Replacing":"Adding")+" video track:",a.getVideoTracks()[0]),r.pc.addTrack(a.getVideoTracks()[0],a);case 66:if(!r.pc){if(v={iceServers:g,iceTransportPolicy:c,bundlePolicy:I},"chrome"===ai.webRTCAdapter.browserDetails.browser&&(v.sdpSemantics=ai.webRTCAdapter.browserDetails.version<72?"plan-b":"unified-plan"),b={optional:[{DtlsSrtpKeyAgreement:!0}]},!0===C&&b.optional.push({googIPv6:!0}),n.rtcConstraints&&"object"===d(n.rtcConstraints))for(u in ai.debug("Adding custom PeerConnection constraints:",n.rtcConstraints),n.rtcConstraints)b.optional.push(n.rtcConstraints[u]);"edge"===ai.webRTCAdapter.browserDetails.browser&&(v.bundlePolicy="max-bundle"),ai.log("Creating PeerConnection"),ai.debug(b),r.pc=new RTCPeerConnection(v,b),ai.debug(r.pc),r.pc.getStats&&(r.volume={},r.bitrate.value="0 kbits/sec"),ai.log("Preparing local SDP and gathering candidates (trickle="+r.trickle+")"),r.pc.oniceconnectionstatechange=function(A){r.pc&&o.iceState(r.pc.iceConnectionState)},r.pc.onicecandidate=function(A){if(null==A.candidate||"edge"===ai.webRTCAdapter.browserDetails.browser&&A.candidate.candidate.indexOf("endOfCandidates")>0)ai.log("End of candidates."),r.iceDone=!0,!0===r.trickle?k(e,{completed:!0}):K(e,n);else{var t={candidate:A.candidate.candidate,sdpMid:A.candidate.sdpMid,sdpMLineIndex:A.candidate.sdpMLineIndex};!0===r.trickle&&k(e,t)}},r.pc.ontrack=function(A){ai.log("Handling Remote Track"),ai.debug(A),A.streams&&(r.remoteStream=A.streams[0],o.onremotestream(r.remoteStream),A.track.onended||(ai.log("Adding onended callback to track:",A.track),A.track.onended=function(A){ai.log("Remote track muted/removed:",A),r.remoteStream&&(r.remoteStream.removeTrack(A.target),o.onremotestream(r.remoteStream))},A.track.onmute=A.track.onended,A.track.onunmute=function(A){try{r.remoteStream.addTrack(A.target),o.onremotestream(r.remoteStream)}catch(A){ai.error(A)}}))}}if(!s||null==a){A.next=96;break}ai.log("Adding local stream"),F=!0===n.simulcast2,R=a.getTracks(),N=0;case 72:if(!(N<R.length)){A.next=96;break}if(T=R[N],F){A.next=92;break}if("audio"!==T.kind){A.next=89;break}return U=null,A.prev=77,A.next=80,n.customizeStream(a);case 80:U=A.sent,A.next=86;break;case 83:A.prev=83,A.t5=A.catch(77),n.error(A.t5);case 86:r.pc.addTrack((null===(M=U)||void 0===M||null===(L=(Y=M).getAudioTracks)||void 0===L||null===(G=L.call(Y))||void 0===G?void 0:G[0])||T,U||a),A.next=90;break;case 89:r.pc.addTrack(T,a);case 90:A.next=93;break;case 92:"audio"===T.kind?r.pc.addTrack(T,a):(ai.log("Enabling rid-based simulcasting:",T),V=x(n.simulcastMaxBitrates),r.pc.addTransceiver(T,{direction:"sendrecv",streams:[a],sendEncodings:[{rid:"h",active:!0,maxBitrate:V.high},{rid:"m",active:!0,maxBitrate:V.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:V.low,scaleResolutionDownBy:4}]}));case 93:N++,A.next=72;break;case 96:eA(i)&&!r.dataChannel[ai.dataChanDefaultLabel]&&(ai.log("Creating data channel"),P(e,ai.dataChanDefaultLabel,!1),r.pc.ondatachannel=function(A){ai.log("Data channel created by Janus:",A),P(e,A.channel.label,A.channel)}),r.myStream&&o.onlocalstream(r.myStream),null==t?J(e,i,n):r.pc.setRemoteDescription(t).then((function(){if(ai.log("Remote description accepted!"),r.remoteSdp=t.sdp,r.candidates&&r.candidates.length>0){for(var A=0;A<r.candidates.length;A++){var a=r.candidates[A];ai.debug("Adding remote candidate:",a),a&&!0!==a.completed?r.pc.addIceCandidate(a):r.pc.addIceCandidate(ai.endOfCandidates)}r.candidates=[]}H(e,i,n)}),n.error);case 99:case"end":return A.stop()}}),A,null,[[31,37],[77,83]])}))),Y.apply(this,arguments)}function G(A,e,t){(t=t||{}).success="function"==typeof t.success?t.success:ai.noop,t.error="function"==typeof t.error?t.error:Z,t.customizeStream="function"==typeof t.customizeStream?t.customizeStream:ai.noop;var i=t.jsep;if(e&&i)return ai.error("Provided a JSEP to a createOffer"),void t.error("Provided a JSEP to a createOffer");if(!(e||i&&i.type&&i.sdp))return ai.error("A valid JSEP is required for createAnswer"),void t.error("A valid JSEP is required for createAnswer");t.media=t.media||{audio:!0,video:!0};var n=t.media,a=y[A];if(null==a||null===a.webrtcStuff||void 0===a.webrtcStuff)return ai.warn("Invalid handle"),void t.error("Invalid handle");var o,r=a.webrtcStuff;if(r.trickle=(o=t.trickle,ai.debug("isTrickleEnabled:",o),null==o||!0===o),void 0===r.pc||null===r.pc)n.update=!1,n.keepAudio=!1,n.keepVideo=!1;else if(void 0!==r.pc&&null!==r.pc){if(ai.log("Updating existing media session"),n.update=!0,null!==t.stream&&void 0!==t.stream)t.stream!==r.myStream&&ai.log("Renegotiation involves a new external stream");else{if(n.addAudio){if(n.keepAudio=!1,n.replaceAudio=!1,n.removeAudio=!1,n.audioSend=!0,r.myStream&&r.myStream.getAudioTracks()&&r.myStream.getAudioTracks().length)return ai.error("Can't add audio stream, there already is one"),void t.error("Can't add audio stream, there already is one")}else n.removeAudio?(n.keepAudio=!1,n.replaceAudio=!1,n.addAudio=!1,n.audioSend=!1):n.replaceAudio&&(n.keepAudio=!1,n.addAudio=!1,n.removeAudio=!1,n.audioSend=!0);if(null===r.myStream||void 0===r.myStream?(n.replaceAudio&&(n.keepAudio=!1,n.replaceAudio=!1,n.addAudio=!0,n.audioSend=!0),q(n)&&(n.keepAudio=!1,n.addAudio=!0)):null===r.myStream.getAudioTracks()||void 0===r.myStream.getAudioTracks()||0===r.myStream.getAudioTracks().length?(n.replaceAudio&&(n.keepAudio=!1,n.replaceAudio=!1,n.addAudio=!0,n.audioSend=!0),q(n)&&(n.keepVideo=!1,n.addAudio=!0)):!q(n)||n.removeAudio||n.replaceAudio||(n.keepAudio=!0),n.addVideo){if(n.keepVideo=!1,n.replaceVideo=!1,n.removeVideo=!1,n.videoSend=!0,r.myStream&&r.myStream.getVideoTracks()&&r.myStream.getVideoTracks().length)return ai.error("Can't add video stream, there already is one"),void t.error("Can't add video stream, there already is one")}else n.removeVideo?(n.keepVideo=!1,n.replaceVideo=!1,n.addVideo=!1,n.videoSend=!1):n.replaceVideo&&(n.keepVideo=!1,n.addVideo=!1,n.removeVideo=!1,n.videoSend=!0);null===r.myStream||void 0===r.myStream||null===r.myStream.getVideoTracks()||void 0===r.myStream.getVideoTracks()||0===r.myStream.getVideoTracks().length?(n.replaceVideo&&(n.keepVideo=!1,n.replaceVideo=!1,n.addVideo=!0,n.videoSend=!0),$(n)&&(n.keepVideo=!1,n.addVideo=!0)):!$(n)||n.removeVideo||n.replaceVideo||(n.keepVideo=!0),n.addData&&(n.data=!0)}if(q(n)&&n.keepAudio&&$(n)&&n.keepVideo)return a.consentDialog(!1),void L(A,i,n,t,r.myStream)}if(n.update&&!r.streamExternal){if(n.removeAudio||n.replaceAudio){if(r.myStream&&r.myStream.getAudioTracks()&&r.myStream.getAudioTracks().length){var s=r.myStream.getAudioTracks()[0];ai.log("Removing audio track:",s),r.myStream.removeTrack(s);try{s.stop()}catch(A){}}if(r.pc.getSenders()&&r.pc.getSenders().length){var g=!0;if(n.replaceAudio&&ai.unifiedPlan&&(g=!1),g)for(var c in r.pc.getSenders()){(s=r.pc.getSenders()[c])&&s.track&&"audio"===s.track.kind&&(ai.log("Removing audio sender:",s),r.pc.removeTrack(s))}}}if(n.removeVideo||n.replaceVideo){if(r.myStream&&r.myStream.getVideoTracks()&&r.myStream.getVideoTracks().length){s=r.myStream.getVideoTracks()[0];ai.log("Removing video track:",s),r.myStream.removeTrack(s);try{s.stop()}catch(A){}}if(r.pc.getSenders()&&r.pc.getSenders().length){var l=!0;if(n.replaceVideo&&ai.unifiedPlan&&(l=!1),l)for(var c in r.pc.getSenders()){(s=r.pc.getSenders()[c])&&s.track&&"video"===s.track.kind&&(ai.log("Removing video sender:",s),r.pc.removeTrack(s))}}}}if(null!==t.stream&&void 0!==t.stream){var I=t.stream;if(ai.log("MediaStream provided by the application"),ai.debug(I),n.update&&r.myStream&&r.myStream!==t.stream&&!r.streamExternal){try{var C=r.myStream.getTracks();for(var h in C){var B=C[h];ai.log(B),null!=B&&B.stop()}}catch(A){}r.myStream=null}return r.streamExternal=!0,a.consentDialog(!1),void L(A,i,n,t,I)}if(q(n)||$(n)){if(!ai.isGetUserMediaAvailable())return void t.error("getUserMedia not available");var u={mandatory:{},optional:[]};a.consentDialog(!0);var E=q(n);!0===E&&null!=n&&null!=n&&"object"===d(n.audio)&&(E=n.audio);var f=$(n);if(!0===f&&null!=n&&null!=n){var Q=!0===t.simulcast,x=!0===t.simulcast2;if(!Q&&!x||i||void 0!==n.video&&!1!==n.video||(n.video="hires"),n.video&&"screen"!=n.video&&"window"!=n.video)if("object"===d(n.video))f=n.video;else{var p=0,m=0;"lowres"===n.video?(m=240,p=320):"lowres-16:9"===n.video?(m=180,p=320):"hires"===n.video||"hires-16:9"===n.video||"hdres"===n.video?(m=720,p=1280):"fhdres"===n.video?(m=1080,p=1920):"4kres"===n.video?(m=2160,p=3840):"stdres"===n.video?(m=480,p=640):"stdres-16:9"===n.video?(m=360,p=640):(ai.log("Default video setting is stdres 4:3"),m=480,p=640),ai.log("Adding media constraint:",n.video),f={height:{ideal:m},width:{ideal:p}},ai.log("Adding video constraint:",f)}else if("screen"===n.video||"window"===n.video){var _=function(e,o){a.consentDialog(!1),e?t.error(e):L(A,i,n,t,o)},S=function(A,e,t){ai.log("Adding media constraint (screen capture)"),ai.debug(A),navigator.mediaDevices.getUserMedia(A).then((function(A){t?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(t){A.addTrack(t.getAudioTracks()[0]),e(null,A)})):e(null,A)})).catch((function(A){a.consentDialog(!1),e(A)}))};if(n.screenshareFrameRate||(n.screenshareFrameRate=3),navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return void navigator.mediaDevices.getDisplayMedia({video:!0}).then((function(e){a.consentDialog(!1),q(n)&&!n.keepAudio?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(a){e.addTrack(a.getAudioTracks()[0]),L(A,i,n,t,e)})):L(A,i,n,t,e)}),(function(A){a.consentDialog(!1),t.error(A)}));if("chrome"===ai.webRTCAdapter.browserDetails.browser){var D=ai.webRTCAdapter.browserDetails.version,w=33;window.navigator.userAgent.match("Linux")&&(w=35),D>=26&&D<=w?(u={video:{mandatory:{googLeakyBucket:!0,maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:n.screenshareFrameRate,maxFrameRate:n.screenshareFrameRate,chromeMediaSource:"screen"}},audio:q(n)&&!n.keepAudio},S(u,_)):ai.extension.getScreen((function(A,e){if(A)return a.consentDialog(!1),t.error(A);(u={audio:!1,video:{mandatory:{chromeMediaSource:"desktop",maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:n.screenshareFrameRate,maxFrameRate:n.screenshareFrameRate},optional:[{googLeakyBucket:!0},{googTemporalLayeredScreencast:!0}]}}).video.mandatory.chromeMediaSourceId=e,S(u,_,q(n)&&!n.keepAudio)}))}else if("firefox"===ai.webRTCAdapter.browserDetails.browser){if(!(ai.webRTCAdapter.browserDetails.version>=33)){var v=new Error("NavigatorUserMediaError");return v.name="Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)",a.consentDialog(!1),void t.error(v)}u={video:{mozMediaSource:n.video,mediaSource:n.video},audio:q(n)&&!n.keepAudio},S(u,(function(A,e){if(_(A,e),!A)var t=e.currentTime,i=window.setInterval((function(){e||window.clearInterval(i),e.currentTime==t&&(window.clearInterval(i),e.onended&&e.onended()),t=e.currentTime}),500)}))}return}}null!=n&&"screen"===n.video||navigator.mediaDevices.enumerateDevices().then((function(e){var o=e.some((function(A){return"audioinput"===A.kind})),r=function(A){if(ai.debug("isScreenSendEnabled:",A),null==A)return!1;if("object"!==d(A.video)||"object"!==d(A.video.mandatory))return!1;var e=A.video.mandatory;if(e.chromeMediaSource)return"desktop"===e.chromeMediaSource||"screen"===e.chromeMediaSource;if(e.mozMediaSource)return"window"===e.mozMediaSource||"screen"===e.mozMediaSource;if(e.mediaSource)return"window"===e.mediaSource||"screen"===e.mediaSource;return!1}(n)||e.some((function(A){return"videoinput"===A.kind})),s=q(n),g=$(n),c=function(A){return ai.debug("isAudioSendRequired:",A),null!=A&&(!1!==A.audio&&!1!==A.audioSend&&(void 0!==A.failIfNoAudio&&null!==A.failIfNoAudio&&!0===A.failIfNoAudio))}(n),l=function(A){return ai.debug("isVideoSendRequired:",A),null!=A&&(!1!==A.video&&!1!==A.videoSend&&(void 0!==A.failIfNoVideo&&null!==A.failIfNoVideo&&!0===A.failIfNoVideo))}(n);if(s||g||c||l){var C=!!s&&o,h=!!g&&r;if(!C&&!h)return a.consentDialog(!1),t.error("No capture device found"),!1;if(!C&&c)return a.consentDialog(!1),t.error("Audio capture is required, but no capture device found"),!1;if(!h&&l)return a.consentDialog(!1),t.error("Video capture is required, but no capture device found"),!1}var B={audio:!(!o||n.keepAudio)&&E,video:!(!r||n.keepVideo)&&f};ai.debug("getUserMedia constraints",B),B.audio||B.video?navigator.mediaDevices.getUserMedia(B).then((function(e){a.consentDialog(!1),L(A,i,n,t,e)})).catch((function(A){a.consentDialog(!1),t.error({code:A.code,name:A.name,message:A.message})})):(a.consentDialog(!1),L(A,i,n,t,I))})).catch((function(A){a.consentDialog(!1),t.error("enumerateDevices error",A)}))}else L(A,i,n,t)}function U(A,e){(e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:Z;var t=e.jsep,i=y[A];if(null==i||null===i.webrtcStuff||void 0===i.webrtcStuff)return ai.warn("Invalid handle"),void e.error("Invalid handle");var n=i.webrtcStuff;if(null!=t){if(null===n.pc)return ai.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void e.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.pc.setRemoteDescription(t).then((function(){if(ai.log("Remote description accepted!"),n.remoteSdp=t.sdp,n.candidates&&n.candidates.length>0){for(var A=0;A<n.candidates.length;A++){var i=n.candidates[A];ai.debug("Adding remote candidate:",i),i&&!0!==i.completed?n.pc.addIceCandidate(i):n.pc.addIceCandidate(ai.endOfCandidates)}n.candidates=[]}e.success()}),e.error)}else e.error("Invalid JSEP")}function J(A,e,t){(t=t||{}).success="function"==typeof t.success?t.success:ai.noop,t.error="function"==typeof t.error?t.error:ai.noop,t.customizeSdp="function"==typeof t.customizeSdp?t.customizeSdp:ai.noop;var i=y[A];if(null==i||null===i.webrtcStuff||void 0===i.webrtcStuff)return ai.warn("Invalid handle"),void t.error("Invalid handle");var n=i.webrtcStuff,a=!0===t.simulcast;a?ai.log("Creating offer (iceDone="+n.iceDone+", simulcast="+a+")"):ai.log("Creating offer (iceDone="+n.iceDone+")");var o={};if(ai.unifiedPlan){var r=null,s=null,g=n.pc.getTransceivers();if(g&&g.length>0)for(var c in g){var l=g[c];l.sender&&l.sender.track&&"audio"===l.sender.track.kind||l.receiver&&l.receiver.track&&"audio"===l.receiver.track.kind?r||(r=l):(l.sender&&l.sender.track&&"video"===l.sender.track.kind||l.receiver&&l.receiver.track&&"video"===l.receiver.track.kind)&&(s||(s=l))}var I=q(e),C=z(e);I||C?I&&C?r&&(r.setDirection?r.setDirection("sendrecv"):r.direction="sendrecv",ai.log("Setting audio transceiver to sendrecv:",r)):I&&!C?r&&(r.setDirection?r.setDirection("sendonly"):r.direction="sendonly",ai.log("Setting audio transceiver to sendonly:",r)):!I&&C&&(r?(r.setDirection?r.setDirection("recvonly"):r.direction="recvonly",ai.log("Setting audio transceiver to recvonly:",r)):(r=n.pc.addTransceiver("audio",{direction:"recvonly"}),ai.log("Adding recvonly audio transceiver:",r))):e.removeAudio&&r&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive",ai.log("Setting audio transceiver to inactive:",r));var d=$(e),h=AA(e);d||h?d&&h?s&&(s.setDirection?s.setDirection("sendrecv"):s.direction="sendrecv",ai.log("Setting video transceiver to sendrecv:",s)):d&&!h?s&&(s.setDirection?s.setDirection("sendonly"):s.direction="sendonly",ai.log("Setting video transceiver to sendonly:",s)):!d&&h&&(s?(s.setDirection?s.setDirection("recvonly"):s.direction="recvonly",ai.log("Setting video transceiver to recvonly:",s)):(s=n.pc.addTransceiver("video",{direction:"recvonly"}),ai.log("Adding recvonly video transceiver:",s))):e.removeVideo&&s&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive",ai.log("Setting video transceiver to inactive:",s))}else o.offerToReceiveAudio=z(e),o.offerToReceiveVideo=AA(e);!0===t.iceRestart&&(o.iceRestart=!0),ai.debug(o);var B=$(e);if(B&&a&&"firefox"===ai.webRTCAdapter.browserDetails.browser){ai.log("Enabling Simulcasting for Firefox (RID)");var u=n.pc.getSenders().find((function(A){return"video"==A.track.kind}));if(u){var E=u.getParameters();E||(E={});var f=x(t.simulcastMaxBitrates);E.encodings=[{rid:"h",active:!0,maxBitrate:f.high},{rid:"m",active:!0,maxBitrate:f.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:f.low,scaleResolutionDownBy:4}],u.setParameters(E)}}n.pc.createOffer(o).then((function(A){ai.debug(A);var e={type:A.type,sdp:A.sdp};t.customizeSdp(e),A.sdp=e.sdp,ai.log("Setting local description"),B&&a&&("chrome"===ai.webRTCAdapter.browserDetails.browser||"safari"===ai.webRTCAdapter.browserDetails.browser?(ai.log("Enabling Simulcasting for Chrome (SDP munging)"),A.sdp=function(A){for(var e=A.split("\r\n"),t=!1,i=[-1],n=[-1],a=null,o=null,r=null,s=null,g=-1,c=0;c<e.length;c++){if(I=e[c].match(/m=(\w+) */)){if("video"===I[1]){if(!(i[0]<0)){g=c;break}t=!0}else if(i[0]>-1){g=c;break}}else if(t){var l=e[c].match(/a=ssrc-group:FID (\d+) (\d+)/);if(l)i[0]=l[1],n[0]=l[2],e.splice(c,1),c--;else{if(i[0]){if((d=e[c].match("a=ssrc:"+i[0]+" cname:(.+)"))&&(a=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" msid:(.+)"))&&(o=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" mslabel:(.+)"))&&(r=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" label:(.+)"))&&(s=d[1]),0===e[c].indexOf("a=ssrc:"+n[0])){e.splice(c,1),c--;continue}if(0===e[c].indexOf("a=ssrc:"+i[0])){e.splice(c,1),c--;continue}}0!=e[c].length||(e.splice(c,1),c--)}}}if(i[0]<0){g=-1,t=!1;for(c=0;c<e.length;c++){var I;if(I=e[c].match(/m=(\w+) */)){if("video"===I[1]){if(!(i[0]<0)){g=c;break}t=!0}else if(i[0]>-1){g=c;break}}else if(t){if(i[0]<0){var C=e[c].match(/a=ssrc:(\d+)/);if(C){i[0]=C[1],e.splice(c,1),c--;continue}}else{var d;if((d=e[c].match("a=ssrc:"+i[0]+" cname:(.+)"))&&(a=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" msid:(.+)"))&&(o=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" mslabel:(.+)"))&&(r=d[1]),(d=e[c].match("a=ssrc:"+i[0]+" label:(.+)"))&&(s=d[1]),0===e[c].indexOf("a=ssrc:"+n[0])){e.splice(c,1),c--;continue}if(0===e[c].indexOf("a=ssrc:"+i[0])){e.splice(c,1),c--;continue}}0!=e[c].length||(e.splice(c,1),c--)}}}if(i[0]<0)return ai.warn("Couldn't find the video SSRC, simulcasting NOT enabled"),A;g<0&&(g=e.length);i[1]=Math.floor(4294967295*Math.random()),i[2]=Math.floor(4294967295*Math.random()),n[1]=Math.floor(4294967295*Math.random()),n[2]=Math.floor(4294967295*Math.random());for(c=0;c<i.length;c++)a&&(e.splice(g,0,"a=ssrc:"+i[c]+" cname:"+a),g++),o&&(e.splice(g,0,"a=ssrc:"+i[c]+" msid:"+o),g++),r&&(e.splice(g,0,"a=ssrc:"+i[c]+" mslabel:"+r),g++),s&&(e.splice(g,0,"a=ssrc:"+i[c]+" label:"+s),g++),a&&(e.splice(g,0,"a=ssrc:"+n[c]+" cname:"+a),g++),o&&(e.splice(g,0,"a=ssrc:"+n[c]+" msid:"+o),g++),r&&(e.splice(g,0,"a=ssrc:"+n[c]+" mslabel:"+r),g++),s&&(e.splice(g,0,"a=ssrc:"+n[c]+" label:"+s),g++);e.splice(g,0,"a=ssrc-group:FID "+i[2]+" "+n[2]),e.splice(g,0,"a=ssrc-group:FID "+i[1]+" "+n[1]),e.splice(g,0,"a=ssrc-group:FID "+i[0]+" "+n[0]),e.splice(g,0,"a=ssrc-group:SIM "+i[0]+" "+i[1]+" "+i[2]),(A=e.join("\r\n")).endsWith("\r\n")||(A+="\r\n");return A}(A.sdp)):"firefox"!==ai.webRTCAdapter.browserDetails.browser&&ai.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),n.mySdp=A.sdp,n.pc.setLocalDescription(A).catch(t.error),n.mediaConstraints=o,n.iceDone||n.trickle?(ai.log("Offer ready"),ai.debug(t),t.success(A)):ai.log("Waiting for all candidates...")}),t.error)}function H(A,e,t){(t=t||{}).success="function"==typeof t.success?t.success:ai.noop,t.error="function"==typeof t.error?t.error:ai.noop,t.customizeSdp="function"==typeof t.customizeSdp?t.customizeSdp:ai.noop;var i=y[A];if(null==i||null===i.webrtcStuff||void 0===i.webrtcStuff)return ai.warn("Invalid handle"),void t.error("Invalid handle");var n=i.webrtcStuff,a=!0===t.simulcast;a?ai.log("Creating answer (iceDone="+n.iceDone+", simulcast="+a+")"):ai.log("Creating answer (iceDone="+n.iceDone+")");var o=null;if(ai.unifiedPlan){o={};var r=null,s=null,g=n.pc.getTransceivers();if(g&&g.length>0)for(var c in g){var l=g[c];l.sender&&l.sender.track&&"audio"===l.sender.track.kind||l.receiver&&l.receiver.track&&"audio"===l.receiver.track.kind?r||(r=l):(l.sender&&l.sender.track&&"video"===l.sender.track.kind||l.receiver&&l.receiver.track&&"video"===l.receiver.track.kind)&&(s||(s=l))}var I=q(e),C=z(e);if(I||C){if(I&&C){if(r)try{r.setDirection?r.setDirection("sendrecv"):r.direction="sendrecv",ai.log("Setting audio transceiver to sendrecv:",r)}catch(A){ai.error(A)}}else if(I&&!C)try{r&&(r.setDirection?r.setDirection("sendonly"):r.direction="sendonly",ai.log("Setting audio transceiver to sendonly:",r))}catch(A){ai.error(A)}else if(!I&&C)if(r)try{r.setDirection?r.setDirection("recvonly"):r.direction="recvonly",ai.log("Setting audio transceiver to recvonly:",r)}catch(A){ai.error(A)}else r=n.pc.addTransceiver("audio",{direction:"recvonly"}),ai.log("Adding recvonly audio transceiver:",r)}else if(e.removeAudio&&r)try{r.setDirection?r.setDirection("inactive"):r.direction="inactive",ai.log("Setting audio transceiver to inactive:",r)}catch(A){ai.error(A)}var d=$(e),h=AA(e);if(d||h){if(d&&h){if(s)try{s.setDirection?s.setDirection("sendrecv"):s.direction="sendrecv",ai.log("Setting video transceiver to sendrecv:",s)}catch(A){ai.error(A)}}else if(d&&!h){if(s)try{s.setDirection?s.setDirection("sendonly"):s.direction="sendonly",ai.log("Setting video transceiver to sendonly:",s)}catch(A){ai.error(A)}}else if(!d&&h)if(s)try{s.setDirection?s.setDirection("recvonly"):s.direction="recvonly",ai.log("Setting video transceiver to recvonly:",s)}catch(A){ai.error(A)}else s=n.pc.addTransceiver("video",{direction:"recvonly"}),ai.log("Adding recvonly video transceiver:",s)}else if(e.removeVideo&&s)try{s.setDirection?s.setDirection("inactive"):s.direction="inactive",ai.log("Setting video transceiver to inactive:",s)}catch(A){ai.error(A)}}else o="firefox"==ai.webRTCAdapter.browserDetails.browser||"edge"==ai.webRTCAdapter.browserDetails.browser?{offerToReceiveAudio:z(e),offerToReceiveVideo:AA(e)}:{mandatory:{OfferToReceiveAudio:z(e),OfferToReceiveVideo:AA(e)}};ai.debug(o);var B=$(e);if(B&&a&&"firefox"===ai.webRTCAdapter.browserDetails.browser){ai.log("Enabling Simulcasting for Firefox (RID)");var u=n.pc.getSenders()[1];ai.log(u);var E=u.getParameters();ai.log(E);var f=x(t.simulcastMaxBitrates);u.setParameters({encodings:[{rid:"high",active:!0,priority:"high",maxBitrate:f.high},{rid:"medium",active:!0,priority:"medium",maxBitrate:f.medium},{rid:"low",active:!0,priority:"low",maxBitrate:f.low}]})}n.pc.createAnswer(o).then((function(A){ai.debug(A);var e={type:A.type,sdp:A.sdp};t.customizeSdp(e),A.sdp=e.sdp,ai.log("Setting local description"),B&&a&&("chrome"===ai.webRTCAdapter.browserDetails.browser?ai.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it"):"firefox"!==ai.webRTCAdapter.browserDetails.browser&&ai.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),n.mySdp=A.sdp,n.pc.setLocalDescription(A).catch(t.error),n.mediaConstraints=o,n.iceDone||n.trickle?t.success(A):ai.log("Waiting for all candidates...")}),t.error)}function K(A,e){(e=e||{}).success="function"==typeof e.success?e.success:ai.noop,e.error="function"==typeof e.error?e.error:ai.noop;var t=y[A];if(null!=t&&null!==t.webrtcStuff&&void 0!==t.webrtcStuff){var i=t.webrtcStuff;ai.log("Sending offer/answer SDP..."),null!==i.mySdp&&void 0!==i.mySdp?(i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1),ai.debug(e),i.sdpSent=!0,e.success(i.mySdp)):ai.warn("Local SDP instance is invalid, not sending anything...")}else ai.warn("Invalid handle, not sending anything")}function V(A,e){var t=y[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return ai.warn("Invalid handle"),0;var i=e?"remote":"local",n=t.webrtcStuff;return n.volume[i]||(n.volume[i]={value:0}),n.pc.getStats&&"chrome"===ai.webRTCAdapter.browserDetails.browser?!e||null!==n.remoteStream&&void 0!==n.remoteStream?e||null!==n.myStream&&void 0!==n.myStream?null===n.volume[i].timer||void 0===n.volume[i].timer?(ai.log("Starting "+i+" volume monitor"),n.volume[i].timer=setInterval((function(){n.pc.getStats((function(A){for(var t=A.result(),a=0;a<t.length;a++){var o=t[a];"ssrc"==o.type&&(e&&o.stat("audioOutputLevel")?n.volume[i].value=parseInt(o.stat("audioOutputLevel")):!e&&o.stat("audioInputLevel")&&(n.volume[i].value=parseInt(o.stat("audioInputLevel"))))}}))}),200),0):n.volume[i].value:(ai.warn("Local stream unavailable"),0):(ai.warn("Remote stream unavailable"),0):(ai.warn("Getting the "+i+" volume unsupported by browser"),0)}function O(A,e){var t=y[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return ai.warn("Invalid handle"),!0;var i=t.webrtcStuff;return null===i.pc||void 0===i.pc?(ai.warn("Invalid PeerConnection"),!0):void 0===i.myStream||null===i.myStream?(ai.warn("Invalid local MediaStream"),!0):e?null===i.myStream.getVideoTracks()||void 0===i.myStream.getVideoTracks()||0===i.myStream.getVideoTracks().length?(ai.warn("No video track"),!0):!i.myStream.getVideoTracks()[0].enabled:null===i.myStream.getAudioTracks()||void 0===i.myStream.getAudioTracks()||0===i.myStream.getAudioTracks().length?(ai.warn("No audio track"),!0):!i.myStream.getAudioTracks()[0].enabled}function j(A,e,t){var i=y[A];if(null==i||null===i.webrtcStuff||void 0===i.webrtcStuff)return ai.warn("Invalid handle"),!1;var n=i.webrtcStuff;return null===n.pc||void 0===n.pc?(ai.warn("Invalid PeerConnection"),!1):void 0===n.myStream||null===n.myStream?(ai.warn("Invalid local MediaStream"),!1):e?null===n.myStream.getVideoTracks()||void 0===n.myStream.getVideoTracks()||0===n.myStream.getVideoTracks().length?(ai.warn("No video track"),!1):(n.myStream.getVideoTracks()[0].enabled=!t,!0):null===n.myStream.getAudioTracks()||void 0===n.myStream.getAudioTracks()||0===n.myStream.getAudioTracks().length?(ai.warn("No audio track"),!1):(n.myStream.getAudioTracks()[0].enabled=!t,!0)}function W(A){var e=y[A];if(null==e||null===e.webrtcStuff||void 0===e.webrtcStuff)return ai.warn("Invalid handle"),"Invalid handle";var t=e.webrtcStuff;return null===t.pc||void 0===t.pc?"Invalid PeerConnection":t.pc.getStats?null===t.bitrate.timer||void 0===t.bitrate.timer?(ai.log("Starting bitrate timer (via getStats)"),t.bitrate.timer=setInterval((function(){t.pc.getStats().then((function(A){A.forEach((function(A){if(A){var e=!1;if(("video"===A.mediaType||A.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===A.type&&A.id.indexOf("rtcp")<0?e=!0:"ssrc"!=A.type||!A.bytesReceived||"VP8"!==A.googCodecName&&""!==A.googCodecName||(e=!0),e)if(t.bitrate.bsnow=A.bytesReceived,t.bitrate.tsnow=A.timestamp,null===t.bitrate.bsbefore||null===t.bitrate.tsbefore)t.bitrate.bsbefore=t.bitrate.bsnow,t.bitrate.tsbefore=t.bitrate.tsnow;else{var i=t.bitrate.tsnow-t.bitrate.tsbefore;"safari"==ai.webRTCAdapter.browserDetails.browser&&(i/=1e3);var n=Math.round(8*(t.bitrate.bsnow-t.bitrate.bsbefore)/i);"safari"===ai.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),t.bitrate.value=n+" kbits/sec",t.bitrate.bsbefore=t.bitrate.bsnow,t.bitrate.tsbefore=t.bitrate.tsnow}}}))}))}),1e3),"0 kbits/sec"):t.bitrate.value:(ai.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser")}function Z(A){ai.error("WebRTC error:",A)}function X(A,e){ai.log("Cleaning WebRTC stuff");var n=y[A];if(null!=n){var a=n.webrtcStuff;if(null!=a){if(!0===e){var o={rtcgw:"hangup",transaction:ai.randomString(12)};null!==n.token&&void 0!==n.token&&(o.token=n.token),null!=E&&(o.apisecret=E),ai.debug("Sending hangup request (handle="+A+"):"),ai.debug(o),t?(o.session_id=m,o.handle_id=A,i.send(JSON.stringify(o))):ai.httpAPICall(s+"/"+m+"/"+A,{verb:"POST",withCredentials:h,body:o})}a.remoteStream=null,a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer)),a.volume={},a.bitrate.timer&&clearInterval(a.bitrate.timer),a.bitrate.timer=null,a.bitrate.bsnow=null,a.bitrate.bsbefore=null,a.bitrate.tsnow=null,a.bitrate.tsbefore=null,a.bitrate.value=null;try{if(!a.streamExternal&&null!==a.myStream&&void 0!==a.myStream){ai.log("Stopping local stream tracks");var r=a.myStream.getTracks();for(var g in r){var c=r[g];ai.log(c),null!=c&&c.stop()}}}catch(A){}a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(A){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null}n.oncleanup()}}function q(A){return ai.debug("isAudioSendEnabled:",A),null==A||!1!==A.audio&&(void 0===A.audioSend||null===A.audioSend||!0===A.audioSend)}function z(A){return ai.debug("isAudioRecvEnabled:",A),null==A||!1!==A.audio&&(void 0===A.audioRecv||null===A.audioRecv||!0===A.audioRecv)}function $(A){return ai.debug("isVideoSendEnabled:",A),null==A||!1!==A.video&&(void 0===A.videoSend||null===A.videoSend||!0===A.videoSend)}function AA(A){return ai.debug("isVideoRecvEnabled:",A),null==A||!1!==A.video&&(void 0===A.videoRecv||null===A.videoRecv||!0===A.videoRecv)}function eA(A){return ai.debug("isDataEnabled:",A),"edge"==ai.webRTCAdapter.browserDetails.browser?(ai.warn("Edge doesn't support data channels yet"),!1):null!=A&&!0===A.data}F(A),this.getServer=function(){return s},this.isConnected=function(){return p},this.reconnect=function(A){(A=A||{}).success="function"==typeof A.success?A.success:ai.noop,A.error="function"==typeof A.error?A.error:ai.noop,A.reconnect=!0,F(A)},this.getSessionId=function(){return m},this.destroy=function(e){!function(e){e=e||{},e.success="function"==typeof e.success?e.success:ai.noop;var o=!0;void 0!==e.asyncRequest&&null!==e.asyncRequest&&(o=!0===e.asyncRequest);var r=!0;void 0!==e.notifyDestroyed&&null!==e.notifyDestroyed&&(r=!0===e.notifyDestroyed);var g=!1;void 0!==e.cleanupHandles&&null!==e.cleanupHandles&&(g=!0===e.cleanupHandles);if(ai.log("Destroying session "+m+" (async="+o+")"),!p)return ai.warn("Is the server down? (connected=false)"),void e.success();if(null==m)return ai.warn("No session to destroy"),e.success(),void(r&&A.destroyed());if(g)for(var c in y)M(c,{noRequest:!0});var l={rtcgw:"destroy",transaction:ai.randomString(12)};null!=u&&(l.token=u);null!=E&&(l.apisecret=E);if(t){l.session_id=m;var I=function(){for(var A in n)i.removeEventListener(A,n[A]);i.removeEventListener("message",C),i.removeEventListener("error",d),a&&clearTimeout(a),i.close()},C=function(t){var i=JSON.parse(t.data);i.session_id==l.session_id&&i.transaction==l.transaction&&(I(),e.success(),r&&A.destroyed())},d=function(t){I(),e.error("Failed to destroy the server: Is the server down?"),r&&A.destroyed()};return i.addEventListener("message",C),i.addEventListener("error",d),void i.send(JSON.stringify(l))}ai.httpAPICall(s+"/"+m,{verb:"POST",async:o,withCredentials:h,body:l,success:function(t){ai.log("Destroyed session:"),ai.debug(t),m=null,p=!1,"success"!==t.rtcgw&&ai.error("Ooops: "+t.error.code+" "+t.error.reason),e.success(),r&&A.destroyed()},error:function(t,i){ai.error(t+":",i),m=null,p=!1,e.success(),r&&A.destroyed()}})}(e)},this.attach=function(A){!function(A){if(A=A||{},A.success="function"==typeof A.success?A.success:ai.noop,A.error="function"==typeof A.error?A.error:ai.noop,A.consentDialog="function"==typeof A.consentDialog?A.consentDialog:ai.noop,A.iceState="function"==typeof A.iceState?A.iceState:ai.noop,A.mediaState="function"==typeof A.mediaState?A.mediaState:ai.noop,A.webrtcState="function"==typeof A.webrtcState?A.webrtcState:ai.noop,A.slowLink="function"==typeof A.slowLink?A.slowLink:ai.noop,A.onmessage="function"==typeof A.onmessage?A.onmessage:ai.noop,A.onlocalstream="function"==typeof A.onlocalstream?A.onlocalstream:ai.noop,A.onremotestream="function"==typeof A.onremotestream?A.onremotestream:ai.noop,A.ondata="function"==typeof A.ondata?A.ondata:ai.noop,A.ondataopen="function"==typeof A.ondataopen?A.ondataopen:ai.noop,A.oncleanup="function"==typeof A.oncleanup?A.oncleanup:ai.noop,A.ondetached="function"==typeof A.ondetached?A.ondetached:ai.noop,!p)return ai.warn("Is the server down? (connected=false)"),void A.error("Is the server down? (connected=false)");var e=A.plugin;if(null==e)return ai.error("Invalid plugin"),void A.error("Invalid plugin");var n=A.opaqueId,a=A.token?A.token:u,o=ai.randomString(12),r={rtcgw:"attach",plugin:e,opaque_id:n,transaction:o};null!=a&&(r.token=a);null!=E&&(r.apisecret=E);if(t)return D[o]=function(t){if(ai.debug(t),"success"!==t.rtcgw)return ai.error("Ooops: "+t.error.code+" "+t.error.reason),void A.error("Ooops: "+t.error.code+" "+t.error.reason);var i=t.data.id;ai.log("Created handle: "+i);var n={session:_,plugin:e,id:i,token:a,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function(){return i},getPlugin:function(){return e},getVolume:function(){return V(i,!0)},getRemoteVolume:function(){return V(i,!0)},getLocalVolume:function(){return V(i,!1)},isAudioMuted:function(){return O(i,!1)},muteAudio:function(){return j(i,!1,!0)},unmuteAudio:function(){return j(i,!1,!1)},isVideoMuted:function(){return O(i,!0)},muteVideo:function(){return j(i,!0,!0)},unmuteVideo:function(){return j(i,!0,!1)},getBitrate:function(){return W(i)},send:function(A){R(i,A)},data:function(A){N(i,A)},dtmf:function(A){T(i,A)},consentDialog:A.consentDialog,iceState:A.iceState,mediaState:A.mediaState,webrtcState:A.webrtcState,slowLink:A.slowLink,onmessage:A.onmessage,createOffer:function(A){G(i,!0,A)},createAnswer:function(A){G(i,!1,A)},handleRemoteJsep:function(A){U(i,A)},onlocalstream:A.onlocalstream,onremotestream:A.onremotestream,ondata:A.ondata,ondataopen:A.ondataopen,oncleanup:A.oncleanup,ondetached:A.ondetached,hangup:function(A){X(i,!0===A)},detach:function(A){M(i,A)}};y[i]=n,A.success(n)},r.session_id=m,void i.send(JSON.stringify(r));ai.httpAPICall(s+"/"+m,{verb:"POST",withCredentials:h,body:r,success:function(t){if(ai.debug(t),"success"!==t.rtcgw)return ai.error("Ooops: "+t.error.code+" "+t.error.reason),void A.error("Ooops: "+t.error.code+" "+t.error.reason);var i=t.data.id;ai.log("Created handle: "+i);var n={session:_,plugin:e,id:i,token:a,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function(){return i},getPlugin:function(){return e},getVolume:function(){return V(i,!0)},getRemoteVolume:function(){return V(i,!0)},getLocalVolume:function(){return V(i,!1)},isAudioMuted:function(){return O(i,!1)},muteAudio:function(){return j(i,!1,!0)},unmuteAudio:function(){return j(i,!1,!1)},isVideoMuted:function(){return O(i,!0)},muteVideo:function(){return j(i,!0,!0)},unmuteVideo:function(){return j(i,!0,!1)},getBitrate:function(){return W(i)},send:function(A){R(i,A)},data:function(A){N(i,A)},dtmf:function(A){T(i,A)},consentDialog:A.consentDialog,iceState:A.iceState,mediaState:A.mediaState,webrtcState:A.webrtcState,slowLink:A.slowLink,onmessage:A.onmessage,createOffer:function(A){G(i,!0,A)},createAnswer:function(A){G(i,!1,A)},handleRemoteJsep:function(A){U(i,A)},onlocalstream:A.onlocalstream,onremotestream:A.onremotestream,ondata:A.ondata,ondataopen:A.ondataopen,oncleanup:A.oncleanup,ondetached:A.ondetached,hangup:function(A){X(i,!0===A)},detach:function(A){M(i,A)}};y[i]=n,A.success(n)},error:function(A,e){ai.error(A+":",e)}})}(A)}}ai.useDefaultDependencies=function(A){var e=A&&A.fetch||fetch,t=A&&A.Promise||Promise,i=A&&A.WebSocket||WebSocket;return{newWebSocket:function(A,e){return new i(A,e)},extension:A&&A.extension||ni,isArray:function(A){return Array.isArray(A)},webRTCAdapter:A&&A.adapter||window.adapter,httpAPICall:function(A,i){var n={method:i.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===i.verb&&(n.headers["Content-Type"]="application/json"),void 0!==i.withCredentials&&(n.credentials=!0===i.withCredentials?"include":i.withCredentials?i.withCredentials:"omit"),void 0!==i.body&&(n.body=JSON.stringify(i.body));var a=e(A,n).catch((function(A){return t.reject({message:"Probably a network error, is the server down?",error:A})}));if(void 0!==i.timeout){var o=new t((function(A,e){var t=setTimeout((function(){return clearTimeout(t),e({message:"Request timed out",timeout:i.timeout})}),i.timeout)}));a=t.race([a,o])}return a.then((function(A){return A.ok?d(i.success)===d(ai.noop)?A.json().then((function(A){i.success(A)})).catch((function(e){return t.reject({message:"Failed to parse response body",error:e,response:A})})):void 0:t.reject({message:"API call failed",response:A})})).catch((function(A){d(i.error)===d(ai.noop)&&i.error(A.message||"<< internal error >>",A)})),a}}},ai.useOldDependencies=function(A){var e=A&&A.jQuery||jQuery,t=A&&A.WebSocket||WebSocket;return{newWebSocket:function(A,e){return new t(A,e)},isArray:function(A){return e.isArray(A)},extension:A&&A.extension||ni,webRTCAdapter:A&&A.adapter||adapter,httpAPICall:function(A,t){var i=void 0!==t.body?{contentType:"application/json",data:JSON.stringify(t.body)}:{},n=void 0!==t.withCredentials?{xhrFields:{withCredentials:t.withCredentials}}:{};return e.ajax(e.extend(i,n,{url:A,type:t.verb,cache:!1,dataType:"json",async:t.async,timeout:t.timeout,success:function(A){d(t.success)===d(ai.noop)&&t.success(A)},error:function(A,e,i){d(t.error)===d(ai.noop)&&t.error(e,i)}}))}}},ai.noop=function(){},ai.dataChanDefaultLabel="JanusDataChannel",ai.endOfCandidates=null,ai.init=function(A){if((A=A||{}).callback="function"==typeof A.callback?A.callback:ai.noop,!0===ai.initDone)A.callback();else{if("undefined"!=typeof console&&void 0!==console.log||(console={log:function(){}}),ai.trace=ai.noop,ai.debug=ai.noop,ai.vdebug=ai.noop,ai.log=ai.noop,ai.warn=ai.noop,ai.error=ai.noop,!0===A.debug||"all"===A.debug)ai.trace=console.trace.bind(console),ai.debug=console.debug.bind(console),ai.vdebug=console.debug.bind(console),ai.log=console.log.bind(console),ai.warn=console.warn.bind(console),ai.error=console.error.bind(console);else if(Array.isArray(A.debug))for(var e in A.debug){var t=A.debug[e];switch(t){case"trace":ai.trace=console.trace.bind(console);break;case"debug":ai.debug=console.debug.bind(console);break;case"vdebug":ai.vdebug=console.debug.bind(console);break;case"log":ai.log=console.log.bind(console);break;case"warn":ai.warn=console.warn.bind(console);break;case"error":ai.error=console.error.bind(console);break;default:console.error("Unknown debugging option '"+t+"' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')")}}var i=A.dependencies||ai.useDefaultDependencies();ai.isArray=i.isArray,ai.webRTCAdapter=i.webRTCAdapter,ai.httpAPICall=i.httpAPICall,ai.newWebSocket=i.newWebSocket,ai.extension=i.extension,ai.extension.init(),ai.listDevices=function(A,e){A="function"==typeof A?A:ai.noop,null==e&&(e={audio:!0,video:!0}),ai.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(e).then((function(e){navigator.mediaDevices.enumerateDevices().then((function(t){ai.debug(t),A(t);try{var i=e.getTracks();for(var n in i){var a=i[n];null!=a&&a.stop()}}catch(A){}}))})).catch((function(e){ai.error(e),A([])})):(ai.warn("navigator.mediaDevices unavailable"),A([]))},ai.attachMediaStream=function(A,e){"chrome"===ai.webRTCAdapter.browserDetails.browser?ai.webRTCAdapter.browserDetails.version>=52?A.srcObject=e:ai.error("Error attaching stream to element"):A.srcObject=e},ai.reattachMediaStream=function(A,e){"chrome"===ai.webRTCAdapter.browserDetails.browser?ai.webRTCAdapter.browserDetails.version>=52?A.srcObject=e.srcObject:void 0!==A.src?A.src=e.src:ai.error("Error reattaching stream to element"):A.srcObject=e.srcObject};var n=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",a=window["on"+n];if(window.addEventListener(n,(function(A){for(var e in ai.log("Closing window"),ai.sessions)null!==ai.sessions[e]&&void 0!==ai.sessions[e]&&ai.sessions[e].destroyOnUnload&&(ai.log("Destroying session "+e),ai.sessions[e].destroy({asyncRequest:!1,notifyDestroyed:!1}));a&&"function"==typeof a&&a()})),ai.safariVp8=!1,"safari"===ai.webRTCAdapter.browserDetails.browser&&ai.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(var e in RTCRtpSender.getCapabilities("video").codecs){var o=RTCRtpSender.getCapabilities("video").codecs[e];if(o&&o.mimeType&&"video/vp8"===o.mimeType.toLowerCase()){ai.safariVp8=!0;break}}ai.safariVp8?ai.log("This version of Safari supports VP8"):ai.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 r=new RTCPeerConnection({},{});r.createOffer({offerToReceiveVideo:!0}).then((function(A){ai.safariVp8=-1!==A.sdp.indexOf("VP8"),ai.safariVp8?ai.log("This version of Safari supports VP8"):ai.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"),r.close(),r=null}))}if(ai.unifiedPlan=!1,"firefox"===ai.webRTCAdapter.browserDetails.browser&&ai.webRTCAdapter.browserDetails.version>=59)ai.unifiedPlan=!0;else if("chrome"===ai.webRTCAdapter.browserDetails.browser&&ai.webRTCAdapter.browserDetails.version<72)ai.unifiedPlan=!1;else if("undefined"==typeof RTCRtpTransceiver||"currentDirection"in RTCRtpTransceiver.prototype){var s=new RTCPeerConnection;try{s.addTransceiver("audio"),ai.unifiedPlan=!0}catch(A){}s.close()}else ai.unifiedPlan=!1;ai.initDone=!0,A.callback()}},ai.isWebrtcSupported=function(){return void 0!==window.RTCPeerConnection&&null!==window.RTCPeerConnection},ai.isGetUserMediaAvailable=function(){return void 0!==navigator.mediaDevices&&null!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia&&null!==navigator.mediaDevices.getUserMedia},ai.randomString=function(A){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",i=0;i<A;i++){var n=Math.floor(62*Math.random());t+=e.substring(n,n+1)}return t},window.Janus_Talk=ai;var oi=window.Janus_Talk,ri=null,si=null,gi="tts-"+Janus_Talk.randomString(12),ci=null;oi.init({debug:"all",callback:function(){window.stopTalk=function(){ri.destroy()},window.startTalk=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=A.customizeStream,t=void 0===e?null:e,i=A.audio,n=void 0===i||i;oi.isWebrtcSupported()?ri=new oi({server:window.EZUIKit.opt.rtcUrl,success:function(){ri.attach({plugin:"rtcgw.plugin.tts",opaqueId:gi,success:function(A){si=window.tts=A,oi.log("Plugin attached! ("+si.getPlugin()+", id="+si.getId()+")");var e=window.EZUIKit.opt.talkLink;console.log("ttsUlr",e);var i={request:"start",url:e,codec:"opus",dir:"sendrecv",audio_debug:1,url_version:"1"};"gb28181"===window.EZUIKit.opt.talkType&&(i.devProto="gb28181"),oi.debug("Trying a createOffer too (audio/video sendrecv)"),si.createOffer({media:{audio:n||!0,video:!1,data:!1},simulcast:!1,simulcast2:!1,customizeStream:t,success:function(A){oi.debug("Got SDP!"),oi.debug(A),si.send({message:i,jsep:A}),void 0!==window.EZUIKit.handleTalkSuccess&&window.EZUIKit.handleTalkSuccess()},error:function(A){oi.error("WebRTC error:",A),void 0!==window.EZUIKit.handleTalkError&&window.EZUIKit.handleTalkError(A)}})},error:function(A){console.error(" -- Error attaching plugin...",A),bootbox.alert("Error attaching plugin... "+A),"undefined"!==window.EZUIKit.handleTalkError&&window.EZUIKit.handleTalkError(A)},consentDialog:function(A){oi.debug("Consent dialog should be "+(A?"on":"off")+" now")},iceState:function(A){oi.log("ICE state changed to "+A)},mediaState:function(A,e){oi.log("Janus "+(e?"started":"stopped")+" receiving our "+A)},webrtcState:function(A){oi.log("Janus says our WebRTC PeerConnection is "+(A?"up":"down")+" now")},slowLink:function(A,e){oi.warn("Janus reports problems "+(A?"sending":"receiving")+" packets on this PeerConnection ("+e+" lost packets)")},onmessage:function(A,e){oi.debug(" ::: Got a message :::"),oi.debug(A),null!=e&&(oi.debug("Handling SDP as well..."),oi.debug(e),si.handleRemoteJsep({jsep:e}));var t=A.result;if(null!=t){if("done"===t)return bootbox.alert("The TTS Test is over"),null!=ci&&ci.stop(),void(ci=null);"msg"===t&&void 0!==window.EZUIKit.handleTalkMessage&&window.EZUIKit.handleTalkMessage(A),"slow_link"===t.status&&toastr.warning("Janus apparently missed many packets we sent, maybe we should reduce the bitrate","Packet loss?",{timeOut:2e3})}},onlocalstream:function(A){oi.debug(" ::: Got a local stream :::"),oi.debug(A),oi.attachMediaStream(document.getElementById("myaudio"),A),"completed"!==si.webrtcStuff.pc.iceConnectionState&&"connected"!==si.webrtcStuff.pc.iceConnectionState&&(null==ci?document.getElementById("audioright"):ci.spin());var e=A.getAudioTracks();null==e||e.length},onremotestream:function(A){oi.debug(" ::: Got a remote stream :::"),oi.debug(A);var e=A.getAudioTracks();null==e||0===e.length||document.getElementById("peeraudio").play()},ondataopen:function(A){oi.log("The DataChannel is available!")},ondata:function(A){oi.debug("We got data from the DataChannel! "+A)},oncleanup:function(){oi.log(" ::: Got a cleanup notification :::"),null!=ci&&ci.stop(),ci=null}})},error:function(A){oi.error(A),"undefined"!==window.EZUIKit.handleTalkError&&window.EZUIKit.handleTalkError(A)},destroyed:function(){}}):bootbox.alert("No WebRTC support... ")}}});var li=function(){return o((function A(e){var i=this;t(this,A),this.jSPlugin=e,this.pluginStatus=new J(this,this.jSPlugin.params.id),this.talkChannelNo=e.talkChannelNo,this.gainNode=null,this.volumeGain=null,this.volumeChangeInterval=null,this.microphoneId=null;var n=document.createElement("div");n.id="audioright",n.style="display:none;";var a=document.createElement("audio");a.id="peeraudio",a.setAttribute("autoplay",!0),a.setAttribute("controls",!0),n.appendChild(a),window.EZUIKit.handleTalkError=function(A){console.log("talk err",A),void 0!==i.jSPlugin.handleTalkError&&i.jSPlugin.handleTalkError(A)},window.EZUIKit.handleTalkSuccess=function(A){console.log("talk success",A),void 0!==i.jSPlugin.handleTalkSuccess&&i.jSPlugin.handleTalkSuccess(A)},window.EZUIKit.opt={rtcUrl:"",talkLink:"",ttsUrl:"",stream:"",deviceSerial:_(this.jSPlugin.url).deviceSerial,channelNo:_(this.jSPlugin.url).channelNo},this.audioRight=n,document.body.appendChild(n)}),[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"destroy",value:function(){document.body.removeChild(this.audioRight)}},{key:"startTalk",value:function(A){var e=this,t=this;new Promise((function(A,t){e.jSPlugin.capacity&&e.jSPlugin.capacity.support_switch_talkmode&&"1"==e.jSPlugin.capacity.support_switch_talkmode?fetch(e.jSPlugin.env.domain+"/api/service/device/talkMode"+"?deviceSerial=".concat(_(e.jSPlugin.url).deviceSerial),{method:"GET",headers:{accessToken:e.jSPlugin.accessToken||e.jSPlugin.token.deviceToken.global}}).then((function(A){return A.json()})).then((function(t){t.meta&&200==t.meta.code?t.data&&t.data.valueInfo&&0==t.data.valueInfo.mode?fetch(e.jSPlugin.env.domain+"/api/v3/device/talkMode"+"?deviceSerial=".concat(_(e.jSPlugin.url).deviceSerial,"&channelNo=").concat(_(e.jSPlugin.url).channelNo,"&mode=1"),{method:"PUT",headers:{accessToken:e.jSPlugin.accessToken||e.jSPlugin.token.deviceToken.video}}).then((function(A){return A.json()})).then((function(e){e.meta&&200==e.meta.code?A():A({code:-1,msg:"对讲模式切换失败",res:e})})).catch((function(e){A({code:-1,msg:"对讲模式切换失败",res:e})})):A():A({code:-1,msg:"获取当前对讲模式失败",res:t})})).catch((function(e){A({code:-1,msg:"获取当前对讲模式失败",res:e})})):A({code:-1,msg:"当前设备不支持对讲模式切换"})})).then((function(i){if(e.jSPlugin.capacity&&e.jSPlugin.capacity.support_talk&&(!e.jSPlugin.capacity||"3"!==e.jSPlugin.capacity.support_talk&&"1"!==e.jSPlugin.capacity.support_talk))return"function"==typeof e.jSPlugin.params.handleError&&(e.pluginStatus.loadingSetText({text:"设备不支持对讲",color:"red",delayClear:2e3}),e.jSPlugin.params.handleError({msg:"设备不支持对讲",retcode:-1e3,id:e.jSPlugin.params.id,type:"handleError"})),console.log("设备不支持对讲"),!1;var n=new FormData;if(n.append("accessToken",e.jSPlugin.accessToken||e.jSPlugin.token.deviceToken.video),n.append("deviceSerial",_(e.jSPlugin.url).deviceSerial),n.append("channelNo",e.jSPlugin.channelNo||"0"),e.jSPlugin.params.extraParams&&e.jSPlugin.params.extraParams.talkParams&&"object"===d(e.jSPlugin.params.extraParams.talkParams))for(var a in e.jSPlugin.params.extraParams.talkParams)data.append(a,e.jSPlugin.params.extraParams.talkParams[a]);fetch(e.jSPlugin.env.domain+"/api/lapp/live/talk/url",{method:"POST",body:n}).then((function(A){return A.json()})).then((function(i){if(200==i.code){var n=i.data;if(n){var a=n.rtcUrl;if(-1===a.indexOf("ws")&&(a=a.replace("https","wss").replace("rtcgw","rtcgw-ws")),window.EZUIKit.opt.rtcUrl=a,window.EZUIKit.opt.ttsUrl="tts://"+n.ttsUrl,e.jSPlugin.params.extraParams&&e.jSPlugin.params.extraParams.ttsParams)if("string"==typeof e.jSPlugin.params.extraParams.ttsParams)window.EZUIKit.opt.ttsUrl+="&"+e.jSPlugin.params.extraParams.ttsParams;else if("object"===d(e.jSPlugin.params.extraParams.ttsParams))for(var o in e.jSPlugin.params.extraParams.ttsParams)window.EZUIKit.opt.ttsUrl+="&"+o+"="+e.jSPlugin.params.extraParams.ttsParams[o];window.EZUIKit.opt.deviceSerial=_(e.jSPlugin.url).deviceSerial,window.EZUIKit.opt.channelNo=e.talkChannelNo||"0";var r="talk?dev="+window.EZUIKit.opt.deviceSerial+"&chann="+window.EZUIKit.opt.channelNo+"&encodetype=2";window.EZUIKit.opt.talkLink=window.EZUIKit.opt.ttsUrl.split("?")[0]+"/"+r,n.ttsUrl.indexOf("gb28181")>-1&&(window.EZUIKit.opt.talkType="gb28181"),A&&A(n.ttsUrl.indexOf("gb28181")>-1||-1!==window.EZUIKit.opt.deviceSerial.indexOf(":")),window.EZUIKit.opt.stream=e.jSPlugin.accessToken?n.stream:e.jSPlugin.token.streamToken.talk,window.startTalk({customizeStream:t._customizeStream.bind(t),audio:!e.microphoneId||{deviceId:e.microphoneId}}),e.observeVolumeChange(),e.jSPlugin.eventEmitter&&e.jSPlugin.eventEmitter.emit("startTalk",{eventType:"startTalk",code:0,target:e,msg:"开启对讲"})}}else console.log(i.code,e.jSPlugin.i18n.t("38"+i.code)),e.pluginStatus.loadingSetText({text:i.msg||e.jSPlugin.i18n.t("38"+i.code),color:"red",delayClear:2e3}),e.jSPlugin.eventEmitter&&e.jSPlugin.eventEmitter.emit("startTalk",{eventType:"startTalk",code:-1,target:e,msg:i.msg||e.jSPlugin.i18n.t("38"+i.code)}),"function"==typeof e.jSPlugin.params.handleError&&e.jSPlugin.params.handleError({msg:i.msg||e.jSPlugin.i18n.t("38"+i.code),retcode:i.code,id:e.jSPlugin.params.id,type:"handleError"})})).catch((function(A){console.log("err",A)}))})).catch((function(A){console.log("对讲开启失败:",A)}))}},{key:"stopTalk",value:function(){var A=this;try{window.stopTalk()}catch(A){console.log("stopTalk error:",A)}this.gainNode=null,clearInterval(this.volumeChangeInterval),this.volumeChangeInterval=null,this.jSPlugin.eventEmitter&&(setTimeout((function(){A.jSPlugin.eventEmitter.emit("volumeChange",{eventType:"volumeChange",code:0,target:A,data:0,msg:"音量变化"})}),200),this.jSPlugin.eventEmitter.emit("stopTalk",{eventType:"stopTalk",code:0,target:this,msg:"结束对讲"})),document.getElementById("myaudio")&&document.getElementById("myaudio").srcObject&&document.getElementById("myaudio").srcObject.getTracks()[0].stop()}},{key:"changeTalkChannelNo",value:function(A){window.EZUIKit.opt&&window.EZUIKit.opt.channelNo&&(this.talkChannelNo=A,window.EZUIKit.opt.channelNo=A)}},{key:"_customizeStream",value:function(A){var e=this;return new Promise((function(t,i){var n,a=new window.AudioContext;e.gainNode=a.createGain();var o=a.createMediaStreamSource(A);e.gainNode.gain.value=null!==(n=e.volumeGain)&&void 0!==n?n:1;var r=a.createMediaStreamDestination();o.connect(e.gainNode),e.gainNode.connect(r),t(r.stream)}))}},{key:"setVolumeGain",value:function(A){var e=["",null].includes(A)?1:Number(A);return"number"==typeof e&&e>=0?(this.volumeGain=Math.min(e,10),this.gainNode&&(this.gainNode.gain.value=this.volumeGain),{code:0,msg:"成功",res:null}):{code:-1,msg:"参数格式有误",res:null}}},{key:"observeVolumeChange",value:function(){var A=this,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).interval,t=void 0===e?100:e;this.volumeChangeInterval&&(clearInterval(volumeChangeInterval),volumeChangeInterval=null),this.volumeChangeInterval=setInterval((function(){var e,t,i,n,a;null===(e=window.tts)||void 0===e||null===(t=e.webrtcStuff)||void 0===t||null===(i=t.pc)||void 0===i||null===(n=i.getStats)||void 0===n||null===(a=n.call(i))||void 0===a||a.then((function(e){e.forEach((function(e){var t,i;"media-source"===e.type&&(null===(t=A.jSPlugin)||void 0===t||null===(i=t.eventEmitter)||void 0===i||i.emit("volumeChange",{eventType:"volumeChange",code:0,target:A,data:e.audioLevel,msg:"音量变化"}))}))}))}),t)}},{key:"getMicrophonePermission",value:function(){return new Promise((function(A,e){navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){e.getTracks().forEach((function(A){A.stop()})),A({code:0,msg:"成功",res:null})})).catch((function(e){A({code:-1,msg:"获取麦克风权限失败",res:e})}))}))}},{key:"getMicrophonesList",value:function(){return new Promise((function(A,e){navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then((function(e){var t=[];e.map((function(A){"audioinput"==A.kind&&t.push(A)})),A({code:0,msg:"成功",res:t})})):A({code:-1,msg:"未查询到相关设备",res:null})}))}},{key:"setProfile",value:function(A){var e=this,t=A.microphoneId;t!==this.microphoneId&&(this.microphoneId=t,this.gainNode&&(window.stopTalk(),setTimeout((function(){window.startTalk({customizeStream:e._customizeStream.bind(e),audio:!e.microphoneId||{deviceId:e.microphoneId}})}),200)))}}])}(),Ii=function(){function A(e){var i=this;t(this,A),this.jSPlugin=e,this.pluginStatus=new J(this,this.jSPlugin.id),A._instanceStyle();var n=document.createElement("div");n.className="mobile-ez-ptz-container",n.id="mobile-ez-ptz-container";var a=window.innerHeight;n.style="display:inline-block;width: ".concat(this.jSPlugin.width,"px;text-align:center;height: ").concat(a-this.jSPlugin.height-5,"px");var o=document.createElement("div");o.className="live-ptz-title",o.id="live-ptz-title",o.innerHTML=this.jSPlugin.i18n.t("BTN_PTZ"),document.getElementById("live-ptz-title")||n.appendChild(o);var r=document.createElement("div");r.className="live-ptz-intro",r.id="live-ptz-intro",r.innerHTML=this.jSPlugin.i18n.t("MOBILE_PTZ_TIPS"),document.getElementById("live-ptz-intro")||n.appendChild(r);var s=document.createElement("div");s.id="mobile-ez-ptz-item",s.className="mobile-ez-ptz-wrap",s.innerHTML='\n <div class="mobile-ez-ptz-container" id="mobile-ez-ptz-container">\n <div class="ez-ptz-main center"></div>\n <div class="mobile-ez-ptz-icon top default"></div>\n <div class="mobile-ez-ptz-icon left default"></div>\n <div class="mobile-ez-ptz-icon bottom default"></div>\n <div class="mobile-ez-ptz-icon right default"></div>\n </div>\n ',document.getElementById("mobile-ez-ptz-item")||n.appendChild(s),m(n,document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),document.getElementById("mobile-ez-ptz-item").ontouchstart=function(A){A.preventDefault(),console.log("触摸开始"),i._handlePtzTouch(A,"start")},document.getElementById("mobile-ez-ptz-item").ontouchend=function(A){A.preventDefault(),console.log("触摸结束",A),i._handlePtzTouch(A,"stop")},document.getElementById("mobile-ez-ptz-item").onmousedown=function(A){A.preventDefault(),console.log("触摸开始"),i._handlePtzTouch(A,"start")},document.getElementById("mobile-ez-ptz-item").onmouseup=function(A){A.preventDefault(),console.log("触摸结束",A),i._handlePtzTouch(A,"stop")}}return o(A,[{key:"show",value:function(){document.getElementById("mobile-ez-ptz-container").style="display: inline-block"}},{key:"hide",value:function(){document.getElementById("mobile-ez-ptz-container").style="display: none"}},{key:"_handlePtzTouch",value:function(A,e){var t=this,i=document.getElementById("mobile-ez-ptz-item").getBoundingClientRect(),n=i.left+130,a=i.top+130,o=(A.x||A.changedTouches[0].clientX)-n,r=(A.y||A.changedTouches[0].clientY)-a,s=0,g=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start",c=this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video;Math.abs(o)>Math.abs(r)?o>0?(s=3,document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("default","active")):(s=2,document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("default","active")):r>0?(s=1,document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("default","active")):(s=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(0===s?180:1===s?0:2===s?90:270,"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)"),"stop"===e&&(g=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",c=this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,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 l=new FormData;l.append("deviceSerial",_(this.jSPlugin.url).deviceSerial),l.append("channelNo",_(this.jSPlugin.url).channelNo),l.append("speed",1),l.append("direction",s),l.append("accessToken",c),fetch(g,{method:"POST",body:l}).then((function(A){return A.json()})).then((function(A){if(200==A.code);else{console.log(A.code,t.jSPlugin.i18n.t("38"+A.code));var e=t.jSPlugin.i18n.t("38"+A.code)||A.msg;t.pluginStatus.loadingSetText({text:e,color:"red",delayClear:2e3}),60005!=A.code&&60002!=A.code&&60003!=A.code&&60004!=A.code||(document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(0===s?180:1===s?0:2===s?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"))}})).catch((function(A){console.log("云台调用异常",A)}))}}],[{key:"_instanceStyle",value:function(){A._STYLE||(A._STYLE=document.createElement("style"),A._STYLE.innerHTML="\n body{\n padding: 0;\n margin: 0;\n }\n #mobile-ez-ptz-container {\n display: inline-block;\n width: 375px;\n text-align: center;\n }\n .live-ptz-title{\n height: 25px;\n font-size: 18px;\n color: #2c2c2c;\n text-align: center;\n font-weight: 700;\n margin: 24px 0 12px;\n }\n .live-ptz-intro {\n margin-bottom: 24px;\n color: #aaaaaa;\n }\n .mobile-ez-ptz-wrap {\n background-image: linear-gradient(180deg, #f6f8ff 0%, #ededed6b 50%)\n }\n #mobile-ez-ptz-container .mobile-ez-ptz-container {\n position: relative;\n width: 260px;\n height: 260px;\n background: rgba(255, 255, 255, 0.80);\n border: 1px solid rgba(255, 255, 255, 0.80);\n border-radius: 100%;\n cursor: pointer;\n overflow: hidden;\n margin: auto;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n left: calc(50% - 6px);\n top: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top.active {\n border-bottom-color: #1890FF;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n left: calc(50% - 6px);\n bottom: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom.active {\n border-top-color: #1890FF;\n\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right {\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n top: calc(50% - 6px);\n right: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right.active {\n border-left-color: #1890FF;\n\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left {\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n top: calc(50% - 6px);\n left: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left.active {\n border-right-color: #1890FF;\n\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .ez-ptz-main.center {\n width: 52px;\n height: 52px;\n background: #FFFFFF;\n border: 2px solid #eee;\n border-radius: 100%;\n top: calc(50% - 26px);\n left: calc(50% - 26px);\n position: absolute;\n /* box-shadow: 0px -39px 40px 6px #1890ff; */\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-wrap {\n display: inline-block;\n padding: 24px 24px;\n border-radius: 100%;\n overflow: hidden;\n }\n\n #mobile-ez-ptz-container .ez-ptz-close {\n position: absolute;\n color: #FFFFFF;\n top: 0;\n right: 0px;\n }",document.getElementsByTagName("head")[0].appendChild(A._STYLE))}}])}();s(Ii,"_STYLE",void 0);var Ci={header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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"}]}},di={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"rgba(0,0,0,0.8)",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:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}},hi={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"rgba(0,0,0,0.8)",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:"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}]}}},Bi={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"rgba(0,0,0,0.8)",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}]}}},ui={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"rgba(0,0,0,0.8)",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}]}}},Ei={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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}]}}},fi={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"rgba(0,0,0,0.8)",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}]}}},Qi={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"cloudRecord",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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}]}}},xi={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",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:"#00000080",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:"speed",part:"right",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}]}}},pi=[{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:Bi.data.header,footer:Bi.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:ui.data.header,footer:ui.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:fi.data.header,footer:fi.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:Ei.data.header,footer:Ei.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:Qi.data.header,footer:Qi.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:di.data.header,footer:di.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:hi.data.header,footer:hi.data.footer},{autoFocus:0,createTime:"2021-06-14T08:04:37.000Z",themeId:"miniRec",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:"",header:xi.data.header,footer:xi.data.footer}],mi=function(){return o((function A(e){var i=this;t(this,A),this.jSPlugin=e,this.enableZoom=!1,this.videoWidth=1920,this.videoHeight=1080,this.currentScale=1,this.currentPosition={left:0,top:0,right:1920,bottom:1080},this.info={},this.clientRect=document.getElementById(e.id).getBoundingClientRect(),this.DOM=document.getElementById(e.id);var n=document.createElement("div");n.id="".concat(e.id,"-zoom-container");var a=document.getElementById("".concat(e.id,"-audioControls")),o=48;a&&(o=a.offsetHeight);var r=e.isMobile?"\n -webkit-transform: scale(0.8);\n -moz-transform: scale(0.8);\n -ms-transform: scale(0.8);\n transform: scale(0.8);\n transform-origin: left bottom;":"";n.style="position: absolute;\n display:none;\n left: 12px;\n bottom: ".concat(e.isMobile?"".concat(o+6,"px"):"80px",";\n ").concat(r,"\n ");var s='\n <div\n style="display: inline-flex;justify-content: space-between;flex-direction: column;width: 36px;height: 160px;background:rgba(0,0,0,0.60);border-radius: 2px;align-items: center;">\n <div id="'.concat(this.jSPlugin.id,'-scale-value" style="font-size: 12px;color:#FFFFFF;margin:10px 0; user-select: none;">2.0X</div>\n <div style="width: 20px;height: 20px;margin-bottom:4px;" id="').concat(this.jSPlugin.id,'-addScale">\n <?xml version="1.0" encoding="utf-8"?>\n <svg version="1.1" fill="#FFFFFF" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">\n <title>').concat(this.jSPlugin.i18n.t("ZOOM_ADD"),'</title>\n <g>\n <rect class="st0" width="20" height="20" fill="none"/>\n </g>\n <g>\n <path class="st1" d="M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5\n s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z"/>\n </g>\n <g>\n <path class="st2" d="M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z"/>\n </g>\n <g>\n <path class="st2" d="M10,13.2c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C10.6,12.9,10.3,13.2,10,13.2z"/>\n </g>\n </svg>\n </div>\n <div style="\n position: relative;\n width: 2px;\n height: 64px;\n border-radius: 2px;\n background: rgba(255,255,255,0.75);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;">\n <div class="scale-body-line-dot" id="').concat(this.jSPlugin.id,'-scale-body-line-dot" style="width: 6px;\n height: 6px;\n background: #FFFFFF;\n border-radius: 100%;\n position: absolute;\n border: 1px solid #407AFF;"></div>\n <div id="').concat(this.jSPlugin.id,'-line-dot" style="width: 2px;\n height: 0%;\n border-radius: 2px;\n background: #407AFF;\n bottom: 0;"></div>\n </div>\n <div style="width: 20px;height: 20px;margin: 4px 0 10px;" id="').concat(this.jSPlugin.id,'-subScale">\n <?xml version="1.0" encoding="utf-8"?>\n <svg fill="#FFFFFF" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">\n <title>').concat(this.jSPlugin.i18n.t("ZOOM_SUB"),'</title>\n <g>\n <rect class="st0" width="20" height="20" fill="none"/>\n </g>\n <g>\n <path class="st1" d="M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5\n s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z"/>\n </g>\n <g>\n <path class="st2" d="M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z"/>\n </g>\n </svg>\n </div>\n </div>\n ');n.innerHTML=s,document.getElementById("".concat(e.id,"-audioControls-left"))&&(document.getElementById("".concat(e.id,"-audioControls-left")).parentNode.appendChild(n),document.getElementById("".concat(e.id,"-addScale")).onclick=function(){i.addScale()},document.getElementById("".concat(e.id,"-subScale")).onclick=function(){i.subScale()}),this._event()}),[{key:"_event",value:function(){var A=this,e=setInterval((function(){var t=document.getElementById("".concat(A.jSPlugin.id,"-container-0"));clearInterval(e),A.jSPlugin.isMobile?t&&(t.addEventListener("touchstart",(function(e){return A.onTouchstart(e)})),t.addEventListener("touchend",(function(e){return A.onTouchend(e)}))):t&&(t.addEventListener("mousedown",(function(e){return A.onMouseDown(e)})),t.addEventListener("mouseup",(function(e){return A.onMouseUp(e)})))}),100)}},{key:"onMouseDown",value:function(A){if(1===this.currentScale)return!1;this.moveX=A.clientX,this.moveY=A.clientY}},{key:"onMouseUp",value:function(A){var e=this.currentPosition;if(1===this.currentScale)return!1;e.left=e.left-(A.clientX-this.moveX),e.top=e.top-(A.clientY-this.moveY),this.doScale()}},{key:"onTouchstart",value:function(A){if(1===this.currentScale)return!1;if(this.jSPlugin.use3DZoom||1===this.currentScale)return!1;if(!this.jSPlugin.beforeMobileZoomVerify())return!1;if(!this.inited){var e=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=e.width,this.videoHeight=e.height,this.currentPosition.left=0,this.currentPosition.top=0,this.isMobileFullScreen?(this.currentPosition.right=e.height,this.currentPosition.bottom=e.width):(this.currentPosition.right=e.width,this.currentPosition.bottom=e.height),this.inited=!0}var t=A.touches[0];if(t){var i={clientX:0,clientY:0};i.clientX=t.clientX,i.clientY=t.clientY,this.point1=i}}},{key:"onTouchend",value:function(A){var e=this,t=this.currentPosition;if(1===this.currentScale)return!1;var i=A.changedTouches[0];this.isMobileFullScreen?(t.left=t.left-(i.clientY-e.point1.clientY),t.top=t.top+(i.clientX-e.point1.clientX)):(t.left=t.left-(i.clientX-e.point1.clientX),t.top=t.top-(i.clientY-e.point1.clientY)),e.doScale()}},{key:"renderDot",value:function(){var A=this.currentScale;document.getElementById("".concat(this.jSPlugin.id,"-scale-value"))&&(document.getElementById("".concat(this.jSPlugin.id,"-scale-value")).innerHTML="".concat(A,".0X")),document.getElementById("".concat(this.jSPlugin.id,"-line-dot"))&&(document.getElementById("".concat(this.jSPlugin.id,"-line-dot")).style.height="".concat((A-1)/7*100,"%")),document.getElementById("".concat(this.jSPlugin.id,"-scale-body-line-dot"))&&(document.getElementById("".concat(this.jSPlugin.id,"-scale-body-line-dot")).style.bottom="calc(".concat((A-1)/7*100,"% - 3px)"))}},{key:"getTopMostElement",value:function(A,e,t){var i=A?A.getBoundingClientRect():null,n=e?e.getBoundingClientRect():null,a=t?t.getBoundingClientRect():null;if(!i&&!n&&!a)return null;if(!i)return n.top<a.top?e:t;if(!n)return i.top<a.top?A:t;if(!a)return i.top<n.top?A:e;var o=[i.top,n.top,a.top],r=Math.max.apply(Math,o);return i.top===r?A:n.top===r?e:t}},{key:"handleFullscreen",value:function(A,e,t){this.clientRect={width:e,height:t}}},{key:"startZoom",value:function(){try{if(document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block"),this.dpr="v1-soft"==this.jSPlugin.decodeEngine?1:this.jSPlugin.dpr,this.jSPlugin.jSPlugin)try{var A=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.info=Object.assign({},A),this.videoWidth=(A.width||this.jSPlugin.width)*this.dpr-10,this.videoHeight=(A.height||this.jSPlugin.height)*this.dpr-10,this.currentPosition.right=A.width*this.dpr,this.currentPosition.bottom=A.height*this.dpr,this.jSPlugin.jSPlugin.bEZoom=!0}catch(A){}this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("startZoom",{eventType:"startZoom",code:0,target:this,msg:"开启电子放大"}),this.renderDot(),this.enableZoom=!0}catch(A){this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("startZoom",{eventType:"startZoom",code:-1,target:this,msg:A||"开启电子放大失败"})}}},{key:"stopZoom",value:function(){try{this._resetZoom(),this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("stopZoom",{eventType:"stopZoom",code:0,target:this,msg:"关闭电子放大"}),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none")}catch(A){this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("stopZoom",{eventType:"stopZoom",code:-1,target:this,msg:A||"关闭电子放大失败"})}}},{key:"_resetZoom",value:function(){this.currentScale=1,this.currentPosition.left=0,this.currentPosition.top=0,this.currentPosition.right=this.videoWidth,this.currentPosition.bottom=this.videoHeight,this._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight,!1),this.renderDot(),this.enableZoom=!1}},{key:"doScale",value:function(){var A=this.currentPosition,e=this.currentScale,t=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);if(console.log("infoh::",t),t.width!=this.info.width){var i=parseFloat(t.width/this.info.width);A.left=A.left*i*(i>1?1.25:.75),A.right=A.right*i*(i>1?1.25:.75),this.info.width=t.width,this.videoWidth=t.width*(i>1.25?1:.75)*this.dpr}if(t.height!=this.info.height){var n=parseFloat(t.height/this.info.height);A.top=A.top*n*(n>1?1.25:.75),A.bottom=A.bottom*n*(n>1?1.25:.75),this.info.height=t.height,this.videoHeight=t.height*(n>1?1.25:.75)*this.dpr}A.left=A.left+.5*(A.right-A.left-this.videoWidth/e),A.left<=0?A.left=0:A.left>this.videoWidth-this.videoWidth/e&&(A.left=this.videoWidth-this.videoWidth/e),A.right=A.left+this.videoWidth/e,A.top=A.top+.5*(A.bottom-A.top-this.videoHeight/e),A.top<=0?A.top=0:A.top>this.videoHeight-this.videoHeight/e&&(A.top=this.videoHeight-this.videoHeight/e),A.bottom=A.top+this.videoHeight/e,A.left=parseInt(A.left,10),A.right=parseInt(A.right,10),A.top=parseInt(A.top,10),A.bottom=parseInt(A.bottom,10);try{A.left<A.right&&A.top<A.bottom&&A.bottom<=this.videoHeight&&A.right<=this.videoWidth&&this._JSPlayM4_SetDisplayRegion(A.left,A.right,A.top,A.bottom,1!=e,this.isMobileFullScreen)}catch(A){console.log(A)}this.renderDot()}},{key:"addScale",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("zoomAdd",{eventType:"zoomAdd",code:1,target:this,msg:"执行放大"}),this.currentScale>=8?(this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_ADD_MAX"),document.getElementById("".concat(this.jSPlugin.id))),!1):(this.currentScale=this.currentScale+A,this.currentScale>8?(console.log("超出最大倍率"),this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_LIMIT_MAX"),document.getElementById("".concat(this.jSPlugin.id))),!1):void this.doScale())}},{key:"subScale",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("zoomSub",{eventType:"zoomSub",code:1,target:this,msg:"执行缩小"}),this.currentScale<=1?(this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_SUB_MIN"),document.getElementById("".concat(this.jSPlugin.id))),!1):(this.currentScale=this.currentScale-A,this.currentScale<1?(this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_LIMIT_MIN"),document.getElementById("".concat(this.jSPlugin.id))),!1):void this.doScale())}},{key:"_JSPlayM4_SetDisplayRegion",value:function(A,e,t,i,n){this.jSPlugin&&this.jSPlugin.jSPlugin&&(console.log("%c计算后,","color: red;",this.videoWidth,this.videoHeight,A,e,t,i,this.currentScale),this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(A,e,t,i,n,this.isMobileFullScreen))}},{key:"isMobileFullScreen",get:function(){return!!(w()&&this.jSPlugin.Theme&&this.jSPlugin.Theme.decoderState&&this.jSPlugin.Theme.decoderState.state.expend)}}])}(),yi=[{videoLevel:1,streamTypeIn:2},{videoLevel:2,streamTypeIn:1}],_i={0:"VIDEO_LEVEL_FLUENT",1:"VIDEO_LEVEL_SATNDARD",2:"VIDEO_LEVEL_HEIGH",3:"VIDEO_LEVEL_SPUER",4:"VIDEO_LEVEL_EXTREME",5:"VIDEO_LEVEL_3K",6:"VIDEO_LEVEL_4k"},Si="8.1.2",Di=function(A,e,t,i){var n="".concat(A.env.domain,"/api/service/media/template/getDetail?accessToken=").concat(A.accessToken||A.token.httpToken.url,"&id=").concat(e);fetch(n,{method:"GET"}).then((function(A){return A.json()})).then((function(A){var e;(e=A).meta&&t(e)})).catch((function(A){var e;e=A,console.log(e),i(e)}))},wi=function(A){var e="";return Object.keys(A).map((function(t,i){e+="".concat(t,":").concat(A[t]).concat(i<Object.keys(A).length-1?";":"")})),e},vi=500,bi=function(){return o((function A(e){var i=this;t(this,A),this.jSPlugin=e,this.isNeedRenderHeader=!1,this.isNeedRenderFooter=!1,this.autoFocus=0,this.autoFocusTimer=null,this.recordTimer=null,this.nextRate=1,this.showHD=!1,this.themeInited=!1;var n=Xt.getGlobalState();if(this.decoderState={state:{play:!1,pauseDate:null,sound:!n.sound&&!!e.audio,recordvideo:!1,recordCount:"00:00",talk:!1,zoom:!1,pantile:!1,speed:!1,expend:!1,webExpend:!1,cloudRec:"cloud.rec"===_(e.url).type,rec:"rec"===_(e.url).type,type:_(e.url).type}},this.allowZoom=!this.jSPlugin.use3DZoom,this.zoomDisable=!1,this.pluginStatus=new J(this,this.jSPlugin.params.id),this.inited=!1,this.isMobile=w(),void 0!==e.isMobile&&(this.isMobile=e.isMobile),this.pauseTime=null,this.themeData=Ci,this.jSPlugin.themeId)switch(this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"security":case"voice":case"simple":case"miniRec":var a=Rt(pi,(function(A){return A.themeId===i.jSPlugin.themeId}));a&&(this.themeData=a),this.initThemeData();break;case"themeData":this.themeData=this.jSPlugin.params.themeData,this.initThemeData();break;default:this.fetchThemeData(this.jSPlugin.themeId)}this.jSPlugin.Talk||(this.jSPlugin.Talk=new li(this.jSPlugin)),f("".concat(this.jSPlugin.staticPath,"/speed/speed.css")),f("".concat(this.jSPlugin.staticPath,"/css/theme.css")),this._fullscreenchange=null,this._fullScreenChangeEvent()}),[{key:"fetchThemeData",value:function(A){var e=this;Di(this.jSPlugin,A,(function(A){0==A.meta.code&&A.data?(e.themeData=A.data,A.data.header&&(e.themeData.header=A.data.header,e.themeData.header.btnList=e.themeData.header.btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),A.data.footer&&(e.themeData.footer=A.data.footer,e.themeData.footer.btnList=e.themeData.footer.btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),A.data.themeType&&("live"===_(e.jSPlugin.url).type?-1===A.data.themeType.toLowerCase().indexOf("live")&&console.error("当前模板类型".concat(A.data.themeType,"与播放类型").concat(_(e.jSPlugin.url).type,"不对应,请检查模板类型")):-1===A.data.themeType.toLowerCase().indexOf("rec")&&console.error("当前模板类型".concat(A.data.themeType,"与播放类型").concat(_(e.jSPlugin.url).type,"不对应,请检查模板类型"))),e.initThemeData(),e.renderThemeData()):console.log("模板获取失败:",A)}),(function(A){console.log("模板获取失败:",A),e.renderThemeData()}))}},{key:"changeTheme",value:function(A){var e=this;if("string"==typeof A)switch(this.jSPlugin.themeId=A,this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"security":case"voice":case"simple":case"miniRec":var t=Rt(pi,(function(A){return A.themeId===e.jSPlugin.themeId}));t&&(this.themeData=t),this.initThemeData();break;default:this.fetchThemeData(A)}else"object"===d(A)&&(this.themeData=A,this.initThemeData());this.jSPlugin&&this.jSPlugin.handleThemeChange&&this.jSPlugin.handleThemeChange(A)}},{key:"renderThemeData",value:function(){var A=this,e=this.themeData,t=e.header,i=e.footer;if(this.isNeedRenderHeader&&t&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=t.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=t.color.replace("-diy",""),t.btnList.map((function(e,t){e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId]))}))),this.isNeedRenderFooter&&i)document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=i.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=i.color.replace("-diy",""),this.jSPlugin.params.extraBtn&&(i.btnList=[].concat(I(i.btnList),I(this.jSPlugin.params.extraBtn))),i.btnList.map((function(e,t){if(e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId])),"play"===e.iconId&&e.defaultActive&&!A.themeInited&&A.jSPlugin.autoplay)var i=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(i),A.themeInited=!0)}),50)})),this.themeData.autoFocus>0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",(function(){document.getElementById("".concat(A.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.opacity=1,document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.pointerEvents="all"),document.getElementById("".concat(A.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(A.jSPlugin.id,"-headControl")).style.opacity=1,document.getElementById("".concat(A.jSPlugin.id,"-headControl")).style.pointerEvents="all"),A.startAutoFocus()}))),this.setDecoderState({cloudRec:"cloud.rec"===_(this.jSPlugin.url).type,rec:"rec"===_(this.jSPlugin.url).type,type:_(this.jSPlugin.url).type});else if(!this.themeInited)var n=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&A.jSPlugin.autoplay&&(clearInterval(n),A.themeInited=!0)}),50);bt(this.themeData.footer.btnList,(function(A){return"zoom"===A.iconId&&A.isrender>0}))>=0&&(this.isMobile&&!this.jSPlugin.use3DZoom&&(this.jSPlugin.beforeMobileZoomVerify=function(){return!!A.decoderState.state.play}),this.jSPlugin.Zoom=new mi(this.jSPlugin))}},{key:"setDecoderState",value:function(A){var e=this,t=this.themeData,i=t.header,n=t.footer;Object.keys(A).map((function(t,a){var o="#FFFFFF",r="#FFFFFF";switch(-1===i.btnList.findIndex((function(A){return A.iconId===t}))?(o=n.color.replace("-diy",""),r=n.activeColor.replace("-diy","")):(o=i.color.replace("-diy",""),r=n.activeColor.replace("-diy","")),t){case"play":A[t]?document.getElementById("".concat(e.jSPlugin.id,"-play"))&&(document.getElementById("".concat(e.jSPlugin.id,"-play-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-play-content")).children[0].children[1].style="display:none",document.getElementById("".concat(e.jSPlugin.id,"-play")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-play-content")).childNodes[0].children[0].style.fill=A[t]?r:o):document.getElementById("".concat(e.jSPlugin.id,"-play"))&&(document.getElementById("".concat(e.jSPlugin.id,"-play-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-play-content")).children[0].children[0].style="display:none",document.getElementById("".concat(e.jSPlugin.id,"-play")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-play-content")).childNodes[0].children[1].style.fill=A[t]?r:o);break;case"sound":document.getElementById("".concat(e.jSPlugin.id,"-sound"))&&(A[t]?(document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:none",document.getElementById("".concat(e.jSPlugin.id,"-sound")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).childNodes[0].children[1].style.fill=A[t]?r:o):(document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:none",document.getElementById("".concat(e.jSPlugin.id,"-sound")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-sound-content")).childNodes[0].children[0].style.fill=A[t]?r:o));break;case"recordvideo":document.getElementById("".concat(e.jSPlugin.id,"-recordvideo"))&&(document.getElementById("".concat(e.jSPlugin.id,"-recordvideo")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-recordvideo-content")).childNodes[0].style.fill=A[t]?r:o,A[t]?e.countTime("add",0):e.countTime("destroy",0));break;case"talk":document.getElementById("".concat(e.jSPlugin.id,"-talk"))&&(document.getElementById("".concat(e.jSPlugin.id,"-talk")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-talk-content")).childNodes[1].style.fill=A[t]?r:o);break;case"zoom":document.getElementById("".concat(e.jSPlugin.id,"-zoom"))&&(document.getElementById("".concat(e.jSPlugin.id,"-zoom")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-zoom-content")).childNodes[1].style.fill=A[t]?r:o);break;case"pantile":document.getElementById("".concat(e.jSPlugin.id,"-pantile"))&&(document.getElementById("".concat(e.jSPlugin.id,"-pantile")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-pantile-content")).childNodes[0].style.fill=A[t]?r:o);break;case"webExpend":A[t]?(document.getElementById("".concat(e.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(e.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-expend")).className="disabled")):(document.getElementById("".concat(e.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(e.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-expend")).className="")),document.getElementById("".concat(e.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-webExpend")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[0].style.fill=A[t]?r:o,document.getElementById("".concat(e.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[1].style.fill=A[t]?r:o);break;case"capturePicture":document.getElementById("".concat(e.jSPlugin.id,"-capturePicture"))&&(document.getElementById("".concat(e.jSPlugin.id,"-capturePicture")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-capturePicture-content")).childNodes[0].style.fill=A[t]?r:o);break;case"expend":A[t]?(document.getElementById("".concat(e.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(e.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-webExpend")).className="disabled")):(document.getElementById("".concat(e.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(e.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-webExpend")).className="")),document.getElementById("".concat(e.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(e.jSPlugin.id,"-expend")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[0].style.fill=A[t]?r:o,document.getElementById("".concat(e.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[1].style.fill=A[t]?r:o);break;case"hd":break;case"speed":if(document.getElementById("".concat(e.jSPlugin.id,"-speed"))){var s=document.getElementById("".concat(e.jSPlugin.id,"-speed-content")).children[1].children[0];"not-allowed"!==s.style.cursor&&(s.style.color=A[t]?r:o,s.style.borderColor=A[t]?r:o)}document.getElementById("".concat(e.jSPlugin.id,"-select-mask"))&&(e.isMobile&&A[t]?document.getElementById("".concat(e.jSPlugin.id,"-select-mask")).style.display="block":document.getElementById("".concat(e.jSPlugin.id,"-select-mask")).style.display="none");break;case"cloudRec":document.getElementById("".concat(e.jSPlugin.id,"-cloudRec"))&&(document.getElementById("".concat(e.jSPlugin.id,"-cloudRec")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=A[t]?r:o),document.getElementById("".concat(e.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(e.jSPlugin.id,"-rec")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=A[t]?o:r);break;case"cloudRecord":var g=document.getElementById("".concat(e.jSPlugin.id,"-cloudRecord"));g&&(g.className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-cloudRecord-content")).children[0].children[0].style.fill=A[t]?r:o),document.getElementById("".concat(e.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(e.jSPlugin.id,"-rec")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=A[t]?o:r);break;case"rec":document.getElementById("".concat(e.jSPlugin.id,"-cloudRec"))&&(document.getElementById("".concat(e.jSPlugin.id,"-cloudRec")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=A[t]?o:r),document.getElementById("".concat(e.jSPlugin.id,"-cloudRecord"))&&(document.getElementById("".concat(e.jSPlugin.id,"-cloudRecord")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-cloudRecord-content")).children[0].children[0].style.fill=A[t]?o:r),document.getElementById("".concat(e.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(e.jSPlugin.id,"-rec")).className=A[t]?"active":"",document.getElementById("".concat(e.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=A[t]?r:o)}e.decoderState.state=Object.assign(e.decoderState.state,A)}))}},{key:"startAutoFocus",value:function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById("".concat(A.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.pointerEvents="none"),document.getElementById("".concat(A.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(A.jSPlugin.id,"-headControl")).style.opacity=0,document.getElementById("".concat(A.jSPlugin.id,"-headControl")).style.pointerEvents="none")}),1e3*e)}},{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"),document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.opacity=1,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.pointerEvents="all"),this.autoFocusTimer&&clearTimeout(this.autoFocusTimer)}},{key:"hideFooter",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.display="none")}},{key:"showFooter",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.display="block")}},{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"renderFooter",value:function(A,e){var t=this.matchBtn(A),i=document.createElement("div");i.className="theme-icon-item",i.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(t.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(t.id,'-content" title="').concat(t.title,'" style="height:').concat(this.jSPlugin.width>vi?48:32,'px;display: flex;align-items: center;position:relative;">')).concat(t.domString,"</div>")+"</span>",i.onclick=function(A){t.onclick(A)},t.onmouseenter&&(i.onmouseenter=function(A){t.onmouseenter(A)}),t.onmouseleave&&(i.onmouseleave=function(A){t.onmouseleave(A)}),"left"===e?document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[0].appendChild(i):document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[1].appendChild(i)}},{key:"renderHeader",value:function(A,e){var t=this.matchBtn(A),i=document.createElement("div");i.className="theme-icon-item",i.style="max-width:50%;",i.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(t.id,'" style="position:relative;";>')+'<span id="'.concat(this.jSPlugin.id,"-").concat(t.id,'-content" title="').concat(t.title,'" style="display:inline-block;height:').concat(this.width>vi?48:32,'px;">')).concat(t.domString,"</span>")+"</span>",i.onclick=function(A){t.onclick(A)},"left"===e?document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(i):document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[1].appendChild(i)}},{key:"countTime",value:function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='<span class="dot"></span><span class="value">00:00</span>',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",o="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),o=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?o+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))}},{key:"setDisabled",value:function(A){var e=this.decoderState.state,t=e.sound,i=e.expend,n=A?"cursor: not-allowed; color: gray; fill: gray; ":"cursor: default";null!=document.getElementById("".concat(this.jSPlugin.id,t?"-sound-icon":"-nosound-icon"))&&document.getElementById("".concat(this.jSPlugin.id,t?"-sound-icon":"-nosound-icon")).setAttribute("style",A?"cursor: not-allowed; color: gray; fill: gray;":"cursor: default"),null!=document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon"))&&document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon")).setAttribute("style",n),null!=document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon"))&&document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon")).setAttribute("style",n),null!=document.getElementById("".concat(this.jSPlugin.id,"-talk-icon"))&&document.getElementById("".concat(this.jSPlugin.id,"-talk-icon")).setAttribute("style",n),null!=document.getElementById("".concat(this.jSPlugin.id,i?"-unexpend-icon":"-expend-icon"))&&document.getElementById("".concat(this.jSPlugin.id,i?"-unexpend-icon":"-expend-icon")).setAttribute("style",n),this.allowZoom||null!=document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon"))&&document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon")).setAttribute("style",n),document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon"))&&"none"!=document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon")).style.display&&document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon")).setAttribute("style",n);var a=document.getElementsByClassName("".concat(this.jSPlugin.id,"-select-quality-btn"));if(a.length)for(var o=0;o<a.length;o++)A?(a[o].style.cursor="not-allowed",a[o].style.color="gray",a[o].style.fill="gray"):(a[o].style.cursor="default",a[o].style.fill="",a[o].style.color="");null!=document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))&&document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).setAttribute("style",document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).getAttribute("style")+";"+(A?"cursor: not-allowed; color: gray; border-color: gray;":"cursor: default; color: #ffffff;border-color: #ffffff;")),this.zoomDisable=this.jSPlugin.use3DZoom&&A}},{key:"matchBtn",value:function(A){var e=this,t=this.themeData,i=t.header,n=t.footer,a={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}};-1===i.btnList.findIndex((function(e){return e.iconId===A}))?(a.color=n.color,a.backgroundColor=n.backgroundColor,a.activeColor=n.activeColor):(a.color=i.color,a.backgroundColor=i.backgroundColor,a.activeColor=i.activeColor);var o=this.jSPlugin._isCloudRecord&&-1!==this.jSPlugin.url.indexOf("cloud.rec");switch(A){case"play":a.title=this.jSPlugin.i18n.t("BTN_PLAY"),a.id=A,a.domString='<div style="height: 100%">'+'<svg id="'.concat(this.jSPlugin.id+"-play-icon",'" class="theme-icon-item-icon" style="display:none" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" fill="').concat(a.color,'" viewBox="-6 -6 32 32">\n <path d="M10.5,1.7c-4.9,0-8.8,4-8.8,8.8s4,8.8,8.8,8.8s8.8-4,8.8-8.8S15.4,1.7,10.5,1.7z M10.5,2.7\n c4.3,0,7.8,3.5,7.8,7.8s-3.5,7.8-7.8,7.8s-7.8-3.5-7.8-7.8S6.2,2.7,10.5,2.7z"/>\n <path class="st2" d="M8.7,8C9,8,9.3,8.3,9.3,8.6v3.8C9.3,12.7,9,13,8.7,13C8.3,13,8,12.7,8,12.4V8.6C8,8.3,8.3,8,8.7,8z"/>\n <path id="Rectangle-Copy-10" class="st2" d="M12.8,8c0.3,0,0.6,0.3,0.6,0.6v3.8c0,0.3-0.3,0.6-0.6,0.6c-0.3,0-0.6-0.3-0.6-0.6V8.6\n C12.2,8.3,12.5,8,12.8,8z"/>\n </svg>')+'<svg id="'.concat(this.jSPlugin.id+"-stop-icon",'" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M13,9.8L10.1,8C9.9,7.9,9.7,7.9,9.5,7.9c-0.6,0-1,0.4-1,1v3.7c0,0.2,0.1,0.4,0.2,0.5c0.3,0.5,0.9,0.6,1.4,0.3 l2.9-1.8c0.1-0.1,0.2-0.2,0.3-0.3C13.6,10.7,13.4,10.1,13,9.8z" /><path d="M10.5,1.9c-4.9,0-8.8,4-8.8,8.8c0,4.9,4,8.8,8.8,8.8s8.8-4,8.8-8.8C19.4,5.8,15.4,1.9,10.5,1.9z M10.5,18.5 c-4.3,0-7.8-3.5-7.8-7.8s3.5-7.8,7.8-7.8c4.3,0,7.8,3.5,7.8,7.8S14.9,18.5,10.5,18.5z" /></svg></div>',a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.rec,n=A.cloudRec,a=A.recordvideo,o=A.pantile,r=A.expend,s=A.zoom,g=A.talk,c=A.sound,l=Xt.getGlobalState(),I=Xt.getInstance(e.jSPlugin.id);window.recTimer&&Array.isArray(window.recTimer[e.jSPlugin.id])&&(window.recTimer[e.jSPlugin.id].map((function(A){clearInterval(A)})),window.recTimer[e.jSPlugin.id]=[]),t?(i||n?(e.Rec&&e.Rec.unSyncTimeLine(),e.jSPlugin.pause().then((function(){e.setDecoderState({play:!t}),e.setDisabled(t)}))):(e.jSPlugin.stop((function(){}),!0).then((function(){e.setDecoderState({play:!t}),e.setDisabled(t)})),s&&(e.setDecoderState({zoom:!1}),e.jSPlugin.Zoom.stopZoom(),e.jSPlugin.close3DZoom()),g&&(e.setDecoderState({talk:!1}),document.getElementById("".concat(e.jSPlugin.id,"-volume-column"))&&(document.getElementById("".concat(e.jSPlugin.id,"-volume-column")).style.display="none"),e.jSPlugin.Talk.stopTalk(),l.talk&&Xt.setGlobalState({talk:!1}),I.getState().talk&&I.setState({talk:!1}))),a&&e.setDecoderState({recordvideo:!1}),c&&(e.jSPlugin.closeSound(),e.setDecoderState({sound:!1}),I.setState({sound:!0}))):(i||n?(e.Rec&&e.Rec.syncTimeLine(),e.jSPlugin.resume().then((function(){e.setDisabled(t),e.setDecoderState({play:!t,expend:r})}))):e.jSPlugin.play().then((function(){e.setDisabled(t),e.setDecoderState({play:!t,expend:r})})),e.jSPlugin.use3DZoom&&e.resetMobileZoomStatus()),e.jSPlugin.use3DZoom?(e.setDecoderState({zoom:!1}),e.allowZoom=!1):e.allowZoom=i||n,o&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1})),document.getElementById("".concat(e.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.display="none"),e.setDecoderState({speed:!1})};break;case"sound":a.title=this.jSPlugin.i18n.t("BTN_SOUND"),a.id=A,a.domString='<span style="height: 100%">'+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-nosound-icon" style="display:none" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">\n <path d="M8.5,4.2c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8C5,13.2,5,12.9,5.1,12.7 c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3L9.2,5L5.9,7.8 C5.6,7.9,5.3,7.9,5.1,7.7C5,7.5,5,7.3,5.1,7.1L5.2,7L8.5,4.2z"/>\n <path d="M5.5,6.9C5.8,6.9,6,7.1,6,7.4c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2C3.4,7.9,3.3,8,3.2,8.2l0,0.1v4 c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,12.5,6,12.7,6,13c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4 c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n <path d="M17.4,7.9c0.2-0.2,0.5-0.2,0.7,0c0.2,0.2,0.2,0.4,0.1,0.6l-0.1,0.1l-3.8,3.8c-0.2,0.2-0.5,0.2-0.7,0 c-0.2-0.2-0.2-0.4-0.1-0.6l0.1-0.1L17.4,7.9z"/>\n <path d="M13.7,7.9c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.8,3.8c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1-0.1 l-3.7-3.8C13.5,8.4,13.5,8.1,13.7,7.9z"/>\n </svg>')+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-sound-icon" style="display:inline-block" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" fill="').concat(a.color,'" viewBox="-6 -6 32 32">\n <path d="M13.2,7.1c0.1-0.2,0.5-0.3,0.7-0.2c1.1,0.7,1.9,2.2,1.9,3.7c0,1.6-0.7,3-1.9,3.7\n c-0.2,0.1-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7c0.8-0.5,1.4-1.6,1.4-2.9c0-1.3-0.6-2.4-1.4-2.9C13.1,7.6,13,7.3,13.2,7.1z"/>\n <path d="M15.7,4.5c0.2-0.2,0.5-0.2,0.7-0.1C18,5.8,19,8.2,19,10.7c0,2.5-1,4.8-2.7,6.3\n c-0.2,0.2-0.5,0.2-0.7-0.1c-0.2-0.2-0.2-0.5,0.1-0.7c1.4-1.2,2.3-3.3,2.3-5.5c0-2.2-0.9-4.3-2.3-5.5C15.5,5,15.5,4.7,15.7,4.5z"/>\n <path d="M8.5,4.7c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8\n C5,13.7,5,13.4,5.1,13.2c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3l-0.1,0\n L5.9,8.3C5.6,8.4,5.3,8.4,5.1,8.2C5,8,5,7.7,5.1,7.6l0.1-0.1L8.5,4.7z"/>\n <path d="M5.5,7.4C5.8,7.4,6,7.6,6,7.9c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.2,0-0.3,0.1-0.3,0.3l0,0.1v4\n c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,13,6,13.2,6,13.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4\n c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n </svg>')+"</span>",a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.sound,n=A.talk,a=A.pantile;t&&!n&&(i?(e.jSPlugin.closeSound(),e.setDecoderState({sound:!1})):e.jSPlugin.openSound(),a&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1})))};break;case"recordvideo":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_RECORDVIDEO"),a.id=A,a.domString='<svg id="'.concat(this.jSPlugin.id,'-recordvideo-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M11.6,5.3H4.7c-1.4,0-2.5,1.1-2.5,2.5v5.9c0,1.4,1.1,2.5,2.5,2.5h6.9c1.4,0,2.5-1.1,2.5-2.5V7.7 C14.1,6.4,13,5.3,11.6,5.3z M4.7,6.3h6.9c0.8,0,1.5,0.7,1.5,1.5v5.9c0,0.8-0.7,1.5-1.5,1.5H4.7c-0.8,0-1.5-0.7-1.5-1.5V7.7 C3.3,6.9,3.9,6.3,4.7,6.3z" /><path d="M16.6,6.7c0.9-0.8,2.3-0.1,2.4,1l0,0.1v5.7c0,1.2-1.3,1.9-2.3,1.2l-0.1-0.1L13.3,12 c-0.2-0.2-0.2-0.5-0.1-0.7c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.7c0.3,0.2,0.7,0.1,0.8-0.3l0-0.1V7.8c0-0.4-0.4-0.6-0.7-0.4 l-0.1,0l-3.3,2.7c-0.2,0.2-0.5,0.1-0.7-0.1c-0.2-0.2-0.1-0.5,0-0.6l0.1-0.1L16.6,6.7z" /></svg>',a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.recordvideo;t&&(i?(e.jSPlugin.stopSave(),e.setDecoderState({recordvideo:!1})):(e.jSPlugin.startSave("".concat((new Date).getTime())),e.setDecoderState({recordvideo:!0})))};break;case"capturePicture":a.title=this.jSPlugin.i18n.t("BTN_CAPTURE"),a.id=A,a.domString='<svg id="'.concat(this.jSPlugin.id,'-capturePicture-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.8,7.7c-2,0-3.7,1.6-3.7,3.7S8.7,15,10.8,15c2,0,3.7-1.6,3.7-3.7S12.8,7.7,10.8,7.7z M10.8,8.7c1.5,0,2.7,1.2,2.7,2.7S12.2,14,10.8,14c-1.5,0-2.7-1.2-2.7-2.7S9.3,8.7,10.8,8.7z" /><path d="M8.6,3.7l-0.1,0C8,3.7,7.7,4,7.5,4.3l-1,1.7l-1.3,0C4,6.1,3.1,7,3.1,8.2v7.1 c0,1.2,0.9,2.1,2.1,2.1h11.1c1.2,0,2.1-0.9,2.1-2.1V8.2l0-0.1c-0.1-1.1-1-1.9-2.1-1.9l-1.3,0l-1.1-1.8c-0.2-0.4-0.7-0.6-1.1-0.6H8.6 z M8.6,4.7h4.2c0.1,0,0.2,0.1,0.3,0.1l1.2,2c0.1,0.2,0.3,0.2,0.4,0.2h1.6c0.6,0,1.1,0.5,1.1,1.1v7.1c0,0.6-0.5,1.1-1.1,1.1H5.1 c-0.6,0-1.1-0.5-1.1-1.1V8.2c0-0.6,0.5-1.1,1.1-1.1h1.6c0.2,0,0.3-0.1,0.4-0.2l1.2-2C8.4,4.7,8.5,4.7,8.6,4.7z" /></svg>',a.onclick=function(){e.decoderState.state.play?e.jSPlugin.capturePicture("".concat((new Date).getTime()),(function(){}),e.jSPlugin.download):console.log("视频未播放,无法截图")};break;case"talk":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_TALK"),a.id=A,a.domString='<div style="height: '.concat(this.jSPlugin.width>vi?15:10,"px; width: ").concat(this.jSPlugin.width>vi?8:5,"px; position: absolute; left: ").concat(this.jSPlugin.width>vi?20:13,"px; top: ").concat(this.jSPlugin.width>vi?14:9,'px; border-radius: 50%; overflow:hidden;">')+'<div id="'.concat(this.jSPlugin.id,'-volume-column" style="height: 0; width: 100%; position: absolute; background: #00cc66; left: 0; bottom: 0; display: none;"></div>')+"</div>"+'<svg id="'.concat(this.jSPlugin.id,'-talk-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.1,2.7C8.5,2.7,7.2,4,7.2,5.6v5.2c0,1.6,1.3,2.9,2.9,2.9l0.2,0c1.5-0.1,2.7-1.4,2.7-2.9V5.6\tC13,4,11.7,2.7,10.1,2.7z M10.1,3.7c1.1,0,1.9,0.9,1.9,1.9v5.2c0,1-0.8,1.8-1.8,1.9l-0.1,0c-1,0-1.9-0.9-1.9-1.9V5.6 C8.2,4.5,9,3.7,10.1,3.7z" /><path d="M15.1,8.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,3-2.5,5.5-5.5,5.5c-3,0-5.4-2.3-5.5-5.3l0-0.2V9 c0-0.3,0.2-0.5,0.5-0.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,2.5,2,4.5,4.5,4.5c2.4,0,4.4-1.9,4.5-4.3l0-0.2V9 C14.6,8.7,14.8,8.5,15.1,8.5z" /><path d="M13.5,17.7c0.3,0,0.5,0.2,0.5,0.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-7c-0.3,0-0.5-0.2-0.5-0.5 c0-0.2,0.2-0.4,0.4-0.5l0.1,0H13.5z" /><path d="M10.1,15.2c0.2,0,0.4,0.2,0.5,0.4l0,0.1v2.5c0,0.3-0.2,0.5-0.5,0.5c-0.2,0-0.4-0.2-0.5-0.4l0-0.1 v-2.5C9.6,15.4,9.8,15.2,10.1,15.2z" /></svg>',this.jSPlugin.eventEmitter.on("volumeChange",(function(A){var t=A.data;document.getElementById("".concat(e.jSPlugin.id,"-volume-column"))&&(document.getElementById("".concat(e.jSPlugin.id,"-volume-column")).style.height="".concat(100*t,"%"))})),a.onclick=function(){var A=e.decoderState.state,t=A.talk,i=A.sound,n=A.play,a=Xt.getGlobalState(),o=Xt.getInstance(e.jSPlugin.id);if(n)if(t){e.setDecoderState({talk:!1}),document.getElementById("".concat(e.jSPlugin.id,"-volume-column"))&&(document.getElementById("".concat(e.jSPlugin.id,"-volume-column")).style.display="none"),e.jSPlugin.Talk.stopTalk();var r=bt(e.themeData.footer.btnList,(function(A){return"sound"===A.iconId&&1===A.isrender&&1===A.defaultActive}))>-1;e.themeData&&r&&e.jSPlugin.openSound(),a.talk&&Xt.setGlobalState({talk:!1}),o.getState().talk&&o.setState({talk:!1})}else{if(a.talk)return console.warn("当前已经有设备正在对讲"),void(e.jSPlugin.eventEmitter&&e.jSPlugin.eventEmitter.emit("startTalk",{eventType:"startTalk",code:430005,target:e,msg:"当前已经有设备正在对讲"}));e.setDecoderState({talk:!0}),document.getElementById("".concat(e.jSPlugin.id,"-volume-column")).style.display="block",e.jSPlugin.Talk.startTalk((function(A){i&&!A&&(e.jSPlugin.closeSound(),e.setDecoderState({sound:!1})),Xt.setGlobalState({talk:!0}),o.setState({talk:!0})}))}};break;case"zoom":if(o)break;a.title=this.jSPlugin.use3DZoom?this.jSPlugin.i18n.t("BTN_3D_ZOOM"):this.jSPlugin.i18n.t("BTN_ZOOM"),a.id=A,a.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-zoom-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="5 -6 5 32" style="enable-background:new 0 0 20 20.1;" xml:space="preserve">\n <path class="st1" d="M8.8,2.6c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2s-6.2-2.8-6.2-6.2S5.3,2.6,8.8,2.6z M8.8,3.9\n c-2.8,0-5,2.2-5,5s2.2,5,5,5s5-2.2,5-5S11.5,3.9,8.8,3.9z M12.7,12.7l3.9,3.9"/>\n <path class="st2" d="M11.2,9.5h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S11.6,9.5,11.2,9.5z"/>\n <path class="st2" d="M8.7,12c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C9.3,11.8,9.1,12,8.7,12z"/>\n <path class="st2" d="M16.9,17.6c-0.1,0-0.3-0.1-0.4-0.2l-3.9-3.9c-0.2-0.2-0.2-0.6,0-0.8s0.6-0.2,0.8,0l3.9,3.9\n c0.2,0.2,0.2,0.6,0,0.8C17.2,17.5,17,17.6,16.9,17.6z"/>\n </svg>'),a.onclick=function(){var A=e.decoderState.state,t=A.zoom,i=A.play,n=A.rec,a=A.cloudRec;if(e.jSPlugin.use3DZoom){if(!i)return!1;t?e.jSPlugin.close3DZoom():e.jSPlugin.enable3DZoom()}else{if(e.zoomDisable||!n&&!a&&!i)return!1;t?e.jSPlugin.Zoom.stopZoom():e.jSPlugin.Zoom.startZoom()}e.setDecoderState({zoom:!t})};break;case"pantile":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_PTZ"),a.id=A,a.domString='<svg id="'.concat(this.jSPlugin.id,'-pantile-icon" style="').concat(this.isMobile?this.decoderState.state.expend?"display:block;":"display:none;":"display:block;",'" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.2,7.8c1.6,0,2.9,1.3,2.9,2.9s-1.3,2.9-2.9,2.9s-2.9-1.3-2.9-2.9S8.5,7.8,10.2,7.8z M10.2,8.8c-1.1,0-1.9,0.9-1.9,1.9s0.9,1.9,1.9,1.9s1.9-0.9,1.9-1.9S11.2,8.8,10.2,8.8z" /><path d="M8.8,3.5c0.7-0.6,1.8-0.6,2.5-0.1l0.1,0.1l1.4,1.1c0.2,0.2,0.3,0.5,0.1,0.7 c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1,0l-1.4-1.1C10.5,3.9,10,3.9,9.6,4.2L9.4,4.3L8,5.4C7.8,5.5,7.5,5.5,7.3,5.3c-0.2-0.2-0.1-0.5,0-0.6 l0.1-0.1L8.8,3.5z" /><path d="M2.5,12.3c-0.6-0.7-0.6-1.8-0.1-2.5l0.1-0.1l1.1-1.4c0.2-0.2,0.5-0.3,0.7-0.1 c0.2,0.2,0.2,0.4,0.1,0.6l0,0.1l-1.1,1.4C3,10.6,3,11.1,3.2,11.5l0.1,0.1L4.4,13c0.2,0.2,0.1,0.5-0.1,0.7c-0.2,0.2-0.5,0.1-0.6,0 l-0.1-0.1L2.5,12.3z" /><path d="M17.7,12.3c0.6-0.7,0.6-1.8,0.1-2.5l-0.1-0.1l-1.1-1.4c-0.2-0.2-0.5-0.3-0.7-0.1 c-0.2,0.2-0.2,0.4-0.1,0.6l0,0.1l1.1,1.4c0.3,0.4,0.3,0.9,0.1,1.3l-0.1,0.1L15.8,13c-0.2,0.2-0.1,0.5,0.1,0.7c0.2,0.2,0.5,0.1,0.6,0 l0.1-0.1L17.7,12.3z" /><path d="M8.8,18.2c0.7,0.6,1.8,0.6,2.5,0.1l0.1-0.1l1.4-1.1c0.2-0.2,0.3-0.5,0.1-0.7 c-0.2-0.2-0.4-0.2-0.6-0.1l-0.1,0l-1.4,1.1c-0.4,0.3-0.9,0.3-1.3,0.1l-0.1-0.1L8,16.3c-0.2-0.2-0.5-0.1-0.7,0.1 c-0.2,0.2-0.1,0.5,0,0.6l0.1,0.1L8.8,18.2z" /></svg>',a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.pantile,n=A.expend;if(t)if(i)e.Ptz.hide(),e.setDecoderState({pantile:!1});else{if(e.isMobile&&!n)return console.log("移动端,非全屏状态不展示云台"),!1;e.Ptz.show(),e.setDecoderState({pantile:!0})}};break;case"expend":a.title=this.jSPlugin.i18n.t("BTN_EXPEND"),a.id=A,a.domString='<span><svg id="'.concat(this.jSPlugin.id,'-expend-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M3.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,4.1,6.9,4.1H5.2 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.9,7.4,3.7,7.6,3.4,7.6z" /><path d="M6.9,18.1H5.2c-1.2,0-2.2-1-2.2-2.2v-1.8c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8c0,0.7,0.6,1.2,1.2,1.2 h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,18.1,6.9,18.1z" /><path d="M15.7,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.9,17.1,16.9,18.1,15.7,18.1z" /><path d="M17.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-0.7-0.6-1.3-1.2-1.3h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8 c1.2,0,2.2,1,2.2,2.3v1.8C17.9,7.4,17.7,7.6,17.4,7.6z" /></svg>'+'<svg id="'.concat(this.jSPlugin.id,'-unexpend-icon" class="theme-icon-item-icon" style="display:none" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" fill="').concat(a.color,'" viewBox="-6 -6 32 32">\n <path class="st1" d="M5.7,8.1H3.9c-0.3,0-0.6-0.2-0.6-0.6S3.6,7,3.9,7h1.9c0.7,0,1.3-0.6,1.3-1.3V3.8c0-0.3,0.2-0.6,0.6-0.6\n s0.6,0.2,0.6,0.6v1.9C8.2,7,7.1,8.1,5.7,8.1z"/>\n <path class="st1" d="M7.6,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-0.7-0.6-1.3-1.3-1.3H3.9c-0.3,0-0.6-0.2-0.6-0.6s0.2-0.6,0.6-0.6h1.9\n c1.3,0,2.4,1.1,2.4,2.4v1.9C8.2,17.5,7.9,17.7,7.6,17.7z"/>\n <path class="st1" d="M13.4,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.6,0.2,0.6,0.6S17.5,14,17.2,14\n h-1.9c-0.7,0-1.3,0.6-1.3,1.3v1.9C14,17.5,13.8,17.7,13.4,17.7z"/>\n <path class="st1" d="M17.2,8.1h-1.9c-1.3,0-2.4-1.1-2.4-2.4V3.8c0-0.3,0.2-0.6,0.6-0.6S14,3.5,14,3.8v1.9C14,6.4,14.6,7,15.3,7h1.9\n c0.3,0,0.6,0.2,0.6,0.6S17.5,8.1,17.2,8.1z"/>\n </svg>\n </span>'),a.onclick=function(){var A=e.decoderState.state,t=A.expend,i=A.pantile;if(A.play)if(t)if(e.isMobile){var n=e._extendHeadeTimeLinrHight(!0);document.getElementById("".concat(e.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(e.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-32px"),document.getElementById("".concat(e.jSPlugin.id,"-select-speed"))&&(document.getElementById("".concat(e.jSPlugin.id,"-select-speed")).style.background="#ffffff"),function(A,e,t){var i="";i+="width:"+e+"px;",i+="height:"+t+"px;",i+="-webkit-transform: none; transform: none;",i+="-webkit-transform-origin: 0 0;",i+="transform-origin: 0 0;",i+="position: relative;",A.style.cssText=i}(document.getElementById("".concat(e.jSPlugin.id,"-wrap")),e.jSPlugin.width,e.jSPlugin.height),console.log("[mobile cancelMobileFullScreen]"),document.getElementById("".concat(e.jSPlugin.id,"-wrap")).classList.remove("ezuikit-player-wrap-mobile-fullscreen"),e.jSPlugin.jSPlugin.JS_Resize(e.jSPlugin.width,e.jSPlugin.height-n),i&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1})),e.jSPlugin.fullScreenWidth=e.jSPlugin.width,e.jSPlugin.fullScreenHeight=e.jSPlugin.height,e.jSPlugin.Zoom&&e.jSPlugin.Zoom.handleFullscreen&&e.jSPlugin.Zoom.handleFullscreen(!t,e.jSPlugin.width,e.jSPlugin.height),document.getElementById("".concat(e.jSPlugin.id,"-pantile-icon"))&&(document.getElementById("".concat(e.jSPlugin.id,"-pantile-icon")).style.display="none"),document.getElementById("".concat(e.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.bottom="calc(constant(safe-area-inset-bottom) + 100px)",document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.bottom="calc(env(safe-area-inset-bottom) + 100px)",document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.height=45*e.jSPlugin.videoLevelList.length+"px"),e.setDecoderState({expend:!1})}else e.jSPlugin.exitFullscreen();else if(e.isMobile){var a=e._extendHeadeTimeLinrHight(!0);y(document.getElementById("".concat(e.jSPlugin.id,"-wrap"))),document.getElementById("".concat(e.jSPlugin.id,"-wrap")).classList.add("ezuikit-player-wrap-mobile-fullscreen"),console.log("[mobile requestMobileFullScreen]");var o=document.documentElement.clientWidth,r=document.documentElement.clientHeight;document.getElementById("".concat(e.jSPlugin.id))&&(document.getElementById("".concat(e.jSPlugin.id)).style["backface-visibility"]="hidden"),document.getElementById("".concat(e.jSPlugin.id,"-select-speed"))&&(document.getElementById("".concat(e.jSPlugin.id,"-select-speed")).style.background="none"),e.jSPlugin.jSPlugin.JS_Resize(r,o-a,!0),e.jSPlugin.fullScreenWidth=r,e.jSPlugin.fullScreenHeight=o-a,e.jSPlugin.Zoom&&e.jSPlugin.Zoom.handleFullscreen&&e.jSPlugin.Zoom.handleFullscreen(!t,r,o-a),document.getElementById("".concat(e.jSPlugin.id,"-pantile-icon"))&&(document.getElementById("".concat(e.jSPlugin.id,"-pantile-icon")).style.display="block"),document.getElementById("".concat(e.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.bottom=0,document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.height="100%"),e.setDecoderState({expend:!0})}else e.jSPlugin.fullscreen()};break;case"webExpend":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_WEBEXPEND"),a.id=A,a.domString='<span><svg id="'.concat(this.jSPlugin.id,'-webExpend-icon" class="theme-icon-item-icon" fill="').concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M3.1,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S6.8,4.1,6.6,4.1H4.8 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.6,7.4,3.3,7.6,3.1,7.6z" /><path d="M15.3,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.6,17.1,16.6,18.1,15.3,18.1z" /><circle class="st2" cx="10.2" cy="10.4" r="1.1"/></svg>'+'<svg class="theme-icon-item-icon" fill="'.concat(a.color,'" style="display:none;" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-6 -6 32 32">\n <path class="st1" d="M5.4,8.1H3.5C3.2,8.1,3,7.9,3,7.6s0.2-0.5,0.5-0.5h1.9c0.8,0,1.4-0.6,1.4-1.4V3.8c0-0.3,0.2-0.5,0.5-0.5\n s0.5,0.2,0.5,0.5v1.9C7.7,7,6.7,8.1,5.4,8.1z"/>\n <path class="st1" d="M13.1,17.7c-0.3,0-0.5-0.2-0.5-0.5v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5H15\n c-0.8,0-1.4,0.6-1.4,1.4v1.9C13.6,17.4,13.4,17.7,13.1,17.7z"/>\n <circle class="st2" cx="10.2" cy="10.4" r="1.1"/>\n ')+"</svg></span>",a.onclick=function(){var A=e.decoderState.state,t=A.webExpend;if(A.expend)return console.log("正在全局全屏"),!1;window.recTimer&&Array.isArray(window.recTimer[e.jSPlugin.id])&&(window.recTimer[e.jSPlugin.id].map((function(A){clearInterval(A)})),window.recTimer[e.jSPlugin.id]=[]),t?e.jSPlugin.exitBrowserFullscreen():e.jSPlugin.browserFullscreen(),e.jSPlugin.Theme.Rec&&setTimeout((function(){e.jSPlugin.Theme.Rec.recAutoSize()}),100)};break;case"hd":if(o)break;var r="".concat(this.jSPlugin.id,"-select-quality"),s="".concat(r,"-item");a.title=this.jSPlugin.i18n.t("BTN_HD"),a.id=A;var g="",c="";return this.jSPlugin.videoLevelList.findIndex((function(A){return A.level==e.jSPlugin.videoLevel}))>-1?this.jSPlugin.videoLevelList.map((function(A){g+='<li class="selectOption default '.concat(s,'" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;" name="option" data-type="').concat(A.level,'" id="').concat(r,"_").concat(A.level,'">').concat(e.jSPlugin.i18n.t(_i[A.level]),"</li>"),A.level==e.jSPlugin.videoLevel&&(c+=e._videoLevelIcon(e.jSPlugin.id,r,e.jSPlugin.width,vi,A))})):this.jSPlugin.videoLevelList.map((function(A,t){0===t&&(c+=e._videoLevelIcon(e.jSPlugin.id,r,e.jSPlugin.width,vi,A)),g+='<li class="selectOption default '.concat(s,'" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;" name="option" data-type="').concat(A.level,'" id="').concat(r,"_").concat(A.level,'">').concat(e.jSPlugin.i18n.t(_i[A.level]),"</li>")})),g+='<li class="selectOption cancel" style="background: #ffffff;'.concat(this.isMobile?"":"display:none;",'" name="option" id="').concat(this.jSPlugin.id,'-select-speed">').concat(this.jSPlugin.i18n.t("SPEED_CANCEL"),"</li>"),c+='<span class=\'speed-select-mask\' style="display:none;height: 100vh;" id="'.concat(this.jSPlugin.id,'-select-hd-mask"></span>'),a.domString='<ul id="'.concat(this.jSPlugin.id,'-hdSelect" class="hd speed-select ').concat(this.isMobile?"mobile":"",'" style="display:none;bottom: calc(constant(safe-area-inset-bottom) + ').concat(this.isMobile?"100px":"50px",") !important;bottom: calc(env(safe-area-inset-bottom) + ").concat(this.isMobile?"100px":"50px",") !important;height: ").concat(45*this.jSPlugin.videoLevelList.length,'px">\n ').concat(g,'\n </ul>\n <span id="').concat(this.jSPlugin.id,'-hdSelect-icon-warp" style="user-select: none;">\n ').concat(c,"\n </span>"),a.onclick=function(A){var t=e.decoderState.state,i=t.expend,n=t.recordvideo,a=t.play,o=t.zoom,s=t.pantile,g=t.sound,c=t.talk;if(A.stopPropagation(),a){var l=A.target.id,I=A.target.getAttribute("data-type");if(0===l.indexOf(r)){if(e.jSPlugin.videoLevel+""!==I){if(c){var C=Xt.getGlobalState(),d=Xt.getInstance(e.jSPlugin.id);e.setDecoderState({talk:!1}),document.getElementById("".concat(e.jSPlugin.id,"-volume-column"))&&(document.getElementById("".concat(e.jSPlugin.id,"-volume-column")).style.display="none"),e.jSPlugin.Talk.stopTalk(),C.talk&&Xt.setGlobalState({talk:!1}),d.getState().talk&&d.setState({talk:!1})}var h=e.jSPlugin.videoLevelList.find((function(A){return A.level+""===I}));!h||h.streamTypeIn===e.jSPlugin.streamTypeIn&&h.level+""==e.jSPlugin.videoLevel+""||(e.jSPlugin.changeVideoLevel(h).then((function(A){g&&e.jSPlugin.openSound()})),o&&(e.jSPlugin.Zoom.stopZoom(),e.setDecoderState({zoom:!1})))}e.resetMobileZoomStatus(),n&&e.setDecoderState({recordvideo:!1})}e.showHD=!e.showHD,document.getElementById("".concat(e.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.display="none"===document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.display?"block":"none",e.isMobile&&(document.getElementById("".concat(e.jSPlugin.id,"-select-hd-mask")).style.display="none"===document.getElementById("".concat(e.jSPlugin.id,"-select-hd-mask")).style.display?"block":"none"),e.themeData.autoFocus>0&&("none"===document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).style.display?e.startAutoFocus():e.stopAutoFocus())),e.isMobile&&i&&e.showHD?document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).className="hd speed-select mobile expend":document.getElementById("".concat(e.jSPlugin.id,"-hdSelect")).className=e.isMobile?"hd speed-select mobile":"speed-select",s&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1}))}},a;case"speed":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_SPEED"),a.id=A,a.domString='<ul id="'.concat(this.jSPlugin.id,'-speedSelect" class="speed speed-select ').concat(this.isMobile?"mobile":"",'" style="display:none;bottom: calc(constant(safe-area-inset-bottom) + ').concat(this.isMobile?"100px":"50px",") !important;bottom: calc(env(safe-area-inset-bottom) + ").concat(this.isMobile?"100px":"50px",') !important;">')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed4">4').concat(this.jSPlugin.i18n.t("SPEED_RATE"),"</li>")+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed2">2').concat(this.jSPlugin.i18n.t("SPEED_RATE"),"</li>")+'<li class="selectOption active" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed1">1').concat(this.jSPlugin.i18n.t("SPEED_RATE"),"</li>")+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed05">0.5').concat(this.jSPlugin.i18n.t("SPEED_RATE"),"</li>")+'<li class="selectOption cancel" style="'.concat(this.isMobile?"":"display:none;",'" name="option" id="').concat(this.jSPlugin.id,'-select-speed">').concat(this.jSPlugin.i18n.t("SPEED_CANCEL"),"</li>")+"</ul>"+'<span>\n <div style="font-size: 12px;\n vertical-align: bottom;\n display: inline-flex;\n padding: 0px 7px;\n width: 48px;\n line-height: 24px;\n justify-content: center;\n border: 1px solid '.concat(a.color,';\n text-align: center;border-radius: 12.5px; user-select: none;"\n id="').concat(this.jSPlugin.id,'-speed-text"\n >').concat(1===this.nextRate?this.jSPlugin.i18n.t("SPEED"):"".concat(this.nextRate).concat(this.jSPlugin.i18n.t("SPEED_RATE")).replace("3","0.5"),"</div>\n ")+'<span class=\'speed-select-mask\' style="display:none;height: 100vh;" id="'.concat(this.jSPlugin.id,'-select-mask"></span>')+"</span>",a.onclick=function(A){var t=e.decoderState.state,i=t.speed,n=t.expend,a=t.play;if(A.stopPropagation(),!a)return!1;if(!i&&e.isMobile&&(document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).className=n?"speed speed-select mobile expend":"speed speed-select mobile"),e.isMobile&&(n?(document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.bottom="constant(safe-area-inset-bottom)",document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.bottom="env(safe-area-inset-bottom)"):(document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.bottom="calc(constant(safe-area-inset-bottom) + 100px)",document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.bottom="calc(env(safe-area-inset-bottom) + 100px)")),e.nextRate=1,A.target.id)switch(A.target.id){case"".concat(e.jSPlugin.id,"-select-speed1"):e.nextRate=1,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(1),e.jSPlugin.speed=1,e.setDecoderState({speed:!i});break;case"".concat(e.jSPlugin.id,"-select-speed2"):e.nextRate=2,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(2),e.jSPlugin.speed=2,e.setDecoderState({speed:!i});break;case"".concat(e.jSPlugin.id,"-select-speed4"):e.nextRate=4,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(4),e.jSPlugin.speed=4,e.setDecoderState({speed:!i});break;case"".concat(e.jSPlugin.id,"-select-speed05"):e.nextRate=3,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(.5),e.jSPlugin.speed=.5,e.setDecoderState({speed:!i});break;default:e.isMobile?e.setDecoderState({speed:!i}):e.setDecoderState({speed:!0})}e.isMobile&&A.target.id==="".concat(e.jSPlugin.id,"-speed-text")?document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.display="block":document.getElementById("".concat(e.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.display="none"===document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.display?"block":"none"),e.setDecoderState({speed:!i}),e.themeData.autoFocus>0&&("none"===document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).style.display?e.startAutoFocus():e.stopAutoFocus())};break;case"deviceName":a.title=this.jSPlugin.i18n.t("DEVICE_NAME"),a.id=A,a.domString="<span>".concat(this.jSPlugin.i18n.t("DEVICE_NAME"),"</span>"),a.onclick=function(){};break;case"deviceID":a.title=this.jSPlugin.i18n.t("DEVICE_ID"),a.id=A,a.domString="<span>".concat(this.jSPlugin.i18n.t("DEVICE_ID"),"</span>"),a.onclick=function(){};break;case"cloudRec":if(this.jSPlugin._isCloudRecord)break;a.title=this.jSPlugin.i18n.t("BTN_CLOUDREC"),a.id=A,a.domString='\n <span>\n <svg class="theme-icon-item-icon" fill="'.concat(a.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="-10 0 40 15">\n\t<path d="M9.5,13.1c-0.3,0-0.5-0.2-0.5-0.5V8.8c0-0.3,0.2-0.5,0.5-0.5S10,8.5,10,8.8v3.8C10,12.8,9.8,13.1,9.5,13.1z"/>\n\t<path d="M7.6,10.6c-0.1,0-0.3-0.1-0.4-0.2C7,10.2,7,9.9,7.3,9.7l1.9-1.7c0.2-0.2,0.5-0.2,0.7,0l1.8,1.7\n\t\tc0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.5,0.2-0.7,0L9.5,9.1l-1.6,1.4C7.8,10.6,7.7,10.6,7.6,10.6z"/>\n\t<path d="M13.2,15.7H5.6c-2.1-0.1-3.8-1.8-3.8-3.9c0-1.8,1.3-3.4,3-3.8c0.4-2.2,2.3-3.9,4.6-3.9c2.3,0,4.2,1.7,4.6,3.8\n\t\tc1.8,0.4,3.1,1.9,3.1,3.8C17.1,13.9,15.4,15.7,13.2,15.7z M5.6,14.7h7.6c1.6,0,2.9-1.3,2.9-2.9c0-1.5-1.1-2.7-2.6-2.9l-0.4,0l0-0.4\n\t\tc-0.2-1.9-1.7-3.3-3.6-3.3C7.5,5.1,6,6.6,5.8,8.5l0,0.4l-0.4,0c-1.4,0.2-2.5,1.4-2.5,2.9C2.8,13.3,4.1,14.6,5.6,14.7z"/>\n </svg>\n </span>\n '),a.onclick=function(){var A=e.decoderState.state.sound;e.setDecoderState({type:"cloud.rec",cloudRec:!0,rec:!1}),e.jSPlugin.eventEmitter.emit("recTypeChange",{eventType:"recTypeChange",code:0,data:{type:"cloud"}}),e.jSPlugin.changePlayUrl({type:"cloud.rec"},(function(){var A=p("begin",e.jSPlugin.url)||(new Date).Format("yyyyMMdd");e.Rec.renderRec("".concat(A.slice(0,4),"-").concat(A.slice(4,6),"-").concat(A.slice(6,8))),e.decoderState.state.zoom&&(e.setDecoderState({zoom:!1}),e.jSPlugin.Zoom.stopZoom(),e.jSPlugin.close3DZoom()),e.Rec&&e.Rec.syncTimeLine()}),!1).then((function(){A&&e.jSPlugin.openSound()}))};break;case"cloudRecord":if(!this.jSPlugin._isCloudRecord)break;a.title=this.jSPlugin.i18n.t("BTN_CLOUDRECORD"),a.id=A,a.domString='<span style="font-size: 24px; width: 48px; display: inline-block; text-align: center;line-height: 56px;"> \n<svg class="theme-icon-item-icon" fill="'.concat(a.color,'" version="1.1" height="1em" viewBox="0 0 48 49">\n<g transform="translate(3.000000, 10.000000)">\n\t<g><path d="M38.1,24.2c-0.8,0-1.6-0.2-2.3-0.6L31,20.9l1.5-2.6l4.8,2.7c0.3,0.1,0.5,0.2,0.8,0.2c1,0,1.8-0.8,1.8-1.8V9.6\n\t\t\tc0-0.3-0.1-0.5-0.2-0.8c-0.2-0.4-0.6-0.8-1-0.9c-0.4-0.2-0.9-0.1-1.3,0.1l-5,2.4l-1.3-2.7l5-2.4c1.1-0.5,2.4-0.6,3.6-0.2\n\t\t\tc1.2,0.4,2.2,1.3,2.7,2.5c0.3,0.6,0.4,1.3,0.4,2v9.8C42.8,22,40.7,24.2,38.1,24.2z"/>\n\t</g>\n\t<g><path d="M27.7,30H4.9c-3.5,0-6.4-2.9-6.4-6.4V5.4C-1.5,1.9,1.4-1,4.9-1h22.8c3.5,0,6.4,2.9,6.4,6.4v18.1\n\t\t\tC34.1,27.1,31.2,30,27.7,30z M4.9,2C3,2,1.5,3.5,1.5,5.4v18.1C1.5,25.5,3,27,4.9,27h22.8c1.9,0,3.4-1.5,3.4-3.4V5.4\n\t\t\tc0-1.9-1.5-3.4-3.4-3.4H4.9z"/>\n\t</g><g><path d="M12.1,7.1c0.9,0,1.6,0.7,1.6,1.5c0,0.8-0.6,1.4-1.4,1.5l-0.2,0H8.9c-0.9,0-1.6-0.7-1.6-1.5\n\t\t\tc0-0.8,0.6-1.4,1.4-1.5l0.2,0H12.1z"/></g></g></svg></span>'),a.onclick=function(){var A=e.decoderState.state.sound;e.setDecoderState({type:"cloud.rec",cloudRec:!0,rec:!1}),e.jSPlugin.eventEmitter.emit("recTypeChange",{eventType:"recTypeChange",code:0,data:{type:"cloudRecord"}}),e.jSPlugin.url.replace(/rec\??|cloud.rec\??/,"cloud.rec?busType=7"),e.jSPlugin.changePlayUrl({type:"cloud.rec"},(function(){e.jSPlugin._isCloudRecord&&e.changeTheme("pcRec");var A=p("begin",e.jSPlugin.url)||(new Date).Format("yyyyMMdd");e.Rec.renderRec("".concat(A.slice(0,4),"-").concat(A.slice(4,6),"-").concat(A.slice(6,8))),e.decoderState.state.zoom&&(e.setDecoderState({zoom:!1}),e.jSPlugin.Zoom.stopZoom(),e.jSPlugin.close3DZoom()),e.Rec&&e.Rec.syncTimeLine()}),!1).then((function(){A&&e.jSPlugin.openSound()}))};break;case"rec":a.title=this.jSPlugin.i18n.t("BTN_REC"),a.id=A,a.domString='\n <span>\n <svg class="theme-icon-item-icon" fill='.concat(a.color,' version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>vi?48:32,'" height="').concat(this.jSPlugin.width>vi?48:32,'" viewBox="0 0 40 15">\n <path d="M13,16.3H5.5c-1.1,0-2-0.9-2-2V3.8c0-1.1,0.9-2,2-2h5.4c0.5,0,1,0.2,1.4,0.6l2.1,2.1C14.8,4.8,15,5.3,15,5.9\n v8.4C15,15.4,14.1,16.3,13,16.3z M5.5,2.8c-0.6,0-1,0.4-1,1v10.5c0,0.6,0.4,1,1,1H13c0.6,0,1-0.4,1-1V5.9c0-0.3-0.1-0.5-0.3-0.7\n L11.6,3c-0.2-0.2-0.4-0.3-0.7-0.3H5.5z"/>\n<path d="M6.3,7.3C6,7.3,5.8,7,5.8,6.8V4.5C5.8,4.2,6,4,6.3,4s0.5,0.2,0.5,0.5v2.2C6.8,7,6.6,7.3,6.3,7.3z"/>\n<path d="M8.5,7.3C8.3,7.3,8,7,8,6.8V4.5C8,4.2,8.3,4,8.5,4S9,4.2,9,4.5v2.2C9,7,8.8,7.3,8.5,7.3z"/>\n<path d="M10.8,7.3c-0.3,0-0.5-0.2-0.5-0.5V4.5c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v2.2C11.3,7,11.1,7.3,10.8,7.3z"\n />\n </svg>\n </span>\n '),a.onclick=function(){var A=e.decoderState.state.sound;e.setDecoderState({type:"rec",cloudRec:!1,rec:!0}),e.jSPlugin.eventEmitter.emit("recTypeChange",{eventType:"recTypeChange",code:0,data:{type:"local"}}),e.jSPlugin.changePlayUrl({type:"rec"},(function(){e.jSPlugin._isCloudRecord&&e.changeTheme("pcRec");var A=p("begin",e.jSPlugin.url)||(new Date).Format("yyyyMMdd");e.Rec.renderRec("".concat(A.slice(0,4),"-").concat(A.slice(4,6),"-").concat(A.slice(6,8))),e.decoderState.state.zoom&&(e.setDecoderState({zoom:!1}),e.jSPlugin.Zoom.stopZoom(),e.jSPlugin.close3DZoom()),e.Rec&&e.Rec.syncTimeLine()}),!1).then((function(){A&&e.jSPlugin.openSound()}))}}return a}},{key:"_videoLevelIcon",value:function(A,e,t,i,n){return'\n <span id="'.concat(A,'-videoLevel-icon" class="theme-icon-item-icon ').concat(e,"-btn\" data-type='").concat(n.level,"' style=\"display: inline-block;min-width: 48px;height: ").concat(t>i?48:32,"px;line-height: ").concat(t>i?48:30,'px;text-align: center;">\n ').concat(this.jSPlugin.i18n.t(_i[n.level]),"\n </span>\n ")}},{key:"_fullScreenChangeEvent",value:function(){var A=this,e=document.getElementById("".concat(this.jSPlugin.id,"-wrap")),t=document.getElementById("".concat(this.jSPlugin.id)),i=this;this._fullscreenchange=function(n){var a=i.decoderState.state.zoom;n.target===t?A.jSPlugin.isCurrentFullscreen?i.setDecoderState({expend:!0,webExpend:!1}):(i.setDecoderState({expend:!1,webExpend:!1}),a&&i.jSPlugin.use3DZoom&&i.jSPlugin.enable3DZoom()):n.target===e&&(A.jSPlugin.isCurrentBrowserFullscreen?i.setDecoderState({webExpend:!0}):i.setDecoderState({webExpend:!1})),i.Rec&&window.randomNum==i.jSPlugin.randomNum&&setTimeout((function(){i.Rec.recAutoSize((function(){if(i.jSPlugin.Zoom.currentScale>1){var A=i.jSPlugin.Zoom.currentScale;i.jSPlugin.Zoom.stopZoom(),setTimeout((function(){i.jSPlugin.Zoom.startZoom(),i.jSPlugin.Zoom.currentScale=A,i.jSPlugin.Zoom.doScale(A)}),200)}}))}),100),document.getElementById("".concat(i.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-hdSelect")).style.display="none"),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display="none"),i.isMobile&&(document.getElementById("".concat(i.jSPlugin.id,"-select-hd-mask"))&&(document.getElementById("".concat(i.jSPlugin.id,"-select-hd-mask")).style.display="none"),document.getElementById("".concat(i.jSPlugin.id,"-select-mask"))&&(document.getElementById("".concat(i.jSPlugin.id,"-select-mask")).style.display="none")),i.themeData.autoFocus>0&&i.startAutoFocus(),A.setDecoderState({speed:!1})},U.isEnabled&&U.on("change",this._fullscreenchange)}},{key:"changeRecSpeed",value:function(A){var e=this,t=function(A){if(!document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")))return!1;document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[0].className=document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[0].className.replace("active","default"),document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[1].className=document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[1].className.replace("active","default"),document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[2].className=document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[2].className.replace("active","default"),document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[3].className=document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[3].className.replace("active","default"),document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[A].className=document.getElementById("".concat(e.jSPlugin.id,"-speedSelect")).childNodes[A].className.replace("default","active")},i="1";switch(A){case 1:t(2),i=this.jSPlugin.i18n.t("SPEED");break;case 2:t(1),i="".concat(A).concat(this.jSPlugin.i18n.t("SPEED_RATE"));break;case 4:t(0),i="".concat(A).concat(this.jSPlugin.i18n.t("SPEED_RATE"));break;case.5:t(3),i="".concat(A).concat(this.jSPlugin.i18n.t("SPEED_RATE"));break;default:t(2),i="".concat(A).concat(this.jSPlugin.i18n.t("SPEED_RATE"))}document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))&&(document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).innerHTML=i)}},{key:"initThemeData",value:function(){var A=this,e=this.themeData,t=e.header,i=e.footer,n=this.jSPlugin.id;if(this.header=kt,this.footer=Pt,this.isNeedRenderHeader=bt(t.btnList,(function(A){return A.isrender>0}))>=0&&"miniRec"!=this.jSPlugin.id,this.isMobile&&(this.isNeedRenderHeader=bt(t.btnList,(function(A){return A.isrender>0&&"deviceID"===A.iconId||A.isrender>0&&"deviceName"===A.iconId}))>=0&&"miniRec"!=this.jSPlugin.id),this.isNeedRenderFooter=bt(i.btnList,(function(A){return A.isrender>0}))>=0&&"miniRec"!=this.jSPlugin.id,this.isNeedRenderTimeLine=bt(t.btnList,(function(A){return"cloudRec"===A.iconId&&1===A.isrender||"rec"===A.iconId&&1===A.isrender}))>=0&&!this.jSPlugin.disabledTimeLine&&"miniRec"!=this.jSPlugin.id,["date-switch-container-wrap","rec-type-container-wrap","mobile-rec-wrap","mobile-ez-ptz-container"].forEach((function(A,e){document.getElementById(A)&&document.getElementById(A).parentElement.removeChild(document.getElementById(A))})),this.isNeedRenderHeader){if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width: calc(100% - 100px);'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>");else{var a=document.createElement("div");a.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),a.setAttribute("class","header-controls"),a.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex;width:calc(100% - 100px);overflow:hidden;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' class=\"header-controls-right\" style='display:flex;'></div>");var o={height:this.jSPlugin.width>vi?"48px":"32px","line-height":this.jSPlugin.width>vi?"48px":"32px",display:"flex","justify-content":"space-between",top:0,left:0,right:0,"z-index":999,"background-color":"rgba(0,0,0,.8)",color:"#FFFFFF",width:"100%",position:"absolute"};a.style=wi(o),document.getElementById("".concat(n,"-wrap")).insertBefore(a,document.getElementById(n))}var s=document.getElementById("".concat(n,"-wrap")).classList.contains("ezuikit-player-wrap-mobile-fullscreen");!document.getElementById("".concat(this.jSPlugin.id,"-headControl"))||this.jSPlugin._isCurrentBrowserFullscreen||s||this.jSPlugin.jSPlugin.JS_Resize(this.jSPlugin.width,this.jSPlugin.height-this._extendHeadeTimeLinrHight(!1),!0)}else document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&document.getElementById("".concat(this.jSPlugin.id,"-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))),!document.getElementById("".concat(this.jSPlugin.id,"-headControl"))||this.jSPlugin._isCurrentBrowserFullscreen||isMobileFullscreen||this.jSPlugin.jSPlugin.JS_Resize(this.jSPlugin.width,this.jSPlugin.height-this._extendHeadeTimeLinrHight(!1),!0);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>vi?48:32,"px"),document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='<div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-between;height: ').concat(this.jSPlugin.width>vi?48:32,"px;width:100%;'><div id='").concat(this.jSPlugin.id,"-audioControls-left' class=\"footer-controls-left\" style='display:flex'></div><div id='").concat(this.jSPlugin.id,"-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div></div>"));else{var g=document.createElement("div");g.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container")),g.setAttribute("class","ez-iframe-footer-container");var c={"min-height":this.jSPlugin.width>vi?"48px":"32px","max-height":this.jSPlugin.width>vi?"96px":"80px",position:"relative","margin-top":this.jSPlugin.width>vi?"-48px":"-32px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%"};g.style=wi(c),g.innerHTML='<div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;height:').concat(this.jSPlugin.width>vi?48:32,"px;justify-content: space-between;width:100%;z-index:999;position: relative;'><div id='").concat(this.jSPlugin.id,"-audioControls-left' class=\"footer-controls-left\" style='display:flex;'></div><div id='").concat(this.jSPlugin.id,"-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div></div>"),m(g,document.getElementById(n))}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=t.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=t.color;var l,I=r(t.btnList);try{for(I.s();!(l=I.n()).done;){var C=l.value;if(C.isrender)try{this.renderHeader(C.iconId,C.part)}catch(A){}}}catch(A){I.e(A)}finally{I.f()}}if(this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=i.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=i.color;var d,h=r(i.btnList);try{for(h.s();!(d=h.n()).done;){var B=d.value;if(B.isrender)try{this.renderFooter(B.iconId,B.part)}catch(A){}}}catch(A){h.e(A)}finally{h.f()}}if(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?this.Rec.recInit():this.Rec=new ei(this.jSPlugin,this.changeRecSpeed,this.resetMobileZoomStatus);else{this.Rec?this.Rec.recInit():(this.jSPlugin.decoderState=this.decoderState,this.jSPlugin.setDecoderState=this.setDecoderState,this.Rec=new qt(this.jSPlugin));var u=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(u)}),50)}if(bt(this.themeData.footer.btnList,(function(A){return"pantile"===A.iconId&&1===A.isrender}))>=0&&!this.jSPlugin.disabledPTZ&&(this.isMobile&&(this.MobilePtz=new Ii(this.jSPlugin)),this.Ptz=new ti(this.jSPlugin)),this.themeData.poster){this.jSPlugin.poster=this.themeData.poster;var E=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(E),A.jSPlugin.setPoster(A.themeData.poster))}),50)}this.inited=!0,this.jSPlugin.deviceInfo&&(document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content"))&&(document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content")).style.maxWidth="100%",document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content")).style.overflow="hidden",document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content")).style.textOverflow="ellipsis",document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content")).style.whiteSpace="nowrap",document.getElementById("".concat(this.jSPlugin.id,"-deviceName-content")).innerHTML=this.jSPlugin.deviceInfo.deviceName||""),document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content"))&&(document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content")).style.maxWidth="100%",document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content")).style.overflow="hidden",document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content")).style.textOverflow="ellipsis",document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content")).style.whiteSpace="nowrap",document.getElementById("".concat(this.jSPlugin.id,"-deviceID-content")).innerHTML=_(this.jSPlugin.url).deviceSerial||"")),this.renderThemeData()}},{key:"resetMobileZoomStatus",value:function(){if(this.isMobile){var A=document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"));A&&A.style&&"none"!=A.style.display&&(A.style.display="none"),this.jSPlugin.jSPlugin.Zoom&&this.jSPlugin.jSPlugin.Zoom.resetZoom()}}},{key:"webExpend",value:function(){var A=this.decoderState.state;A.webExpend;var e=A.expend;return!!A.play&&(e?(console.log("正在全局全屏"),!1):void this.jSPlugin.browserFullscreen())}},{key:"expend",value:function(){var A=this.decoderState.state,e=A.webExpend;return!!A.play&&(e?(console.log("正在网站全屏"),!1):void(this.isMobile?(y(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),document.documentElement.clientWidth,document.documentElement.clientHeight,document.getElementById("".concat(this.jSPlugin.id)).style["backface-visibility"]="hidden"):this.jSPlugin.fullscreen()))}},{key:"_extendHeadeTimeLinrHight",value:function(A){var e=0,t=document.getElementById("".concat(this.jSPlugin.id,"-canvas-container"));return t&&!A&&(e=parseInt(window.getComputedStyle(t).height,10)),e}},{key:"disabledFECBtn",value:function(){var A=["".concat(this.jSPlugin.id,"-capturePicture"),"".concat(this.jSPlugin.id,"-capturePicture-content"),"".concat(this.jSPlugin.id,"-capturePicture-icon"),"".concat(this.jSPlugin.id,"-recordvideo"),"".concat(this.jSPlugin.id,"-recordvideo-content"),"".concat(this.jSPlugin.id,"-recordvideo-icon"),"".concat(this.jSPlugin.id,"-zoom"),"".concat(this.jSPlugin.id,"-zoom-content"),"".concat(this.jSPlugin.id,"-zoom-icon")],e=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));if(this.jSPlugin.use3DZoom?this.jSPlugin.close3DZoom():this.jSPlugin.Zoom.stopZoom(),this.setDecoderState({zoom:!1}),e){var t,i=r(A);try{for(i.s();!(t=i.n()).done;){var n=t.value,a=e.querySelector("#".concat(n));a&&(a.style.display="none")}}catch(A){i.e(A)}finally{i.f()}}}},{key:"resumeFECBtn",value:function(){var A=["".concat(this.jSPlugin.id,"-capturePicture"),"".concat(this.jSPlugin.id,"-capturePicture-content"),"".concat(this.jSPlugin.id,"-capturePicture-icon"),"".concat(this.jSPlugin.id,"-recordvideo"),"".concat(this.jSPlugin.id,"-recordvideo-content"),"".concat(this.jSPlugin.id,"-recordvideo-icon"),"".concat(this.jSPlugin.id,"-zoom"),"".concat(this.jSPlugin.id,"-zoom-content"),"".concat(this.jSPlugin.id,"-zoom-icon")],e=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));if(e){var t,i=r(A);try{for(i.s();!(t=i.n()).done;){var n=t.value,a=e.querySelector("#".concat(n));a&&(a.style.display="")}}catch(A){i.e(A)}finally{i.f()}}}},{key:"destroy",value:function(){var A=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));this.Rec&&this.Rec.destroy&&this.Rec.destroy(),this.Ptz&&this.Ptz.destroy&&this.Ptz.destroy(),A&&(A.innerHTML="");var e=document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"));this._removeElement(e);var t=document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item"));this._removeElement(t);var i=document.getElementById("mobile-ez-ptz-container");this._removeElement(i);var n=document.getElementById("date-switch-container-wrap");this._removeElement(n);var a=document.getElementById("rec-type-container-wrap");this._removeElement(a);var o=document.getElementById("mobile-rec-wrap");this._removeElement(o),U.isEnabled&&this._fullscreenchange&&U.off("change",this._fullscreenchange),Q("".concat(this.jSPlugin.staticPath,"/speed/speed.css")),Q("".concat(this.jSPlugin.staticPath,"/css/theme.css"))}},{key:"_removeElement",value:function(A){A&&A.parentNode&&A.parentNode.removeChild(A)}}])}(),Fi=function(){return o((function A(e){t(this,A),this.url=e.url||"",this.method=e.method||"POST",this.headers=e.headers||{},this.body=e.body||{},this.onBeforeUpload=e.onBeforeUpload||function(){},this.onUploadProgress=e.onUploadProgress||function(){},this.onUploadComplete=e.onUploadComplete||function(){},this.controller=new AbortController}),[{key:"upload",value:function(){var A=this;this.onBeforeUpload(this.body);var e={method:this.method,headers:this.headers,signal:this.controller.signal,body:this.body};fetch(this.url,e).then((function(A){return A.json()})).then((function(e){A.onUploadComplete({body:A.body,response:e})})).catch((function(A){"AbortError"===A.name?console.log("上传被取消"):console.error("Error:",A)})),e.body&&"FormData"==e.body.constructor.name&&"signal"in e&&e.signal.addEventListener("progress",(function(e){e.lengthComputable&&A.onUploadProgress(c(c({},A.body),{},{progress:e.loaded/e.total}))}))}},{key:"cancel",value:function(){this.controller.abort()}}])}(),Ri=function(){return o((function A(e,i){t(this,A),this.jSPlugin=e,this.isMobile=i,this.timer=null,this.initToastCustom()}),[{key:"initToastCustom",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom"))?document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom")).style.display="none":this.randerToast()}},{key:"randerToast",value:function(){var A=this.jSPlugin.width,e=1;e=this.isMobile?A/375||1:A/1024||1;var t=document.getElementById("".concat(this.jSPlugin.id,"-wrap")),i=document.createElement("div");i.style="display:none;position:absolute;top:0;width: 100%;align-items: center;justify-content: center;",i.id="".concat(this.jSPlugin.id,"-wrap-Toast-custom"),this.isMobile?i.innerHTML='<div id="'.concat(this.jSPlugin.id,'-wrap-Toast-custom-content" \n style="padding: ').concat(12*e,"px ").concat(20*e,"px;font-size: ").concat(16*e,"px;line-height:").concat(16*e,"px;border-radius: ").concat(8*e,"px;margin-top: ").concat(667*e*.53,'px;\n background-color: rgba(0,0,0,0.8);color:rgba(255,255,255,0.90);box-sizing: border-box;z-index: 999;">\n </div>\n '):i.innerHTML='<div id="'.concat(this.jSPlugin.id,'-wrap-Toast-custom-content" \n style="padding: ').concat(20*e,"px ").concat(32*e,"px;font-size: ").concat(24*e,"px;line-height:").concat(24*e,"px;border-radius: ").concat(12*e,"px;margin-top: ").concat(36*e,'px;\n background-color: rgba(0,0,0,0.7);color:rgba(255,255,255,0.90);box-sizing: border-box;z-index: 999;">\n </div>\n '),t.insertBefore(i,document.getElementById(this.jSPlugin.id))}},{key:"initToastContent",value:function(A){var e=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3;console.log("content----------------",A),this.timer=null,document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom"))?(document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom-content")).innerText=A||"",this.timer=setTimeout((function(){document.getElementById("".concat(e.jSPlugin.id,"-wrap"))&&document.getElementById("".concat(e.jSPlugin.id,"-wrap-Toast-custom"))&&document.getElementById("".concat(e.jSPlugin.id,"-wrap")).removeChild(document.getElementById("".concat(e.jSPlugin.id,"-wrap-Toast-custom")))}),t)):(this.randerToast(),this.initToastContent(A))}}])}(),ki=function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},r="";o=Object.assign(o,a);var s=new Headers;Object.keys(o).map((function(A){s.append(A,o[A])})),o=s,Object.keys(Object.assign({},t)).forEach((function(A){var e=t[A];"string"==typeof t[A]&&(e=t[A].replace("%","%25")),void 0!==t[A]&&(r+="&".concat(A,"=").concat(encodeURIComponent(e)))})),r.length>0&&(r=-1!==["GET","PUT","DELETE"].indexOf(e.toUpperCase())?"?".concat(r.slice(1)):r.slice(1));var g=A+(-1!==["GET","PUT","DELETE"].indexOf(e.toUpperCase())?r:""),c={headers:o,method:e};"POST"===e&&(c.body=r),"POST"===e&&a&&"application/json"===a["Content-Type"]&&(c.body=JSON.stringify(t)),"GET"===e&&(-1===g.indexOf("?")?g+="?_r=".concat(Math.random()):g+="&_r=".concat(Math.random())),fetch(g,c).then((function(A){var e=A.headers.get("content-type");return e&&-1!==e.indexOf("application/json")?A.json():A.text()})).then((function(A){i&&i(A)})).catch((function(A){n&&n(A)}))},Pi=function(A,e,t){var i=new FormData;i.append("deviceSerial",_(A.url).deviceSerial),i.append("cmd","open"),fetch("".concat(domain,"/api/v3/device/acs/remote/door?accessToken=").concat(A.accessToken||A.token.deviceToken.globalAll),{method:"POST",body:i}).then((function(A){return A.json()})).then((function(A){console.log("get theme data",A),e(A)})).catch((function(A){t(A)}))},Ni=function(A,e,t){var i={accessToken:A.accessToken||A.token.httpToken.url,pageStart:0,pageSize:4,default:!0,voiceName:"轻应用语音文件"},n="".concat(A.env.domain,"/api/lapp/voice/query");ki(n,"POST",i,(function(A){console.log(A),e(A)}),(function(A){console.log(A),t(A)}),{"Content-Type":"application/x-www-form-urlencoded"})},Ti=function(A,e,t,i){var n="".concat(A.env.domain,"/api/lapp/voice/send"),a=new FormData;a.append("deviceSerial",_(A.url).deviceSerial),a.append("accessToken",A.accessToken||A.token.deviceToken.video),a.append("channelNo",_(A.url).channelNo||1),a.append("fileUrl",e),fetch(n,{method:"POST",body:a}).then((function(A){return A.json()})).then((function(A){!function(A){console.log(A),t(A)}(A)})).catch((function(A){var e;e=A,console.log(e),i(e)}))},Mi=function(){return o((function A(e,i){t(this,A),this.jSPlugin=e,this.videoWidth=e.width,this.switchFooter=i,this.sendLoadingStats=!1,this.toastCustom=new Ri(e,!1),this.quickReplyList=["你好,请将快递放在门口","你好,稍等","你好,请将快递放入小区快递柜","你好,请将外卖放在门口"],this.initQuickReply()}),[{key:"initQuickReply",value:function(){document.getElementById("pc-quickReply-back")||this.renderQuickReply(),document.getElementById("pc-quickReply-back-item-0")||this.getQuickReplyList()}},{key:"renderQuickReply",value:function(){var A=this,e=this.videoWidth/1024||1,t=document.createElement("div");t.style="width:100%;",t.innerHTML='<div style="width:100%;display:flex;flex-direction:row;align-items: center;">\n <div id="pc-quickReply-back" style="display: flex;align-items: center;margin: 0 '.concat(8*e,"px 0 ").concat(16*e,'px;cursor: pointer;">\n <div style="height: ').concat(32*e,'px;">\n <svg width="').concat(32*e,'px" height="').concat(32*e,'px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>返回</title>\n <defs>\n <filter id="filter-1">\n <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>\n </filter>\n </defs>\n <g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="快速回复loading" transform="translate(-16.000000, -497.000000)">\n <g id="返回" transform="translate(0.000000, 425.000000)" filter="url(#filter-1)">\n <g transform="translate(16.000000, 72.000000)">\n <rect id="Rectangle" x="0" y="0" width="32" height="32"></rect>\n <path d="M12.5,7.5 C13.2988404,7.5 13.9518304,8.12445998 13.9974537,8.91186361 L14,9 L14,21.5 L26.5,21.5 C27.2988404,21.5 27.9518304,22.12446 27.9974537,22.9118636 L28,23 C28,23.7988404 27.37554,24.4518304 26.5881364,24.4974537 L26.5,24.5 L12.5,24.5 C11.7011596,24.5 11.0481696,23.87554 11.0025463,23.0881364 L11,23 L11,9 C11,8.17157288 11.6715729,7.5 12.5,7.5 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" transform="translate(19.500000, 16.000000) rotate(45.000000) translate(-19.500000, -16.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n <span style="font-size: ').concat(24*e,'px;">返回</span>\n </div>\n <div id="pc-quickReply-content" style="display: block;width:calc(100% - ').concat(160*e,"px);margin: 0 ").concat(24*e,'px;"></div>\n <div id="pc-quickReply-loading" style="display: none;width:calc(100% - ').concat(160*e,"px);margin: 0 ").concat(24*e,'px;"></div>\n <div id="pc-quickReply-loaderror" style="display: none;width:calc(100% - ').concat(160*e,"px);margin: 0 ").concat(24*e,'px;"></div>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply")).appendChild(t),document.getElementById("pc-quickReply-back").onclick=function(){A.switchFooter("onBell")}}},{key:"matchQuickReplyBtn",value:function(){var A=this,e=this.videoWidth/1024||1,t=document.getElementById("pc-quickReply-content");this.quickReplyList&&this.quickReplyList.length>0&&this.quickReplyList.forEach((function(i,n){var a=document.createElement("div");a.id="pc-quickReply-back-item-".concat(n),a.style="margin: ".concat(8*e,"px 0 ").concat(8*e,"px ").concat(8*e,"px;cursor: pointer;\n padding: 0 ").concat(20*e,"px;min-height: ").concat(64*e,"px;width:calc(50% - ").concat(16*e,"px);\n display: inline-block;background: rgba(0,0,0,0.70);border-radius: 8px;text-align: center;\n box-sizing: border-box;font-size:").concat(24*e,"px;color: rgba(255,255,255,0.90);"),a.innerHTML='<div id="pc-quickReply-back-item-box-'.concat(n,'">\n <span id="pc-quickReply-name-').concat(n,'" style="line-height: ').concat(64*e,'px;">').concat(i.voiceName,"</span>\n </div>"),a.onclick=function(){A.sendLoadingStats||(console.log("item:"+i),A.sendQuickReply(i,n))},t.appendChild(a)}))}},{key:"setBtnCheckLoading",value:function(A,e){var t=this.videoWidth/1024||1;if(e>-1){document.getElementById("pc-quickReply-back-item-".concat(e));var i=document.getElementById("pc-quickReply-back-item-box-".concat(e)),n=document.getElementById("pc-quickReply-name-".concat(e));if(1==A){var a=document.getElementById("pc-quickReply-icon-loading-".concat(e));a&&n&&i.removeChild(a)}else if(n){var o=document.createElement("span");o.id="pc-quickReply-icon-loading-".concat(e),o.style="vertical-align: middle;margin-right:".concat(16*t,"px;"),o.innerHTML='<svg width="'.concat(30*t,'" height="').concat(30*t,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>'),i.insertBefore(o,n)}}}},{key:"getQuickReplyList",value:function(){var A=this;console.log("getQuickReplyList"),this.madeLoadingDom(0);Ni(this.jSPlugin,(function(e){if(e&&200==e.code){var t=e.data||[],i=[];e.data.forEach((function(A,e){i=A.voiceName.split("_"),t[e].voiceName=i[1]})),A.quickReplyList=t,setTimeout((function(){A.madeLoadingDom(2)}),500)}else A.madeLoadingDom(1)}),(function(e){console.log(e),A.madeLoadingDom(1)}))}},{key:"madeLoadingDom",value:function(A){var e=this,t=this.videoWidth/1024||1;if(0==A){if(document.getElementById("pc-quickReply-content").style.display="none",document.getElementById("pc-quickReply-loaderror").style.display="none",document.getElementById("pc-quickReply-loading").style.display="block",!document.getElementById("pc-quickReply-loading-box")){var i=document.createElement("div");i.id="pc-quickReply-loading-box",i.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;",i.innerHTML='<div class="" style="heigth:'.concat(40*t,'px">\n <svg width="').concat(40*t,'" height="').concat(40*t,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>\n </div>\n <div style="font-size: ').concat(28*t,"px;margin-top:").concat(10*t,"px;line-height:").concat(36*t,'px;">加载中…</div>'),document.getElementById("pc-quickReply-loading").appendChild(i)}}else if(1==A){if(document.getElementById("pc-quickReply-content").style.display="none",document.getElementById("pc-quickReply-loading").style.display="none",document.getElementById("pc-quickReply-loaderror").style.display="block",!document.getElementById("pc-quickReply-loaderror-box")){var n=document.createElement("div");n.id="pc-quickReply-loaderror-box",n.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;",n.innerHTML='<div style="font-size: '.concat(28*t,'px;color: rgba(255,255,255,0.90);">快速回复加载失败</div>\n <div id="pc-quickReply-loaderror-reload" style="font-size: ').concat(24*t,"px;margin-top:").concat(16*t,'px;color: rgba(100,143,252,0.90);cursor: pointer;">重新加载</div>'),document.getElementById("pc-quickReply-loaderror").appendChild(n),document.getElementById("pc-quickReply-loaderror-reload").onclick=function(){e.getQuickReplyList()}}}else document.getElementById("pc-quickReply-loading").style.display="none",document.getElementById("pc-quickReply-loaderror").style.display="none",document.getElementById("pc-quickReply-content").style.display="block",this.matchQuickReplyBtn()}},{key:"sendQuickReply",value:function(A,e){var t=this;this.sendLoadingStats=!0,this.setBtnCheckLoading(0,e);Ti(this.jSPlugin,A.fileUrl,(function(A){t.sendLoadingStats=!1,t.setBtnCheckLoading(1,e),A&&200==A.code?t.toastCustom.initToastContent("快捷回复成功"):t.toastCustom.initToastContent("快捷回复失败,请重试"),t.switchFooter("onBell")}),(function(A){console.log(A),t.sendLoadingStats=!1,t.setBtnCheckLoading(1,e),t.toastCustom.initToastContent("快捷回复失败,请重试"),t.switchFooter("onBell")}))}}])}(),Li=function(){return o((function A(e,i){t(this,A),this.jSPlugin=e,this.videoWidth=e.width,this.switchFooter=i,this.toastCustom=new Ri(e,!1),this.lockStatus=!1,this.initRemoteUnlock()}),[{key:"initRemoteUnlock",value:function(){document.getElementById("pc-remoteUnlock-back")?this.madeSlideEvent():this.renderRemoteUnlock()}},{key:"renderRemoteUnlock",value:function(){var A=this,e=this.videoWidth/1024||1,t=document.createElement("div");t.style="width:100%;",t.id="pc-remoteUnlock-box",t.innerHTML='<div style="width:100%;display:flex;flex-direction:row;align-items: center;">\n <div id="pc-remoteUnlock-back" style="display: flex;align-items: center;margin: 0 '.concat(8*e,"px 0 ").concat(16*e,'px;cursor: pointer;">\n <div style="height: ').concat(32*e,'px;">\n <svg width="').concat(32*e,'px" height="').concat(32*e,'px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>返回</title>\n <defs>\n <filter id="filter-1">\n <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>\n </filter>\n </defs>\n <g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="快速回复loading" transform="translate(-16.000000, -497.000000)">\n <g id="返回" transform="translate(0.000000, 425.000000)" filter="url(#filter-1)">\n <g transform="translate(16.000000, 72.000000)">\n <rect id="Rectangle" x="0" y="0" width="32" height="32"></rect>\n <path d="M12.5,7.5 C13.2988404,7.5 13.9518304,8.12445998 13.9974537,8.91186361 L14,9 L14,21.5 L26.5,21.5 C27.2988404,21.5 27.9518304,22.12446 27.9974537,22.9118636 L28,23 C28,23.7988404 27.37554,24.4518304 26.5881364,24.4974537 L26.5,24.5 L12.5,24.5 C11.7011596,24.5 11.0481696,23.87554 11.0025463,23.0881364 L11,23 L11,9 C11,8.17157288 11.6715729,7.5 12.5,7.5 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" transform="translate(19.500000, 16.000000) rotate(45.000000) translate(-19.500000, -16.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n <span style="font-size: ').concat(24*e,'px;user-select: none;">返回</span>\n </div>\n <div id="pc-remoteUnlock-content" style="display: block;width:calc(100% - ').concat(160*e,"px);margin: 0 ").concat(24*e,'px;"></div>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock")).appendChild(t),document.getElementById("pc-remoteUnlock-back").onclick=function(){A.goback()},this.renderRemoteUnlockSlide()}},{key:"renderRemoteUnlockSlide",value:function(){var A=this.videoWidth/1024||1,e=document.getElementById("pc-remoteUnlock-content"),t=document.createElement("div");t.id="pc-remoteUnlock-content-slide",t.style="width: 100%;display: flex;justify-content: center;cursor: pointer;",t.innerHTML='<div id="pc-remoteUnlock-slide-box" style="width: '.concat(400*A,"px;line-height: ").concat(80*A,"px;height: ").concat(80*A,"px;border: 1px solid rgba(255,255,255,1);border-radius: ").concat(40*A,'px;position: relative;text-align: center;">\n <div id="pc-remoteUnlock-slide-bgColor" style="border-radius: ').concat(40*A,"px;width: ").concat(64*A,"px;height: ").concat(80*A,'px;position: absolute;left: 0;top: 0;"></div>\n <div id="pc-remoteUnlock-slide-tips" style="height: ').concat(80*A,"px;line-height: ").concat(80*A,"px;font-size: ").concat(24*A,"px;border-radius: ").concat(40*A,'px;position: absolute;text-align: center;user-select: none;color: rgba(255,255,255,0.90);width: 100%;">右滑开锁</div>\n <div id="pc-remoteUnlock-slide-ball" style="top: ').concat(8*A,"px;left: ").concat(8*A,"px;width: ").concat(64*A,"px;height: ").concat(64*A,'px;background: #598FFF;position: absolute;text-align: center;border-radius:50%;display: flex;align-items: center;justify-content: center;">\n <svg id="slide-ball-start" style="display: inline;" width="').concat(36*A,'px" height="').concat(36*A,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="icon/箭头向右" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="0" y="0" width="24" height="24"></rect>\n <path d="M14.2841136,6.3689007 L19.9432338,12.0287579 L14.2863796,17.6856122 L12.8580239,16.2572565 L16.114,12.9999007 L4.00000001,13 L4.00000001,11 L16.058,10.9999007 L12.8557579,7.79725638 L14.2841136,6.3689007 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n <svg id="slide-ball-end" style="display: none;" width="').concat(36*A,'" height="').concat(36*A,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#598FFF" p-id="2400"></path></svg>\n \n </div>\n </div>'),e.appendChild(t),this.madeSlideEvent()}},{key:"getOffsetLeft",value:function(A){var e=0;do{e+=A.offsetLeft,A=A.parentNode}while(A.parentNode);return e}},{key:"madeSlideEvent",value:function(){var A=this.videoWidth/1024||1,e=document.getElementById("".concat(this.jSPlugin.id)),t=this.getOffsetLeft(e),i=document.getElementById("pc-remoteUnlock-slide-box"),n=document.getElementById("pc-remoteUnlock-slide-bgColor"),a=document.getElementById("pc-remoteUnlock-slide-tips"),o=document.getElementById("pc-remoteUnlock-slide-ball"),r=this;o.onmousedown=function(e){var s=(e=e||window.event).offsetX;o.style.transition="",n.style.transition="",document.onmouseup=function(){console.log("--------------onmouseup"),r.lockStatus||(n.style.width="0px",o.style.left=8*A+"px",o.style.transition="left 0.6s linear",n.style.transition="width 0.6s linear"),document.onmouseup=null,document.onmousemove=null},document.onmousemove=function(e){e=e||window.event;console.log("videoDom",t);var g=e.pageX-i.offsetLeft-s-t,c=i.clientWidth-o.clientWidth-8*A;g<=0&&(g=0),g>=c&&(g=c),o.style.left=g+"px",g!=c||r.lockStatus||r.lockStatus||(r.lockStatus=!0,document.getElementById("slide-ball-start").style.display="none",document.getElementById("slide-ball-end").style.display="inline",n.style.width=i.clientWidth+"px",n.style.backgroundColor="#598FFF",i.style.border="0",o.style.backgroundColor="#ffffff",a.textContent="正在开锁",o.onmousedown=null,document.onmousemove=null,r.sendRemoteUnlockApi())}}}},{key:"resetRemoteUnlockSlide",value:function(){var A=document.getElementById("pc-remoteUnlock-box"),e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock"));A&&e&&e.removeChild(A)}},{key:"sendRemoteUnlockApi",value:function(){var A=this;console.log("下发远程开锁");Pi(this.jSPlugin,(function(e){e&&200==e.code?A.toastCustom.initToastContent("开锁成功"):A.toastCustom.initToastContent("开锁失败,请重试"),A.goback()}),(function(e){console.log(e),A.toastCustom.initToastContent("开锁失败,请重试"),A.goback()}))}},{key:"goback",value:function(){this.switchFooter("onCall"),this.resetRemoteUnlockSlide()}}])}(),Yi={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0},header:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000 linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)",activeColor:"#1890FF",autoFocus:0,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"ringStatus",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"callStatus",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]}},footer:{onBell:{color:"#ffffff",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"quickReply",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"rejection",part:"left",defaultActive:0,isrender:1,color:"#2C2C2C",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"answer",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-3",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]},onCall:{color:"#2c2c2c",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"mute",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"hangUp",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]}}};function Gi(A){var e=new Ht,t=new FormData;for(var i in A)t.append(i,A[i]);return e.fetch("/api/lapp/device/info",{method:"POST",body:t})}var Ui=function(A){var e="";return Object.keys(A).map((function(t,i){e+="".concat(t,":").concat(A[t]).concat(i<Object.keys(A).length-1?";":"")})),e},Ji=function(){return o((function A(e,i,n,a){var o=this;t(this,A),s(this,"autoPlayRing",(function(){console.log("autoPlayRing");var A=document.getElementById("bellring-audio");A&&(A.muted=!1,A.src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3",A.paused&&A.play()),window.removeEventListener("click",o.autoPlayRing)})),s(this,"muteCommon",(function(A){var e=o.decoderState.state,t=e.talk,i=e.sound;t?(console.log("结束对讲"),o.setDecoderState({talk:!1,mute:!0},A.backgroundColor),o.jSPlugin.Talk.stopTalk(),i||o.jSPlugin.openSound()):(o.setDecoderState({talk:!1,mute:!0},A.backgroundColor),i||o.jSPlugin.openSound())})),s(this,"switchCallStatus",(function(A){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=o.themeData,i=t.header,n=t.footer,a=null;if("onCall"==A){console.log("接听"),o.bellStatus="onCall",o.switchFooter("onCall"),n[o.bellStatus].btnList.map((function(A,e){A.isrender&&o.renderFooter(A.iconId,A),"mute"==A.iconId&&(a=A)})),i[o.bellStatus].btnList.map((function(A,e){A.isrender&&o.renderHeader(A.iconId,A)}));var r=document.getElementById("".concat(o.jSPlugin.id,"-header-onBell"));r&&r.parentElement.removeChild(r),1==o.themeData.customConfig.bellPoster&&document.getElementById("bellring-icon")&&document.getElementById("".concat(o.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon")),0==o.themeData.customConfig.defaultMicro&&a?o.muteCommon(a):o.setDecoderState({mute:!1},a.backgroundColor),o.removeBellRing()}else console.log("响铃"),o.bellStatus="onBell",o.jSPlugin.Theme.changeTheme(o.themeData,e)})),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.themeData=i,this.setDecoderState=n,this.decoderState=a,this.isNeedRenderHeader=!1,this.isNeedRenderFooter=!1,this.autoFocus=0,this.autoFocusTimer=null,this.bellStatus="onBell",this.recordTimer=null,this.nextRate=1,this.themeInited=!1,this.inited=!1,this.activeThemeStatus=!0,this.activeThemeStatusTxt="模板未激活",this.toastCustom=new Ri(e,!1)}),[{key:"initBellRing",value:function(){var A=this,e=this.decoderState.state,t=e.play,i=e.isEditing;e.rejection;var n=this.videoWidth/1024;this.maxBellTime=1e3*this.themeData.customConfig.maxBellTime;var a=document.getElementById("bellring"),o=document.getElementById("bellring-audio");if(!a&&!o){if(this.jSPlugin.isNeedBellRing){var r=document.createElement("div");r.id="bellring",r.innerHTML='<div>\n <audio id="bellring-audio" loop autoplay>\n <source src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3" type="audio/mpeg">\n </audio>\n </div>',document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(r)}if(1!=this.themeData.customConfig.bellPoster||i)document.getElementById("bellring-icon")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"));else{var s=(this.videoHeight-180*n)/2,g=document.createElement("div");g.id="bellring-icon",g.style="position: absolute;pointer-events: none;background: none;width: 100%;\n position: absolute;top: ".concat(s,"px;display: flex;align-items: center;justify-content: center;"),g.innerHTML='<div style="width: '.concat(180*n,"px;height: ").concat(180*n,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.2);border-radius: 50%;">\n <div style="width: ').concat(100*n,"px;height: ").concat(100*n,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.3);border-radius: 50%;">\n <svg width="').concat(40*n,'px" height="').concat(40*n,'px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/响铃</title>\n <g id="icon/响铃" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <polygon id="Path" points="0 0 40.0000002 0 40.0000002 40.0000002 0 40.0000002"></polygon>\n <path d="M20.0000001,4.25000002 C22.0363461,4.25000002 23.698175,5.84879552 23.8000507,7.8591997 L23.8050001,8.05500003 L23.805316,8.99953253 C27.1874196,9.97041766 29.6921839,13.0354462 29.80936,16.723731 L29.80936,16.723731 L29.8133335,16.9800001 L29.8133335,21.6416668 C29.8133335,22.3259481 30.0858837,22.9835569 30.5703302,23.4680033 L30.5703302,23.4680033 L31.6386635,24.5363367 C32.338953,25.2366262 32.760721,26.1675592 32.8273086,27.1785295 L32.8273086,27.1785295 L32.8350001,27.4233334 C32.8350001,29.577547 31.0892137,31.3233335 28.9350001,31.3233335 L28.9350001,31.3233335 L24.5666667,31.323 L24.5650266,31.3951531 C24.4527075,33.8194458 22.4520933,35.7500001 20.0000001,35.7500001 C17.5482065,35.7500001 15.5473098,33.8197367 15.4349743,31.3967059 L15.4326667,31.323 L11.0666667,31.3233335 C9.06159524,31.3233335 7.39851917,29.8069287 7.18810198,27.8229374 L7.17194359,27.6230185 L7.1666667,27.4233334 C7.1666667,26.3411154 7.59733134,25.3020086 8.36300328,24.5363367 L8.36300328,24.5363367 L9.43133662,23.4680033 C9.91578309,22.9835569 10.1883334,22.3259481 10.1883334,21.6416668 L10.1883334,21.6416668 L10.1883334,16.9800001 C10.1883334,13.1909619 12.7263704,9.99530436 16.1948593,8.99965364 L16.1950001,8.05500003 C16.1950001,5.95360729 17.8979654,4.25000002 20.0000001,4.25000002 Z M23.0656667,31.323 L16.9336667,31.323 L16.9352114,31.3619281 C17.0285826,32.9723844 18.3649772,34.2500001 20.0000001,34.2500001 C21.6352227,34.2500001 22.9714318,32.9721919 23.0647896,31.3604131 L23.0656667,31.323 Z M21.5116668,10.1783334 L18.4900001,10.1783334 C14.7336124,10.1783334 11.6883334,13.2231481 11.6883334,16.9800001 L11.6883334,16.9800001 L11.6883334,21.6416668 C11.6883334,22.7238848 11.2576687,23.7629916 10.4919968,24.5286635 L10.4919968,24.5286635 L9.42366346,25.5969969 C8.93921698,26.0814433 8.6666667,26.7390521 8.66637526,27.402427 L8.66637526,27.402427 L8.67048222,27.560237 C8.74130967,28.8268108 9.79171396,29.8233335 11.0666667,29.8233335 L11.0666667,29.8233335 L23.7906939,29.8222289 C23.8004164,29.8218553 23.8101862,29.8216668 23.8200001,29.8216668 L23.8486667,29.823 L28.9350001,29.8233335 C30.2055455,29.8233335 31.2450456,28.8367727 31.329826,27.609522 L31.3354106,27.4481422 L31.3293607,27.2529336 C31.2880301,26.6292837 31.0210852,26.0400787 30.5780034,25.5969969 L30.5780034,25.5969969 L29.50967,24.5286635 C28.7439981,23.7629916 28.3133335,22.7238848 28.3133335,21.6416668 L28.3133335,21.6416668 L28.3134279,16.9919039 L28.3098332,16.759466 C28.1934023,13.0970787 25.1864454,10.1783334 21.5116668,10.1783334 L21.5116668,10.1783334 Z M20.0000001,5.75000002 C18.7795808,5.75000002 17.7813801,6.69770708 17.7003155,7.89717688 L17.6950001,8.05500003 L17.6952875,8.7158769 C17.9568453,8.69103758 18.2219393,8.67833337 18.4900001,8.67833337 L18.4900001,8.67833337 L21.5116668,8.67833337 C21.7792577,8.67833337 22.0439466,8.69101238 22.3051575,8.71580951 L22.3050001,8.05500003 C22.3050001,6.7819079 21.273481,5.75000002 20.0000001,5.75000002 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(g),t&&"onBell"==this.bellStatus&&this.jSPlugin.pause()}setTimeout((function(){var e=A.decoderState.state,t=e.isEditing,i=e.rejection;"onBell"!=A.bellStatus||i||(A.removeBellRing(),t||A.answerOvertime())}),this.maxBellTime)}}},{key:"removeBellRing",value:function(){document.getElementById("bellring")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring")),document.getElementById("bellring-icon")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}},{key:"matchBtn",value:function(A,e){var t=this,i=this.themeData,n=i.header,a=i.footer,o=this.decoderState.state,r=o.mute,s=o.rejection,g={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}};-1===n[this.bellStatus].btnList.findIndex((function(e){return e.iconId===A}))?(g.color=a[this.bellStatus].color,g.backgroundColor=a[this.bellStatus].backgroundColor,g.activeColor=a[this.bellStatus].activeColor):(g.color=n[this.bellStatus].color,g.backgroundColor=n[this.bellStatus].backgroundColor,g.activeColor=n[this.bellStatus].activeColor);var c=this.videoWidth/6;this.videoWidth;var l=this.videoWidth/1024||1;switch(A){case"ringStatus":return g.title=this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,g.id=A,g.domString='<span id="header-onBell-ringStatus" style="color:'.concat(e.color||"#FFFFFF",";font-size: ").concat(32*l,'px;display: block;text-align: left;font-weight: 500;" >').concat(this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,"</span>"),g.onclick=function(){},g;case"deviceCategory":return g.title="设备名称",g.id=A,g.domString='<span id="header-onBell-deviceCategory" \n style="\n color:'.concat(e.color||"#FFFFFF",";\n font-size: ").concat(24*l,"px;\n padding-top: ").concat(16*l,'px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>"),g.onclick=function(){},g;case"callStatus":return g.title="通话中",g.id=A,g.domString='<span id="header-onCall-ringStatus" style="color:'.concat(e.color||"#FFFFFF",";font-size: ").concat(32*l,'px;display: block;text-align: left;" >通话中</span>'),g.onclick=function(){},g;case"deviceCategory":return g.title="设备名称",g.id=A,g.domString='<span id="header-onCall-deviceCategory"\n style="color:'.concat(e.color||"#FFFFFF",";\n font-size: ").concat(24*l,"px;\n padding-top: ").concat(16*l,'px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>"),g.onclick=function(){},g;case"rejection":return g.title="拒绝",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width:').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>拒绝</title>\n <g id="icon/拒绝" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;user-select: none;">拒绝</div>\n </div>'),g.onclick=function(){var A=t.decoderState.state,e=A.play,i=A.isEditing,n=A.rejection;if(i||n)return!1;console.log("拒绝"),e&&t.jSPlugin.stop(),t.removeBellRing(),t.setDecoderState({play:!1,rejection:!0}),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("rejection")},g;case"quickReply":return g.title="快捷回复",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width: ').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>快捷回复</title>\n <g id="icon/web快捷回复" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M17.4723401,6.00464509 C24.1317208,5.8200623 29.613145,11.1601938 29.613145,17.806299 C29.613145,19.5506656 29.2343807,21.2437888 28.5133012,22.7904909 L28.638,22.51 L29.9802796,28.9334997 C30.0980856,29.4978889 29.6719785,30.0050773 29.131395,30.0271186 L29.0218792,30.0249315 L28.9025577,30.0074816 L22.488349,28.6446207 L22.3501503,28.7067675 C21.0679643,29.242563 19.6940914,29.5480927 18.2793303,29.6038407 L18.2793303,29.6038407 L17.8062986,29.6131454 C11.1610025,29.6131454 5.820073,24.1313212 6.00464384,17.4723718 C6.17540866,11.3038211 11.3038207,6.17540904 17.4723401,6.00464509 Z M17.8062986,16.2974446 C16.9707372,16.2974446 16.2926003,16.9755814 16.2926003,17.8111428 C16.2926003,18.6467043 16.9707372,19.3248411 17.8062986,19.3248411 C18.64186,19.3248411 19.3199969,18.6467043 19.3199969,17.8111428 C19.3199969,16.9755814 18.64186,16.2974446 17.8062986,16.2974446 Z M12.9624642,16.2974446 C12.1269027,16.2974446 11.4487659,16.9755814 11.4487659,17.8111428 C11.4487659,18.6467043 12.1269027,19.3248411 12.9624642,19.3248411 C13.7980256,19.3248411 14.4761624,18.6467043 14.4761624,17.8111428 C14.4761624,16.9755814 13.7980256,16.2974446 12.9624642,16.2974446 Z M22.650133,16.2974446 C21.8145716,16.2974446 21.1364348,16.9755814 21.1364348,17.8111428 C21.1364348,18.6467043 21.8145716,19.3248411 22.650133,19.3248411 C23.4856945,19.3248411 24.1638313,18.6467043 24.1638313,17.8111428 C24.1638313,16.9755814 23.4856945,16.2974446 22.650133,16.2974446 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;user-select: none;">快捷回复</div>\n </div>'),g.onclick=function(){if(t.decoderState.state.rejection)return!1;console.log("快捷回复"),t.switchFooter("quickReply"),t.quickReplyEle=new Mi(t.jSPlugin,t.switchFooter)},g;case"answer":return g.title="接听",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width: ').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>接听</title>\n <g id="icon/接听" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M15.7728281,19.6822968 C13.2528132,17.165123 10.8435994,14.2473605 11.9999084,13.0938925 C13.6505608,11.4432401 15.0881341,10.4261428 12.1646895,6.78675259 C9.23840386,3.14452132 7.28659974,5.94011849 5.68708632,7.53963191 C3.84324225,9.38631703 5.59049048,16.2645088 12.3891328,23.0659922 C19.1877751,29.8646345 26.0688079,31.6147238 27.9154931,29.7680386 C29.5150065,28.1685252 32.3106036,26.2195622 28.6712134,23.2932765 C25.0318232,20.3669909 24.0147259,21.8045642 22.3640735,23.4580576 C21.2077645,24.6086845 18.2928431,22.1994707 15.7728281,19.6822968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.727936, 17.728157) rotate(-360.000000) translate(-17.727936, -17.728157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;user-select: none;">接听</div>\n </div>'),g.onclick=function(){var A=t,i=t.decoderState.state,o=i.play,r=i.isEditing,s=i.talk,g=i.sound,c=i.rejection;if(r||c)return!1;console.log("接听"),t.jSPlugin.pluginStatus.loadingClear(),o||(t.jSPlugin.pluginStatus.loadingStart(t.jSPlugin.id),t.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"}),t.jSPlugin.play(),t.setDecoderState({play:!o})),s||1!=t.themeData.customConfig.defaultMicro||(t.setDecoderState({talk:!0,mute:!1}),g&&t.jSPlugin.closeSound(),t.jSPlugin.Talk.startTalk()),t.setDecoderState({sound:!1}),t.bellStatus="onCall",t.switchFooter("onCall"),a[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderFooter(A.iconId,A)})),n[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderHeader(A.iconId,A)}));var l=document.getElementById("".concat(t.jSPlugin.id,"-header-onBell"));l&&l.parentElement.removeChild(l),1==t.themeData.customConfig.bellPoster&&(document.getElementById("bellring-icon")&&document.getElementById("".concat(t.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon")),t.jSPlugin.setPoster("")),0==t.themeData.customConfig.defaultMicro&&(t.muteCommon(e),t.jSPlugin.openSound()),t.removeBellRing(),t.maxTalkTime=1e3*t.themeData.customConfig.maxTalkTime*60,setTimeout((function(){s&&(console.log("结束对讲"),A.setDecoderState({talk:!1}),A.jSPlugin.Talk.stopTalk()),o&&(A.jSPlugin.stop(),A.setDecoderState({play:!o})),t.rejectionStatusDispose(),t.remoteUnlockEle&&t.remoteUnlockEle.goback(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp")}),t.maxTalkTime)},g;case"remoteUnlock":return g.title="远程开锁",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width: ').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>开锁</title>\n <g id="icon/开锁" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M18,4 C21.3137085,4 24,6.6862915 24,10 L24,10 L24,19.787 L29.5,19.7875 C30.0522847,19.7875 30.5,20.2352153 30.5,20.7875 C30.5,21.3397847 30.0522847,21.7875 29.5,21.7875 L24,21.787 L24,26 C24,29.2383969 21.4344251,31.8775718 18.2249383,31.9958615 L18,32 C14.6862915,32 12,29.3137085 12,26 L12,26 L12,10 C12,6.6862915 14.6862915,4 18,4 Z M18,6 C15.790861,6 14,7.790861 14,10 L14,10 L14,26 C14,28.209139 15.790861,30 18,30 C20.209139,30 22,28.209139 22,26 L22,26 L22,21.787 L18.5,21.7875 C17.9477153,21.7875 17.5,21.3397847 17.5,20.7875 C17.5,20.2352153 17.9477153,19.7875 18.5,19.7875 L22,19.787 L22,10 C22,7.85780461 20.3160315,6.10892112 18.1996403,6.00489531 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;user-select: none;">远程开锁</div>\n </div>'),g.onclick=function(){var A=t.decoderState.state,e=A.isEditing,i=A.rejection;if(e||"onBell"==t.bellStatus||i)return!1;console.log("远程开锁"),t.switchFooter("remoteUnlock"),t.remoteUnlockEle=new Li(t.jSPlugin,t.switchFooter)},g;case"mute":return g.title="静音",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div id="').concat(this.jSPlugin.id,'-icon-mute" style="width: ').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;border: 1px solid ").concat(s?"#CCCCCC":e.backgroundColor,";background: ").concat(s&&r?"#cccccc":"#ffffff",';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>静音</title>\n <g id="icon/静音" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path id="icon-mute-path" d="M29.2988305,7.56559704 C29.8540627,8.1086468 29.8980234,8.97727504 29.4240597,9.57172938 L29.3223594,9.6867869 L22.585,16.574 L22.5859243,26.0592702 C22.5859243,26.9500521 21.8638029,27.6721735 20.973021,27.6721735 C20.6007147,27.6721735 20.2398727,27.5433734 19.9517149,27.3076254 L15.583,23.733 L10.4341733,28.9987008 C9.85492024,29.5909486 8.9052312,29.6014828 8.31298346,29.0222298 C7.75775121,28.47918 7.71379057,27.6105518 8.18775419,27.0160974 L8.28945454,26.9010399 L27.1776406,7.58912597 C27.7568937,6.99687823 28.7065827,6.98634397 29.2988305,7.56559704 Z M22.2503608,7.16816759 C22.4679282,7.45036017 22.5859243,7.79665625 22.5859243,8.15298221 L22.585,9.899 L10.778,21.971 L9.47580645,21.9713498 C7.69424274,21.9713498 6.25,20.5271071 6.25,18.7455434 L6.25,15.65293 C6.25,13.8713663 7.69424274,12.4271235 9.47580645,12.4271235 L12.787,12.427 L19.9882064,6.87564241 C20.6936617,6.33174431 21.7064627,6.46271229 22.2503608,7.16816759 Z" id="形状结合" fill="').concat(r?"#ffffff":s?"#cccccc":e.backgroundColor,'"></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;user-select: none;">静音</div>\n </div>'),g.onclick=function(){var A=t.decoderState.state,i=A.talk,n=A.sound;if(A.play,A.rejection)return!1;console.log("静音"),i?(console.log("结束对讲"),t.setDecoderState({talk:!1,mute:!0},e.backgroundColor),t.jSPlugin.Talk.stopTalk(),t.jSPlugin.openSound()):(console.log("开始对讲"),t.setDecoderState({talk:!0,mute:!1},e.backgroundColor),n&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})),t.jSPlugin.Talk.startTalk())},g;case"hangUp":return g.title="挂断",g.id=A,g.domString='<div style="width: '.concat(.7*c,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width:').concat(.5*c,"px;height: ").concat(.5*c,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.3*c,'px" height="').concat(.3*c,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>挂断</title>\n <g id="icon/挂断" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*c,'px;">挂断</div>\n </div>'),g.onclick=function(){var A=t.decoderState.state,e=A.talk,i=A.play,n=A.sound;if(A.rejection)return!1;e&&(console.log("结束对讲"),t.setDecoderState({talk:!1}),t.jSPlugin.Talk.stopTalk()),i&&(t.jSPlugin.stop(),t.setDecoderState({play:!i})),n&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})),(i||e)&&(console.log("挂断"),t.removeBellRing(),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp"))},g;default:return g}}},{key:"answerOvertime",value:function(){this.toastCustom.initToastContent("应答超时");var A=this.decoderState.state.play;console.log("应答超时"),A&&this.jSPlugin.stop(),this.setDecoderState({play:!1,rejection:!0}),this.rejectionStatusDispose(),this.switchFooter("onBell"),"function"==typeof this.jSPlugin.hangUpCallback&&this.jSPlugin.hangUpCallback("rejection")}},{key:"rejectionStatusDispose",value:function(){var A=this,e=this.themeData.footer,t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")),n=document.getElementById("header-".concat(this.bellStatus,"-ringStatus"));"onBell"==this.bellStatus?(t.innerHTML="",t.style.color="#ffffff"):(i.innerHTML="",i.style.color="#ffffff"),console.log("rejectionStatusDispose"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),n.innerText="通话已结束",this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:!1,type:2})}},{key:"userNoDevice",value:function(){var A=this;this.removeBellRing(),this.setDecoderState({rejection:!0});var e=this.themeData.footer,t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));"onBell"==this.bellStatus?(t.innerHTML="",t.style.color="#ffffff"):(i.innerHTML="",i.style.color="#ffffff"),console.log("userNoDevice"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"该用户不拥有该设备",color:"white",isMobile:!1,type:2})}},{key:"renderHeader",value:function(A,e){var t=this,i=this.videoWidth/1024||1,n=this.matchBtn(A,e);if(document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content"))){var a=document.createElement("span");a.innerHTML="".concat(n.domString),document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content")).appendChild(a)}else{var o=document.createElement("div");o.id="".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus),o.style="max-width:50%;position:relative;",o.innerHTML='<span id="'.concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,'-content" style="display:inline-block;height:auto;padding-top: ').concat(32*i,'px;";>\n ').concat(n.domString,"\n </span>"),o.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onclick(A)},document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(o)}}},{key:"renderFooter",value:function(A,e){var t=this,i=this.decoderState.state.mute;if(console.log("-------------renderFooter"),"remoteUnlock"==A&&this.jSPlugin.capacity&&(!this.jSPlugin.capacity.support_unlock||0==this.jSPlugin.capacity.support_unlock))return!1;var n=this.matchBtn(A,e),a=this.videoWidth/6,o=document.createElement("div");o.className="theme-icon-item",this.jSPlugin.isWebConsole?o.style="padding:0 ".concat(.1*a,"px;"):o.style="padding:0 ".concat(.1*a,"px;cursor: pointer;"),o.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-content" title="').concat(n.title,'" style="display: flex;align-items: center;position:relative;">')).concat(n.domString,"</div>")+"</span>",o.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onclick(A)},n.onmouseenter&&(o.onmouseenter=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseenter(A)}),n.onmouseleave&&(o.onmouseleave=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseleave(A)});var r=this.videoWidth/597,s=document.createElement("span");s.className="icon-move left",s.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-left" title="左移" style="display: inline-block;border-radius: 2px;overflow: hidden;position: absolute;top: calc(50% - ').concat(35*r,"px); width: ").concat(10*r,"px; height: ").concat(40*r,'px;cursor: pointer;">\n <svg width="100%" height="100%" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-614.000000, -5024.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="箭头左" transform="translate(0.000000, 18.000000)">\n <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(1.000000, 15.000000)" fill="#FFFFFF">\n <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),s.onclick=function(){t.editIcon(n.id,"left","footer")},o.appendChild(s);var g=document.createElement("span");if(g.className="icon-move right",g.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-right" class="ezuikit-theme-icon" title="右移" style="display: inline-block;border-radius: 2px;overflow: hidden;position: absolute;top: calc(50% - ').concat(35*r,"px);left: ").concat(20*r+.5*a,"px; width: ").concat(10*r,"px; height: ").concat(40*r,'px;cursor: pointer;">\n <svg width="100%" height="100%" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-684.000000, -5024.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="箭头右" transform="translate(70.000000, 18.000000)">\n <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(5.500000, 20.000000) scale(-1, 1) translate(-5.500000, -20.000000) translate(2.000000, 15.000000)" fill="#FFFFFF">\n <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),g.onclick=function(){t.editIcon(n.id,"right","footer")},o.appendChild(g),"answer"==A||"rejection"==A||"hangUp"==A);else{var c=document.createElement("span");c.className="icon-move close",c.innerHTML='<span id="'.concat(n.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: ').concat(-15*r-1,"px;left: ").concat(20*r+.5*a-4.5*r,'px;cursor: pointer;">\n <svg width="').concat(18*r,'" height="').concat(18*r,'" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-680.000000, -5006.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="关闭1" transform="translate(66.000000, 0.000000)">\n <rect id="矩形" fill-rule="nonzero" x="0" y="0" width="18" height="18"></rect>\n <path d="M9,1.125 C4.65117188,1.125 1.125,4.65117188 1.125,9 C1.125,13.3488281 4.65117188,16.875 9,16.875 C13.3488281,16.875 16.875,13.3488281 16.875,9 C16.875,4.65117188 13.3488281,1.125 9,1.125 Z M11.9074219,11.9917969 L10.7472656,11.9865234 L9,9.90351562 L7.25449219,11.9847656 L6.09257813,11.9900391 C6.01523438,11.9900391 5.95195313,11.9285156 5.95195313,11.8494141 C5.95195313,11.8160156 5.96425781,11.784375 5.98535156,11.7580078 L8.27226563,9.03339844 L5.98535156,6.31054687 C5.96425781,6.28417969 5.95195313,6.25253906 5.95195313,6.21914062 C5.95195313,6.14179687 6.01523438,6.07851562 6.09257813,6.07851562 L7.25449219,6.08378906 L9,8.16679687 L10.7455078,6.08554688 L11.9056641,6.08027344 C11.9830078,6.08027344 12.0462891,6.14179687 12.0462891,6.22089844 C12.0462891,6.25429687 12.0339844,6.2859375 12.0128906,6.31230469 L9.72949219,9.03515625 L12.0146484,11.7597656 C12.0357422,11.7861328 12.0480469,11.8177734 12.0480469,11.8511719 C12.0480469,11.9285156 11.9847656,11.9917969 11.9074219,11.9917969 Z" id="形状" fill="#595959"></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),c.onclick=function(){t.editIcon(n.id,"delete","footer")},o.appendChild(c)}"onCall"==this.bellStatus?document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).appendChild(o):document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).appendChild(o),this.decoderState.state.isEditing&&"mute"==A&&"onCall"==this.bellStatus&&(0!=this.themeData.customConfig.defaultMicro||i?this.setDecoderState({mute:!1},e.backgroundColor):this.setDecoderState({mute:!0},e.backgroundColor))}},{key:"switchFooter",value:function(A){var e={};switch(this.themeData&&(e=this.themeData.footer),A){case"onBell":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply")).style.display="none"),document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"))?"none"==document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex"):document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex";break;case"onCall":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display="flex",this.themeData&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=e[this.bellStatus].color);break;case"quickReply":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none";break;case"remoteUnlock":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock")).style.display="flex"}}},{key:"initThemeData",value:function(){var A=this;console.log("-------------initThemeData");var e=this.decoderState.state.isEditing,t=this.themeData,i=t.header,n=t.footer,a=this.jSPlugin.id,o=this.videoWidth/1024;if(this.isNeedRenderHeader=bt(i[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderFooter=bt(n[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderHeader)if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width: calc(100% - 100px);padding-left: 3%;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>");else{var r=document.createElement("div");r.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),r.setAttribute("class","header-controls"),r.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex;width:calc(100% - 100px);overflow:hidden;padding-left: 3%;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' class=\"header-controls-right\" style='display:flex;'></div>"),console.log(this.jSPlugin.height);var s=.2*this.jSPlugin.height+"px",g={height:s,display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:"100%",position:"relative","margin-bottom":"-"+s,"align-items":"center",background:"transparent linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)"};r.style=Ui(g),document.getElementById("".concat(a,"-wrap")).insertBefore(r,document.getElementById(a));var c=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(c)}),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")));var l=.3*this.jSPlugin.height;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(l,"px"),"onCall"==this.bellStatus?document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 4%;width:100%;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '):document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 4%;width:100%;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '));else{var I=document.createElement("div");I.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container")),I.setAttribute("class","ez-iframe-footer-container");var C={"min-height":l+"px","max-height":l+"px",position:"relative","margin-top":"-"+l+"px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%","align-items":"center","background-image":"linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.60) 100%)","font-size":24*o+"px"};I.style=Ui(C),I.innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '),m(I,document.getElementById(a))}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=i[this.bellStatus].backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=i[this.bellStatus].color,i[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderHeader(e.iconId,e)}))),this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=n[this.bellStatus].backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=n[this.bellStatus].color,n[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)}))),1==this.themeData.customConfig.bellPoster&&!e){this.jSPlugin.poster="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg";var d=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(d),A.jSPlugin.setPoster(A.jSPlugin.poster))}),50)}this.activeThemeStatus&&(this.initBellRing(),window.addEventListener("click",this.autoPlayRing)),this.inited=!0,this.getCallDeviceInfo()}},{key:"renderThemeData",value:function(){var A=this,e=this.decoderState.state.isEditing,t=this.themeData,i=t.header,n=t.footer;if(this.isNeedRenderHeader&&i&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=i[this.bellStatus].backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=i[this.bellStatus].color.replace("-diy",""),i[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId]))}))),this.isNeedRenderFooter&&n)document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=n[this.bellStatus].backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=n[this.bellStatus].color.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=n[this.bellStatus].color.replace("-diy",""),n[this.bellStatus].btnList.map((function(t,i){if(t.isrender&&A.setDecoderState(s({},t.iconId,A.decoderState.state[t.iconId])),0==i&&!A.themeInited&&A.activeThemeStatus)var n=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(n),1!=A.themeData.customConfig.bellPoster||e?A.jSPlugin.play():A.jSPlugin.pluginStatus.loadingClear(),A.themeInited=!0)}),50)})),-1!==this.jSPlugin.url.indexOf("hd.live")&&this.setDecoderState({hd:!0}),this.themeData.autoFocus>0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",(function(){A.stopAutoFocus()}))),this.setDecoderState({cloudRec:"cloud.rec"===_(this.jSPlugin.url).type,rec:"rec"===_(this.jSPlugin.url).type,type:_(this.jSPlugin.url).type});else if(!this.themeInited&&this.activeThemeStatus)var a=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(a),A.themeData&&A.themeData.customConfig&&1==A.themeData.customConfig.bellPoster&&!e?A.jSPlugin.pluginStatus.loadingClear():A.jSPlugin.play(),A.themeInited=!0)}),50);var o=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(o),A.jSPlugin.reSize(A.jSPlugin.params.width,A.jSPlugin.params.height))}),50)}},{key:"setThemeData",value:function(A,e){this.themeData=A,"onCall"==e&&(this.bellStatus="onCall")}},{key:"startAutoFocus",value:function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById("".concat(A.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.pointerEvents="none")}),1e3*e)}},{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:"editIcon",value:function(A,e,t){console.log("编辑组件",A,e,t);var i=this.themeData;console.log("themeData",this.themeData);var n=this.themeData[t][this.bellStatus].btnList,a=bt(n,(function(e){return e.iconId===A})),o=n[a];switch(e){case"delete":n[a].isrender=0;break;case"right":for(var r=-1,s=a+1;s<n.length;s++)if(n[s].part===n[a].part&&1==n[s].isrender){r=s;break}-1!==r&&(n[a]=n[r],n[r]=o);break;case"left":for(var g=-1,c=a-1;c>=0;c--)if(n[c].part===n[a].part&&1==n[c].isrender){g=c;break}-1!==g&&(n[a]=n[g],n[g]=o)}console.log("new btnList",n),i[t][this.bellStatus].btnList=n,this.jSPlugin.Theme.changeTheme(i)}},{key:"countTime",value:function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='<span class="dot"></span><span class="value">00:00</span>',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",o="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),o=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?o+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))}},{key:"editStart",value:function(A){console.log("----------editStart2");var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));document.getElementById("".concat(this.jSPlugin.id,"-headControl")),e&&e.setAttribute("class","footer-controls themeEditing"),t&&t.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})}},{key:"editEnd",value:function(A){console.log("----------editEnd2");var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-headControl")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));t&&t.setAttribute("class","header-controls"),e&&e.setAttribute("class","footer-controls"),i&&i.setAttribute("class","footer-controls")}},{key:"fetchThemeData",value:function(A){var e=this;Di(this.jSPlugin,A,(function(A){0==A.meta.code&&A.data?(e.activeThemeStatus=!0,e.themeData=A.data,A.data.header&&(e.themeData.header=A.data.header,e.themeData.header[e.bellStatus].btnList=e.themeData.header[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),A.data.footer&&(e.themeData.footer=A.data.footer,e.themeData.footer[e.bellStatus].btnList=e.themeData.footer[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.jSPlugin.capacity?(e.initThemeData(),e.renderThemeData()):setTimeout((function(){e.initThemeData(),e.renderThemeData()}),300)):(e.activeThemeStatus=!1,e.jSPlugin.pluginStatus.loadingClear(),e.setDecoderState({rejection:!0}),"111021"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"无效的模板id",color:"#fff"}),e.activeThemeStatusTxt="无效的模板id"):"111023"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"您的试用特权已到期,需前往轻应用控制台购买后使用。",color:"#fff"}),e.activeThemeStatusTxt="试用特权已到期"):(e.jSPlugin.pluginStatus.loadingSetText({text:"模板未激活,请先在开放平台轻应用控制台购买模板",color:"#fff"}),e.activeThemeStatusTxt="模板未激活"),e.themeData=Yi,e.initThemeData(),e.renderThemeData())}),(function(){e.renderThemeData()}))}},{key:"getCallDeviceInfo",value:function(){var A=this;this.videoWidth,Gi({accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,deviceSerial:_(this.jSPlugin.url).deviceSerial}).then((function(e){console.log("---------getCallDeviceInfo"),A.deviceInfoData=e.data,e.data.isEncrypt&&setTimeout((function(){A.jSPlugin.pluginStatus.loadingClear(),A.jSPlugin.pluginStatus.loadingSetText({text:"视频已加密",color:"#fff"})}),500),document.getElementById("header-".concat(A.bellStatus,"-deviceCategory"))&&(document.getElementById("header-".concat(A.bellStatus,"-deviceCategory")).innerText=""+e.data.deviceName)})).catch((function(e){20018!=e.code||A.jSPlugin.isWebConsole||A.userNoDevice(),console.log("获取设备信息失败",e)}))}},{key:"setHeaderText",value:function(A){var e=this.videoWidth/1024||1;document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content"))&&(document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content")).innerHTML='<span style="font-size: '.concat(32*e,'px;display: block">').concat(A,'</span><span style="font-size: ').concat(24*e,"px;padding-top: ").concat(16*e,'px;display: block;">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"","</span>"))}}])}(),Hi=function(){function A(e,i){t(this,A),this.jSPlugin=e,this.heightPop=i||366,A._instanceStyle(),this.initPopupCustom()}return o(A,[{key:"initPopupCustom",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom"))?document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom")).style.display="flex":this.randerPopup()}},{key:"randerPopup",value:function(){var A=this,e=document.documentElement.clientWidth/375||1,t=document.getElementById("".concat(this.jSPlugin.id,"-wrap")),i=document.createElement("div");i.style="display:flex;",i.id="".concat(this.jSPlugin.id,"-wrap-popup-custom"),i.innerHTML='<div id="'.concat(this.jSPlugin.id,'-wrap-popup-custom-mask" style="height:100%;width:100%;position:fixed;top:0;left:0;z-index:9998;background-color: rgba(0,0,0,0.75);overflow:hidden;">\n </div>\n <div id="').concat(this.jSPlugin.id,'-wrap-popup-board" class="open-popup" style="bottom:0;height: ').concat(this.heightPop*e,'px;position:fixed;left: 0; width: 100%;background-color:#ffffff;z-index: 9999;border-radius: 16px 16px 0px 0px;">\n <div style="margin-top: ').concat(20*e,"px;padding: 0 ").concat(15*e,'px;width: 100%;display:flex;flex-direction: row;align-items: center;">\n <div id="').concat(this.jSPlugin.id,'-popup-board-close">\n <svg width="').concat(24*e,'px" height="').concat(24*e,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/close</title>\n <g id="icon/close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="common/Close/Dark">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z" id="形状结合" fill="#2C2C2C" fill-rule="nonzero"></path>\n </g>\n </g>\n </svg>\n </div>\n <div id="popup-board-title-content" style="width: ').concat(180*e,"px;font-size: ").concat(18*e,"px;margin-left: ").concat(59*e,'px;font-family: PingFangSC-Medium;color: #2C2C2C;font-weight: 500;text-align: center;"></div>\n </div>\n <div id="').concat(this.jSPlugin.id,'-popup-board-content" style="width:100%;padding: 0 ').concat(15*e,"px;height: ").concat((this.heightPop-48)*e,'px;box-sizing: border-box;display: flex;align-items: center;justify-content: center;flex-direction: column;"></div>\n </div>\n '),t.appendChild(i),document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom-mask")).onclick=function(){A.closePopupCustom()},document.getElementById("".concat(this.jSPlugin.id,"-popup-board-close")).onclick=function(){A.closePopupCustom()}}},{key:"closePopupCustom",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){})();var A=document.getElementById("".concat(this.jSPlugin.id,"-wrap")),e=document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom"));A&&e&&A.removeChild(e)}},{key:"initPopupContent",value:function(A,e){document.getElementById("popup-board-title-content").innerText=A||"",e&&document.getElementById("".concat(this.jSPlugin.id,"-popup-board-content")).appendChild(e)}}],[{key:"_instanceStyle",value:function(){if(!A._STYLE){var e=document.documentElement.clientWidth/375||1;A._STYLE=document.createElement("style"),A._STYLE.innerHTML="@keyframes slideContentUp {0% {bottom: -".concat(366*e,"px;}\n 25% {bottom: -").concat(244*e,"px;}\n 50% {bottom: -").concat(122*e,"px;}\n 100% {bottom:0;}} .open-popup{animation:slideContentUp 0.3s 1 linear; -webkit-animation: slideContentUp 0.3s 1 linear;}"),document.getElementsByTagName("head")[0].appendChild(A._STYLE)}}}])}();s(Hi,"_STYLE",void 0);var Ki=function(){return o((function A(e,i,n){t(this,A),this.jSPlugin=e,this.videoWidth=n,this.switchFooter=i,this.toastCustom=new Ri(e,!0),this.sendLoadingStats=!1,this.quickReplyList=["你好,请将快递放在门口","你好,稍等","你好,请将快递放入小区快递柜","你好,请将外卖放在门口"],this.popupCustom=new Hi(e,366),document.getElementById("mobile-quickReply-list")||(this.popupCustom.initPopupContent("快捷回复",this.renderQuickReply()),this.initQuickReply())}),[{key:"initQuickReply",value:function(){document.getElementById("mobile-quickReply-list-item-0")||this.getQuickReplyList()}},{key:"renderQuickReply",value:function(){document.documentElement.clientWidth;var A=document.createElement("div");return A.style="width:100%;",A.id="mobile-quickReply-list",A.innerHTML='<div id="mobile-quickReply-content" style="display: block;width:100%;margin-bottom: 36px;"></div>\n <div id="mobile-quickReply-loading" style="display: none;width:100%;"></div>\n <div id="mobile-quickReply-loaderror" style="display: none;width:100%;"></div>',A}},{key:"matchQuickReplyBtn",value:function(){var A=this,e=this.videoWidth/375||1,t=document.getElementById("mobile-quickReply-content");this.quickReplyList&&this.quickReplyList.length>0&&this.quickReplyList.forEach((function(i,n){var a=document.createElement("div");a.id="mobile-quickReply-list-item-".concat(n),a.style="margin: ".concat(14*e,"px 0;\n padding: ").concat(12*e,"px ").concat(15*e,"px;min-height: ").concat(50*e,"px;width:100%;\n background: #ffffff;border-radius: ").concat(25*e,"px;display: flex;align-items: center;\n box-sizing: border-box;font-size:").concat(16*e,"px;color: #2c2c2c;"),a.innerHTML='\n <svg id="mobile-quickReply-icon-'.concat(n,'" width="').concat(24*e,'px" height="').concat(24*e,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/快捷回复播放</title>\n <g id="icon/快捷回复播放" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M18.9877488,4.36609064 C21.024173,6.11256041 22.2495,8.93566941 22.2495,12.0024 C22.2495,15.066006 21.0272636,17.8857191 18.9943957,19.6331539 C18.6802816,19.9031635 18.2067557,19.8674098 17.9367461,19.5532957 C17.6667365,19.2391816 17.7024902,18.7656557 18.0166043,18.4956461 C19.708691,17.0411437 20.7495,14.6399857 20.7495,12.0024 C20.7495,9.36223947 19.7060688,6.95821183 18.0112512,5.50470936 C17.6968304,5.23505702 17.6605383,4.76157212 17.9301906,4.44715124 C18.199843,4.13273036 18.6733279,4.09643829 18.9877488,4.36609064 Z M12.2442357,5.87579772 L12.2496,6.0179 L12.2496,17.9819 C12.2496,19.4241617 10.6173522,20.2281184 9.48072691,19.4058312 L9.36879527,19.318145 L5.5996,16.1243865 L3.4996,16.1249 C2.581479,16.1249 1.8284129,15.4182283 1.75540159,14.518493 L1.7496,14.3749 L1.7496,9.6249 C1.7496,8.70699712 2.45696726,7.95373471 3.35611134,7.88070323 L3.4996,7.8749 L5.5996,7.8743865 L9.36863059,4.68279453 C10.4692948,3.74976994 12.1377395,4.4768074 12.2442357,5.87579772 Z M10.3952894,5.79039368 L10.338321,5.82721597 L6.35932099,9.19721597 C6.33078024,9.2209397 6.30781291,9.23786997 6.28390041,9.25347262 L6.35932099,9.19721597 C6.32908972,9.22282023 6.29742069,9.24561685 6.26463127,9.26563212 C6.24087088,9.28012218 6.21634729,9.29327785 6.19105714,9.30506452 C6.18413632,9.30829747 6.1773583,9.31133066 6.1705483,9.31425704 C6.10964585,9.34044144 6.04445985,9.35881628 5.97637056,9.36805338 C5.95756973,9.37054904 5.94148484,9.37214804 5.92538001,9.37322799 L5.8746,9.3749 L3.4996,9.3749 C3.38149734,9.3749 3.28218291,9.45734262 3.25621762,9.56766695 L3.2496,9.6249 L3.2496,14.3749 C3.2496,14.4934644 3.33170357,14.592449 3.44222164,14.6183106 L3.4996,14.6249 L5.8746,14.6249 L5.92192315,14.6263483 C5.93923255,14.627429 5.95652113,14.629109 5.97375563,14.6313909 L5.8746,14.6249 C5.9789469,14.6249 6.0783167,14.6462095 6.168595,14.6847142 C6.18010037,14.6895946 6.19235048,14.695194 6.2044823,14.7011451 C6.22547728,14.7114805 6.24528995,14.7223727 6.26453263,14.7341072 C6.266314,14.735195 6.26795143,14.7362034 6.26958602,14.7372187 L6.28086895,14.7443598 C6.30587317,14.7605037 6.32985559,14.7780945 6.3526978,14.7970136 L6.35940473,14.802655 L10.3380567,18.1733603 C10.4825575,18.2956302 10.695338,18.2179271 10.7408386,18.0492187 L10.7496,17.9819 L10.7496,6.0179 C10.7496,5.82820058 10.5532313,5.71607381 10.3952894,5.79039368 Z M15.9361636,7.38657032 C17.3580982,8.28109203 18.2498,10.0509458 18.2498,12.0044 C18.2498,13.9607796 17.3563865,15.7307985 15.9326223,16.6154437 C15.5807928,16.8340503 15.1183629,16.7260519 14.8997563,16.3742223 C14.6811497,16.0223928 14.7891481,15.5599629 15.1409777,15.3413563 C16.1036696,14.7431949 16.7498,13.4630899 16.7498,12.0044 C16.7498,10.5466827 16.103548,9.26399865 15.1374364,8.65622968 C14.7868297,8.43566726 14.6814079,7.97264316 14.9019703,7.62203641 C15.1225327,7.27142966 15.5855568,7.1660079 15.9361636,7.38657032 Z" id="形状结合" fill="#2C2C2C" fill-rule="nonzero"></path>\n </g>\n </svg>\n <span id="mobile-quickReply-name-').concat(n,'" style="padding-left: 5px;">').concat(i.voiceName,"</span>"),a.onclick=function(){console.log("item:"+i),A.sendLoadingStats||(A.setBtnCheckStatus(n),A.sendQuickReply(i))},t.appendChild(a)}))}},{key:"setBtnCheckStatus",value:function(A){var e=this,t="";this.quickReplyList.forEach((function(i,n){t=document.getElementById("mobile-quickReply-list-item-".concat(n)),n==A?(t.style.background="#F4F6FC",t.style.color="#648FFC",e.setBtnCheckLoding(0,n)):(t.style.background="#ffffff",t.style.color="#2c2c2c")}))}},{key:"setBtnCheckLoding",value:function(A,e){console.log(e);var t=this.videoWidth/375||1;if(e>-1){var i=document.getElementById("mobile-quickReply-list-item-".concat(e)),n=document.getElementById("mobile-quickReply-name-".concat(e)),a=document.getElementById("mobile-quickReply-icon-".concat(e));if(1==A){if(document.getElementById("mobile-quickReply-icon-loading-".concat(e))&&n){var o=document.createElement("span");o.id="mobile-quickReply-icon-".concat(e),o.style="height:".concat(24*t,"px;"),o.innerHTML='\n <svg width="'.concat(24*t,'px" height="').concat(24*t,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/快捷回复播放</title>\n <g id="icon/快捷回复播放" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M18.9877488,4.36609064 C21.024173,6.11256041 22.2495,8.93566941 22.2495,12.0024 C22.2495,15.066006 21.0272636,17.8857191 18.9943957,19.6331539 C18.6802816,19.9031635 18.2067557,19.8674098 17.9367461,19.5532957 C17.6667365,19.2391816 17.7024902,18.7656557 18.0166043,18.4956461 C19.708691,17.0411437 20.7495,14.6399857 20.7495,12.0024 C20.7495,9.36223947 19.7060688,6.95821183 18.0112512,5.50470936 C17.6968304,5.23505702 17.6605383,4.76157212 17.9301906,4.44715124 C18.199843,4.13273036 18.6733279,4.09643829 18.9877488,4.36609064 Z M12.2442357,5.87579772 L12.2496,6.0179 L12.2496,17.9819 C12.2496,19.4241617 10.6173522,20.2281184 9.48072691,19.4058312 L9.36879527,19.318145 L5.5996,16.1243865 L3.4996,16.1249 C2.581479,16.1249 1.8284129,15.4182283 1.75540159,14.518493 L1.7496,14.3749 L1.7496,9.6249 C1.7496,8.70699712 2.45696726,7.95373471 3.35611134,7.88070323 L3.4996,7.8749 L5.5996,7.8743865 L9.36863059,4.68279453 C10.4692948,3.74976994 12.1377395,4.4768074 12.2442357,5.87579772 Z M10.3952894,5.79039368 L10.338321,5.82721597 L6.35932099,9.19721597 C6.33078024,9.2209397 6.30781291,9.23786997 6.28390041,9.25347262 L6.35932099,9.19721597 C6.32908972,9.22282023 6.29742069,9.24561685 6.26463127,9.26563212 C6.24087088,9.28012218 6.21634729,9.29327785 6.19105714,9.30506452 C6.18413632,9.30829747 6.1773583,9.31133066 6.1705483,9.31425704 C6.10964585,9.34044144 6.04445985,9.35881628 5.97637056,9.36805338 C5.95756973,9.37054904 5.94148484,9.37214804 5.92538001,9.37322799 L5.8746,9.3749 L3.4996,9.3749 C3.38149734,9.3749 3.28218291,9.45734262 3.25621762,9.56766695 L3.2496,9.6249 L3.2496,14.3749 C3.2496,14.4934644 3.33170357,14.592449 3.44222164,14.6183106 L3.4996,14.6249 L5.8746,14.6249 L5.92192315,14.6263483 C5.93923255,14.627429 5.95652113,14.629109 5.97375563,14.6313909 L5.8746,14.6249 C5.9789469,14.6249 6.0783167,14.6462095 6.168595,14.6847142 C6.18010037,14.6895946 6.19235048,14.695194 6.2044823,14.7011451 C6.22547728,14.7114805 6.24528995,14.7223727 6.26453263,14.7341072 C6.266314,14.735195 6.26795143,14.7362034 6.26958602,14.7372187 L6.28086895,14.7443598 C6.30587317,14.7605037 6.32985559,14.7780945 6.3526978,14.7970136 L6.35940473,14.802655 L10.3380567,18.1733603 C10.4825575,18.2956302 10.695338,18.2179271 10.7408386,18.0492187 L10.7496,17.9819 L10.7496,6.0179 C10.7496,5.82820058 10.5532313,5.71607381 10.3952894,5.79039368 Z M15.9361636,7.38657032 C17.3580982,8.28109203 18.2498,10.0509458 18.2498,12.0044 C18.2498,13.9607796 17.3563865,15.7307985 15.9326223,16.6154437 C15.5807928,16.8340503 15.1183629,16.7260519 14.8997563,16.3742223 C14.6811497,16.0223928 14.7891481,15.5599629 15.1409777,15.3413563 C16.1036696,14.7431949 16.7498,13.4630899 16.7498,12.0044 C16.7498,10.5466827 16.103548,9.26399865 15.1374364,8.65622968 C14.7868297,8.43566726 14.6814079,7.97264316 14.9019703,7.62203641 C15.1225327,7.27142966 15.5855568,7.1660079 15.9361636,7.38657032 Z" id="形状结合" fill="#2C2C2C" fill-rule="nonzero"></path>\n </g>\n </svg>\n '),i.insertBefore(o,n)}}else if(a&&n){i.removeChild(a);var r=document.createElement("span");r.id="mobile-quickReply-icon-loading-".concat(e),r.style="height:".concat(20*t,"px;width: ").concat(24*t,"px;"),r.innerHTML='<svg width="'.concat(20*t,'" height="').concat(20*t,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#666666" p-id="2400"></path></svg>'),i.insertBefore(r,n)}}}},{key:"getQuickReplyList",value:function(){var A=this;console.log("getQuickReplyList"),this.madeLoadingDom(0);Ni(this.jSPlugin,(function(e){if(e&&200==e.code){var t=e.data||[],i=[];e.data.forEach((function(A,e){i=A.voiceName.split("_"),t[e].voiceName=i[1]})),A.quickReplyList=t,setTimeout((function(){A.madeLoadingDom(2)}),500)}else A.madeLoadingDom(1)}),(function(e){console.log(e),A.madeLoadingDom(1)}))}},{key:"madeLoadingDom",value:function(A){var e=this,t=this.videoWidth/375||1;if(0==A){if(document.getElementById("mobile-quickReply-content").style.display="none",document.getElementById("mobile-quickReply-loaderror").style.display="none",document.getElementById("mobile-quickReply-loading").style.display="block",!document.getElementById("mobile-quickReply-loading-box")){var i=document.createElement("div");i.id="mobile-quickReply-loading-box",i.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: row;",i.innerHTML='<div class="" style="heigth:'.concat(20*t,'px">\n <svg width="').concat(20*t,'" height="').concat(20*t,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#666666" p-id="2400"></path></svg> \n </div>\n <div style="font-size: ').concat(16*t,"px;margin-left:",10,'px;color:#666666;">正在加载,请稍候</div>'),document.getElementById("mobile-quickReply-loading").appendChild(i)}}else if(1==A){if(document.getElementById("mobile-quickReply-content").style.display="none",document.getElementById("mobile-quickReply-loading").style.display="none",document.getElementById("mobile-quickReply-loaderror").style.display="block",!document.getElementById("mobile-quickReply-loaderror-box")){var n=document.createElement("div");n.id="mobile-quickReply-loaderror-box",n.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;",n.innerHTML='<div style="">\n <img style="width:'.concat(186*t,"px;height:").concat(120*t,'px;" src="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPZ34KAAStrAAA0pZ5cGTw167.png" />\n </div>\n <div style="font-size: ').concat(16*t,'px;color: #666666;">\n <span>加载失败 </span>\n <span id="mobile-quickReply-loaderror-reload" \n style="color: #648FFC;-webkit-tap-highlight-color: transparent;">点击重试</span>\n </div>'),document.getElementById("mobile-quickReply-loaderror").appendChild(n),document.getElementById("mobile-quickReply-loaderror-reload").onclick=function(){e.getQuickReplyList()}}}else document.getElementById("mobile-quickReply-loading").style.display="none",document.getElementById("mobile-quickReply-loaderror").style.display="none",document.getElementById("mobile-quickReply-content").style.display="block",this.matchQuickReplyBtn()}},{key:"sendQuickReply",value:function(A){var e=this;this.sendLoadingStats=!0;Ti(this.jSPlugin,A.fileUrl,(function(A){e.sendLoadingStats=!1,A&&200==A.code?e.toastCustom.initToastContent("快捷回复成功"):e.toastCustom.initToastContent("快捷回复失败,请重试"),e.popupCustom.closePopupCustom()}),(function(A){console.log(A),e.sendLoadingStats=!1,e.toastCustom.initToastContent("快捷回复失败,请重试"),e.popupCustom.closePopupCustom()}))}},{key:"closeQuickReplyEle",value:function(){this.popupCustom.closePopupCustom()}}])}(),Vi=function(){return o((function A(e,i,n){t(this,A),this.jSPlugin=e,this.videoWidth=n,this.switchFooter=i,this.toastCustom=new Ri(e,!0),this.lockStatus=!1,this.popupCustom=new Hi(e,265),this.popupCustom.initPopupContent("远程开锁",this.renderRemoteUnlock()),this.renderRemoteUnlockSlide()}),[{key:"initRemoteUnlock",value:function(){document.getElementById("mobile-remoteUnlock-content")?this.madeSlideEvent():this.renderRemoteUnlock()}},{key:"renderRemoteUnlock",value:function(){var A=this.videoWidth/1024||1,e=document.createElement("div");return e.style="width:100%;",e.id="mobile-remoteUnlock-box",e.innerHTML='<div style="width:100%;display:flex;flex-direction:row;align-items: center;">\n <div id="mobile-remoteUnlock-content" style="display: block;width:calc(100% - '.concat(160*A,"px);margin: 0 ").concat(24*A,'px;"></div>\n </div>'),e}},{key:"renderRemoteUnlockSlide",value:function(){var A=this.videoWidth/375||1,e=document.getElementById("mobile-remoteUnlock-content"),t=document.createElement("div");t.id="mobile-remoteUnlock-content-slide",t.style="width: 100%;display: flex;justify-content: center;padding: 0 ".concat(15*A,"px"),t.innerHTML='<div id="mobile-remoteUnlock-slide-box" style="width: 100%;line-height: '.concat(60*A,"px;height: ").concat(60*A,"px;border: 1px solid rgba(100,143,252,1);border-radius: ").concat(30*A,'px;position: relative;text-align: center;">\n <div id="mobile-remoteUnlock-slide-bgColor" style="border-radius: ').concat(30*A,"px;width: ").concat(44*A,"px;height: ").concat(60*A,'px;position: absolute;left: 0;top: 0;"></div>\n <div id="mobile-remoteUnlock-slide-tips" style="height: ').concat(60*A,"px;line-height: ").concat(60*A,"px;font-size: ").concat(14*A,"px;border-radius: ").concat(30*A,'px;position: absolute;text-align: center;user-select: none;color: #666666;width: 100%;">右滑开锁</div>\n <div id="mobile-remoteUnlock-slide-ball" style="top: ').concat(8*A,"px;left: ").concat(8*A,"px;width: ").concat(44*A,"px;height: ").concat(44*A,'px;background: #598FFF;position: absolute;text-align: center;border-radius:50%;display:flex;align-items: center;justify-content: center;">\n <svg id="slide-ball-start" style="display: inline;" width="').concat(24*A,'px" height="').concat(24*A,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/箭头向右</title>\n <g id="icon/箭头向右" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="0" y="0" width="24" height="24"></rect>\n <path d="M14.2841136,6.3689007 L19.9432338,12.0287579 L14.2863796,17.6856122 L12.8580239,16.2572565 L16.114,12.9999007 L4.00000001,13 L4.00000001,11 L16.058,10.9999007 L12.8557579,7.79725638 L14.2841136,6.3689007 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n <svg id="slide-ball-end" style="display: none;" width="').concat(20*A,'" height="').concat(20*A,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#648ffc" p-id="2400"></path></svg>\n </div>\n </div>'),e.appendChild(t),this.madeSlideEvent()}},{key:"madeSlideEvent",value:function(){var A=this.videoWidth/375||1,e=document.getElementById("mobile-remoteUnlock-slide-box"),t=document.getElementById("mobile-remoteUnlock-slide-bgColor"),i=document.getElementById("mobile-remoteUnlock-slide-tips"),n=document.getElementById("mobile-remoteUnlock-slide-ball"),a=this;n.ontouchstart=function(o){console.log("ontouchstart");var r=(o=o||window.event).touches[0].pageX;n.style.transition="",t.style.transition="",document.ontouchmove=function(o){var s=(o=o||window.event).touches[0].pageX-e.offsetLeft-r,g=e.clientWidth-n.clientWidth-8*A;s<=0&&(s=0),s>=g&&(s=g),n.style.left=s+"px",s!=g||a.lockStatus||(a.lockStatus=!0,document.getElementById("slide-ball-start").style.display="none",document.getElementById("slide-ball-end").style.display="inline",t.style.width=e.clientWidth+"px",t.style.backgroundColor="#598FFF",e.style.border="0",n.style.backgroundColor="#ffffff",i.textContent="正在开锁",i.style.color="#ffffff",n.ontouchstart=null,a.sendRemoteUnlockApi())},document.ontouchend=function(){a.lockStatus||(t.style.width="0px",n.style.left=8*A+"px",n.style.transition="left 0.6s linear",t.style.transition="width 0.6s linear"),document.ontouchend=null,document.ontouchmove=null}}}},{key:"resetRemoteUnlockSlide",value:function(){var A=this.videoWidth/1024||1;this.lockStatus=!1;var e=document.getElementById("mobile-remoteUnlock-slide-box"),t=document.getElementById("mobile-remoteUnlock-slide-bgColor"),i=document.getElementById("mobile-remoteUnlock-slide-tips"),n=document.getElementById("mobile-remoteUnlock-slide-ball");t.style.width="0px",n.style.left=8*A+"px",i.textContent="右滑开锁",i.style.color="#666666",document.getElementById("slide-ball-start").style.display="inline",document.getElementById("slide-ball-end").style.display="none",t.style.backgroundColor="#FFFFFF",e.style.border="1px solid rgba(255,255,255,1)",n.style.backgroundColor="#598FFF"}},{key:"sendRemoteUnlockApi",value:function(){var A=this;console.log("下发远程开锁");Pi(this.jSPlugin,(function(e){e&&200==e.code?A.toastCustom.initToastContent("开锁成功"):A.toastCustom.initToastContent("开锁失败,请重试"),A.popupCustom.closePopupCustom()}),(function(e){console.log(e),A.toastCustom.initToastContent("开锁失败,请重试"),A.popupCustom.closePopupCustom()}))}},{key:"closeRemoteUnlock",value:function(){this.popupCustom.closePopupCustom()}}])}(),Oi={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0},header:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000 linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)",activeColor:"#1890FF",autoFocus:0,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"ringStatus",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"callStatus",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]}},footer:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"quickReply",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"rejection",part:"left",defaultActive:0,isrender:1,color:"#2C2C2C",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"answer",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-3",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000080",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"mute",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"hangUp",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]}}},ji=function(A){var e="";return Object.keys(A).map((function(t,i){e+="".concat(t,":").concat(A[t]).concat(i<Object.keys(A).length-1?";":"")})),e},Wi=function(){return o((function A(e,i,n,a){var o=this;t(this,A),s(this,"switchCallStatus",(function(A){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=o.themeData,i=t.header,n=t.footer,a=null;if("onCall"==A){console.log("接听"),o.bellStatus="onCall",o.switchFooter("onCall"),n[o.bellStatus].btnList.map((function(A,e){A.isrender&&o.renderFooter(A.iconId,A),"mute"==A.iconId&&(a=A)})),i[o.bellStatus].btnList.map((function(A,e){A.isrender&&o.renderHeader(A.iconId,A)}));var r=document.getElementById("".concat(o.jSPlugin.id,"-header-onBell"));r&&r.parentElement.removeChild(r),1==o.themeData.customConfig.bellPoster&&document.getElementById("bellring-icon")&&document.getElementById("".concat(o.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon")),0==o.themeData.customConfig.defaultMicro&&a?o.muteCommon(a):o.setDecoderState({mute:!1},a.backgroundColor),o.removeBellRing(),o.miniRecCloseClick()}else console.log("响铃"),o.bellStatus="onBell",o.jSPlugin.Theme.changeTheme(o.themeData,e)})),s(this,"muteCommon",(function(A){var e=o.decoderState.state,t=e.talk,i=e.sound;t?(console.log("结束对讲"),o.setDecoderState({talk:!1,mute:!0},A.backgroundColor),o.jSPlugin.Talk.stopTalk(),i||o.jSPlugin.openSound()):(o.setDecoderState({talk:!1,mute:!0},A.backgroundColor),i||o.jSPlugin.openSound())})),s(this,"autoPlayRing",(function(){console.log("autoPlayRing");var A=document.getElementById("bellring-audio");A&&(A.muted=!1,A.src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3",A.paused&&A.play()),o.checkIsAppleDevice()||!1?window.removeEventListener("touchstart",o.autoPlayRing):window.removeEventListener("click",o.autoPlayRing)})),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.themeData=i,this.setDecoderState=n,this.decoderState=a,this.isNeedRenderHeader=!1,this.isNeedRenderFooter=!1,this.autoFocus=0,this.autoFocusTimer=null,this.bellStatus="onBell",this.recordTimer=null,this.nextRate=1,this.themeInited=!1,this.inited=!1,this.miniRecStatus="rec",this.activeThemeStatus=!0,this.activeThemeStatusTxt="模板未激活",this.miniRecNum=0,this.toastCustom=new Ri(e,!0)}),[{key:"initBellRing",value:function(){var A=this,e=this.decoderState.state,t=e.play,i=e.isEditing,n=this.videoWidth,a=n/375;this.maxBellTime=1e3*this.themeData.customConfig.maxBellTime;var o=document.getElementById("bellring"),r=document.getElementById("bellring-audio");if(!o&&!r){if(this.jSPlugin.isNeedBellRing){var s=document.createElement("div");s.id="bellring",s.innerHTML='<div>\n <audio id="bellring-audio" loop autoplay>\n <source src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3" type="audio/mpeg">\n </audio>\n </div>',document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(s)}if(1!=this.themeData.customConfig.bellPoster||i)document.getElementById("bellring-icon")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"));else{var g=1.8*n,c=6;document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(c=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+.1*g+6);var l=c+(this.videoHeight-130*a)/2,I=document.createElement("div");I.id="bellring-icon",I.style="position: absolute;pointer-events: none;background: none;width: 100%;\n position: absolute;top: ".concat(l,"px;display: flex;align-items: center;justify-content: center;"),I.innerHTML='<div style="width: '.concat(130*a,"px;height: ").concat(130*a,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.2);border-radius: 50%;">\n <div style="width: ').concat(80*a,"px;height: ").concat(80*a,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.3);border-radius: 50%;">\n <svg width="').concat(40*a,'px" height="').concat(40*a,'px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/响铃</title>\n <g id="icon/响铃" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <polygon id="Path" points="0 0 40.0000002 0 40.0000002 40.0000002 0 40.0000002"></polygon>\n <path d="M20.0000001,4.25000002 C22.0363461,4.25000002 23.698175,5.84879552 23.8000507,7.8591997 L23.8050001,8.05500003 L23.805316,8.99953253 C27.1874196,9.97041766 29.6921839,13.0354462 29.80936,16.723731 L29.80936,16.723731 L29.8133335,16.9800001 L29.8133335,21.6416668 C29.8133335,22.3259481 30.0858837,22.9835569 30.5703302,23.4680033 L30.5703302,23.4680033 L31.6386635,24.5363367 C32.338953,25.2366262 32.760721,26.1675592 32.8273086,27.1785295 L32.8273086,27.1785295 L32.8350001,27.4233334 C32.8350001,29.577547 31.0892137,31.3233335 28.9350001,31.3233335 L28.9350001,31.3233335 L24.5666667,31.323 L24.5650266,31.3951531 C24.4527075,33.8194458 22.4520933,35.7500001 20.0000001,35.7500001 C17.5482065,35.7500001 15.5473098,33.8197367 15.4349743,31.3967059 L15.4326667,31.323 L11.0666667,31.3233335 C9.06159524,31.3233335 7.39851917,29.8069287 7.18810198,27.8229374 L7.17194359,27.6230185 L7.1666667,27.4233334 C7.1666667,26.3411154 7.59733134,25.3020086 8.36300328,24.5363367 L8.36300328,24.5363367 L9.43133662,23.4680033 C9.91578309,22.9835569 10.1883334,22.3259481 10.1883334,21.6416668 L10.1883334,21.6416668 L10.1883334,16.9800001 C10.1883334,13.1909619 12.7263704,9.99530436 16.1948593,8.99965364 L16.1950001,8.05500003 C16.1950001,5.95360729 17.8979654,4.25000002 20.0000001,4.25000002 Z M23.0656667,31.323 L16.9336667,31.323 L16.9352114,31.3619281 C17.0285826,32.9723844 18.3649772,34.2500001 20.0000001,34.2500001 C21.6352227,34.2500001 22.9714318,32.9721919 23.0647896,31.3604131 L23.0656667,31.323 Z M21.5116668,10.1783334 L18.4900001,10.1783334 C14.7336124,10.1783334 11.6883334,13.2231481 11.6883334,16.9800001 L11.6883334,16.9800001 L11.6883334,21.6416668 C11.6883334,22.7238848 11.2576687,23.7629916 10.4919968,24.5286635 L10.4919968,24.5286635 L9.42366346,25.5969969 C8.93921698,26.0814433 8.6666667,26.7390521 8.66637526,27.402427 L8.66637526,27.402427 L8.67048222,27.560237 C8.74130967,28.8268108 9.79171396,29.8233335 11.0666667,29.8233335 L11.0666667,29.8233335 L23.7906939,29.8222289 C23.8004164,29.8218553 23.8101862,29.8216668 23.8200001,29.8216668 L23.8486667,29.823 L28.9350001,29.8233335 C30.2055455,29.8233335 31.2450456,28.8367727 31.329826,27.609522 L31.3354106,27.4481422 L31.3293607,27.2529336 C31.2880301,26.6292837 31.0210852,26.0400787 30.5780034,25.5969969 L30.5780034,25.5969969 L29.50967,24.5286635 C28.7439981,23.7629916 28.3133335,22.7238848 28.3133335,21.6416668 L28.3133335,21.6416668 L28.3134279,16.9919039 L28.3098332,16.759466 C28.1934023,13.0970787 25.1864454,10.1783334 21.5116668,10.1783334 L21.5116668,10.1783334 Z M20.0000001,5.75000002 C18.7795808,5.75000002 17.7813801,6.69770708 17.7003155,7.89717688 L17.6950001,8.05500003 L17.6952875,8.7158769 C17.9568453,8.69103758 18.2219393,8.67833337 18.4900001,8.67833337 L18.4900001,8.67833337 L21.5116668,8.67833337 C21.7792577,8.67833337 22.0439466,8.69101238 22.3051575,8.71580951 L22.3050001,8.05500003 C22.3050001,6.7819079 21.273481,5.75000002 20.0000001,5.75000002 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(I),t&&"onBell"==this.bellStatus&&this.jSPlugin.pause()}setTimeout((function(){var e=A.decoderState.state,t=e.isEditing,i=e.rejection;"onBell"!=A.bellStatus||i||(A.removeBellRing(),t||A.answerOvertime())}),this.maxBellTime)}}},{key:"removeBellRing",value:function(){document.getElementById("bellring")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring")),document.getElementById("bellring-icon")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}},{key:"getMiniCallTimeUrl",value:function(){if(console.log("--------------getMiniCallTimeUrl"),-1!==this.jSPlugin.url.indexOf("hd.live")?this.recUrl=this.jSPlugin.url.replace("hd.live","rec"):this.recUrl=this.jSPlugin.url.replace("live","rec"),this.jSPlugin.callTime){var A=parseInt(this.jSPlugin.callTime),e=A+5e3,t=new Date(A-1e4).Format("yyyyMMddhhmmss"),i=new Date(e).Format("yyyyMMddhhmmss");this.recUrl="".concat(this.recUrl,"?begin=").concat(t,"&end=").concat(i),console.log("recurl="+this.recUrl)}}},{key:"initMiniRec",value:function(){var A=this,e=this,t=this.videoWidth,i=t/375,n=1.8*t,a=6;document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(a=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+.1*n+6);var o=a+this.videoHeight+10*i;if(console.log(a),document.getElementById("miniRecbox"))document.getElementById("miniRecbox")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniRecbox")),document.getElementById("miniClose")&&document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniClose")),this.initMiniRec();else{var r=document.createElement("div");r.id="miniRecbox",r.style="-webkit-border-radius: 8px;border-radius: 8px;overflow: hidden;position: absolute;top: ".concat(o,"px;right: ").concat(9*i,"px;"),r.innerHTML='<div id="miniRec"></div>',document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(r),this.getMiniCallTimeUrl();var s={domain:Tt};this.miniRecPlayer=new dE({id:"miniRec",width:160*i,height:90*i,template:"miniRec",url:this.recUrl,token:this.jSPlugin.token,handleError:function(t){console.log("小窗口handleError------------",t),t&&6701==t.retcode?(A.miniRecNum=A.miniRecNum+1,console.log("小窗口miniRecNum-----------------",A.miniRecNum),A.miniRecNum<5?e.miniRecPlayer.changePlayUrl({type:"miniRec"}):(console.log("小窗口------------------已播放5次,关闭小窗口"),e.miniRecCloseClick())):(console.log("小窗口------------------播放失败,关闭小窗口"),e.miniRecCloseClick())},env:this.jSPlugin.env||s});var g=document.createElement("div");g.id="miniClose",g.style="position: absolute;top: ".concat(o+8,"px;right: ").concat(16*i,"px;"),g.innerHTML='<div id="miniClose-btn" style="width: '.concat(24*i,"px;height: ").concat(24*i,'px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background: rgba(0,0,0,0.1);">\n <svg width="').concat(24*i,'px" height="').concat(24*i,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>close</title>\n <g id="icon/close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="common/Close/Dark">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z" id="形状结合" fill="#fff" fill-rule="nonzero"></path>\n </g>\n </g>\n </svg>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(g),document.getElementById("miniClose-btn").onclick=function(){e.miniRecCloseClick()}}}},{key:"initMiniImageRec",value:function(){console.log("initMiniImageRec");var A=this.videoWidth/375,e=6;document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(e=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+26);var t=e+this.videoHeight+10*A;if(document.getElementById("miniRecbox"))document.getElementById("miniRecbox").style.top=t+"px",document.getElementById("miniClose").style.top=t+8+"px";else{var i=document.createElement("div");i.id="miniRecbox",i.style="-webkit-border-radius: 8px;border-radius: 8px;overflow: hidden;position: absolute;\n top: ".concat(t,"px;\n right: ").concat(9*A,"px;\n user-select: none;\n "),i.innerHTML='<div id="miniRec" style="width: '.concat(160*A,"px;height: ").concat(90*A,'px;display: flex;align-items: center;justify-content: center;">\n <embed id="miniRec-embed" style="z-index: 3;position: absolute;width: ').concat(160*A,"px;height: ").concat(90*A,'px;" type="image/svg+xml" src="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg" />\n <div style="color: #FFFFFF;font-size: 12px;z-index: 4;">示意小窗位置</div>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(i);var n=document.createElement("div");n.id="miniClose",n.style="z-index: 4;position: absolute;top: ".concat(t+8,"px;right: ").concat(16*A,"px;"),n.innerHTML='<div id="miniClose-btn" style="width: '.concat(24*A,"px;height: ").concat(24*A,'px;display: flex;align-items: center;justify-content: center;border-radius: 50%;">\n <svg width="').concat(24*A,'px" height="').concat(24*A,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>close</title>\n <g id="icon/close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="common/Close/Dark">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z" id="形状结合" fill="#fff" fill-rule="nonzero"></path>\n </g>\n </g>\n </svg>\n </div>'),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(n),document.getElementById("miniClose-btn").onclick=function(){}}}},{key:"miniRecCloseClick",value:function(){document.getElementById("miniRecbox")&&(console.log("---------------------miniRecCloseClick"),"rec"==this.miniRecStatus&&(this.miniRecPlayer&&this.miniRecPlayer.stop(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniClose")),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniRecbox"))))}},{key:"miniRecSwitchClick",value:function(){console.log("---------------小窗口切换");var A=this.decoderState.state.isEditing,e=this.videoWidth,t=e/375,i=1.8*e,n=6;document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(n=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+.1*i+6),console.log("headerHeight-------",n);var a=n+this.videoHeight+10*t;if(console.log("videoTop-------",a),"rec"==this.miniRecStatus){this.miniRecStatus="live",A?(document.getElementById("miniRec-embed").style.width=this.jSPlugin.width+"px",document.getElementById("miniRec-embed").style.height=this.jSPlugin.height+"px",document.getElementById("miniRec").style.width=this.jSPlugin.width+"px",document.getElementById("miniRec").style.height=this.jSPlugin.height+"px"):this.miniRecPlayer.reSize(this.jSPlugin.width,this.jSPlugin.height),this.jSPlugin.reSize(160*t,90*t);var o=this.videoHeight+10*t,r=.2*i-90*t-10*t;document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.width=this.videoWidth+"px",document.getElementById("".concat(this.jSPlugin.id)).style.marginTop=o+"px",document.getElementById("".concat(this.jSPlugin.id)).style.marginLeft=e-160*t-9+"px",document.getElementById("".concat(this.jSPlugin.id)).style.overflow="hidden",document.getElementById("".concat(this.jSPlugin.id)).style.borderRadius="8px",document.getElementById("miniRecbox").style.top=n+"px",document.getElementById("miniRecbox").style.left="0",document.getElementById("miniRecbox").style.right="0",document.getElementById("miniRecbox").style.borderRadius="0px",document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop=r+"px"}else console.log(this.jSPlugin.width),this.miniRecStatus="rec",A?(document.getElementById("miniRec-embed").style.width=160*t+"px",document.getElementById("miniRec-embed").style.height=90*t+"px",document.getElementById("miniRec").style.width=160*t+"px",document.getElementById("miniRec").style.height=90*t+"px"):this.miniRecPlayer.reSize(160*t,90*t),this.jSPlugin.reSize(this.videoWidth,this.videoHeight),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.width=this.videoWidth+NaN,document.getElementById("".concat(this.jSPlugin.id)).style.marginTop="0",document.getElementById("".concat(this.jSPlugin.id)).style.marginLeft="0",document.getElementById("".concat(this.jSPlugin.id)).style.overflow="hidden",document.getElementById("".concat(this.jSPlugin.id)).style.borderRadius="0px",document.getElementById("miniRecbox").style.top=a+"px",document.getElementById("miniRecbox").style.right="9px",document.getElementById("miniRecbox").style.left="auto",document.getElementById("miniRecbox").style.borderRadius="8px",document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop=.2*i+"px"}},{key:"matchBtn",value:function(A,e){var t=this,i=this.themeData,n=i.header,a=i.footer,o=this.decoderState.state,r=o.mute,s=o.rejection;document.documentElement.clientHeight;var g=this.videoWidth/375,c=this.videoWidth/375||1,l={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}};-1===n[this.bellStatus].btnList.findIndex((function(e){return e.iconId===A}))?(l.color=a[this.bellStatus].color,l.backgroundColor=a[this.bellStatus].backgroundColor,l.activeColor=a[this.bellStatus].activeColor):(l.color=n[this.bellStatus].color,l.backgroundColor=n[this.bellStatus].backgroundColor,l.activeColor=n[this.bellStatus].activeColor);var I=this.videoWidth/4;switch(A){case"ringStatus":return l.title=this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,l.id=A,l.domString='<span id="header-onBell-ringStatus" style="color:'.concat(e.color||"#2C2C2C",";font-size: ").concat(24*c,'px;display: block;font-weight: 600;" >').concat(this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,"</span>"),l.onclick=function(){},l;case"deviceCategory":return l.title="设备名称",l.id=A,l.domString='<span id="header-onBell-deviceCategory" \n style="color:'.concat(e.color||"#2C2C2C",";\n font-size: ").concat(14*c,"px;\n padding-top: ").concat(5*c,'px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>"),l.onclick=function(){},l;case"callStatus":return l.title="通话中",l.id=A,l.domString='<span id="header-onCall-ringStatus" style="color:'.concat(e.color||"#2C2C2C",";font-size: ").concat(24*c,'px;display: block;font-weight: 600;" >通话中</span>'),l.onclick=function(){},l;case"deviceCategory":return l.title="设备名称",l.id=A,l.domString='<span id="header-onCall-deviceCategory" \n style="color:'.concat(e.color||"#2C2C2C",";\n font-size: ").concat(14*c,"px;\n padding-top: ").concat(5*c,'px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>"),l.onclick=function(){},l;case"rejection":return l.title="拒绝",l.id=A,l.domString='<div style="width: '.concat(.66*I,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width:').concat(.66*I,"px;height: ").concat(.66*I,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.4*I,'px" height="').concat(.4*I,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>拒绝</title>\n <g id="icon/拒绝" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*I,'px;user-select: none;">拒绝</div>\n </div>'),l.onclick=function(){var A=t,e=t.decoderState.state,i=e.play,n=e.isEditing,a=e.rejection;if(n||a)return!1;console.log("拒绝"),i&&t.jSPlugin.stop(),t.removeBellRing(),t.setDecoderState({play:!1,rejection:!0}),A.miniRecCloseClick(),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("rejection")},l;case"quickReply":return l.title="快捷回复",l.id=A,l.domString='<div id="'.concat(this.jSPlugin.id,'-btn-quickReply" style="width: ').concat(126*g,"px;height: ").concat(40*g,"px;color:").concat(s?"rgba(44,44,44,0.5)":l.color,';background: #F8F8F8;border-radius: 20px;display: flex;flex-direction: row;align-items: center;justify-content: center;-webkit-tap-highlight-color:transparent;">\n <div>\n <svg width="').concat(24*g,'px" height="').concat(24*g,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>快捷回复</title>\n <g id="icon/H5快捷回复" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n <path d="M10.7238197,2.25008794 C16.2230834,2.09766093 20.7496,6.50749909 20.7496,11.9958 C20.7496,13.4362841 20.4368194,14.8344518 19.8413577,16.1117061 L19.9440524,15.8792521 L21.0527769,21.184554 C21.1496277,21.6485507 20.8013031,22.0657304 20.3577211,22.0873894 L20.2613374,22.0858497 L20.1628027,22.0714397 L14.866,20.946 L14.7518767,20.9973203 C13.6930577,21.439776 12.5585243,21.69208 11.3902258,21.7381162 L11.3902258,21.7381162 L10.9996,21.7458 C5.51196728,21.7458 1.10147008,17.2189531 1.25388722,11.7200456 C1.39490345,6.62610538 5.62990538,2.39110345 10.7238197,2.25008794 Z M11.0183931,3.74628651 L10.7653544,3.74951278 C6.46729462,3.86849655 2.87229655,7.46349462 2.75331206,11.7615803 C2.62431432,16.4155628 6.35610614,20.2458 10.9996,20.2458 C12.2165433,20.2458 13.3936843,19.9831552 14.4692454,19.4827855 C14.6166569,19.4142071 14.7823612,19.395387 14.9413973,19.4291603 L14.9413973,19.4291603 L19.349,20.365 L18.4274231,15.948046 C18.4026128,15.8291836 18.4071487,15.7066932 18.4398273,15.5909727 L18.4398273,15.5909727 L18.4818423,15.4778939 C18.9851908,14.3982208 19.2496,13.216279 19.2496,11.9958 C19.2496,7.35166383 15.4197191,3.62050444 10.7653544,3.74951278 Z M10.9996,10.7498 C11.6896,10.7498 12.2496,11.3098 12.2496,11.9998 C12.2496,12.6898 11.6896,13.2498 10.9996,13.2498 C10.3096,13.2498 9.7496,12.6898 9.7496,11.9998 C9.7496,11.3098 10.3096,10.7498 10.9996,10.7498 Z M6.9996,10.7498 C7.6896,10.7498 8.2496,11.3098 8.2496,11.9998 C8.2496,12.6898 7.6896,13.2498 6.9996,13.2498 C6.3096,13.2498 5.7496,12.6898 5.7496,11.9998 C5.7496,11.3098 6.3096,10.7498 6.9996,10.7498 Z M14.9996,10.7498 C15.6896,10.7498 16.2496,11.3098 16.2496,11.9998 C16.2496,12.6898 15.6896,13.2498 14.9996,13.2498 C14.3096,13.2498 13.7496,12.6898 13.7496,11.9998 C13.7496,11.3098 14.3096,10.7498 14.9996,10.7498 Z" id="形状结合" fill="').concat(s?"rgba(44,44,44,0.5)":"#2c2c2c",'" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n <div style="margin-left: 5px;user-select: none;font-size:14px">快捷回复<div>\n </div>'),l.onclick=function(){var A=t.decoderState.state,e=A.isEditing,i=A.rejection;if(e||i)return!1;console.log("快捷回复"),t.switchFooter("quickReply"),t.quickReplyEle=new Ki(t.jSPlugin,t.switchFooter,t.videoWidth)},l;case"answer":return l.title="接听",l.id=A,l.domString='<div style="width: '.concat(.66*I,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width: ').concat(.66*I,"px;height: ").concat(.66*I,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.4*I,'px" height="').concat(.4*I,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>接听</title>\n <g id="icon/接听" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M15.7728281,19.6822968 C13.2528132,17.165123 10.8435994,14.2473605 11.9999084,13.0938925 C13.6505608,11.4432401 15.0881341,10.4261428 12.1646895,6.78675259 C9.23840386,3.14452132 7.28659974,5.94011849 5.68708632,7.53963191 C3.84324225,9.38631703 5.59049048,16.2645088 12.3891328,23.0659922 C19.1877751,29.8646345 26.0688079,31.6147238 27.9154931,29.7680386 C29.5150065,28.1685252 32.3106036,26.2195622 28.6712134,23.2932765 C25.0318232,20.3669909 24.0147259,21.8045642 22.3640735,23.4580576 C21.2077645,24.6086845 18.2928431,22.1994707 15.7728281,19.6822968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.727936, 17.728157) rotate(-360.000000) translate(-17.727936, -17.728157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*I,'px;user-select: none;">接听</div>\n </div>'),l.onclick=function(){var A=t,i=t.decoderState.state,o=i.play,r=i.isEditing,s=i.talk,g=i.sound,c=i.rejection;if(r||c)return!1;console.log("接听"),t.jSPlugin.pluginStatus.loadingClear(),t.bellStatus="onCall",t.switchFooter("onCall"),a[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderFooter(A.iconId,A)})),n[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderHeader(A.iconId,A)}));var l=document.getElementById("".concat(t.jSPlugin.id,"-header-onBell"));l&&l.parentElement.removeChild(l),1==t.themeData.customConfig.bellPoster&&(document.getElementById("bellring-icon")&&document.getElementById("".concat(t.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon")),t.jSPlugin.setPoster("")),t.removeBellRing(),t.miniRecCloseClick(),o||(t.jSPlugin.pluginStatus.loadingStart(t.jSPlugin.id),t.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"}),t.jSPlugin.play(),t.setDecoderState({play:!o})),s||1!=t.themeData.customConfig.defaultMicro||(t.setDecoderState({talk:!0,mute:!1}),g&&t.jSPlugin.closeSound(),t.jSPlugin.Talk.startTalk()),t.setDecoderState({sound:!1}),0==t.themeData.customConfig.defaultMicro&&(t.muteCommon(e),t.jSPlugin.openSound()),t.maxTalkTime=1e3*t.themeData.customConfig.maxTalkTime*60,setTimeout((function(){s&&(console.log("结束对讲"),A.setDecoderState({talk:!1}),A.jSPlugin.Talk.stopTalk()),o&&(A.jSPlugin.stop(),A.setDecoderState({play:!o})),t.rejectionStatusDispose(),t.remoteUnlockEle&&t.remoteUnlockEle.closeRemoteUnlock(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp")}),t.maxTalkTime)},l;case"remoteUnlock":return l.title="远程开锁",l.id=A,l.domString='<div style="width: '.concat(.66*I,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width: ').concat(.66*I,"px;height: ").concat(.66*I,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.4*I,'px" height="').concat(.4*I,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>开锁</title>\n <g id="icon/开锁" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M18,4 C21.3137085,4 24,6.6862915 24,10 L24,10 L24,19.787 L29.5,19.7875 C30.0522847,19.7875 30.5,20.2352153 30.5,20.7875 C30.5,21.3397847 30.0522847,21.7875 29.5,21.7875 L24,21.787 L24,26 C24,29.2383969 21.4344251,31.8775718 18.2249383,31.9958615 L18,32 C14.6862915,32 12,29.3137085 12,26 L12,26 L12,10 C12,6.6862915 14.6862915,4 18,4 Z M18,6 C15.790861,6 14,7.790861 14,10 L14,10 L14,26 C14,28.209139 15.790861,30 18,30 C20.209139,30 22,28.209139 22,26 L22,26 L22,21.787 L18.5,21.7875 C17.9477153,21.7875 17.5,21.3397847 17.5,20.7875 C17.5,20.2352153 17.9477153,19.7875 18.5,19.7875 L22,19.787 L22,10 C22,7.85780461 20.3160315,6.10892112 18.1996403,6.00489531 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*I,'px;user-select: none;">远程开锁</div>\n </div>'),l.onclick=function(){var A=t.decoderState.state,e=A.isEditing;A.play;var i=A.rejection;if(e||"onBell"==t.bellStatus||i)return!1;console.log("远程开锁"),t.switchFooter("remoteUnlock"),t.remoteUnlockEle=new Vi(t.jSPlugin,t.switchFooter,t.videoWidth)},l;case"mute":return l.title="静音",l.id=A,l.domString='<div style="width: '.concat(.66*I,'px;display: flex;flex-direction: column;align-items: center;">\n <div id="').concat(this.jSPlugin.id,'-icon-mute" style="width: ').concat(.66*I,"px;height: ").concat(.66*I,"px;border-radius: 50%;border: 1px solid ").concat(s?"#cccccc":e.backgroundColor,";background: ").concat(s&&r?"#cccccc":"#ffffff",';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.4*I,'px" height="').concat(.4*I,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>icon/静音</title>\n <g id="icon/静音" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path id="icon-mute-path" d="M29.2988305,7.56559704 C29.8540627,8.1086468 29.8980234,8.97727504 29.4240597,9.57172938 L29.3223594,9.6867869 L22.585,16.574 L22.5859243,26.0592702 C22.5859243,26.9500521 21.8638029,27.6721735 20.973021,27.6721735 C20.6007147,27.6721735 20.2398727,27.5433734 19.9517149,27.3076254 L15.583,23.733 L10.4341733,28.9987008 C9.85492024,29.5909486 8.9052312,29.6014828 8.31298346,29.0222298 C7.75775121,28.47918 7.71379057,27.6105518 8.18775419,27.0160974 L8.28945454,26.9010399 L27.1776406,7.58912597 C27.7568937,6.99687823 28.7065827,6.98634397 29.2988305,7.56559704 Z M22.2503608,7.16816759 C22.4679282,7.45036017 22.5859243,7.79665625 22.5859243,8.15298221 L22.585,9.899 L10.778,21.971 L9.47580645,21.9713498 C7.69424274,21.9713498 6.25,20.5271071 6.25,18.7455434 L6.25,15.65293 C6.25,13.8713663 7.69424274,12.4271235 9.47580645,12.4271235 L12.787,12.427 L19.9882064,6.87564241 C20.6936617,6.33174431 21.7064627,6.46271229 22.2503608,7.16816759 Z" id="形状结合" fill="').concat(r?"#ffffff":s?"#cccccc":e.backgroundColor,'"></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*I,'px;user-select: none;">静音</div>\n </div>'),l.onclick=function(){var A=t.decoderState.state,i=A.talk,n=A.sound;if(A.play,A.rejection)return!1;console.log("静音"),i?(console.log("结束对讲"),t.setDecoderState({talk:!1,mute:!0},e.backgroundColor),t.jSPlugin.Talk.stopTalk(),t.jSPlugin.openSound()):(console.log("开始对讲"),t.setDecoderState({talk:!0,mute:!1},e.backgroundColor),n&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})),t.jSPlugin.Talk.startTalk())},l;case"hangUp":return l.title="挂断",l.id=A,l.domString='<div style="width: '.concat(.66*I,'px;display: flex;flex-direction: column;align-items: center;">\n <div style="width:').concat(.66*I,"px;height: ").concat(.66*I,"px;border-radius: 50%;background: ").concat(s?"#CCCCCC":e.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n <svg width="').concat(.4*I,'px" height="').concat(.4*I,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>挂断</title>\n <g id="icon/挂断" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n </g>\n </svg>\n </div>\n <div style="margin-top: ').concat(.1*I,'px;user-select: none;">挂断</div>\n </div>'),l.onclick=function(){var A=t,e=t.decoderState.state,i=e.talk,n=e.play;if(e.rejection)return!1;i&&(console.log("结束对讲"),t.setDecoderState({talk:!1}),t.jSPlugin.Talk.stopTalk()),n&&(t.jSPlugin.stop(),t.setDecoderState({play:!n})),(n||i)&&(A.miniRecCloseClick(),console.log("挂断"),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp"))},l;default:return l}}},{key:"answerOvertime",value:function(){this.toastCustom.initToastContent("应答超时");var A=this.decoderState.state.play;console.log("应答超时"),A&&this.jSPlugin.stop(),this.setDecoderState({play:!1,rejection:!0}),this.miniRecCloseClick(),this.rejectionStatusDispose(),this.quickReplyEle&&this.quickReplyEle.closeQuickReplyEle(),"function"==typeof this.jSPlugin.hangUpCallback&&this.jSPlugin.hangUpCallback("rejection")}},{key:"rejectionStatusDispose",value:function(){var A=this,e=this.themeData.footer,t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")),n=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")),a=document.getElementById("header-".concat(this.bellStatus,"-ringStatus"));"onBell"==this.bellStatus?(t.innerHTML="",n.innerHTML="",t.style.color="#2C2C2C"):(i.innerHTML="",i.style.color="#2C2C2C"),console.log("rejectionStatusDispose"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),a.innerText="通话已结束",this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:!0,type:2})}},{key:"userNoDevice",value:function(){var A=this;this.removeBellRing(),this.setDecoderState({rejection:!0});var e=this.themeData.footer,t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")),n=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn"));"onBell"==this.bellStatus?(t.innerHTML="",n.innerHTML="",t.style.color="#2C2C2C"):(i.innerHTML="",i.style.color="#2C2C2C"),console.log("userNoDevice"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"该用户不拥有该设备",color:"white",isMobile:!0,type:2})}},{key:"renderHeader",value:function(A,e){var t=this,i=this.matchBtn(A,e);if(document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content"))){var n=document.createElement("span");n.innerHTML="".concat(i.domString),document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content")).appendChild(n)}else{var a=document.createElement("div");a.id="".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus),a.style="max-width:50%;position:relative;",a.innerHTML='<span id="'.concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,'-content" style="display:inline-block;height:auto;";>\n ').concat(i.domString,"\n </span>"),a.onclick=function(A){if(t.decoderState.state.isEditing)return!1;i.onclick(A)},document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(a)}}},{key:"renderFooter",value:function(A,e){var t=this,i=this.decoderState.state.mute;if("remoteUnlock"==A&&this.jSPlugin.capacity&&(!this.jSPlugin.capacity.support_unlock||0==this.jSPlugin.capacity.support_unlock))return!1;var n=this.matchBtn(A,e),a=this.videoWidth/4,o=document.createElement("div");if(o.className="theme-icon-item","quickReply"!==n.id&&(o.style="width:".concat(.66*a,"px;padding:0 ").concat(.12*a,"px;box-sizing: content-box;-webkit-tap-highlight-color:transparent;")),o.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-content" title="').concat(n.title,'" style="display: flex;align-items: center;position:relative;">')).concat(n.domString,"</div>")+"</span>",o.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onclick(A)},n.onmouseenter&&(o.onmouseenter=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseenter(A)}),n.onmouseleave&&(o.onmouseleave=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseleave(A)}),"quickReply"!=A){var r=document.createElement("span");r.className="icon-move left",r.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-left" title="左移" style="height: 40px;position: absolute;top: calc(50% - 33px);left: 1px;display: inline-block;border-radius: 2px;overflow: hidden;cursor: pointer;">\n <svg width="10px" height="40px" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-614.000000, -5024.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="箭头左" transform="translate(0.000000, 18.000000)">\n <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(1.000000, 15.000000)" fill="#FFFFFF">\n <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),r.onclick=function(){t.editIcon(n.id,"left","footer")},o.appendChild(r);var s=document.createElement("span");s.className="icon-move right",s.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(n.id,'-right" class="ezuikit-theme-icon" title="右移" style="height: 40px;position: absolute;top: calc(50% - 33px);left: calc(100% - 11px);display: inline-block;border-radius: 2px;overflow: hidden;cursor: pointer;">\n <svg width="10px" height="40px" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-684.000000, -5024.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="箭头右" transform="translate(70.000000, 18.000000)">\n <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(5.500000, 20.000000) scale(-1, 1) translate(-5.500000, -20.000000) translate(2.000000, 15.000000)" fill="#FFFFFF">\n <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),s.onclick=function(){t.editIcon(n.id,"right","footer")},o.appendChild(s)}if("answer"==A||"rejection"==A||"hangUp"==A);else{var g=document.createElement("span");g.className="icon-move close",g.innerHTML='<span id="'.concat(n.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: -6px;right: -2px;cursor: pointer;">\n <svg width="16px" height="16px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title></title>\n <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="H5呼叫模板" transform="translate(-680.000000, -5006.000000)">\n <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n <g id="编组-9" transform="translate(23.000000, 522.000000)">\n <g id="编组" transform="translate(170.000000, 0.000000)">\n <g id="关闭1" transform="translate(66.000000, 0.000000)">\n <rect id="矩形" fill-rule="nonzero" x="0" y="0" width="18" height="18"></rect>\n <path d="M9,1.125 C4.65117188,1.125 1.125,4.65117188 1.125,9 C1.125,13.3488281 4.65117188,16.875 9,16.875 C13.3488281,16.875 16.875,13.3488281 16.875,9 C16.875,4.65117188 13.3488281,1.125 9,1.125 Z M11.9074219,11.9917969 L10.7472656,11.9865234 L9,9.90351562 L7.25449219,11.9847656 L6.09257813,11.9900391 C6.01523438,11.9900391 5.95195313,11.9285156 5.95195313,11.8494141 C5.95195313,11.8160156 5.96425781,11.784375 5.98535156,11.7580078 L8.27226563,9.03339844 L5.98535156,6.31054687 C5.96425781,6.28417969 5.95195313,6.25253906 5.95195313,6.21914062 C5.95195313,6.14179687 6.01523438,6.07851562 6.09257813,6.07851562 L7.25449219,6.08378906 L9,8.16679687 L10.7455078,6.08554688 L11.9056641,6.08027344 C11.9830078,6.08027344 12.0462891,6.14179687 12.0462891,6.22089844 C12.0462891,6.25429687 12.0339844,6.2859375 12.0128906,6.31230469 L9.72949219,9.03515625 L12.0146484,11.7597656 C12.0357422,11.7861328 12.0480469,11.8177734 12.0480469,11.8511719 C12.0480469,11.9285156 11.9847656,11.9917969 11.9074219,11.9917969 Z" id="形状" fill="#595959"></path>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </span>'),g.onclick=function(){t.editIcon(n.id,"delete","footer")},o.appendChild(g)}"onCall"==this.bellStatus?document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).appendChild(o):(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).appendChild(o),"quickReply"===n.id&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")).appendChild(o)),this.decoderState.state.isEditing&&"mute"==A&&"onCall"==this.bellStatus&&(0!=this.themeData.customConfig.defaultMicro||i?this.setDecoderState({mute:!1},e.backgroundColor):this.setDecoderState({mute:!0},e.backgroundColor))}},{key:"switchFooter",value:function(A){var e=this.themeData.footer;switch(A){case"onBell":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"))?"none"==document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-btn-quickReply")).style.display="flex"):(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")).style.display="flex",document.getElementById("".concat(this.jSPlugin.id,"-btn-quickReply")).style.display="flex");break;case"onCall":document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-btn-quickReply")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display="flex",this.themeData&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=e[this.bellStatus].color)}}},{key:"initThemeData",value:function(){var A=this;console.log("-------------initThemeData");var e=this.themeData,t=e.header,i=e.footer,n=this.decoderState.state.isEditing,a=this.videoWidth,o=a/375,r=1.8*a,g=this.jSPlugin.id;if(this.isNeedRenderHeader=bt(t[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderFooter=bt(i[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderHeader)if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width:100%;overflow:hidden;justify-content: center;'></div>");else{var c=document.createElement("div");c.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),c.setAttribute("class","header-controls"),c.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex;width:100%;overflow:hidden;justify-content: center;'></div>"),console.log(this.jSPlugin.height),this.jSPlugin.height;var l=s(s({display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:"100%",position:"relative","margin-bottom":.1*r+"px","align-items":"center","text-align":"center","font-size":"24ox"},"color","#2c2c2c"),"margin-top","6px");c.style=ji(l),document.getElementById("".concat(g,"-wrap")).insertBefore(c,document.getElementById(g));var I=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(I)}),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.jSPlugin.height,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(.2*r,"px"),"onCall"==this.bellStatus?document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls-quickReplyBtn" class="footer-controls" style=\'min-height: ').concat(40*o,"px;margin-bottom: ").concat(40*o,"px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n <div id=\"").concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '):document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls-quickReplyBtn" class="footer-controls" style=\'min-height: ').concat(40*o,"px;margin-bottom: ").concat(40*o,"px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n <div id=\"").concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '));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 d={position:"relative","margin-top":.2*r+"px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%","align-items":"center","font-size":"12px"};C.style=ji(d),C.innerHTML='\n <div id="'.concat(this.jSPlugin.id,'-audioControls-quickReplyBtn" class="footer-controls" style=\'min-height: ').concat(40*o,"px;margin-bottom: ").concat(40*o,"px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n <div id=\"").concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n '),m(C,document.getElementById(g))}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"))&&t[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderHeader(e.iconId,e)})),this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=i[this.bellStatus].backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=i[this.bellStatus].color,i[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)}))),1!=this.themeData.customConfig.bellPoster||n)this.jSPlugin.setPoster("");else{this.jSPlugin.poster="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg";var h=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(h),A.jSPlugin.setPoster(A.jSPlugin.poster))}),50)}this.activeThemeStatus&&(this.initBellRing(),this.checkIsAppleDevice()||!1?window.addEventListener("touchstart",this.autoPlayRing):window.addEventListener("click",this.autoPlayRing));this.inited=!0,this.getCallDeviceInfo()}},{key:"checkIsAppleDevice",value:function(){var A=navigator.userAgent,e=!!A.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),t=A.indexOf("iPad")>-1,i=A.indexOf("iPhone")>-1||A.indexOf("Mac")>-1;return!!(e||t||i)}},{key:"renderThemeData",value:function(){var A=this,e=this.themeData,t=e.header,i=e.footer,n=this.decoderState.state.isEditing;if(this.isNeedRenderHeader&&t&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=t[this.bellStatus].color.replace("-diy",""),t[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId]))}))),this.isNeedRenderFooter&&i)document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=i[this.bellStatus].backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=i[this.bellStatus].color.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=i[this.bellStatus].color.replace("-diy",""),i[this.bellStatus].btnList.map((function(e,t){if(e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId])),console.log("-------------activeThemeStatus"),0==t&&!A.themeInited&&A.activeThemeStatus)var i=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(i),1!=A.themeData.customConfig.bellPoster||n?A.jSPlugin.play():A.jSPlugin.pluginStatus.loadingClear(),A.themeInited=!0)}),50)})),-1!==this.jSPlugin.url.indexOf("hd.live")&&this.setDecoderState({hd:!0}),this.themeData.autoFocus>0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",(function(){A.stopAutoFocus()}))),this.setDecoderState({cloudRec:"cloud.rec"===_(this.jSPlugin.url).type,rec:"rec"===_(this.jSPlugin.url).type,type:_(this.jSPlugin.url).type});else if(!this.themeInited&&this.activeThemeStatus)var a=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(a),A.themeData&&A.themeData.customConfig&&1==A.themeData.customConfig.bellPoster&&!n?A.jSPlugin.pluginStatus.loadingClear():A.jSPlugin.play(),A.themeInited=!0)}),50);var o=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(o),A.jSPlugin.reSize(A.jSPlugin.params.width,A.jSPlugin.params.height))}),50);n||this.jSPlugin.isWebConsole?1==this.themeData.customConfig.miniWinRec?this.initMiniImageRec():this.miniRecCloseClick():setTimeout((function(){"onBell"==A.bellStatus&&A.jSPlugin.capacity&&1==A.jSPlugin.capacity.support_doorcall_playback&&(console.log("小窗口initMiniRec-------------设备能力集成功"),1==A.themeData.customConfig.miniWinRec&&(console.log("小窗口initMiniRec---------------画中画设置已开启"),(!A.deviceInfoData||A.deviceInfoData&&!A.deviceInfoData.isEncrypt)&&(console.log("小窗口initMiniRec---------------设备未加密"),A.miniRecNum=0,A.initMiniRec())))}),1e3)}},{key:"setThemeData",value:function(A,e){this.themeData=A,"onCall"==e&&(this.bellStatus="onCall")}},{key:"startAutoFocus",value:function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById("".concat(A.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.pointerEvents="none")}),1e3*e)}},{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:"editIcon",value:function(A,e,t){console.log("编辑组件",A,e,t);var i=this.themeData;console.log("themeData",this.themeData);var n=this.themeData[t][this.bellStatus].btnList,a=bt(n,(function(e){return e.iconId===A})),o=n[a];switch(e){case"delete":n[a].isrender=0;break;case"right":for(var r=-1,s=a+1;s<n.length;s++)if(n[s].part===n[a].part&&1==n[s].isrender){r=s;break}-1!==r&&(n[a]=n[r],n[r]=o);break;case"left":for(var g=-1,c=a-1;c>=0;c--)if(n[c].part===n[a].part&&1==n[c].isrender){g=c;break}-1!==g&&(n[a]=n[g],n[g]=o)}console.log("new btnList",n),i[t][this.bellStatus].btnList=n,this.jSPlugin.Theme.changeTheme(i)}},{key:"countTime",value:function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='<span class="dot"></span><span class="value">00:00</span>',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",o="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),o=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?o+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))}},{key:"editStart",value:function(A){console.log("----------editStart1");var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));document.getElementById("".concat(this.jSPlugin.id,"-headControl")),e&&e.setAttribute("class","footer-controls themeEditing"),t&&t.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})}},{key:"editEnd",value:function(A){console.log("----------editEnd1");var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-headControl")),i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));t&&t.setAttribute("class","header-controls"),e&&e.setAttribute("class","footer-controls"),i&&i.setAttribute("class","footer-controls")}},{key:"fetchThemeData",value:function(A){var e=this;switch(this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"miniRec":break;default:Di(this.jSPlugin,A,(function(A){0==A.meta.code&&A.data?(e.activeThemeStatus=!0,e.themeData=A.data,A.data.header&&(e.themeData.header=A.data.header,e.themeData.header[e.bellStatus].btnList=e.themeData.header[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),A.data.footer&&(e.themeData.footer=A.data.footer,e.themeData.footer[e.bellStatus].btnList=e.themeData.footer[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.jSPlugin.capacity?(e.initThemeData(),e.renderThemeData()):setTimeout((function(){e.initThemeData(),e.renderThemeData()}),300)):(e.activeThemeStatus=!1,e.jSPlugin.pluginStatus.loadingClear(),e.setDecoderState({rejection:!0}),"111021"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"无效的模板id",color:"#fff",type:1}),e.activeThemeStatusTxt="无效的模板id"):"111023"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"您的试用特权已到期,需前往轻应用控制台购买后使用。",color:"#fff",type:1}),e.activeThemeStatusTxt="试用特权已到期"):(e.jSPlugin.pluginStatus.loadingSetText({text:"模板未激活,请先在开放平台轻应用控制台购买模板",color:"#fff",type:1}),e.activeThemeStatusTxt="模板未激活"),e.themeData=Oi,e.initThemeData(),e.renderThemeData())}),(function(){e.renderThemeData()}))}}},{key:"getCallDeviceInfo",value:function(){var A=this;this.videoWidth,Gi({accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,deviceSerial:_(this.jSPlugin.url).deviceSerial}).then((function(e){e.data&&(A.deviceInfoData=e.data,e.data.isEncrypt&&(console.log("小窗口miniRecCloseClick------------设备已加密"),A.miniRecCloseClick(),setTimeout((function(){A.jSPlugin.pluginStatus.loadingClear(),A.jSPlugin.pluginStatus.loadingSetText({text:"视频已加密",color:"#fff"})}),1e3)),document.getElementById("header-".concat(A.bellStatus,"-deviceCategory"))&&(document.getElementById("header-".concat(A.bellStatus,"-deviceCategory")).innerText=""+e.data.deviceName))})).catch((function(e){console.log("获取设备信息失败",e),20018!=e.code||A.jSPlugin.isWebConsole||A.userNoDevice()}))}},{key:"setHeaderText",value:function(A){console.log("setHeaderText");var e=this.videoWidth/375||1;document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content"))&&(document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content")).innerHTML='<span style="font-size: '.concat(24*e,'px;display: block">').concat(A,'</span><span style="font-size: ').concat(14*e,"px;padding-top: ").concat(5*e,'px;display: block;">').concat(this.deviceInfoData&&this.deviceInfoData.category||"","</span>"))}}])}(),Zi=function(){return o((function A(e){if(t(this,A),this.jSPlugin=e,this.videoWidth=e.width,this.autoFocus=0,this.autoFocusTimer=null,this.decoderState={state:{isEditing:!1,play:!1,sound:!1,recordvideo:!1,recordCount:"00:00",talk:!1,mute:!1,rejection:!1,cloudRec:"cloud.rec"===_(e.url).type,rec:"rec"===_(e.url).type,type:_(e.url).type}},console.log("matchEzopenUrl(jSPlugin.url)",_(e.url),this.decoderState.state),this.isMobile=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i),void 0!==e.isMobile&&(this.isMobile=e.isMobile),this.themeData={},"themeData"==this.jSPlugin.themeId&&(this.themeData=this.jSPlugin.params.themeData),this.jSPlugin.themeId)if(this.isMobile?this.call=new Wi(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState):this.call=new Ji(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState),"themeData"===this.jSPlugin.themeId)this.themeData=this.jSPlugin.params.themeData,this.call.initThemeData(),this.call.renderThemeData();else this.call.fetchThemeData(this.jSPlugin.themeId);this.jSPlugin.Talk||(this.jSPlugin.Talk=new li(this.jSPlugin)),f("".concat(this.jSPlugin.staticPath,"/speed/speed.css")),f("".concat(this.jSPlugin.staticPath,"/css/theme.css"))}),[{key:"changeTheme",value:function(A){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"onBell";if("string"==typeof A)switch(this.jSPlugin.themeId=A,this.jSPlugin.themeId){case"pcLive":case"mobileCall":case"webCall":this.call.initThemeData(),this.call.renderThemeData();break;default:this.call.fetchThemeData(A)}else"object"===d(A)&&(this.themeData=A,this.call.setThemeData(A,t),this.call.initThemeData(),this.call.renderThemeData(),this.decoderState.state.isEditing&&e&&this.call.editStart());this.jSPlugin&&this.jSPlugin.handleThemeChange&&this.jSPlugin.handleThemeChange(A)}},{key:"setDecoderState",value:function(A,e){var t=this,i=this.themeData;i.header,i.footer,Object.keys(A).map((function(i){if("mute"===i)document.getElementById("".concat(t.jSPlugin.id,"-icon-mute"))&&(console.log("mute"),A[i]?(document.getElementById("".concat(t.jSPlugin.id,"-icon-mute")).style.background=e,document.getElementById("".concat(t.jSPlugin.id,"-icon-mute")).style.border=" 1px solid ".concat(e),document.getElementById("icon-mute-path").style.fill="#ffffff"):(document.getElementById("".concat(t.jSPlugin.id,"-icon-mute")).style.background="#ffffff",document.getElementById("".concat(t.jSPlugin.id,"-icon-mute")).style.border="1px solid ".concat(e),document.getElementById("icon-mute-path").style.fill=e));t.decoderState.state=Object.assign(t.decoderState.state,A)}))}},{key:"startAutoFocus",value:function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById("".concat(A.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(A.jSPlugin.id,"-audioControls")).style.pointerEvents="none")}),1e3*e)}},{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:"editIcon",value:function(A,e,t){console.log("编辑组件",A,e,t);var i=this.themeData;console.log("themeData",this.themeData);var n=this.themeData[t].btnList,a=bt(n,(function(e){return e.iconId===A})),o=n[a];switch(e){case"delete":if("rec"===A){if(-1===bt(n,(function(A){return"cloudRec"===A.iconId&&1==A.isrender})))return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1}else if("cloudRec"===A&&-1===bt(n,(function(A){return"rec"===A.iconId&&1==A.isrender})))return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1;n[a].isrender=0;break;case"right":for(var r=-1,s=a+1;s<n.length;s++)if(n[s].part===n[a].part&&1==n[s].isrender){r=s;break}-1!==r&&(n[a]=n[r],n[r]=o);break;case"left":for(var g=-1,c=a-1;c>=0;c--)if(n[c].part===n[a].part&&1==n[c].isrender){g=c;break}-1!==g&&(n[a]=n[g],n[g]=o)}console.log("new btnList",n),i[t].btnList=n,this.changeTheme(i)}},{key:"countTime",value:function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='<span class="dot"></span><span class="value">00:00</span>',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",o="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),o=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?o+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))}},{key:"editStart",value:function(A){var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")),i=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));i&&i.setAttribute("class","header-controls themeEditing"),e&&e.setAttribute("class","footer-controls themeEditing"),t&&t.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})}},{key:"editEnd",value:function(A){var e=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),t=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));t&&t.setAttribute("class","header-controls"),e&&e.setAttribute("class","footer-controls"),this.setDecoderState({isEditing:!1})}},{key:"setDisabled",value:function(A){}},{key:"getDeviceInfo",value:function(){var A=this,e=this.videoWidth/1024||1;Gi({accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,deviceSerial:_(this.jSPlugin.url).deviceSerial}).then((function(t){200==t.code&&t.data&&document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content"))&&(document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content")).style.maxWidth="100%",document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content")).style.overflow="hidden",document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content")).style.textOverflow="ellipsis",document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content")).style.whiteSpace="nowrap",document.getElementById("".concat(A.jSPlugin.id,"-deviceCategory-content")).innerHTML='<span style="font-size: '.concat(32*e,'px;display: block">有人按门铃</span><span style="font-size: ').concat(24*e,"px;padding-top: ").concat(16*e,'px;display: block;">').concat(t.data.category,"</span>"))})).catch((function(A){console.log("获取设备信息失败",A)}))}}])}(),Xi=function(){return o((function A(e){t(this,A),this.jSPlugin=e;var i=window["EZUIKIT_TIMER_INTERVAL_".concat(e.id)];i&&Object.keys(i).length>0&&this.resetTimer(),window["EZUIKIT_TIMER_INTERVAL_".concat(e.id)]={}}),[{key:"createInterval",value:function(A,e,t){window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)][A]=setInterval(e,t)}},{key:"clearTimer",value:function(A){var e=window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)];e[A]&&(clearInterval(e[A]),delete e[A])}},{key:"resetTimer",value:function(){var A=window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)];for(var e in A)clearInterval(A[e]),delete A[e]}}])}(),qi=o((function A(e){var i=this;t(this,A),s(this,"initMap",(function(){var A=i,e=i.videoWidth,t=i.videoHeight;if(document.getElementById("".concat(i.jSPlugin.id,"-miniRecbox")))document.getElementById("".concat(i.jSPlugin.id,"-wrap")).removeChild(document.getElementById("".concat(i.jSPlugin.id,"-miniRecbox"))),i.initMap();else{var n=document.createElement("div");n.id="".concat(i.jSPlugin.id,"-miniRecbox"),n.style=";position: absolute; bottom:96px;right:".concat(i.jSPlugin.inspectVideoWidth,"px;"),n.innerHTML='<div id="'.concat(i.jSPlugin.id,'-mapbox" style="\n width: ').concat(.3333*e,"px;\n height: ").concat(.3333*t,'px;\n "></div>'),document.getElementById("".concat(i.jSPlugin.id,"-wrap")).insertBefore(n,document.getElementById("".concat(i.jSPlugin.id,"-ez-iframe-footer-container"))),A.map=A.loadMap("".concat(i.jSPlugin.id,"-mapbox"))}return A.map})),s(this,"loadMap",(function(A){var e=new BMapGL.Map(A);return e.centerAndZoom(new BMapGL.Point(116.297611,40.047363),15),e.enableScrollWheelZoom(!0),e})),s(this,"createCircle",(function(A,e,t,n){var a=new BMapGL.Point(A,e),o=new BMapGL.Marker(a,{title:n});if(i.map.addOverlay(o),0!=t){var r=new BMapGL.Circle(new BMapGL.Point(A,e),t,{strokeColor:"#ff4d4f",strokeWeight:4,strokeOpacity:1,strokeStyle:"dashed",fillOpacity:0});i.map.addOverlay(r)}})),s(this,"createInspectPoints",(function(A){A.map((function(A){i.createCircle(A.longitude,A.latitude,A.radius,A.inspectPointName)}))})),s(this,"createPolygon",(function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#407AFF",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"solid",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"407AFF",r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=[];A.split(";").map((function(A){var e=A.split(",");s.push(new BMapGL.Point(e[0],e[1]))})),i.inspectRange=new BMapGL.Polygon(s,{strokeColor:e,strokeWeight:n,strokeOpacity:a,strokeStyle:t,fillOpacity:r,fillColor:o}),i.map.addOverlay(i.inspectRange)})),s(this,"createTrack",(function(A){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#18C796",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"solid",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,g=arguments.length>8&&void 0!==arguments[8]?arguments[8]:500,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,l=arguments.length>10&&void 0!==arguments[10]&&arguments[10],I=[];if(A.map((function(A){var e=!1;i.currentTrack.length>0&&i.currentTrack.map((function(t){t.longitude===A.longitude&&t.latitude===A.latitude&&t.reportTime===A.reportTime&&(e=!0)})),e||(0==I.length&&i.currentTrack.length>0&&I.push(new BMapGL.Point(i.currentTrack[i.currentTrack.length-1].longitude,i.currentTrack[i.currentTrack.length-1].latitude)),I.push(new BMapGL.Point(A.longitude,A.latitude)))})),0!=I.length){var C=new BMapGL.Polyline(I,{strokeColor:t,strokeWeight:a,strokeOpacity:o,strokeStyle:n,fillOpacity:r});if(e?(i.map.addOverlay(C),i.map.centerAndZoom(I[I.length-1],15)):(i.trackAni=new BMapGLLib.TrackAnimation(i.map,C,{overallView:l,tilt:s,duration:g,delay:c}),i.trackAni.start()),i.currentTrack=A,i.currentTrack.length>0&&i.currentTrack.length>0){var d=new BMapGL.Point(i.currentTrack[0].longitude,i.currentTrack[0].latitude);if(i.startPoint=new BMapGL.Marker(d,{icon:new BMapGL.Icon("".concat(i.jSPlugin.staticPath,"/imgs/start.png"),new BMapGL.Size(32,47)),offset:new BMapGL.Size(0,-17)}),i.map.addOverlay(i.startPoint),1==i.currentTrack.length)return;var h=new BMapGL.Point(i.currentTrack[i.currentTrack.length-1].longitude,i.currentTrack[i.currentTrack.length-1].latitude);i.endPoint&&i.map.removeOverlay(i.endPoint),setTimeout((function(){i.endPoint=new BMapGL.Marker(h,{icon:new BMapGL.Icon("".concat(i.jSPlugin.staticPath,"/imgs/end.png"),new BMapGL.Size(30,30))}),i.map.addOverlay(i.endPoint)}),e?0:g)}}})),s(this,"centerToTrack",(function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;i.currentTrack.length>0&&(1==i.currentTrack.length?i.map.centerAndZoom(new BMapGL.Point(i.currentTrack[0].longitude,i.currentTrack[0].latitude),A):i.map.centerAndZoom(new BMapGL.Point(i.currentTrack[i.currentTrack.length-1].longitude,i.currentTrack[i.currentTrack.length-1].latitude),A))})),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.toastCustom=new Ri(e,!1),this.currentTrack=[],this.startPoint=null,this.endPoint=null,this.trackAni=null,this.inspectRange=null,this.map=this.initMap()})),zi=o((function A(e){var i=this;t(this,A),s(this,"init",(function(){var A=i;if(i.videoWidth,i.videoHeight,document.getElementById("".concat(i.jSPlugin.id,"-inspect-global-box")))document.getElementById("".concat(i.jSPlugin.id,"-inspect-global-box"))&&document.getElementById("".concat(i.jSPlugin.id,"-wrap")).removeChild(document.getElementById("".concat(i.jSPlugin.id,"-inspect-global-box"))),A.init();else{var e=document.createElement("div");e.id="".concat(i.jSPlugin.id,"-inspect-global-box"),e.style=";position: absolute; left:0; top: 0; width: 100%; height: 100%; z-index: 10000; background: #fff;",e.innerHTML='<div id="'.concat(i.jSPlugin.id,'-inspect-loading-box" style="\n overflow: auto;\n box-sizing: border-box;\n font-size: 14px;\n color: #595959;\n line-height: 24px;\n font-weight: bold;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n ">\n <div>\n <div style="text-align:center;"><div type="default" class="ezuikit-spin ezuikit-spin-spinning"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div></div>\n <div style="color: #595959; font-size:14px; font-weight: 400; text-align: center;">加载中…</div>\n </div></div>\n '),document.getElementById("".concat(i.jSPlugin.id,"-wrap")).appendChild(e)}})),s(this,"deviceErrorInfo",(function(A,e){var t=Object.assign({tips:"",refreshBtn:"",refreshShow:!1},A);if(document.getElementById("".concat(i.jSPlugin.id,"-no-inspect-box")))document.getElementById("".concat(i.jSPlugin.id,"-no-inspect-box"))&&document.getElementById("".concat(i.jSPlugin.id,"-inspect-global-box")).removeChild(document.getElementById("".concat(i.jSPlugin.id,"-no-inspect-box"))),i.deviceErrorInfo(A,e);else{i.videoHeight;var n=document.createElement("div");n.id="".concat(i.jSPlugin.id,"-no-inspect-box"),n.style="width:100%;height:100%; background: #ffffff; display: flex; justify-content: center; align-items: center",n.innerHTML='<div style="\n overflow: auto;\n box-sizing: border-box;\n font-size: 14px;\n color: #595959;\n text-align: center;\n ">\n <div style="text-align:center; height: 21px;">\n <svg t="1689074472491" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7172" xmlns:xlink="http://www.w3.org/1999/xlink" width="21" height="21"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z" fill="#FF4D4F" p-id="7173"></path></svg>\n </div>\n <div style="color: #595959; font-size:14px; margin: 5px 0 16px;font-weight: 400; text-align: center;">'.concat(t.tips,'</div>\n <button id="').concat(i.jSPlugin.id,'-inspect-device-status-refresh" style="display: ').concat(t.refreshShow?"block":"none",'; width: 80px; margin: 0 auto;" type="button" class="ezuikit-btn ezuikit-btn-primary"><span>').concat(t.refreshBtn,"</span></button>\n </div>\n "),document.getElementById("".concat(i.jSPlugin.id,"-inspect-global-box")).appendChild(n),document.getElementById("".concat(i.jSPlugin.id,"-inspect-device-status-refresh")).addEventListener("click",(function(){e&&e()}))}})),s(this,"globalContainerToggle",(function(A,e){document.getElementById(A)&&(document.getElementById(A).style.display=e?"flex":"none")})),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.toastCustom=new Ri(e,!1),this.init()})),$i=function(){return o((function A(e){t(this,A),this.timer=null;var i={wrapNode:document.body,time:2e3,content:"",type:"info",center:!1,top:8};this.params=c(c({},i),e),this.init()}),[{key:"init",value:function(){var A=this;this.timer=null;var e=this.params,t=e.wrapNode,i=e.content,n=e.time,a=e.type,o=e.center,r=e.top;this.wrapNode=t;var s=document.createElement("div");s.setAttribute("class","ezuikit-message"),o?s.setAttribute("style","top: 50%; transform: translateY(-50%);"):s.setAttribute("style","top: ".concat(r||0,"px;")),this.wrapNode.appendChild(s),this.initMessageContent(a,i,s),0!==n&&(this.timer=setTimeout((function(){A.wrapNode.removeChild(s)}),n||2e3))}},{key:"initMessageContent",value:function(A,e,t){var i=document.createElement("div");i.setAttribute("class","ezuikit-message-notice"),i.innerHTML='\n\t\t\t<div class="ezuikit-message-notice-content">\n\t\t\t\t<div class="ezuikit-message-custom-content ezuikit-message-'.concat(A,'">\n\t\t\t\t\t<span role="img" aria-label="check-circle" class="ezdicon ezdicon-check-circle">\n\t\t\t\t\t\t').concat("warning"===A?'<svg fill="currentColor" t="1691567271942" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z"></path></svg>':"","\n\t\t\t\t\t\t").concat("info"===A?'<svg fill="currentColor" t="1691567317943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z"></path></svg>':"","\n\t\t\t\t\t\t").concat("error"===A?'<svg fill="currentColor" t="1691567308585" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m165.376 618.24l-65.92-0.32L512 563.392l-99.328 118.4-66.048 0.32a7.936 7.936 0 0 1-8-8c0-1.92 0.64-3.712 1.92-5.184L470.528 513.92 340.48 359.04a8 8 0 0 1 6.08-13.184l66.112 0.256L512 464.576l99.328-118.4 65.92-0.256c4.48 0 8.064 3.456 8.064 8a8.32 8.32 0 0 1-1.92 5.12l-129.92 154.944 130.048 155.008a8 8 0 0 1-6.08 13.184z"></path></svg>':"","\n\t\t\t\t\t\t").concat("success"===A?'<svg fill="currentColor" viewBox="64 64 896 896" focusable="false" data-icon="check-circle" width="1em" height="1em" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path></svg>':"","\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>").concat(e,"</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t"),t.appendChild(i)}}])}(),An=function(){return o((function A(e){t(this,A),this.params=c(c({},{id:"",width:"100%",height:"100%",preview:!0,showIcon:!0,src:"",alt:"",fallback:"https://img.ys7.com/group32/M00/81/9D/CtxIA2HnrGyADm_jAAAFfWjIDJs811.png"}),e),this.id=Math.random().toString(36).substr(2),this.init()}),[{key:"init",value:function(){var A=this.params,e=A.id,t=A.width,i=A.height,n=A.preview;if(document.getElementById(e)){var a=document.createElement("div");a.setAttribute("class","ezuikit-image"),a.setAttribute("style","width:".concat(t,";height:").concat(i,";")),document.getElementById(e).appendChild(a),this.initImage(a),n&&this.initPreview(a)}}},{key:"previewImg",value:function(){var A=this.params,e=A.src,t=A.alt,i=A.fallback,n=document.createElement("div");n.setAttribute("id",this.id+"-preview"),n.setAttribute("class","ezuikit-image-preview"),n.innerHTML='\n\t\t\t<div class="ezuikit-image-preview-mask"></div>\n\t\t\t<div class="ezuikit-image-preview-img-wrapper">\n\t\t\t\t<div class="ezuikit-image-preview-operations" id="'.concat(this.id,'-ezuikit-image-preview-operations">\n\t\t\t\t\t<div class="ezuikit-image-preview-operations-operation">\n\t\t\t\t\t\t<span role="img" aria-label="close" class="anticon anticon-close ezuikit-image-preview-operations-icon">\n\t\t\t\t\t\t\t<svg viewBox="64 64 896 896" focusable="false" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ezuikit-image-preview-wrap">\n\t\t\t\t\t<div class="ezuikit-image-preview-img-main"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t');var a=document.createElement("img");a.setAttribute("class","ezuikit-image-preview-img"),a.setAttribute("alt",t),a.setAttribute("src",e),a.addEventListener("error",(function(){a.setAttribute("src",i)})),document.body.appendChild(n),n.querySelector(".ezuikit-image-preview-img-main").appendChild(a),document.getElementById(this.id+"-ezuikit-image-preview-operations").addEventListener("click",(function(){document.body.removeChild(n)}))}},{key:"initImage",value:function(A){var e=this.params,t=e.src,i=e.alt,n=e.fallback,a=document.createElement("img");a.setAttribute("class","ezuikit-image-img"),a.setAttribute("alt",i),a.setAttribute("src",t),a.addEventListener("error",(function(){a.setAttribute("src",n)})),A.appendChild(a)}},{key:"initPreview",value:function(A){var e=this,t=this.params.showIcon,i=document.createElement("div");i.setAttribute("class","ezuikit-image-mask"),t&&(i.innerHTML='\n\t\t\t\t<div class="ezuikit-image-mask-info">\n\t\t\t\t\t<span class="ezuikit-image-anticon-eye">\n\t\t\t\t\t\t<svg viewBox="64 64 896 896" focusable="false" data-icon="eye" width="1em" height="1em" aria-hidden="true"><path d="M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"></path></svg>\n\t\t\t\t\t\t预览\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t'),A.appendChild(i),A.onclick=function(){e.previewImg()}}}])}(),en=function(){return o((function A(e){t(this,A),this.params=c(c({},{id:"",parentNodeId:"",title:"",content:"",placement:"top",cancelText:"取消",arrowPointAtCenter:!1,okText:"确定",onCancel:function(){},onConfirm:function(){}}),e),this.initState=!1,this.init(e)}),[{key:"init",value:function(){var A=this,e=this.params,t=e.id,i=e.content,n=e.placement,a=e.title,o=document.getElementById(t);if(o){var r=document.createElement("div");if(r.setAttribute("id",t+"-popover"),r.setAttribute("class","ezuikit-popover"),r.setAttribute("style","display:none;"),r.innerHTML='\n\t\t\t\t\t<div class="ezuikit-popover-arrow">\n\t\t\t\t\t\t<span class="ezuikit-popover-arrow-content"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ezuikit-popover-inner">\n\t\t\t\t\t\t'.concat(a?'<div class="ezuikit-popover-title">'.concat(a,"</div>"):"",'\n\t\t\t\t\t\t<div class="ezuikit-popover-inner-content">').concat(i,"</div>\n\t\t\t\t\t</div>\n\t\t\t\t"),!document.getElementById(t+"-popover")){var s=document.body;this.params.parentNodeId&&(s=document.getElementById(this.params.parentNodeId)),s.appendChild(r),this.renderPopover(r,o,n)}document.body.addEventListener("click",(function(e){A.addEventListenerFn(e)}))}}},{key:"addEventListenerFn",value:function(A){var e=this.params.id,t=document.getElementById(e),i=document.getElementById(e+"-popover");t&&A.target!==t&&!t.contains(A.target)&&i&&A.target!==i&&!i.contains(A.target)&&this.hidePopover()}},{key:"hidePopover",value:function(){var A=this.params.id,e=document.getElementById(A+"-popover");e&&document.body.removeChild(e)}},{key:"renderPopover",value:function(A,e,t,i,n){A.style.display="block";var a=e.getBoundingClientRect(),o=a.top,r=a.left,s=a.width,g=a.height,c=A.getBoundingClientRect(),l=c.width,I=c.height;i&&(l=i),n&&(I=n);var C=document.body;this.params.parentNodeId&&(C=document.getElementById(this.params.parentNodeId));var d=this.params.arrowPointAtCenter,h=0,B=0,u=A.getElementsByClassName("ezuikit-popover-arrow")[0],E=u.getBoundingClientRect(),f=E.width,Q=E.height;if(d){var x=0,p=0;switch(t){case"top":default:x=l/2,p=I;break;case"bottom":x=l/2,p=0;break;case"left":x=l,p=I/2;break;case"right":x=0,p=I/2;break;case"topLeft":x=(s-f)/2,p=I;break;case"topRight":x=l-(s+f)/2,p=I;break;case"bottomLeft":x=(s-f)/2,p=0;break;case"bottomRight":x=l-(s+f)/2,p=0;break;case"leftTop":x=l,p=(g-Q)/2;break;case"leftBottom":x=l,p=I-(g+Q)/2;break;case"rightTop":x=0,p=(g-10)/2;break;case"rightBottom":x=0,p=I-(g+Q)/2}u.style.left=x+"px",u.style.top=p+"px"}switch(t){case"top":h=-(I+Q),B=(s-l)/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-top");break;case"bottom":h=g-Q/2,B=(s-l)/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottom");break;case"left":h=(g-I)/2,B=-(l+f/2),A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-left");break;case"right":h=(g-I)/2,B=s-f/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-right");break;case"topLeft":h=-(I+Q),B=0,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-topLeft");break;case"topRight":h=-(I+Q),B=s-l,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-topRight");break;case"bottomLeft":h=g-Q/2,B=0,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottomLeft");break;case"bottomRight":h=g-Q/2,B=s-l,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottomRight");break;case"leftTop":h=0,B=-(l+f/2),A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-leftTop");break;case"leftBottom":h=g-I,B=-(l+f/2),A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-leftBottom");break;case"rightTop":h=0,B=s-f/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-rightTop");break;case"rightBottom":h=g-I,B=s-f/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-rightBottom");break;default:h=-I,B=(s-l)/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-top")}var m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft;A.style.top=o+m+h+"px",A.style.left=r+y+B+"px";var _=A.getBoundingClientRect(),S=C===document.body?{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}:C.getBoundingClientRect(),D=t;_.left<S.left&&(D=(D=D.replace("Right","Left")).replace("right","left")),_.right>S.right&&(D=(D=D.replace("Left","Right")).replace("left","right")),_.top<S.top&&(D=(D=D.replace("Top","Bottom")).replace("top","bottom")),_.bottom>S.bottom&&(D=(D=D.replace("Bottom","Top")).replace("bottom","top")),D!==t&&this.renderPopover(A,e,D,l,I)}}])}(),tn=function(){return o((function A(e){t(this,A),this.params=c(c({},{id:"",content:"",placement:"top",cancelText:"取消",arrowPointAtCenter:!1,okText:"确定",onCancel:function(){},onConfirm:function(){}}),e),this.PopconfirmDom=null,this.init(e)}),[{key:"init",value:function(){var A=this,e=this.params,t=e.content,i=e.cancelText,n=e.okText,a=e.onCancel,o=e.onConfirm,r=document.createElement("div");r.innerHTML='\n <div class="ezuikit-confirm">\n <div class="ezuikit-confirm-content">\n\t\t\t\t\t<span class="ezuikit-confirm-icon">\n \t<svg fill="currentColor" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z"></path></svg>\n </span>\n\t\t\t\t\t<span class="ezuikit-confirm-content-label">'.concat(t,'</span>\n </div>\n <div class="ezuikit-popover-buttons"></div>\n </div>\n ');var s=document.createElement("button");s.className="ezuikit-btn ezuikit-cancel-btn",s.innerText=i;var g=document.createElement("button");return g.className="ezuikit-btn ezuikit-ok-btn ezuikit-btn-primary",g.innerText=n,r.querySelector(".ezuikit-popover-buttons").appendChild(s),r.querySelector(".ezuikit-popover-buttons").appendChild(g),this.PopconfirmDom=new en(c(c({},this.params),{},{content:r.innerHTML})),document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-cancel-btn")&&(document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-cancel-btn").onclick=function(){a?a():A.hide()}),document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-ok-btn")&&(document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-ok-btn").onclick=function(){o?o():A.hide()}),this.PopconfirmDom}},{key:"hide",value:function(){this.PopconfirmDom.hidePopover()}}])}(),nn=function(){return o((function A(e){t(this,A),this.params=c(c({},{id:"",width:"100%",height:"100%",preview:!0,poster:"",fallback:"https://img.ys7.com/group32/M00/81/9D/CtxIA2HnrGyADm_jAAAFfWjIDJs811.png",src:""}),e),this.id=Math.random().toString(36).substr(2),this.init()}),[{key:"init",value:function(){var A=this.params,e=A.id,t=A.width,i=A.height,n=A.preview;if(document.getElementById(e)){var a=document.createElement("div");a.setAttribute("class","ezuikit-video"),a.setAttribute("style","width:".concat(t,";height:").concat(i,";")),document.getElementById(e).appendChild(a),this.initVideo(a),n&&this.initPreview(a)}}},{key:"previewVideo",value:function(){var A=this.params.src,e=document.createElement("div");e.setAttribute("id",this.id+"-preview"),e.setAttribute("class","ezuikit-image-video"),e.innerHTML='\n\t\t\t<div class="ezuikit-video-preview-mask"></div>\n\t\t\t<div class="ezuikit-video-preview-img-wrapper">\n\t\t\t\t<div class="ezuikit-video-preview-operations" id="'.concat(this.id,'-ezuikit-video-preview-operations">\n\t\t\t\t\t<div class="ezuikit-video-preview-operations-operation">\n\t\t\t\t\t\t<span role="img" aria-label="close" class="anticon anticon-close ezuikit-video-preview-operations-icon">\n\t\t\t\t\t\t\t<svg viewBox="64 64 896 896" focusable="false" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ezuikit-video-preview-wrap">\n\t\t\t\t\t<div class="ezuikit-video-preview-img-wrapper">\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclass="ezuikit-video-preview-img custom-controls"\n\t\t\t\t\t\t\tsrc="').concat(A,'"\n\t\t\t\t\t\t\tautoplay \n\t\t\t\t\t\t\tcontrols \n\t\t\t\t\t\t\tcontrolslist="nodownload noremoteplayback noplaybackrate"\n\t\t\t\t\t\t\tdisablePictureInPicture\n\t\t\t\t\t\t\tdisableRemotePlayback\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t'),document.body.appendChild(e),document.getElementById(this.id+"-ezuikit-video-preview-operations").addEventListener("click",(function(){document.body.removeChild(e)}))}},{key:"initVideo",value:function(A){var e=this.params,t=e.poster,i=e.fallback,n=document.createElement("img");n.setAttribute("class","ezuikit-video-img"),n.setAttribute("src",t),n.addEventListener("error",(function(){n.setAttribute("src",i)})),A.appendChild(n)}},{key:"initPreview",value:function(A){var e=this,t=document.createElement("div");t.setAttribute("class","ezuikit-video-mask"),t.innerHTML='\n\t\t\t<div class="ezuikit-video-mask-info">\n\t\t\t\t<span class="ezuikit-video-anticon-eye">\n\t\t\t\t\t<svg width="28" height="28" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 28 28" style="enable-background:new 0 0 28 28;" xml:space="preserve">\n\t\t\t\t\t<circle cx="14" cy="14" r="14" style="opacity:0.7;fill-rule:evenodd;clip-rule:evenodd;enable-background:new;"/>\n\t\t\t\t\t<path style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;" d="M18.3,15.2l-5.3,3.3c-0.7,0.4-1.6,0.2-2.1-0.5c-0.1-0.2-0.2-0.5-0.2-0.8v-6.6\n\t\t\t\t\t\tc0-0.8,0.7-1.5,1.5-1.5c0.3,0,0.6,0.1,0.8,0.2l5.3,3.3c0.7,0.4,0.9,1.4,0.5,2.1C18.6,14.9,18.4,15,18.3,15.2z"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t',A.appendChild(t),A.onclick=function(){e.previewVideo()}}}])}(),an=function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:e,page:0},a="".concat(A.env.domain,"/api/service/devicekit/bodycamera/device/trace");ki(a,"GET",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})},on=function(A,e,t,i){var n={accessToken:A.accessToken||A.token.deviceToken.video,deviceSerial:_(A.url).deviceSerial,validateCode:_(A.url).validCode,channelNo:_(A.url).channelNo,evidenceFileType:e},a="".concat(A.env.domain,"/api/service/devicekit/common/file/evidence");ki(a,"POST",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})},rn=function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,taskId:e},a="".concat(A.env.domain,"/api/service/devicekit/opencloud/task/info");ki(a,"GET",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})};var sn=function(){return o((function A(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};t(this,A),this.jSPlugin=e,this.currentEventInfo=i,this.inspectInfo=e.Theme.inspect.inspectInfo,this.type=a,this.timer=n,this.startTime=1e3,this.videoRecordingStatus=!0,this.saveSuccessCallback=o,this.init()}),[{key:"init",value:function(){this.renderEventDetail(),this.eventDetailDomEvent()}},{key:"show",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-wrap")).setAttribute("class","inspect-event-detail-wrap show")}},{key:"hide",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-wrap")).setAttribute("class","inspect-event-detail-wrap"),document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-box")).innerHTML=""}},{key:"validationEventTag",value:function(){return 0==document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).value.length?(document.getElementById("".concat(this.jSPlugin.id,"-event-tag-error")).style.display="block",document.getElementById("".concat(this.jSPlugin.id,"-event-tag-error")).innerHTML="请输入事件标签",document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).setAttribute("class","ezuikit-input input-has-error"),!1):(document.getElementById("".concat(this.jSPlugin.id,"-event-tag-error")).style.display="none",document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).setAttribute("class","ezuikit-input"),!0)}},{key:"renderVideo",value:function(A,e,t){var i=this;if(document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview")).innerHTML="",1===A||2===A){if(document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview")).innerHTML='\n <div class="video-stroage-exceptional-status-tips-wrap" style="background:url('.concat(this.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n <div class="video-stroage-exceptional-status-icon">\n <div type="default" class="ezuikit-spin ezuikit-spin-sm ezuikit-spin-spinning ezuikit-spin-dot-white"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n </div>\n <span class="video-stroage-exceptional-status-tips">视频正在存储中…</span>\n </div>\n '),1!==this.type){var n=this.currentEventInfo.evidenceId;this.timer.clearTimer("videoRecordingStatusTimer"),this.timer.createInterval("videoRecordingStatusTimer",(function(){rn(i.jSPlugin,n,(function(A){if(A.meta&&200===A.meta.code){var e=A.data,t=e.taskStatus,n=e.fileUrl,a=e.videoCoverPic||"".concat(i.jSPlugin.staticPath,"/imgs/bg.svg");i.renderVideo(t,a,n)}}))}),1e3)}}else 4===A||5===A||6===A||7===A?(document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview")).innerHTML='\n <div class="video-stroage-exceptional-status-tips-wrap video-stroage-exceptional-status-tips-error" style="background:url('.concat(this.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n <div class="video-stroage-exceptional-status-icon">\n <svg fill="currentColor" t="1691567317943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z"></path></svg>\n </div>\n <span class="video-stroage-exceptional-status-tips">视频存储失败</span>\n </div>\n '),this.timer.clearTimer("videoRecordingStatusTimer")):0!==A&&3!==A||(new nn({id:"".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview"),poster:e,fallback:"".concat(this.jSPlugin.staticPath,"/imgs/bg.svg"),src:t}),this.timer.clearTimer("videoRecordingStatusTimer"))}},{key:"renderEventDetail",value:function(){var A=this,e=this.currentEventInfo,t=e.evidenceFileType,i=e.fileUrl,n=e.taskStatus,a=e.videoCoverPic,o=document.createElement("div");o.setAttribute("class","inspectEventDetail");var r="";if(r=1===t?a||"".concat(this.jSPlugin.staticPath,"/imgs/bg.svg"):i||"".concat(this.jSPlugin.staticPath,"/imgs/bg.svg"),o.innerHTML='\n <div class="inspectEventDetail-header">\n <div class="inspectEventDetail-back" id="'.concat(this.jSPlugin.id,'-inspectEventDetail-back">\n <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M605.888 137.344a6.4 6.4 0 0 1 1.472 4.032l0.64 70.784a6.4 6.4 0 0 1-2.368 5.056L281.6 480H876.8v64H279.744l325.376 264a6.4 6.4 0 0 1 2.368 4.928l0.128 69.632a6.4 6.4 0 0 1-10.432 4.992l-422.016-342.4a42.24 42.24 0 0 1-7.04-57.344l3.264-3.904 3.776-3.456 421.76-344a6.4 6.4 0 0 1 8.96 0.896z"></path></svg>\n </div>\n <div class="inspectEventDetail-type">').concat(1===this.type?"编辑":"").concat(0===t?"图片存证":"视频存证",'</div>\n </div>\n <div class="inspectEventDetail-content" style="\n height: ').concat(document.getElementById("".concat(this.jSPlugin.id,"-wrap")).clientHeight-58-158,'px;\n overflow: auto;\n ">\n ').concat(0===t?'<div class="inspectEventDetail-content-img-box">\n <p class="inspectEventDetail-content-img-tips" style="display: '.concat(1==this.type?"none":"blcok",';">图片已取证,请填写存证信息:</p>\n <div class="inspectEventDetail-content-img-detail" id="').concat(this.jSPlugin.id,'-inspectEventDetail-picUrl"></div>\n </div>'):'<div class="inspectEventDetail-content-video-box">\n <div\n id="'.concat(this.jSPlugin.id,'-inspectEventDetail-content-video-timer"\n class="inspectEventDetail-content-video-timer"\n style="display: ').concat(1==this.type?"none":"flex",';"\n >\n <div class="video-recording-time-wrap">\n <svg fill="currentColor" width="10" height="10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 10 10" style="enable-background:new 0 0 10 10;" xml:space="preserve"><circle class="st0" cx="5" cy="5" r="3"/><path class="st1" d="M5,10c-2.8,0-5-2.2-5-5c0-2.8,2.2-5,5-5s5,2.2,5,5C10,7.8,7.8,10,5,10z M5,0.5c-2.5,0-4.5,2-4.5,4.5c0,2.5,2,4.5,4.5,4.5s4.5-2,4.5-4.5C9.5,2.5,7.5,0.5,5,0.5z"/></svg>\n <div id="').concat(this.jSPlugin.id,'-video-recording-time" class="video-recording-time">00:00:00</div>\n </div>\n <button id="').concat(this.jSPlugin.id,'-video-recording-stop-btn" class="inspectEventDetail-stop-btn ezuikit-btn">\n <span style="display:none" class="ezuikit-btn-loading-icon" style=""><span role="img" aria-label="loading" class="anticon anticon-loading anticon-spin"><svg viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></span>\n 停止录制\n </button>\n </div>\n <div id="').concat(this.jSPlugin.id,'-inspectEventDetail-content-video-info" class="inspectEventDetail-content-video-info" style="display: ').concat(1==this.type?"block":"none",';">\n <p class="inspectEventDetail-content-video-tips" style="display: ').concat(1==this.type?"none":"blcok",';">视频已取证:</p>\n <div class="inspectEventDetail-content-video-detail" id="').concat(this.jSPlugin.id,'-inspectEventDetail-videoPreview"></div>\n </div>\n </div>'),'\n <div class="inspectEventDetail-content-info">\n <div class="inspectEventDetail-content-info-item">\n <div class="inspectEventDetail-content-info-item-title">事件时间:</div>\n <div id="').concat(this.jSPlugin.id,'-inspectEventDetail-content-info-time" class="inspectEventDetail-content-info-item-value"></div>\n </div>\n <div class="inspectEventDetail-content-info-item">\n <div class="inspectEventDetail-content-info-item-title">存证人员:</div>\n <div class="inspectEventDetail-content-info-item-value">\n ').concat(1===this.type?this.currentEventInfo.depositaryOfficer?"null"===this.currentEventInfo.depositaryOfficer?"-":this.currentEventInfo.depositaryOfficer:"-":this.inspectInfo.inspectPerson?"null"===this.inspectInfo.inspectPerson?"-":this.inspectInfo.inspectPerson:"-",'\n </div>\n </div>\n <div class="inspectEventDetail-content-info-item">\n <div class="inspectEventDetail-content-info-item-title inspectEventDetail-content-info-item-title-required">事件标签:</div>\n <div class="ezuikit-form-item-control-input">\n <div class="ezuikit-form-item-control-input-content">\n <input\n id="').concat(this.jSPlugin.id,'-event-tag"\n maxlength="32"\n type="text"\n autocomplete="off"\n id="control-ref_note"\n class="ezuikit-input"\n placeholder="请输入事件标签"\n value="').concat(1===this.type&&this.currentEventInfo.eventType||"",'"\n />\n </div>\n <div class="ezuikit-form-item-explain ezuikit-form-item-explain-connected">\n <div id="').concat(this.jSPlugin.id,'-event-tag-error" class="ezuikit-form-item-explain-error" style="display: none">请输入事件标签</div>\n </div>\n </div>\n </div>\n <div class="inspectEventDetail-content-info-item">\n <div class="inspectEventDetail-content-info-item-title">事件备注:</div>\n <div class="ezuikit-input-textarea ezuikit-input-textarea-show-count" data-count="').concat(1===this.type&&this.currentEventInfo.eventRemark?this.currentEventInfo.eventRemark.length:0,' / 100">\n <textarea\n id="').concat(this.jSPlugin.id,'-event-remark"\n maxlength="100"\n class="ezuikit-input"\n maxlength="100"\n placeholder="请输入事件备注"\n autocomplete="off"\n >').concat(1===this.type&&this.currentEventInfo.eventRemark||"",'</textarea>\n </div>\n </div>\n </div>\n </div>\n <div class="inspectEventDetail-footer">\n <button id="').concat(this.jSPlugin.id,'-event-cancel" class="inspectEventDetail-footer-btn ezuikit-btn">取消</button>\n <button id="').concat(this.jSPlugin.id,'-event-ok" class="inspectEventDetail-footer-btn ezuikit-btn ezuikit-btn-primary">保存</button>\n </div>\n '),document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-box")).appendChild(o),1===this.type?document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML="".concat(1===t?this.currentEventInfo.eventBeginTime+" ~ "+this.currentEventInfo.eventEndTime:this.currentEventInfo.eventTime):(document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML="".concat((new Date).Format("yyyy-MM-dd hh:mm:ss")).concat(1===t?" ~ -":""),1===t&&document.getElementById("".concat(this.jSPlugin.id,"-video-recording-time"))&&this.videoRecordingStatus&&(0===this.type&&document.getElementById("".concat(this.jSPlugin.id,"-event-ok")).setAttribute("disabled","disabled"),this.timer.createInterval("videoRecordingTimer",(function(){var e,t,i,n;A.startTime&&(document.getElementById("".concat(A.jSPlugin.id,"-video-recording-time")).innerHTML=(e=A.startTime,t=parseInt(e%864e5/36e5),i=parseInt(e%36e5/6e4),n=parseInt(e%6e4/1e3),(t<10?"0".concat(t):t)+":"+(i<10?"0".concat(i):i)+":"+(n<10?"0".concat(n):n))),A.startTime+=1e3,A.startTime>A.jSPlugin.inspectRecordingDuration&&(document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).click(),A.timer&&A.timer.clearTimer("videoRecordingTimer"))}),1e3))),1===t){var s=this.currentEventInfo&&this.currentEventInfo.fileUrl;this.renderVideo(n,r,s)}else new An({id:"".concat(this.jSPlugin.id,"-inspectEventDetail-picUrl"),src:r,fallback:"".concat(this.jSPlugin.staticPath,"/imgs/fallback.svg"),showIcon:!1});this.show()}},{key:"eventDetailDomEvent",value:function(){var A=this,e=this.currentEventInfo,t=e.evidenceFileType,i=e.evidenceId;document.getElementById("".concat(this.jSPlugin.id,"-event-cancel")).addEventListener("click",(function(e){A.cancelPopover=new tn({id:"".concat(A.jSPlugin.id,"-event-cancel"),content:"确定要取消吗?".concat(1===A.type?"取消后编辑的内容将不会保存。":"取消后对应存证也将删除。"),placement:"topRight",arrowPointAtCenter:!0,onCancel:function(){A.cancelPopover.hide()},onConfirm:function(){1===t&&(A.videoRecordingStatus&&0===A.type&&(A.timer&&A.timer.clearTimer("videoRecordingTimer"),A.startTime=1e3,document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).click()),A.timer.clearTimer("videoRecordingStatusTimer")),A.cancelPopover.hide(),A.hide()}})})),document.getElementById("".concat(this.jSPlugin.id,"-event-ok")).addEventListener("click",(function(){if(A.validationEventTag()){var e=A.currentEventInfo,t=e.evidenceFileType,i=e.evidenceId,n=A.inspectInfo,a=n.inspectRecordId,o=n.inspectPerson,r=document.getElementById("".concat(A.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML,s={inspectRecordId:a,depositaryOfficer:o,evidenceFileId:i,evidenceFileType:t,eventType:document.getElementById("".concat(A.jSPlugin.id,"-event-tag")).value,eventRemark:document.getElementById("".concat(A.jSPlugin.id,"-event-remark")).value};1===t&&(s.eventBeginTime=r.split("~")[0].trim(),s.eventEndTime=r.split("~")[1].trim(),A.timer.clearTimer("videoRecordingStatusTimer")),0===t&&(s.eventTime=r),1===A.type&&(s.inspectEventId=A.currentEventInfo.inspectEventId,delete s.depositaryOfficer,delete s.eventTime,delete s.eventBeginTime,delete s.eventEndTime,delete s.evidenceFileId,delete s.evidenceFileType,function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:"",inspectEventId:"",eventType:"",eventRemark:""},a=Object.assign(n,e),o="".concat(A.env.domain,"/api/service/devicekit/bodycamera/inspect/event/update");ki(o,"POST",a,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A.jSPlugin,s,(function(e){e.meta&&200===e.meta.code?(A.hide(),A.saveSuccessCallback&&A.saveSuccessCallback({eventType:s.eventType,eventRemark:s.eventRemark})):new $i({type:"error",content:"保存失败,".concat(e.meta&&e.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){new $i({type:"error",content:"保存失败,请稍后重试!",wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}))),0===A.type&&function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:"",eventType:"",evidenceFileId:"",eventTime:"",eventBeginTime:"",eventEndTime:"",depositaryOfficer:"",eventRemark:"",evidenceFileType:""},a=Object.assign(n,e),o="".concat(A.env.domain,"/api/service/devicekit/bodycamera/inspect/event");ki(o,"POST",a,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A.jSPlugin,s,(function(e){e.meta&&200===e.meta.code?(A.hide(),A.saveSuccessCallback&&A.saveSuccessCallback()):new $i({type:"error",content:"保存失败,".concat(e.meta&&e.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){new $i({type:"error",content:"保存失败,请稍后重试!",wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}))}})),document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-back")).addEventListener("click",(function(){A.backPopover=new tn({id:"".concat(A.jSPlugin.id,"-inspectEventDetail-back"),content:"确定要返回吗?".concat(1===A.type?"返回后编辑的内容将不会保存。":"返回后对应存证也将删除。"),placement:"bottomRight",arrowPointAtCenter:!0,onCancel:function(){A.backPopover.hide()},onConfirm:function(){1===t&&(A.videoRecordingStatus&&0===A.type&&(A.timer&&A.timer.clearTimer("videoRecordingTimer"),A.startTime=1e3,document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).click()),A.timer.clearTimer("videoRecordingStatusTimer")),A.backPopover.hide(),A.hide()}})})),document.getElementById("".concat(this.jSPlugin.id,"-video-recording-stop-btn"))&&document.getElementById("".concat(this.jSPlugin.id,"-video-recording-stop-btn")).addEventListener("click",(function(){document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn ezuikit-btn-loading"),document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).querySelector(".ezuikit-btn-loading-icon").style.display="inline-block",function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,taskId:e},a="".concat(A.env.domain,"/api/v3/open/cloud/video/frame/stop");ki(a,"POST",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A.jSPlugin,i,(function(e){document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn"))&&(document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn"),document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).querySelector(".ezuikit-btn-loading-icon").style.display="none"),e.meta&&200===e.meta.code?rn(A.jSPlugin,i,(function(e){if(e.meta&&200===e.meta.code){var t=e.data,i=t.taskStatus,n=t.fileUrl,a=t.videoCoverPic;A.timer&&A.timer.clearTimer("videoRecordingTimer");var o=a||"".concat(A.jSPlugin.staticPath,"/imgs/bg.svg");A.renderVideo(i,o,n),document.getElementById("".concat(A.jSPlugin.id,"-inspectEventDetail-content-video-info")).style.display="block",document.getElementById("".concat(A.jSPlugin.id,"-inspectEventDetail-content-video-timer")).style.display="none";var r=document.getElementById("".concat(A.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML;document.getElementById("".concat(A.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML="".concat(r.split("~")[0]," ~ ").concat((new Date).Format("yyyy-MM-dd hh:mm:ss")),A.videoRecordingStatus=!1,document.getElementById("".concat(A.jSPlugin.id,"-event-ok")).removeAttribute("disabled")}})):new $i({type:"error",content:"停止录制失败,请稍后重试!",wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn"))&&(document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn"),document.getElementById("".concat(A.jSPlugin.id,"-video-recording-stop-btn")).querySelector(".ezuikit-btn-loading-icon").style.display="none"),new $i({type:"error",content:"停止录制失败,请稍后重试!",wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40})}))})),document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).addEventListener("input",(function(){A.validationEventTag()})),document.getElementById("".concat(this.jSPlugin.id,"-event-remark")).addEventListener("input",(function(A){var e=A.target.value;A.target.parentNode.setAttribute("data-count","".concat(e.length," / 100"))})),document.getElementById("".concat(this.jSPlugin.id,"-event-remark")).addEventListener("focus",(function(A){A.target.parentNode.setAttribute("class","ezuikit-input-textarea ezuikit-input-textarea-show-count ezuikit-input-textarea-focus")})),document.getElementById("".concat(this.jSPlugin.id,"-event-remark")).addEventListener("blur",(function(A){A.target.parentNode.setAttribute("class","ezuikit-input-textarea ezuikit-input-textarea-show-count")}))}}])}(),gn=function(){return o((function A(e,i,n){var a=this;t(this,A),s(this,"hideDelEConfirm",(function(){for(var A=0;A<a.delEConfirmList.length;A++)a.delEConfirmList[A].hide()})),s(this,"initRender",(function(){var A=a;if(document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")))document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box"))&&document.getElementById("".concat(a.jSPlugin.id,"-wrap")).removeChild(document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box"))),A.initRender();else{var e=document.createElement("div");e.id="".concat(a.jSPlugin.id,"-inspect-event-box"),e.setAttribute("class","inspect-event-box");var t=0;document.getElementById("".concat(a.jSPlugin.id,"-inspectInfoControl"))&&(t=document.getElementById("".concat(a.jSPlugin.id,"-inspectInfoControl")).clientHeight),e.style="background: #fff;position: absolute;right: 0;bottom: 0; top:".concat(t,"px;"),e.innerHTML='\n <div id="'.concat(a.jSPlugin.id,'-inspect-event-list-box" style="\n width: 290px;\n height: 100%;\n overflow: hidden;\n padding: 0;\n box-sizing: border-box;\n ">\n <h1 style="\n font-size: 16px;\n color: #262626;\n line-height: 24px;\n font-weight: bold;\n margin: 16px 16px 0;\n ">巡检事件</h1>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-btn-wrap" style="\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 16px;\n ">\n <div>\n <button\n id="').concat(a.jSPlugin.id,'-inspect-event-img"\n style="min-width: 88px; margin: 0 auto;"\n type="button"\n class="ezuikit-btn ezuikit-btn-primary"\n >\n <span style="display:none" class="ezuikit-btn-loading-icon" style=""><span role="img" aria-label="loading" class="anticon anticon-loading anticon-spin"><svg viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></span>\n 图片存证\n </button>\n <button\n id="').concat(a.jSPlugin.id,'-inspect-event-video"\n style="min-width: 88px; margin: 0 auto;"\n type="button"\n class="ezuikit-btn ezuikit-btn-primary"\n >\n <span style="display:none" class="ezuikit-btn-loading-icon" style=""><span role="img" aria-label="loading" class="anticon anticon-loading anticon-spin"><svg viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></span>\n 视频存证</button>\n </div>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-list-refresh" style="\n width: 17px;\n height: 32px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n ">\n <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="13" height="13" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path fill="currentColor" d="M960 416V192l-73.056 73.056a447.712 447.712 0 0 0-373.6-201.088C265.92 63.968 65.312 264.544 65.312 512S265.92 960.032 513.344 960.032a448.064 448.064 0 0 0 415.232-279.488 38.368 38.368 0 1 0-71.136-28.896 371.36 371.36 0 0 1-344.096 231.584C308.32 883.232 142.112 717.024 142.112 512S308.32 140.768 513.344 140.768c132.448 0 251.936 70.08 318.016 179.84L736 416h224z"></path>\n </svg>\n </div>\n </div>\n <div\n id="').concat(a.jSPlugin.id,'-inspect-loading"\n class="inspect-loading"\n style="\n height: calc(100% - 104px);\n position: absolute; bottom: 0; right: 0;background: #fff; bottom: 0; right: 0; z-index: 99; width: 100%; align-items: center; justify-content: center;\n display: ').concat(a.listLoading?"flex":"none",'\n ">\n <div type="default" class="ezuikit-spin ezuikit-spin-spinning"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n </div>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-list-nodata-wrap" style="\n display: none;\n height: calc(100% - 104px);\n text-align: center;overflow: auto;\n "> \n <img style="width: 85px;height: 85px; margin: 120px auto 0;" src="').concat(a.jSPlugin.staticPath,'/imgs/empty.png" />\n <p style="font-size: 14px;color: #595959;text-align: center;line-height: 22px;margin: 0;">暂无事件</p>\n </div>\n <div class="inspect-event-list-wrap" id="').concat(a.jSPlugin.id,'-inspect-event-list-wrap"\n style="display: none; height: calc(100% - 104px); overflow-x: hidden; overflow-y: auto; padding-top: 4px; box-sizing: border-box; ">\n <div id="').concat(a.jSPlugin.id,'-inspect-event-list-wrap-main"></div>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-list-more-loading" style="display: none;align-items: center;justify-content: center;" class="inspect-event-list-more-loading">\n <div type="default" class="ezuikit-spin ezuikit-spin-spinning"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n </div>\n </div>\n </div>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-detail-wrap" class="inspect-event-detail-wrap" style="\n height: 100%;\n ">\n <h1 style="\n font-size: 16px;\n color: #262626;\n line-height: 24px;\n font-weight: bold;\n margin: 16px 16px 0;\n ">巡检事件</h1>\n <div id="').concat(a.jSPlugin.id,'-inspect-event-detail-box"></div>\n </div>\n '),document.getElementById("".concat(a.jSPlugin.id,"-wrap")).appendChild(e),a.jSPlugin.Theme.decoderState.state.play?a.enableEvidenceBtn():a.disableEvidenceBtn(),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).onclick=function(){a.listLoading||a.startEvidence||(a.startEvidence=!0,a.hideDelEConfirm(),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).setAttribute("class","ezuikit-btn ezuikit-btn-primary ezuikit-btn-loading"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).querySelector(".ezuikit-btn-loading-icon").style.display="inline-block",on(a.jSPlugin,0,(function(A){a.startEvidence=!1,document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).querySelector(".ezuikit-btn-loading-icon").style.display="none",A.meta&&200===A.meta.code?new sn(a.jSPlugin,A.data,a.timer,0,(function(){a.initEvent(),new $i({type:"success",content:"保存成功",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})})):new $i({type:"error",content:"图片存证失败,".concat(A.meta&&A.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){a.startEvidence=!1,document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-img")).querySelector(".ezuikit-btn-loading-icon").style.display="none",new $i({type:"error",content:"图片存证失败,请稍后重试!",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})})))},document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).onclick=function(){a.listLoading||a.startEvidence||(a.startEvidence=!0,a.hideDelEConfirm(),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).setAttribute("class","ezuikit-btn ezuikit-btn-primary ezuikit-btn-loading"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).querySelector(".ezuikit-btn-loading-icon").style.display="inline-block",on(a.jSPlugin,1,(function(A){a.startEvidence=!1,document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).querySelector(".ezuikit-btn-loading-icon").style.display="none",A.meta&&200===A.meta.code?new sn(a.jSPlugin,A.data,a.timer,0,(function(){a.initEvent(),new $i({type:"success",content:"保存成功",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})})):new $i({type:"error",content:"视频存证失败,".concat(A.meta&&A.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){a.startEvidence=!1,document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-video")).querySelector(".ezuikit-btn-loading-icon").style.display="none",new $i({type:"error",content:"视频存证失败,请稍后重试!",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})})))},document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-refresh")).onclick=function(){a.listLoading||a.startEvidence||(a.hideDelEConfirm(),document.getElementById("".concat(a.jSPlugin.id,"-inspect-loading")).style.display="block",document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-wrap")).style.display="none",document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-nodata-wrap")).style.display="none",A.initEvent())}}})),s(this,"renderList",(function(A){document.getElementById("".concat(a.jSPlugin.id,"-inspect-loading")).style.display="none";var e=A.data||[];if(e.length>0){document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-wrap")).style.display="block",document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-nodata-wrap")).style.display="none";for(var t=function(){var t=document.createElement("div");t.setAttribute("class","inspect-event-item");var n=e[i];t.setAttribute("id","".concat(a.jSPlugin.id,"-inspect-event-item-").concat(n.inspectEventId)),t.innerHTML="",document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-wrap-main")).appendChild(t);var o,r=document.createElement("div");r.setAttribute("class","inspect-event-item-header-wrap"),1==n.evidenceFileType&&(o="".concat(n.eventBeginTime.split(" ")[1],"~").concat(n.eventEndTime.split(" ")[1])),0==n.evidenceFileType&&(o="".concat(n.eventTime.split(" ")[1]));var s="";1===n.evidenceFileType&&(1===n.taskStatus||2===n.taskStatus?s="storage":4===n.taskStatus||5===n.taskStatus||6===n.taskStatus||7===n.taskStatus?s="storage-error":0!==n.taskStatus&&3!==n.taskStatus||(s="storage-success")),r.innerHTML='\n <div class="inspect-event-item-header '.concat(s,'">\n <div class="inspect-event-item-header-left">\n <span class="inspect-event-item-status-wrap">\n <span class="inspect-event-item-status"></span>\n </span>\n <svg fill="currentColor" style="display: ').concat(1===n.evidenceFileType?"block":"none",'" width="16" height="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 14 12" style="enable-background:new 0 0 14 12;" xml:space="preserve">\n <path d="M1,12c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1h12c0.6,0,1,0.4,1,1v10c0,0.6-0.4,1-1,1H1z M1,11h1.6l0-3.5H1V11z\n M10.5,1h-7v10h7V1z M13,7.5h-1.6l0,3.5H13V7.5z M6.1,4.2l2.3,1.2c0.4,0.2,0.4,0.6,0,0.8L8.1,6.3l-2,1c-0.2,0.1-0.4,0-0.4-0.2V4.4\n C5.7,4.2,5.9,4.1,6.1,4.2z M13,6.6V4.9h-1.6v1.8H13z M1,6.6h1.6V4.9H1V6.6z M13,4V1h-1.6l0,3H13z M2.6,1H1v3h1.6L2.6,1z"/>\n </svg>\n <svg fill="currentColor" style="display: ').concat(1===n.evidenceFileType?"none":"block",'" width="16" height="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n viewBox="0 0 14 12" style="enable-background:new 0 0 14 12;" xml:space="preserve">\n <path class="st0" d="M13,0c0.6,0,1,0.4,1,1v10c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1H13z M10.4,6.2L5.6,9.8L3.8,8\n L1,10v1h12V9L10.4,6.2z M13,1H1v7.8l2.9-2.1l1.8,1.8l4.9-3.6L13,7.5V1z M5.5,2C6.3,2,7,2.7,7,3.5S6.3,5,5.5,5S4,4.3,4,3.5\n S4.7,2,5.5,2z M5.5,3C5.2,3,5,3.2,5,3.5S5.2,4,5.5,4S6,3.8,6,3.5S5.8,3,5.5,3z"/>\n </svg>\n <span class="inspect-event-item-time">').concat(o||"-",'</span>\n </div>\n <div class="inspect-event-item-header-right">\n <span class="inspect-event-item-header-toggle">\n <svg fill="currentColor" class="inspect-event-item-header-toggle-up" style="display: none;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M218.496 645.312l46.464 44.032 247.616-261.568 246.4 261.504 46.528-43.904-292.8-310.72z"></path></svg> \n <svg fill="currentColor" class="inspect-event-item-header-toggle-down" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M218.496 378.688l46.464-44.032 247.616 261.568 246.4-261.504 46.528 43.904-292.8 310.72z"></path></svg>\n </span>\n </div>\n </div>\n '),t.appendChild(r),r.onclick=function(A){"none"===r.querySelector(".inspect-event-item-header-toggle-up").style.display?(r.querySelector(".inspect-event-item-header-toggle-up").style.display="block",r.querySelector(".inspect-event-item-header-toggle-down").style.display="none",t.querySelector(".inspect-event-item-body").style.display="block"):(r.querySelector(".inspect-event-item-header-toggle-up").style.display="none",r.querySelector(".inspect-event-item-header-toggle-down").style.display="block",t.querySelector(".inspect-event-item-body").style.display="none")};var g=document.createElement("div");g.setAttribute("class","inspect-event-item-body"),g.style.display="none";var c=(1===n.evidenceFileType?n.videoCoverPic:n.fileUrl)||"".concat(a.jSPlugin.staticPath,"/imgs/bg.svg");g.innerHTML='\n <div class="inspect-event-item-img" id="'.concat(a.jSPlugin.id,"-inspect-view-").concat(n.inspectEventId,'"></div>\n <div class="inspect-event-item-body-info">\n <div class="inspect-event-item-body-info-tag">\n <span class="inspect-event-item-body-info-tag-label" title="').concat(n.eventType,'">').concat(n.eventType,"</span>\n </div>\n </div>\n "),t.appendChild(g),1==n.evidenceFileType&&(1===n.taskStatus||2===n.taskStatus?document.getElementById("".concat(a.jSPlugin.id,"-inspect-view-").concat(n.inspectEventId)).innerHTML='\n <div class="video-stroage-exceptional-status-tips-wrap" style="background:url('.concat(a.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n <div class="video-stroage-exceptional-status-icon">\n <div type="default" class="ezuikit-spin ezuikit-spin-sm ezuikit-spin-spinning ezuikit-spin-dot-white"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n </div>\n <span class="video-stroage-exceptional-status-tips">视频正在存储中…</span>\n </div>\n '):4===n.taskStatus?document.getElementById("".concat(a.jSPlugin.id,"-inspect-view-").concat(n.inspectEventId)).innerHTML='\n <div class="video-stroage-exceptional-status-tips-wrap video-stroage-exceptional-status-tips-error" style="background:url('.concat(a.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n <div class="video-stroage-exceptional-status-icon">\n <svg fill="currentColor" t="1691567317943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z"></path></svg>\n </div>\n <span class="video-stroage-exceptional-status-tips">视频存储失败</span>\n </div>\n '):0!==n.taskStatus&&3!==n.taskStatus||new nn({id:"".concat(a.jSPlugin.id,"-inspect-view-").concat(n.inspectEventId),src:n.fileUrl,poster:c,fallback:"".concat(a.jSPlugin.staticPath,"/imgs/bg.svg")})),0==n.evidenceFileType&&new An({id:"".concat(a.jSPlugin.id,"-inspect-view-").concat(n.inspectEventId),src:c,fallback:"".concat(a.jSPlugin.staticPath,"/imgs/bg.svg"),showIcon:!1});var l=document.createElement("div");l.setAttribute("class","inspect-event-item-body-info-opr");var I=document.createElement("span");I.setAttribute("class","inspect-event-item-body-info-opr-icon"),I.innerHTML='\n <svg fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M612.992 121.984a64 64 0 0 1 90.496 0l153.92 153.92a64 64 0 0 1 0 90.496l-435.2 435.2a96 96 0 0 1-23.04 17.024l525.312-0.128v64H175.808v-2.304a64 64 0 0 1-66.496-77.632l43.776-199.296a96 96 0 0 1 25.92-47.296zM523.072 302.4l-298.88 298.88a32 32 0 0 0-8.576 15.744l-43.776 199.296 190.848-51.712a32 32 0 0 0 14.272-8.256l300.032-300.032-153.92-153.92z m135.168-135.168L568.32 257.088l153.92 153.984 89.92-89.92-153.92-153.92z"></path></svg>\n ',l.appendChild(I);var C=document.createElement("span");C.setAttribute("class","inspect-event-item-body-info-opr-icon"),C.id="".concat(a.jSPlugin.id,"-inspect-event-del-").concat(n.inspectEventId),C.innerHTML=' \n <svg fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M128 320V256h767.872v64H832v512a64 64 0 0 1-64 64H256a64 64 0 0 1-64-64V320H128z m640 0H256v512h512V320zM464 432v256h-64v-256h64z m160 0v256h-64v-256h64zM704 128v64H320V128h384z"></path></svg>\n ',l.appendChild(C),I.onclick=function(A){a.startEvidence||new sn(a.jSPlugin,n,a.timer,1,(function(A){new $i({type:"success",content:"保存成功",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40}),n=Object.assign(n,A),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-item-").concat(n.inspectEventId)).querySelector(".inspect-event-item-body-info-tag-label").innerHTML=n.eventType,document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-item-").concat(n.inspectEventId)).querySelector(".inspect-event-item-body-info-tag-label").setAttribute("title",n.eventType)}))},C.onclick=function(A){a.startEvidence||(a.delE=new tn({id:"".concat(a.jSPlugin.id,"-inspect-event-del-").concat(n.inspectEventId),content:"确定要删除该事件吗?",placement:"topRight",arrowPointAtCenter:!0,onCancel:function(){a.delE.hide()},onConfirm:function(){!function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectEventId:""},a=Object.assign(n,e),o="".concat(A.env.domain,"/api/service/devicekit/bodycamera/inspect/event/delete");ki(o,"POST",a,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(a.jSPlugin,{inspectEventId:n.inspectEventId},(function(A){A.meta&&200===A.meta.code?(a.delE.hide(),a.initEvent(),setTimeout((function(){new $i({type:"success",content:"删除成功",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})}),10)):new $i({type:"error",content:"删除失败,".concat(A.meta&&A.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})}),(function(){new $i({type:"error",content:"删除失败,请稍后重试!",wrapNode:document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-box")),top:40})}))}}),a.delEConfirmList.push(a.delE))},t.querySelector(".inspect-event-item-body-info").appendChild(l),document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-wrap")).onscroll=function(e){var t=e.target;a.hideDelEConfirm(),t.scrollTop+t.offsetHeight>=t.scrollHeight-48&&!a.listLoading&&(A.start+1)*A.size<A.total&&a.initEvent(A.start+1)}},i=0;i<e.length;i++)t()}else document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-wrap")).style.display="none",document.getElementById("".concat(a.jSPlugin.id,"-inspect-event-list-nodata-wrap")).style.display="block"})),this.jSPlugin=e,this.videoWidth=e.width,this.inspectRecordId=i,this.timer=n,this.listLoading=!1,this.startEvidence=!1,this.delEConfirmList=[],this.videoHeight=document.getElementById("".concat(e.id,"-wrap")).clientHeight-document.getElementById("".concat(e.id,"-inspectInfoControl")).clientHeight||e.height,this.initEvent()}),[{key:"initEvent",value:function(){var A=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,i=this;i.listLoading=!0,0===e?i.initRender(e):document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="flex";var n=function(e){new $i({type:"error",content:e.meta&&e.meta.message||"列表获取失败,请稍后重试!",wrapNode:document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-box")),top:40}),i.renderList({})};i.inspectRecordId?function(A,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,o={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:e,pageStart:t,pageSize:i},r="".concat(A.env.domain,"/api/service/devicekit/bodycamera/inspect/event/page");ki(r,"GET",o,(function(A){n&&n(A)}),(function(A){a&&a(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(i.jSPlugin,i.inspectRecordId,e,t,(function(e){i.listLoading=!1,document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="none",e.meta&&200===e.meta.code?i.renderList(e.data||{}):n(e)}),(function(e){i.listLoading=!1,document.getElementById("".concat(A.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="none",n(e)})):(i.listLoading=!1,document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="none",i.renderList({}))}},{key:"disableEvidenceBtn",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-img")).setAttribute("disabled","disabled"),document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-video")).setAttribute("disabled","disabled")}},{key:"enableEvidenceBtn",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-img")).removeAttribute("disabled"),document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-video")).removeAttribute("disabled")}}])}(),cn=function(){return o((function A(e,i,n,a,o){var r=this;t(this,A),s(this,"createLocationControl",(function(){var A=r;function e(){this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT,this.defaultOffset=new BMapGL.Size(40,105)}return e.prototype=new BMapGL.Control,e.prototype.initialize=function(e){var t=document.createElement("div");return t.style.cssText="width: 26px;height: 26px;display: flex;align-items: center;justify-content: center; box-shadow: 1px 2px 1px rgb(0 0 0 / 15%); background: #fff; cursor: pointer;",t.id="".concat(A.jSPlugin.id,"-location-btn"),t.innerHTML='<svg fill="#3385ff" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path d="M510.976716 128.626761c-211.205756 0-382.401119 171.195363-382.401119 382.401119s171.195363 382.401119 382.401119 382.401119S893.377836 722.131308 893.377836 510.925552 722.182472 128.626761 510.976716 128.626761zM736.508444 736.45728c-29.265914 29.265914-63.443589 52.289797-101.407415 68.355351-29.265914 12.381733-59.964425 20.158689-91.481563 23.433197L543.619466 704.019187l-63.443589 0 0 124.431298c-32.233437-3.069851-63.443589-10.949136-93.323474-23.535525-37.963825-16.065554-72.039173-39.089437-101.407415-68.355351-29.265914-29.265914-52.289797-63.443589-68.355351-101.407415-12.381733-29.265914-20.158689-59.964425-23.433197-91.481563l126.273209 0 0-63.443589L193.554112 480.227041c3.069851-32.233437 10.949136-63.443589 23.535525-93.323474 16.065554-37.963825 39.089437-72.039173 68.355351-101.407415 29.265914-29.265914 63.443589-52.289797 101.407415-68.355351 29.879884-12.58639 61.090037-20.465674 93.323474-23.535525l0 125.863895 63.443589 0L543.619466 193.707605c31.517138 3.172179 62.215649 11.051464 91.481563 23.433197 37.963825 16.065554 72.039173 39.089437 101.407415 68.355351 29.265914 29.265914 52.289797 63.443589 68.355351 101.407415 12.58639 29.879884 20.465674 61.090037 23.535525 93.323474L703.251724 480.227041l0 63.443589 125.045268 0c-3.172179 31.517138-11.051464 62.215649-23.433197 91.481563C788.798241 673.01369 765.876686 707.089038 736.508444 736.45728z" p-id="1506"></path><path d="M516.093135 415.248526c-56.280604 0-100.793445 43.489557-100.793445 99.770161s44.512841 101.816728 100.793445 101.816728S616.886579 571.29929 616.886579 515.018687 572.373738 415.248526 516.093135 415.248526z" p-id="1507"></path>\n </svg>',t.onclick=function(e){setTimeout((function(){A.inspectMapWin.centerToTrack(18)}),100)},e.getContainer().appendChild(t),t},new e})),s(this,"initSwithcBtn",(function(){var A=document.createElement("div");A.id="".concat(r.jSPlugin.id,"-miniSwitch"),A.style="cursor: pointer;position: absolute; bottom: 106px; right: ".concat(r.jSPlugin.inspectVideoWidth+10,"px; z-index: 999;"),A.innerHTML="<div id='".concat(r.jSPlugin.id,'-miniSwitch-btn\' style="width: 32px;height: 32px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background: rgba(0,0,0,0.70);">\n <svg width="20px" height="20px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>大小窗切换</title>\n <g id="icon/大小窗切换" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <rect id="矩形" x="0" y="0" width="24" height="24"></rect>\n <path d="M16,3.25 C17.5187831,3.25 18.75,4.48121694 18.75,6 L18.75,6 L18.75,6.644 L19.095177,6.64456257 C20.6299163,6.64456257 21.9388658,7.64624846 22.0337198,8.99291851 L22.0392202,9.14979714 L22.0392202,17.639328 C22.0392202,19.0115638 20.7871129,20.0640733 19.2712041,20.1401546 L19.095177,20.1445626 L8.48326347,20.1445626 C6.94852423,20.1445626 5.63957467,19.1428767 5.54472071,17.7962066 L5.53922025,17.639328 L5.539,16.75 L5,16.75 C3.53746816,16.75 2.34159572,15.6082954 2.25501879,14.1675223 L2.25,14 L2.25,6 C2.25,4.48121694 3.48121694,3.25 5,3.25 L5,3.25 Z M18.75,14 C18.75,15.5187831 17.5187831,16.75 16,16.75 L16,16.75 L7.039,16.75 L7.03922025,17.639328 C7.03922025,18.1209822 7.57916546,18.5830417 8.33031492,18.6389177 L8.48326347,18.6445626 L19.095177,18.6445626 C19.873026,18.6445626 20.4615868,18.2126064 20.5321184,17.735283 L20.5392202,17.639328 L20.5392202,9.14979714 C20.5392202,8.66814298 19.999275,8.20608342 19.2481256,8.15020744 L19.095177,8.14456257 L18.75,8.144 Z M16,4.75 L5,4.75 C4.30964406,4.75 3.75,5.30964406 3.75,6 L3.75,6 L3.75,14 C3.75,14.6903559 4.30964406,15.25 5,15.25 L5,15.25 L16,15.25 C16.6903559,15.25 17.25,14.6903559 17.25,14 L17.25,14 L17.25,8.144 L17.2422027,8.14456257 L17.2422027,6.64456257 L17.25,6.644 L17.25,6 C17.25,5.35279131 16.7581253,4.8204661 16.1278052,4.75645361 L16,4.75 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n </g>\n </svg>\n </div>'),document.getElementById("".concat(r.jSPlugin.id,"-wrap")).appendChild(A),document.getElementById("".concat(r.jSPlugin.id,"-miniSwitch-btn")).onclick=function(){!function(A,e,t){var i=!0,n=!0;if("function"!=typeof A)throw new TypeError("Expected a function");return CA(t)&&(i="leading"in t?!!t.leading:i,n="trailing"in t?!!t.trailing:n),wt(A,e,{leading:i,maxWait:e,trailing:n})}((function(){return r.miniRecSwitchClick()}),1e3)()}})),s(this,"initMiniWinToggleBtn",(function(){var A=.3333*r.videoWidth,e=.3333*r.videoHeight,t=document.createElement("div");t.id="".concat(r.jSPlugin.id,"-miniToggle"),t.style="cursor: pointer;position: absolute; bottom: ".concat(e/2+96-30,"px; right: ").concat(r.jSPlugin.inspectVideoWidth+A,"px; z-index: 999; height:60px; box-sizing: border-box; padding-top: 20px; text-align: center; width:20px; overflow: hidden; background: #000000; border-radius: 2px 0px 0px 2px; opacity: 0.7;"),t.innerHTML="<div id='".concat(r.jSPlugin.id,"-miniToggle-btn'>\n <svg id=\"").concat(r.jSPlugin.id,'-min-win-close-icon" style="display: inline-block" width="20px" height="20px" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10867" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path d="M378.688 217.856l-44.032 46.464 261.568 247.616-261.504 246.4 43.904 46.528 310.72-292.8z" fill="#ffffff" p-id="10868"></path>\n </svg>\n <svg id="').concat(r.jSPlugin.id,'-min-win-open-icon" style="display: none" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10671" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20">\n <path d="M645.312 217.856l44.032 46.464-261.568 247.616 261.504 246.4-43.904 46.528-310.72-292.8z" fill="#ffffff" p-id="10672"></path>\n </svg>\n </div>'),document.getElementById("".concat(r.jSPlugin.id,"-wrap")).appendChild(t),document.getElementById("".concat(r.jSPlugin.id,"-miniToggle")).onclick=function(){r.miniWinToggleClick()}})),s(this,"init",(function(){r.initSwithcBtn(),r.initMiniWinToggleBtn()})),s(this,"setStyleListByIds",(function(A){A.map((function(A){var e=document.getElementById(A.id);e&&Object.keys(A.styleList).map((function(t){e.style[t]=A.styleList[t]}))}))})),this.jSPlugin=e,this.inspectMode=i,this.inspectMapWin=n,this.changeInspectMode=a,this.videoWidth=e.width,this.videoHeight=e.height,this.minWinStatus="open",this.decoderState=o,this.ZoomControl=new BMapGL.ZoomControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT,offset:new BMapGL.Size(40,50)}),this.LocationControl=this.createLocationControl(),this.NavigationControl3D=new BMapGL.NavigationControl3D({anchor:BMAP_ANCHOR_BOTTOM_LEFT,offset:new BMapGL.Size(28,105)}),this.init()}),[{key:"miniWinToggleClick",value:function(){var A=.3333*this.jSPlugin.width;"open"===this.minWinStatus?(this.setStyleListByIds([{id:"video"===this.inspectMode?"".concat(this.jSPlugin.id,"-mapbox"):"".concat(this.jSPlugin.id),styleList:{width:"0px"}},{id:"".concat(this.jSPlugin.id,"-miniSwitch"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-miniToggle"),styleList:{right:"".concat(this.jSPlugin.inspectVideoWidth,"px")}},{id:"".concat(this.jSPlugin.id,"-min-win-close-icon"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-min-win-open-icon"),styleList:{display:"inline-block"}}]),this.minWinStatus="close"):(this.setStyleListByIds([{id:"video"===this.inspectMode?"".concat(this.jSPlugin.id,"-mapbox"):"".concat(this.jSPlugin.id),styleList:{width:A+"px"}},{id:"".concat(this.jSPlugin.id,"-miniSwitch"),styleList:{display:"block"}},{id:"".concat(this.jSPlugin.id,"-miniToggle"),styleList:{right:"".concat(this.jSPlugin.inspectVideoWidth+A,"px")}},{id:"".concat(this.jSPlugin.id,"-min-win-close-icon"),styleList:{display:"inline-block"}},{id:"".concat(this.jSPlugin.id,"-min-win-open-icon"),styleList:{display:"none"}}]),this.minWinStatus="open")}},{key:"miniRecSwitchClick",value:function(){var A=this,e=.3333*this.jSPlugin.width,t=.3333*this.jSPlugin.height;"video"===this.inspectMode?(this.jSPlugin.Zoom&&this.jSPlugin.Zoom.stopZoom(),this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-mapbox"),styleList:{width:this.jSPlugin.width+"px",height:this.jSPlugin.height+"px",marginBottom:"-40px"}},{id:"".concat(this.jSPlugin.id,"-ez-iframe-footer-container"),styleList:{top:this.jSPlugin.height+"px"}},{id:"".concat(this.jSPlugin.id),styleList:{position:"absolute",zIndex:"100",bottom:"96px",right:"".concat(this.jSPlugin.inspectVideoWidth,"px"),overflow:"hidden"}}]),this.jSPlugin.Theme.inspect.reSizeVideo(e,t),this.inspectMode="map",this.changeInspectMode("map"),this.inspectMapWin.map.addControl(this.NavigationControl3D),this.inspectMapWin.map.addControl(this.LocationControl),this.inspectMapWin.map.addControl(this.ZoomControl),this.inspectMapWin.map.addOverlay(this.inspectMapWin.inspectRange),document.getElementById("".concat(this.jSPlugin.id,"-loading-item-btn-wrap"))&&this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-loading-item-btn"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-svg"),styleList:{display:"block"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-wrap"),styleList:{border:"none",width:"32px",height:"14px"}}]),setTimeout((function(){A.inspectMapWin.centerToTrack(18)}),100)):(this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-mapbox"),styleList:{width:e+"px",height:t+"px",marginBottom:"0"}},{id:"".concat(this.jSPlugin.id,"-ez-iframe-footer-container"),styleList:{top:"0px"}},{id:"".concat(this.jSPlugin.id),styleList:{position:"relative",zIndex:"0",bottom:"0",right:"0"}}]),this.jSPlugin.Theme.inspect.reSizeVideo(this.jSPlugin.width,this.jSPlugin.height),this.inspectMode="video",this.changeInspectMode("video"),this.inspectMapWin.map.removeControl(this.ZoomControl),this.inspectMapWin.map.removeControl(this.NavigationControl3D),this.inspectMapWin.map.removeControl(this.LocationControl),this.inspectMapWin.map.removeOverlay(this.inspectMapWin.inspectRange),document.getElementById("".concat(this.jSPlugin.id,"-loading-item-btn-wrap"))&&this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-loading-item-btn"),styleList:{display:"block"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-svg"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-wrap"),styleList:{border:"1px solid rgb(255, 255, 255)",width:"80px",height:"32px",color:"#fff","text-align":"center","line-height":"32px","font-size":"14px"}}]),setTimeout((function(){A.inspectMapWin.centerToTrack()}),100),this.jSPlugin.Zoom&&this.decoderState.state.play&&this.jSPlugin.Zoom.startZoom()),this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-wrap"),styleList:{width:this.jSPlugin.width+this.jSPlugin.inspectVideoWidth+"px",height:this.jSPlugin.height+this.jSPlugin.inspectVideoHeight+"px"}}])}}])}(),ln={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0,inspectInfo:{color:"#000000",backgroundColor:"#ffffff",activeColor:"#1890FF",btnList:[{btnKey:"inspectName",iconId:"inspectName",part:"left",defaultActive:0,isrender:1,color:"#262626"},{btnKey:"inspectBeginTime",iconId:"inspectBeginTime",part:"left",defaultActive:0,isrender:1,color:"#262626"},{btnKey:"inspectPerson",iconId:"inspectPerson",part:"right",defaultActive:0,isrender:1,color:"#262626"}]}},header:{color:"#2c2c2c",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{btnKey:"deviceName",iconId:"deviceName",part:"left",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"inspectTime",iconId:"inspectTime",part:"left",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"signalType",iconId:"signalType",part:"right",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"batteryStatus",iconId:"batteryStatus",part:"right",defaultActive:0,isrender:1,color:"#ffffff"}]},footer:{color:"#ffffff",backgroundColor:"#000000",activeColor:"blue",btnList:[{btnKey:"talk",iconId:"talk",part:"left",defaultActive:1,isrender:1,backgroundColor:"#cccccc"},{btnKey:"sound",iconId:"sound",part:"left",defaultActive:1,isrender:1,backgroundColor:"#cccccc"}]}},In=function(A){var e="";return Object.keys(A).map((function(t,i){e+="".concat(t,":").concat(A[t]).concat(i<Object.keys(A).length-1?";":"")})),e};var Cn=500,dn=function(){return o((function A(e,i,n,a,o,r,s){t(this,A),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.themeData=i,this.setDecoderState=n,this.decoderState=a,this.isNeedRenderInspectInfo=!1,this.isNeedRenderHeader=!1,this.isNeedRenderFooter=!1,this.inspectMode=o,this.changeInspectMode=r,this.themeInited=!1,this.inspectRecordId=null,this.inspectInfo={},this.activeThemeStatus=!0,this.activeThemeStatusTxt="模板未激活",this.globalContainer=new zi(this.jSPlugin),this.toastCustom=new Ri(e,!1),this.InspectEvent=null,this.timer=s}),[{key:"renderSignalType",value:function(A){return A?"WIFI"===A.toUpperCase()?'<span><svg t="1688983236732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path d="M0 352.832l93.12 98.752c231.296-245.44 606.464-245.44 837.76 0L1024 352.832C741.44 53.056 283.008 53.056 0 352.832z m372.352 395.008L512 896l139.648-148.16c-76.8-81.92-202.048-81.92-279.296 0zM186.24 550.4l93.12 98.752c128.448-136.32 336.96-136.32 465.408 0L837.824 550.4c-179.648-190.592-471.488-190.592-651.648 0z" fill="#ffffff" p-id="1530"></path>\n </svg></span>':"<span>".concat(A,"</span>"):null}},{key:"renderBatteryStatus",value:function(A){return A&&0!=A?'\n <div style="\n display: flex;\n align-items: center;\n position: relative;\n ">\n <span style="\n margin-right: 3px; \n color: '.concat(A<=20?"#FF4D4F":"#FFFFFF",'\n ">').concat(A,'%</span>\n <div style="\n position: absolute;\n right: 6px;\n height: 8px;\n width: 15px;\n ">\n <div style="\n width: ').concat(A,"%;\n height: 100%;\n background: ").concat(A<=20?"#FF4D4F":"#FFFFFF",'\n "></div>\n </div>\n <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="32" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path fill="').concat(A<=20?"#FF4D4F":"#FFFFFF",'" d="M128 213.333333l640 0q52.992 0 90.496 37.504t37.504 90.496q52.992 0 90.496 37.504t37.504 90.496l0 85.333333q0 52.992-37.504 90.496t-90.496 37.504q0 52.992-37.504 90.496t-90.496 37.504l-640 0q-52.992 0-90.496-37.504t-37.504-90.496l0-341.333333q0-52.992 37.504-90.496t90.496-37.504zM768 298.666667l-640 0q-17.664 0-30.165333 12.501333t-12.501333 30.165333l0 341.333333q0 17.664 12.501333 30.165333t30.165333 12.501333l640 0q17.664 0 30.165333-12.501333t12.501333-30.165333l0-341.333333q0-17.664-12.501333-30.165333t-30.165333-12.501333zM896 426.666667l0 170.666667q17.664 0 30.165333-12.501333t12.501333-30.165333l0-85.333333q0-17.664-12.501333-30.165333t-30.165333-12.501333z"></path>\n </svg>\n </div>\n '):null}},{key:"renderInspectTime",value:function(A){if(!A)return null;var e,t,i,n,a=A.split(" "),o=a[0].split("-"),r=a[1].split(":"),s=new Date(o[0],o[1]-1,o[2],r[0],r[1],r[2]),g=(new Date).getTime()-new Date(s).getTime();return'\n <span style="\n display: inline-block;\n width:8px;\n height:8px;\n border-radius: 100%;\n background: #FF4D4F;\n margin-right: 4px;\n "></span>\n '.concat((e=g,t=parseInt(e%864e5/36e5),i=parseInt(e%36e5/6e4),n=parseInt(e%6e4/1e3),(t<10?"0".concat(t):t)+":"+(i<10?"0".concat(i):i)+":"+(n<10?"0".concat(n):n)),"\n ")}},{key:"matchBtn",value:function(A,e){var t=this,i=this.themeData,n=i.customConfig,a=i.header,o=i.footer,r=n.inspectInfo,s={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}},g=r.btnList.findIndex((function(e){return e.iconId===A}));switch(-1!==g?(s.color=r.color,s.backgroundColor=r.backgroundColor,s.activeColor=r.activeColor):-1!==(g=a.btnList.findIndex((function(e){return e.iconId===A})))?(s.color=a.color,s.backgroundColor=a.backgroundColor,s.activeColor=a.activeColor):(s.color=o.color,s.backgroundColor=o.backgroundColor,s.activeColor=o.activeColor),A){case"inspectName":return s.title="巡检名称",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-inspectInfo-inspectName" \n style="\n color:').concat(e.color||"#262626",';\n font-size: 18px;\n text-align: left;\n font-weight: bold;\n padding: 0 16px;\n ">巡检名称</span>'),s.onclick=function(){},s;case"inspectBeginTime":return s.title="巡检开始时间",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-inspectInfo-inspectBeginTime" \n style="\n color:').concat(e.color||"#FFFFFF",';\n font-size: 14px;\n text-align: left;\n padding-left: 16px;\n border-left: 1px solid #d9d9d9;\n line-height: 16px;\n margin-top: 1px;\n ">巡检开始时间:-</span>'),s.onclick=function(){},s;case"inspectPerson":return s.title="本地巡检员",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-inspectInfo-inspectPerson" \n style="\n color:').concat(e.color||"#FFFFFF",';\n font-size: 14px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n padding-right: 16px;\n ">本地巡检员:-</span>'),s.onclick=function(){},s;case"deviceName":return s.title="设备名称",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-header-deviceName" \n style="\n color:').concat(e.color||"#FFFFFF",";\n font-size: 16px;\n display: block;\n max-width: ").concat(.33*this.jSPlugin.width,'px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n ">设备名称</span>'),s.onclick=function(){},s;case"inspectTime":return s.title="巡检时长",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-header-inspectTime-wrap" \n style="\n color:').concat(e.color||"#FFFFFF",';\n font-size: 14px;\n display: flex;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n margin-left: 32px;\n ">巡检时长:<span id="').concat(this.jSPlugin.id,'-header-inspectTime" style="display: flex; align-items: center;">-</span></span>'),s.onclick=function(){},s;case"signalType":return s.title="信号类型",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-header-signalType" \n style="\n color:').concat(e.color||"#FFFFFF",';\n font-size: 14px;\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n "></span>'),s.onclick=function(){},s;case"batteryStatus":return s.title="设备电量",s.id=A,s.domString='<span id="'.concat(this.jSPlugin.id,'-header-batteryStatus" \n style="\n color:').concat(e.color||"#FFFFFF",';\n font-size: 14px;\n display: flex;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n margin-left: 12px;\n align-items: center;\n "></span>'),s.onclick=function(){},s;case"talk":return s.title="对讲",s.id=A,s.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-talk-icon" class="theme-icon-item-icon" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Cn?48:32,'" height="').concat(this.jSPlugin.width>Cn?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.1,2.7C8.5,2.7,7.2,4,7.2,5.6v5.2c0,1.6,1.3,2.9,2.9,2.9l0.2,0c1.5-0.1,2.7-1.4,2.7-2.9V5.6\tC13,4,11.7,2.7,10.1,2.7z M10.1,3.7c1.1,0,1.9,0.9,1.9,1.9v5.2c0,1-0.8,1.8-1.8,1.9l-0.1,0c-1,0-1.9-0.9-1.9-1.9V5.6 C8.2,4.5,9,3.7,10.1,3.7z" /><path d="M15.1,8.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,3-2.5,5.5-5.5,5.5c-3,0-5.4-2.3-5.5-5.3l0-0.2V9 c0-0.3,0.2-0.5,0.5-0.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,2.5,2,4.5,4.5,4.5c2.4,0,4.4-1.9,4.5-4.3l0-0.2V9 C14.6,8.7,14.8,8.5,15.1,8.5z" /><path d="M13.5,17.7c0.3,0,0.5,0.2,0.5,0.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-7c-0.3,0-0.5-0.2-0.5-0.5 c0-0.2,0.2-0.4,0.4-0.5l0.1,0H13.5z" /><path d="M10.1,15.2c0.2,0,0.4,0.2,0.5,0.4l0,0.1v2.5c0,0.3-0.2,0.5-0.5,0.5c-0.2,0-0.4-0.2-0.5-0.4l0-0.1 v-2.5C9.6,15.4,9.8,15.2,10.1,15.2z" />'+'</svg><span id="'.concat(this.jSPlugin.id,'-talk-label" style="margin-left: -3px">对讲</span>'),s.onclick=function(){var A=t.decoderState.state,e=A.talk,i=A.sound;if(A.play)if(e){console.log("结束对讲"),t.setDecoderState({talk:!1}),t.jSPlugin.Talk.stopTalk();var n=bt(t.themeData.footer.btnList,(function(A){return"sound"===A.iconId&&1===A.isrender&&1===A.defaultActive}))>-1;t.themeData&&n&&t.jSPlugin.openSound()}else console.log("开始对讲"),t.setDecoderState({talk:!0}),t.jSPlugin.Talk.startTalk((function(A){i&&!A&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1}))}))},s;case"sound":return s.title="音量",s.id=A,s.domString='<span style="height: 100%">'+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-nosound-icon" style="display:none" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Cn?48:32,'" height="').concat(this.jSPlugin.width>Cn?48:32,'" viewBox="-6 -7 32 31">\n <path d="M8.5,4.2c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8C5,13.2,5,12.9,5.1,12.7 c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3L9.2,5L5.9,7.8 C5.6,7.9,5.3,7.9,5.1,7.7C5,7.5,5,7.3,5.1,7.1L5.2,7L8.5,4.2z"/>\n <path d="M5.5,6.9C5.8,6.9,6,7.1,6,7.4c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2C3.4,7.9,3.3,8,3.2,8.2l0,0.1v4 c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,12.5,6,12.7,6,13c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4 c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n <path d="M17.4,7.9c0.2-0.2,0.5-0.2,0.7,0c0.2,0.2,0.2,0.4,0.1,0.6l-0.1,0.1l-3.8,3.8c-0.2,0.2-0.5,0.2-0.7,0 c-0.2-0.2-0.2-0.4-0.1-0.6l0.1-0.1L17.4,7.9z"/>\n <path d="M13.7,7.9c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.8,3.8c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1-0.1 l-3.7-3.8C13.5,8.4,13.5,8.1,13.7,7.9z"/>\n </svg>')+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-sound-icon" style="display:inline-block" width="').concat(this.jSPlugin.width>Cn?48:32,'" height="').concat(this.jSPlugin.width>Cn?48:32,'" fill="').concat(s.color,'" viewBox="-6 -7 32 32">\n <path d="M13.2,7.1c0.1-0.2,0.5-0.3,0.7-0.2c1.1,0.7,1.9,2.2,1.9,3.7c0,1.6-0.7,3-1.9,3.7\n c-0.2,0.1-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7c0.8-0.5,1.4-1.6,1.4-2.9c0-1.3-0.6-2.4-1.4-2.9C13.1,7.6,13,7.3,13.2,7.1z"/>\n <path d="M15.7,4.5c0.2-0.2,0.5-0.2,0.7-0.1C18,5.8,19,8.2,19,10.7c0,2.5-1,4.8-2.7,6.3\n c-0.2,0.2-0.5,0.2-0.7-0.1c-0.2-0.2-0.2-0.5,0.1-0.7c1.4-1.2,2.3-3.3,2.3-5.5c0-2.2-0.9-4.3-2.3-5.5C15.5,5,15.5,4.7,15.7,4.5z"/>\n <path id="Stroke-5" class="st1" d="M8.5,4.7c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8\n C5,13.7,5,13.4,5.1,13.2c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3l-0.1,0\n L5.9,8.3C5.6,8.4,5.3,8.4,5.1,8.2C5,8,5,7.7,5.1,7.6l0.1-0.1L8.5,4.7z"/>\n <path d="M5.5,7.4C5.8,7.4,6,7.6,6,7.9c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.2,0-0.3,0.1-0.3,0.3l0,0.1v4\n c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,13,6,13.2,6,13.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4\n c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n </svg>')+'</span><span id="'.concat(this.jSPlugin.id,'-sound-label" style="margin-left: -3px; color: ').concat(s.color,'">音量</span>'),s.onclick=function(){var A=t.decoderState.state,e=A.play,i=A.sound,n=A.talk;e&&!n&&(i?(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})):t.jSPlugin.openSound())},s;default:return s}}},{key:"renderInspectInfo",value:function(A,e){var t=this.matchBtn(A,e),i=document.createElement("sapn");i.innerHTML="".concat(t.domString),"left"===e.part?document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl-left")).appendChild(i):document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl-right")).appendChild(i)}},{key:"renderHeader",value:function(A,e){var t=this.matchBtn(A,e),i=document.createElement("span");i.className="".concat(this.jSPlugin.id,"-header-content"),i.style="display: flex; align-items: center; ",i.innerHTML="\n ".concat(t.domString,"\n "),"left"===e.part?document.getElementById("".concat(this.jSPlugin.id,"-headControl-left")).appendChild(i):document.getElementById("".concat(this.jSPlugin.id,"-headControl-right")).appendChild(i)}},{key:"renderFooter",value:function(A,e){var t=this,i=this.matchBtn(A,e),n=this.videoWidth/6,a=document.createElement("div");a.className="theme-icon-item",this.jSPlugin.isWebConsole?a.style="padding:0 ".concat(.1*n,"px;"):a.style="padding:0 ".concat(.1*n,"px;cursor: pointer;"),a.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(i.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(i.id,'-content" title="').concat(i.title,'" style="display: flex;align-items: center;position:relative;">')).concat(i.domString,"</div>")+"</span>",a.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;i.onclick(A)},i.onmouseenter&&(a.onmouseenter=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;i.onmouseenter(A)}),i.onmouseleave&&(a.onmouseleave=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;i.onmouseleave(A)}),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).appendChild(a)}},{key:"initThemeData",value:function(){var A=this,e=this.themeData,t=e.customConfig,i=e.header,n=e.footer,a=t.inspectInfo,o=this.jSPlugin.id;if(this.isNeedRenderInspectInfo=bt(a.btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderHeader=bt(i.btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderFooter=bt(n.btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderInspectInfo)if(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")))document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-inspectInfoControl-left' style='display:flex;'></div><div id='").concat(this.jSPlugin.id,"-inspectInfoControl-right' style='display:flex'></div>");else{var r=document.createElement("div");r.setAttribute("id","".concat(this.jSPlugin.id,"-inspectInfoControl")),r.setAttribute("class","inspectInfo-controls"),r.innerHTML="<div id='".concat(this.jSPlugin.id,"-inspectInfoControl-left' class=\"inspectInfo-controls-left\" style='display:flex;overflow:hidden;'></div><div id='").concat(this.jSPlugin.id,"-inspectInfoControl-right' class=\"inspectInfo-controls-right\" style='display:flex;'></div>");var s={height:"58px",display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#000000",width:"".concat(this.jSPlugin.width+290,"px"),position:"relative","align-items":"center",background:"#ffffff","border-bottom":"1px solid #D9D9D9","box-sizing":"border-box"};r.style=In(s),document.getElementById("".concat(o,"-wrap")).insertBefore(r,document.getElementById(this.jSPlugin.id));var g=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(g)}),50)}else document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl"))&&document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")));if(this.isNeedRenderHeader)if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>");else{var c=document.createElement("div");c.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),c.setAttribute("class","header-controls"),c.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex; max-width: 70%; align-items: center; overflow: hidder;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' class=\"header-controls-right\" style='display:flex; align-items: center;'></div>");var l={height:"56px",display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:this.jSPlugin.width+"px",padding:"0 16px","box-sizing":"border-box",position:"relative","align-items":"center",background:"#000000"};c.style=In(l),document.getElementById("".concat(o,"-wrap")).insertBefore(c,document.getElementById(o));var I=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(I)}),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("56px","px"));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 d={position:"relative",display:"flex",height:"56px","flex-wrap":"wrap","justify-content":"center","z-index":999,top:0,color:"#FFFFFF",width:this.jSPlugin.width+"px","align-items":"center","background-color":"#000000","font-size":"14px"};C.style=In(d),C.innerHTML='\n <div id="'.concat(this.jSPlugin.id,"-audioControls\" class=\"footer-controls\" style='display:flex;justify-content: center;padding: 0 4%;width:100%;z-index:999;position: relative;'>\n <div id='").concat(this.jSPlugin.id,"-audioControls-left' class=\"footer-controls-left\" style='display:flex;margin-lefacti'></div><div id='").concat(this.jSPlugin.id,"-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div>\n </div>\n "),m(C,document.getElementById(o))}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")));this.isNeedRenderInspectInfo&&document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.background=a.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.color=a.color,a.btnList.map((function(e,t){e.isrender&&A.renderInspectInfo(e.iconId,e)}))),this.isNeedRenderHeader&&document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=i.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=i.color,i.btnList.map((function(e,t){e.isrender&&A.renderHeader(e.iconId,e)}))),this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=n.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=n.color,n.btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)}))),this.inspectMapWin=new qi(this.jSPlugin),this.inspectSmallWin=new cn(this.jSPlugin,this.inspectMode,this.inspectMapWin,this.changeInspectMode,this.decoderState)}},{key:"renderThemeData",value:function(){var A=this,e=this.decoderState.state.isEditing,t=this.themeData,i=t.inspectInfo,n=t.header,a=t.footer;if(this.isNeedRenderInspectInfo&&i&&(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.background=i.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.color=i.color.replace("-diy",""),i.btnList.map((function(e,t){e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId]))}))),this.isNeedRenderHeader&&n&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=n.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=n.color.replace("-diy",""),n.btnList&&n.btnList.map((function(e,t){e.isrender&&A.setDecoderState(s({},e.iconId,A.decoderState.state[e.iconId]))}))),this.isNeedRenderFooter&&a)document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=a.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=a.color.replace("-diy",""),a.btnList.map((function(t,i){if(t.isrender&&A.setDecoderState(s({},t.iconId,A.decoderState.state[t.iconId])),0==i&&!A.themeInited&&A.activeThemeStatus)var n=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(n),1!=A.themeData.customConfig.bellPoster||e?A.jSPlugin.play():A.jSPlugin.pluginStatus.loadingClear(),A.themeInited=!0)}),50)})),this.setDecoderState({cloudRec:"cloud.rec"===_(this.jSPlugin.url).type,rec:"rec"===_(this.jSPlugin.url).type,type:_(this.jSPlugin.url).type});else if(!this.themeInited&&this.activeThemeStatus)var o=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(o),A.themeData&&A.themeData.customConfig&&1==A.themeData.customConfig.bellPoster&&!e?A.jSPlugin.pluginStatus.loadingClear():A.jSPlugin.play(),A.themeInited=!0)}),50);var r=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(r),A.reSizeVideo(A.videoWidth,A.videoHeight))}),50);this.jSPlugin.Zoom||(this.jSPlugin.Zoom=new mi(this.jSPlugin)),this.getInspectDevInfo(this.jSPlugin,!0,!1)}},{key:"getInspectRecord",value:function(){var A=this;!function(A,e,t){var i={accessToken:A.accessToken||A.token.deviceToken.video,deviceSerial:_(A.url).deviceSerial},n="".concat(A.env.domain,"/api/service/devicekit/bodycamera/inspect/detail/latest");ki(n,"GET",i,(function(A){e&&e(A)}),(function(A){t&&t(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(this.jSPlugin,(function(e){if(200==e.meta.code&&e.data){var t=e.data;t.inspectRange&&A.inspectMapWin.createPolygon(t.inspectRange,"#407AFF","dashed",4,1,"#407AFF",.08),t.inspectPoints&&t.inspectPoints.length>0&&A.inspectMapWin.createInspectPoints(t.inspectPoints),"video"===A.inspectMode&&A.inspectMapWin.map.removeOverlay(A.inspectMapWin.inspectRange),document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectName"))&&t.inspectName&&(document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectName")).innerText=""+t.inspectName),document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectBeginTime"))&&t.beginTime&&(document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectBeginTime")).innerText="巡检开始时间:"+t.beginTime),document.getElementById("".concat(A.jSPlugin.id,"-header-inspectTime"))&&A.timer.createInterval("InspectTimer",(function(){document.getElementById("".concat(A.jSPlugin.id,"-header-inspectTime")).innerHTML=A.renderInspectTime(t.beginTime)}),1e3),document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectPerson"))&&t.inspectPerson&&(document.getElementById("".concat(A.jSPlugin.id,"-inspectInfo-inspectPerson")).innerText="本地巡检员:"+t.inspectPerson),A.inspectInfo=t,t.inspectRecordId&&an(A.jSPlugin,t.inspectRecordId,(function(e){200==e.meta.code&&e.data&&(A.inspectMapWin.createTrack(e.data,!0),A.timer.createInterval("TraceTimer",(function(){t.inspectRecordId&&an(A.jSPlugin,t.inspectRecordId,(function(e){200==e.meta.code&&e.data&&A.inspectMapWin.createTrack(e.data,!1)}),(function(){}))}),5e3))}),(function(){})),A.InspectEvent=new gn(A.jSPlugin,t.inspectRecordId,A.timer)}else A.InspectEvent=new gn(A.jSPlugin,null,A.timer)}),(function(A){}))}},{key:"getInspectDevInfo",value:function(A){var e=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!function(A,e,t){var i={accessToken:A.accessToken||A.token.deviceToken.video,deviceSerial:_(A.url).deviceSerial},n="".concat(A.env.domain,"/api/service/devicekit/bodycamera");ki(n,"GET",i,(function(A){e&&e(A)}),(function(A){t&&t(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A,(function(n){n.meta&&200==n.meta.code&&n.data?1===n.data.status?(i&&!e.decoderState.state.play&&(e.jSPlugin.pluginStatus.loadingStart(e.jSPlugin.id),e.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"}),e.jSPlugin.play()),e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-global-box"),!1),document.getElementById("".concat(e.jSPlugin.id,"-header-deviceName"))&&(document.getElementById("".concat(e.jSPlugin.id,"-header-deviceName")).innerText="".concat(n.data.deviceName,"(").concat(n.data.deviceSerial,")"),document.getElementById("".concat(e.jSPlugin.id,"-header-deviceName")).setAttribute("title","".concat(n.data.deviceName,"(").concat(n.data.deviceSerial,")"))),document.getElementById("".concat(e.jSPlugin.id,"-header-signalType"))&&(document.getElementById("".concat(e.jSPlugin.id,"-header-signalType")).innerHTML=e.renderSignalType(n.data.signalType)),document.getElementById("".concat(e.jSPlugin.id,"-header-batteryStatus"))&&(document.getElementById("".concat(e.jSPlugin.id,"-header-batteryStatus")).innerHTML=e.renderBatteryStatus(n.data.batteryStatus)),e.timer.createInterval("InspectDevInfoTimer",(function(){e.getInspectDevInfo(A,!1,!1)}),3e5),t&&e.getInspectRecord()):(e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"当前设备未在巡检中",refreshBtn:"刷新",refreshShow:!0},(function(){e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-no-inspect-box"),!1),e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!0),e.getInspectDevInfo(A,!0,!0)}))):(e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:n.meta.message,refreshShow:!1}))}),(function(){e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-global-box"),!1)}))}},{key:"fetchThemeData",value:function(A){var e=this;Di(this.jSPlugin,A,(function(A){if(0!==A.meta.code||!A.data)return e.activeThemeStatus=!1,e.jSPlugin.pluginStatus.loadingClear(),"111021"==A.meta.code?(e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"无效的模板id",refreshBtn:"刷新",refreshShow:!1}),void(e.activeThemeStatusTxt="无效的模板id")):"111023"==A.meta.code?(e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"您的试用特权已到期,需前往轻应用控制台购买后使用。",refreshBtn:"刷新",refreshShow:!1}),void(e.activeThemeStatusTxt="试用特权已到期")):(e.globalContainer.globalContainerToggle("".concat(e.jSPlugin.id,"-inspect-loading-box"),!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"模板未激活,请先在开放平台轻应用控制台购买模板",refreshBtn:"刷新",refreshShow:!1}),void(e.activeThemeStatusTxt="模板未激活"));e.activeThemeStatus=!0,e.themeData=A.data,e.jSPlugin.capacity?(e.initThemeData(),e.renderThemeData()):setTimeout((function(){e.initThemeData(),e.renderThemeData()}),300)}),(function(){e.themeData=ln,e.themeData.header&&(e.themeData.header.btnList=e.themeData.header.btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.themeData.footer&&(e.themeData.footer.btnList=e.themeData.footer.btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.initThemeData(),e.renderThemeData()}))}},{key:"reSizeVideo",value:function(A,e){if(document.getElementById("".concat(this.jSPlugin.id)).style.width=A+"px",document.getElementById("".concat(this.jSPlugin.id)).style.height=e+"px",this.jSPlugin&&this.jSPlugin.bPlay)this.jSPlugin.JS_Resize(A,e);else{document.getElementById("".concat(this.jSPlugin.id,"-player"))&&(document.getElementById("".concat(this.jSPlugin.id,"-player")).width=A,document.getElementById("".concat(this.jSPlugin.id,"-player")).height=e,document.getElementById("".concat(this.jSPlugin.id,"-player")).style.width=A+"px",document.getElementById("".concat(this.jSPlugin.id,"-player")).style.height=e+"px",document.getElementById("".concat(this.jSPlugin.id,"-container-0")).style.height=e+"px");var t=1;if(document.getElementById("".concat(this.jSPlugin.id,"canvas0")))navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)&&(t=2),document.getElementById("".concat(this.jSPlugin.id,"canvas0")).style.width=A*t+"px",document.getElementById("".concat(this.jSPlugin.id,"canvas0")).style.height=e*t+"px",document.getElementById("".concat(this.jSPlugin.id,"canvas0")).width=A*t,document.getElementById("".concat(this.jSPlugin.id,"canvas0")).height=e*t,document.getElementById("".concat(this.jSPlugin.id,"canvas0")).parentNode.style.width=A*t+"px",document.getElementById("".concat(this.jSPlugin.id,"canvas0")).parentNode.style.height=e*t+"px",document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).height=e*t}}},{key:"reSize",value:function(A,e){var t=.3333*A,i=.3333*e;document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.width=A+this.jSPlugin.inspectVideoWidth+"px"),document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.width=A+"px"),document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.width=A+"px"),"video"===this.jSPlugin.Theme.inspectMode?(this.reSizeVideo(A,e),document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.top=0),document.getElementById("".concat(this.jSPlugin.id,"-mapbox")).style.width=t+"px",document.getElementById("".concat(this.jSPlugin.id,"-mapbox")).style.height=i+"px"):(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.top=e+"px"),this.reSizeVideo(t,i),document.getElementById("".concat(this.jSPlugin.id,"-mapbox")).style.width=A+"px",document.getElementById("".concat(this.jSPlugin.id,"-mapbox")).style.height=e+"px"),document.getElementById("".concat(this.jSPlugin.id,"-miniToggle")).style.bottom=i/2+96-30+"px",document.getElementById("".concat(this.jSPlugin.id,"-miniToggle")).style.right=this.jSPlugin.inspectVideoWidth+t+"px"}}])}(),hn=function(){return o((function A(e){var i=this;if(t(this,A),s(this,"changeInspectMode",(function(A){i.inspectMode=A})),this.jSPlugin=e,this.videoWidth=e.width,this.videoHeight=e.height,this.inspectMode="video",this.autoFocus=0,this.decoderState={state:{isEditing:!1,play:!1,sound:!1,recordvideo:!1,recordCount:"00:00",talk:!1,mute:!1,cloudRec:"cloud.rec"===_(e.url).type,rec:"rec"===_(e.url).type,type:_(e.url).type}},this.isMobile=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i),void 0!==e.isMobile&&(this.isMobile=e.isMobile),this.themeData=ln,"themeData"==this.jSPlugin.themeId&&(this.themeData=this.jSPlugin.params.themeData),this.timer||(this.timer=new Xi(e)),this.jSPlugin.themeId)if(this.isMobile||(this.inspect=new dn(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState,this.inspectMode,this.changeInspectMode,this.timer)),"themeData"===this.jSPlugin.themeId)this.themeData=this.jSPlugin.params.themeData,this.inspect.initThemeData(),this.inspect.renderThemeData();else this.inspect.fetchThemeData(this.jSPlugin.themeId);this.jSPlugin.Talk||(this.jSPlugin.Talk=new li(this.jSPlugin)),f("".concat(this.jSPlugin.staticPath,"/css/theme.css")),f("".concat(this.jSPlugin.staticPath,"/css/component.css")),f("".concat(this.jSPlugin.staticPath,"/css/inspectTheme.css"))}),[{key:"setDecoderState",value:function(A,e){var t=this,i="#FFFFFF",n="#1890FF";Object.keys(A).map((function(e){switch(e){case"talk":document.getElementById("".concat(t.jSPlugin.id,"-talk"))&&(document.getElementById("".concat(t.jSPlugin.id,"-talk")).className=A[e]?"active":"",document.getElementById("".concat(t.jSPlugin.id,"-talk-content")).childNodes[1].style.fill=A[e]?n:i,document.getElementById("".concat(t.jSPlugin.id,"-talk-content")).childNodes[2].style.color=A[e]?n:i);break;case"sound":document.getElementById("".concat(t.jSPlugin.id,"-sound"))&&(A[e]?(document.getElementById("".concat(t.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(t.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:none",document.getElementById("".concat(t.jSPlugin.id,"-sound")).className=A[e]?"active":"",document.getElementById("".concat(t.jSPlugin.id,"-sound-content")).childNodes[0].children[1].style.fill=A[e]?n:i,document.getElementById("".concat(t.jSPlugin.id,"-sound-label")).style.color=A[e]?n:i):(document.getElementById("".concat(t.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(t.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:none",document.getElementById("".concat(t.jSPlugin.id,"-sound")).className=A[e]?"active":"",document.getElementById("".concat(t.jSPlugin.id,"-sound-label")).style.color=A[e]?n:i))}t.decoderState.state=Object.assign(t.decoderState.state,A)}))}},{key:"setDisabled",value:function(A){var e=this.decoderState.state,t=e.sound;e.hd,null!=document.getElementById("".concat(this.jSPlugin.id,t?"-sound-icon":"-nosound-icon"))&&document.getElementById("".concat(this.jSPlugin.id,t?"-sound-icon":"-nosound-icon")).setAttribute("style",A?"cursor: not-allowed;fill: gray":"cursor: default"),null!=document.getElementById("".concat(this.jSPlugin.id,"-sound-label"))&&document.getElementById("".concat(this.jSPlugin.id,"-sound-label")).setAttribute("style",A?"cursor: not-allowed; color: gray":"cursor: default"),null!=document.getElementById("".concat(this.jSPlugin.id,"-talk-icon"))&&document.getElementById("".concat(this.jSPlugin.id,"-talk-icon")).setAttribute("style",A?"cursor: not-allowed;fill: gray":"cursor: default"),null!=document.getElementById("".concat(this.jSPlugin.id,"-talk-label"))&&document.getElementById("".concat(this.jSPlugin.id,"-talk-label")).setAttribute("style",A?"cursor: not-allowed; color: gray":"cursor: default")}},{key:"inspectEnding",value:function(){var A=document.createElement("div");A.id="".concat(this.jSPlugin.id,"-inspect-ending-box"),A.style="width:100%; position: absolute; z-index: 10000; top:58px; bottom:0; left:0; background: #ffffff;",A.innerHTML='<div style="\n overflow: auto;\n box-sizing: border-box;\n font-size: 14px;\n color: #595959;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n ">\n <div>\n <div style="text-align:center; height: 21px;">\n <svg t="1689074472491" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7172" xmlns:xlink="http://www.w3.org/1999/xlink" width="21" height="21"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z" fill="#FF4D4F" p-id="7173"></path></svg>\n </div>\n <div style="color: #595959; font-size:14px; margin: 5px 0 16px;font-weight: 400; text-align: center;">巡检已结束</div>\n </div>\n </div>\n ',document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(A),this.jSPlugin.Zoom&&this.jSPlugin.Zoom.stopZoom()}}])}(),Bn=function(){return o((function A(){t(this,A),this.events={}}),[{key:"on",value:function(A,e){A&&e&&(this.events[A]=this.events[A]||[],this.events[A].push(e))}},{key:"emit",value:function(A,e){A&&this.events[A]&&this.events[A].forEach((function(A){return A(e)}))}},{key:"off",value:function(A,e){A&&e&&this.events[A]&&this.events[A].splice(this.events[A].indexOf(e),1)}},{key:"once",value:function(A,e){var t=this;this.on(A,(function i(){var n=Array.prototype.slice.call(arguments);e.apply(null,n),t.off(A,i)}))}},{key:"removeAllListener",value:function(){this.events={}}}])}(),un=function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0,n=void 0,a=void 0,o=[];return function(){var s=function(A){return"function"==typeof A?A():A}(e),g=(new Date).getTime(),c=!i||g-i>s;i=g;for(var l=arguments.length,I=Array(l),C=0;C<l;C++)I[C]=arguments[C];if(c&&t.leading)return t.accumulate?Promise.resolve(A.call(this,[I])).then((function(A){return A[0]})):Promise.resolve(A.call.apply(A,[this].concat(I)));if(n?clearTimeout(a):n=function(){var A={};return A.promise=new Promise((function(e,t){A.resolve=e,A.reject=t})),A}(),o.push(I),a=setTimeout(r.bind(this),s),t.accumulate){var d=o.length-1;return n.promise.then((function(A){return A[d]}))}return n.promise};function r(){var e=n;clearTimeout(a),Promise.resolve(t.accumulate?A.call(this,o):A.apply(this,o[o.length-1])).then(e.resolve,e.reject),o=[],n=null}};var En=R(un);function fn(A){document.getElementById("".concat(A,"-player"))&&document.getElementById("".concat(A,"-container-0")).removeChild(document.getElementById("".concat(A,"-player")))}!function(){var A;function e(A){var e=0;return function(){return e<A.length?{done:!1,value:A[e++]}:{done:!0}}}var t="function"==typeof Object.defineProperties?Object.defineProperty:function(A,e,t){return A==Array.prototype||A==Object.prototype||(A[e]=t.value),A};var i,n=function(A){A=["object"==typeof globalThis&&globalThis,A,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof F&&F];for(var e=0;e<A.length;++e){var t=A[e];if(t&&t.Math==Math)return t}throw Error("Cannot find global object")}(this);function a(A,e){if(e)A:{var i=n;A=A.split(".");for(var a=0;a<A.length-1;a++){var o=A[a];if(!(o in i))break A;i=i[o]}(e=e(a=i[A=A[A.length-1]]))!=a&&null!=e&&t(i,A,{configurable:!0,writable:!0,value:e})}}function o(A){return(A={next:A})[Symbol.iterator]=function(){return this},A}function r(A){var t="undefined"!=typeof Symbol&&Symbol.iterator&&A[Symbol.iterator];return t?t.call(A):{next:e(A)}}if(a("Symbol",(function(A){function e(A,e){this.A=A,t(this,"description",{configurable:!0,writable:!0,value:e})}if(A)return A;e.prototype.toString=function(){return this.A};var i="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",n=0;return function A(t){if(this instanceof A)throw new TypeError("Symbol is not a constructor");return new e(i+(t||"")+"_"+n++,t)}})),a("Symbol.iterator",(function(A){if(A)return A;A=Symbol("Symbol.iterator");for(var i="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),a=0;a<i.length;a++){var r=n[i[a]];"function"==typeof r&&"function"!=typeof r.prototype[A]&&t(r.prototype,A,{configurable:!0,writable:!0,value:function(){return o(e(this))}})}return A})),"function"==typeof Object.setPrototypeOf)i=Object.setPrototypeOf;else{var s;A:{var g={};try{g.__proto__={a:!0},s=g.a;break A}catch(A){}s=!1}i=s?function(A,e){if(A.__proto__=e,A.__proto__!==e)throw new TypeError(A+" is not extensible");return A}:null}var c=i;function l(){this.m=!1,this.j=null,this.v=void 0,this.h=1,this.u=this.C=0,this.l=null}function I(A){if(A.m)throw new TypeError("Generator is already running");A.m=!0}function C(A,e){return A.h=3,{value:e}}function d(A){this.g=new l,this.G=A}function h(A,e,t,i){try{var n=e.call(A.g.j,t);if(!(n instanceof Object))throw new TypeError("Iterator result "+n+" is not an object");if(!n.done)return A.g.m=!1,n;var a=n.value}catch(e){return A.g.j=null,A.g.s(e),B(A)}return A.g.j=null,i.call(A.g,a),B(A)}function B(A){for(;A.g.h;)try{var e=A.G(A.g);if(e)return A.g.m=!1,{value:e.value,done:!1}}catch(e){A.g.v=void 0,A.g.s(e)}if(A.g.m=!1,A.g.l){if(e=A.g.l,A.g.l=null,e.F)throw e.D;return{value:e.return,done:!0}}return{value:void 0,done:!0}}function u(A){this.next=function(e){return A.o(e)},this.throw=function(e){return A.s(e)},this.return=function(e){return function(A,e){I(A.g);var t=A.g.j;return t?h(A,"return"in t?t.return:function(A){return{value:A,done:!0}},e,A.g.return):(A.g.return(e),B(A))}(A,e)},this[Symbol.iterator]=function(){return this}}function E(A,e){return e=new u(new d(e)),c&&A.prototype&&c(e,A.prototype),e}if(l.prototype.o=function(A){this.v=A},l.prototype.s=function(A){this.l={D:A,F:!0},this.h=this.C||this.u},l.prototype.return=function(A){this.l={return:A},this.h=this.u},d.prototype.o=function(A){return I(this.g),this.g.j?h(this,this.g.j.next,A,this.g.o):(this.g.o(A),B(this))},d.prototype.s=function(A){return I(this.g),this.g.j?h(this,this.g.j.throw,A,this.g.o):(this.g.s(A),B(this))},a("Array.prototype.entries",(function(A){return A||function(){return function(A,e){A instanceof String&&(A+="");var t=0,i=!1,n={next:function(){if(!i&&t<A.length){var n=t++;return{value:e(n,A[n]),done:!1}}return i=!0,{done:!0,value:void 0}}};return n[Symbol.iterator]=function(){return n},n}(this,(function(A,e){return[A,e]}))}})),"undefined"!=typeof Blob&&("undefined"==typeof FormData||!FormData.prototype.keys)){var f=function(A,e){for(var t=0;t<A.length;t++)e(A[t])},Q=function(A){return A.replace(/\r?\n|\r/g,"\r\n")},x=function(A,e,t){return e instanceof Blob?(t=void 0!==t?String(t+""):"string"==typeof e.name?e.name:"blob",e.name===t&&"[object Blob]"!==Object.prototype.toString.call(e)||(e=new File([e],t)),[String(A),e]):[String(A),String(e)]},p=function(A,e){if(A.length<e)throw new TypeError(e+" argument required, but only "+A.length+" present.")},m="object"==typeof globalThis?globalThis:"object"==typeof window?window:"object"==typeof self?self:this,y=m.FormData,_=m.XMLHttpRequest&&m.XMLHttpRequest.prototype.send,S=m.Request&&m.fetch,D=m.navigator&&m.navigator.sendBeacon,w=m.Element&&m.Element.prototype,v=m.Symbol&&Symbol.toStringTag;v&&(Blob.prototype[v]||(Blob.prototype[v]="Blob"),"File"in m&&!File.prototype[v]&&(File.prototype[v]="File"));try{new File([],"")}catch(A){m.File=function(A,e,t){return A=new Blob(A,t||{}),Object.defineProperties(A,{name:{value:e},lastModified:{value:+(t&&void 0!==t.lastModified?new Date(t.lastModified):new Date)},toString:{value:function(){return"[object File]"}}}),v&&Object.defineProperty(A,v,{value:"File"}),A}}var b=function(A){return A.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")},R=function(A){this.i=[];var e=this;A&&f(A.elements,(function(A){if(A.name&&!A.disabled&&"submit"!==A.type&&"button"!==A.type&&!A.matches("form fieldset[disabled] *"))if("file"===A.type){var t=A.files&&A.files.length?A.files:[new File([],"",{type:"application/octet-stream"})];f(t,(function(t){e.append(A.name,t)}))}else"select-multiple"===A.type||"select-one"===A.type?f(A.options,(function(t){!t.disabled&&t.selected&&e.append(A.name,t.value)})):"checkbox"===A.type||"radio"===A.type?A.checked&&e.append(A.name,A.value):(t="textarea"===A.type?Q(A.value):A.value,e.append(A.name,t))}))};if((A=R.prototype).append=function(A,e,t){p(arguments,2),this.i.push(x(A,e,t))},A.delete=function(A){p(arguments,1);var e=[];A=String(A),f(this.i,(function(t){t[0]!==A&&e.push(t)})),this.i=e},A.entries=function A(){var e,t=this;return E(A,(function(A){if(1==A.h&&(e=0),3!=A.h)return e<t.i.length?A=C(A,t.i[e]):(A.h=0,A=void 0),A;e++,A.h=2}))},A.forEach=function(A,e){p(arguments,1);for(var t=r(this),i=t.next();!i.done;i=t.next()){var n=r(i.value);i=n.next().value,n=n.next().value,A.call(e,n,i,this)}},A.get=function(A){p(arguments,1);var e=this.i;A=String(A);for(var t=0;t<e.length;t++)if(e[t][0]===A)return e[t][1];return null},A.getAll=function(A){p(arguments,1);var e=[];return A=String(A),f(this.i,(function(t){t[0]===A&&e.push(t[1])})),e},A.has=function(A){p(arguments,1),A=String(A);for(var e=0;e<this.i.length;e++)if(this.i[e][0]===A)return!0;return!1},A.keys=function A(){var e,t,i,n,a=this;return E(A,(function(A){if(1==A.h&&(e=r(a),t=e.next()),3!=A.h)return t.done?void(A.h=0):(i=t.value,n=r(i),C(A,n.next().value));t=e.next(),A.h=2}))},A.set=function(A,e,t){p(arguments,2),A=String(A);var i=[],n=x(A,e,t),a=!0;f(this.i,(function(e){e[0]===A?a&&(a=!i.push(n)):i.push(e)})),a&&i.push(n),this.i=i},A.values=function A(){var e,t,i,n,a=this;return E(A,(function(A){if(1==A.h&&(e=r(a),t=e.next()),3!=A.h)return t.done?void(A.h=0):(i=t.value,(n=r(i)).next(),C(A,n.next().value));t=e.next(),A.h=2}))},R.prototype._asNative=function(){for(var A=new y,e=r(this),t=e.next();!t.done;t=e.next()){var i=r(t.value);t=i.next().value,i=i.next().value,A.append(t,i)}return A},R.prototype._blob=function(){var A="----formdata-polyfill-"+Math.random(),e=[],t="--"+A+'\r\nContent-Disposition: form-data; name="';return this.forEach((function(A,i){return"string"==typeof A?e.push(t+b(Q(i))+'"\r\n\r\n'+Q(A)+"\r\n"):e.push(t+b(Q(i))+'"; filename="'+b(A.name)+'"\r\nContent-Type: '+(A.type||"application/octet-stream")+"\r\n\r\n",A,"\r\n")})),e.push("--"+A+"--"),new Blob(e,{type:"multipart/form-data; boundary="+A})},R.prototype[Symbol.iterator]=function(){return this.entries()},R.prototype.toString=function(){return"[object FormData]"},w&&!w.matches&&(w.matches=w.matchesSelector||w.mozMatchesSelector||w.msMatchesSelector||w.oMatchesSelector||w.webkitMatchesSelector||function(A){for(var e=(A=(this.document||this.ownerDocument).querySelectorAll(A)).length;0<=--e&&A.item(e)!==this;);return-1<e}),v&&(R.prototype[v]="FormData"),_){var k=m.XMLHttpRequest.prototype.setRequestHeader;m.XMLHttpRequest.prototype.setRequestHeader=function(A,e){k.call(this,A,e),"content-type"===A.toLowerCase()&&(this.B=!0)},m.XMLHttpRequest.prototype.send=function(A){A instanceof R?(A=A._blob(),this.B||this.setRequestHeader("Content-Type",A.type),_.call(this,A)):_.call(this,A)}}S&&(m.fetch=function(A,e){return e&&e.body&&e.body instanceof R&&(e.body=e.body._blob()),S.call(this,A,e)}),D&&(m.navigator.sendBeacon=function(A,e){return e instanceof R&&(e=e._asNative()),D.call(this,A,e)}),m.FormData=R}}();var Qn=function(A,e){if(void 0===A)return e.themeData?{templateType:"themeData",templateId:"themeData"}:{templateType:"local",templateId:""};if("string"==typeof A){if(32===A.length)return{templateType:"remote",templateId:A};if(-1!==["theme","standard"].indexOf(A))return"simple"===A&&void 0===e.header&&void 0===e.footer?{templateType:"local",templateId:""}:{templateType:"iframe",templateId:A};if(-1!==["pcLive","pcRec","mobileLive","mobileRec","noData","security","voice","simple","mobileCall","miniRec"].indexOf(A))return-1!=e.url.indexOf("rec")&&"simple"!=e.template&&"miniRec"!=e.id?{templateType:"local",templateId:w()?"mobileRec":"pcRec"}:{templateType:"local",templateId:A};if(e&&e.isCall)return{templateType:"invalid",templateId:A}}},xn=function(){var A=window.navigator.userAgent.toLowerCase(),e=(/version.*safari/.test(A),/chrome/.test(A));/gecko/.test(A)&&/webkit/.test(A);if(w())return!1;if(e){return function(){for(var A=window.navigator.userAgent.split(" "),e="",t=0;t<A.length;t++)/chrome/i.test(A[t])&&(e=A[t]);return!!e&&Number(e.split("/")[1].split(".")[0])}()>91&&!!window.SharedArrayBuffer}return!1};var pn=function(A){if(console.log("err",A),A&&A.retcode)return String(A.retcode);if(A&&A.code){var e=String(A.code);return"1".concat(e.padStart(5,"0"))}if(A&&A.errorCode){var t=String(A.errorCode);return"39".concat(t.padStart(4,"0"))}return"400001"};var mn={exports:{}};!function(A){!function(e,t){A.exports=e.document?t(e,!0):function(A){if(!A.document)throw new Error("jQuery requires a window with a document");return t(A)}}("undefined"!=typeof window?window:F,(function(A,e){var t=[],i=Object.getPrototypeOf,n=t.slice,a=t.flat?function(A){return t.flat.call(A)}:function(A){return t.concat.apply([],A)},o=t.push,r=t.indexOf,s={},g=s.toString,c=s.hasOwnProperty,l=c.toString,I=l.call(Object),C={},d=function(A){return"function"==typeof A&&"number"!=typeof A.nodeType&&"function"!=typeof A.item},h=function(A){return null!=A&&A===A.window},B=A.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function E(A,e,t){var i,n,a=(t=t||B).createElement("script");if(a.text=A,e)for(i in u)(n=e[i]||e.getAttribute&&e.getAttribute(i))&&a.setAttribute(i,n);t.head.appendChild(a).parentNode.removeChild(a)}function f(A){return null==A?A+"":"object"==typeof A||"function"==typeof A?s[g.call(A)]||"object":typeof A}var Q="3.7.1",x=/HTML$/i,p=function(A,e){return new p.fn.init(A,e)};function m(A){var e=!!A&&"length"in A&&A.length,t=f(A);return!d(A)&&!h(A)&&("array"===t||0===e||"number"==typeof e&&e>0&&e-1 in A)}function y(A,e){return A.nodeName&&A.nodeName.toLowerCase()===e.toLowerCase()}p.fn=p.prototype={jquery:Q,constructor:p,length:0,toArray:function(){return n.call(this)},get:function(A){return null==A?n.call(this):A<0?this[A+this.length]:this[A]},pushStack:function(A){var e=p.merge(this.constructor(),A);return e.prevObject=this,e},each:function(A){return p.each(this,A)},map:function(A){return this.pushStack(p.map(this,(function(e,t){return A.call(e,t,e)})))},slice:function(){return this.pushStack(n.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(p.grep(this,(function(A,e){return(e+1)%2})))},odd:function(){return this.pushStack(p.grep(this,(function(A,e){return e%2})))},eq:function(A){var e=this.length,t=+A+(A<0?e:0);return this.pushStack(t>=0&&t<e?[this[t]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:t.sort,splice:t.splice},p.extend=p.fn.extend=function(){var A,e,t,i,n,a,o=arguments[0]||{},r=1,s=arguments.length,g=!1;for("boolean"==typeof o&&(g=o,o=arguments[r]||{},r++),"object"==typeof o||d(o)||(o={}),r===s&&(o=this,r--);r<s;r++)if(null!=(A=arguments[r]))for(e in A)i=A[e],"__proto__"!==e&&o!==i&&(g&&i&&(p.isPlainObject(i)||(n=Array.isArray(i)))?(t=o[e],a=n&&!Array.isArray(t)?[]:n||p.isPlainObject(t)?t:{},n=!1,o[e]=p.extend(g,a,i)):void 0!==i&&(o[e]=i));return o},p.extend({expando:"jQuery"+(Q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(A){throw new Error(A)},noop:function(){},isPlainObject:function(A){var e,t;return!(!A||"[object Object]"!==g.call(A))&&(!(e=i(A))||"function"==typeof(t=c.call(e,"constructor")&&e.constructor)&&l.call(t)===I)},isEmptyObject:function(A){var e;for(e in A)return!1;return!0},globalEval:function(A,e,t){E(A,{nonce:e&&e.nonce},t)},each:function(A,e){var t,i=0;if(m(A))for(t=A.length;i<t&&!1!==e.call(A[i],i,A[i]);i++);else for(i in A)if(!1===e.call(A[i],i,A[i]))break;return A},text:function(A){var e,t="",i=0,n=A.nodeType;if(!n)for(;e=A[i++];)t+=p.text(e);return 1===n||11===n?A.textContent:9===n?A.documentElement.textContent:3===n||4===n?A.nodeValue:t},makeArray:function(A,e){var t=e||[];return null!=A&&(m(Object(A))?p.merge(t,"string"==typeof A?[A]:A):o.call(t,A)),t},inArray:function(A,e,t){return null==e?-1:r.call(e,A,t)},isXMLDoc:function(A){var e=A&&A.namespaceURI,t=A&&(A.ownerDocument||A).documentElement;return!x.test(e||t&&t.nodeName||"HTML")},merge:function(A,e){for(var t=+e.length,i=0,n=A.length;i<t;i++)A[n++]=e[i];return A.length=n,A},grep:function(A,e,t){for(var i=[],n=0,a=A.length,o=!t;n<a;n++)!e(A[n],n)!==o&&i.push(A[n]);return i},map:function(A,e,t){var i,n,o=0,r=[];if(m(A))for(i=A.length;o<i;o++)null!=(n=e(A[o],o,t))&&r.push(n);else for(o in A)null!=(n=e(A[o],o,t))&&r.push(n);return a(r)},guid:1,support:C}),"function"==typeof Symbol&&(p.fn[Symbol.iterator]=t[Symbol.iterator]),p.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(A,e){s["[object "+e+"]"]=e.toLowerCase()}));var _=t.pop,S=t.sort,D=t.splice,w="[\\x20\\t\\r\\n\\f]",v=new RegExp("^"+w+"+|((?:^|[^\\\\])(?:\\\\.)*)"+w+"+$","g");p.contains=function(A,e){var t=e&&e.parentNode;return A===t||!(!t||1!==t.nodeType||!(A.contains?A.contains(t):A.compareDocumentPosition&&16&A.compareDocumentPosition(t)))};var b=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function F(A,e){return e?"\0"===A?"�":A.slice(0,-1)+"\\"+A.charCodeAt(A.length-1).toString(16)+" ":"\\"+A}p.escapeSelector=function(A){return(A+"").replace(b,F)};var R=B,k=o;!function(){var e,i,a,o,s,g,l,I,d,h,B=k,u=p.expando,E=0,f=0,Q=AA(),x=AA(),m=AA(),b=AA(),F=function(A,e){return A===e&&(s=!0),0},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",N="(?:\\\\[\\da-fA-F]{1,6}"+w+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",T="\\["+w+"*("+N+")(?:"+w+"*([*^$|!~]?=)"+w+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+w+"*\\]",M=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+T+")*)|.*)\\)|)",L=new RegExp(w+"+","g"),Y=new RegExp("^"+w+"*,"+w+"*"),G=new RegExp("^"+w+"*([>+~]|"+w+")"+w+"*"),U=new RegExp(w+"|>"),J=new RegExp(M),H=new RegExp("^"+N+"$"),K={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N+"|[*])"),ATTR:new RegExp("^"+T),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+w+"*(even|odd|(([+-]|)(\\d*)n|)"+w+"*(?:([+-]|)"+w+"*(\\d+)|))"+w+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+w+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+w+"*((?:-\\d)?\\d*)"+w+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,O=/^h\d$/i,j=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,W=/[+~]/,Z=new RegExp("\\\\[\\da-fA-F]{1,6}"+w+"?|\\\\([^\\r\\n\\f])","g"),X=function(A,e){var t="0x"+A.slice(1)-65536;return e||(t<0?String.fromCharCode(t+65536):String.fromCharCode(t>>10|55296,1023&t|56320))},q=function(){sA()},z=IA((function(A){return!0===A.disabled&&y(A,"fieldset")}),{dir:"parentNode",next:"legend"});try{B.apply(t=n.call(R.childNodes),R.childNodes),t[R.childNodes.length].nodeType}catch(A){B={apply:function(A,e){k.apply(A,n.call(e))},call:function(A){k.apply(A,n.call(arguments,1))}}}function $(A,e,t,i){var n,a,o,r,s,c,l,h=e&&e.ownerDocument,E=e?e.nodeType:9;if(t=t||[],"string"!=typeof A||!A||1!==E&&9!==E&&11!==E)return t;if(!i&&(sA(e),e=e||g,I)){if(11!==E&&(s=j.exec(A)))if(n=s[1]){if(9===E){if(!(o=e.getElementById(n)))return t;if(o.id===n)return B.call(t,o),t}else if(h&&(o=h.getElementById(n))&&$.contains(e,o)&&o.id===n)return B.call(t,o),t}else{if(s[2])return B.apply(t,e.getElementsByTagName(A)),t;if((n=s[3])&&e.getElementsByClassName)return B.apply(t,e.getElementsByClassName(n)),t}if(!(b[A+" "]||d&&d.test(A))){if(l=A,h=e,1===E&&(U.test(A)||G.test(A))){for((h=W.test(A)&&rA(e.parentNode)||e)==e&&C.scope||((r=e.getAttribute("id"))?r=p.escapeSelector(r):e.setAttribute("id",r=u)),a=(c=cA(A)).length;a--;)c[a]=(r?"#"+r:":scope")+" "+lA(c[a]);l=c.join(",")}try{return B.apply(t,h.querySelectorAll(l)),t}catch(e){b(A,!0)}finally{r===u&&e.removeAttribute("id")}}}return EA(A.replace(v,"$1"),e,t,i)}function AA(){var A=[];return function e(t,n){return A.push(t+" ")>i.cacheLength&&delete e[A.shift()],e[t+" "]=n}}function eA(A){return A[u]=!0,A}function tA(A){var e=g.createElement("fieldset");try{return!!A(e)}catch(A){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function iA(A){return function(e){return y(e,"input")&&e.type===A}}function nA(A){return function(e){return(y(e,"input")||y(e,"button"))&&e.type===A}}function aA(A){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===A:e.disabled===A:e.isDisabled===A||e.isDisabled!==!A&&z(e)===A:e.disabled===A:"label"in e&&e.disabled===A}}function oA(A){return eA((function(e){return e=+e,eA((function(t,i){for(var n,a=A([],t.length,e),o=a.length;o--;)t[n=a[o]]&&(t[n]=!(i[n]=t[n]))}))}))}function rA(A){return A&&void 0!==A.getElementsByTagName&&A}function sA(A){var e,t=A?A.ownerDocument||A:R;return t!=g&&9===t.nodeType&&t.documentElement?(l=(g=t).documentElement,I=!p.isXMLDoc(g),h=l.matches||l.webkitMatchesSelector||l.msMatchesSelector,l.msMatchesSelector&&R!=g&&(e=g.defaultView)&&e.top!==e&&e.addEventListener("unload",q),C.getById=tA((function(A){return l.appendChild(A).id=p.expando,!g.getElementsByName||!g.getElementsByName(p.expando).length})),C.disconnectedMatch=tA((function(A){return h.call(A,"*")})),C.scope=tA((function(){return g.querySelectorAll(":scope")})),C.cssHas=tA((function(){try{return g.querySelector(":has(*,:jqfake)"),!1}catch(A){return!0}})),C.getById?(i.filter.ID=function(A){var e=A.replace(Z,X);return function(A){return A.getAttribute("id")===e}},i.find.ID=function(A,e){if(void 0!==e.getElementById&&I){var t=e.getElementById(A);return t?[t]:[]}}):(i.filter.ID=function(A){var e=A.replace(Z,X);return function(A){var t=void 0!==A.getAttributeNode&&A.getAttributeNode("id");return t&&t.value===e}},i.find.ID=function(A,e){if(void 0!==e.getElementById&&I){var t,i,n,a=e.getElementById(A);if(a){if((t=a.getAttributeNode("id"))&&t.value===A)return[a];for(n=e.getElementsByName(A),i=0;a=n[i++];)if((t=a.getAttributeNode("id"))&&t.value===A)return[a]}return[]}}),i.find.TAG=function(A,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(A):e.querySelectorAll(A)},i.find.CLASS=function(A,e){if(void 0!==e.getElementsByClassName&&I)return e.getElementsByClassName(A)},d=[],tA((function(A){var e;l.appendChild(A).innerHTML="<a id='"+u+"' href='' disabled='disabled'></a><select id='"+u+"-\r\\' disabled='disabled'><option selected=''></option></select>",A.querySelectorAll("[selected]").length||d.push("\\["+w+"*(?:value|"+P+")"),A.querySelectorAll("[id~="+u+"-]").length||d.push("~="),A.querySelectorAll("a#"+u+"+*").length||d.push(".#.+[+~]"),A.querySelectorAll(":checked").length||d.push(":checked"),(e=g.createElement("input")).setAttribute("type","hidden"),A.appendChild(e).setAttribute("name","D"),l.appendChild(A).disabled=!0,2!==A.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(e=g.createElement("input")).setAttribute("name",""),A.appendChild(e),A.querySelectorAll("[name='']").length||d.push("\\["+w+"*name"+w+"*="+w+"*(?:''|\"\")")})),C.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),F=function(A,e){if(A===e)return s=!0,0;var t=!A.compareDocumentPosition-!e.compareDocumentPosition;return t||(1&(t=(A.ownerDocument||A)==(e.ownerDocument||e)?A.compareDocumentPosition(e):1)||!C.sortDetached&&e.compareDocumentPosition(A)===t?A===g||A.ownerDocument==R&&$.contains(R,A)?-1:e===g||e.ownerDocument==R&&$.contains(R,e)?1:o?r.call(o,A)-r.call(o,e):0:4&t?-1:1)},g):g}for(e in $.matches=function(A,e){return $(A,null,null,e)},$.matchesSelector=function(A,e){if(sA(A),I&&!b[e+" "]&&(!d||!d.test(e)))try{var t=h.call(A,e);if(t||C.disconnectedMatch||A.document&&11!==A.document.nodeType)return t}catch(A){b(e,!0)}return $(e,g,null,[A]).length>0},$.contains=function(A,e){return(A.ownerDocument||A)!=g&&sA(A),p.contains(A,e)},$.attr=function(A,e){(A.ownerDocument||A)!=g&&sA(A);var t=i.attrHandle[e.toLowerCase()],n=t&&c.call(i.attrHandle,e.toLowerCase())?t(A,e,!I):void 0;return void 0!==n?n:A.getAttribute(e)},$.error=function(A){throw new Error("Syntax error, unrecognized expression: "+A)},p.uniqueSort=function(A){var e,t=[],i=0,a=0;if(s=!C.sortStable,o=!C.sortStable&&n.call(A,0),S.call(A,F),s){for(;e=A[a++];)e===A[a]&&(i=t.push(a));for(;i--;)D.call(A,t[i],1)}return o=null,A},p.fn.uniqueSort=function(){return this.pushStack(p.uniqueSort(n.apply(this)))},i=p.expr={cacheLength:50,createPseudo:eA,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(A){return A[1]=A[1].replace(Z,X),A[3]=(A[3]||A[4]||A[5]||"").replace(Z,X),"~="===A[2]&&(A[3]=" "+A[3]+" "),A.slice(0,4)},CHILD:function(A){return A[1]=A[1].toLowerCase(),"nth"===A[1].slice(0,3)?(A[3]||$.error(A[0]),A[4]=+(A[4]?A[5]+(A[6]||1):2*("even"===A[3]||"odd"===A[3])),A[5]=+(A[7]+A[8]||"odd"===A[3])):A[3]&&$.error(A[0]),A},PSEUDO:function(A){var e,t=!A[6]&&A[2];return K.CHILD.test(A[0])?null:(A[3]?A[2]=A[4]||A[5]||"":t&&J.test(t)&&(e=cA(t,!0))&&(e=t.indexOf(")",t.length-e)-t.length)&&(A[0]=A[0].slice(0,e),A[2]=t.slice(0,e)),A.slice(0,3))}},filter:{TAG:function(A){var e=A.replace(Z,X).toLowerCase();return"*"===A?function(){return!0}:function(A){return y(A,e)}},CLASS:function(A){var e=Q[A+" "];return e||(e=new RegExp("(^|"+w+")"+A+"("+w+"|$)"))&&Q(A,(function(A){return e.test("string"==typeof A.className&&A.className||void 0!==A.getAttribute&&A.getAttribute("class")||"")}))},ATTR:function(A,e,t){return function(i){var n=$.attr(i,A);return null==n?"!="===e:!e||(n+="","="===e?n===t:"!="===e?n!==t:"^="===e?t&&0===n.indexOf(t):"*="===e?t&&n.indexOf(t)>-1:"$="===e?t&&n.slice(-t.length)===t:"~="===e?(" "+n.replace(L," ")+" ").indexOf(t)>-1:"|="===e&&(n===t||n.slice(0,t.length+1)===t+"-"))}},CHILD:function(A,e,t,i,n){var a="nth"!==A.slice(0,3),o="last"!==A.slice(-4),r="of-type"===e;return 1===i&&0===n?function(A){return!!A.parentNode}:function(e,t,s){var g,c,l,I,C,d=a!==o?"nextSibling":"previousSibling",h=e.parentNode,B=r&&e.nodeName.toLowerCase(),f=!s&&!r,Q=!1;if(h){if(a){for(;d;){for(l=e;l=l[d];)if(r?y(l,B):1===l.nodeType)return!1;C=d="only"===A&&!C&&"nextSibling"}return!0}if(C=[o?h.firstChild:h.lastChild],o&&f){for(Q=(I=(g=(c=h[u]||(h[u]={}))[A]||[])[0]===E&&g[1])&&g[2],l=I&&h.childNodes[I];l=++I&&l&&l[d]||(Q=I=0)||C.pop();)if(1===l.nodeType&&++Q&&l===e){c[A]=[E,I,Q];break}}else if(f&&(Q=I=(g=(c=e[u]||(e[u]={}))[A]||[])[0]===E&&g[1]),!1===Q)for(;(l=++I&&l&&l[d]||(Q=I=0)||C.pop())&&(!(r?y(l,B):1===l.nodeType)||!++Q||(f&&((c=l[u]||(l[u]={}))[A]=[E,Q]),l!==e)););return(Q-=n)===i||Q%i==0&&Q/i>=0}}},PSEUDO:function(A,e){var t,n=i.pseudos[A]||i.setFilters[A.toLowerCase()]||$.error("unsupported pseudo: "+A);return n[u]?n(e):n.length>1?(t=[A,A,"",e],i.setFilters.hasOwnProperty(A.toLowerCase())?eA((function(A,t){for(var i,a=n(A,e),o=a.length;o--;)A[i=r.call(A,a[o])]=!(t[i]=a[o])})):function(A){return n(A,0,t)}):n}},pseudos:{not:eA((function(A){var e=[],t=[],i=uA(A.replace(v,"$1"));return i[u]?eA((function(A,e,t,n){for(var a,o=i(A,null,n,[]),r=A.length;r--;)(a=o[r])&&(A[r]=!(e[r]=a))})):function(A,n,a){return e[0]=A,i(e,null,a,t),e[0]=null,!t.pop()}})),has:eA((function(A){return function(e){return $(A,e).length>0}})),contains:eA((function(A){return A=A.replace(Z,X),function(e){return(e.textContent||p.text(e)).indexOf(A)>-1}})),lang:eA((function(A){return H.test(A||"")||$.error("unsupported lang: "+A),A=A.replace(Z,X).toLowerCase(),function(e){var t;do{if(t=I?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===A||0===t.indexOf(A+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var t=A.location&&A.location.hash;return t&&t.slice(1)===e.id},root:function(A){return A===l},focus:function(A){return A===function(){try{return g.activeElement}catch(A){}}()&&g.hasFocus()&&!!(A.type||A.href||~A.tabIndex)},enabled:aA(!1),disabled:aA(!0),checked:function(A){return y(A,"input")&&!!A.checked||y(A,"option")&&!!A.selected},selected:function(A){return A.parentNode&&A.parentNode.selectedIndex,!0===A.selected},empty:function(A){for(A=A.firstChild;A;A=A.nextSibling)if(A.nodeType<6)return!1;return!0},parent:function(A){return!i.pseudos.empty(A)},header:function(A){return O.test(A.nodeName)},input:function(A){return V.test(A.nodeName)},button:function(A){return y(A,"input")&&"button"===A.type||y(A,"button")},text:function(A){var e;return y(A,"input")&&"text"===A.type&&(null==(e=A.getAttribute("type"))||"text"===e.toLowerCase())},first:oA((function(){return[0]})),last:oA((function(A,e){return[e-1]})),eq:oA((function(A,e,t){return[t<0?t+e:t]})),even:oA((function(A,e){for(var t=0;t<e;t+=2)A.push(t);return A})),odd:oA((function(A,e){for(var t=1;t<e;t+=2)A.push(t);return A})),lt:oA((function(A,e,t){var i;for(i=t<0?t+e:t>e?e:t;--i>=0;)A.push(i);return A})),gt:oA((function(A,e,t){for(var i=t<0?t+e:t;++i<e;)A.push(i);return A}))}},i.pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=iA(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=nA(e);function gA(){}function cA(A,e){var t,n,a,o,r,s,g,c=x[A+" "];if(c)return e?0:c.slice(0);for(r=A,s=[],g=i.preFilter;r;){for(o in t&&!(n=Y.exec(r))||(n&&(r=r.slice(n[0].length)||r),s.push(a=[])),t=!1,(n=G.exec(r))&&(t=n.shift(),a.push({value:t,type:n[0].replace(v," ")}),r=r.slice(t.length)),i.filter)!(n=K[o].exec(r))||g[o]&&!(n=g[o](n))||(t=n.shift(),a.push({value:t,type:o,matches:n}),r=r.slice(t.length));if(!t)break}return e?r.length:r?$.error(A):x(A,s).slice(0)}function lA(A){for(var e=0,t=A.length,i="";e<t;e++)i+=A[e].value;return i}function IA(A,e,t){var i=e.dir,n=e.next,a=n||i,o=t&&"parentNode"===a,r=f++;return e.first?function(e,t,n){for(;e=e[i];)if(1===e.nodeType||o)return A(e,t,n);return!1}:function(e,t,s){var g,c,l=[E,r];if(s){for(;e=e[i];)if((1===e.nodeType||o)&&A(e,t,s))return!0}else for(;e=e[i];)if(1===e.nodeType||o)if(c=e[u]||(e[u]={}),n&&y(e,n))e=e[i]||e;else{if((g=c[a])&&g[0]===E&&g[1]===r)return l[2]=g[2];if(c[a]=l,l[2]=A(e,t,s))return!0}return!1}}function CA(A){return A.length>1?function(e,t,i){for(var n=A.length;n--;)if(!A[n](e,t,i))return!1;return!0}:A[0]}function dA(A,e,t,i,n){for(var a,o=[],r=0,s=A.length,g=null!=e;r<s;r++)(a=A[r])&&(t&&!t(a,i,n)||(o.push(a),g&&e.push(r)));return o}function hA(A,e,t,i,n,a){return i&&!i[u]&&(i=hA(i)),n&&!n[u]&&(n=hA(n,a)),eA((function(a,o,s,g){var c,l,I,C,d=[],h=[],u=o.length,E=a||function(A,e,t){for(var i=0,n=e.length;i<n;i++)$(A,e[i],t);return t}(e||"*",s.nodeType?[s]:s,[]),f=!A||!a&&e?E:dA(E,d,A,s,g);if(t?t(f,C=n||(a?A:u||i)?[]:o,s,g):C=f,i)for(c=dA(C,h),i(c,[],s,g),l=c.length;l--;)(I=c[l])&&(C[h[l]]=!(f[h[l]]=I));if(a){if(n||A){if(n){for(c=[],l=C.length;l--;)(I=C[l])&&c.push(f[l]=I);n(null,C=[],c,g)}for(l=C.length;l--;)(I=C[l])&&(c=n?r.call(a,I):d[l])>-1&&(a[c]=!(o[c]=I))}}else C=dA(C===o?C.splice(u,C.length):C),n?n(null,o,C,g):B.apply(o,C)}))}function BA(A){for(var e,t,n,o=A.length,s=i.relative[A[0].type],g=s||i.relative[" "],c=s?1:0,l=IA((function(A){return A===e}),g,!0),I=IA((function(A){return r.call(e,A)>-1}),g,!0),C=[function(A,t,i){var n=!s&&(i||t!=a)||((e=t).nodeType?l(A,t,i):I(A,t,i));return e=null,n}];c<o;c++)if(t=i.relative[A[c].type])C=[IA(CA(C),t)];else{if((t=i.filter[A[c].type].apply(null,A[c].matches))[u]){for(n=++c;n<o&&!i.relative[A[n].type];n++);return hA(c>1&&CA(C),c>1&&lA(A.slice(0,c-1).concat({value:" "===A[c-2].type?"*":""})).replace(v,"$1"),t,c<n&&BA(A.slice(c,n)),n<o&&BA(A=A.slice(n)),n<o&&lA(A))}C.push(t)}return CA(C)}function uA(A,e){var t,n=[],o=[],r=m[A+" "];if(!r){for(e||(e=cA(A)),t=e.length;t--;)(r=BA(e[t]))[u]?n.push(r):o.push(r);r=m(A,function(A,e){var t=e.length>0,n=A.length>0,o=function(o,r,s,c,l){var C,d,h,u=0,f="0",Q=o&&[],x=[],m=a,y=o||n&&i.find.TAG("*",l),S=E+=null==m?1:Math.random()||.1,D=y.length;for(l&&(a=r==g||r||l);f!==D&&null!=(C=y[f]);f++){if(n&&C){for(d=0,r||C.ownerDocument==g||(sA(C),s=!I);h=A[d++];)if(h(C,r||g,s)){B.call(c,C);break}l&&(E=S)}t&&((C=!h&&C)&&u--,o&&Q.push(C))}if(u+=f,t&&f!==u){for(d=0;h=e[d++];)h(Q,x,r,s);if(o){if(u>0)for(;f--;)Q[f]||x[f]||(x[f]=_.call(c));x=dA(x)}B.apply(c,x),l&&!o&&x.length>0&&u+e.length>1&&p.uniqueSort(c)}return l&&(E=S,a=m),Q};return t?eA(o):o}(o,n)),r.selector=A}return r}function EA(A,e,t,n){var a,o,r,s,g,c="function"==typeof A&&A,l=!n&&cA(A=c.selector||A);if(t=t||[],1===l.length){if((o=l[0]=l[0].slice(0)).length>2&&"ID"===(r=o[0]).type&&9===e.nodeType&&I&&i.relative[o[1].type]){if(!(e=(i.find.ID(r.matches[0].replace(Z,X),e)||[])[0]))return t;c&&(e=e.parentNode),A=A.slice(o.shift().value.length)}for(a=K.needsContext.test(A)?0:o.length;a--&&(r=o[a],!i.relative[s=r.type]);)if((g=i.find[s])&&(n=g(r.matches[0].replace(Z,X),W.test(o[0].type)&&rA(e.parentNode)||e))){if(o.splice(a,1),!(A=n.length&&lA(o)))return B.apply(t,n),t;break}}return(c||uA(A,l))(n,e,!I,t,!e||W.test(A)&&rA(e.parentNode)||e),t}gA.prototype=i.filters=i.pseudos,i.setFilters=new gA,C.sortStable=u.split("").sort(F).join("")===u,sA(),C.sortDetached=tA((function(A){return 1&A.compareDocumentPosition(g.createElement("fieldset"))})),p.find=$,p.expr[":"]=p.expr.pseudos,p.unique=p.uniqueSort,$.compile=uA,$.select=EA,$.setDocument=sA,$.tokenize=cA,$.escape=p.escapeSelector,$.getText=p.text,$.isXML=p.isXMLDoc,$.selectors=p.expr,$.support=p.support,$.uniqueSort=p.uniqueSort}();var P=function(A,e,t){for(var i=[],n=void 0!==t;(A=A[e])&&9!==A.nodeType;)if(1===A.nodeType){if(n&&p(A).is(t))break;i.push(A)}return i},N=function(A,e){for(var t=[];A;A=A.nextSibling)1===A.nodeType&&A!==e&&t.push(A);return t},T=p.expr.match.needsContext,M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(A,e,t){return d(e)?p.grep(A,(function(A,i){return!!e.call(A,i,A)!==t})):e.nodeType?p.grep(A,(function(A){return A===e!==t})):"string"!=typeof e?p.grep(A,(function(A){return r.call(e,A)>-1!==t})):p.filter(e,A,t)}p.filter=function(A,e,t){var i=e[0];return t&&(A=":not("+A+")"),1===e.length&&1===i.nodeType?p.find.matchesSelector(i,A)?[i]:[]:p.find.matches(A,p.grep(e,(function(A){return 1===A.nodeType})))},p.fn.extend({find:function(A){var e,t,i=this.length,n=this;if("string"!=typeof A)return this.pushStack(p(A).filter((function(){for(e=0;e<i;e++)if(p.contains(n[e],this))return!0})));for(t=this.pushStack([]),e=0;e<i;e++)p.find(A,n[e],t);return i>1?p.uniqueSort(t):t},filter:function(A){return this.pushStack(L(this,A||[],!1))},not:function(A){return this.pushStack(L(this,A||[],!0))},is:function(A){return!!L(this,"string"==typeof A&&T.test(A)?p(A):A||[],!1).length}});var Y,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,U=p.fn.init=function(A,e,t){var i,n;if(!A)return this;if(t=t||Y,"string"==typeof A){if(!(i="<"===A[0]&&">"===A[A.length-1]&&A.length>=3?[null,A,null]:G.exec(A))||!i[1]&&e)return!e||e.jquery?(e||t).find(A):this.constructor(e).find(A);if(i[1]){if(e=e instanceof p?e[0]:e,p.merge(this,p.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:B,!0)),M.test(i[1])&&p.isPlainObject(e))for(i in e)d(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(n=B.getElementById(i[2]))&&(this[0]=n,this.length=1),this}return A.nodeType?(this[0]=A,this.length=1,this):d(A)?void 0!==t.ready?t.ready(A):A(p):p.makeArray(A,this)};U.prototype=p.fn,Y=p(B);var J=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function K(A,e){for(;(A=A[e])&&1!==A.nodeType;);return A}p.fn.extend({has:function(A){var e=p(A,this),t=e.length;return this.filter((function(){for(var A=0;A<t;A++)if(p.contains(this,e[A]))return!0}))},closest:function(A,e){var t,i=0,n=this.length,a=[],o="string"!=typeof A&&p(A);if(!T.test(A))for(;i<n;i++)for(t=this[i];t&&t!==e;t=t.parentNode)if(t.nodeType<11&&(o?o.index(t)>-1:1===t.nodeType&&p.find.matchesSelector(t,A))){a.push(t);break}return this.pushStack(a.length>1?p.uniqueSort(a):a)},index:function(A){return A?"string"==typeof A?r.call(p(A),this[0]):r.call(this,A.jquery?A[0]:A):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(A,e){return this.pushStack(p.uniqueSort(p.merge(this.get(),p(A,e))))},addBack:function(A){return this.add(null==A?this.prevObject:this.prevObject.filter(A))}}),p.each({parent:function(A){var e=A.parentNode;return e&&11!==e.nodeType?e:null},parents:function(A){return P(A,"parentNode")},parentsUntil:function(A,e,t){return P(A,"parentNode",t)},next:function(A){return K(A,"nextSibling")},prev:function(A){return K(A,"previousSibling")},nextAll:function(A){return P(A,"nextSibling")},prevAll:function(A){return P(A,"previousSibling")},nextUntil:function(A,e,t){return P(A,"nextSibling",t)},prevUntil:function(A,e,t){return P(A,"previousSibling",t)},siblings:function(A){return N((A.parentNode||{}).firstChild,A)},children:function(A){return N(A.firstChild)},contents:function(A){return null!=A.contentDocument&&i(A.contentDocument)?A.contentDocument:(y(A,"template")&&(A=A.content||A),p.merge([],A.childNodes))}},(function(A,e){p.fn[A]=function(t,i){var n=p.map(this,e,t);return"Until"!==A.slice(-5)&&(i=t),i&&"string"==typeof i&&(n=p.filter(i,n)),this.length>1&&(H[A]||p.uniqueSort(n),J.test(A)&&n.reverse()),this.pushStack(n)}}));var V=/[^\x20\t\r\n\f]+/g;function O(A){return A}function j(A){throw A}function W(A,e,t,i){var n;try{A&&d(n=A.promise)?n.call(A).done(e).fail(t):A&&d(n=A.then)?n.call(A,e,t):e.apply(void 0,[A].slice(i))}catch(A){t.apply(void 0,[A])}}p.Callbacks=function(A){A="string"==typeof A?function(A){var e={};return p.each(A.match(V)||[],(function(A,t){e[t]=!0})),e}(A):p.extend({},A);var e,t,i,n,a=[],o=[],r=-1,s=function(){for(n=n||A.once,i=e=!0;o.length;r=-1)for(t=o.shift();++r<a.length;)!1===a[r].apply(t[0],t[1])&&A.stopOnFalse&&(r=a.length,t=!1);A.memory||(t=!1),e=!1,n&&(a=t?[]:"")},g={add:function(){return a&&(t&&!e&&(r=a.length-1,o.push(t)),function e(t){p.each(t,(function(t,i){d(i)?A.unique&&g.has(i)||a.push(i):i&&i.length&&"string"!==f(i)&&e(i)}))}(arguments),t&&!e&&s()),this},remove:function(){return p.each(arguments,(function(A,e){for(var t;(t=p.inArray(e,a,t))>-1;)a.splice(t,1),t<=r&&r--})),this},has:function(A){return A?p.inArray(A,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return n=o=[],a=t="",this},disabled:function(){return!a},lock:function(){return n=o=[],t||e||(a=t=""),this},locked:function(){return!!n},fireWith:function(A,t){return n||(t=[A,(t=t||[]).slice?t.slice():t],o.push(t),e||s()),this},fire:function(){return g.fireWith(this,arguments),this},fired:function(){return!!i}};return g},p.extend({Deferred:function(e){var t=[["notify","progress",p.Callbacks("memory"),p.Callbacks("memory"),2],["resolve","done",p.Callbacks("once memory"),p.Callbacks("once memory"),0,"resolved"],["reject","fail",p.Callbacks("once memory"),p.Callbacks("once memory"),1,"rejected"]],i="pending",n={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},catch:function(A){return n.then(null,A)},pipe:function(){var A=arguments;return p.Deferred((function(e){p.each(t,(function(t,i){var n=d(A[i[4]])&&A[i[4]];a[i[1]]((function(){var A=n&&n.apply(this,arguments);A&&d(A.promise)?A.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,n?[A]:arguments)}))})),A=null})).promise()},then:function(e,i,n){var a=0;function o(e,t,i,n){return function(){var r=this,s=arguments,g=function(){var A,g;if(!(e<a)){if((A=i.apply(r,s))===t.promise())throw new TypeError("Thenable self-resolution");g=A&&("object"==typeof A||"function"==typeof A)&&A.then,d(g)?n?g.call(A,o(a,t,O,n),o(a,t,j,n)):(a++,g.call(A,o(a,t,O,n),o(a,t,j,n),o(a,t,O,t.notifyWith))):(i!==O&&(r=void 0,s=[A]),(n||t.resolveWith)(r,s))}},c=n?g:function(){try{g()}catch(A){p.Deferred.exceptionHook&&p.Deferred.exceptionHook(A,c.error),e+1>=a&&(i!==j&&(r=void 0,s=[A]),t.rejectWith(r,s))}};e?c():(p.Deferred.getErrorHook?c.error=p.Deferred.getErrorHook():p.Deferred.getStackHook&&(c.error=p.Deferred.getStackHook()),A.setTimeout(c))}}return p.Deferred((function(A){t[0][3].add(o(0,A,d(n)?n:O,A.notifyWith)),t[1][3].add(o(0,A,d(e)?e:O)),t[2][3].add(o(0,A,d(i)?i:j))})).promise()},promise:function(A){return null!=A?p.extend(A,n):n}},a={};return p.each(t,(function(A,e){var o=e[2],r=e[5];n[e[1]]=o.add,r&&o.add((function(){i=r}),t[3-A][2].disable,t[3-A][3].disable,t[0][2].lock,t[0][3].lock),o.add(e[3].fire),a[e[0]]=function(){return a[e[0]+"With"](this===a?void 0:this,arguments),this},a[e[0]+"With"]=o.fireWith})),n.promise(a),e&&e.call(a,a),a},when:function(A){var e=arguments.length,t=e,i=Array(t),a=n.call(arguments),o=p.Deferred(),r=function(A){return function(t){i[A]=this,a[A]=arguments.length>1?n.call(arguments):t,--e||o.resolveWith(i,a)}};if(e<=1&&(W(A,o.done(r(t)).resolve,o.reject,!e),"pending"===o.state()||d(a[t]&&a[t].then)))return o.then();for(;t--;)W(a[t],r(t),o.reject);return o.promise()}});var Z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;p.Deferred.exceptionHook=function(e,t){A.console&&A.console.warn&&e&&Z.test(e.name)&&A.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},p.readyException=function(e){A.setTimeout((function(){throw e}))};var X=p.Deferred();function q(){B.removeEventListener("DOMContentLoaded",q),A.removeEventListener("load",q),p.ready()}p.fn.ready=function(A){return X.then(A).catch((function(A){p.readyException(A)})),this},p.extend({isReady:!1,readyWait:1,ready:function(A){(!0===A?--p.readyWait:p.isReady)||(p.isReady=!0,!0!==A&&--p.readyWait>0||X.resolveWith(B,[p]))}}),p.ready.then=X.then,"complete"===B.readyState||"loading"!==B.readyState&&!B.documentElement.doScroll?A.setTimeout(p.ready):(B.addEventListener("DOMContentLoaded",q),A.addEventListener("load",q));var z=function(A,e,t,i,n,a,o){var r=0,s=A.length,g=null==t;if("object"===f(t))for(r in n=!0,t)z(A,e,r,t[r],!0,a,o);else if(void 0!==i&&(n=!0,d(i)||(o=!0),g&&(o?(e.call(A,i),e=null):(g=e,e=function(A,e,t){return g.call(p(A),t)})),e))for(;r<s;r++)e(A[r],t,o?i:i.call(A[r],r,e(A[r],t)));return n?A:g?e.call(A):s?e(A[0],t):a},$=/^-ms-/,AA=/-([a-z])/g;function eA(A,e){return e.toUpperCase()}function tA(A){return A.replace($,"ms-").replace(AA,eA)}var iA=function(A){return 1===A.nodeType||9===A.nodeType||!+A.nodeType};function nA(){this.expando=p.expando+nA.uid++}nA.uid=1,nA.prototype={cache:function(A){var e=A[this.expando];return e||(e={},iA(A)&&(A.nodeType?A[this.expando]=e:Object.defineProperty(A,this.expando,{value:e,configurable:!0}))),e},set:function(A,e,t){var i,n=this.cache(A);if("string"==typeof e)n[tA(e)]=t;else for(i in e)n[tA(i)]=e[i];return n},get:function(A,e){return void 0===e?this.cache(A):A[this.expando]&&A[this.expando][tA(e)]},access:function(A,e,t){return void 0===e||e&&"string"==typeof e&&void 0===t?this.get(A,e):(this.set(A,e,t),void 0!==t?t:e)},remove:function(A,e){var t,i=A[this.expando];if(void 0!==i){if(void 0!==e){t=(e=Array.isArray(e)?e.map(tA):(e=tA(e))in i?[e]:e.match(V)||[]).length;for(;t--;)delete i[e[t]]}(void 0===e||p.isEmptyObject(i))&&(A.nodeType?A[this.expando]=void 0:delete A[this.expando])}},hasData:function(A){var e=A[this.expando];return void 0!==e&&!p.isEmptyObject(e)}};var aA=new nA,oA=new nA,rA=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,sA=/[A-Z]/g;function gA(A,e,t){var i;if(void 0===t&&1===A.nodeType)if(i="data-"+e.replace(sA,"-$&").toLowerCase(),"string"==typeof(t=A.getAttribute(i))){try{t=function(A){return"true"===A||"false"!==A&&("null"===A?null:A===+A+""?+A:rA.test(A)?JSON.parse(A):A)}(t)}catch(A){}oA.set(A,e,t)}else t=void 0;return t}p.extend({hasData:function(A){return oA.hasData(A)||aA.hasData(A)},data:function(A,e,t){return oA.access(A,e,t)},removeData:function(A,e){oA.remove(A,e)},_data:function(A,e,t){return aA.access(A,e,t)},_removeData:function(A,e){aA.remove(A,e)}}),p.fn.extend({data:function(A,e){var t,i,n,a=this[0],o=a&&a.attributes;if(void 0===A){if(this.length&&(n=oA.get(a),1===a.nodeType&&!aA.get(a,"hasDataAttrs"))){for(t=o.length;t--;)o[t]&&0===(i=o[t].name).indexOf("data-")&&(i=tA(i.slice(5)),gA(a,i,n[i]));aA.set(a,"hasDataAttrs",!0)}return n}return"object"==typeof A?this.each((function(){oA.set(this,A)})):z(this,(function(e){var t;if(a&&void 0===e)return void 0!==(t=oA.get(a,A))||void 0!==(t=gA(a,A))?t:void 0;this.each((function(){oA.set(this,A,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(A){return this.each((function(){oA.remove(this,A)}))}}),p.extend({queue:function(A,e,t){var i;if(A)return e=(e||"fx")+"queue",i=aA.get(A,e),t&&(!i||Array.isArray(t)?i=aA.access(A,e,p.makeArray(t)):i.push(t)),i||[]},dequeue:function(A,e){e=e||"fx";var t=p.queue(A,e),i=t.length,n=t.shift(),a=p._queueHooks(A,e);"inprogress"===n&&(n=t.shift(),i--),n&&("fx"===e&&t.unshift("inprogress"),delete a.stop,n.call(A,(function(){p.dequeue(A,e)}),a)),!i&&a&&a.empty.fire()},_queueHooks:function(A,e){var t=e+"queueHooks";return aA.get(A,t)||aA.access(A,t,{empty:p.Callbacks("once memory").add((function(){aA.remove(A,[e+"queue",t])}))})}}),p.fn.extend({queue:function(A,e){var t=2;return"string"!=typeof A&&(e=A,A="fx",t--),arguments.length<t?p.queue(this[0],A):void 0===e?this:this.each((function(){var t=p.queue(this,A,e);p._queueHooks(this,A),"fx"===A&&"inprogress"!==t[0]&&p.dequeue(this,A)}))},dequeue:function(A){return this.each((function(){p.dequeue(this,A)}))},clearQueue:function(A){return this.queue(A||"fx",[])},promise:function(A,e){var t,i=1,n=p.Deferred(),a=this,o=this.length,r=function(){--i||n.resolveWith(a,[a])};for("string"!=typeof A&&(e=A,A=void 0),A=A||"fx";o--;)(t=aA.get(a[o],A+"queueHooks"))&&t.empty&&(i++,t.empty.add(r));return r(),n.promise(e)}});var cA=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,lA=new RegExp("^(?:([+-])=|)("+cA+")([a-z%]*)$","i"),IA=["Top","Right","Bottom","Left"],CA=B.documentElement,dA=function(A){return p.contains(A.ownerDocument,A)},hA={composed:!0};CA.getRootNode&&(dA=function(A){return p.contains(A.ownerDocument,A)||A.getRootNode(hA)===A.ownerDocument});var BA=function(A,e){return"none"===(A=e||A).style.display||""===A.style.display&&dA(A)&&"none"===p.css(A,"display")};function uA(A,e,t,i){var n,a,o=20,r=i?function(){return i.cur()}:function(){return p.css(A,e,"")},s=r(),g=t&&t[3]||(p.cssNumber[e]?"":"px"),c=A.nodeType&&(p.cssNumber[e]||"px"!==g&&+s)&&lA.exec(p.css(A,e));if(c&&c[3]!==g){for(s/=2,g=g||c[3],c=+s||1;o--;)p.style(A,e,c+g),(1-a)*(1-(a=r()/s||.5))<=0&&(o=0),c/=a;c*=2,p.style(A,e,c+g),t=t||[]}return t&&(c=+c||+s||0,n=t[1]?c+(t[1]+1)*t[2]:+t[2],i&&(i.unit=g,i.start=c,i.end=n)),n}var EA={};function fA(A){var e,t=A.ownerDocument,i=A.nodeName,n=EA[i];return n||(e=t.body.appendChild(t.createElement(i)),n=p.css(e,"display"),e.parentNode.removeChild(e),"none"===n&&(n="block"),EA[i]=n,n)}function QA(A,e){for(var t,i,n=[],a=0,o=A.length;a<o;a++)(i=A[a]).style&&(t=i.style.display,e?("none"===t&&(n[a]=aA.get(i,"display")||null,n[a]||(i.style.display="")),""===i.style.display&&BA(i)&&(n[a]=fA(i))):"none"!==t&&(n[a]="none",aA.set(i,"display",t)));for(a=0;a<o;a++)null!=n[a]&&(A[a].style.display=n[a]);return A}p.fn.extend({show:function(){return QA(this,!0)},hide:function(){return QA(this)},toggle:function(A){return"boolean"==typeof A?A?this.show():this.hide():this.each((function(){BA(this)?p(this).show():p(this).hide()}))}});var xA,pA,mA=/^(?:checkbox|radio)$/i,yA=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,_A=/^$|^module$|\/(?:java|ecma)script/i;xA=B.createDocumentFragment().appendChild(B.createElement("div")),(pA=B.createElement("input")).setAttribute("type","radio"),pA.setAttribute("checked","checked"),pA.setAttribute("name","t"),xA.appendChild(pA),C.checkClone=xA.cloneNode(!0).cloneNode(!0).lastChild.checked,xA.innerHTML="<textarea>x</textarea>",C.noCloneChecked=!!xA.cloneNode(!0).lastChild.defaultValue,xA.innerHTML="<option></option>",C.option=!!xA.lastChild;var SA={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function DA(A,e){var t;return t=void 0!==A.getElementsByTagName?A.getElementsByTagName(e||"*"):void 0!==A.querySelectorAll?A.querySelectorAll(e||"*"):[],void 0===e||e&&y(A,e)?p.merge([A],t):t}function wA(A,e){for(var t=0,i=A.length;t<i;t++)aA.set(A[t],"globalEval",!e||aA.get(e[t],"globalEval"))}SA.tbody=SA.tfoot=SA.colgroup=SA.caption=SA.thead,SA.th=SA.td,C.option||(SA.optgroup=SA.option=[1,"<select multiple='multiple'>","</select>"]);var vA=/<|&#?\w+;/;function bA(A,e,t,i,n){for(var a,o,r,s,g,c,l=e.createDocumentFragment(),I=[],C=0,d=A.length;C<d;C++)if((a=A[C])||0===a)if("object"===f(a))p.merge(I,a.nodeType?[a]:a);else if(vA.test(a)){for(o=o||l.appendChild(e.createElement("div")),r=(yA.exec(a)||["",""])[1].toLowerCase(),s=SA[r]||SA._default,o.innerHTML=s[1]+p.htmlPrefilter(a)+s[2],c=s[0];c--;)o=o.lastChild;p.merge(I,o.childNodes),(o=l.firstChild).textContent=""}else I.push(e.createTextNode(a));for(l.textContent="",C=0;a=I[C++];)if(i&&p.inArray(a,i)>-1)n&&n.push(a);else if(g=dA(a),o=DA(l.appendChild(a),"script"),g&&wA(o),t)for(c=0;a=o[c++];)_A.test(a.type||"")&&t.push(a);return l}var FA=/^([^.]*)(?:\.(.+)|)/;function RA(){return!0}function kA(){return!1}function PA(A,e,t,i,n,a){var o,r;if("object"==typeof e){for(r in"string"!=typeof t&&(i=i||t,t=void 0),e)PA(A,r,t,i,e[r],a);return A}if(null==i&&null==n?(n=t,i=t=void 0):null==n&&("string"==typeof t?(n=i,i=void 0):(n=i,i=t,t=void 0)),!1===n)n=kA;else if(!n)return A;return 1===a&&(o=n,n=function(A){return p().off(A),o.apply(this,arguments)},n.guid=o.guid||(o.guid=p.guid++)),A.each((function(){p.event.add(this,e,n,i,t)}))}function NA(A,e,t){t?(aA.set(A,e,!1),p.event.add(A,e,{namespace:!1,handler:function(A){var t,i=aA.get(this,e);if(1&A.isTrigger&&this[e]){if(i)(p.event.special[e]||{}).delegateType&&A.stopPropagation();else if(i=n.call(arguments),aA.set(this,e,i),this[e](),t=aA.get(this,e),aA.set(this,e,!1),i!==t)return A.stopImmediatePropagation(),A.preventDefault(),t}else i&&(aA.set(this,e,p.event.trigger(i[0],i.slice(1),this)),A.stopPropagation(),A.isImmediatePropagationStopped=RA)}})):void 0===aA.get(A,e)&&p.event.add(A,e,RA)}p.event={global:{},add:function(A,e,t,i,n){var a,o,r,s,g,c,l,I,C,d,h,B=aA.get(A);if(iA(A))for(t.handler&&(t=(a=t).handler,n=a.selector),n&&p.find.matchesSelector(CA,n),t.guid||(t.guid=p.guid++),(s=B.events)||(s=B.events=Object.create(null)),(o=B.handle)||(o=B.handle=function(e){return void 0!==p&&p.event.triggered!==e.type?p.event.dispatch.apply(A,arguments):void 0}),g=(e=(e||"").match(V)||[""]).length;g--;)C=h=(r=FA.exec(e[g])||[])[1],d=(r[2]||"").split(".").sort(),C&&(l=p.event.special[C]||{},C=(n?l.delegateType:l.bindType)||C,l=p.event.special[C]||{},c=p.extend({type:C,origType:h,data:i,handler:t,guid:t.guid,selector:n,needsContext:n&&p.expr.match.needsContext.test(n),namespace:d.join(".")},a),(I=s[C])||((I=s[C]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(A,i,d,o)||A.addEventListener&&A.addEventListener(C,o)),l.add&&(l.add.call(A,c),c.handler.guid||(c.handler.guid=t.guid)),n?I.splice(I.delegateCount++,0,c):I.push(c),p.event.global[C]=!0)},remove:function(A,e,t,i,n){var a,o,r,s,g,c,l,I,C,d,h,B=aA.hasData(A)&&aA.get(A);if(B&&(s=B.events)){for(g=(e=(e||"").match(V)||[""]).length;g--;)if(C=h=(r=FA.exec(e[g])||[])[1],d=(r[2]||"").split(".").sort(),C){for(l=p.event.special[C]||{},I=s[C=(i?l.delegateType:l.bindType)||C]||[],r=r[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=I.length;a--;)c=I[a],!n&&h!==c.origType||t&&t.guid!==c.guid||r&&!r.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(I.splice(a,1),c.selector&&I.delegateCount--,l.remove&&l.remove.call(A,c));o&&!I.length&&(l.teardown&&!1!==l.teardown.call(A,d,B.handle)||p.removeEvent(A,C,B.handle),delete s[C])}else for(C in s)p.event.remove(A,C+e[g],t,i,!0);p.isEmptyObject(s)&&aA.remove(A,"handle events")}},dispatch:function(A){var e,t,i,n,a,o,r=new Array(arguments.length),s=p.event.fix(A),g=(aA.get(this,"events")||Object.create(null))[s.type]||[],c=p.event.special[s.type]||{};for(r[0]=s,e=1;e<arguments.length;e++)r[e]=arguments[e];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(o=p.event.handlers.call(this,s,g),e=0;(n=o[e++])&&!s.isPropagationStopped();)for(s.currentTarget=n.elem,t=0;(a=n.handlers[t++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==a.namespace&&!s.rnamespace.test(a.namespace)||(s.handleObj=a,s.data=a.data,void 0!==(i=((p.event.special[a.origType]||{}).handle||a.handler).apply(n.elem,r))&&!1===(s.result=i)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(A,e){var t,i,n,a,o,r=[],s=e.delegateCount,g=A.target;if(s&&g.nodeType&&!("click"===A.type&&A.button>=1))for(;g!==this;g=g.parentNode||this)if(1===g.nodeType&&("click"!==A.type||!0!==g.disabled)){for(a=[],o={},t=0;t<s;t++)void 0===o[n=(i=e[t]).selector+" "]&&(o[n]=i.needsContext?p(n,this).index(g)>-1:p.find(n,this,null,[g]).length),o[n]&&a.push(i);a.length&&r.push({elem:g,handlers:a})}return g=this,s<e.length&&r.push({elem:g,handlers:e.slice(s)}),r},addProp:function(A,e){Object.defineProperty(p.Event.prototype,A,{enumerable:!0,configurable:!0,get:d(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[A]},set:function(e){Object.defineProperty(this,A,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(A){return A[p.expando]?A:new p.Event(A)},special:{load:{noBubble:!0},click:{setup:function(A){var e=this||A;return mA.test(e.type)&&e.click&&y(e,"input")&&NA(e,"click",!0),!1},trigger:function(A){var e=this||A;return mA.test(e.type)&&e.click&&y(e,"input")&&NA(e,"click"),!0},_default:function(A){var e=A.target;return mA.test(e.type)&&e.click&&y(e,"input")&&aA.get(e,"click")||y(e,"a")}},beforeunload:{postDispatch:function(A){void 0!==A.result&&A.originalEvent&&(A.originalEvent.returnValue=A.result)}}}},p.removeEvent=function(A,e,t){A.removeEventListener&&A.removeEventListener(e,t)},p.Event=function(A,e){if(!(this instanceof p.Event))return new p.Event(A,e);A&&A.type?(this.originalEvent=A,this.type=A.type,this.isDefaultPrevented=A.defaultPrevented||void 0===A.defaultPrevented&&!1===A.returnValue?RA:kA,this.target=A.target&&3===A.target.nodeType?A.target.parentNode:A.target,this.currentTarget=A.currentTarget,this.relatedTarget=A.relatedTarget):this.type=A,e&&p.extend(this,e),this.timeStamp=A&&A.timeStamp||Date.now(),this[p.expando]=!0},p.Event.prototype={constructor:p.Event,isDefaultPrevented:kA,isPropagationStopped:kA,isImmediatePropagationStopped:kA,isSimulated:!1,preventDefault:function(){var A=this.originalEvent;this.isDefaultPrevented=RA,A&&!this.isSimulated&&A.preventDefault()},stopPropagation:function(){var A=this.originalEvent;this.isPropagationStopped=RA,A&&!this.isSimulated&&A.stopPropagation()},stopImmediatePropagation:function(){var A=this.originalEvent;this.isImmediatePropagationStopped=RA,A&&!this.isSimulated&&A.stopImmediatePropagation(),this.stopPropagation()}},p.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},p.event.addProp),p.each({focus:"focusin",blur:"focusout"},(function(A,e){function t(A){if(B.documentMode){var t=aA.get(this,"handle"),i=p.event.fix(A);i.type="focusin"===A.type?"focus":"blur",i.isSimulated=!0,t(A),i.target===i.currentTarget&&t(i)}else p.event.simulate(e,A.target,p.event.fix(A))}p.event.special[A]={setup:function(){var i;if(NA(this,A,!0),!B.documentMode)return!1;(i=aA.get(this,e))||this.addEventListener(e,t),aA.set(this,e,(i||0)+1)},trigger:function(){return NA(this,A),!0},teardown:function(){var A;if(!B.documentMode)return!1;(A=aA.get(this,e)-1)?aA.set(this,e,A):(this.removeEventListener(e,t),aA.remove(this,e))},_default:function(e){return aA.get(e.target,A)},delegateType:e},p.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,n=B.documentMode?this:i,a=aA.get(n,e);a||(B.documentMode?this.addEventListener(e,t):i.addEventListener(A,t,!0)),aA.set(n,e,(a||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,n=B.documentMode?this:i,a=aA.get(n,e)-1;a?aA.set(n,e,a):(B.documentMode?this.removeEventListener(e,t):i.removeEventListener(A,t,!0),aA.remove(n,e))}}})),p.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(A,e){p.event.special[A]={delegateType:e,bindType:e,handle:function(A){var t,i=A.relatedTarget,n=A.handleObj;return i&&(i===this||p.contains(this,i))||(A.type=n.origType,t=n.handler.apply(this,arguments),A.type=e),t}}})),p.fn.extend({on:function(A,e,t,i){return PA(this,A,e,t,i)},one:function(A,e,t,i){return PA(this,A,e,t,i,1)},off:function(A,e,t){var i,n;if(A&&A.preventDefault&&A.handleObj)return i=A.handleObj,p(A.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof A){for(n in A)this.off(n,e,A[n]);return this}return!1!==e&&"function"!=typeof e||(t=e,e=void 0),!1===t&&(t=kA),this.each((function(){p.event.remove(this,A,t,e)}))}});var TA=/<script|<style|<link/i,MA=/checked\s*(?:[^=]|=\s*.checked.)/i,LA=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function YA(A,e){return y(A,"table")&&y(11!==e.nodeType?e:e.firstChild,"tr")&&p(A).children("tbody")[0]||A}function GA(A){return A.type=(null!==A.getAttribute("type"))+"/"+A.type,A}function UA(A){return"true/"===(A.type||"").slice(0,5)?A.type=A.type.slice(5):A.removeAttribute("type"),A}function JA(A,e){var t,i,n,a,o,r;if(1===e.nodeType){if(aA.hasData(A)&&(r=aA.get(A).events))for(n in aA.remove(e,"handle events"),r)for(t=0,i=r[n].length;t<i;t++)p.event.add(e,n,r[n][t]);oA.hasData(A)&&(a=oA.access(A),o=p.extend({},a),oA.set(e,o))}}function HA(A,e){var t=e.nodeName.toLowerCase();"input"===t&&mA.test(A.type)?e.checked=A.checked:"input"!==t&&"textarea"!==t||(e.defaultValue=A.defaultValue)}function KA(A,e,t,i){e=a(e);var n,o,r,s,g,c,l=0,I=A.length,h=I-1,B=e[0],u=d(B);if(u||I>1&&"string"==typeof B&&!C.checkClone&&MA.test(B))return A.each((function(n){var a=A.eq(n);u&&(e[0]=B.call(this,n,a.html())),KA(a,e,t,i)}));if(I&&(o=(n=bA(e,A[0].ownerDocument,!1,A,i)).firstChild,1===n.childNodes.length&&(n=o),o||i)){for(s=(r=p.map(DA(n,"script"),GA)).length;l<I;l++)g=n,l!==h&&(g=p.clone(g,!0,!0),s&&p.merge(r,DA(g,"script"))),t.call(A[l],g,l);if(s)for(c=r[r.length-1].ownerDocument,p.map(r,UA),l=0;l<s;l++)g=r[l],_A.test(g.type||"")&&!aA.access(g,"globalEval")&&p.contains(c,g)&&(g.src&&"module"!==(g.type||"").toLowerCase()?p._evalUrl&&!g.noModule&&p._evalUrl(g.src,{nonce:g.nonce||g.getAttribute("nonce")},c):E(g.textContent.replace(LA,""),g,c))}return A}function VA(A,e,t){for(var i,n=e?p.filter(e,A):A,a=0;null!=(i=n[a]);a++)t||1!==i.nodeType||p.cleanData(DA(i)),i.parentNode&&(t&&dA(i)&&wA(DA(i,"script")),i.parentNode.removeChild(i));return A}p.extend({htmlPrefilter:function(A){return A},clone:function(A,e,t){var i,n,a,o,r=A.cloneNode(!0),s=dA(A);if(!(C.noCloneChecked||1!==A.nodeType&&11!==A.nodeType||p.isXMLDoc(A)))for(o=DA(r),i=0,n=(a=DA(A)).length;i<n;i++)HA(a[i],o[i]);if(e)if(t)for(a=a||DA(A),o=o||DA(r),i=0,n=a.length;i<n;i++)JA(a[i],o[i]);else JA(A,r);return(o=DA(r,"script")).length>0&&wA(o,!s&&DA(A,"script")),r},cleanData:function(A){for(var e,t,i,n=p.event.special,a=0;void 0!==(t=A[a]);a++)if(iA(t)){if(e=t[aA.expando]){if(e.events)for(i in e.events)n[i]?p.event.remove(t,i):p.removeEvent(t,i,e.handle);t[aA.expando]=void 0}t[oA.expando]&&(t[oA.expando]=void 0)}}}),p.fn.extend({detach:function(A){return VA(this,A,!0)},remove:function(A){return VA(this,A)},text:function(A){return z(this,(function(A){return void 0===A?p.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=A)}))}),null,A,arguments.length)},append:function(){return KA(this,arguments,(function(A){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||YA(this,A).appendChild(A)}))},prepend:function(){return KA(this,arguments,(function(A){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=YA(this,A);e.insertBefore(A,e.firstChild)}}))},before:function(){return KA(this,arguments,(function(A){this.parentNode&&this.parentNode.insertBefore(A,this)}))},after:function(){return KA(this,arguments,(function(A){this.parentNode&&this.parentNode.insertBefore(A,this.nextSibling)}))},empty:function(){for(var A,e=0;null!=(A=this[e]);e++)1===A.nodeType&&(p.cleanData(DA(A,!1)),A.textContent="");return this},clone:function(A,e){return A=null!=A&&A,e=null==e?A:e,this.map((function(){return p.clone(this,A,e)}))},html:function(A){return z(this,(function(A){var e=this[0]||{},t=0,i=this.length;if(void 0===A&&1===e.nodeType)return e.innerHTML;if("string"==typeof A&&!TA.test(A)&&!SA[(yA.exec(A)||["",""])[1].toLowerCase()]){A=p.htmlPrefilter(A);try{for(;t<i;t++)1===(e=this[t]||{}).nodeType&&(p.cleanData(DA(e,!1)),e.innerHTML=A);e=0}catch(A){}}e&&this.empty().append(A)}),null,A,arguments.length)},replaceWith:function(){var A=[];return KA(this,arguments,(function(e){var t=this.parentNode;p.inArray(this,A)<0&&(p.cleanData(DA(this)),t&&t.replaceChild(e,this))}),A)}}),p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(A,e){p.fn[A]=function(A){for(var t,i=[],n=p(A),a=n.length-1,r=0;r<=a;r++)t=r===a?this:this.clone(!0),p(n[r])[e](t),o.apply(i,t.get());return this.pushStack(i)}}));var OA=new RegExp("^("+cA+")(?!px)[a-z%]+$","i"),jA=/^--/,WA=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=A),t.getComputedStyle(e)},ZA=function(A,e,t){var i,n,a={};for(n in e)a[n]=A.style[n],A.style[n]=e[n];for(n in i=t.call(A),e)A.style[n]=a[n];return i},XA=new RegExp(IA.join("|"),"i");function qA(A,e,t){var i,n,a,o,r=jA.test(e),s=A.style;return(t=t||WA(A))&&(o=t.getPropertyValue(e)||t[e],r&&o&&(o=o.replace(v,"$1")||void 0),""!==o||dA(A)||(o=p.style(A,e)),!C.pixelBoxStyles()&&OA.test(o)&&XA.test(e)&&(i=s.width,n=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=t.width,s.width=i,s.minWidth=n,s.maxWidth=a)),void 0!==o?o+"":o}function zA(A,e){return{get:function(){if(!A())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){g.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",CA.appendChild(g).appendChild(c);var e=A.getComputedStyle(c);i="1%"!==e.top,s=12===t(e.marginLeft),c.style.right="60%",o=36===t(e.right),n=36===t(e.width),c.style.position="absolute",a=12===t(c.offsetWidth/3),CA.removeChild(g),c=null}}function t(A){return Math.round(parseFloat(A))}var i,n,a,o,r,s,g=B.createElement("div"),c=B.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",C.clearCloneStyle="content-box"===c.style.backgroundClip,p.extend(C,{boxSizingReliable:function(){return e(),n},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),a},reliableTrDimensions:function(){var e,t,i,n;return null==r&&(e=B.createElement("table"),t=B.createElement("tr"),i=B.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",i.style.height="9px",i.style.display="block",CA.appendChild(e).appendChild(t).appendChild(i),n=A.getComputedStyle(t),r=parseInt(n.height,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10)===t.offsetHeight,CA.removeChild(e)),r}}))}();var $A=["Webkit","Moz","ms"],Ae=B.createElement("div").style,ee={};function te(A){var e=p.cssProps[A]||ee[A];return e||(A in Ae?A:ee[A]=function(A){for(var e=A[0].toUpperCase()+A.slice(1),t=$A.length;t--;)if((A=$A[t]+e)in Ae)return A}(A)||A)}var ie=/^(none|table(?!-c[ea]).+)/,ne={position:"absolute",visibility:"hidden",display:"block"},ae={letterSpacing:"0",fontWeight:"400"};function oe(A,e,t){var i=lA.exec(e);return i?Math.max(0,i[2]-(t||0))+(i[3]||"px"):e}function re(A,e,t,i,n,a){var o="width"===e?1:0,r=0,s=0,g=0;if(t===(i?"border":"content"))return 0;for(;o<4;o+=2)"margin"===t&&(g+=p.css(A,t+IA[o],!0,n)),i?("content"===t&&(s-=p.css(A,"padding"+IA[o],!0,n)),"margin"!==t&&(s-=p.css(A,"border"+IA[o]+"Width",!0,n))):(s+=p.css(A,"padding"+IA[o],!0,n),"padding"!==t?s+=p.css(A,"border"+IA[o]+"Width",!0,n):r+=p.css(A,"border"+IA[o]+"Width",!0,n));return!i&&a>=0&&(s+=Math.max(0,Math.ceil(A["offset"+e[0].toUpperCase()+e.slice(1)]-a-s-r-.5))||0),s+g}function se(A,e,t){var i=WA(A),n=(!C.boxSizingReliable()||t)&&"border-box"===p.css(A,"boxSizing",!1,i),a=n,o=qA(A,e,i),r="offset"+e[0].toUpperCase()+e.slice(1);if(OA.test(o)){if(!t)return o;o="auto"}return(!C.boxSizingReliable()&&n||!C.reliableTrDimensions()&&y(A,"tr")||"auto"===o||!parseFloat(o)&&"inline"===p.css(A,"display",!1,i))&&A.getClientRects().length&&(n="border-box"===p.css(A,"boxSizing",!1,i),(a=r in A)&&(o=A[r])),(o=parseFloat(o)||0)+re(A,e,t||(n?"border":"content"),a,i,o)+"px"}function ge(A,e,t,i,n){return new ge.prototype.init(A,e,t,i,n)}p.extend({cssHooks:{opacity:{get:function(A,e){if(e){var t=qA(A,"opacity");return""===t?"1":t}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(A,e,t,i){if(A&&3!==A.nodeType&&8!==A.nodeType&&A.style){var n,a,o,r=tA(e),s=jA.test(e),g=A.style;if(s||(e=te(r)),o=p.cssHooks[e]||p.cssHooks[r],void 0===t)return o&&"get"in o&&void 0!==(n=o.get(A,!1,i))?n:g[e];"string"===(a=typeof t)&&(n=lA.exec(t))&&n[1]&&(t=uA(A,e,n),a="number"),null!=t&&t==t&&("number"!==a||s||(t+=n&&n[3]||(p.cssNumber[r]?"":"px")),C.clearCloneStyle||""!==t||0!==e.indexOf("background")||(g[e]="inherit"),o&&"set"in o&&void 0===(t=o.set(A,t,i))||(s?g.setProperty(e,t):g[e]=t))}},css:function(A,e,t,i){var n,a,o,r=tA(e);return jA.test(e)||(e=te(r)),(o=p.cssHooks[e]||p.cssHooks[r])&&"get"in o&&(n=o.get(A,!0,t)),void 0===n&&(n=qA(A,e,i)),"normal"===n&&e in ae&&(n=ae[e]),""===t||t?(a=parseFloat(n),!0===t||isFinite(a)?a||0:n):n}}),p.each(["height","width"],(function(A,e){p.cssHooks[e]={get:function(A,t,i){if(t)return!ie.test(p.css(A,"display"))||A.getClientRects().length&&A.getBoundingClientRect().width?se(A,e,i):ZA(A,ne,(function(){return se(A,e,i)}))},set:function(A,t,i){var n,a=WA(A),o=!C.scrollboxSize()&&"absolute"===a.position,r=(o||i)&&"border-box"===p.css(A,"boxSizing",!1,a),s=i?re(A,e,i,r,a):0;return r&&o&&(s-=Math.ceil(A["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(a[e])-re(A,e,"border",!1,a)-.5)),s&&(n=lA.exec(t))&&"px"!==(n[3]||"px")&&(A.style[e]=t,t=p.css(A,e)),oe(0,t,s)}}})),p.cssHooks.marginLeft=zA(C.reliableMarginLeft,(function(A,e){if(e)return(parseFloat(qA(A,"marginLeft"))||A.getBoundingClientRect().left-ZA(A,{marginLeft:0},(function(){return A.getBoundingClientRect().left})))+"px"})),p.each({margin:"",padding:"",border:"Width"},(function(A,e){p.cssHooks[A+e]={expand:function(t){for(var i=0,n={},a="string"==typeof t?t.split(" "):[t];i<4;i++)n[A+IA[i]+e]=a[i]||a[i-2]||a[0];return n}},"margin"!==A&&(p.cssHooks[A+e].set=oe)})),p.fn.extend({css:function(A,e){return z(this,(function(A,e,t){var i,n,a={},o=0;if(Array.isArray(e)){for(i=WA(A),n=e.length;o<n;o++)a[e[o]]=p.css(A,e[o],!1,i);return a}return void 0!==t?p.style(A,e,t):p.css(A,e)}),A,e,arguments.length>1)}}),p.Tween=ge,ge.prototype={constructor:ge,init:function(A,e,t,i,n,a){this.elem=A,this.prop=t,this.easing=n||p.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=a||(p.cssNumber[t]?"":"px")},cur:function(){var A=ge.propHooks[this.prop];return A&&A.get?A.get(this):ge.propHooks._default.get(this)},run:function(A){var e,t=ge.propHooks[this.prop];return this.options.duration?this.pos=e=p.easing[this.easing](A,this.options.duration*A,0,1,this.options.duration):this.pos=e=A,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):ge.propHooks._default.set(this),this}},ge.prototype.init.prototype=ge.prototype,ge.propHooks={_default:{get:function(A){var e;return 1!==A.elem.nodeType||null!=A.elem[A.prop]&&null==A.elem.style[A.prop]?A.elem[A.prop]:(e=p.css(A.elem,A.prop,""))&&"auto"!==e?e:0},set:function(A){p.fx.step[A.prop]?p.fx.step[A.prop](A):1!==A.elem.nodeType||!p.cssHooks[A.prop]&&null==A.elem.style[te(A.prop)]?A.elem[A.prop]=A.now:p.style(A.elem,A.prop,A.now+A.unit)}}},ge.propHooks.scrollTop=ge.propHooks.scrollLeft={set:function(A){A.elem.nodeType&&A.elem.parentNode&&(A.elem[A.prop]=A.now)}},p.easing={linear:function(A){return A},swing:function(A){return.5-Math.cos(A*Math.PI)/2},_default:"swing"},p.fx=ge.prototype.init,p.fx.step={};var ce,le,Ie=/^(?:toggle|show|hide)$/,Ce=/queueHooks$/;function de(){le&&(!1===B.hidden&&A.requestAnimationFrame?A.requestAnimationFrame(de):A.setTimeout(de,p.fx.interval),p.fx.tick())}function he(){return A.setTimeout((function(){ce=void 0})),ce=Date.now()}function Be(A,e){var t,i=0,n={height:A};for(e=e?1:0;i<4;i+=2-e)n["margin"+(t=IA[i])]=n["padding"+t]=A;return e&&(n.opacity=n.width=A),n}function ue(A,e,t){for(var i,n=(Ee.tweeners[e]||[]).concat(Ee.tweeners["*"]),a=0,o=n.length;a<o;a++)if(i=n[a].call(t,e,A))return i}function Ee(A,e,t){var i,n,a=0,o=Ee.prefilters.length,r=p.Deferred().always((function(){delete s.elem})),s=function(){if(n)return!1;for(var e=ce||he(),t=Math.max(0,g.startTime+g.duration-e),i=1-(t/g.duration||0),a=0,o=g.tweens.length;a<o;a++)g.tweens[a].run(i);return r.notifyWith(A,[g,i,t]),i<1&&o?t:(o||r.notifyWith(A,[g,1,0]),r.resolveWith(A,[g]),!1)},g=r.promise({elem:A,props:p.extend({},e),opts:p.extend(!0,{specialEasing:{},easing:p.easing._default},t),originalProperties:e,originalOptions:t,startTime:ce||he(),duration:t.duration,tweens:[],createTween:function(e,t){var i=p.Tween(A,g.opts,e,t,g.opts.specialEasing[e]||g.opts.easing);return g.tweens.push(i),i},stop:function(e){var t=0,i=e?g.tweens.length:0;if(n)return this;for(n=!0;t<i;t++)g.tweens[t].run(1);return e?(r.notifyWith(A,[g,1,0]),r.resolveWith(A,[g,e])):r.rejectWith(A,[g,e]),this}}),c=g.props;for(!function(A,e){var t,i,n,a,o;for(t in A)if(n=e[i=tA(t)],a=A[t],Array.isArray(a)&&(n=a[1],a=A[t]=a[0]),t!==i&&(A[i]=a,delete A[t]),(o=p.cssHooks[i])&&"expand"in o)for(t in a=o.expand(a),delete A[i],a)t in A||(A[t]=a[t],e[t]=n);else e[i]=n}(c,g.opts.specialEasing);a<o;a++)if(i=Ee.prefilters[a].call(g,A,c,g.opts))return d(i.stop)&&(p._queueHooks(g.elem,g.opts.queue).stop=i.stop.bind(i)),i;return p.map(c,ue,g),d(g.opts.start)&&g.opts.start.call(A,g),g.progress(g.opts.progress).done(g.opts.done,g.opts.complete).fail(g.opts.fail).always(g.opts.always),p.fx.timer(p.extend(s,{elem:A,anim:g,queue:g.opts.queue})),g}p.Animation=p.extend(Ee,{tweeners:{"*":[function(A,e){var t=this.createTween(A,e);return uA(t.elem,A,lA.exec(e),t),t}]},tweener:function(A,e){d(A)?(e=A,A=["*"]):A=A.match(V);for(var t,i=0,n=A.length;i<n;i++)t=A[i],Ee.tweeners[t]=Ee.tweeners[t]||[],Ee.tweeners[t].unshift(e)},prefilters:[function(A,e,t){var i,n,a,o,r,s,g,c,l="width"in e||"height"in e,I=this,C={},d=A.style,h=A.nodeType&&BA(A),B=aA.get(A,"fxshow");for(i in t.queue||(null==(o=p._queueHooks(A,"fx")).unqueued&&(o.unqueued=0,r=o.empty.fire,o.empty.fire=function(){o.unqueued||r()}),o.unqueued++,I.always((function(){I.always((function(){o.unqueued--,p.queue(A,"fx").length||o.empty.fire()}))}))),e)if(n=e[i],Ie.test(n)){if(delete e[i],a=a||"toggle"===n,n===(h?"hide":"show")){if("show"!==n||!B||void 0===B[i])continue;h=!0}C[i]=B&&B[i]||p.style(A,i)}if((s=!p.isEmptyObject(e))||!p.isEmptyObject(C))for(i in l&&1===A.nodeType&&(t.overflow=[d.overflow,d.overflowX,d.overflowY],null==(g=B&&B.display)&&(g=aA.get(A,"display")),"none"===(c=p.css(A,"display"))&&(g?c=g:(QA([A],!0),g=A.style.display||g,c=p.css(A,"display"),QA([A]))),("inline"===c||"inline-block"===c&&null!=g)&&"none"===p.css(A,"float")&&(s||(I.done((function(){d.display=g})),null==g&&(c=d.display,g="none"===c?"":c)),d.display="inline-block")),t.overflow&&(d.overflow="hidden",I.always((function(){d.overflow=t.overflow[0],d.overflowX=t.overflow[1],d.overflowY=t.overflow[2]}))),s=!1,C)s||(B?"hidden"in B&&(h=B.hidden):B=aA.access(A,"fxshow",{display:g}),a&&(B.hidden=!h),h&&QA([A],!0),I.done((function(){for(i in h||QA([A]),aA.remove(A,"fxshow"),C)p.style(A,i,C[i])}))),s=ue(h?B[i]:0,i,I),i in B||(B[i]=s.start,h&&(s.end=s.start,s.start=0))}],prefilter:function(A,e){e?Ee.prefilters.unshift(A):Ee.prefilters.push(A)}}),p.speed=function(A,e,t){var i=A&&"object"==typeof A?p.extend({},A):{complete:t||!t&&e||d(A)&&A,duration:A,easing:t&&e||e&&!d(e)&&e};return p.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in p.fx.speeds?i.duration=p.fx.speeds[i.duration]:i.duration=p.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){d(i.old)&&i.old.call(this),i.queue&&p.dequeue(this,i.queue)},i},p.fn.extend({fadeTo:function(A,e,t,i){return this.filter(BA).css("opacity",0).show().end().animate({opacity:e},A,t,i)},animate:function(A,e,t,i){var n=p.isEmptyObject(A),a=p.speed(e,t,i),o=function(){var e=Ee(this,p.extend({},A),a);(n||aA.get(this,"finish"))&&e.stop(!0)};return o.finish=o,n||!1===a.queue?this.each(o):this.queue(a.queue,o)},stop:function(A,e,t){var i=function(A){var e=A.stop;delete A.stop,e(t)};return"string"!=typeof A&&(t=e,e=A,A=void 0),e&&this.queue(A||"fx",[]),this.each((function(){var e=!0,n=null!=A&&A+"queueHooks",a=p.timers,o=aA.get(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Ce.test(n)&&i(o[n]);for(n=a.length;n--;)a[n].elem!==this||null!=A&&a[n].queue!==A||(a[n].anim.stop(t),e=!1,a.splice(n,1));!e&&t||p.dequeue(this,A)}))},finish:function(A){return!1!==A&&(A=A||"fx"),this.each((function(){var e,t=aA.get(this),i=t[A+"queue"],n=t[A+"queueHooks"],a=p.timers,o=i?i.length:0;for(t.finish=!0,p.queue(this,A,[]),n&&n.stop&&n.stop.call(this,!0),e=a.length;e--;)a[e].elem===this&&a[e].queue===A&&(a[e].anim.stop(!0),a.splice(e,1));for(e=0;e<o;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete t.finish}))}}),p.each(["toggle","show","hide"],(function(A,e){var t=p.fn[e];p.fn[e]=function(A,i,n){return null==A||"boolean"==typeof A?t.apply(this,arguments):this.animate(Be(e,!0),A,i,n)}})),p.each({slideDown:Be("show"),slideUp:Be("hide"),slideToggle:Be("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(A,e){p.fn[A]=function(A,t,i){return this.animate(e,A,t,i)}})),p.timers=[],p.fx.tick=function(){var A,e=0,t=p.timers;for(ce=Date.now();e<t.length;e++)(A=t[e])()||t[e]!==A||t.splice(e--,1);t.length||p.fx.stop(),ce=void 0},p.fx.timer=function(A){p.timers.push(A),p.fx.start()},p.fx.interval=13,p.fx.start=function(){le||(le=!0,de())},p.fx.stop=function(){le=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fn.delay=function(e,t){return e=p.fx&&p.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,i){var n=A.setTimeout(t,e);i.stop=function(){A.clearTimeout(n)}}))},function(){var A=B.createElement("input"),e=B.createElement("select").appendChild(B.createElement("option"));A.type="checkbox",C.checkOn=""!==A.value,C.optSelected=e.selected,(A=B.createElement("input")).value="t",A.type="radio",C.radioValue="t"===A.value}();var fe,Qe=p.expr.attrHandle;p.fn.extend({attr:function(A,e){return z(this,p.attr,A,e,arguments.length>1)},removeAttr:function(A){return this.each((function(){p.removeAttr(this,A)}))}}),p.extend({attr:function(A,e,t){var i,n,a=A.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===A.getAttribute?p.prop(A,e,t):(1===a&&p.isXMLDoc(A)||(n=p.attrHooks[e.toLowerCase()]||(p.expr.match.bool.test(e)?fe:void 0)),void 0!==t?null===t?void p.removeAttr(A,e):n&&"set"in n&&void 0!==(i=n.set(A,t,e))?i:(A.setAttribute(e,t+""),t):n&&"get"in n&&null!==(i=n.get(A,e))?i:null==(i=p.find.attr(A,e))?void 0:i)},attrHooks:{type:{set:function(A,e){if(!C.radioValue&&"radio"===e&&y(A,"input")){var t=A.value;return A.setAttribute("type",e),t&&(A.value=t),e}}}},removeAttr:function(A,e){var t,i=0,n=e&&e.match(V);if(n&&1===A.nodeType)for(;t=n[i++];)A.removeAttribute(t)}}),fe={set:function(A,e,t){return!1===e?p.removeAttr(A,t):A.setAttribute(t,t),t}},p.each(p.expr.match.bool.source.match(/\w+/g),(function(A,e){var t=Qe[e]||p.find.attr;Qe[e]=function(A,e,i){var n,a,o=e.toLowerCase();return i||(a=Qe[o],Qe[o]=n,n=null!=t(A,e,i)?o:null,Qe[o]=a),n}}));var xe=/^(?:input|select|textarea|button)$/i,pe=/^(?:a|area)$/i;function me(A){return(A.match(V)||[]).join(" ")}function ye(A){return A.getAttribute&&A.getAttribute("class")||""}function _e(A){return Array.isArray(A)?A:"string"==typeof A&&A.match(V)||[]}p.fn.extend({prop:function(A,e){return z(this,p.prop,A,e,arguments.length>1)},removeProp:function(A){return this.each((function(){delete this[p.propFix[A]||A]}))}}),p.extend({prop:function(A,e,t){var i,n,a=A.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&p.isXMLDoc(A)||(e=p.propFix[e]||e,n=p.propHooks[e]),void 0!==t?n&&"set"in n&&void 0!==(i=n.set(A,t,e))?i:A[e]=t:n&&"get"in n&&null!==(i=n.get(A,e))?i:A[e]},propHooks:{tabIndex:{get:function(A){var e=p.find.attr(A,"tabindex");return e?parseInt(e,10):xe.test(A.nodeName)||pe.test(A.nodeName)&&A.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),C.optSelected||(p.propHooks.selected={get:function(A){var e=A.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(A){var e=A.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),p.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){p.propFix[this.toLowerCase()]=this})),p.fn.extend({addClass:function(A){var e,t,i,n,a,o;return d(A)?this.each((function(e){p(this).addClass(A.call(this,e,ye(this)))})):(e=_e(A)).length?this.each((function(){if(i=ye(this),t=1===this.nodeType&&" "+me(i)+" "){for(a=0;a<e.length;a++)n=e[a],t.indexOf(" "+n+" ")<0&&(t+=n+" ");o=me(t),i!==o&&this.setAttribute("class",o)}})):this},removeClass:function(A){var e,t,i,n,a,o;return d(A)?this.each((function(e){p(this).removeClass(A.call(this,e,ye(this)))})):arguments.length?(e=_e(A)).length?this.each((function(){if(i=ye(this),t=1===this.nodeType&&" "+me(i)+" "){for(a=0;a<e.length;a++)for(n=e[a];t.indexOf(" "+n+" ")>-1;)t=t.replace(" "+n+" "," ");o=me(t),i!==o&&this.setAttribute("class",o)}})):this:this.attr("class","")},toggleClass:function(A,e){var t,i,n,a,o=typeof A,r="string"===o||Array.isArray(A);return d(A)?this.each((function(t){p(this).toggleClass(A.call(this,t,ye(this),e),e)})):"boolean"==typeof e&&r?e?this.addClass(A):this.removeClass(A):(t=_e(A),this.each((function(){if(r)for(a=p(this),n=0;n<t.length;n++)i=t[n],a.hasClass(i)?a.removeClass(i):a.addClass(i);else void 0!==A&&"boolean"!==o||((i=ye(this))&&aA.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||!1===A?"":aA.get(this,"__className__")||""))})))},hasClass:function(A){var e,t,i=0;for(e=" "+A+" ";t=this[i++];)if(1===t.nodeType&&(" "+me(ye(t))+" ").indexOf(e)>-1)return!0;return!1}});var Se=/\r/g;p.fn.extend({val:function(A){var e,t,i,n=this[0];return arguments.length?(i=d(A),this.each((function(t){var n;1===this.nodeType&&(null==(n=i?A.call(this,t,p(this).val()):A)?n="":"number"==typeof n?n+="":Array.isArray(n)&&(n=p.map(n,(function(A){return null==A?"":A+""}))),(e=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,n,"value")||(this.value=n))}))):n?(e=p.valHooks[n.type]||p.valHooks[n.nodeName.toLowerCase()])&&"get"in e&&void 0!==(t=e.get(n,"value"))?t:"string"==typeof(t=n.value)?t.replace(Se,""):null==t?"":t:void 0}}),p.extend({valHooks:{option:{get:function(A){var e=p.find.attr(A,"value");return null!=e?e:me(p.text(A))}},select:{get:function(A){var e,t,i,n=A.options,a=A.selectedIndex,o="select-one"===A.type,r=o?null:[],s=o?a+1:n.length;for(i=a<0?s:o?a:0;i<s;i++)if(((t=n[i]).selected||i===a)&&!t.disabled&&(!t.parentNode.disabled||!y(t.parentNode,"optgroup"))){if(e=p(t).val(),o)return e;r.push(e)}return r},set:function(A,e){for(var t,i,n=A.options,a=p.makeArray(e),o=n.length;o--;)((i=n[o]).selected=p.inArray(p.valHooks.option.get(i),a)>-1)&&(t=!0);return t||(A.selectedIndex=-1),a}}}}),p.each(["radio","checkbox"],(function(){p.valHooks[this]={set:function(A,e){if(Array.isArray(e))return A.checked=p.inArray(p(A).val(),e)>-1}},C.checkOn||(p.valHooks[this].get=function(A){return null===A.getAttribute("value")?"on":A.value})}));var De=A.location,we={guid:Date.now()},ve=/\?/;p.parseXML=function(e){var t,i;if(!e||"string"!=typeof e)return null;try{t=(new A.DOMParser).parseFromString(e,"text/xml")}catch(A){}return i=t&&t.getElementsByTagName("parsererror")[0],t&&!i||p.error("Invalid XML: "+(i?p.map(i.childNodes,(function(A){return A.textContent})).join("\n"):e)),t};var be=/^(?:focusinfocus|focusoutblur)$/,Fe=function(A){A.stopPropagation()};p.extend(p.event,{trigger:function(e,t,i,n){var a,o,r,s,g,l,I,C,u=[i||B],E=c.call(e,"type")?e.type:e,f=c.call(e,"namespace")?e.namespace.split("."):[];if(o=C=r=i=i||B,3!==i.nodeType&&8!==i.nodeType&&!be.test(E+p.event.triggered)&&(E.indexOf(".")>-1&&(f=E.split("."),E=f.shift(),f.sort()),g=E.indexOf(":")<0&&"on"+E,(e=e[p.expando]?e:new p.Event(E,"object"==typeof e&&e)).isTrigger=n?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:p.makeArray(t,[e]),I=p.event.special[E]||{},n||!I.trigger||!1!==I.trigger.apply(i,t))){if(!n&&!I.noBubble&&!h(i)){for(s=I.delegateType||E,be.test(s+E)||(o=o.parentNode);o;o=o.parentNode)u.push(o),r=o;r===(i.ownerDocument||B)&&u.push(r.defaultView||r.parentWindow||A)}for(a=0;(o=u[a++])&&!e.isPropagationStopped();)C=o,e.type=a>1?s:I.bindType||E,(l=(aA.get(o,"events")||Object.create(null))[e.type]&&aA.get(o,"handle"))&&l.apply(o,t),(l=g&&o[g])&&l.apply&&iA(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=E,n||e.isDefaultPrevented()||I._default&&!1!==I._default.apply(u.pop(),t)||!iA(i)||g&&d(i[E])&&!h(i)&&((r=i[g])&&(i[g]=null),p.event.triggered=E,e.isPropagationStopped()&&C.addEventListener(E,Fe),i[E](),e.isPropagationStopped()&&C.removeEventListener(E,Fe),p.event.triggered=void 0,r&&(i[g]=r)),e.result}},simulate:function(A,e,t){var i=p.extend(new p.Event,t,{type:A,isSimulated:!0});p.event.trigger(i,null,e)}}),p.fn.extend({trigger:function(A,e){return this.each((function(){p.event.trigger(A,e,this)}))},triggerHandler:function(A,e){var t=this[0];if(t)return p.event.trigger(A,e,t,!0)}});var Re=/\[\]$/,ke=/\r?\n/g,Pe=/^(?:submit|button|image|reset|file)$/i,Ne=/^(?:input|select|textarea|keygen)/i;function Te(A,e,t,i){var n;if(Array.isArray(e))p.each(e,(function(e,n){t||Re.test(A)?i(A,n):Te(A+"["+("object"==typeof n&&null!=n?e:"")+"]",n,t,i)}));else if(t||"object"!==f(e))i(A,e);else for(n in e)Te(A+"["+n+"]",e[n],t,i)}p.param=function(A,e){var t,i=[],n=function(A,e){var t=d(e)?e():e;i[i.length]=encodeURIComponent(A)+"="+encodeURIComponent(null==t?"":t)};if(null==A)return"";if(Array.isArray(A)||A.jquery&&!p.isPlainObject(A))p.each(A,(function(){n(this.name,this.value)}));else for(t in A)Te(t,A[t],e,n);return i.join("&")},p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var A=p.prop(this,"elements");return A?p.makeArray(A):this})).filter((function(){var A=this.type;return this.name&&!p(this).is(":disabled")&&Ne.test(this.nodeName)&&!Pe.test(A)&&(this.checked||!mA.test(A))})).map((function(A,e){var t=p(this).val();return null==t?null:Array.isArray(t)?p.map(t,(function(A){return{name:e.name,value:A.replace(ke,"\r\n")}})):{name:e.name,value:t.replace(ke,"\r\n")}})).get()}});var Me=/%20/g,Le=/#.*$/,Ye=/([?&])_=[^&]*/,Ge=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ue=/^(?:GET|HEAD)$/,Je=/^\/\//,He={},Ke={},Ve="*/".concat("*"),Oe=B.createElement("a");function je(A){return function(e,t){"string"!=typeof e&&(t=e,e="*");var i,n=0,a=e.toLowerCase().match(V)||[];if(d(t))for(;i=a[n++];)"+"===i[0]?(i=i.slice(1)||"*",(A[i]=A[i]||[]).unshift(t)):(A[i]=A[i]||[]).push(t)}}function We(A,e,t,i){var n={},a=A===Ke;function o(r){var s;return n[r]=!0,p.each(A[r]||[],(function(A,r){var g=r(e,t,i);return"string"!=typeof g||a||n[g]?a?!(s=g):void 0:(e.dataTypes.unshift(g),o(g),!1)})),s}return o(e.dataTypes[0])||!n["*"]&&o("*")}function Ze(A,e){var t,i,n=p.ajaxSettings.flatOptions||{};for(t in e)void 0!==e[t]&&((n[t]?A:i||(i={}))[t]=e[t]);return i&&p.extend(!0,A,i),A}Oe.href=De.href,p.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:De.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(De.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ve,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":p.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(A,e){return e?Ze(Ze(A,p.ajaxSettings),e):Ze(p.ajaxSettings,A)},ajaxPrefilter:je(He),ajaxTransport:je(Ke),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,n,a,o,r,s,g,c,l,I,C=p.ajaxSetup({},t),d=C.context||C,h=C.context&&(d.nodeType||d.jquery)?p(d):p.event,u=p.Deferred(),E=p.Callbacks("once memory"),f=C.statusCode||{},Q={},x={},m="canceled",y={readyState:0,getResponseHeader:function(A){var e;if(g){if(!o)for(o={};e=Ge.exec(a);)o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=o[A.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return g?a:null},setRequestHeader:function(A,e){return null==g&&(A=x[A.toLowerCase()]=x[A.toLowerCase()]||A,Q[A]=e),this},overrideMimeType:function(A){return null==g&&(C.mimeType=A),this},statusCode:function(A){var e;if(A)if(g)y.always(A[y.status]);else for(e in A)f[e]=[f[e],A[e]];return this},abort:function(A){var e=A||m;return i&&i.abort(e),_(0,e),this}};if(u.promise(y),C.url=((e||C.url||De.href)+"").replace(Je,De.protocol+"//"),C.type=t.method||t.type||C.method||C.type,C.dataTypes=(C.dataType||"*").toLowerCase().match(V)||[""],null==C.crossDomain){s=B.createElement("a");try{s.href=C.url,s.href=s.href,C.crossDomain=Oe.protocol+"//"+Oe.host!=s.protocol+"//"+s.host}catch(A){C.crossDomain=!0}}if(C.data&&C.processData&&"string"!=typeof C.data&&(C.data=p.param(C.data,C.traditional)),We(He,C,t,y),g)return y;for(l in(c=p.event&&C.global)&&0==p.active++&&p.event.trigger("ajaxStart"),C.type=C.type.toUpperCase(),C.hasContent=!Ue.test(C.type),n=C.url.replace(Le,""),C.hasContent?C.data&&C.processData&&0===(C.contentType||"").indexOf("application/x-www-form-urlencoded")&&(C.data=C.data.replace(Me,"+")):(I=C.url.slice(n.length),C.data&&(C.processData||"string"==typeof C.data)&&(n+=(ve.test(n)?"&":"?")+C.data,delete C.data),!1===C.cache&&(n=n.replace(Ye,"$1"),I=(ve.test(n)?"&":"?")+"_="+we.guid+++I),C.url=n+I),C.ifModified&&(p.lastModified[n]&&y.setRequestHeader("If-Modified-Since",p.lastModified[n]),p.etag[n]&&y.setRequestHeader("If-None-Match",p.etag[n])),(C.data&&C.hasContent&&!1!==C.contentType||t.contentType)&&y.setRequestHeader("Content-Type",C.contentType),y.setRequestHeader("Accept",C.dataTypes[0]&&C.accepts[C.dataTypes[0]]?C.accepts[C.dataTypes[0]]+("*"!==C.dataTypes[0]?", "+Ve+"; q=0.01":""):C.accepts["*"]),C.headers)y.setRequestHeader(l,C.headers[l]);if(C.beforeSend&&(!1===C.beforeSend.call(d,y,C)||g))return y.abort();if(m="abort",E.add(C.complete),y.done(C.success),y.fail(C.error),i=We(Ke,C,t,y)){if(y.readyState=1,c&&h.trigger("ajaxSend",[y,C]),g)return y;C.async&&C.timeout>0&&(r=A.setTimeout((function(){y.abort("timeout")}),C.timeout));try{g=!1,i.send(Q,_)}catch(A){if(g)throw A;_(-1,A)}}else _(-1,"No Transport");function _(e,t,o,s){var l,I,B,Q,x,m=t;g||(g=!0,r&&A.clearTimeout(r),i=void 0,a=s||"",y.readyState=e>0?4:0,l=e>=200&&e<300||304===e,o&&(Q=function(A,e,t){for(var i,n,a,o,r=A.contents,s=A.dataTypes;"*"===s[0];)s.shift(),void 0===i&&(i=A.mimeType||e.getResponseHeader("Content-Type"));if(i)for(n in r)if(r[n]&&r[n].test(i)){s.unshift(n);break}if(s[0]in t)a=s[0];else{for(n in t){if(!s[0]||A.converters[n+" "+s[0]]){a=n;break}o||(o=n)}a=a||o}if(a)return a!==s[0]&&s.unshift(a),t[a]}(C,y,o)),!l&&p.inArray("script",C.dataTypes)>-1&&p.inArray("json",C.dataTypes)<0&&(C.converters["text script"]=function(){}),Q=function(A,e,t,i){var n,a,o,r,s,g={},c=A.dataTypes.slice();if(c[1])for(o in A.converters)g[o.toLowerCase()]=A.converters[o];for(a=c.shift();a;)if(A.responseFields[a]&&(t[A.responseFields[a]]=e),!s&&i&&A.dataFilter&&(e=A.dataFilter(e,A.dataType)),s=a,a=c.shift())if("*"===a)a=s;else if("*"!==s&&s!==a){if(!(o=g[s+" "+a]||g["* "+a]))for(n in g)if((r=n.split(" "))[1]===a&&(o=g[s+" "+r[0]]||g["* "+r[0]])){!0===o?o=g[n]:!0!==g[n]&&(a=r[0],c.unshift(r[1]));break}if(!0!==o)if(o&&A.throws)e=o(e);else try{e=o(e)}catch(A){return{state:"parsererror",error:o?A:"No conversion from "+s+" to "+a}}}return{state:"success",data:e}}(C,Q,y,l),l?(C.ifModified&&((x=y.getResponseHeader("Last-Modified"))&&(p.lastModified[n]=x),(x=y.getResponseHeader("etag"))&&(p.etag[n]=x)),204===e||"HEAD"===C.type?m="nocontent":304===e?m="notmodified":(m=Q.state,I=Q.data,l=!(B=Q.error))):(B=m,!e&&m||(m="error",e<0&&(e=0))),y.status=e,y.statusText=(t||m)+"",l?u.resolveWith(d,[I,m,y]):u.rejectWith(d,[y,m,B]),y.statusCode(f),f=void 0,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[y,C,l?I:B]),E.fireWith(d,[y,m]),c&&(h.trigger("ajaxComplete",[y,C]),--p.active||p.event.trigger("ajaxStop")))}return y},getJSON:function(A,e,t){return p.get(A,e,t,"json")},getScript:function(A,e){return p.get(A,void 0,e,"script")}}),p.each(["get","post"],(function(A,e){p[e]=function(A,t,i,n){return d(t)&&(n=n||i,i=t,t=void 0),p.ajax(p.extend({url:A,type:e,dataType:n,data:t,success:i},p.isPlainObject(A)&&A))}})),p.ajaxPrefilter((function(A){var e;for(e in A.headers)"content-type"===e.toLowerCase()&&(A.contentType=A.headers[e]||"")})),p._evalUrl=function(A,e,t){return p.ajax({url:A,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(A){p.globalEval(A,e,t)}})},p.fn.extend({wrapAll:function(A){var e;return this[0]&&(d(A)&&(A=A.call(this[0])),e=p(A,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var A=this;A.firstElementChild;)A=A.firstElementChild;return A})).append(this)),this},wrapInner:function(A){return d(A)?this.each((function(e){p(this).wrapInner(A.call(this,e))})):this.each((function(){var e=p(this),t=e.contents();t.length?t.wrapAll(A):e.append(A)}))},wrap:function(A){var e=d(A);return this.each((function(t){p(this).wrapAll(e?A.call(this,t):A)}))},unwrap:function(A){return this.parent(A).not("body").each((function(){p(this).replaceWith(this.childNodes)})),this}}),p.expr.pseudos.hidden=function(A){return!p.expr.pseudos.visible(A)},p.expr.pseudos.visible=function(A){return!!(A.offsetWidth||A.offsetHeight||A.getClientRects().length)},p.ajaxSettings.xhr=function(){try{return new A.XMLHttpRequest}catch(A){}};var Xe={0:200,1223:204},qe=p.ajaxSettings.xhr();C.cors=!!qe&&"withCredentials"in qe,C.ajax=qe=!!qe,p.ajaxTransport((function(e){var t,i;if(C.cors||qe&&!e.crossDomain)return{send:function(n,a){var o,r=e.xhr();if(r.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)r[o]=e.xhrFields[o];for(o in e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)r.setRequestHeader(o,n[o]);t=function(A){return function(){t&&(t=i=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===A?r.abort():"error"===A?"number"!=typeof r.status?a(0,"error"):a(r.status,r.statusText):a(Xe[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=t(),i=r.onerror=r.ontimeout=t("error"),void 0!==r.onabort?r.onabort=i:r.onreadystatechange=function(){4===r.readyState&&A.setTimeout((function(){t&&i()}))},t=t("abort");try{r.send(e.hasContent&&e.data||null)}catch(A){if(t)throw A}},abort:function(){t&&t()}}})),p.ajaxPrefilter((function(A){A.crossDomain&&(A.contents.script=!1)})),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(A){return p.globalEval(A),A}}}),p.ajaxPrefilter("script",(function(A){void 0===A.cache&&(A.cache=!1),A.crossDomain&&(A.type="GET")})),p.ajaxTransport("script",(function(A){var e,t;if(A.crossDomain||A.scriptAttrs)return{send:function(i,n){e=p("<script>").attr(A.scriptAttrs||{}).prop({charset:A.scriptCharset,src:A.url}).on("load error",t=function(A){e.remove(),t=null,A&&n("error"===A.type?404:200,A.type)}),B.head.appendChild(e[0])},abort:function(){t&&t()}}}));var ze,$e=[],At=/(=)\?(?=&|$)|\?\?/;p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var A=$e.pop()||p.expando+"_"+we.guid++;return this[A]=!0,A}}),p.ajaxPrefilter("json jsonp",(function(e,t,i){var n,a,o,r=!1!==e.jsonp&&(At.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&At.test(e.data)&&"data");if(r||"jsonp"===e.dataTypes[0])return n=e.jsonpCallback=d(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,r?e[r]=e[r].replace(At,"$1"+n):!1!==e.jsonp&&(e.url+=(ve.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return o||p.error(n+" was not called"),o[0]},e.dataTypes[0]="json",a=A[n],A[n]=function(){o=arguments},i.always((function(){void 0===a?p(A).removeProp(n):A[n]=a,e[n]&&(e.jsonpCallback=t.jsonpCallback,$e.push(n)),o&&d(a)&&a(o[0]),o=a=void 0})),"script"})),C.createHTMLDocument=((ze=B.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===ze.childNodes.length),p.parseHTML=function(A,e,t){return"string"!=typeof A?[]:("boolean"==typeof e&&(t=e,e=!1),e||(C.createHTMLDocument?((i=(e=B.implementation.createHTMLDocument("")).createElement("base")).href=B.location.href,e.head.appendChild(i)):e=B),a=!t&&[],(n=M.exec(A))?[e.createElement(n[1])]:(n=bA([A],e,a),a&&a.length&&p(a).remove(),p.merge([],n.childNodes)));var i,n,a},p.fn.load=function(A,e,t){var i,n,a,o=this,r=A.indexOf(" ");return r>-1&&(i=me(A.slice(r)),A=A.slice(0,r)),d(e)?(t=e,e=void 0):e&&"object"==typeof e&&(n="POST"),o.length>0&&p.ajax({url:A,type:n||"GET",dataType:"html",data:e}).done((function(A){a=arguments,o.html(i?p("<div>").append(p.parseHTML(A)).find(i):A)})).always(t&&function(A,e){o.each((function(){t.apply(this,a||[A.responseText,e,A])}))}),this},p.expr.pseudos.animated=function(A){return p.grep(p.timers,(function(e){return A===e.elem})).length},p.offset={setOffset:function(A,e,t){var i,n,a,o,r,s,g=p.css(A,"position"),c=p(A),l={};"static"===g&&(A.style.position="relative"),r=c.offset(),a=p.css(A,"top"),s=p.css(A,"left"),("absolute"===g||"fixed"===g)&&(a+s).indexOf("auto")>-1?(o=(i=c.position()).top,n=i.left):(o=parseFloat(a)||0,n=parseFloat(s)||0),d(e)&&(e=e.call(A,t,p.extend({},r))),null!=e.top&&(l.top=e.top-r.top+o),null!=e.left&&(l.left=e.left-r.left+n),"using"in e?e.using.call(A,l):c.css(l)}},p.fn.extend({offset:function(A){if(arguments.length)return void 0===A?this:this.each((function(e){p.offset.setOffset(this,A,e)}));var e,t,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),t=i.ownerDocument.defaultView,{top:e.top+t.pageYOffset,left:e.left+t.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var A,e,t,i=this[0],n={top:0,left:0};if("fixed"===p.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),t=i.ownerDocument,A=i.offsetParent||t.documentElement;A&&(A===t.body||A===t.documentElement)&&"static"===p.css(A,"position");)A=A.parentNode;A&&A!==i&&1===A.nodeType&&((n=p(A).offset()).top+=p.css(A,"borderTopWidth",!0),n.left+=p.css(A,"borderLeftWidth",!0))}return{top:e.top-n.top-p.css(i,"marginTop",!0),left:e.left-n.left-p.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var A=this.offsetParent;A&&"static"===p.css(A,"position");)A=A.offsetParent;return A||CA}))}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(A,e){var t="pageYOffset"===e;p.fn[A]=function(i){return z(this,(function(A,i,n){var a;if(h(A)?a=A:9===A.nodeType&&(a=A.defaultView),void 0===n)return a?a[e]:A[i];a?a.scrollTo(t?a.pageXOffset:n,t?n:a.pageYOffset):A[i]=n}),A,i,arguments.length)}})),p.each(["top","left"],(function(A,e){p.cssHooks[e]=zA(C.pixelPosition,(function(A,t){if(t)return t=qA(A,e),OA.test(t)?p(A).position()[e]+"px":t}))})),p.each({Height:"height",Width:"width"},(function(A,e){p.each({padding:"inner"+A,content:e,"":"outer"+A},(function(t,i){p.fn[i]=function(n,a){var o=arguments.length&&(t||"boolean"!=typeof n),r=t||(!0===n||!0===a?"margin":"border");return z(this,(function(e,t,n){var a;return h(e)?0===i.indexOf("outer")?e["inner"+A]:e.document.documentElement["client"+A]:9===e.nodeType?(a=e.documentElement,Math.max(e.body["scroll"+A],a["scroll"+A],e.body["offset"+A],a["offset"+A],a["client"+A])):void 0===n?p.css(e,t,r):p.style(e,t,n,r)}),e,o?n:void 0,o)}}))})),p.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(A,e){p.fn[e]=function(A){return this.on(e,A)}})),p.fn.extend({bind:function(A,e,t){return this.on(A,null,e,t)},unbind:function(A,e){return this.off(A,null,e)},delegate:function(A,e,t,i){return this.on(e,A,t,i)},undelegate:function(A,e,t){return 1===arguments.length?this.off(A,"**"):this.off(e,A||"**",t)},hover:function(A,e){return this.on("mouseenter",A).on("mouseleave",e||A)}}),p.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(A,e){p.fn[e]=function(A,t){return arguments.length>0?this.on(e,null,A,t):this.trigger(e)}}));var et=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;p.proxy=function(A,e){var t,i,a;if("string"==typeof e&&(t=A[e],e=A,A=t),d(A))return i=n.call(arguments,2),a=function(){return A.apply(e||this,i.concat(n.call(arguments)))},a.guid=A.guid=A.guid||p.guid++,a},p.holdReady=function(A){A?p.readyWait++:p.ready(!0)},p.isArray=Array.isArray,p.parseJSON=JSON.parse,p.nodeName=y,p.isFunction=d,p.isWindow=h,p.camelCase=tA,p.type=f,p.now=Date.now,p.isNumeric=function(A){var e=p.type(A);return("number"===e||"string"===e)&&!isNaN(A-parseFloat(A))},p.trim=function(A){return null==A?"":(A+"").replace(et,"$1")};var tt=A.jQuery,it=A.$;return p.noConflict=function(e){return A.$===p&&(A.$=it),e&&A.jQuery===p&&(A.jQuery=tt),p},void 0===e&&(A.jQuery=A.$=p),p}))}(mn);var yn=R(mn.exports),_n={info:"",log:"background: #4096ff; color: #FFF;",warn:"background: yellow; color: #FFF;",error:"background: red; color: #FFF;"},Sn=function(){function A(A){void 0===A&&(A={}),this._options={level:"INFO",showTime:!1},this._levelNum=3,this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0),this.setOptions(A)}var e=A.prototype;return e.setOptions=function(A){var e;this._options=Object.assign({},this._options,A),this._levelNum=this._matchLevel(null!=(e=this._options.level)?e:"INFO"),this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0)},e._matchLevel=function(A){var e=3;switch(A){case"INFO":e=3;break;case"LOG":e=2;break;case"WARN":e=1;break;case"ERROR":e=0}return e},e._loggerFactory=function(e,t){var i=console[e];if(t&&i){var n,a=this._options.name?"%c["+this._options.name+"]%c %c["+e.toUpperCase()+"]":"%c["+e.toUpperCase()+"]",o=[this._options.name?"background: green;color: #fff":null,this._options.name?"":null,_n[e]].filter((function(A){return null!=A}));return(n=i).bind.apply(n,[].concat([console,a],o))}return A.noop},e.getOptions=function(){return this._options},e.getVersion=function(){return"1.0.1"},A}();function Dn(A){return(A=+A)<10&&(A="0"+A),A+""}Sn.noop=function(){};var wn=["info","log","warn","error"];
40
40
  /*
41
41
  *
42
42
  * @ezuikit/utils-i18n v1.0.1