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