var CreateWsmanComm=function(e,t,r,n,a){var c={};function o(){for(i in c.socketState=2,c.pendingAjaxCall)c.sendRequest(c.pendingAjaxCall[i][0],c.pendingAjaxCall[i][3],c.pendingAjaxCall[i][4])}function s(e){for(c.socketAccumulator+=function(e){return String.fromCharCode.apply(null,e)}(new Uint8Array(e.data));;){if(0==c.socketParseState){var t=c.socketAccumulator.indexOf("\r\n\r\n");if(t<0)return;if(c.socketHeader=c.socketAccumulator.substring(0,t).split("\r\n"),null==c.amtVersion)for(var r in c.socketHeader)0==c.socketHeader[r].indexOf("Server: Intel(R) Active Management Technology ")&&(c.amtVersion=c.socketHeader[r].substring(46));for(r in c.socketAccumulator=c.socketAccumulator.substring(t+4),c.socketParseState=1,c.socketData="",c.socketXHeader={Directive:c.socketHeader[0].split(" ")},c.socketHeader)if(0!=r){var n=c.socketHeader[r].indexOf(":");c.socketXHeader[c.socketHeader[r].substring(0,n).toLowerCase()]=c.socketHeader[r].substring(n+2)}}if(1==c.socketParseState){var a=-1;if(null==c.socketXHeader.connection||"close"!=c.socketXHeader.connection.toLowerCase()||null!=c.socketXHeader["transfer-encoding"]&&"chunked"==c.socketXHeader["transfer-encoding"].toLowerCase())if(null!=c.socketXHeader["content-length"]){if(a=parseInt(c.socketXHeader["content-length"]),c.socketAccumulator.length=c.MaxActiveAjaxCount||0==c.PendingAjax.length)){var e=c.PendingAjax.shift();c.PerformAjaxEx(e[0],e[1],e[2],e[3],e[4]),c.PerformNextAjax()}},c.PerformAjaxEx=function(e,t,r,n,a){if(0==c.FailAllError)return e=e||"",c.ActiveAjaxCount++,c.PerformAjaxExNodeJS(e,t,r,n,a);c.gotNextMessagesError({status:c.FailAllError},"error",null,[e,t,r,n,a])},c.pendingAjaxCall=[],c.PerformAjaxExNodeJS=function(e,t,r,n,a){c.PerformAjaxExNodeJS2(e,t,r,n,a,3)},c.PerformAjaxExNodeJS2=function(e,t,r,n,a,o){if(o<=0||0!=c.FailAllError)return c.ActiveAjaxCount--,999!=c.FailAllError&&c.gotNextMessages(null,"error",{status:0==c.FailAllError?408:c.FailAllError},[e,t,r,n,a]),void c.PerformNextAjax();c.pendingAjaxCall.push([e,t,r,n,a,o]),0==c.socketState?c.xxConnectHttpSocket():2==c.socketState&&c.sendRequest(e,n,a)},c.sendRequest=function(e,t,r){var n=(r=r||"POST")+" "+(t=t||"/wsman")+" HTTP/1.1\r\n";if(null!=c.challengeParams){var a=hex_md5(hex_md5(c.user+":"+c.challengeParams.realm+":"+c.pass)+":"+c.challengeParams.nonce+":"+c.noncecounter+":"+c.cnonce+":"+c.challengeParams.qop+":"+hex_md5(r+":"+t+("auth-int"==c.challengeParams.qop?":"+hex_md5(e):"")));n+="Authorization: "+c.renderDigest({username:c.user,realm:c.challengeParams.realm,nonce:c.challengeParams.nonce,uri:t,qop:c.challengeParams.qop,response:a,nc:c.noncecounter++,cnonce:c.cnonce})+"\r\n"}!function(e){if(2==c.socketState&&null!=c.socket&&c.socket.readyState==WebSocket.OPEN){for(var t=new Uint8Array(e.length),r=0;r