var CreateWsmanComm=function(e,t,r,n,a){var u={};function o(){for(i in u.socketState=2,u.pendingAjaxCall)u.sendRequest(u.pendingAjaxCall[i][0],u.pendingAjaxCall[i][3],u.pendingAjaxCall[i][4])}u.PendingAjax=[],u.ActiveAjaxCount=0,u.MaxActiveAjaxCount=1,u.FailAllError=0,u.challengeParams=null,u.noncecounter=1,u.authcounter=0,u.socket=null,u.socketState=0,u.host=e,u.port=t,u.user=r,u.pass=n,u.tls=a,u.tlsv1only=1,u.cnonce=Math.random().toString(36).substring(7),u.PerformAjax=function(e,t,r,n,a,o){u.ActiveAjaxCount=u.MaxActiveAjaxCount||0==u.PendingAjax.length)){var e=u.PendingAjax.shift();u.PerformAjaxEx(e[0],e[1],e[2],e[3],e[4]),u.PerformNextAjax()}},u.PerformAjaxEx=function(e,t,r,n,a){if(0==u.FailAllError)return e=e||"",u.ActiveAjaxCount++,u.PerformAjaxExNodeJS(e,t,r,n,a);u.gotNextMessagesError({status:u.FailAllError},"error",null,[e,t,r,n,a])},u.pendingAjaxCall=[],u.PerformAjaxExNodeJS=function(e,t,r,n,a){u.PerformAjaxExNodeJS2(e,t,r,n,a,3)},u.PerformAjaxExNodeJS2=function(e,t,r,n,a,o){if(o<=0||0!=u.FailAllError)return u.ActiveAjaxCount--,999!=u.FailAllError&&u.gotNextMessages(null,"error",{status:0==u.FailAllError?408:u.FailAllError},[e,t,r,n,a]),void u.PerformNextAjax();u.pendingAjaxCall.push([e,t,r,n,a,o]),0==u.socketState?u.xxConnectHttpSocket():2==u.socketState&&u.sendRequest(e,n,a)},u.sendRequest=function(e,t,r){var n=(r=r||"POST")+" "+(t=t||"/wsman")+" HTTP/1.1\r\n";if(null!=u.challengeParams){var a=hex_md5(hex_md5(u.user+":"+u.challengeParams.realm+":"+u.pass)+":"+u.challengeParams.nonce+":"+u.noncecounter+":"+u.cnonce+":"+u.challengeParams.qop+":"+hex_md5(r+":"+t+("auth-int"==u.challengeParams.qop?":"+hex_md5(e):"")));n+="Authorization: "+u.renderDigest({username:u.user,realm:u.challengeParams.realm,nonce:u.challengeParams.nonce,uri:t,qop:u.challengeParams.qop,response:a,nc:u.noncecounter++,cnonce:u.cnonce})+"\r\n"}!function(e){if(2==u.socketState&&null!=u.socket&&u.socket.readyState==WebSocket.OPEN){for(var t=new Uint8Array(e.length),r=0;r