var CreateKvmDataChannel=function(e,t,n){var a={};a.m=t,t.parent=a,a.webchannel=e,a.State=0,a.protocol=t.protocol,a.onStateChanged=null,a.onControlMsg=null,a.debugmode=0,a.keepalive=n,a.rtcKeepAlive=null,a.Start=function(){1==a.debugmode&&console.log("start"),a.xxStateChange(3),a.webchannel.onmessage=a.xxOnMessage,a.rtcKeepAlive=setInterval(a.xxSendRtcKeepAlive,3e4)};var r=new FileReader,o=!1,l=[];return r.readAsBinaryString?r.onload=function(e){a.xxOnSocketData(e.target.result),0==l.length?o=!1:r.readAsBinaryString(new Blob([l.shift()]))}:r.readAsArrayBuffer&&(r.onloadend=function(e){a.xxOnSocketData(e.target.result),0==l.length?o=!1:r.readAsArrayBuffer(l.shift())}),a.xxOnMessage=function(e){if("string"!=typeof e.data)if("object"==typeof e.data){if(1==o)return void l.push(e.data);if(r.readAsBinaryString)o=!0,r.readAsBinaryString(new Blob([e.data]));else if(f.readAsArrayBuffer)o=!0,r.readAsArrayBuffer(e.data);else{for(var t="",n=new Uint8Array(e.data),i=n.byteLength,s=0;s