Small fixes

Ylian Saint-Hilaire committed Oct 3, 2018 at 12:03 UTC 6f87d8aaaf4f05aa3d563b1a5d12273ffb559b44
3 files changed +229 -220
package.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "name": "meshcentral",
3 - "version": "0.2.2-b",
3 + "version": "0.2.2-c",
4 "keywords": [
5 "Remote Management",
6 "Intel AMT",
public/commander.htm
+226 -217
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;}label{display:block;color:windowtext;background-color:window;margin:0;padding:0;width:100%;}label:hover{background-color:highlight;color:highlighttext;}a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,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");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,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");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}</style><body onunload="cleanup()"><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Connect onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Disconnected</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>System Status</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware Information</a><p id=go6 class=nav1 onclick=go(6)><a>Event Log</a><p id=go15 class=nav1 onclick=go(15)><a>Audit Log</a><p id=go21 class=nav1 onclick=go(21)><a>Storage</a><p id=go8 class=nav1 onclick=go(8)><a>Network Settings</a><p id=go17 class=nav1 onclick=go(17)><a>Internet Settings</a><p id=go16 class=nav1 onclick=go(16)><a>Security Settings</a><p id=go19 class=nav1 onclick=go(19)><a>Agent Presence</a><p id=go18 class=nav1 onclick=go(18)><a>System Defense</a><p id=go11 class=nav1 onclick=go(11)><a>User Accounts</a><p id=go22 class=nav1 onclick=go(22)><a>Subscriptions</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go20 class=nav1 onclick=go(20)><a>Script Editor</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN Browser</a></div><div id=8 class=maincell><div id=9 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;overflow:hidden><div style=float:right><input type=button value="Stop Script" onclick=script_Stop()></div><div style=font-size:16px;padding-top:2px;overflow:hidden>&nbsp;<b>Running Script</b><span style=overflow:hidden id=10></span></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px onclick="QV(11, false)"><b>X</b></div><div style=font-size:14px;padding-top:2px>&nbsp;<b>This computer's firmware should be updated,<a style=cursor:pointer onclick="require('nw.gui').Shell.openExternal('https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&languageid=en-fr')"><u>please check here</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Loading...</h1></div><div id=p1 style=display:none><h1>System Status</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware Information</h1><span id=16></span></div><div id=p6 style=display:none><h1>Event Log</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Network Settings</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>User Accounts</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN Browser</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Query style=margin:4px onclick=wsmanQuery()><input type=button value=Clear style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p15 style=display:none><span id=25></span><h1>Audit Log</h1><span id=26></span></div><div id=p16 style=display:none><h1>Security Settings</h1><span id=27></span></div><div id=p17 style=display:none><h1>Internet Settings</h1><span id=28></span></div><div id=p18 style=display:none><h1>System Defense</h1><span id=29></span></div><div id=p19 style=display:none><h1>Agent Presence</h1><span id=30></span></div><div id=p20 style=display:none><h1>Script Editor</h1><div class=log1 style=padding:5px;border-radius:5px><div id=EditScriptStatus style=float:right;font-weight:bold;padding:5px>Stopped</div><div><input type=button value="View Editor" title="Switch to script line editor view" id=viewEditorButton onclick=scriptViewButton(0)><input type=button value="View Builder" title="Switch to block editor view" id=viewBuilderButton onclick=scriptViewButton(1)><input type=button value=New... title="Clear the script editor" onclick=script_newScriptDlg()><input type=button value=Load... title="Load a script from file" onclick=script_runScriptDlg()><input type=button value=Save... title="Save a script to file" onclick=script_saveScript(event)><input type=button value=Restart title="Compile the script and get ready to run it from the start" onclick=resetScriptButton()><input type=button value=Continue title="Run the script from the current execution point" onclick=runScriptButton()><input type=button value=Break title="Pause the execution of the script" onclick=breakScriptButton()><input type=button value=Step title="Execute one step of the script" onclick=stepScriptButton()></div></div><div id=scriptbuilder style=display:none><h2>Script Builder</h2><div style=padding:0;margin:0><div style=width:250px;height:400px;float:left;padding:0;margin:0;padding-right:3px><input id=blockfilter style="width:inherit;height:24px;padding:0;margin:0;border:1px solid gray;margin-bottom:1px" placeholder="Filter blocks..." onkeyup=script_fonfilterchanged()><div id=blocks style="width:inherit;height:373px;border:1px solid gray;overflow-y:scroll;padding:0;margin:0"></div></div><div id=scriptblocks style="width:auto;height:400px;padding:0;margin:0;border:1px solid gray;overflow-y:scroll" ondrop="script_fondrop(event, this)" onclick=script_fonclick(event)></div></div></div><div id=scripteditor><h2>Script</h2><textarea id=scriptarea style=width:100%;height:176px;resize:vertical;margin:0;padding:0;font-family:Arial,Helvetica,sans-serif spellcheck="false"></textarea><div style=display:none><br><h2>Compiled Script</h2><textarea id=compiledarea style=width:100%;height:16px;resize:vertical;margin:0;padding:0 spellcheck="false"></textarea><br></div><h2>Variables</h2><div id=variables style="width:100%;height:200px;resize:vertical;border:1px solid gray;overflow:scroll;margin:0;padding:0;user-select:text;-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text"></div></div><h2>Console</h2><textarea id=console style=width:100%;height:80px;resize:vertical;margin:0;padding:0;user-select:text;-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text readonly=""></textarea></div><div id=p21 style=display:none><h1>Storage</h1><span id=31></span></div><div id=p22 style=display:none><h1>Event Subscriptions</h1><span id=32></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=33></span></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:auto;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=34 style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=35 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=36 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Username</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Password*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirm Password</div></div><div id=37><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Network<option value=2>Any</select><div>Permission</div></div><div>Granted Permissions</div><ul id=38 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>*Minimum 8 characters with upper, lowercase, 0-9, and one of !@#$%^&amp;*()+-</div></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Power Action</div></div><div><span style=color:red>Warning:</span>Some power actions may result in data loss and may disconnect the desktop, terminal or disk redirection sessions.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="return numbersOnly(event)"><div>Consent Code</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primary display<option value=1>Secondary display<option id=d6ThirdDisplay value=2 style=display:none>Third display</select><div>Consent Display</div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c1 value=admin style=float:right;width:220px><div style=height:20px>Username</div></div><div style="margin:3px 0 3px 0"><input id=c2 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Password</div></div></div><div id=dialog9 style=margin:auto;margin:3px><input type=checkbox id=c3>Redirection Port<br><div id=c4><input type=checkbox id=c5>KVM Remote Desktop<br></div><input type=checkbox id=c6>IDE-Redirection<br><input type=checkbox id=c7>Serial-over-LAN<br></div><div id=dialog10 style=margin:auto;margin:3px><input type=radio name=d10 id=c8 value=0>Not Required<br><input type=radio name=d10 id=c9 value=1>Required for KVM only<br><input type=radio name=d10 id=c10 value=4294967295>Always Required<br></div><div id=dialog11 style=margin:auto;margin:3px><div id=39></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c11 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">Profile Name</div></div><div style=height:26px><input id=c12 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">SSID</div></div><div style=height:26px><select id=c13 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priority</div></div><div style=height:26px><select id=c14 style=float:right;width:200px onclick=updateWifiDialog()><option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Authentication</div></div><div style=height:26px><select id=c15 style=float:right;width:200px onclick=updateWifiDialog()><option id=40 value=4>CCMP-AES<option id=41 value=3>TKIP-RC4<option id=42 value=2>WEP<option id=43 value=5>None</select><div>Encryption</div></div><div style=height:26px><input id=c16 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Length between 8 and 63 characters"><div title="Length between 8 and 63 characters">Password*</div></div><div style=height:26px><input id=c17 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Length between 8 and 63 characters"><div title="Length between 8 and 63 characters">Confirm Password</div></div></div><div id=dialog19 style=margin:auto;margin:3px>This will save the entire state of Intel&reg; AMT for this machine into file. Passwords will not be saved, but some sensitive data may be included.<br><br><input id=c18 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Disabled<br><input type=radio name=d20 id=d20b value=1>ICMP response<br><input type=radio name=d20 id=d20c value=2>RMCP response<br><input type=radio name=d20 id=d20d value=3>ICMP & RMCP response<br><br></div><div id=dialog21 style=margin:auto;margin:3px><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span><br><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span><br><div id=44><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span><br><br><div style=margin-left:20px><div style=height:26px><input id=c19 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP address</div></div><div style=height:26px id=45><input id=c20 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnet mark</div></div><div style=height:26px><input id=c21 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Gateway</div></div><div style=height:26px><input id=c22 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primary DNS</div></div><div style=height:26px><input id=c23 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternate DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c24 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Disabled<option value=1>Disabled, DHCP update<option value=2>Enabled</select><div>Dynamic DNS client</div></div><div style=height:26px><input id=c25 style=float:right;width:200px><div>Update Interval (minutes)</div></div><div style=height:26px><input id=c26 style=float:right;width:200px><div>TTL (seconds)</div></div><div style=font-size:10px><br>Defaut Interval is 1440 minutes, Default TTL is 900 seconds.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c27 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Power up<option value=5>Power cycle<option value=8>Power down<option value=10>Reset<option value=999>Set boot options</select><div>Remote Command</div></div><div style=height:80px><div id=c28 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pause<br></div><div id=d24dBiosSetup><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS Setup<br></div><div id=d24dForceProgressEvents><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Force progress events<br></div><div id=d24dLockPowerButton><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Lock power button<br></div><div id=d24dLockResetButton><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Lock reset button<br></div><div id=d24dLockSleepButton><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Lock sleep button<br></div><div id=d24dLockKeyboard><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Lock keyboard<br></div><div id=d24dUserPasswordBypass><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS password bypass<br></div><div id=d24dReflashBios><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS<br></div><div id=d24dSafeMode><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Safe mode<br></div><div id=d24dUseIDER><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER<br></div><div id=d24dSerialOverLan><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN<br></div><div id=d24dSecureErase><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel&reg; Remote Secure Erase<br></div></div><div>Boot Settings</div></div><div style=height:26px><select id=c29 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>None<option value=1>Force CD/DVD Boot<option value=2>Force PXE Boot<option value=3>Force Hard Disk Boot<option value=4>Force Diagnostic Boot</select><div>Boot Source</div></div><div style=height:26px><select id=c30 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>None<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media Index</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c31 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Boot to floppy<option value=1>Boot to CDROM</select><div>IDER Boot Device</div></div><div style=height:26px><select id=c32 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>System Default<option id=c33 value=1>Quiet<option id=c34 value=2>Verbose<option id=c35 value=3>Blank Screen</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE Password</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Alarm name</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Wake date (year-month-day)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Wake time (hour:min:sec)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Interval (days-hours-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Keep alarm<option value=1>Delete on completion</select></div><div style=padding-top:4px>After wake</div></div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c36 type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c37 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c38 type=button value=Delete style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>String.prototype.startsWith||(String.prototype.startsWith=function(a){return 0===this.lastIndexOf(a,0)});String.prototype.endsWith||(String.prototype.endsWith=function(a){return-1!==this.indexOf(a,this.length-a.length)});function Q(a){return document.getElementById(a)}function QS(a){try{return Q(a).style}catch(b){}}function QE(a,b){try{Q(a).disabled=!b}catch(c){}}function QV(a,b){try{QS(a).display=b?"":"none"}catch(c){}}function QA(a,b){Q(a).innerHTML+=b}function QH(a,b){Q(a).innerHTML=b}
1 +<!DOCTYPE html><html style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;}label{display:block;color:windowtext;background-color:window;margin:0;padding:0;width:100%;}label:hover{background-color:highlight;color:highlighttext;}a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,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");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,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");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,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");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}</style><body onunload="cleanup()"><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Connect onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Disconnected</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>System Status</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware Information</a><p id=go6 class=nav1 onclick=go(6)><a>Event Log</a><p id=go15 class=nav1 onclick=go(15)><a>Audit Log</a><p id=go21 class=nav1 onclick=go(21)><a>Storage</a><p id=go8 class=nav1 onclick=go(8)><a>Network Settings</a><p id=go17 class=nav1 onclick=go(17)><a>Internet Settings</a><p id=go16 class=nav1 onclick=go(16)><a>Security Settings</a><p id=go19 class=nav1 onclick=go(19)><a>Agent Presence</a><p id=go18 class=nav1 onclick=go(18)><a>System Defense</a><p id=go11 class=nav1 onclick=go(11)><a>User Accounts</a><p id=go22 class=nav1 onclick=go(22)><a>Subscriptions</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go20 class=nav1 onclick=go(20)><a>Script Editor</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN Browser</a></div><div id=8 class=maincell><div id=9 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;overflow:hidden><div style=float:right><input type=button value="Stop Script" onclick=script_Stop()></div><div style=font-size:16px;padding-top:2px;overflow:hidden>&nbsp;<b>Running Script</b><span style=overflow:hidden id=10></span></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">&#x2716;</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>This computer's firmware should be updated,<a style=cursor:pointer onclick="require('nw.gui').Shell.openExternal('https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&languageid=en-fr')"><u>please check here</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Loading...</h1></div><div id=p1 style=display:none><h1>System Status</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware Information</h1><span id=16></span></div><div id=p6 style=display:none><h1>Event Log</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Network Settings</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>User Accounts</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN Browser</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Query style=margin:4px onclick=wsmanQuery()><input type=button value=Clear style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p15 style=display:none><span id=25></span><h1>Audit Log</h1><span id=26></span></div><div id=p16 style=display:none><h1>Security Settings</h1><span id=27></span></div><div id=p17 style=display:none><h1>Internet Settings</h1><span id=28></span></div><div id=p18 style=display:none><h1>System Defense</h1><span id=29></span></div><div id=p19 style=display:none><h1>Agent Presence</h1><span id=30></span></div><div id=p20 style=display:none><h1>Script Editor</h1><div class=log1 style=padding:5px;border-radius:5px><div id=EditScriptStatus style=float:right;font-weight:bold;padding:5px>Stopped</div><div><input type=button value="View Editor" title="Switch to script line editor view" id=viewEditorButton onclick=scriptViewButton(0)><input type=button value="View Builder" title="Switch to block editor view" id=viewBuilderButton onclick=scriptViewButton(1)><input type=button value=New... title="Clear the script editor" onclick=script_newScriptDlg()><input type=button value=Load... title="Load a script from file" onclick=script_runScriptDlg()><input type=button value=Save... title="Save a script to file" onclick=script_saveScript(event)><input type=button value=Restart title="Compile the script and get ready to run it from the start" onclick=resetScriptButton()><input type=button value=Continue title="Run the script from the current execution point" onclick=runScriptButton()><input type=button value=Break title="Pause the execution of the script" onclick=breakScriptButton()><input type=button value=Step title="Execute one step of the script" onclick=stepScriptButton()></div></div><div id=scriptbuilder style=display:none><h2>Script Builder</h2><div style=padding:0;margin:0><div style=width:250px;height:400px;float:left;padding:0;margin:0;padding-right:3px><input id=blockfilter style="width:inherit;height:24px;padding:0;margin:0;border:1px solid gray;margin-bottom:1px" placeholder="Filter blocks..." onkeyup=script_fonfilterchanged()><div id=blocks style="width:inherit;height:373px;border:1px solid gray;overflow-y:scroll;padding:0;margin:0"></div></div><div id=scriptblocks style="width:auto;height:400px;padding:0;margin:0;border:1px solid gray;overflow-y:scroll" ondrop="script_fondrop(event, this)" onclick=script_fonclick(event)></div></div></div><div id=scripteditor><h2>Script</h2><textarea id=scriptarea style=width:100%;height:176px;resize:vertical;margin:0;padding:0;font-family:Arial,Helvetica,sans-serif spellcheck="false"></textarea><div style=display:none><br><h2>Compiled Script</h2><textarea id=compiledarea style=width:100%;height:16px;resize:vertical;margin:0;padding:0 spellcheck="false"></textarea><br></div><h2>Variables</h2><div id=variables style="width:100%;height:200px;resize:vertical;border:1px solid gray;overflow:scroll;margin:0;padding:0;user-select:text;-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text"></div></div><h2>Console</h2><textarea id=console style=width:100%;height:80px;resize:vertical;margin:0;padding:0;user-select:text;-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text readonly=""></textarea></div><div id=p21 style=display:none><h1>Storage</h1><span id=31></span></div><div id=p22 style=display:none><h1>Event Subscriptions</h1><span id=32></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=33></span></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:auto;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=34 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>&#x2716;</div><div id=35 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=36 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Username</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Password*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirm Password</div></div><div id=37><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Network<option value=2>Any</select><div>Permission</div></div><div>Granted Permissions</div><ul id=38 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>*Minimum 8 characters with upper, lowercase, 0-9, and one of !@#$%^&amp;*()+-</div></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Power Action</div></div><div><span style=color:red>Warning:</span>Some power actions may result in data loss and may disconnect the desktop, terminal or disk redirection sessions.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="return numbersOnly(event)"><div>Consent Code</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primary display<option value=1>Secondary display<option id=d6ThirdDisplay value=2 style=display:none>Third display</select><div>Consent Display</div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c1 value=admin style=float:right;width:220px><div style=height:20px>Username</div></div><div style="margin:3px 0 3px 0"><input id=c2 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Password</div></div></div><div id=dialog9 style=margin:auto;margin:3px><input type=checkbox id=c3>Redirection Port<br><div id=c4><input type=checkbox id=c5>KVM Remote Desktop<br></div><input type=checkbox id=c6>IDE-Redirection<br><input type=checkbox id=c7>Serial-over-LAN<br></div><div id=dialog10 style=margin:auto;margin:3px><input type=radio name=d10 id=c8 value=0>Not Required<br><input type=radio name=d10 id=c9 value=1>Required for KVM only<br><input type=radio name=d10 id=c10 value=4294967295>Always Required<br></div><div id=dialog11 style=margin:auto;margin:3px><div id=39></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c11 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">Profile Name</div></div><div style=height:26px><input id=c12 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">SSID</div></div><div style=height:26px><select id=c13 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priority</div></div><div style=height:26px><select id=c14 style=float:right;width:200px onclick=updateWifiDialog()><option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Authentication</div></div><div style=height:26px><select id=c15 style=float:right;width:200px onclick=updateWifiDialog()><option id=40 value=4>CCMP-AES<option id=41 value=3>TKIP-RC4<option id=42 value=2>WEP<option id=43 value=5>None</select><div>Encryption</div></div><div style=height:26px><input id=c16 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Length between 8 and 63 characters"><div title="Length between 8 and 63 characters">Password*</div></div><div style=height:26px><input id=c17 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Length between 8 and 63 characters"><div title="Length between 8 and 63 characters">Confirm Password</div></div></div><div id=dialog19 style=margin:auto;margin:3px>This will save the entire state of Intel&reg; AMT for this machine into file. Passwords will not be saved, but some sensitive data may be included.<br><br><input id=c18 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Disabled<br><input type=radio name=d20 id=d20b value=1>ICMP response<br><input type=radio name=d20 id=d20c value=2>RMCP response<br><input type=radio name=d20 id=d20d value=3>ICMP & RMCP response<br><br></div><div id=dialog21 style=margin:auto;margin:3px><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span><br><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span><br><div id=44><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span><br><br><div style=margin-left:20px><div style=height:26px><input id=c19 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP address</div></div><div style=height:26px id=45><input id=c20 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnet mark</div></div><div style=height:26px><input id=c21 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Gateway</div></div><div style=height:26px><input id=c22 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primary DNS</div></div><div style=height:26px><input id=c23 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternate DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c24 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Disabled<option value=1>Disabled, DHCP update<option value=2>Enabled</select><div>Dynamic DNS client</div></div><div style=height:26px><input id=c25 style=float:right;width:200px><div>Update Interval (minutes)</div></div><div style=height:26px><input id=c26 style=float:right;width:200px><div>TTL (seconds)</div></div><div style=font-size:10px><br>Defaut Interval is 1440 minutes, Default TTL is 900 seconds.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c27 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Power up<option value=5>Power cycle<option value=8>Power down<option value=10>Reset<option value=999>Set boot options</select><div>Remote Command</div></div><div style=height:80px><div id=c28 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pause<br></div><div id=d24dBiosSetup><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS Setup<br></div><div id=d24dForceProgressEvents><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Force progress events<br></div><div id=d24dLockPowerButton><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Lock power button<br></div><div id=d24dLockResetButton><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Lock reset button<br></div><div id=d24dLockSleepButton><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Lock sleep button<br></div><div id=d24dLockKeyboard><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Lock keyboard<br></div><div id=d24dUserPasswordBypass><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS password bypass<br></div><div id=d24dReflashBios><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS<br></div><div id=d24dSafeMode><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Safe mode<br></div><div id=d24dUseIDER><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER<br></div><div id=d24dSerialOverLan><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN<br></div><div id=d24dSecureErase><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel&reg; Remote Secure Erase<br></div></div><div>Boot Settings</div></div><div style=height:26px><select id=c29 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>None<option value=1>Force CD/DVD Boot<option value=2>Force PXE Boot<option value=3>Force Hard Disk Boot<option value=4>Force Diagnostic Boot</select><div>Boot Source</div></div><div style=height:26px><select id=c30 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>None<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media Index</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c31 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Boot to floppy<option value=1>Boot to CDROM</select><div>IDER Boot Device</div></div><div style=height:26px><select id=c32 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>System Default<option id=c33 value=1>Quiet<option id=c34 value=2>Verbose<option id=c35 value=3>Blank Screen</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE Password</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Alarm name</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Wake date (year-month-day)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Wake time (hour:min:sec)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Interval (days-hours-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Keep alarm<option value=1>Delete on completion</select></div><div style=padding-top:4px>After wake</div></div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c36 type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c37 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c38 type=button value=Delete style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>String.prototype.startsWith||(String.prototype.startsWith=function(a){return 0===this.lastIndexOf(a,0)});String.prototype.endsWith||(String.prototype.endsWith=function(a){return-1!==this.indexOf(a,this.length-a.length)});function Q(a){return document.getElementById(a)}function QS(a){try{return Q(a).style}catch(b){}}function QE(a,b){try{Q(a).disabled=!b}catch(c){}}function QV(a,b){try{QS(a).display=b?"":"none"}catch(c){}}function QA(a,b){Q(a).innerHTML+=b}function QH(a,b){Q(a).innerHTML=b}
2 function inputBoxFocus(a){Q(a).focus();var b=Q(a).value;Q(a).value="";Q(a).value=b}function ReadShort(a,b){return(a.charCodeAt(b)<<8)+a.charCodeAt(b+1)}function ReadShortX(a,b){return(a.charCodeAt(b+1)<<8)+a.charCodeAt(b)}function ReadInt(a,b){return 16777216*a.charCodeAt(b)+(a.charCodeAt(b+1)<<16)+(a.charCodeAt(b+2)<<8)+a.charCodeAt(b+3)}function ReadSInt(a,b){return(a.charCodeAt(b)<<24)+(a.charCodeAt(b+1)<<16)+(a.charCodeAt(b+2)<<8)+a.charCodeAt(b+3)}
3 function ReadIntX(a,b){return 16777216*a.charCodeAt(b+3)+(a.charCodeAt(b+2)<<16)+(a.charCodeAt(b+1)<<8)+a.charCodeAt(b)}function ShortToStr(a){return String.fromCharCode(a>>8&255,a&255)}function ShortToStrX(a){return String.fromCharCode(a&255,a>>8&255)}function IntToStr(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function IntToStrX(a){return String.fromCharCode(a&255,a>>8&255,a>>16&255,a>>24&255)}function MakeToArray(a){return a&&null!=a&&"object"!=typeof a?[a]:a}
4 function SplitArray(a){return a.split(",")}function Clone(a){return JSON.parse(JSON.stringify(a))}function EscapeHtml(a){if("string"==typeof a)return a.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;");if("boolean"==typeof a||"number"==typeof a)return a}function ArrayElementMove(a,b,c){a.splice(c,0,a.splice(b,1)[0])}
@@ -25,8 +25,8 @@ d.readAsArrayBuffer(a.data);else{d="";a=new Uint8Array(a.data);for(var f=a.byteL
25 console.log("REDIR-RECV("+b.amtaccumulator.length+"): "+rstr2hex(b.amtaccumulator));1<=b.amtaccumulator.length;){a=0;switch(b.amtaccumulator.charCodeAt(0)){case 17:if(4>b.amtaccumulator.length)return;switch(b.amtaccumulator.charCodeAt(1)){case 0:if(13>b.amtaccumulator.length)return;d=b.amtaccumulator.charCodeAt(12);if(b.amtaccumulator.length<13+d)return;b.xxSend(String.fromCharCode(19,0,0,0,0,0,0,0,0));a=13+d;break;default:b.Stop()}break;case 20:if(9>b.amtaccumulator.length)return;var p=ReadIntX(b.amtaccumulator,
26 5);if(b.amtaccumulator.length<9+p)return;var n=b.amtaccumulator.charCodeAt(1),d=b.amtaccumulator.charCodeAt(4),r=[];for(a=0;a<p;a++)r.push(b.amtaccumulator.charCodeAt(9+a));f=b.amtaccumulator.substring(9,9+p);a=9+p;if(0==d)0<=r.indexOf(4)?b.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(b.user.length+b.authuri.length+8)+String.fromCharCode(b.user.length)+b.user+String.fromCharCode(0,0)+String.fromCharCode(b.authuri.length)+b.authuri+String.fromCharCode(0,0,0,0)):0<=r.indexOf(3)?b.xxSend(String.fromCharCode(19,
27 0,0,0,3)+IntToStrX(b.user.length+b.authuri.length+7)+String.fromCharCode(b.user.length)+b.user+String.fromCharCode(0,0)+String.fromCharCode(b.authuri.length)+b.authuri+String.fromCharCode(0,0,0)):0<=r.indexOf(1)?b.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(b.user.length+b.pass.length+2)+String.fromCharCode(b.user.length)+b.user+String.fromCharCode(b.pass.length)+b.pass):b.Stop();else if(3!=d&&4!=d||1!=n)0==n?(1==b.protocol&&b.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(b.amtsequence++)+ShortToStrX(1E4)+
28 -ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0)),2==b.protocol&&b.xxSend(String.fromCharCode(64,0,0,0,0,0,0,0)),3==b.protocol&&(b.connectstate=1,b.xxStateChange(3))):b.Stop();else{var p=0,r=f.charCodeAt(p),n=f.substring(p+1,p+1+r),p=p+(r+1),l=f.charCodeAt(p),r=f.substring(p+1,p+1+l),p=p+(l+1),l=0,l=null,k=b.xxRandomNonce(32),u="";4==d&&(l=f.charCodeAt(p),l=f.substring(p+1,p+1+l),u="00000002:"+k+":"+l+":");f=hex_md5(hex_md5(b.user+":"+n+":"+b.pass)+":"+
29 -r+":"+u+hex_md5("POST:"+b.authuri));p=b.user.length+n.length+r.length+b.authuri.length+k.length+8+f.length+7;4==d&&(p+=l.length+1);f=String.fromCharCode(19,0,0,0,d)+IntToStrX(p)+String.fromCharCode(b.user.length)+b.user+String.fromCharCode(n.length)+n+String.fromCharCode(r.length)+r+String.fromCharCode(b.authuri.length)+b.authuri+String.fromCharCode(k.length)+k+String.fromCharCode(8)+"00000002"+String.fromCharCode(f.length)+f;4==d&&(f+=String.fromCharCode(l.length)+l);b.xxSend(f)}break;case 33:if(23>
28 +ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0)),2==b.protocol&&b.xxSend(String.fromCharCode(64,0,0,0,0,0,0,0)),3==b.protocol&&(b.connectstate=1,b.xxStateChange(3))):b.Stop();else{var p=0,r=f.charCodeAt(p),n=f.substring(p+1,p+1+r),p=p+(r+1),l=f.charCodeAt(p),r=f.substring(p+1,p+1+l),p=p+(l+1),l=0,l=null,k=b.xxRandomNonce(32),v="";4==d&&(l=f.charCodeAt(p),l=f.substring(p+1,p+1+l),v="00000002:"+k+":"+l+":");f=hex_md5(hex_md5(b.user+":"+n+":"+b.pass)+":"+
29 +r+":"+v+hex_md5("POST:"+b.authuri));p=b.user.length+n.length+r.length+b.authuri.length+k.length+8+f.length+7;4==d&&(p+=l.length+1);f=String.fromCharCode(19,0,0,0,d)+IntToStrX(p)+String.fromCharCode(b.user.length)+b.user+String.fromCharCode(n.length)+n+String.fromCharCode(r.length)+r+String.fromCharCode(b.authuri.length)+b.authuri+String.fromCharCode(k.length)+k+String.fromCharCode(8)+"00000002"+String.fromCharCode(f.length)+f;4==d&&(f+=String.fromCharCode(l.length)+l);b.xxSend(f)}break;case 33:if(23>
30 b.amtaccumulator.length)break;a=23;b.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(b.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==b.protocol&&(b.amtkeepalivetimer=setInterval(b.xxSendAmtKeepAlive,2E3));b.connectstate=1;b.xxStateChange(3);break;case 41:if(10>b.amtaccumulator.length)break;a=10;break;case 42:if(10>b.amtaccumulator.length)break;d=10+((b.amtaccumulator.charCodeAt(9)&255)<<8)+(b.amtaccumulator.charCodeAt(8)&255);if(b.amtaccumulator.length<d)break;b.m.ProcessData(b.amtaccumulator.substring(10,
31 d));a=d;break;case 43:if(8>b.amtaccumulator.length)break;a=8;break;case 65:if(8>b.amtaccumulator.length)break;b.connectstate=1;b.m.Start();8<b.amtaccumulator.length&&b.m.ProcessData(b.amtaccumulator.substring(8));a=b.amtaccumulator.length;break;default:console.log("Unknown Intel AMT command: "+b.amtaccumulator.charCodeAt(0)+" acclen="+b.amtaccumulator.length);b.Stop();return}if(0==a)break;b.amtaccumulator=b.amtaccumulator.substring(a)}}};b.xxSend=function(a){urlvars&&urlvars.redirtrace&&console.log("REDIR-SEND("+
32 a.length+"): "+rstr2hex(a));if(null!=b.socket&&b.socket.readyState==WebSocket.OPEN){for(var d=new Uint8Array(a.length),f=0;f<a.length;++f)d[f]=a.charCodeAt(f);b.socket.send(d.buffer)}};b.Send=function(a){null!=b.socket&&1==b.connectstate&&(1==b.protocol?b.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(b.amtsequence++)+ShortToStrX(a.length)+a):b.xxSend(a))};b.xxSendAmtKeepAlive=function(){null!=b.socket&&b.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(b.amtsequence++))};b.xxRandomNonceX="abcdef0123456789";
@@ -35,44 +35,44 @@ b.amtkeepalivetimer&&(clearInterval(b.amtkeepalivetimer),b.amtkeepalivetimer=nul
35 c&&(c=!1);parseInt(c)+""===c&&(c=parseInt(c));var g=c;if(null!=h.attributes&&0<h.attributes.length)for(g={Value:c},c=0;c<h.attributes.length;c++)g["@"+h.attributes[c].name]=h.attributes[c].value;b[h.localName]instanceof Array?b[h.localName].push(g):b[h.localName]=null==b[h.localName]?g:[b[h.localName],g]}return b}function r(a){if(!a)return"";var c=" ",b;for(b in a)a.hasOwnProperty(b)&&0===b.indexOf("@")&&(c+=b.substring(1)+'="'+a[b]+'" ');return c}function l(a){if(!a)return"";if("string"==typeof a)return a;
36 if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var c="<w:SelectorSet>",b;for(b in a)if(a.hasOwnProperty(b)){c+='<w:Selector Name="'+b+'">';if(a[b].ReferenceParameters){var c=c+"<a:EndpointReference>",c=c+("<a:Address>"+a[b].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[b].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),l=a[b].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(l))for(var h=
37 0;h<l.length;h++)c+="<w:Selector"+r(l[h])+">"+l[h].Value+"</w:Selector>";else c+="<w:Selector"+r(l)+">"+l.Value+"</w:Selector>";c+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else c+=a[b];c+="</w:Selector>"}return c+"</w:SelectorSet>"}var k={NextMessageId:1,Address:"/wsman"};k.comm=CreateWsmanComm(a,b,c,d,f,n);k.PerformAjax=function(a,c,b,l,h){null==h&&(h="");k.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+
38 -h+"><Header><a:Action>"+a,function(a,b,l){200!=b?c(k,null,{Header:{HttpError:b}},b,l):(a=k.ParseWsman(a))&&null!=a?c(k,a.Header.ResourceURI,a,200,l):c(k,null,{Header:{HttpError:b}},601,l)},b,l)};k.CancelAllQueries=function(a){k.comm.CancelAllQueries(a)};k.GetNameFromUrl=function(a){var c=a.lastIndexOf("/");return-1==c?a:a.substring(c+1)};k.ExecSubscribe=function(a,c,b,d,h,g,E,m,D,y){var w="",F="";m="";null!=D&&null!=y&&(w='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
39 -D+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+y+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",F='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=m&&(m="<a:ReferenceParameters><m:arg>"+m+"</m:arg></a:ReferenceParameters>");"PushWithAck"==c?c="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==c&&(c="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
40 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+l(E)+w+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+c+'"><e:NotifyTo><a:Address>'+b+"</a:Address>"+m+"</e:NotifyTo>"+F+"</e:Delivery></e:Subscribe>";k.PerformAjax(a+"</Body></Envelope>",d,h,
38 +h+"><Header><a:Action>"+a,function(a,b,l){200!=b?c(k,null,{Header:{HttpError:b}},b,l):(a=k.ParseWsman(a))&&null!=a?c(k,a.Header.ResourceURI,a,200,l):c(k,null,{Header:{HttpError:b}},601,l)},b,l)};k.CancelAllQueries=function(a){k.comm.CancelAllQueries(a)};k.GetNameFromUrl=function(a){var c=a.lastIndexOf("/");return-1==c?a:a.substring(c+1)};k.ExecSubscribe=function(a,c,b,d,h,g,D,m,E,x){var w="",F="";m="";null!=E&&null!=x&&(w='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
39 +E+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+x+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",F='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=m&&(m="<a:ReferenceParameters><m:arg>"+m+"</m:arg></a:ReferenceParameters>");"PushWithAck"==c?c="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==c&&(c="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
40 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+l(D)+w+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+c+'"><e:NotifyTo><a:Address>'+b+"</a:Address>"+m+"</e:NotifyTo>"+F+"</e:Delivery></e:Subscribe>";k.PerformAjax(a+"</Body></Envelope>",d,h,
41 g,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};k.ExecUnSubscribe=function(a,c,b,d,h){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+l(h)+"</Header><Body><e:Unsubscribe/>";k.PerformAjax(a+"</Body></Envelope>",c,b,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
42 -k.ExecPut=function(a,c,b,d,h,g){g="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+l(g)+"</Header><Body>";if(a&&null!=c){var E=k.GetNameFromUrl(a);a="<r:"+E+' xmlns:r="'+a+'">';for(var m in c)if(c.hasOwnProperty(m)&&
43 -0!==m.indexOf("__")&&0!==m.indexOf("@")&&null!=c[m]&&"function"!==typeof c[m])if("object"===typeof c[m]&&c[m].ReferenceParameters){a+="<r:"+m+"><a:Address>"+c[m].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+c[m].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var D=c[m].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(D))for(var y=0;y<D.length;y++)a+="<w:Selector"+r(D[y])+">"+D[y].Value+"</w:Selector>";else a+="<w:Selector"+r(D)+">"+D.Value+"</w:Selector>";
44 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+m+">"}else if(Array.isArray(c[m]))for(y=0;y<c[m].length;y++)a+="<r:"+m+">"+c[m][y].toString()+"</r:"+m+">";else a+="<r:"+m+">"+c[m].toString()+"</r:"+m+">";c=a+("</r:"+E+">")}else c="";k.PerformAjax(g+c+"</Body></Envelope>",b,d,h)};k.ExecCreate=function(a,c,b,d,h,g){var E=k.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +
45 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+l(g)+"</Header><Body><g:"+E+' xmlns:g="'+a+'">';for(var m in c)a+="<g:"+m+">"+c[m]+"</g:"+m+">";k.PerformAjax(a+"</g:"+E+"></Body></Envelope>",b,d,h)};k.ExecDelete=function(a,c,b,d,h){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +
42 +k.ExecPut=function(a,c,b,d,h,g){g="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+l(g)+"</Header><Body>";if(a&&null!=c){var D=k.GetNameFromUrl(a);a="<r:"+D+' xmlns:r="'+a+'">';for(var m in c)if(c.hasOwnProperty(m)&&
43 +0!==m.indexOf("__")&&0!==m.indexOf("@")&&null!=c[m]&&"function"!==typeof c[m])if("object"===typeof c[m]&&c[m].ReferenceParameters){a+="<r:"+m+"><a:Address>"+c[m].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+c[m].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var E=c[m].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(E))for(var x=0;x<E.length;x++)a+="<w:Selector"+r(E[x])+">"+E[x].Value+"</w:Selector>";else a+="<w:Selector"+r(E)+">"+E.Value+"</w:Selector>";
44 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+m+">"}else if(Array.isArray(c[m]))for(x=0;x<c[m].length;x++)a+="<r:"+m+">"+c[m][x].toString()+"</r:"+m+">";else a+="<r:"+m+">"+c[m].toString()+"</r:"+m+">";c=a+("</r:"+D+">")}else c="";k.PerformAjax(g+c+"</Body></Envelope>",b,d,h)};k.ExecCreate=function(a,c,b,d,h,g){var D=k.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +
45 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+l(g)+"</Header><Body><g:"+D+' xmlns:g="'+a+'">';for(var m in c)a+="<g:"+m+">"+c[m]+"</g:"+m+">";k.PerformAjax(a+"</g:"+D+"></Body></Envelope>",b,d,h)};k.ExecDelete=function(a,c,b,d,h){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +
46 "</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+l(c)+"</Header><Body /></Envelope>";k.PerformAjax(a,b,d,h)};k.ExecGet=function(a,c,b,l){k.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
47 -c,b,l)};k.ExecMethod=function(a,c,b,l,h,g,d){var m="",D;for(D in b)if(null!=b[D])if(Array.isArray(b[D]))for(var y in b[D])m+="<r:"+D+">"+b[D][y]+"</r:"+D+">";else m+="<r:"+D+">"+b[D]+"</r:"+D+">";k.ExecMethodXml(a,c,m,l,h,g,d)};k.ExecMethodXml=function(a,c,b,d,h,g,E){k.PerformAjax(a+"/"+c+"</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
48 -l(E)+"</Header><Body><r:"+c+'_INPUT xmlns:r="'+a+'">'+b+"</r:"+c+"_INPUT></Body></Envelope>",d,h,g)};k.ExecEnum=function(a,c,b,l){k.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
47 +c,b,l)};k.ExecMethod=function(a,c,b,l,h,g,d){var m="",E;for(E in b)if(null!=b[E])if(Array.isArray(b[E]))for(var x in b[E])m+="<r:"+E+">"+b[E][x]+"</r:"+E+">";else m+="<r:"+E+">"+b[E]+"</r:"+E+">";k.ExecMethodXml(a,c,m,l,h,g,d)};k.ExecMethodXml=function(a,c,b,d,h,g,D){k.PerformAjax(a+"/"+c+"</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
48 +l(D)+"</Header><Body><r:"+c+'_INPUT xmlns:r="'+a+'">'+b+"</r:"+c+"_INPUT></Body></Envelope>",d,h,g)};k.ExecEnum=function(a,c,b,l){k.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
49 c,b,l)};k.ExecPull=function(a,c,b,l,h){k.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+k.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+k.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+c+"</EnumerationContext></Pull></Body></Envelope>",
50 b,l,h)};k.ParseWsman=function(a){try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var b=new ActiveXObject("Microsoft.XMLDOM");b.async=!1;b.loadXML(c);a=b}}var c={Header:{}},l=a.getElementsByTagName("Header")[0],h;l||(l=a.getElementsByTagName("a:Header")[0]);if(!l)return null;for(b=0;b<l.childNodes.length;b++){var g=l.childNodes[b];c.Header[g.localName]=g.textContent}var d=a.getElementsByTagName("Body")[0];d||(d=a.getElementsByTagName("a:Body")[0]);
51 if(!d)return null;0<d.childNodes.length&&(h=d.childNodes[0].localName,h.indexOf("_OUTPUT")==h.length-7&&(h=h.substring(0,h.length-7)),c.Header.Method=h,c.Body=p(d.childNodes[0]));return c}catch(m){return console.log("Unable to parse XML: "+a),null}};return k};
52 -function AmtStackCreateService(a){function b(){var a=e.GetPendingActions();v<a&&(v=a);null!=e.onProcessChanged&&B!=a&&(B=a,e.onProcessChanged(a,v));0==a&&(v=0)}function c(a,c,b,l,g,h,x){200!=g?(b(e,a,null,g,h),f(1)):null!=c&&"EnumerateResponse"==c.Header.Method&&c.Body.EnumerationContext?e.wsman.ExecPull(l,c.Body.EnumerationContext,function(c,l,g,y){d(a,g,b,l,[],y,h,x)}):(b(e,a,null,603,h),f(1))}function d(a,c,l,g,h,m,x,k){if(200!=m)l(e,a,null,m,x),f(1);else if(null==c||"PullResponse"!=c.Header.Method)l(e,
53 -a,null,604,x),f(1);else{for(var u in c.Body.Items)if(c.Body.Items[u]instanceof Array)for(var v in c.Body.Items[u])"function"!=typeof c.Body.Items[u][v]&&h.push(c.Body.Items[u][v]);else"function"!=typeof c.Body.Items[u]&&h.push(c.Body.Items[u]);c.Body.EnumerationContext?e.wsman.ExecPull(g,c.Body.EnumerationContext,function(c,b,g,y){d(a,g,l,b,h,y,x,1)}):(f(1),l(e,a,h,m,x),b())}}function f(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?b():(a=e.PendingEnums.shift(),
54 -e.Enum(a[0],a[1],a[2]),f(0))}function n(a,c,l,g,h,d,x){e.PendingBatchOperations-=2;var m=c.shift(),k=e.Enum;"*"==m[0]&&(k=e.Get,m=m.substring(1));k(m,function(h,m,k,A,C){C[2][m]={response:null==k?null:k.Body,responses:k,status:A};0==C[1].length||401==A||1!=d&&200!=A&&400!=A?(e.PendingBatchOperations-=2*c.length,b(),l(e,a,C[2],A,g)):(b(),n(a,c,l,g,C[2],x))},[a,c,h],x);b()}function p(a){a.names.length<=a.current?a.callback(e,a.name,a.responses,200,a.tag):(e.wsman.ExecGet(e.CompleteName(a.names[a.current]),
55 -function(c,b,l,g){null==l||200!=g?a.callback(e,a.name,null,g,a.tag):(a.responses[l.Header.Method]=l,p(a))},a.pri),a.current++);b()}function r(a,c,b,g,h){if(200!=g||"0"!=b.Body.ReturnValue)h[0](e,null,h[2]);else e.AMT_MessageLog_GetRecords(b.Body.IterationIdentifier,390,l,h)}function l(a,c,b,g,h){if(200!=g||"0"!=b.Body.ReturnValue)h[0](e,null,h[2]);else{var d,x,m;c=h[2];g=new Date;var u=b.Body.RecordArray;"string"===typeof u&&(b.Body.RecordArray=[b.Body.RecordArray]);for(d in u){a=null;try{a=window.atob(u[d])}catch(v){}if(null!=
56 -a&&(x=ReadIntX(a,0),0<x&&4294967295>x)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),EventData:[],Time:new Date(1E3*(x+60*g.getTimezoneOffset()))};for(x=13;21>x;x++)m.EventData.push(a.charCodeAt(x));m.EntityStr=E[m.Entity];m.Desc=k(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);
52 +function AmtStackCreateService(a){function b(){var a=e.GetPendingActions();u<a&&(u=a);null!=e.onProcessChanged&&B!=a&&(B=a,e.onProcessChanged(a,u));0==a&&(u=0)}function c(a,c,b,l,g,h,y){200!=g?(b(e,a,null,g,h),f(1)):null!=c&&"EnumerateResponse"==c.Header.Method&&c.Body.EnumerationContext?e.wsman.ExecPull(l,c.Body.EnumerationContext,function(c,l,g,x){d(a,g,b,l,[],x,h,y)}):(b(e,a,null,603,h),f(1))}function d(a,c,l,g,h,m,y,k){if(200!=m)l(e,a,null,m,y),f(1);else if(null==c||"PullResponse"!=c.Header.Method)l(e,
53 +a,null,604,y),f(1);else{for(var v in c.Body.Items)if(c.Body.Items[v]instanceof Array)for(var u in c.Body.Items[v])"function"!=typeof c.Body.Items[v][u]&&h.push(c.Body.Items[v][u]);else"function"!=typeof c.Body.Items[v]&&h.push(c.Body.Items[v]);c.Body.EnumerationContext?e.wsman.ExecPull(g,c.Body.EnumerationContext,function(c,b,g,x){d(a,g,l,b,h,x,y,1)}):(f(1),l(e,a,h,m,y),b())}}function f(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?b():(a=e.PendingEnums.shift(),
54 +e.Enum(a[0],a[1],a[2]),f(0))}function n(a,c,l,g,h,d,y){e.PendingBatchOperations-=2;var m=c.shift(),k=e.Enum;"*"==m[0]&&(k=e.Get,m=m.substring(1));k(m,function(h,m,k,A,C){C[2][m]={response:null==k?null:k.Body,responses:k,status:A};0==C[1].length||401==A||1!=d&&200!=A&&400!=A?(e.PendingBatchOperations-=2*c.length,b(),l(e,a,C[2],A,g)):(b(),n(a,c,l,g,C[2],y))},[a,c,h],y);b()}function p(a){a.names.length<=a.current?a.callback(e,a.name,a.responses,200,a.tag):(e.wsman.ExecGet(e.CompleteName(a.names[a.current]),
55 +function(c,b,l,g){null==l||200!=g?a.callback(e,a.name,null,g,a.tag):(a.responses[l.Header.Method]=l,p(a))},a.pri),a.current++);b()}function r(a,c,b,g,h){if(200!=g||"0"!=b.Body.ReturnValue)h[0](e,null,h[2]);else e.AMT_MessageLog_GetRecords(b.Body.IterationIdentifier,390,l,h)}function l(a,c,b,g,h){if(200!=g||"0"!=b.Body.ReturnValue)h[0](e,null,h[2]);else{var d,y,m;c=h[2];g=new Date;var v=b.Body.RecordArray;"string"===typeof v&&(b.Body.RecordArray=[b.Body.RecordArray]);for(d in v){a=null;try{a=window.atob(v[d])}catch(u){}if(null!=
56 +a&&(y=ReadIntX(a,0),0<y&&4294967295>y)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),EventData:[],Time:new Date(1E3*(y+60*g.getTimezoneOffset()))};for(y=13;21>y;y++)m.EventData.push(a.charCodeAt(y));m.EntityStr=D[m.Entity];m.Desc=k(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);
57 m.EntityStr||(m.EntityStr="Unknown");c.push(m)}}if(1!=b.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(b.Body.IterationIdentifier,390,l,[h[0],c,h[2]]);else h[0](e,c,h[2])}}function k(a,c,b,l){if(15==a)return 235==b[0]?"Invalid Data":0==c?h[b[1]]:g[b[1]];if(18==a&&170==b[0])return"Agent watchdog "+char2hex(b[4])+char2hex(b[3])+char2hex(b[2])+char2hex(b[1])+"-"+char2hex(b[6])+char2hex(b[5])+"-... changed to "+e.WatchdogCurrentStates[b[7]];if(5==a&&0==c)return"Case intrusion";if(192==a&&0==c&&170==b[0]&&
58 48==b[1]){if(0==b[2])return"A remote Serial Over LAN session was established.";if(1==b[2])return"Remote Serial Over LAN session finished. User control was restored.";if(2==b[2])return"A remote IDE-Redirection session was established.";if(3==b[2])return"Remote IDE-Redirection session finished. User control was restored."}if(36==a)return a=(b[1]<<24)+(b[2]<<16)+(b[3]<<8)+b[4],c="#"+b[0],170==b[0]&&(c="wired"),4294967293==a?"All received packet filter was matched on "+c+" interface.":4294967292==a?"All outbound packet filter was matched on "+
59 c+" interface.":4294967290==a?"Spoofed packet filter was matched on "+c+" interface.":"Filter "+a+" was matched on "+c+" interface.";if(192==a)return 0==b[2]?"Security policy invoked. Some or all network traffic (TX) was stopped.":2==b[2]?"Security policy invoked. Some or all network traffic (RX) was stopped.":"Security policy invoked.";if(193==a){if(170==b[0]&&48==b[1]&&0==b[2]&&0==b[3])return"User request for remote connection.";if(170==b[0]&&32==b[1]&&3==b[2]&&1==b[3])return"EAC error: attempt to get posture while NAC in Intel\ufffd AMT is disabled.";
60 -if(170==b[0]&&32==b[1]&&4==b[2]&&0==b[3])return"Certificate revoked. "}return 6==a?"Authentication failed "+(b[1]+(b[2]<<8))+" times. The system may be under attack.":30==a?"No bootable media":32==a?"Operating system lockup or power interrupt":35==a?"System boot failure":37==a?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+a}function u(a,c,b,l,g){if(200!=l)g[0](e,[],l);else{var h,x,d=g[1],k=new Date,v;if(0<b.Body.RecordsReturned)for(x in b.Body.EventRecords=
61 -MakeToArray(b.Body.EventRecords),b.Body.EventRecords){a=null;try{a=window.atob(b.Body.EventRecords[x])}catch(B){console.log(B+" "+b.Body.EventRecords[x])}c={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};c.AuditApp=m[c.AuditAppID];c.Event=m[100*c.AuditAppID+c.EventID];c.Event||(c.Event="#"+c.EventID);0==c.InitiatorType&&(h=a.charCodeAt(5),c.Initiator=a.substring(6,6+h),h=6+h);1==c.InitiatorType&&(c.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),c.Initiator=GetSidString(a.substring(10,
62 -10+h)),h=10+h);2==c.InitiatorType&&(c.Initiator="<i>Local</i>",h=5);3==c.InitiatorType&&(c.Initiator="<i>KVM Default Port</i>",h=5);v=ReadInt(a,h);c.Time=new Date(1E3*(v+60*k.getTimezoneOffset()));h+=4;c.MCLocationType=a.charCodeAt(h++);v=a.charCodeAt(h++);c.NetAddress=a.substring(h,h+v);h+=v;v=a.charCodeAt(h++);c.Ex=a.substring(h,h+v);c.ExStr=e.GetAuditLogExtendedDataStr(100*c.AuditAppID+c.EventID,c.Ex);d.push(c)}if(b.Body.TotalRecordCount>d.length)e.AMT_AuditLog_ReadRecords(d.length+1,u,[g[0],d]);
63 -else g[0](e,d,l)}}var e={};e.wsman=a;e.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];e.PendingEnums=[];e.PendingBatchOperations=0;e.ActiveEnumsCount=0;e.MaxActiveEnumsCount=1;e.onProcessChanged=null;var v=0,B=0;e.GetPendingActions=function(){return 2*e.PendingEnums.length+e.ActiveEnumsCount+e.wsman.comm.PendingAjax.length+e.wsman.comm.ActiveAjaxCount+e.PendingBatchOperations};e.Subscribe=function(a,
64 -c,l,h,g,d,x,m,k,u){e.wsman.ExecSubscribe(e.CompleteName(a),c,l,function(c,l,w,x){b();h(e,a,w,x,g)},0,d,x,m,k,u);b()};e.UnSubscribe=function(a,c,l,h,g){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(h,g,d,m){b();c(e,a,d,m,l)},0,h,g);b()};e.Get=function(a,c,l,h){e.wsman.ExecGet(e.CompleteName(a),function(h,g,x,d){b();c(e,a,x,d,l)},0,h);b()};e.Put=function(a,c,l,h,g,d){e.wsman.ExecPut(e.CompleteName(a),c,function(c,g,d,m){b();l(e,a,d,m,h)},0,g,d);b()};e.Create=function(a,c,l,h,g){e.wsman.ExecCreate(e.CompleteName(a),
65 -c,function(c,g,d,m){b();l(e,a,d,m,h)},0,g);b()};e.Delete=function(a,c,l,h,g){e.wsman.ExecDelete(e.CompleteName(a),c,function(c,g,d,m){b();l(e,a,d,m,h)},0,g);b()};e.Exec=function(a,c,l,h,g,d,x){e.wsman.ExecMethod(e.CompleteName(a),c,l,function(c,l,w,x){b();h(e,a,e.CompleteExecResponse(w),x,g)},0,d,x);b()};e.ExecWithXml=function(a,c,l,h,g,d,x){e.wsman.ExecMethodXml(e.CompleteName(a),c,execArgumentsToXml(l),function(c,l,w,x){b();h(e,a,e.CompleteExecResponse(w),x,g)},0,d,x);b()};e.Enum=function(a,l,w,
60 +if(170==b[0]&&32==b[1]&&4==b[2]&&0==b[3])return"Certificate revoked. "}return 6==a?"Authentication failed "+(b[1]+(b[2]<<8))+" times. The system may be under attack.":30==a?"No bootable media":32==a?"Operating system lockup or power interrupt":35==a?"System boot failure":37==a?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+a}function v(a,c,b,l,g){if(200!=l)g[0](e,[],l);else{var h,y,d=g[1],k=new Date,u;if(0<b.Body.RecordsReturned)for(y in b.Body.EventRecords=
61 +MakeToArray(b.Body.EventRecords),b.Body.EventRecords){a=null;try{a=window.atob(b.Body.EventRecords[y])}catch(B){console.log(B+" "+b.Body.EventRecords[y])}c={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};c.AuditApp=m[c.AuditAppID];c.Event=m[100*c.AuditAppID+c.EventID];c.Event||(c.Event="#"+c.EventID);0==c.InitiatorType&&(h=a.charCodeAt(5),c.Initiator=a.substring(6,6+h),h=6+h);1==c.InitiatorType&&(c.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),c.Initiator=GetSidString(a.substring(10,
62 +10+h)),h=10+h);2==c.InitiatorType&&(c.Initiator="<i>Local</i>",h=5);3==c.InitiatorType&&(c.Initiator="<i>KVM Default Port</i>",h=5);u=ReadInt(a,h);c.Time=new Date(1E3*(u+60*k.getTimezoneOffset()));h+=4;c.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);c.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);c.Ex=a.substring(h,h+u);c.ExStr=e.GetAuditLogExtendedDataStr(100*c.AuditAppID+c.EventID,c.Ex);d.push(c)}if(b.Body.TotalRecordCount>d.length)e.AMT_AuditLog_ReadRecords(d.length+1,v,[g[0],d]);
63 +else g[0](e,d,l)}}var e={};e.wsman=a;e.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];e.PendingEnums=[];e.PendingBatchOperations=0;e.ActiveEnumsCount=0;e.MaxActiveEnumsCount=1;e.onProcessChanged=null;var u=0,B=0;e.GetPendingActions=function(){return 2*e.PendingEnums.length+e.ActiveEnumsCount+e.wsman.comm.PendingAjax.length+e.wsman.comm.ActiveAjaxCount+e.PendingBatchOperations};e.Subscribe=function(a,
64 +c,l,h,g,d,y,m,k,v){e.wsman.ExecSubscribe(e.CompleteName(a),c,l,function(c,l,w,y){b();h(e,a,w,y,g)},0,d,y,m,k,v);b()};e.UnSubscribe=function(a,c,l,h,g){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(h,g,d,m){b();c(e,a,d,m,l)},0,h,g);b()};e.Get=function(a,c,l,h){e.wsman.ExecGet(e.CompleteName(a),function(h,g,y,d){b();c(e,a,y,d,l)},0,h);b()};e.Put=function(a,c,l,h,g,d){e.wsman.ExecPut(e.CompleteName(a),c,function(c,g,d,m){b();l(e,a,d,m,h)},0,g,d);b()};e.Create=function(a,c,l,h,g){e.wsman.ExecCreate(e.CompleteName(a),
65 +c,function(c,g,d,m){b();l(e,a,d,m,h)},0,g);b()};e.Delete=function(a,c,l,h,g){e.wsman.ExecDelete(e.CompleteName(a),c,function(c,g,d,m){b();l(e,a,d,m,h)},0,g);b()};e.Exec=function(a,c,l,h,g,d,y){e.wsman.ExecMethod(e.CompleteName(a),c,l,function(c,l,w,d){b();h(e,a,e.CompleteExecResponse(w),d,g)},0,d,y);b()};e.ExecWithXml=function(a,c,l,h,g,d,y){e.wsman.ExecMethodXml(e.CompleteName(a),c,execArgumentsToXml(l),function(c,l,w,d){b();h(e,a,e.CompleteExecResponse(w),d,g)},0,d,y);b()};e.Enum=function(a,l,w,
66 h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(a),function(w,h,g,d,m){b();c(a,g,l,h,d,m)},w,h)):e.PendingEnums.push([a,l,w,h]);b()};e.BatchEnum=function(a,c,l,h,g,d){e.PendingBatchOperations+=2*c.length;n(a,Clone(c),l,h,{},g,d);b()};e.BatchGet=function(a,c,l,h,g){p({name:a,names:c,callback:l,current:0,responses:{},tag:h,pri:g});b()};e.CompleteName=function(a){if(0==a.indexOf("AMT_"))return e.pfx[0]+a;if(0==a.indexOf("CIM_"))return e.pfx[1]+a;if(0==
67 a.indexOf("IPS_"))return e.pfx[2]+a};e.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=e.AmtStatusToStr(a.Body.ReturnValue));return a};e.RequestPowerStateChange=function(a,c){e.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
68 null,null,c)};e.SetBootConfigRole=function(a,c){e.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
69 a,c)};e.CancelAllQueries=function(a){e.wsman.CancelAllQueries(a)};e.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){e.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};e.AMT_AgentPresenceWatchdog_AssertPresence=function(a,c){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},c)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,c){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},c)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,c,b,l,h,g,
70 -x,d,m){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:c,EventOnTransition:b,ActionSd:l,ActionEac:h},g,x,d,m)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,c,b,l){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,c,b,l)};e.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){e.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};e.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){e.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};e.AMT_AgentPresenceWatchdogVA_AssertPresence=
70 +d,m,k){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:c,EventOnTransition:b,ActionSd:l,ActionEac:h},g,d,m,k)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,c,b,l){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,c,b,l)};e.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){e.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};e.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){e.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};e.AMT_AgentPresenceWatchdogVA_AssertPresence=
71 function(a,c){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},c)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,c){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},c)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,c,b,l,h,g){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:c,EventOnTransition:b,ActionSd:l,ActionEac:h},g)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,c){e.Exec("AMT_AgentPresenceWatchdogVA",
72 "DeleteAllActions",{_method_dummy:a},c)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,c,b){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:c},b)};e.AMT_AuditLog_ReadRecords=function(a,c,b){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},c,b)};e.AMT_AuditLog_SetAuditLock=function(a,c,b,l){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:c,Handle:b},l)};e.AMT_AuditLog_ExportAuditLogSignature=
73 function(a,c){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},c)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,c,b,l,h){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:c,LengthOfCertificates:b,Certificates:l},h)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,c,b,l,h){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:c,EventID:b,PolicyType:l},h)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,c,b,l,h){e.Exec("AMT_AuditPolicyRule",
74 "SetAuditPolicyBulk",{Enable:a,AuditedAppID:c,EventID:b,PolicyType:l},h)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,c,b,l,h,g){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:c,KerberosUserSid:b,AccessPermission:l,Realms:h},g)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,c){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},c)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,c,b){e.Exec("AMT_AuthorizationService",
75 -"GetUserAclEntryEx",{Handle:a},c,b)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,c,b,l,h,g,x){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:c,DigestPassword:b,KerberosUserSid:l,AccessPermission:h,Realms:g},x)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,c){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},c)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,c,b){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
75 +"GetUserAclEntryEx",{Handle:a},c,b)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,c,b,l,h,g,d){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:c,DigestPassword:b,KerberosUserSid:l,AccessPermission:h,Realms:g},d)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,c){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},c)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,c,b){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
76 {Username:a,DigestPassword:c},b)};e.AMT_AuthorizationService_GetAdminAclEntry=function(a){e.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};e.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){e.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};e.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){e.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};e.AMT_AuthorizationService_SetAclEnabledState=function(a,c,b,l){e.Exec("AMT_AuthorizationService",
77 "SetAclEnabledState",{Handle:a,Enabled:c},b,l)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,c,b){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},c,b)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,c,b){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:c},b)};e.AMT_EndpointAccessControlService_GetPosture=function(a,c){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},c)};e.AMT_EndpointAccessControlService_GetPostureHash=
78 function(a,c){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},c)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,c){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},c)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,c,b){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
@@ -82,7 +82,7 @@ function(a,c,b){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,T
82 "PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:c,RecordNumber:b},l)};e.AMT_MessageLog_PositionToFirstRecord=function(a,c){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,c)};e.AMT_MessageLog_FreezeLog=function(a,c){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},c)};e.AMT_PublicKeyManagementService_AddCRL=function(a,c,b){e.Exec("AMT_PublicKeyManagementService","AddCRL",{Url:a,SerialNumbers:c},b)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,c){e.Exec("AMT_PublicKeyManagementService",
83 "ResetCRLList",{_method_dummy:a},c)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,c){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},c)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,c){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},c)};e.AMT_PublicKeyManagementService_AddKey=function(a,c){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},c)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=
84 function(a,c,b,l){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:c,Usage:b},l)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,c,b,l){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:c,NullSignedCertificateRequest:b},l)};e.AMT_PublicKeyManagementService_GenerateKeyPair=function(a,c,b){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:c},b)};e.AMT_RedirectionService_RequestStateChange=
85 -function(a,c){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},c)};e.AMT_RedirectionService_TerminateSession=function(a,c){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},c)};e.AMT_RemoteAccessService_AddMpServer=function(a,c,b,l,h,g,x,d,m){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:c,Port:b,AuthMethod:l,Certificate:h,Username:g,Password:x,CN:d},m)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,c,b,l,h){e.Exec("AMT_RemoteAccessService",
85 +function(a,c){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},c)};e.AMT_RedirectionService_TerminateSession=function(a,c){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},c)};e.AMT_RemoteAccessService_AddMpServer=function(a,c,b,l,h,g,d,m,k){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:c,Port:b,AuthMethod:l,Certificate:h,Username:g,Password:d,CN:m},k)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,c,b,l,h){e.Exec("AMT_RemoteAccessService",
86 "AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:c,ExtendedData:b,MpServer:l},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,c){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},c)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,c){e.Exec("AMT_SetupAndConfigurationService","CommitChanges",{_method_dummy:a},c)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,c){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},
87 c)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,c){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},c)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,c){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},c)};e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,c){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},c)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=
88 function(a,c){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},c)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,c,b){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:c},b)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=
@@ -104,18 +104,19 @@ c,b){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,Time
104 "KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,c,b){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:c},b)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog","Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,c){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},c)};e.CIM_Watchdog_OnlineDevice=function(a,c){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},c)};e.CIM_Watchdog_QuiesceDevice=function(a,c){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},c)};e.CIM_Watchdog_SaveProperties=
105 function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog","RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=function(a,c,b){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:c},b)};e.CIM_WiFiPort_SetPowerState=function(a,c,b){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:c},b)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,
106 c){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},c)};e.CIM_WiFiPort_OnlineDevice=function(a,c){e.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},c)};e.CIM_WiFiPort_QuiesceDevice=function(a,c){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},c)};e.CIM_WiFiPort_SaveProperties=function(a){e.Exec("CIM_WiFiPort","SaveProperties",{},a)};e.CIM_WiFiPort_RestoreProperties=function(a){e.Exec("CIM_WiFiPort","RestoreProperties",{},a)};e.CIM_WiFiPort_RequestStateChange=function(a,c,b){e.Exec("CIM_WiFiPort",
107 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:c},b)};e.IPS_HostBasedSetupService_Setup=function(a,c,b,l,h,g,x){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:c,McNonce:b,Certificate:l,SigningAlgorithm:h,DigitalSignature:g},x)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,c,b,l){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:c,IsRootCertificate:b},l)};e.IPS_HostBasedSetupService_AdminSetup=
107 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:c},b)};e.IPS_HostBasedSetupService_Setup=function(a,c,b,l,h,g,d){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:c,McNonce:b,Certificate:l,SigningAlgorithm:h,DigitalSignature:g},d)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,c,b,l){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:c,IsRootCertificate:b},l)};e.IPS_HostBasedSetupService_AdminSetup=
108 function(a,c,b,l,h,g){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:c,McNonce:b,SigningAlgorithm:l,DigitalSignature:h},g)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,c,b,l){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:c,DigitalSignature:b},l)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,c){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},
109 c)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){e.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,c){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},c)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=
110 function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,c){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},c)};e.IPS_OptInService_StartService=function(a){e.Exec("IPS_OptInService","StartService",{},a)};e.IPS_OptInService_StopService=function(a){e.Exec("IPS_OptInService","StopService",{},a)};e.IPS_OptInService_RequestStateChange=function(a,c,b){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:c},b)};e.IPS_ProvisioningRecordLog_RequestStateChange=
111 function(a,c,b){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:c},b)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,c){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},c)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,c,b){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:c},b)};e.IPS_SecIOService_RequestStateChange=function(a,c,b){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
112 -TimeoutPeriod:c},b)};e.AmtStatusToStr=function(a){return e.AmtStatusCodes[a]?e.AmtStatusCodes[a]:"UNKNOWN_ERROR"};e.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",
113 -15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",
114 -36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",
115 -2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",
116 -4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};e.GetMessageLog=function(a,c){e.AMT_MessageLog_PositionToFirstRecord(r,[a,c,[]])};var h="Unspecified.;No system memory is physically installed in the system.;No usable system memory, all installed memory has experienced an unrecoverable failure.;Unrecoverable hard-disk/ATAPI/IDE device failure.;Unrecoverable system-board failure.;Unrecoverable diskette subsystem failure.;Unrecoverable hard-disk controller failure.;Unrecoverable PS/2 or USB keyboard failure.;Removable boot media not found.;Unrecoverable video controller failure.;No video device detected.;Firmware (BIOS) ROM corruption detected.;CPU voltage mismatch (processors that share same supply have mismatched voltage requirements);CPU speed matching failure".split(";"),
112 +TimeoutPeriod:c},b)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,c,b,l,h){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:c,Port:b,NetworkDnsSuffix:l},h)};e.AmtStatusToStr=function(a){return e.AmtStatusCodes[a]?e.AmtStatusCodes[a]:"UNKNOWN_ERROR"};e.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
113 +9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
114 +30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
115 +1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
116 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};e.GetMessageLog=function(a,c){e.AMT_MessageLog_PositionToFirstRecord(r,
117 +[a,c,[]])};var h="Unspecified.;No system memory is physically installed in the system.;No usable system memory, all installed memory has experienced an unrecoverable failure.;Unrecoverable hard-disk/ATAPI/IDE device failure.;Unrecoverable system-board failure.;Unrecoverable diskette subsystem failure.;Unrecoverable hard-disk controller failure.;Unrecoverable PS/2 or USB keyboard failure.;Removable boot media not found.;Unrecoverable video controller failure.;No video device detected.;Firmware (BIOS) ROM corruption detected.;CPU voltage mismatch (processors that share same supply have mismatched voltage requirements);CPU speed matching failure".split(";"),
118 g="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;User-initiated system setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
118 -E="Unspecified;Other;Unknown;Processor;Disk;Peripheral;System management module;System board;Memory module;Processor module;Power supply;Add in card;Front panel board;Back panel board;Power system board;Drive backplane;System internal expansion board;Other system board;Processor board;Power unit;Power module;Power management board;Chassis back panel board;System chassis;Sub chassis;Other chassis board;Disk drive bay;Peripheral bay;Device bay;Fan cooling;Cooling unit;Cable interconnect;Memory device;System management software;BIOS;Intel(r) ME;System bus;Group;Intel(r) ME;External environment;Battery;Processing blade;Connectivity switch;Processor/memory module;I/O module;Processor I/O module;Management controller firmware;IPMI channel;PCI bus;PCI express bus;SCSI bus;SATA/SAS bus;Processor front side bus".split(";");
119 +D="Unspecified;Other;Unknown;Processor;Disk;Peripheral;System management module;System board;Memory module;Processor module;Power supply;Add in card;Front panel board;Back panel board;Power system board;Drive backplane;System internal expansion board;Other system board;Processor board;Power unit;Power module;Power management board;Chassis back panel board;System chassis;Sub chassis;Other chassis board;Disk drive bay;Peripheral bay;Device bay;Fan cooling;Cooling unit;Cable interconnect;Memory device;System management software;BIOS;Intel(r) ME;System bus;Group;Intel(r) ME;External environment;Battery;Processing blade;Connectivity switch;Processor/memory module;I/O module;Processor I/O module;Management controller firmware;IPMI channel;PCI bus;PCI express bus;SCSI bus;SATA/SAS bus;Processor front side bus".split(";");
120 e.RealmNames=";;Redirection;;Hardware Asset;Remote Control;Storage;Event Manager;Storage Admin;Agent Presence Local;Agent Presence Remote;Circuit Breaker;Network Time;General Information;Firmware Update;EIT;LocalUN;Endpoint Access Control;Endpoint Access Control Admin;Event Log Reader;Audit Log;ACL Realm;;;Local System".split(";");e.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var m={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",
121 20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",26:"Agent Presence Manager",27:"Wireless Configuration",28:"EAC",29:"KVM",30:"User Opt-In Events",32:"Screen Blanking",33:"Watchdog Events",1600:"Provisioning Started",1601:"Provisioning Completed",1602:"ACL Entry Added",1603:"ACL Entry Modified",1604:"ACL Entry Removed",1605:"ACL Access with Invalid Credentials",1606:"ACL Entry State",1607:"TLS State Changed",
122 1608:"TLS Server Certificate Set",1609:"TLS Server Certificate Remove",1610:"TLS Trusted Root Certificate Added",1611:"TLS Trusted Root Certificate Removed",1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Master Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",
@@ -124,18 +125,18 @@ e.RealmNames=";;Redirection;;Hardware Asset;Remote Control;Storage;Event Manager
125 2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",
126 2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3E3:"Opt-In Policy Change",3001:"Send Consent Code Event",3002:"Start Opt-In Blocked Event"};e.GetAuditLogExtendedDataStr=function(a,c){if((1602==a||1604==a)&&0==c.charCodeAt(0))return c.substring(2,2+c.charCodeAt(1));if(1603==a)return 0==c.charCodeAt(1)?c.substring(3):null;if(1605==a)return["Invalid ME access","Invalid MEBx access"][c.charCodeAt(0)];if(1606==a){var b=["Disabled","Enabled"][c.charCodeAt(0)];
127 0==c.charCodeAt(1)&&(b+=", "+c.substring(3));return b}return 1607==a?"Remote "+["NoAuth","ServerAuth","MutualAuth"][c.charCodeAt(0)]+", Local "+["NoAuth","ServerAuth","MutualAuth"][c.charCodeAt(1)]:1617==a?e.RealmNames[ReadInt(c,0)]+", "+["NoAuth","Auth","Disabled"][c.charCodeAt(4)]:1619==a?["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][c.charCodeAt(0)]:1900==a?"From "+ReadShort(c,0)+"."+ReadShort(c,2)+"."+ReadShort(c,4)+"."+ReadShort(c,6)+" to "+ReadShort(c,8)+"."+ReadShort(c,10)+"."+ReadShort(c,
127 -12)+"."+ReadShort(c,14):2100==a?(b=new Date,b.setTime(1E3*ReadInt(c,0)+6E4*(new Date).getTimezoneOffset()),b.toLocaleString()):3E3==a?"From "+["None","KVM","All"][c.charCodeAt(0)]+" to "+["None","KVM","All"][c.charCodeAt(1)]:3001==a?["Success","Failed 3 times"][c.charCodeAt(0)]:null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,u,[a,[]])};return e}function hex_md5(a){return forge.md.md5.create().update(a).digest().toHex()}function rstr_md5(a){return hex2rstr(hex_md5(a))}
128 +12)+"."+ReadShort(c,14):2100==a?(b=new Date,b.setTime(1E3*ReadInt(c,0)+6E4*(new Date).getTimezoneOffset()),b.toLocaleString()):3E3==a?"From "+["None","KVM","All"][c.charCodeAt(0)]+" to "+["None","KVM","All"][c.charCodeAt(1)]:3001==a?["Success","Failed 3 times"][c.charCodeAt(0)]:null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,v,[a,[]])};return e}function hex_md5(a){return forge.md.md5.create().update(a).digest().toHex()}function rstr_md5(a){return hex2rstr(hex_md5(a))}
129 function execArgumentsToXml(a){if(void 0===a||null===a)return null;var b="",c;for(c in a){var d=a[c];d&&(b="reference"===d.__parameterType?b+referenceToXml(c,d):b+instanceToXml(c,d))}return b}
130 function instanceToXml(a,b){if(void 0===b||null===b)return null;var c=!!b.__namespace,d=c?"<q:":"<",f=c?"</q:":"</",c="<r:"+a+(c?' xmlns:q="'+b.__namespace+'"':"")+">",n;for(n in b)b.hasOwnProperty(n)&&0!==n.indexOf("__")&&("function"===typeof b[n]||Array.isArray(b[n])||("object"===typeof b[n]?console.error("only convert one level down..."):c+=d+n+">"+b[n].toString()+f+n+">"));return c+("</r:"+a+">")}
131 function referenceToXml(a,b){if(void 0===b||null===b)return null;var c="<r:"+a+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+b.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in b)b.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof b[d]||"object"===typeof b[d]||Array.isArray(b[d])||(c+='<w:Selector Name="'+d+'">'+b[d].toString()+"</w:Selector>"));return c+("</w:SelectorSet></a:ReferenceParameters></r:"+a+">")}
132 function GetSidString(a){for(var b="S-"+a.charCodeAt(0)+"-"+a.charCodeAt(7),c=2;c<a.length/4;c++)b+="-"+ReadIntX(a,4*c);return b}
133 function GetSidByteArray(a){if(!a||null==a)return null;a=a.split("-");if(4>a.length||"s"!=a[0]&&"S"!=a[0])return null;for(var b=1;b<a.length;b++){var c=parseInt(a[b]);if(c!=a[b])return null;a[b]=c}c=String.fromCharCode(a[1])+String.fromCharCode(a.length-3)+ShortToStr(Math.floor(a[2]/Math.pow(2,32)))+IntToStr(a[2]&65535);for(b=3;b<a.length;b++)c+=IntToStrX(a[b]);return c}
133 -(function(a,b){"function"===typeof define&&define.amd?define([],b):a.forge=b()})(this,function(){var a,b,c;(function(d){function f(a,c){var b,l,h,g,w,d,e,k,u,v=c&&c.split("/"),B=m.map,E=B&&B["*"]||{};if(a&&"."===a.charAt(0))if(c){v=v.slice(0,v.length-1);a=a.split("/");w=a.length-1;m.nodeIdCompat&&F.test(a[w])&&(a[w]=a[w].replace(F,""));a=v.concat(a);for(w=0;w<a.length;w+=1)if(b=a[w],"."===b)a.splice(w,1),--w;else if(".."===b)if(1!==w||".."!==a[2]&&".."!==a[0])0<w&&(a.splice(w-1,2),w-=2);else break;
134 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((v||E)&&B){b=a.split("/");for(w=b.length;0<w;--w){l=b.slice(0,w).join("/");if(v)for(u=v.length;0<u;--u)if(h=B[v.slice(0,u).join("/")])if(h=h[l]){g=h;d=w;break}if(g)break;!e&&E&&E[l]&&(e=E[l],k=w)}!g&&e&&(g=e,d=k);g&&(b.splice(0,d,g),a=b.join("/"))}return a}function n(a,c){return function(){return v.apply(d,w.call(arguments,0).concat([a,c]))}}function p(a){return function(c){return f(c,a)}}function r(a){return function(c){g[a]=c}}function l(a){if(y.call(E,
135 -a)){var c=E[a];delete E[a];D[a]=!0;e.apply(d,c)}if(!y.call(g,a)&&!y.call(D,a))throw Error("No "+a);return g[a]}function k(a){var c,b=a?a.indexOf("!"):-1;-1<b&&(c=a.substring(0,b),a=a.substring(b+1,a.length));return[c,a]}function u(a){return function(){return m&&m.config&&m.config[a]||{}}}var e,v,B,h,g={},E={},m={},D={},y=Object.prototype.hasOwnProperty,w=[].slice,F=/\.js$/;B=function(a,c){var b,h=k(a),g=h[0];a=h[1];g&&(g=f(g,c),b=l(g));g?a=b&&b.normalize?b.normalize(a,p(c)):f(a,c):(a=f(a,c),h=k(a),
136 -g=h[0],a=h[1],g&&(b=l(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:b}};h={require:function(a){return n(a)},exports:function(a){var c=g[a];return"undefined"!==typeof c?c:g[a]={}},module:function(a){return{id:a,uri:"",exports:g[a],config:u(a)}}};e=function(a,c,b,w){var m,e,k,u,F=[];e=typeof b;var v;w=w||a;if("undefined"===e||"function"===e){c=!c.length&&b.length?["require","exports","module"]:c;for(u=0;u<c.length;u+=1)if(k=B(c[u],w),e=k.f,"require"===e)F[u]=h.require(a);else if("exports"===e)F[u]=h.exports(a),
137 -v=!0;else if("module"===e)m=F[u]=h.module(a);else if(y.call(g,e)||y.call(E,e)||y.call(D,e))F[u]=l(e);else if(k.p)k.p.load(k.n,n(w,!0),r(e),{}),F[u]=g[e];else throw Error(a+" missing "+e);c=b?b.apply(g[a],F):void 0;a&&(m&&m.exports!==d&&m.exports!==g[a]?g[a]=m.exports:c===d&&v||(g[a]=c))}else a&&(g[a]=b)};a=b=v=function(a,c,b,g,w){if("string"===typeof a)return h[a]?h[a](c):l(B(a,c).f);if(!a.splice){m=a;m.deps&&v(m.deps,m.callback);if(!c)return;c.splice?(a=c,c=b,b=null):a=d}c=c||function(){};"function"===
138 -typeof b&&(b=g,g=w);g?e(d,a,c,b):setTimeout(function(){e(d,a,c,b)},4);return v};v.config=function(a){return v(a)};a._defined=g;c=function(a,c,b){c.splice||(b=c,c=[]);y.call(g,a)||y.call(E,a)||(E[a]=[a,c,b])};c.amd={jQuery:!0}})();c("node_modules/almond/almond",function(){});(function(){function a(c){function b(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(c){for(var l=
134 +(function(a,b){"function"===typeof define&&define.amd?define([],b):a.forge=b()})(this,function(){var a,b,c;(function(d){function f(a,c){var b,l,h,g,w,d,e,k,v,u=c&&c.split("/"),B=m.map,D=B&&B["*"]||{};if(a&&"."===a.charAt(0))if(c){u=u.slice(0,u.length-1);a=a.split("/");w=a.length-1;m.nodeIdCompat&&F.test(a[w])&&(a[w]=a[w].replace(F,""));a=u.concat(a);for(w=0;w<a.length;w+=1)if(b=a[w],"."===b)a.splice(w,1),--w;else if(".."===b)if(1!==w||".."!==a[2]&&".."!==a[0])0<w&&(a.splice(w-1,2),w-=2);else break;
135 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((u||D)&&B){b=a.split("/");for(w=b.length;0<w;--w){l=b.slice(0,w).join("/");if(u)for(v=u.length;0<v;--v)if(h=B[u.slice(0,v).join("/")])if(h=h[l]){g=h;d=w;break}if(g)break;!e&&D&&D[l]&&(e=D[l],k=w)}!g&&e&&(g=e,d=k);g&&(b.splice(0,d,g),a=b.join("/"))}return a}function n(a,c){return function(){return u.apply(d,w.call(arguments,0).concat([a,c]))}}function p(a){return function(c){return f(c,a)}}function r(a){return function(c){g[a]=c}}function l(a){if(x.call(D,
136 +a)){var c=D[a];delete D[a];E[a]=!0;e.apply(d,c)}if(!x.call(g,a)&&!x.call(E,a))throw Error("No "+a);return g[a]}function k(a){var c,b=a?a.indexOf("!"):-1;-1<b&&(c=a.substring(0,b),a=a.substring(b+1,a.length));return[c,a]}function v(a){return function(){return m&&m.config&&m.config[a]||{}}}var e,u,B,h,g={},D={},m={},E={},x=Object.prototype.hasOwnProperty,w=[].slice,F=/\.js$/;B=function(a,c){var b,h=k(a),g=h[0];a=h[1];g&&(g=f(g,c),b=l(g));g?a=b&&b.normalize?b.normalize(a,p(c)):f(a,c):(a=f(a,c),h=k(a),
137 +g=h[0],a=h[1],g&&(b=l(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:b}};h={require:function(a){return n(a)},exports:function(a){var c=g[a];return"undefined"!==typeof c?c:g[a]={}},module:function(a){return{id:a,uri:"",exports:g[a],config:v(a)}}};e=function(a,c,b,w){var m,e,k,v,F=[];e=typeof b;var u;w=w||a;if("undefined"===e||"function"===e){c=!c.length&&b.length?["require","exports","module"]:c;for(v=0;v<c.length;v+=1)if(k=B(c[v],w),e=k.f,"require"===e)F[v]=h.require(a);else if("exports"===e)F[v]=h.exports(a),
138 +u=!0;else if("module"===e)m=F[v]=h.module(a);else if(x.call(g,e)||x.call(D,e)||x.call(E,e))F[v]=l(e);else if(k.p)k.p.load(k.n,n(w,!0),r(e),{}),F[v]=g[e];else throw Error(a+" missing "+e);c=b?b.apply(g[a],F):void 0;a&&(m&&m.exports!==d&&m.exports!==g[a]?g[a]=m.exports:c===d&&u||(g[a]=c))}else a&&(g[a]=b)};a=b=u=function(a,c,b,g,w){if("string"===typeof a)return h[a]?h[a](c):l(B(a,c).f);if(!a.splice){m=a;m.deps&&u(m.deps,m.callback);if(!c)return;c.splice?(a=c,c=b,b=null):a=d}c=c||function(){};"function"===
139 +typeof b&&(b=g,g=w);g?e(d,a,c,b):setTimeout(function(){e(d,a,c,b)},4);return u};u.config=function(a){return u(a)};a._defined=g;c=function(a,c,b){c.splice||(b=c,c=[]);x.call(g,a)||x.call(D,a)||(D[a]=[a,c,b])};c.amd={jQuery:!0}})();c("node_modules/almond/almond",function(){});(function(){function a(c){function b(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(c){for(var l=
140 0;l<a.length;++l)this.putByte(a[l])}}else if(a instanceof b||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=c.util=c.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
141 else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(c){a.push(c);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(c){c.source===window&&"forge.setImmediate"===c.data&&(c.stopPropagation(),c=a.slice(),a.length=0,c.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var c=Date.now(),b=!0,l=document.createElement("div"),a=[];
142 (new MutationObserver(function(){var c=a.slice();a.length=0;c.forEach(function(a){a()})})).observe(l,{attributes:!0});var h=d.setImmediate;d.setImmediate=function(d){15<Date.now()-c?(c=Date.now(),h(d)):(a.push(d),1===a.length&&l.setAttribute("a",b=!b))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
@@ -168,13 +169,13 @@ a.charCodeAt(m++),h=a.charCodeAt(m++),g=a.charCodeAt(m++),b+="ABCDEFGHIJKLMNOPQR
169 b};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var c="",b,l,d,h,g=0;g<a.length;)b=e[a.charCodeAt(g++)-43],l=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],c+=String.fromCharCode(b<<2|l>>4),64!==d&&(c+=String.fromCharCode((l&15)<<4|d>>2),64!==h&&(c+=String.fromCharCode((d&3)<<6|h)));return c};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
170 d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,c,b){var l=c;l||(l=new Uint8Array(a.length));for(var d=b=b||0,h=0;h<a.length;++h)l[d++]=a.charCodeAt(h);return c?d-b:l};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,c,b){var l=c;l||(l=new Uint8Array(Math.ceil(a.length/2)));b=b||0;var d=0,h=b;a.length&1&&(d=1,l[h++]=parseInt(a[0],16));for(;d<a.length;d+=2)l[h++]=parseInt(a.substr(d,2),16);return c?h-b:l};d.binary.base64.encode=
171 function(a,c){for(var b="",l="",d,h,g,m=0;m<a.byteLength;)d=a[m++],h=a[m++],g=a[m++],b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d>>2),b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&3)<<4|h>>4),isNaN(h)?b+="==":(b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),b+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),c&&b.length>c&&(l+=b.substr(0,
171 -c)+"\r\n",b=b.substr(c));return l+b};d.binary.base64.decode=function(a,c,b){var l=c;l||(l=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");b=b||0;for(var d,h,g,m,k=0,v=b;k<a.length;)d=e[a.charCodeAt(k++)-43],h=e[a.charCodeAt(k++)-43],g=e[a.charCodeAt(k++)-43],m=e[a.charCodeAt(k++)-43],l[v++]=d<<2|h>>4,64!==g&&(l[v++]=(h&15)<<4|g>>2,64!==m&&(l[v++]=(g&3)<<6|m));return c?v-b:l.subarray(0,v)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,c,b){a=d.encodeUtf8(a);
172 +c)+"\r\n",b=b.substr(c));return l+b};d.binary.base64.decode=function(a,c,b){var l=c;l||(l=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");b=b||0;for(var d,h,g,m,k=0,u=b;k<a.length;)d=e[a.charCodeAt(k++)-43],h=e[a.charCodeAt(k++)-43],g=e[a.charCodeAt(k++)-43],m=e[a.charCodeAt(k++)-43],l[u++]=d<<2|h>>4,64!==g&&(l[u++]=(h&15)<<4|g>>2,64!==m&&(l[u++]=(g&3)<<6|m));return c?u-b:l.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,c,b){a=d.encodeUtf8(a);
173 var l=c;l||(l=new Uint8Array(a.length));for(var h=b=b||0,g=0;g<a.length;++g)l[h++]=a.charCodeAt(g);return c?h-b:l};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,c,b){var l=c;l||(l=new Uint8Array(2*a.length));for(var d=new Uint16Array(l.buffer),h=b=b||0,g=b,m=0;m<a.length;++m)d[g++]=a.charCodeAt(m),h+=2;return c?h-b:l};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
173 -c,b){c=d.decode64(a.deflate(d.encode64(c)).rval);b&&(a=2,c.charCodeAt(1)&32&&(a=6),c=c.substring(a,c.length-4));return c};d.inflate=function(a,c,b){a=a.inflate(d.encode64(c)).rval;return null===a?null:d.decode64(a)};var v=function(a,c,b){if(!a)throw Error("WebStorage not available.");null===b?a=a.removeItem(c):(b=d.encode64(JSON.stringify(b)),a=a.setItem(c,b));if("undefined"!==typeof a&&!0!==a.rval)throw c=Error(a.error.message),c.id=a.error.id,c.name=a.error.name,c;},B=function(a,c){if(!a)throw Error("WebStorage not available.");
174 -var b=a.getItem(c);if(a.init)if(null===b.rval){if(b.error){var l=Error(b.error.message);l.id=b.error.id;l.name=b.error.name;throw l;}b=null}else b=b.rval;null!==b&&(b=JSON.parse(d.decode64(b)));return b},h=function(a,c,b,l){var d=B(a,c);null===d&&(d={});d[b]=l;v(a,c,d)},g=function(a,c,b){a=B(a,c);null!==a&&(a=b in a?a[b]:null);return a},E=function(a,c,b){var l=B(a,c);if(null!==l&&b in l){delete l[b];b=!0;for(var d in l){b=!1;break}b&&(l=null);v(a,c,l)}},m=function(a,c){v(a,c,null)},f=function(a,c,
175 -b){var l=null;"undefined"===typeof b&&(b=["web","flash"]);var d,h=!1,g=null,m;for(m in b){d=b[m];try{if("flash"===d||"both"===d){if(null===c[0])throw Error("Flash local storage not available.");l=a.apply(this,c);h="flash"===d}if("web"===d||"both"===d)c[0]=localStorage,l=a.apply(this,c),h=!0}catch(e){g=e}if(h)break}if(!h)throw g;return l};d.setItem=function(a,c,b,l,d){f(h,arguments,d)};d.getItem=function(a,c,b,l){return f(g,arguments,l)};d.removeItem=function(a,c,b,l){f(E,arguments,l)};d.clearItems=
176 -function(a,c,b){f(m,arguments,b)};d.parseUrl=function(a){var c=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;c.lastIndex=0;c=c.exec(a);if(a=null===c?null:{full:a,scheme:c[1],host:c[2],port:c[3],path:c[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var y=null;d.getQueryVariables=function(a){var c=function(a){var c=
177 -{};a=a.split("&");for(var b=0;b<a.length;b++){var l=a[b].indexOf("="),d;0<l?(d=a[b].substring(0,l),l=a[b].substring(l+1)):(d=a[b],l=null);d in c||(c[d]=[]);d in Object.prototype||null===l||c[d].push(unescape(l))}return c};"undefined"===typeof a?(null===y&&(y="undefined"!==typeof window&&window.location&&window.location.search?c(window.location.search.substring(1)):{}),a=y):a=c(a);return a};d.parseFragment=function(a){var c=a,b="",l=a.indexOf("?");0<l&&(c=a.substring(0,l),b=a.substring(l+1));a=c.split("/");
174 +c,b){c=d.decode64(a.deflate(d.encode64(c)).rval);b&&(a=2,c.charCodeAt(1)&32&&(a=6),c=c.substring(a,c.length-4));return c};d.inflate=function(a,c,b){a=a.inflate(d.encode64(c)).rval;return null===a?null:d.decode64(a)};var u=function(a,c,b){if(!a)throw Error("WebStorage not available.");null===b?a=a.removeItem(c):(b=d.encode64(JSON.stringify(b)),a=a.setItem(c,b));if("undefined"!==typeof a&&!0!==a.rval)throw c=Error(a.error.message),c.id=a.error.id,c.name=a.error.name,c;},B=function(a,c){if(!a)throw Error("WebStorage not available.");
175 +var b=a.getItem(c);if(a.init)if(null===b.rval){if(b.error){var l=Error(b.error.message);l.id=b.error.id;l.name=b.error.name;throw l;}b=null}else b=b.rval;null!==b&&(b=JSON.parse(d.decode64(b)));return b},h=function(a,c,b,l){var d=B(a,c);null===d&&(d={});d[b]=l;u(a,c,d)},g=function(a,c,b){a=B(a,c);null!==a&&(a=b in a?a[b]:null);return a},D=function(a,c,b){var l=B(a,c);if(null!==l&&b in l){delete l[b];b=!0;for(var d in l){b=!1;break}b&&(l=null);u(a,c,l)}},m=function(a,c){u(a,c,null)},f=function(a,c,
176 +b){var l=null;"undefined"===typeof b&&(b=["web","flash"]);var d,h=!1,g=null,m;for(m in b){d=b[m];try{if("flash"===d||"both"===d){if(null===c[0])throw Error("Flash local storage not available.");l=a.apply(this,c);h="flash"===d}if("web"===d||"both"===d)c[0]=localStorage,l=a.apply(this,c),h=!0}catch(e){g=e}if(h)break}if(!h)throw g;return l};d.setItem=function(a,c,b,l,d){f(h,arguments,d)};d.getItem=function(a,c,b,l){return f(g,arguments,l)};d.removeItem=function(a,c,b,l){f(D,arguments,l)};d.clearItems=
177 +function(a,c,b){f(m,arguments,b)};d.parseUrl=function(a){var c=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;c.lastIndex=0;c=c.exec(a);if(a=null===c?null:{full:a,scheme:c[1],host:c[2],port:c[3],path:c[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var x=null;d.getQueryVariables=function(a){var c=function(a){var c=
178 +{};a=a.split("&");for(var b=0;b<a.length;b++){var l=a[b].indexOf("="),d;0<l?(d=a[b].substring(0,l),l=a[b].substring(l+1)):(d=a[b],l=null);d in c||(c[d]=[]);d in Object.prototype||null===l||c[d].push(unescape(l))}return c};"undefined"===typeof a?(null===x&&(x="undefined"!==typeof window&&window.location&&window.location.search?c(window.location.search.substring(1)):{}),a=x):a=c(a);return a};d.parseFragment=function(a){var c=a,b="",l=a.indexOf("?");0<l&&(c=a.substring(0,l),b=a.substring(l+1));a=c.split("/");
179 0<a.length&&""===a[0]&&a.shift();l=""===b?{}:d.getQueryVariables(b);return{pathString:c,queryString:b,path:a,query:l}};d.makeRequest=function(a){var c=d.parseFragment(a),b={path:c.pathString,query:c.queryString,getPath:function(a){return"undefined"===typeof a?c.path:c.path[a]},getQuery:function(a,b){var l;"undefined"===typeof a?l=c.query:(l=c.query[a])&&"undefined"!==typeof b&&(l=l[b]);return l},getQueryLast:function(a,c){var l=b.getQuery(a);return l?l[l.length-1]:c}};return b};d.makeLink=function(a,
180 c,b){a=jQuery.isArray(a)?a.join("/"):a;c=jQuery.param(c||{});b=b||"";return a+(0<c.length?"?"+c:"")+(0<b.length?"#"+b:"")};d.setPath=function(a,c,b){if("object"===typeof a&&null!==a)for(var l=0,d=c.length;l<d;){var h=c[l++];if(l==d)a[h]=b;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,c,b){for(var l=0,d=c.length,h=!0;h&&l<d&&"object"===typeof a&&null!==a;){var g=c[l++];(h=g in a)&&(a=a[g])}return h?a:b};d.deletePath=function(a,c){if("object"===
181 typeof a&&null!==a)for(var b=0,l=c.length;b<l;){var d=c[b++];if(b==l)delete a[d];else{if(!(d in a)||"object"!==typeof a[d]||null===a[d])break;a=a[d]}}};d.isEmpty=function(a){for(var c in a)if(a.hasOwnProperty(c))return!1;return!0};d.format=function(a){var c=/%./g,b,l,d=0,h=[];for(l=0;b=c.exec(a);)switch(l=a.substring(l,c.lastIndex-2),0<l.length&&h.push(l),l=c.lastIndex,b=b[0][1],b){case "s":case "o":d<arguments.length?h.push(arguments[d++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
@@ -191,39 +192,39 @@ c.cipher.algorithms[a]:null};var b=c.cipher.BlockCipher=function(a){this.algorit
192 this.mode.start(b)};b.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};b.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(c){return a(this.blockSize,c,!1)},this.mode.unpad=function(c){return a(this.blockSize,c,!0)});var c={};c.decrypt=this._decrypt;c.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
193 !this.mode.pad(this._input,c))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,c)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,c)?!1:!0}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.cipher)return b.cipher;
194 b.defined.cipher=!0;for(var k=0;k<e.length;++k)e[k](b);return b.cipher}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/cipher",["require","module","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a){"string"===typeof a&&(a=c.util.createBuffer(a));if(c.util.isArray(a)&&
194 -4<a.length){var d=a;a=c.util.createBuffer();for(var g=0;g<d.length;++g)a.putByte(d[g])}c.util.isArray(a)||(a=[a.getInt32(),a.getInt32(),a.getInt32(),a.getInt32()]);return a}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}c.cipher=c.cipher||{};var v=c.cipher.modes=c.cipher.modes||{};v.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
195 -Array(this._ints)};v.ecb.prototype.start=function(a){};v.ecb.prototype.encrypt=function(a,c,b){if(a.length()<this.blockSize&&!(b&&0<a.length()))return!0;for(b=0;b<this._ints;++b)this._inBlock[b]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(b=0;b<this._ints;++b)c.putInt32(this._outBlock[b])};v.ecb.prototype.decrypt=function(a,c,b){if(a.length()<this.blockSize&&!(b&&0<a.length()))return!0;for(b=0;b<this._ints;++b)this._inBlock[b]=a.getInt32();this.cipher.decrypt(this._inBlock,
196 -this._outBlock);for(b=0;b<this._ints;++b)c.putInt32(this._outBlock[b])};v.ecb.prototype.pad=function(a,c){var b=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(b,b);return!0};v.ecb.prototype.unpad=function(a,c){if(0<c.overflow)return!1;var b=a.length(),b=a.at(b-1);if(b>this.blockSize<<2)return!1;a.truncate(b);return!0};v.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
197 -this._outBlock=Array(this._ints)};v.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=b(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};v.cbc.prototype.encrypt=function(a,c,b){if(a.length()<this.blockSize&&!(b&&0<a.length()))return!0;for(b=0;b<this._ints;++b)this._inBlock[b]=this._prev[b]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(b=0;b<this._ints;++b)c.putInt32(this._outBlock[b]);
198 -this._prev=this._outBlock};v.cbc.prototype.decrypt=function(a,c,b){if(a.length()<this.blockSize&&!(b&&0<a.length()))return!0;for(b=0;b<this._ints;++b)this._inBlock[b]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(b=0;b<this._ints;++b)c.putInt32(this._prev[b]^this._outBlock[b]);this._prev=this._inBlock.slice(0)};v.cbc.prototype.pad=function(a,c){var b=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(b,b);return!0};v.cbc.prototype.unpad=function(a,
199 -c){if(0<c.overflow)return!1;var b=a.length(),b=a.at(b-1);if(b>this.blockSize<<2)return!1;a.truncate(b);return!0};v.cfb=function(a){a=a||{};this.name="CFB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=c.util.createBuffer();this._partialBytes=0};v.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=b(a.iv);this._inBlock=
200 -this._iv.slice(0);this._partialBytes=0};v.cfb.prototype.encrypt=function(a,c,b){var l=a.length();if(0===l)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&l>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],c.putInt32(this._inBlock[d]);else{var e=(this.blockSize-l)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialBlock[d]=a.getInt32()^this._outBlock[d],this._partialOutput.putInt32(this._partialBlock[d]);
201 -if(0<e)a.read-=this.blockSize;else for(d=0;d<this._ints;++d)this._inBlock[d]=this._partialBlock[d];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!b)return c.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;c.putBytes(this._partialOutput.getBytes(l-this._partialBytes));this._partialBytes=0}};v.cfb.prototype.decrypt=function(a,c,b){var l=a.length();if(0===l)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
195 +4<a.length){var d=a;a=c.util.createBuffer();for(var g=0;g<d.length;++g)a.putByte(d[g])}c.util.isArray(a)||(a=[a.getInt32(),a.getInt32(),a.getInt32(),a.getInt32()]);return a}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}c.cipher=c.cipher||{};var u=c.cipher.modes=c.cipher.modes||{};u.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
196 +Array(this._ints)};u.ecb.prototype.start=function(a){};u.ecb.prototype.encrypt=function(a,c,b){if(a.length()<this.blockSize&&!(b&&0<a.length()))return!0;for(b=0;b<this._ints;++b)this._inBlock[b]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(b=0;b<this._ints;++b)c.putInt32(this._outBlock[b])};u.ecb.prototype.decrypt=function(a,c,b){if(a.length()<this.blockSize&&!(b&&0<a.length()))return!0;for(b=0;b<this._ints;++b)this._inBlock[b]=a.getInt32();this.cipher.decrypt(this._inBlock,
197 +this._outBlock);for(b=0;b<this._ints;++b)c.putInt32(this._outBlock[b])};u.ecb.prototype.pad=function(a,c){var b=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(b,b);return!0};u.ecb.prototype.unpad=function(a,c){if(0<c.overflow)return!1;var b=a.length(),b=a.at(b-1);if(b>this.blockSize<<2)return!1;a.truncate(b);return!0};u.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
198 +this._outBlock=Array(this._ints)};u.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=b(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};u.cbc.prototype.encrypt=function(a,c,b){if(a.length()<this.blockSize&&!(b&&0<a.length()))return!0;for(b=0;b<this._ints;++b)this._inBlock[b]=this._prev[b]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(b=0;b<this._ints;++b)c.putInt32(this._outBlock[b]);
199 +this._prev=this._outBlock};u.cbc.prototype.decrypt=function(a,c,b){if(a.length()<this.blockSize&&!(b&&0<a.length()))return!0;for(b=0;b<this._ints;++b)this._inBlock[b]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(b=0;b<this._ints;++b)c.putInt32(this._prev[b]^this._outBlock[b]);this._prev=this._inBlock.slice(0)};u.cbc.prototype.pad=function(a,c){var b=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(b,b);return!0};u.cbc.prototype.unpad=function(a,
200 +c){if(0<c.overflow)return!1;var b=a.length(),b=a.at(b-1);if(b>this.blockSize<<2)return!1;a.truncate(b);return!0};u.cfb=function(a){a=a||{};this.name="CFB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=c.util.createBuffer();this._partialBytes=0};u.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=b(a.iv);this._inBlock=
201 +this._iv.slice(0);this._partialBytes=0};u.cfb.prototype.encrypt=function(a,c,b){var l=a.length();if(0===l)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&l>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],c.putInt32(this._inBlock[d]);else{var e=(this.blockSize-l)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialBlock[d]=a.getInt32()^this._outBlock[d],this._partialOutput.putInt32(this._partialBlock[d]);
202 +if(0<e)a.read-=this.blockSize;else for(d=0;d<this._ints;++d)this._inBlock[d]=this._partialBlock[d];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!b)return c.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;c.putBytes(this._partialOutput.getBytes(l-this._partialBytes));this._partialBytes=0}};u.cfb.prototype.decrypt=function(a,c,b){var l=a.length();if(0===l)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
203 l>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),c.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-l)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialBlock[d]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[d]^this._outBlock[d]);if(0<e)a.read-=this.blockSize;else for(d=0;d<this._ints;++d)this._inBlock[d]=this._partialBlock[d];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
203 -if(0<e&&!b)return c.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;c.putBytes(this._partialOutput.getBytes(l-this._partialBytes));this._partialBytes=0}};v.ofb=function(a){a=a||{};this.name="OFB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=c.util.createBuffer();this._partialBytes=0};v.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
204 -this._iv=b(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};v.ofb.prototype.encrypt=function(a,c,b){var l=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&l>=this.blockSize)for(var d=0;d<this._ints;++d)c.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-l)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
205 -this._outBlock[d]);if(0<e)a.read-=this.blockSize;else for(d=0;d<this._ints;++d)this._inBlock[d]=this._outBlock[d];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!b)return c.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;c.putBytes(this._partialOutput.getBytes(l-this._partialBytes));this._partialBytes=0}};v.ofb.prototype.decrypt=v.ofb.prototype.encrypt;v.ctr=function(a){a=a||{};this.name="CTR";this.cipher=a.cipher;this.blockSize=
206 -a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=c.util.createBuffer();this._partialBytes=0};v.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=b(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};v.ctr.prototype.encrypt=function(a,c,b){var l=a.length();if(0===l)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&l>=this.blockSize)for(var e=0;e<
204 +if(0<e&&!b)return c.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;c.putBytes(this._partialOutput.getBytes(l-this._partialBytes));this._partialBytes=0}};u.ofb=function(a){a=a||{};this.name="OFB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=c.util.createBuffer();this._partialBytes=0};u.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
205 +this._iv=b(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};u.ofb.prototype.encrypt=function(a,c,b){var l=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&l>=this.blockSize)for(var d=0;d<this._ints;++d)c.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-l)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
206 +this._outBlock[d]);if(0<e)a.read-=this.blockSize;else for(d=0;d<this._ints;++d)this._inBlock[d]=this._outBlock[d];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!b)return c.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;c.putBytes(this._partialOutput.getBytes(l-this._partialBytes));this._partialBytes=0}};u.ofb.prototype.decrypt=u.ofb.prototype.encrypt;u.ctr=function(a){a=a||{};this.name="CTR";this.cipher=a.cipher;this.blockSize=
207 +a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=c.util.createBuffer();this._partialBytes=0};u.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=b(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};u.ctr.prototype.encrypt=function(a,c,b){var l=a.length();if(0===l)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&l>=this.blockSize)for(var e=0;e<
208 this._ints;++e)c.putInt32(a.getInt32()^this._outBlock[e]);else{var k=(this.blockSize-l)%this.blockSize;0<k&&(k=this.blockSize-k);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<k&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<k&&!b)return c.putBytes(this._partialOutput.getBytes(k-this._partialBytes)),this._partialBytes=k,!0;c.putBytes(this._partialOutput.getBytes(l-this._partialBytes));
208 -this._partialBytes=0}d(this._inBlock)};v.ctr.prototype.decrypt=v.ctr.prototype.encrypt;v.gcm=function(a){a=a||{};this.name="GCM";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=c.util.createBuffer();this._partialBytes=0;this._R=3774873600};v.gcm.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");var b=c.util.createBuffer(a.iv);this._cipherLength=0;var g;
209 +this._partialBytes=0}d(this._inBlock)};u.ctr.prototype.decrypt=u.ctr.prototype.encrypt;u.gcm=function(a){a=a||{};this.name="GCM";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=c.util.createBuffer();this._partialBytes=0;this._R=3774873600};u.gcm.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");var b=c.util.createBuffer(a.iv);this._cipherLength=0;var g;
210 g="additionalData"in a?c.util.createBuffer(a.additionalData):c.util.createBuffer();this._tagLength="tagLength"in a?a.tagLength:128;this._tag=null;if(a.decrypt&&(this._tag=c.util.createBuffer(a.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
211 this.componentBits);a=b.length();if(12===a)this._j0=[b.getInt32(),b.getInt32(),b.getInt32(),1];else{for(this._j0=[0,0,0,0];0<b.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*a)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;g=c.util.createBuffer(g);this._aDataLength=e(8*g.length());(b=g.length()%this.blockSize)&&g.fillWithByte(0,this.blockSize-b);
211 -for(this._s=[0,0,0,0];0<g.length();)this._s=this.ghash(this._hashSubkey,this._s,[g.getInt32(),g.getInt32(),g.getInt32(),g.getInt32()])};v.gcm.prototype.encrypt=function(a,c,b){var l=a.length();if(0===l)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&l>=this.blockSize){for(var e=0;e<this._ints;++e)c.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var k=(this.blockSize-l)%this.blockSize;0<k&&(k=this.blockSize-k);this._partialOutput.clear();
212 +for(this._s=[0,0,0,0];0<g.length();)this._s=this.ghash(this._hashSubkey,this._s,[g.getInt32(),g.getInt32(),g.getInt32(),g.getInt32()])};u.gcm.prototype.encrypt=function(a,c,b){var l=a.length();if(0===l)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&l>=this.blockSize){for(var e=0;e<this._ints;++e)c.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var k=(this.blockSize-l)%this.blockSize;0<k&&(k=this.blockSize-k);this._partialOutput.clear();
213 for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===k||b){b?(e=l%this.blockSize,this._cipherLength+=e,this._partialOutput.truncate(this.blockSize-e)):this._cipherLength+=this.blockSize;for(e=0;e<this._ints;++e)this._outBlock[e]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<k&&!b)return a.read-=this.blockSize,c.putBytes(this._partialOutput.getBytes(k-this._partialBytes)),
213 -this._partialBytes=k,!0;c.putBytes(this._partialOutput.getBytes(l-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};v.gcm.prototype.decrypt=function(a,c,b){var l=a.length();if(l<this.blockSize&&!(b&&0<l))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
214 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)c.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=l<this.blockSize?this._cipherLength+l%this.blockSize:this._cipherLength+this.blockSize};v.gcm.prototype.afterFinish=function(a,b){var d=!0;b.decrypt&&b.overflow&&a.truncate(this.blockSize-b.overflow);this.tag=c.util.createBuffer();var k=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,k);k=[];this.cipher.encrypt(this._j0,k);for(var m=0;m<
215 -this._ints;++m)this.tag.putInt32(this._s[m]^k[m]);this.tag.truncate(this.tag.length()%(this._tagLength/8));b.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};v.gcm.prototype.multiply=function(a,c){for(var b=[0,0,0,0],l=c.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(b[0]^=l[0],b[1]^=l[1],b[2]^=l[2],b[3]^=l[3]),this.pow(l,l);return b};v.gcm.prototype.pow=function(a,c){for(var b=a[3]&1,l=3;0<l;--l)c[l]=a[l]>>>1|(a[l-1]&1)<<31;c[0]=a[0]>>>1;b&&(c[0]^=this._R)};v.gcm.prototype.tableMultiply=function(a){for(var c=
216 -[0,0,0,0],b=0;32>b;++b){var l=this._m[b][a[b/8|0]>>>4*(7-b%8)&15];c[0]^=l[0];c[1]^=l[1];c[2]^=l[2];c[3]^=l[3]}return c};v.gcm.prototype.ghash=function(a,c,b){c[0]^=b[0];c[1]^=b[1];c[2]^=b[2];c[3]^=b[3];return this.tableMultiply(c)};v.gcm.prototype.generateHashTable=function(a,c){for(var b=8/c,l=4*b,b=16*b,d=Array(b),e=0;e<b;++e){var k=[0,0,0,0];k[e/l|0]=1<<c-1<<(l-1-e%l)*c;d[e]=this.generateSubHashTable(this.multiply(k,a),c)}return d};v.gcm.prototype.generateSubHashTable=function(a,c){var b=1<<c,
217 -l=b>>>1,d=Array(b);d[l]=a.slice(0);for(var e=l>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<l;){for(var k=1;k<e;++k){var v=d[e],f=d[k];d[e+k]=[v[0]^f[0],v[1]^f[1],v[2]^f[2],v[3]^f[3]]}e*=2}d[0]=[0,0,0,0];for(e=l+1;e<b;++e)k=d[e^l],d[e]=[a[0]^k[0],a[1]^k[1],a[2]^k[2],a[3]^k[3]];return d}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=
214 +this._partialBytes=k,!0;c.putBytes(this._partialOutput.getBytes(l-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};u.gcm.prototype.decrypt=function(a,c,b){var l=a.length();if(l<this.blockSize&&!(b&&0<l))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
215 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)c.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=l<this.blockSize?this._cipherLength+l%this.blockSize:this._cipherLength+this.blockSize};u.gcm.prototype.afterFinish=function(a,b){var d=!0;b.decrypt&&b.overflow&&a.truncate(this.blockSize-b.overflow);this.tag=c.util.createBuffer();var k=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,k);k=[];this.cipher.encrypt(this._j0,k);for(var m=0;m<
216 +this._ints;++m)this.tag.putInt32(this._s[m]^k[m]);this.tag.truncate(this.tag.length()%(this._tagLength/8));b.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};u.gcm.prototype.multiply=function(a,c){for(var b=[0,0,0,0],l=c.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(b[0]^=l[0],b[1]^=l[1],b[2]^=l[2],b[3]^=l[3]),this.pow(l,l);return b};u.gcm.prototype.pow=function(a,c){for(var b=a[3]&1,l=3;0<l;--l)c[l]=a[l]>>>1|(a[l-1]&1)<<31;c[0]=a[0]>>>1;b&&(c[0]^=this._R)};u.gcm.prototype.tableMultiply=function(a){for(var c=
217 +[0,0,0,0],b=0;32>b;++b){var l=this._m[b][a[b/8|0]>>>4*(7-b%8)&15];c[0]^=l[0];c[1]^=l[1];c[2]^=l[2];c[3]^=l[3]}return c};u.gcm.prototype.ghash=function(a,c,b){c[0]^=b[0];c[1]^=b[1];c[2]^=b[2];c[3]^=b[3];return this.tableMultiply(c)};u.gcm.prototype.generateHashTable=function(a,c){for(var b=8/c,l=4*b,b=16*b,d=Array(b),e=0;e<b;++e){var k=[0,0,0,0];k[e/l|0]=1<<c-1<<(l-1-e%l)*c;d[e]=this.generateSubHashTable(this.multiply(k,a),c)}return d};u.gcm.prototype.generateSubHashTable=function(a,c){var b=1<<c,
218 +l=b>>>1,d=Array(b);d[l]=a.slice(0);for(var e=l>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<l;){for(var k=1;k<e;++k){var u=d[e],f=d[k];d[e+k]=[u[0]^f[0],u[1]^f[1],u[2]^f[2],u[3]^f[3]]}e*=2}d[0]=[0,0,0,0];for(e=l+1;e<b;++e)k=d[e^l],d[e]=[a[0]^k[0],a[1]^k[1],a[2]^k[2],a[3]^k[3]];return d}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=
219 n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.cipherModes)return b.cipherModes;b.defined.cipherModes=!0;for(var k=0;k<e.length;++k)e[k](b);return b.cipherModes}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/cipherModes",["require","module","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,
219 -0))})})();(function(){function a(c){function b(a,d){c.cipher.registerAlgorithm(a,function(){return new c.aes.Algorithm(a,d)})}function d(){h=!0;D=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),c=0;128>c;++c)a[c]=c<<1,a[c+128]=c+128<<1^283;E=Array(256);m=Array(256);y=Array(4);w=Array(4);for(c=0;4>c;++c)y[c]=Array(256),w[c]=Array(256);for(var b=0,l=0,g,e,k,v,f,c=0;256>c;++c){v=l^l<<1^l<<2^l<<3^l<<4;v=v>>8^v&255^99;E[b]=v;m[v]=b;f=a[v];g=a[b];e=a[g];k=a[e];f^=f<<24^v<<16^v<<8^v;e=(g^e^k)<<24^(b^
220 -k)<<16^(b^e^k)<<8^b^g^k;for(var u=0;4>u;++u)y[u][b]=f,w[u][v]=e,f=f<<24|f>>>8,e=e<<24|e>>>8;0===b?b=l=1:(b=g^a[a[a[g^k]]],l^=a[a[l]])}}function e(a,c){for(var b=a.slice(0),l,d=1,h=b.length,e=g*(h+6+1),k=h;k<e;++k)l=b[k-1],0===k%h?(l=E[l>>>16&255]<<24^E[l>>>8&255]<<16^E[l&255]<<8^E[l>>>24]^D[d]<<24,d++):6<h&&4===k%h&&(l=E[l>>>24]<<24^E[l>>>16&255]<<16^E[l>>>8&255]<<8^E[l&255]),b[k]=b[k-h]^l;if(c){for(var d=w[0],h=w[1],m=w[2],v=w[3],f=b.slice(0),e=b.length,k=0,u=e-g;k<e;k+=g,u-=g)if(0===k||k===e-g)f[k]=
221 -b[u],f[k+1]=b[u+3],f[k+2]=b[u+2],f[k+3]=b[u+1];else for(var y=0;y<g;++y)l=b[u+y],f[k+(3&-y)]=d[E[l>>>24]]^h[E[l>>>16&255]]^m[E[l>>>8&255]]^v[E[l&255]];b=f}return b}function v(a,c,b,l){var d=a.length/4-1,h,g,e,k,v;l?(h=w[0],g=w[1],e=w[2],k=w[3],v=m):(h=y[0],g=y[1],e=y[2],k=y[3],v=E);var f,u,B,D,n,p;f=c[0]^a[0];u=c[l?3:1]^a[1];B=c[2]^a[2];c=c[l?1:3]^a[3];for(var r=3,R=1;R<d;++R)D=h[f>>>24]^g[u>>>16&255]^e[B>>>8&255]^k[c&255]^a[++r],n=h[u>>>24]^g[B>>>16&255]^e[c>>>8&255]^k[f&255]^a[++r],p=h[B>>>24]^
222 -g[c>>>16&255]^e[f>>>8&255]^k[u&255]^a[++r],c=h[c>>>24]^g[f>>>16&255]^e[u>>>8&255]^k[B&255]^a[++r],f=D,u=n,B=p;b[0]=v[f>>>24]<<24^v[u>>>16&255]<<16^v[B>>>8&255]<<8^v[c&255]^a[++r];b[l?3:1]=v[u>>>24]<<24^v[B>>>16&255]<<16^v[c>>>8&255]<<8^v[f&255]^a[++r];b[2]=v[B>>>24]<<24^v[c>>>16&255]<<16^v[f>>>8&255]<<8^v[u&255]^a[++r];b[l?1:3]=v[c>>>24]<<24^v[f>>>16&255]<<16^v[u>>>8&255]<<8^v[B&255]^a[++r]}function f(a){a=a||{};var b="AES-"+(a.mode||"CBC").toUpperCase(),d;d=a.decrypt?c.cipher.createDecipher(b,a.key):
220 +0))})})();(function(){function a(c){function b(a,d){c.cipher.registerAlgorithm(a,function(){return new c.aes.Algorithm(a,d)})}function d(){h=!0;E=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),c=0;128>c;++c)a[c]=c<<1,a[c+128]=c+128<<1^283;D=Array(256);m=Array(256);x=Array(4);w=Array(4);for(c=0;4>c;++c)x[c]=Array(256),w[c]=Array(256);for(var b=0,l=0,g,e,k,u,q,c=0;256>c;++c){u=l^l<<1^l<<2^l<<3^l<<4;u=u>>8^u&255^99;D[b]=u;m[u]=b;q=a[u];g=a[b];e=a[g];k=a[e];q^=q<<24^u<<16^u<<8^u;e=(g^e^k)<<24^(b^
221 +k)<<16^(b^e^k)<<8^b^g^k;for(var f=0;4>f;++f)x[f][b]=q,w[f][u]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===b?b=l=1:(b=g^a[a[a[g^k]]],l^=a[a[l]])}}function e(a,c){for(var b=a.slice(0),l,d=1,h=b.length,e=g*(h+6+1),k=h;k<e;++k)l=b[k-1],0===k%h?(l=D[l>>>16&255]<<24^D[l>>>8&255]<<16^D[l&255]<<8^D[l>>>24]^E[d]<<24,d++):6<h&&4===k%h&&(l=D[l>>>24]<<24^D[l>>>16&255]<<16^D[l>>>8&255]<<8^D[l&255]),b[k]=b[k-h]^l;if(c){for(var d=w[0],h=w[1],m=w[2],u=w[3],f=b.slice(0),e=b.length,k=0,x=e-g;k<e;k+=g,x-=g)if(0===k||k===e-g)f[k]=
222 +b[x],f[k+1]=b[x+3],f[k+2]=b[x+2],f[k+3]=b[x+1];else for(var v=0;v<g;++v)l=b[x+v],f[k+(3&-v)]=d[D[l>>>24]]^h[D[l>>>16&255]]^m[D[l>>>8&255]]^u[D[l&255]];b=f}return b}function u(a,c,b,l){var d=a.length/4-1,h,g,e,k,u;l?(h=w[0],g=w[1],e=w[2],k=w[3],u=m):(h=x[0],g=x[1],e=x[2],k=x[3],u=D);var f,v,B,E,n,p;f=c[0]^a[0];v=c[l?3:1]^a[1];B=c[2]^a[2];c=c[l?1:3]^a[3];for(var r=3,S=1;S<d;++S)E=h[f>>>24]^g[v>>>16&255]^e[B>>>8&255]^k[c&255]^a[++r],n=h[v>>>24]^g[B>>>16&255]^e[c>>>8&255]^k[f&255]^a[++r],p=h[B>>>24]^
223 +g[c>>>16&255]^e[f>>>8&255]^k[v&255]^a[++r],c=h[c>>>24]^g[f>>>16&255]^e[v>>>8&255]^k[B&255]^a[++r],f=E,v=n,B=p;b[0]=u[f>>>24]<<24^u[v>>>16&255]<<16^u[B>>>8&255]<<8^u[c&255]^a[++r];b[l?3:1]=u[v>>>24]<<24^u[B>>>16&255]<<16^u[c>>>8&255]<<8^u[f&255]^a[++r];b[2]=u[B>>>24]<<24^u[c>>>16&255]<<16^u[f>>>8&255]<<8^u[v&255]^a[++r];b[l?1:3]=u[c>>>24]<<24^u[f>>>16&255]<<16^u[v>>>8&255]<<8^u[B&255]^a[++r]}function f(a){a=a||{};var b="AES-"+(a.mode||"CBC").toUpperCase(),d;d=a.decrypt?c.cipher.createDecipher(b,a.key):
224 c.cipher.createCipher(b,a.key);var h=d.start;d.start=function(a,b){var g=null;b instanceof c.util.ByteBuffer&&(g=b,b={});b=b||{};b.output=g;b.iv=a;h.call(d,b)};return d}c.aes=c.aes||{};c.aes.startEncrypting=function(a,c,b,l){a=f({key:a,output:b,decrypt:!1,mode:l});a.start(c);return a};c.aes.createEncryptionCipher=function(a,c){return f({key:a,output:null,decrypt:!1,mode:c})};c.aes.startDecrypting=function(a,c,b,l){a=f({key:a,output:b,decrypt:!0,mode:l});a.start(c);return a};c.aes.createDecryptionCipher=
224 -function(a,c){return f({key:a,output:null,decrypt:!0,mode:c})};c.aes.Algorithm=function(a,c){h||d();var b=this;b.name=a;b.mode=new c({blockSize:16,cipher:{encrypt:function(a,c){return v(b._w,a,c,!1)},decrypt:function(a,c){return v(b._w,a,c,!0)}}});b._init=!1};c.aes.Algorithm.prototype.initialize=function(a){if(!this._init){var b=a.key,d;if("string"===typeof b&&(16===b.length||24===b.length||32===b.length))b=c.util.createBuffer(b);else if(c.util.isArray(b)&&(16===b.length||24===b.length||32===b.length)){d=
225 -b;for(var b=c.util.createBuffer(),h=0;h<d.length;++h)b.putByte(d[h])}if(!c.util.isArray(b)){d=b;var b=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)b.push(d.getInt32())}if(!c.util.isArray(b)||4!==b.length&&6!==b.length&&8!==b.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(b,a.decrypt&&!d);this._init=!0}};c.aes._expandKey=function(a,c){h||d();return e(a,c)};c.aes._updateBlock=v;b("AES-ECB",c.cipher.modes.ecb);b("AES-CBC",
226 -c.cipher.modes.cbc);b("AES-CFB",c.cipher.modes.cfb);b("AES-OFB",c.cipher.modes.ofb);b("AES-CTR",c.cipher.modes.ctr);b("AES-GCM",c.cipher.modes.gcm);var h=!1,g=4,E,m,D,y,w}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.aes)return b.aes;b.defined.aes=
225 +function(a,c){return f({key:a,output:null,decrypt:!0,mode:c})};c.aes.Algorithm=function(a,c){h||d();var b=this;b.name=a;b.mode=new c({blockSize:16,cipher:{encrypt:function(a,c){return u(b._w,a,c,!1)},decrypt:function(a,c){return u(b._w,a,c,!0)}}});b._init=!1};c.aes.Algorithm.prototype.initialize=function(a){if(!this._init){var b=a.key,d;if("string"===typeof b&&(16===b.length||24===b.length||32===b.length))b=c.util.createBuffer(b);else if(c.util.isArray(b)&&(16===b.length||24===b.length||32===b.length)){d=
226 +b;for(var b=c.util.createBuffer(),h=0;h<d.length;++h)b.putByte(d[h])}if(!c.util.isArray(b)){d=b;var b=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)b.push(d.getInt32())}if(!c.util.isArray(b)||4!==b.length&&6!==b.length&&8!==b.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(b,a.decrypt&&!d);this._init=!0}};c.aes._expandKey=function(a,c){h||d();return e(a,c)};c.aes._updateBlock=u;b("AES-ECB",c.cipher.modes.ecb);b("AES-CBC",
227 +c.cipher.modes.cbc);b("AES-CFB",c.cipher.modes.cfb);b("AES-OFB",c.cipher.modes.ofb);b("AES-CTR",c.cipher.modes.ctr);b("AES-GCM",c.cipher.modes.gcm);var h=!1,g=4,D,m,E,x,w}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.aes)return b.aes;b.defined.aes=
228 !0;for(var k=0;k<e.length;++k)e[k](b);return b.aes}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){c.pki=c.pki||{};c=c.pki.oids=c.oids=c.oids||{};c["1.2.840.113549.1.1.1"]="rsaEncryption";
229 c.rsaEncryption="1.2.840.113549.1.1.1";c["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";c.md5WithRSAEncryption="1.2.840.113549.1.1.4";c["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";c.sha1WithRSAEncryption="1.2.840.113549.1.1.5";c["1.2.840.113549.1.1.7"]="RSAES-OAEP";c["RSAES-OAEP"]="1.2.840.113549.1.1.7";c["1.2.840.113549.1.1.8"]="mgf1";c.mgf1="1.2.840.113549.1.1.8";c["1.2.840.113549.1.1.9"]="pSpecified";c.pSpecified="1.2.840.113549.1.1.9";c["1.2.840.113549.1.1.10"]="RSASSA-PSS";c["RSASSA-PSS"]=
230 "1.2.840.113549.1.1.10";c["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";c.sha256WithRSAEncryption="1.2.840.113549.1.1.11";c["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";c.sha384WithRSAEncryption="1.2.840.113549.1.1.12";c["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";c.sha512WithRSAEncryption="1.2.840.113549.1.1.13";c["1.3.14.3.2.7"]="desCBC";c.desCBC="1.3.14.3.2.7";c["1.3.14.3.2.26"]="sha1";c.sha1="1.3.14.3.2.26";c["2.16.840.1.101.3.4.2.1"]="sha256";c.sha256="2.16.840.1.101.3.4.2.1";
@@ -241,90 +242,90 @@ c["2.5.29.33"]="policyMappings";c["2.5.29.34"]="policyConstraints";c["2.5.29.35"
242 c.emailProtection="1.3.6.1.5.5.7.3.4";c["1.3.6.1.5.5.7.3.8"]="timeStamping";c.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.oids)return b.oids;b.defined.oids=!0;for(var k=0;k<e.length;++k)e[k](b);return b.oids}},
243 r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/oids",["require","module"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){var b=c.asn1=c.asn1||{};b.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};b.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
244 ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};b.create=function(a,b,d,g){if(c.util.isArray(g)){for(var e=[],m=0;m<g.length;++m)void 0!==g[m]&&e.push(g[m]);g=e}return{tagClass:a,type:b,constructed:d,composed:d||c.util.isArray(g),value:g}};var d=b.getBerValueLength=function(a){var c=a.getByte();if(128!==c)return c&128?a.getInt((c&127)<<3):c};b.fromDer=function(a,e){void 0===e&&(e=!0);
244 -"string"===typeof a&&(a=c.util.createBuffer(a));if(2>a.length()){var h=Error("Too few bytes to parse DER.");h.bytes=a.length();throw h;}var g=a.getByte(),h=g&192,f=g&31,m=d(a);if(a.length()<m){if(e)throw h=Error("Too few bytes to read ASN.1 value."),h.detail=a.length()+" < "+m,h;m=a.length()}var D,y=32===(g&32);D=y;if(!D&&h===b.Class.UNIVERSAL&&f===b.Type.BITSTRING&&1<m){var w=a.read;if(0===a.getByte()&&(g=a.getByte(),g&=192,g===b.Class.UNIVERSAL||g===b.Class.CONTEXT_SPECIFIC))try{if(D=d(a)===m-(a.read-
245 -w))++w,--m}catch(F){}a.read=w}if(D)if(D=[],void 0===m)for(;;){if(a.bytes(2)===String.fromCharCode(0,0)){a.getBytes(2);break}D.push(b.fromDer(a,e))}else for(w=a.length();0<m;)D.push(b.fromDer(a,e)),m-=w-a.length(),w=a.length();else{if(void 0===m){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");m=a.length()}if(f===b.Type.BMPSTRING)for(D="",w=0;w<m;w+=2)D+=String.fromCharCode(a.getInt16());else D=a.getBytes(m)}return b.create(h,f,y,D)};b.toDer=function(a){var d=c.util.createBuffer(),
245 +"string"===typeof a&&(a=c.util.createBuffer(a));if(2>a.length()){var h=Error("Too few bytes to parse DER.");h.bytes=a.length();throw h;}var g=a.getByte(),h=g&192,f=g&31,m=d(a);if(a.length()<m){if(e)throw h=Error("Too few bytes to read ASN.1 value."),h.detail=a.length()+" < "+m,h;m=a.length()}var E,x=32===(g&32);E=x;if(!E&&h===b.Class.UNIVERSAL&&f===b.Type.BITSTRING&&1<m){var w=a.read;if(0===a.getByte()&&(g=a.getByte(),g&=192,g===b.Class.UNIVERSAL||g===b.Class.CONTEXT_SPECIFIC))try{if(E=d(a)===m-(a.read-
246 +w))++w,--m}catch(F){}a.read=w}if(E)if(E=[],void 0===m)for(;;){if(a.bytes(2)===String.fromCharCode(0,0)){a.getBytes(2);break}E.push(b.fromDer(a,e))}else for(w=a.length();0<m;)E.push(b.fromDer(a,e)),m-=w-a.length(),w=a.length();else{if(void 0===m){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");m=a.length()}if(f===b.Type.BMPSTRING)for(E="",w=0;w<m;w+=2)E+=String.fromCharCode(a.getInt16());else E=a.getBytes(m)}return b.create(h,f,x,E)};b.toDer=function(a){var d=c.util.createBuffer(),
247 h=a.tagClass|a.type,g=c.util.createBuffer();if(a.composed){a.constructed?h|=32:g.putByte(0);for(var e=0;e<a.value.length;++e)void 0!==a.value[e]&&g.putBuffer(b.toDer(a.value[e]))}else if(a.type===b.Type.BMPSTRING)for(e=0;e<a.value.length;++e)g.putInt16(a.value.charCodeAt(e));else g.putBytes(a.value);d.putByte(h);if(127>=g.length())d.putByte(g.length()&127);else{e=g.length();a="";do a+=String.fromCharCode(e&255),e>>>=8;while(0<e);d.putByte(a.length|128);for(e=a.length-1;0<=e;--e)d.putByte(a.charCodeAt(e))}d.putBuffer(g);
248 return d};b.oidToDer=function(a){a=a.split(".");var b=c.util.createBuffer();b.putByte(40*parseInt(a[0],10)+parseInt(a[1],10));for(var d,g,e,m,k=2;k<a.length;++k){d=!0;g=[];e=parseInt(a[k],10);do m=e&127,e>>>=7,d||(m|=128),g.push(m),d=!1;while(0<e);for(d=g.length-1;0<=d;--d)b.putByte(g[d])}return b};b.derToOid=function(a){var b;"string"===typeof a&&(a=c.util.createBuffer(a));var d=a.getByte();b=Math.floor(d/40)+"."+d%40;for(var g=0;0<a.length();)d=a.getByte(),g<<=7,d&128?g+=d&127:(b+="."+(g+d),g=0);
248 -return b};b.utcTimeToDate=function(a){var c=new Date,b=parseInt(a.substr(0,2),10),b=50<=b?1900+b:2E3+b,l=parseInt(a.substr(2,2),10)-1,d=parseInt(a.substr(4,2),10),e=parseInt(a.substr(6,2),10),k=parseInt(a.substr(8,2),10),f=0;if(11<a.length){var w=a.charAt(10),u=10;"+"!==w&&"-"!==w&&(f=parseInt(a.substr(10,2),10),u+=2)}c.setUTCFullYear(b,l,d);c.setUTCHours(e,k,f,0);u&&(w=a.charAt(u),"+"===w||"-"===w)&&(b=parseInt(a.substr(u+1,2),10),a=parseInt(a.substr(u+4,2),10),a=6E4*(60*b+a),"+"===w?c.setTime(+c-
249 -a):c.setTime(+c+a));return c};b.generalizedTimeToDate=function(a){var c=new Date,b=parseInt(a.substr(0,4),10),l=parseInt(a.substr(4,2),10)-1,d=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),k=parseInt(a.substr(10,2),10),f=parseInt(a.substr(12,2),10),w=0,u=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var J=a.length-5,x=a.charAt(J);if("+"===x||"-"===x)u=parseInt(a.substr(J+1,2),10),J=parseInt(a.substr(J+4,2),10),u=6E4*(60*u+J),"+"===x&&(u*=-1),A=!0;"."===a.charAt(14)&&(w=1E3*parseFloat(a.substr(14),
250 -10));A?(c.setUTCFullYear(b,l,d),c.setUTCHours(e,k,f,w),c.setTime(+c+u)):(c.setFullYear(b,l,d),c.setHours(e,k,f,w));return c};b.dateToUtcTime=function(a){if("string"===typeof a)return a;var c="",b=[];b.push((""+a.getUTCFullYear()).substr(2));b.push(""+(a.getUTCMonth()+1));b.push(""+a.getUTCDate());b.push(""+a.getUTCHours());b.push(""+a.getUTCMinutes());b.push(""+a.getUTCSeconds());for(a=0;a<b.length;++a)2>b[a].length&&(c+="0"),c+=b[a];return c+"Z"};b.dateToGeneralizedTime=function(a){if("string"===
249 +return b};b.utcTimeToDate=function(a){var c=new Date,b=parseInt(a.substr(0,2),10),b=50<=b?1900+b:2E3+b,d=parseInt(a.substr(2,2),10)-1,l=parseInt(a.substr(4,2),10),e=parseInt(a.substr(6,2),10),k=parseInt(a.substr(8,2),10),f=0;if(11<a.length){var w=a.charAt(10),v=10;"+"!==w&&"-"!==w&&(f=parseInt(a.substr(10,2),10),v+=2)}c.setUTCFullYear(b,d,l);c.setUTCHours(e,k,f,0);v&&(w=a.charAt(v),"+"===w||"-"===w)&&(b=parseInt(a.substr(v+1,2),10),a=parseInt(a.substr(v+4,2),10),a=6E4*(60*b+a),"+"===w?c.setTime(+c-
250 +a):c.setTime(+c+a));return c};b.generalizedTimeToDate=function(a){var c=new Date,b=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,l=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),k=parseInt(a.substr(10,2),10),f=parseInt(a.substr(12,2),10),w=0,v=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var J=a.length-5,y=a.charAt(J);if("+"===y||"-"===y)v=parseInt(a.substr(J+1,2),10),J=parseInt(a.substr(J+4,2),10),v=6E4*(60*v+J),"+"===y&&(v*=-1),A=!0;"."===a.charAt(14)&&(w=1E3*parseFloat(a.substr(14),
251 +10));A?(c.setUTCFullYear(b,d,l),c.setUTCHours(e,k,f,w),c.setTime(+c+v)):(c.setFullYear(b,d,l),c.setHours(e,k,f,w));return c};b.dateToUtcTime=function(a){if("string"===typeof a)return a;var c="",b=[];b.push((""+a.getUTCFullYear()).substr(2));b.push(""+(a.getUTCMonth()+1));b.push(""+a.getUTCDate());b.push(""+a.getUTCHours());b.push(""+a.getUTCMinutes());b.push(""+a.getUTCSeconds());for(a=0;a<b.length;++a)2>b[a].length&&(c+="0"),c+=b[a];return c+"Z"};b.dateToGeneralizedTime=function(a){if("string"===
252 typeof a)return a;var c="",b=[];b.push(""+a.getUTCFullYear());b.push(""+(a.getUTCMonth()+1));b.push(""+a.getUTCDate());b.push(""+a.getUTCHours());b.push(""+a.getUTCMinutes());b.push(""+a.getUTCSeconds());for(a=0;a<b.length;++a)2>b[a].length&&(c+="0"),c+=b[a];return c+"Z"};b.integerToDer=function(a){var b=c.util.createBuffer();if(-128<=a&&128>a)return b.putSignedInt(a,8);if(-32768<=a&&32768>a)return b.putSignedInt(a,16);if(-8388608<=a&&8388608>a)return b.putSignedInt(a,24);if(-2147483648<=a&&2147483648>
253 a)return b.putSignedInt(a,32);b=Error("Integer too large; max is 32-bits.");b.integer=a;throw b;};b.derToInteger=function(a){"string"===typeof a&&(a=c.util.createBuffer(a));var b=8*a.length();if(32<b)throw Error("Integer too large; max is 32-bits.");return a.getSignedInt(b)};b.validate=function(a,d,h,g){var e=!1;if(a.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||a.type!==d.type&&"undefined"!==typeof d.type)g&&(a.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
254 '", got "'+a.tagClass+'"'),a.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+a.type+'"'));else if(a.constructed===d.constructed||"undefined"===typeof d.constructed){e=!0;if(d.value&&c.util.isArray(d.value))for(var m=0,f=0;e&&f<d.value.length;++f)e=d.value[f].optional||!1,a.value[m]&&((e=b.validate(a.value[m],d.value[f],h,g))?++m:d.value[f].optional&&(e=!0)),!e&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
255 a.value.length+'"');e&&h&&(d.capture&&(h[d.capture]=a.value),d.captureAsn1&&(h[d.captureAsn1]=a))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+a.constructed+'"');return e};var e=/[^\\u0000-\\u00ff]/;b.prettyPrint=function(a,d,h){var g="";d=d||0;h=h||2;0<d&&(g+="\n");for(var f="",m=0;m<d*h;++m)f+=" ";g+=f+"Tag: ";switch(a.tagClass){case b.Class.UNIVERSAL:g+="Universal:";break;case b.Class.APPLICATION:g+="Application:";break;case b.Class.CONTEXT_SPECIFIC:g+="Context-Specific:";
256 break;case b.Class.PRIVATE:g+="Private:"}if(a.tagClass===b.Class.UNIVERSAL)switch(g+=a.type,a.type){case b.Type.NONE:g+=" (None)";break;case b.Type.BOOLEAN:g+=" (Boolean)";break;case b.Type.BITSTRING:g+=" (Bit string)";break;case b.Type.INTEGER:g+=" (Integer)";break;case b.Type.OCTETSTRING:g+=" (Octet string)";break;case b.Type.NULL:g+=" (Null)";break;case b.Type.OID:g+=" (Object Identifier)";break;case b.Type.ODESC:g+=" (Object Descriptor)";break;case b.Type.EXTERNAL:g+=" (External or Instance of)";
257 break;case b.Type.REAL:g+=" (Real)";break;case b.Type.ENUMERATED:g+=" (Enumerated)";break;case b.Type.EMBEDDED:g+=" (Embedded PDV)";break;case b.Type.UTF8:g+=" (UTF8)";break;case b.Type.ROID:g+=" (Relative Object Identifier)";break;case b.Type.SEQUENCE:g+=" (Sequence)";break;case b.Type.SET:g+=" (Set)";break;case b.Type.PRINTABLESTRING:g+=" (Printable String)";break;case b.Type.IA5String:g+=" (IA5String (ASCII))";break;case b.Type.UTCTIME:g+=" (UTC time)";break;case b.Type.GENERALIZEDTIME:g+=" (Generalized time)";
257 -break;case b.Type.BMPSTRING:g+=" (BMP String)"}else g+=a.type;g=g+"\n"+(f+"Constructed: "+a.constructed+"\n");if(a.composed){for(var u=0,y="",m=0;m<a.value.length;++m)void 0!==a.value[m]&&(u+=1,y+=b.prettyPrint(a.value[m],d+1,h),m+1<a.value.length&&(y+=","));g+=f+"Sub values: "+u+y}else if(g+=f+"Value: ",a.type===b.Type.OID&&(d=b.derToOid(a.value),g+=d,c.pki&&c.pki.oids&&d in c.pki.oids&&(g+=" ("+c.pki.oids[d]+") ")),a.type===b.Type.INTEGER)try{g+=b.derToInteger(a.value)}catch(w){g+="0x"+c.util.bytesToHex(a.value)}else a.type===
258 +break;case b.Type.BMPSTRING:g+=" (BMP String)"}else g+=a.type;g=g+"\n"+(f+"Constructed: "+a.constructed+"\n");if(a.composed){for(var v=0,x="",m=0;m<a.value.length;++m)void 0!==a.value[m]&&(v+=1,x+=b.prettyPrint(a.value[m],d+1,h),m+1<a.value.length&&(x+=","));g+=f+"Sub values: "+v+x}else if(g+=f+"Value: ",a.type===b.Type.OID&&(d=b.derToOid(a.value),g+=d,c.pki&&c.pki.oids&&d in c.pki.oids&&(g+=" ("+c.pki.oids[d]+") ")),a.type===b.Type.INTEGER)try{g+=b.derToInteger(a.value)}catch(w){g+="0x"+c.util.bytesToHex(a.value)}else a.type===
259 b.Type.OCTETSTRING?(e.test(a.value)||(g+="("+a.value+") "),g+="0x"+c.util.bytesToHex(a.value)):g=a.type===b.Type.UTF8?g+c.util.decodeUtf8(a.value):a.type===b.Type.PRINTABLESTRING||a.type===b.Type.IA5String?g+a.value:e.test(a.value)?g+("0x"+c.util.bytesToHex(a.value)):0===a.value.length?g+"[null]":g+a.value;return g}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,
260 b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.asn1)return b.asn1;b.defined.asn1=!0;for(var k=0;k<e.length;++k)e[k](b);return b.asn1}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/asn1",["require","module","./util","./oids"],function(){p.apply(null,Array.prototype.slice.call(arguments,
261 0))})})();(function(){function a(c){function b(){f=String.fromCharCode(128);f+=c.util.fillString(String.fromCharCode(0),64);B=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];h=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];g=Array(64);for(var a=0;64>a;++a)g[a]=Math.floor(4294967296*
261 -Math.abs(Math.sin(a+1)));E=!0}function d(a,c,b){for(var l,e,k,f,x,C,z,u=b.length();64<=u;){e=a.h0;k=a.h1;f=a.h2;x=a.h3;for(z=0;16>z;++z)c[z]=b.getInt32Le(),l=x^k&(f^x),l=e+l+g[z]+c[z],C=h[z],e=x,x=f,f=k,k+=l<<C|l>>>32-C;for(;32>z;++z)l=f^x&(k^f),l=e+l+g[z]+c[B[z]],C=h[z],e=x,x=f,f=k,k+=l<<C|l>>>32-C;for(;48>z;++z)l=k^f^x,l=e+l+g[z]+c[B[z]],C=h[z],e=x,x=f,f=k,k+=l<<C|l>>>32-C;for(;64>z;++z)l=f^(k|~x),l=e+l+g[z]+c[B[z]],C=h[z],e=x,x=f,f=k,k+=l<<C|l>>>32-C;a.h0=a.h0+e|0;a.h1=a.h1+k|0;a.h2=a.h2+f|0;a.h3=
262 -a.h3+x|0;u-=64}}var e=c.md5=c.md5||{};c.md=c.md||{};c.md.algorithms=c.md.algorithms||{};c.md.md5=c.md.algorithms.md5=e;e.create=function(){E||b();var a=null,h=c.util.createBuffer(),g=Array(16),e={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){e.messageLength=0;e.fullMessageLength=e.messageLength64=[];for(var b=e.messageLengthSize/4,d=0;d<b;++d)e.fullMessageLength.push(0);h=c.util.createBuffer();a={h0:1732584193,h1:4023233417,
263 -h2:2562383102,h3:271733878};return e}};e.start();e.update=function(b,k){"utf8"===k&&(b=c.util.encodeUtf8(b));var f=b.length;e.messageLength+=f;for(var f=[f/4294967296>>>0,f>>>0],x=e.fullMessageLength.length-1;0<=x;--x)e.fullMessageLength[x]+=f[1],f[1]=f[0]+(e.fullMessageLength[x]/4294967296>>>0),e.fullMessageLength[x]>>>=0,f[0]=f[1]/4294967296>>>0;h.putBytes(b);d(a,g,h);(2048<h.read||0===h.length())&&h.compact();return e};e.digest=function(){var b=c.util.createBuffer();b.putBytes(h.bytes());b.putBytes(f.substr(0,
264 -e.blockLength-(e.fullMessageLength[e.fullMessageLength.length-1]+e.messageLengthSize&e.blockLength-1)));for(var k,E=0,x=e.fullMessageLength.length-1;0<=x;--x)k=8*e.fullMessageLength[x]+E,E=k/4294967296>>>0,b.putInt32Le(k>>>0);k={h0:a.h0,h1:a.h1,h2:a.h2,h3:a.h3};d(k,g,b);b=c.util.createBuffer();b.putInt32Le(k.h0);b.putInt32Le(k.h1);b.putInt32Le(k.h2);b.putInt32Le(k.h3);return b};return e};var f=null,B=null,h=null,g=null,E=!1}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=
262 +Math.abs(Math.sin(a+1)));D=!0}function d(a,c,b){for(var l,e,k,f,y,C,z,v=b.length();64<=v;){e=a.h0;k=a.h1;f=a.h2;y=a.h3;for(z=0;16>z;++z)c[z]=b.getInt32Le(),l=y^k&(f^y),l=e+l+g[z]+c[z],C=h[z],e=y,y=f,f=k,k+=l<<C|l>>>32-C;for(;32>z;++z)l=f^y&(k^f),l=e+l+g[z]+c[B[z]],C=h[z],e=y,y=f,f=k,k+=l<<C|l>>>32-C;for(;48>z;++z)l=k^f^y,l=e+l+g[z]+c[B[z]],C=h[z],e=y,y=f,f=k,k+=l<<C|l>>>32-C;for(;64>z;++z)l=f^(k|~y),l=e+l+g[z]+c[B[z]],C=h[z],e=y,y=f,f=k,k+=l<<C|l>>>32-C;a.h0=a.h0+e|0;a.h1=a.h1+k|0;a.h2=a.h2+f|0;a.h3=
263 +a.h3+y|0;v-=64}}var e=c.md5=c.md5||{};c.md=c.md||{};c.md.algorithms=c.md.algorithms||{};c.md.md5=c.md.algorithms.md5=e;e.create=function(){D||b();var a=null,h=c.util.createBuffer(),g=Array(16),e={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){e.messageLength=0;e.fullMessageLength=e.messageLength64=[];for(var b=e.messageLengthSize/4,d=0;d<b;++d)e.fullMessageLength.push(0);h=c.util.createBuffer();a={h0:1732584193,h1:4023233417,
264 +h2:2562383102,h3:271733878};return e}};e.start();e.update=function(b,k){"utf8"===k&&(b=c.util.encodeUtf8(b));var f=b.length;e.messageLength+=f;for(var f=[f/4294967296>>>0,f>>>0],y=e.fullMessageLength.length-1;0<=y;--y)e.fullMessageLength[y]+=f[1],f[1]=f[0]+(e.fullMessageLength[y]/4294967296>>>0),e.fullMessageLength[y]>>>=0,f[0]=f[1]/4294967296>>>0;h.putBytes(b);d(a,g,h);(2048<h.read||0===h.length())&&h.compact();return e};e.digest=function(){var b=c.util.createBuffer();b.putBytes(h.bytes());b.putBytes(f.substr(0,
265 +e.blockLength-(e.fullMessageLength[e.fullMessageLength.length-1]+e.messageLengthSize&e.blockLength-1)));for(var k,D=0,y=e.fullMessageLength.length-1;0<=y;--y)k=8*e.fullMessageLength[y]+D,D=k/4294967296>>>0,b.putInt32Le(k>>>0);k={h0:a.h0,h1:a.h1,h2:a.h2,h3:a.h3};d(k,g,b);b=c.util.createBuffer();b.putInt32Le(k.h0);b.putInt32Le(k.h1);b.putInt32Le(k.h2);b.putInt32Le(k.h3);return b};return e};var f=null,B=null,h=null,g=null,D=!1}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=
266 !0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.md5)return b.md5;b.defined.md5=!0;for(var k=0;k<e.length;++k)e[k](b);return b.md5}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,
266 -0))};c("js/md5",["require","module","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,c,d){for(var l,e,k,f,u,v,A,n,x=d.length();64<=x;){e=a.h0;k=a.h1;f=a.h2;u=a.h3;v=a.h4;for(n=0;16>n;++n)l=d.getInt32(),c[n]=l,A=u^k&(f^u),l=(e<<5|e>>>27)+A+v+1518500249+l,v=u,u=f,f=k<<30|k>>>2,k=e,e=l;for(;20>n;++n)l=c[n-3]^c[n-8]^c[n-14]^c[n-16],l=l<<1|l>>>31,c[n]=l,A=u^k&(f^u),l=(e<<5|e>>>27)+A+v+1518500249+l,v=u,u=f,f=k<<30|k>>>2,k=e,e=l;for(;32>
267 -n;++n)l=c[n-3]^c[n-8]^c[n-14]^c[n-16],l=l<<1|l>>>31,c[n]=l,A=k^f^u,l=(e<<5|e>>>27)+A+v+1859775393+l,v=u,u=f,f=k<<30|k>>>2,k=e,e=l;for(;40>n;++n)l=c[n-6]^c[n-16]^c[n-28]^c[n-32],l=l<<2|l>>>30,c[n]=l,A=k^f^u,l=(e<<5|e>>>27)+A+v+1859775393+l,v=u,u=f,f=k<<30|k>>>2,k=e,e=l;for(;60>n;++n)l=c[n-6]^c[n-16]^c[n-28]^c[n-32],l=l<<2|l>>>30,c[n]=l,A=k&f|u&(k^f),l=(e<<5|e>>>27)+A+v+2400959708+l,v=u,u=f,f=k<<30|k>>>2,k=e,e=l;for(;80>n;++n)l=c[n-6]^c[n-16]^c[n-28]^c[n-32],l=l<<2|l>>>30,c[n]=l,A=k^f^u,l=(e<<5|e>>>
268 -27)+A+v+3395469782+l,v=u,u=f,f=k<<30|k>>>2,k=e,e=l;a.h0=a.h0+e|0;a.h1=a.h1+k|0;a.h2=a.h2+f|0;a.h3=a.h3+u|0;a.h4=a.h4+v|0;x-=64}}var d=c.sha1=c.sha1||{};c.md=c.md||{};c.md.algorithms=c.md.algorithms||{};c.md.sha1=c.md.algorithms.sha1=d;d.create=function(){f||(e=String.fromCharCode(128),e+=c.util.fillString(String.fromCharCode(0),64),f=!0);var a=null,d=c.util.createBuffer(),g=Array(80),u={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=
269 -0;u.fullMessageLength=u.messageLength64=[];for(var b=u.messageLengthSize/4,g=0;g<b;++g)u.fullMessageLength.push(0);d=c.util.createBuffer();a={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return u}};u.start();u.update=function(e,f){"utf8"===f&&(e=c.util.encodeUtf8(e));var v=e.length;u.messageLength+=v;for(var v=[v/4294967296>>>0,v>>>0],w=u.fullMessageLength.length-1;0<=w;--w)u.fullMessageLength[w]+=v[1],v[1]=v[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=
270 -0,v[0]=v[1]/4294967296>>>0;d.putBytes(e);b(a,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var m=c.util.createBuffer();m.putBytes(d.bytes());m.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));c.util.createBuffer();for(var f,v,w=8*u.fullMessageLength[0],F=0;F<u.fullMessageLength.length;++F)f=8*u.fullMessageLength[F+1],v=f/4294967296>>>0,w+=v,m.putInt32(w>>>0),w=f;f={h0:a.h0,h1:a.h1,h2:a.h2,h3:a.h3,
271 -h4:a.h4};b(f,g,m);m=c.util.createBuffer();m.putInt32(f.h0);m.putInt32(f.h1);m.putInt32(f.h2);m.putInt32(f.h3);m.putInt32(f.h4);return m};return u};var e=null,f=!1}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.sha1)return b.sha1;b.defined.sha1=
272 -!0;for(var k=0;k<e.length;++k)e[k](b);return b.sha1}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/sha1",["require","module","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,c,d){for(var l,e,k,f,u,v,J,x,C,z,G,p,q,r=d.length();64<=r;){for(u=0;16>u;++u)c[u]=d.getInt32();
273 -for(;64>u;++u)l=c[u-2],l=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,e=c[u-15],e=(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3,c[u]=l+c[u-7]+e+c[u-16]|0;v=a.h0;J=a.h1;x=a.h2;C=a.h3;z=a.h4;G=a.h5;p=a.h6;q=a.h7;for(u=0;64>u;++u)l=(z>>>6|z<<26)^(z>>>11|z<<21)^(z>>>25|z<<7),k=p^z&(G^p),e=(v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10),f=v&J|x&(v^J),l=q+l+k+n[u]+c[u],e+=f,q=p,p=G,G=z,z=C+l|0,C=x,x=J,J=v,v=l+e|0;a.h0=a.h0+v|0;a.h1=a.h1+J|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+z|0;a.h5=a.h5+G|0;a.h6=a.h6+p|0;a.h7=a.h7+q|0;r-=
267 +0))};c("js/md5",["require","module","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,c,d){for(var l,e,k,f,v,u,A,n,y=d.length();64<=y;){e=a.h0;k=a.h1;f=a.h2;v=a.h3;u=a.h4;for(n=0;16>n;++n)l=d.getInt32(),c[n]=l,A=v^k&(f^v),l=(e<<5|e>>>27)+A+u+1518500249+l,u=v,v=f,f=k<<30|k>>>2,k=e,e=l;for(;20>n;++n)l=c[n-3]^c[n-8]^c[n-14]^c[n-16],l=l<<1|l>>>31,c[n]=l,A=v^k&(f^v),l=(e<<5|e>>>27)+A+u+1518500249+l,u=v,v=f,f=k<<30|k>>>2,k=e,e=l;for(;32>
268 +n;++n)l=c[n-3]^c[n-8]^c[n-14]^c[n-16],l=l<<1|l>>>31,c[n]=l,A=k^f^v,l=(e<<5|e>>>27)+A+u+1859775393+l,u=v,v=f,f=k<<30|k>>>2,k=e,e=l;for(;40>n;++n)l=c[n-6]^c[n-16]^c[n-28]^c[n-32],l=l<<2|l>>>30,c[n]=l,A=k^f^v,l=(e<<5|e>>>27)+A+u+1859775393+l,u=v,v=f,f=k<<30|k>>>2,k=e,e=l;for(;60>n;++n)l=c[n-6]^c[n-16]^c[n-28]^c[n-32],l=l<<2|l>>>30,c[n]=l,A=k&f|v&(k^f),l=(e<<5|e>>>27)+A+u+2400959708+l,u=v,v=f,f=k<<30|k>>>2,k=e,e=l;for(;80>n;++n)l=c[n-6]^c[n-16]^c[n-28]^c[n-32],l=l<<2|l>>>30,c[n]=l,A=k^f^v,l=(e<<5|e>>>
269 +27)+A+u+3395469782+l,u=v,v=f,f=k<<30|k>>>2,k=e,e=l;a.h0=a.h0+e|0;a.h1=a.h1+k|0;a.h2=a.h2+f|0;a.h3=a.h3+v|0;a.h4=a.h4+u|0;y-=64}}var d=c.sha1=c.sha1||{};c.md=c.md||{};c.md.algorithms=c.md.algorithms||{};c.md.sha1=c.md.algorithms.sha1=d;d.create=function(){f||(e=String.fromCharCode(128),e+=c.util.fillString(String.fromCharCode(0),64),f=!0);var a=null,d=c.util.createBuffer(),g=Array(80),v={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){v.messageLength=
270 +0;v.fullMessageLength=v.messageLength64=[];for(var b=v.messageLengthSize/4,g=0;g<b;++g)v.fullMessageLength.push(0);d=c.util.createBuffer();a={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return v}};v.start();v.update=function(e,f){"utf8"===f&&(e=c.util.encodeUtf8(e));var u=e.length;v.messageLength+=u;for(var u=[u/4294967296>>>0,u>>>0],w=v.fullMessageLength.length-1;0<=w;--w)v.fullMessageLength[w]+=u[1],u[1]=u[0]+(v.fullMessageLength[w]/4294967296>>>0),v.fullMessageLength[w]>>>=
271 +0,u[0]=u[1]/4294967296>>>0;d.putBytes(e);b(a,g,d);(2048<d.read||0===d.length())&&d.compact();return v};v.digest=function(){var m=c.util.createBuffer();m.putBytes(d.bytes());m.putBytes(e.substr(0,v.blockLength-(v.fullMessageLength[v.fullMessageLength.length-1]+v.messageLengthSize&v.blockLength-1)));c.util.createBuffer();for(var f,u,w=8*v.fullMessageLength[0],F=0;F<v.fullMessageLength.length;++F)f=8*v.fullMessageLength[F+1],u=f/4294967296>>>0,w+=u,m.putInt32(w>>>0),w=f;f={h0:a.h0,h1:a.h1,h2:a.h2,h3:a.h3,
272 +h4:a.h4};b(f,g,m);m=c.util.createBuffer();m.putInt32(f.h0);m.putInt32(f.h1);m.putInt32(f.h2);m.putInt32(f.h3);m.putInt32(f.h4);return m};return v};var e=null,f=!1}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.sha1)return b.sha1;b.defined.sha1=
273 +!0;for(var k=0;k<e.length;++k)e[k](b);return b.sha1}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/sha1",["require","module","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,c,d){for(var l,e,k,f,v,u,J,y,C,z,G,p,q,r=d.length();64<=r;){for(v=0;16>v;++v)c[v]=d.getInt32();
274 +for(;64>v;++v)l=c[v-2],l=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,e=c[v-15],e=(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3,c[v]=l+c[v-7]+e+c[v-16]|0;u=a.h0;J=a.h1;y=a.h2;C=a.h3;z=a.h4;G=a.h5;p=a.h6;q=a.h7;for(v=0;64>v;++v)l=(z>>>6|z<<26)^(z>>>11|z<<21)^(z>>>25|z<<7),k=p^z&(G^p),e=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),f=u&J|y&(u^J),l=q+l+k+n[v]+c[v],e+=f,q=p,p=G,G=z,z=C+l|0,C=y,y=J,J=u,u=l+e|0;a.h0=a.h0+u|0;a.h1=a.h1+J|0;a.h2=a.h2+y|0;a.h3=a.h3+C|0;a.h4=a.h4+z|0;a.h5=a.h5+G|0;a.h6=a.h6+p|0;a.h7=a.h7+q|0;r-=
275 64}}var d=c.sha256=c.sha256||{};c.md=c.md||{};c.md.algorithms=c.md.algorithms||{};c.md.sha256=c.md.algorithms.sha256=d;d.create=function(){f||(e=String.fromCharCode(128),e+=c.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
275 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],f=!0);var a=null,d=c.util.createBuffer(),u=Array(64),m={algorithm:"sha256",blockLength:64,digestLength:32,
276 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var b=m.messageLengthSize/4,e=0;e<b;++e)m.fullMessageLength.push(0);d=c.util.createBuffer();a={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return m}};m.start();m.update=function(e,f){"utf8"===f&&(e=c.util.encodeUtf8(e));var v=e.length;m.messageLength+=v;for(var v=[v/4294967296>>>0,v>>>0],F=m.fullMessageLength.length-
277 -1;0<=F;--F)m.fullMessageLength[F]+=v[1],v[1]=v[0]+(m.fullMessageLength[F]/4294967296>>>0),m.fullMessageLength[F]>>>=0,v[0]=v[1]/4294967296>>>0;d.putBytes(e);b(a,u,d);(2048<d.read||0===d.length())&&d.compact();return m};m.digest=function(){var f=c.util.createBuffer();f.putBytes(d.bytes());f.putBytes(e.substr(0,m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));c.util.createBuffer();for(var v,w,F=8*m.fullMessageLength[0],n=0;n<m.fullMessageLength.length;++n)v=
278 -8*m.fullMessageLength[n+1],w=v/4294967296>>>0,F+=w,f.putInt32(F>>>0),F=v;v={h0:a.h0,h1:a.h1,h2:a.h2,h3:a.h3,h4:a.h4,h5:a.h5,h6:a.h6,h7:a.h7};b(v,u,f);f=c.util.createBuffer();f.putInt32(v.h0);f.putInt32(v.h1);f.putInt32(v.h2);f.putInt32(v.h3);f.putInt32(v.h4);f.putInt32(v.h5);f.putInt32(v.h6);f.putInt32(v.h7);return f};return m};var e=null,f=!1,n=null}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge=
276 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],f=!0);var a=null,d=c.util.createBuffer(),v=Array(64),m={algorithm:"sha256",blockLength:64,digestLength:32,
277 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var b=m.messageLengthSize/4,e=0;e<b;++e)m.fullMessageLength.push(0);d=c.util.createBuffer();a={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return m}};m.start();m.update=function(e,f){"utf8"===f&&(e=c.util.encodeUtf8(e));var u=e.length;m.messageLength+=u;for(var u=[u/4294967296>>>0,u>>>0],F=m.fullMessageLength.length-
278 +1;0<=F;--F)m.fullMessageLength[F]+=u[1],u[1]=u[0]+(m.fullMessageLength[F]/4294967296>>>0),m.fullMessageLength[F]>>>=0,u[0]=u[1]/4294967296>>>0;d.putBytes(e);b(a,v,d);(2048<d.read||0===d.length())&&d.compact();return m};m.digest=function(){var f=c.util.createBuffer();f.putBytes(d.bytes());f.putBytes(e.substr(0,m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));c.util.createBuffer();for(var u,w,F=8*m.fullMessageLength[0],n=0;n<m.fullMessageLength.length;++n)u=
279 +8*m.fullMessageLength[n+1],w=u/4294967296>>>0,F+=w,f.putInt32(F>>>0),F=u;u={h0:a.h0,h1:a.h1,h2:a.h2,h3:a.h3,h4:a.h4,h5:a.h5,h6:a.h6,h7:a.h7};b(u,v,f);f=c.util.createBuffer();f.putInt32(u.h0);f.putInt32(u.h1);f.putInt32(u.h2);f.putInt32(u.h3);f.putInt32(u.h4);f.putInt32(u.h5);f.putInt32(u.h6);f.putInt32(u.h7);return f};return m};var e=null,f=!1,n=null}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge=
280 {}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.sha256)return b.sha256;b.defined.sha256=!0;for(var k=0;k<e.length;++k)e[k](b);return b.sha256}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/sha256",["require","module","./util"],function(){p.apply(null,
280 -Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,c,d){for(var l,e,g,k,f,x,C,z,u,v,q,n,B,K,S,L,p,r,T,R,V,P,I,H,N,Y=d.length();128<=Y;){for(N=0;16>N;++N)c[N][0]=d.getInt32()>>>0,c[N][1]=d.getInt32()>>>0;for(;80>N;++N)f=c[N-2],u=f[0],f=f[1],l=((u>>>19|f<<13)^(f>>>29|u<<3)^u>>>6)>>>0,e=((u<<13|f>>>19)^(f<<3|u>>>29)^(u<<26|f>>>6))>>>0,f=c[N-15],u=f[0],f=f[1],g=((u>>>1|f<<31)^(u>>>8|f<<24)^u>>>7)>>>0,k=((u<<31|f>>>1)^(u<<24|f>>>8)^(u<<25|f>>>7))>>>0,u=c[N-7],v=c[N-16],
281 -f=e+u[1]+k+v[1],c[N][0]=l+u[0]+g+v[0]+(f/4294967296>>>0)>>>0,c[N][1]=f>>>0;u=a[0][0];v=a[0][1];q=a[1][0];n=a[1][1];B=a[2][0];K=a[2][1];S=a[3][0];L=a[3][1];p=a[4][0];r=a[4][1];T=a[5][0];R=a[5][1];V=a[6][0];P=a[6][1];I=a[7][0];H=a[7][1];for(N=0;80>N;++N)l=((p>>>14|r<<18)^(p>>>18|r<<14)^(r>>>9|p<<23))>>>0,f=((p<<18|r>>>14)^(p<<14|r>>>18)^(r<<23|p>>>9))>>>0,e=(V^p&(T^V))>>>0,x=(P^r&(R^P))>>>0,g=((u>>>28|v<<4)^(v>>>2|u<<30)^(v>>>7|u<<25))>>>0,k=((u<<4|v>>>28)^(v<<30|u>>>2)^(v<<25|u>>>7))>>>0,C=(u&q|B&
282 -(u^q))>>>0,z=(v&n|K&(v^n))>>>0,f=H+f+x+h[N][1]+c[N][1],l=I+l+e+h[N][0]+c[N][0]+(f/4294967296>>>0)>>>0,e=f>>>0,f=k+z,g=g+C+(f/4294967296>>>0)>>>0,k=f>>>0,I=V,H=P,V=T,P=R,T=p,R=r,f=L+e,p=S+l+(f/4294967296>>>0)>>>0,r=f>>>0,S=B,L=K,B=q,K=n,q=u,n=v,f=e+k,u=l+g+(f/4294967296>>>0)>>>0,v=f>>>0;f=a[0][1]+v;a[0][0]=a[0][0]+u+(f/4294967296>>>0)>>>0;a[0][1]=f>>>0;f=a[1][1]+n;a[1][0]=a[1][0]+q+(f/4294967296>>>0)>>>0;a[1][1]=f>>>0;f=a[2][1]+K;a[2][0]=a[2][0]+B+(f/4294967296>>>0)>>>0;a[2][1]=f>>>0;f=a[3][1]+L;a[3][0]=
283 -a[3][0]+S+(f/4294967296>>>0)>>>0;a[3][1]=f>>>0;f=a[4][1]+r;a[4][0]=a[4][0]+p+(f/4294967296>>>0)>>>0;a[4][1]=f>>>0;f=a[5][1]+R;a[5][0]=a[5][0]+T+(f/4294967296>>>0)>>>0;a[5][1]=f>>>0;f=a[6][1]+P;a[6][0]=a[6][0]+V+(f/4294967296>>>0)>>>0;a[6][1]=f>>>0;f=a[7][1]+H;a[7][0]=a[7][0]+I+(f/4294967296>>>0)>>>0;a[7][1]=f>>>0;Y-=128}}var d=c.sha512=c.sha512||{};c.md=c.md||{};c.md.algorithms=c.md.algorithms||{};c.md.sha512=c.md.algorithms.sha512=d;var e=c.sha384=c.sha512.sha384=c.sha512.sha384||{};e.create=function(){return d.create("SHA-384")};
281 +Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,c,d){for(var l,e,g,k,f,y,C,z,u,v,q,n,B,K,P,L,p,r,T,S,V,R,I,H,N,Y=d.length();128<=Y;){for(N=0;16>N;++N)c[N][0]=d.getInt32()>>>0,c[N][1]=d.getInt32()>>>0;for(;80>N;++N)f=c[N-2],u=f[0],f=f[1],l=((u>>>19|f<<13)^(f>>>29|u<<3)^u>>>6)>>>0,e=((u<<13|f>>>19)^(f<<3|u>>>29)^(u<<26|f>>>6))>>>0,f=c[N-15],u=f[0],f=f[1],g=((u>>>1|f<<31)^(u>>>8|f<<24)^u>>>7)>>>0,k=((u<<31|f>>>1)^(u<<24|f>>>8)^(u<<25|f>>>7))>>>0,u=c[N-7],v=c[N-16],
282 +f=e+u[1]+k+v[1],c[N][0]=l+u[0]+g+v[0]+(f/4294967296>>>0)>>>0,c[N][1]=f>>>0;u=a[0][0];v=a[0][1];q=a[1][0];n=a[1][1];B=a[2][0];K=a[2][1];P=a[3][0];L=a[3][1];p=a[4][0];r=a[4][1];T=a[5][0];S=a[5][1];V=a[6][0];R=a[6][1];I=a[7][0];H=a[7][1];for(N=0;80>N;++N)l=((p>>>14|r<<18)^(p>>>18|r<<14)^(r>>>9|p<<23))>>>0,f=((p<<18|r>>>14)^(p<<14|r>>>18)^(r<<23|p>>>9))>>>0,e=(V^p&(T^V))>>>0,y=(R^r&(S^R))>>>0,g=((u>>>28|v<<4)^(v>>>2|u<<30)^(v>>>7|u<<25))>>>0,k=((u<<4|v>>>28)^(v<<30|u>>>2)^(v<<25|u>>>7))>>>0,C=(u&q|B&
283 +(u^q))>>>0,z=(v&n|K&(v^n))>>>0,f=H+f+y+h[N][1]+c[N][1],l=I+l+e+h[N][0]+c[N][0]+(f/4294967296>>>0)>>>0,e=f>>>0,f=k+z,g=g+C+(f/4294967296>>>0)>>>0,k=f>>>0,I=V,H=R,V=T,R=S,T=p,S=r,f=L+e,p=P+l+(f/4294967296>>>0)>>>0,r=f>>>0,P=B,L=K,B=q,K=n,q=u,n=v,f=e+k,u=l+g+(f/4294967296>>>0)>>>0,v=f>>>0;f=a[0][1]+v;a[0][0]=a[0][0]+u+(f/4294967296>>>0)>>>0;a[0][1]=f>>>0;f=a[1][1]+n;a[1][0]=a[1][0]+q+(f/4294967296>>>0)>>>0;a[1][1]=f>>>0;f=a[2][1]+K;a[2][0]=a[2][0]+B+(f/4294967296>>>0)>>>0;a[2][1]=f>>>0;f=a[3][1]+L;a[3][0]=
284 +a[3][0]+P+(f/4294967296>>>0)>>>0;a[3][1]=f>>>0;f=a[4][1]+r;a[4][0]=a[4][0]+p+(f/4294967296>>>0)>>>0;a[4][1]=f>>>0;f=a[5][1]+S;a[5][0]=a[5][0]+T+(f/4294967296>>>0)>>>0;a[5][1]=f>>>0;f=a[6][1]+R;a[6][0]=a[6][0]+V+(f/4294967296>>>0)>>>0;a[6][1]=f>>>0;f=a[7][1]+H;a[7][0]=a[7][0]+I+(f/4294967296>>>0)>>>0;a[7][1]=f>>>0;Y-=128}}var d=c.sha512=c.sha512||{};c.md=c.md||{};c.md.algorithms=c.md.algorithms||{};c.md.sha512=c.md.algorithms.sha512=d;var e=c.sha384=c.sha512.sha384=c.sha512.sha384||{};e.create=function(){return d.create("SHA-384")};
285 c.md.sha384=c.md.algorithms.sha384=e;c.sha512.sha256=c.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};c.md["sha512/256"]=c.md.algorithms["sha512/256"]=c.sha512.sha256;c.sha512.sha224=c.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};c.md["sha512/224"]=c.md.algorithms["sha512/224"]=c.sha512.sha224;d.create=function(a){n||(f=String.fromCharCode(128),f+=c.util.fillString(String.fromCharCode(0),128),h=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],
286 [3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,
287 3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],
288 [4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,
289 4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],g={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,
290 3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],
290 -[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof a&&(a="SHA-512");if(!(a in g))throw Error("Invalid SHA-512 algorithm: "+a);for(var d=g[a],e=null,u=c.util.createBuffer(),w=Array(80),F=0;80>F;++F)w[F]=Array(2);var A={algorithm:a.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=0;A.fullMessageLength=A.messageLength128=[];for(var a=A.messageLengthSize/
291 -4,b=0;b<a;++b)A.fullMessageLength.push(0);u=c.util.createBuffer();e=Array(d.length);for(b=0;b<d.length;++b)e[b]=d[b].slice(0);return A}};A.start();A.update=function(a,d){"utf8"===d&&(a=c.util.encodeUtf8(a));var g=a.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],h=A.fullMessageLength.length-1;0<=h;--h)A.fullMessageLength[h]+=g[1],g[1]=g[0]+(A.fullMessageLength[h]/4294967296>>>0),A.fullMessageLength[h]>>>=0,g[0]=g[1]/4294967296>>>0;u.putBytes(a);b(e,w,u);(2048<u.read||0===u.length())&&
292 -u.compact();return A};A.digest=function(){var d=c.util.createBuffer();d.putBytes(u.bytes());d.putBytes(f.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));c.util.createBuffer();for(var g,h,m=8*A.fullMessageLength[0],G=0;G<A.fullMessageLength.length;++G)g=8*A.fullMessageLength[G+1],h=g/4294967296>>>0,m+=h,d.putInt32(m>>>0),m=g;g=Array(e.length);for(G=0;G<e.length;++G)g[G]=e[G].slice(0);b(g,w,d);d=c.util.createBuffer();h="SHA-512"===a?g.length:
291 +[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof a&&(a="SHA-512");if(!(a in g))throw Error("Invalid SHA-512 algorithm: "+a);for(var d=g[a],e=null,v=c.util.createBuffer(),w=Array(80),F=0;80>F;++F)w[F]=Array(2);var A={algorithm:a.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=0;A.fullMessageLength=A.messageLength128=[];for(var a=A.messageLengthSize/
292 +4,b=0;b<a;++b)A.fullMessageLength.push(0);v=c.util.createBuffer();e=Array(d.length);for(b=0;b<d.length;++b)e[b]=d[b].slice(0);return A}};A.start();A.update=function(a,d){"utf8"===d&&(a=c.util.encodeUtf8(a));var g=a.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],h=A.fullMessageLength.length-1;0<=h;--h)A.fullMessageLength[h]+=g[1],g[1]=g[0]+(A.fullMessageLength[h]/4294967296>>>0),A.fullMessageLength[h]>>>=0,g[0]=g[1]/4294967296>>>0;v.putBytes(a);b(e,w,v);(2048<v.read||0===v.length())&&
293 +v.compact();return A};A.digest=function(){var d=c.util.createBuffer();d.putBytes(v.bytes());d.putBytes(f.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));c.util.createBuffer();for(var g,h,m=8*A.fullMessageLength[0],G=0;G<A.fullMessageLength.length;++G)g=8*A.fullMessageLength[G+1],h=g/4294967296>>>0,m+=h,d.putInt32(m>>>0),m=g;g=Array(e.length);for(G=0;G<e.length;++G)g[G]=e[G].slice(0);b(g,w,d);d=c.util.createBuffer();h="SHA-512"===a?g.length:
294 "SHA-384"===a?g.length-2:g.length-4;for(G=0;G<h;++G)d.putInt32(g[G][0]),G===h-1&&"SHA-512/224"===a||d.putInt32(g[G][1]);return d};return A};var f=null,n=!1,h=null,g=null}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.sha512)return b.sha512;b.defined.sha512=
295 !0;for(var k=0;k<e.length;++k)e[k](b);return b.sha512}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/sha512",["require","module","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){c.md=c.md||{};c.md.algorithms={md5:c.md5,sha1:c.sha1,sha256:c.sha256};c.md.md5=c.md5;c.md.sha1=c.sha1;
296 c.md.sha256=c.sha256}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.md)return b.md;b.defined.md=!0;for(var k=0;k<e.length;++k)e[k](b);return b.md}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,
297 Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){(c.hmac=c.hmac||{}).create=function(){var a=null,b=null,d=null,f={start:function(f,h){if(null!==f)if("string"===typeof f)if(f=f.toLowerCase(),f in c.md.algorithms)a=c.md.algorithms[f].create();else throw Error('Unknown hash algorithm "'+
297 -f+'"');else a=f;if(null!==h){if("string"===typeof h)h=c.util.createBuffer(h);else if(c.util.isArray(h)){var g=h;h=c.util.createBuffer();for(var v=0;v<g.length;++v)h.putByte(g[v])}var m=h.length();m>a.blockLength&&(a.start(),a.update(h.bytes()),h=a.digest());b=c.util.createBuffer();d=c.util.createBuffer();m=h.length();for(v=0;v<m;++v)g=h.at(v),b.putByte(54^g),d.putByte(92^g);if(m<a.blockLength)for(g=a.blockLength-m,v=0;v<g;++v)b.putByte(54),d.putByte(92);b=b.bytes();d=d.bytes()}a.start();a.update(b)},
298 +f+'"');else a=f;if(null!==h){if("string"===typeof h)h=c.util.createBuffer(h);else if(c.util.isArray(h)){var g=h;h=c.util.createBuffer();for(var u=0;u<g.length;++u)h.putByte(g[u])}var m=h.length();m>a.blockLength&&(a.start(),a.update(h.bytes()),h=a.digest());b=c.util.createBuffer();d=c.util.createBuffer();m=h.length();for(u=0;u<m;++u)g=h.at(u),b.putByte(54^g),d.putByte(92^g);if(m<a.blockLength)for(g=a.blockLength-m,u=0;u<g;++u)b.putByte(54),d.putByte(92);b=b.bytes();d=d.bytes()}a.start();a.update(b)},
299 update:function(c){a.update(c)},getMac:function(){var c=a.digest().bytes();a.start();a.update(d);a.update(c);return a.digest()}};f.digest=f.getMac;return f}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.hmac)return b.hmac;b.defined.hmac=!0;for(var k=
300 0;k<e.length;++k)e[k](b);return b.hmac}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/hmac",["require","module","./md","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a){for(var c=a.name+": ",d=[],l=function(a,c){return" "+c},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,
301 l));c+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<c.length;++g,++d)if(65<d&&-1!==a)d=c[a],","===d?(++a,c=c.substr(0,a)+"\r\n "+c.substr(a)):c=c.substr(0,a)+"\r\n"+d+c.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===c[g]||"\t"===c[g]||","===c[g])a=g;return c}var d=c.pem=c.pem||{};d.encode=function(a,d){d=d||{};var f="-----BEGIN "+a.type+"-----\r\n",h;a.procType&&(h={name:"Proc-Type",values:[String(a.procType.version),a.procType.type]},f+=b(h));a.contentDomain&&(h={name:"Content-Domain",values:[a.contentDomain]},
302 f+=b(h));a.dekInfo&&(h={name:"DEK-Info",values:[a.dekInfo.algorithm]},a.dekInfo.parameters&&h.values.push(a.dekInfo.parameters),f+=b(h));if(a.headers)for(h=0;h<a.headers.length;++h)f+=b(a.headers[h]);a.procType&&(f+="\r\n");f+=c.util.encode64(a.body,d.maxline||64)+"\r\n";return f+="-----END "+a.type+"-----\r\n"};d.decode=function(a){for(var b=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,
302 -g=/\r?\n/,k;;){k=d.exec(a);if(!k)break;var f={type:k[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:c.util.decode64(k[3])};b.push(f);if(k[2]){for(var u=k[2].split(g),y=0;k&&y<u.length;){k=u[y].replace(/\s+$/,"");for(var w=y+1;w<u.length;++w){var n=u[w];if(!/\s/.test(n[0]))break;k+=n;y=w}if(k=k.match(h)){for(var w={name:k[1],values:[]},n=k[2].split(","),A=0;A<n.length;++A)w.values.push(n[A].replace(/^\s+/,""));if(f.procType)if(f.contentDomain||"Content-Domain"!==w.name)if(f.dekInfo||
303 +g=/\r?\n/,k;;){k=d.exec(a);if(!k)break;var f={type:k[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:c.util.decode64(k[3])};b.push(f);if(k[2]){for(var v=k[2].split(g),x=0;k&&x<v.length;){k=v[x].replace(/\s+$/,"");for(var w=x+1;w<v.length;++w){var n=v[w];if(!/\s/.test(n[0]))break;k+=n;x=w}if(k=k.match(h)){for(var w={name:k[1],values:[]},n=k[2].split(","),A=0;A<n.length;++A)w.values.push(n[A].replace(/^\s+/,""));if(f.procType)if(f.contentDomain||"Content-Domain"!==w.name)if(f.dekInfo||
304 "DEK-Info"!==w.name)f.headers.push(w);else{if(0===w.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');f.dekInfo={algorithm:n[0],parameters:n[1]||null}}else f.contentDomain=n[0]||"";else{if("Proc-Type"!==w.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==w.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');f.procType={version:n[0],
304 -type:n[1]}}}++y}if("ENCRYPTED"===f.procType&&!f.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===b.length)throw Error("Invalid PEM formatted message.");return b}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);
305 +type:n[1]}}}++x}if("ENCRYPTED"===f.procType&&!f.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===b.length)throw Error("Invalid PEM formatted message.");return b}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);
306 b=b||{};b.defined=b.defined||{};if(b.defined.pem)return b.pem;b.defined.pem=!0;for(var k=0;k<e.length;++k)e[k](b);return b.pem}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/pem",["require","module","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,d){c.cipher.registerAlgorithm(a,
306 -function(){return new c.des.Algorithm(a,d)})}function d(a,c,b,l){var e=32===a.length?3:9;l=3===e?l?[30,-2,-2]:[0,32,2]:l?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var k=c[0],z=c[1];c=(k>>>4^z)&252645135;z^=c;k^=c<<4;c=(k>>>16^z)&65535;z^=c;k^=c<<16;c=(z>>>2^k)&858993459;k^=c;z^=c<<2;c=(z>>>8^k)&16711935;k^=c;z^=c<<8;c=(k>>>1^z)&1431655765;for(var z=z^c,k=k^c<<1,k=k<<1|k>>>31,z=z<<1|z>>>31,u=0;u<e;u+=3){for(var p=l[u+1],q=l[u+2],r=l[u];r!=p;r+=q){var M=z^a[r],K=(z>>>4|z<<28)^a[r+1];c=k;
307 -k=z;z=c^(n[M>>>24&63]|g[M>>>16&63]|m[M>>>8&63]|y[M&63]|f[K>>>24&63]|h[K>>>16&63]|E[K>>>8&63]|D[K&63])}c=k;k=z;z=c}k=k>>>1|k<<31;z=z>>>1|z<<31;c=(k>>>1^z)&1431655765;z^=c;k^=c<<1;c=(z>>>8^k)&16711935;k^=c;z^=c<<8;c=(z>>>2^k)&858993459;k^=c;z^=c<<2;c=(k>>>16^z)&65535;z^=c;k^=c<<16;c=(k>>>4^z)&252645135;b[0]=k^c<<4;b[1]=z^c}function e(a){a=a||{};var b="DES-"+(a.mode||"CBC").toUpperCase(),d;d=a.decrypt?c.cipher.createDecipher(b,a.key):c.cipher.createCipher(b,a.key);var g=d.start;d.start=function(a,b){var e=
307 +function(){return new c.des.Algorithm(a,d)})}function d(a,c,b,l){var e=32===a.length?3:9;l=3===e?l?[30,-2,-2]:[0,32,2]:l?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var k=c[0],z=c[1];c=(k>>>4^z)&252645135;z^=c;k^=c<<4;c=(k>>>16^z)&65535;z^=c;k^=c<<16;c=(z>>>2^k)&858993459;k^=c;z^=c<<2;c=(z>>>8^k)&16711935;k^=c;z^=c<<8;c=(k>>>1^z)&1431655765;for(var z=z^c,k=k^c<<1,k=k<<1|k>>>31,z=z<<1|z>>>31,v=0;v<e;v+=3){for(var p=l[v+1],q=l[v+2],r=l[v];r!=p;r+=q){var M=z^a[r],K=(z>>>4|z<<28)^a[r+1];c=k;
308 +k=z;z=c^(n[M>>>24&63]|g[M>>>16&63]|m[M>>>8&63]|x[M&63]|f[K>>>24&63]|h[K>>>16&63]|D[K>>>8&63]|E[K&63])}c=k;k=z;z=c}k=k>>>1|k<<31;z=z>>>1|z<<31;c=(k>>>1^z)&1431655765;z^=c;k^=c<<1;c=(z>>>8^k)&16711935;k^=c;z^=c<<8;c=(z>>>2^k)&858993459;k^=c;z^=c<<2;c=(k>>>16^z)&65535;z^=c;k^=c<<16;c=(k>>>4^z)&252645135;b[0]=k^c<<4;b[1]=z^c}function e(a){a=a||{};var b="DES-"+(a.mode||"CBC").toUpperCase(),d;d=a.decrypt?c.cipher.createDecipher(b,a.key):c.cipher.createCipher(b,a.key);var g=d.start;d.start=function(a,b){var e=
309 null;b instanceof c.util.ByteBuffer&&(e=b,b={});b=b||{};b.output=e;b.iv=a;g.call(d,b)};return d}c.des=c.des||{};c.des.startEncrypting=function(a,c,b,d){a=e({key:a,output:b,decrypt:!1,mode:d||(null===c?"ECB":"CBC")});a.start(c);return a};c.des.createEncryptionCipher=function(a,c){return e({key:a,output:null,decrypt:!1,mode:c})};c.des.startDecrypting=function(a,c,b,d){a=e({key:a,output:b,decrypt:!0,mode:d||(null===c?"ECB":"CBC")});a.start(c);return a};c.des.createDecryptionCipher=function(a,c){return e({key:a,
310 output:null,decrypt:!0,mode:c})};c.des.Algorithm=function(a,c){var b=this;b.name=a;b.mode=new c({blockSize:8,cipher:{encrypt:function(a,c){return d(b._keys,a,c,!1)},decrypt:function(a,c){return d(b._keys,a,c,!0)}}});b._init=!1};c.des.Algorithm.prototype.initialize=function(a){if(!this._init){a=c.util.createBuffer(a.key);if(0===this.name.indexOf("3DES")&&24!==a.length())throw Error("Invalid Triple-DES key size: "+8*a.length());for(var b=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
311 516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],g=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],e=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
312 k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],f=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],q=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
312 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],v=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],K=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],y=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],n=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],E=8<a.length()?3:
313 -1,D=[],B=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],p=0,r,P=0;P<E;P++){var I=a.getInt32(),H=a.getInt32();r=(I>>>4^H)&252645135;H^=r;I^=r<<4;r=(H>>>-16^I)&65535;I^=r;H^=r<<-16;r=(I>>>2^H)&858993459;H^=r;I^=r<<2;r=(H>>>-16^I)&65535;I^=r;H^=r<<-16;r=(I>>>1^H)&1431655765;H^=r;I^=r<<1;r=(H>>>8^I)&16711935;I^=r;H^=r<<8;r=(I>>>1^H)&1431655765;H^=r;I^=r<<1;r=I<<8|H>>>20&240;for(var I=H<<24|H<<8&16711680|H>>>8&65280|H>>>24&240,H=r,N=0;N<B.length;++N){B[N]?(I=I<<2|I>>>26,H=H<<2|H>>>26):(I=I<<1|I>>>27,H=H<<1|H>>>27);
314 -var I=I&-15,H=H&-15,Y=b[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|f[I>>>4&15],Z=m[H>>>28]|q[H>>>24&15]|u[H>>>20&15]|v[H>>>16&15]|K[H>>>12&15]|y[H>>>8&15]|n[H>>>4&15];r=(Z>>>16^Y)&65535;D[p++]=Y^r;D[p++]=Z^r<<16}}this._keys=D;this._init=!0}};b("DES-ECB",c.cipher.modes.ecb);b("DES-CBC",c.cipher.modes.cbc);b("DES-CFB",c.cipher.modes.cfb);b("DES-OFB",c.cipher.modes.ofb);b("DES-CTR",c.cipher.modes.ctr);b("3DES-ECB",c.cipher.modes.ecb);b("3DES-CBC",c.cipher.modes.cbc);b("3DES-CFB",
313 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],v=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],K=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],x=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],n=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],D=8<a.length()?3:
314 +1,E=[],B=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],p=0,r,R=0;R<D;R++){var I=a.getInt32(),H=a.getInt32();r=(I>>>4^H)&252645135;H^=r;I^=r<<4;r=(H>>>-16^I)&65535;I^=r;H^=r<<-16;r=(I>>>2^H)&858993459;H^=r;I^=r<<2;r=(H>>>-16^I)&65535;I^=r;H^=r<<-16;r=(I>>>1^H)&1431655765;H^=r;I^=r<<1;r=(H>>>8^I)&16711935;I^=r;H^=r<<8;r=(I>>>1^H)&1431655765;H^=r;I^=r<<1;r=I<<8|H>>>20&240;for(var I=H<<24|H<<8&16711680|H>>>8&65280|H>>>24&240,H=r,N=0;N<B.length;++N){B[N]?(I=I<<2|I>>>26,H=H<<2|H>>>26):(I=I<<1|I>>>27,H=H<<1|H>>>27);
315 +var I=I&-15,H=H&-15,Y=b[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|f[I>>>4&15],Z=m[H>>>28]|q[H>>>24&15]|u[H>>>20&15]|v[H>>>16&15]|K[H>>>12&15]|x[H>>>8&15]|n[H>>>4&15];r=(Z>>>16^Y)&65535;E[p++]=Y^r;E[p++]=Z^r<<16}}this._keys=E;this._init=!0}};b("DES-ECB",c.cipher.modes.ecb);b("DES-CBC",c.cipher.modes.cbc);b("DES-CFB",c.cipher.modes.cfb);b("DES-OFB",c.cipher.modes.ofb);b("DES-CTR",c.cipher.modes.ctr);b("3DES-ECB",c.cipher.modes.ecb);b("3DES-CBC",c.cipher.modes.cbc);b("3DES-CFB",
316 c.cipher.modes.cfb);b("3DES-OFB",c.cipher.modes.ofb);b("3DES-CTR",c.cipher.modes.ctr);var f=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
317 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
318 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],h=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
318 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],g=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],E=[256,34078976,34078720,1107296512,
319 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],g=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],D=[256,34078976,34078720,1107296512,
320 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
321 524288,0,1074266112,34078976,1073742080],m=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
321 -4194320,536887312,0,541081600,536870912,4194320,536887312],D=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
322 -67108866,67110912,2048,2097154],y=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
322 +4194320,536887312,0,541081600,536870912,4194320,536887312],E=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
323 +67108866,67110912,2048,2097154],x=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
324 268435456,268701696]}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.des)return b.des;b.defined.des=!0;for(var k=0;k<e.length;++k)e[k](b);return b.des}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,
324 -Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/des",["require","module","./cipher","./cipherModes","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){var d=c.pkcs5=c.pkcs5||{},f="undefined"!==typeof process&&process.versions&&process.versions.node,e;f&&!c.disableNativeCode&&(e=b("crypto"));c.pbkdf2=d.pbkdf2=function(a,b,d,g,k,m){function n(){if(r>F)return m(null,x);p.start(null,
325 -null);p.update(b);p.update(c.util.int32ToBytes(r));C=G=p.digest().getBytes();q=2;y()}function y(){if(q<=d)return p.start(null,null),p.update(G),z=p.digest().getBytes(),C=c.util.xorBytes(C,z,w),G=z,++q,c.util.setImmediate(y);x+=r<F?C:C.substr(0,A);++r;n()}"function"===typeof k&&(m=k,k=null);if(f&&!c.disableNativeCode&&e.pbkdf2&&(null===k||"object"!==typeof k)&&(4<e.pbkdf2Sync.length||!k||"sha1"===k))return"string"!==typeof k&&(k="sha1"),b=new Buffer(b,"binary"),m?4===e.pbkdf2Sync.length?e.pbkdf2(a,
325 +Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/des",["require","module","./cipher","./cipherModes","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){var d=c.pkcs5=c.pkcs5||{},f="undefined"!==typeof process&&process.versions&&process.versions.node,e;f&&!c.disableNativeCode&&(e=b("crypto"));c.pbkdf2=d.pbkdf2=function(a,b,d,g,k,m){function n(){if(r>F)return m(null,y);p.start(null,
326 +null);p.update(b);p.update(c.util.int32ToBytes(r));C=G=p.digest().getBytes();q=2;x()}function x(){if(q<=d)return p.start(null,null),p.update(G),z=p.digest().getBytes(),C=c.util.xorBytes(C,z,w),G=z,++q,c.util.setImmediate(x);y+=r<F?C:C.substr(0,A);++r;n()}"function"===typeof k&&(m=k,k=null);if(f&&!c.disableNativeCode&&e.pbkdf2&&(null===k||"object"!==typeof k)&&(4<e.pbkdf2Sync.length||!k||"sha1"===k))return"string"!==typeof k&&(k="sha1"),b=new Buffer(b,"binary"),m?4===e.pbkdf2Sync.length?e.pbkdf2(a,
327 b,d,g,function(a,c){if(a)return m(a);m(null,c.toString("binary"))}):e.pbkdf2(a,b,d,g,k,function(a,c){if(a)return m(a);m(null,c.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(a,b,d,g).toString("binary"):e.pbkdf2Sync(a,b,d,g,k).toString("binary");if("undefined"===typeof k||null===k)k=c.md.sha1.create();if("string"===typeof k){if(!(k in c.md.algorithms))throw Error("Unknown hash algorithm: "+k);k=c.md[k].create()}var w=k.digestLength;if(g>4294967295*w){a=Error("Derived key is too long.");
327 -if(m)return m(a);throw a;}var F=Math.ceil(g/w),A=g-(F-1)*w,p=c.hmac.create();p.start(k,a);var x="",C,z,G;if(!m){for(var r=1;r<=F;++r){p.start(null,null);p.update(b);p.update(c.util.int32ToBytes(r));C=G=p.digest().getBytes();for(var q=2;q<=d;++q)p.start(null,null),p.update(G),z=p.digest().getBytes(),C=c.util.xorBytes(C,z,w),G=z;x+=r<F?C:C.substr(0,A)}return x}r=1;n()}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===
328 +if(m)return m(a);throw a;}var F=Math.ceil(g/w),A=g-(F-1)*w,p=c.hmac.create();p.start(k,a);var y="",C,z,G;if(!m){for(var r=1;r<=F;++r){p.start(null,null);p.update(b);p.update(c.util.int32ToBytes(r));C=G=p.digest().getBytes();for(var q=2;q<=d;++q)p.start(null,null),p.update(G),z=p.digest().getBytes(),C=c.util.xorBytes(C,z,w),G=z;y+=r<F?C:C.substr(0,A)}return y}r=1;n()}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===
329 typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.pbkdf2)return b.pbkdf2;b.defined.pbkdf2=!0;for(var k=0;k<e.length;++k)e[k](b);return b.pbkdf2}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/pbkdf2",["require","module",
330 "./hmac","./md","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){var d="undefined"!==typeof process&&process.versions&&process.versions.node,f=null;c.disableNativeCode||!d||process.versions["node-webkit"]||(f=b("crypto"));(c.prng=c.prng||{}).create=function(a){function b(a){if(32<=g.pools[0].messageLength)return d(),a();g.seedFile(32-g.pools[0].messageLength<<5,function(c,b){if(c)return a(c);g.collect(b);d();a()})}function d(){var a=g.plugin.md.create();
331 a.update(g.pools[0].digest().getBytes());g.pools[0].start();for(var c=1,b=1;32>b;++b)c=31===c?2147483648:c<<2,0===c%g.reseeds&&(a.update(g.pools[b].digest().getBytes()),g.pools[b].start());c=a.digest().getBytes();a.start();a.update(c);a=a.digest().getBytes();g.key=g.plugin.formatKey(c);g.seed=g.plugin.formatSeed(a);g.reseeds=4294967295===g.reseeds?0:g.reseeds+1;g.generated=0}function h(a){var b=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(b=function(a){return d.getRandomValues(a)})}var g=
@@ -336,36 +337,36 @@ c){for(var b="",d=0;d<c;d+=8)b+=String.fromCharCode(a>>d&255);g.collect(b)};g.re
337 return g}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.prng)return b.prng;b.defined.prng=!0;for(var k=0;k<e.length;++k)e[k](b);return b.prng}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,
338 0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/prng",["require","module","./md","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){c.random&&c.random.getBytes||function(a){function b(){var a=c.prng.create(d);a.getBytes=function(c,b){return a.generate(c,b)};a.getBytesSync=function(c){return a.generate(c)};return a}var d={},f=Array(4),n=c.util.createBuffer();d.formatKey=function(a){var b=c.util.createBuffer(a);a=Array(4);
339 a[0]=b.getInt32();a[1]=b.getInt32();a[2]=b.getInt32();a[3]=b.getInt32();return c.aes._expandKey(a,!1)};d.formatSeed=function(a){var b=c.util.createBuffer(a);a=Array(4);a[0]=b.getInt32();a[1]=b.getInt32();a[2]=b.getInt32();a[3]=b.getInt32();return a};d.cipher=function(a,b){c.aes._updateBlock(a,b,f,!1);n.putInt32(f[0]);n.putInt32(f[1]);n.putInt32(f[2]);n.putInt32(f[3]);return n.getBytes()};d.increment=function(a){++a[3];return a};d.md=c.md.sha256;var h=b(),g="undefined"!==typeof process&&process.versions&&
339 -process.versions.node,E=null;if("undefined"!==typeof window){var m=window.crypto||window.msCrypto;m&&m.getRandomValues&&(E=function(a){return m.getRandomValues(a)})}if(c.disableNativeCode||!g&&!E){h.collectInt(+new Date,32);if("undefined"!==typeof navigator){var g="",D;for(D in navigator)try{"string"==typeof navigator[D]&&(g+=navigator[D])}catch(y){}h.collect(g);g=null}a&&(a().mousemove(function(a){h.collectInt(a.clientX,16);h.collectInt(a.clientY,16)}),a().keypress(function(a){h.collectInt(a.charCode,
340 -8)}))}if(c.random)for(D in h)c.random[D]=h[D];else c.random=h;c.random.createInstance=b}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.random)return b.random;b.defined.random=!0;for(var k=0;k<e.length;++k)e[k](b);
340 +process.versions.node,D=null;if("undefined"!==typeof window){var m=window.crypto||window.msCrypto;m&&m.getRandomValues&&(D=function(a){return m.getRandomValues(a)})}if(c.disableNativeCode||!g&&!D){h.collectInt(+new Date,32);if("undefined"!==typeof navigator){var g="",E;for(E in navigator)try{"string"==typeof navigator[E]&&(g+=navigator[E])}catch(x){}h.collect(g);g=null}a&&(a().mousemove(function(a){h.collectInt(a.clientX,16);h.collectInt(a.clientY,16)}),a().keypress(function(a){h.collectInt(a.charCode,
341 +8)}))}if(c.random)for(E in h)c.random[E]=h[E];else c.random=h;c.random.createInstance=b}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.random)return b.random;b.defined.random=!0;for(var k=0;k<e.length;++k)e[k](b);
342 return b.random}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){var b=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
343 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
343 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];c.rc2=c.rc2||{};c.rc2.expandKey=function(a,d){"string"===typeof a&&(a=c.util.createBuffer(a));d=d||128;var e=a,g=a.length(),f=d,m=Math.ceil(f/8),f=255>>(f&7),u;for(u=g;128>u;u++)e.putByte(b[e.at(u-
344 -1)+e.at(u-g)&255]);e.setAt(128-m,b[e.at(128-m)&f]);for(u=127-m;0<=u;u--)e.setAt(u,b[e.at(u+1)^e.at(u+m)]);return e};var e=function(a,b,e){var g=!1,k=null,f=null,n=null,y,w,p,A,r=[];a=c.rc2.expandKey(a,b);for(p=0;64>p;p++)r.push(a.getInt16Le());e?(y=function(a){for(p=0;4>p;p++){a[p]+=r[A]+(a[(p+3)%4]&a[(p+2)%4])+(~a[(p+3)%4]&a[(p+1)%4]);var c=a[p],b=d[p];a[p]=c<<b&65535|(c&65535)>>16-b;A++}},w=function(a){for(p=0;4>p;p++)a[p]+=r[a[(p+3)%4]&63]}):(y=function(a){for(p=3;0<=p;p--){var c=a[p],b=d[p];a[p]=
345 -(c&65535)>>b|c<<16-b&65535;a[p]-=r[A]+(a[(p+3)%4]&a[(p+2)%4])+(~a[(p+3)%4]&a[(p+1)%4]);A--}},w=function(a){for(p=3;0<=p;p--)a[p]-=r[a[(p+3)%4]&63]});var x=null;return x={start:function(a,b){a&&"string"===typeof a&&(a=c.util.createBuffer(a));g=!1;k=c.util.createBuffer();f=b||new c.util.createBuffer;n=a;x.output=f},update:function(a){for(g||k.putBuffer(a);8<=k.length();){a=[[5,y],[1,w],[6,y],[1,w],[5,y]];var c=[];for(p=0;4>p;p++){var b=k.getInt16Le();null!==n&&(e?b^=n.getInt16Le():n.putInt16Le(b));
346 -c.push(b&65535)}A=e?0:63;for(b=0;b<a.length;b++)for(var d=0;d<a[b][0];d++)a[b][1](c);for(p=0;4>p;p++)null!==n&&(e?n.putInt16Le(c[p]):c[p]^=n.getInt16Le()),f.putInt16Le(c[p])}},finish:function(a){var c=!0;if(e)if(a)c=a(8,k,!e);else{var b=8===k.length()?8:8-k.length();k.fillWithByte(b,b)}c&&(g=!0,x.update());!e&&(c=0===k.length())&&(a?c=a(8,f,!e):(a=f.length(),b=f.at(a-1),b>a?c=!1:f.truncate(b)));return c}}};c.rc2.startEncrypting=function(a,b,d){a=c.rc2.createEncryptionCipher(a,128);a.start(b,d);return a};
344 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];c.rc2=c.rc2||{};c.rc2.expandKey=function(a,d){"string"===typeof a&&(a=c.util.createBuffer(a));d=d||128;var e=a,g=a.length(),f=d,m=Math.ceil(f/8),f=255>>(f&7),v;for(v=g;128>v;v++)e.putByte(b[e.at(v-
345 +1)+e.at(v-g)&255]);e.setAt(128-m,b[e.at(128-m)&f]);for(v=127-m;0<=v;v--)e.setAt(v,b[e.at(v+1)^e.at(v+m)]);return e};var e=function(a,b,e){var g=!1,k=null,f=null,n=null,x,w,p,A,r=[];a=c.rc2.expandKey(a,b);for(p=0;64>p;p++)r.push(a.getInt16Le());e?(x=function(a){for(p=0;4>p;p++){a[p]+=r[A]+(a[(p+3)%4]&a[(p+2)%4])+(~a[(p+3)%4]&a[(p+1)%4]);var c=a[p],b=d[p];a[p]=c<<b&65535|(c&65535)>>16-b;A++}},w=function(a){for(p=0;4>p;p++)a[p]+=r[a[(p+3)%4]&63]}):(x=function(a){for(p=3;0<=p;p--){var c=a[p],b=d[p];a[p]=
346 +(c&65535)>>b|c<<16-b&65535;a[p]-=r[A]+(a[(p+3)%4]&a[(p+2)%4])+(~a[(p+3)%4]&a[(p+1)%4]);A--}},w=function(a){for(p=3;0<=p;p--)a[p]-=r[a[(p+3)%4]&63]});var y=null;return y={start:function(a,b){a&&"string"===typeof a&&(a=c.util.createBuffer(a));g=!1;k=c.util.createBuffer();f=b||new c.util.createBuffer;n=a;y.output=f},update:function(a){for(g||k.putBuffer(a);8<=k.length();){a=[[5,x],[1,w],[6,x],[1,w],[5,x]];var c=[];for(p=0;4>p;p++){var b=k.getInt16Le();null!==n&&(e?b^=n.getInt16Le():n.putInt16Le(b));
347 +c.push(b&65535)}A=e?0:63;for(b=0;b<a.length;b++)for(var d=0;d<a[b][0];d++)a[b][1](c);for(p=0;4>p;p++)null!==n&&(e?n.putInt16Le(c[p]):c[p]^=n.getInt16Le()),f.putInt16Le(c[p])}},finish:function(a){var c=!0;if(e)if(a)c=a(8,k,!e);else{var b=8===k.length()?8:8-k.length();k.fillWithByte(b,b)}c&&(g=!0,y.update());!e&&(c=0===k.length())&&(a?c=a(8,f,!e):(a=f.length(),b=f.at(a-1),b>a?c=!1:f.truncate(b)));return c}}};c.rc2.startEncrypting=function(a,b,d){a=c.rc2.createEncryptionCipher(a,128);a.start(b,d);return a};
348 c.rc2.createEncryptionCipher=function(a,c){return e(a,c,!0)};c.rc2.startDecrypting=function(a,b,d){a=c.rc2.createDecryptionCipher(a,128);a.start(b,d);return a};c.rc2.createDecryptionCipher=function(a,c){return e(a,c,!1)}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||
349 {};if(b.defined.rc2)return b.rc2;b.defined.rc2=!0;for(var k=0;k<e.length;++k)e[k](b);return b.rc2}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/rc2",["require","module","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,c,d){this.data=[];null!=a&&("number"==typeof a?
350 this.fromNumber(a,c,d):null==c&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,c))}function d(){return new b(null)}function e(a,c,b,d,l,g){for(;0<=--g;){var e=c*this.data[a++]+b.data[d]+l;l=Math.floor(e/67108864);b.data[d++]=e&67108863}return l}function f(a,c,b,d,l,g){var e=c&32767;for(c>>=15;0<=--g;){var h=this.data[a]&32767,k=this.data[a++]>>15,m=c*h+k*e,h=e*h+((m&32767)<<15)+b.data[d]+(l&1073741823);l=(h>>>30)+(m>>>15)+c*k+(l>>>30);b.data[d++]=h&1073741823}return l}function n(a,c,
350 -b,d,l,g){var e=c&16383;for(c>>=14;0<=--g;){var h=this.data[a]&16383,f=this.data[a++]>>14,k=c*h+f*e,h=e*h+((k&16383)<<14)+b.data[d]+l;l=(h>>28)+(k>>14)+c*f;b.data[d++]=h&268435455}return l}function h(a,c){var b=X[a.charCodeAt(c)];return null==b?-1:b}function g(a){var c=d();c.fromInt(a);return c}function p(a){var c=1,b;0!=(b=a>>>16)&&(a=b,c+=16);0!=(b=a>>8)&&(a=b,c+=8);0!=(b=a>>4)&&(a=b,c+=4);0!=(b=a>>2)&&(a=b,c+=2);0!=a>>1&&(c+=1);return c}function m(a){this.m=a}function D(a){this.m=a;this.mp=a.invDigit();
351 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function y(a,c){return a&c}function w(a,c){return a|c}function r(a,c){return a^c}function A(a,c){return a&~c}function J(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();b.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function z(){return{nextBytes:function(a){for(var c=0;c<a.length;++c)a[c]=Math.floor(256*Math.random())}}}var G;"undefined"===typeof navigator?(b.prototype.am=n,G=28):"Microsoft Internet Explorer"==
351 +b,d,l,e){var g=c&16383;for(c>>=14;0<=--e;){var h=this.data[a]&16383,f=this.data[a++]>>14,k=c*h+f*g,h=g*h+((k&16383)<<14)+b.data[d]+l;l=(h>>28)+(k>>14)+c*f;b.data[d++]=h&268435455}return l}function h(a,c){var b=X[a.charCodeAt(c)];return null==b?-1:b}function g(a){var c=d();c.fromInt(a);return c}function p(a){var c=1,b;0!=(b=a>>>16)&&(a=b,c+=16);0!=(b=a>>8)&&(a=b,c+=8);0!=(b=a>>4)&&(a=b,c+=4);0!=(b=a>>2)&&(a=b,c+=2);0!=a>>1&&(c+=1);return c}function m(a){this.m=a}function E(a){this.m=a;this.mp=a.invDigit();
352 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function x(a,c){return a&c}function w(a,c){return a|c}function r(a,c){return a^c}function A(a,c){return a&~c}function J(){}function y(a){return a}function C(a){this.r2=d();this.q3=d();b.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function z(){return{nextBytes:function(a){for(var c=0;c<a.length;++c)a[c]=Math.floor(256*Math.random())}}}var G;"undefined"===typeof navigator?(b.prototype.am=n,G=28):"Microsoft Internet Explorer"==
353 navigator.appName?(b.prototype.am=f,G=30):"Netscape"!=navigator.appName?(b.prototype.am=e,G=26):(b.prototype.am=n,G=28);b.prototype.DB=G;b.prototype.DM=(1<<G)-1;b.prototype.DV=1<<G;b.prototype.FV=Math.pow(2,52);b.prototype.F1=52-G;b.prototype.F2=2*G-52;var X=[],q;G=48;for(q=0;9>=q;++q)X[G++]=q;G=97;for(q=10;36>q;++q)X[G++]=q;G=65;for(q=10;36>q;++q)X[G++]=q;m.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};m.prototype.revert=function(a){return a};m.prototype.reduce=
353 -function(a){a.divRemTo(this.m,null,a)};m.prototype.mulTo=function(a,c,b){a.multiplyTo(c,b);this.reduce(b)};m.prototype.sqrTo=function(a,c){a.squareTo(c);this.reduce(c)};D.prototype.convert=function(a){var c=d();a.abs().dlShiftTo(this.m.t,c);c.divRemTo(this.m,null,c);0>a.s&&0<c.compareTo(b.ZERO)&&this.m.subTo(c,c);return c};D.prototype.revert=function(a){var c=d();a.copyTo(c);this.reduce(c);return c};D.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var c=0;c<this.m.t;++c){var b=
354 -a.data[c]&32767,d=b*this.mpl+((b*this.mph+(a.data[c]>>15)*this.mpl&this.um)<<15)&a.DM,b=c+this.m.t;for(a.data[b]+=this.m.am(0,d,a,c,0,this.m.t);a.data[b]>=a.DV;)a.data[b]-=a.DV,a.data[++b]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};D.prototype.mulTo=function(a,c,b){a.multiplyTo(c,b);this.reduce(b)};D.prototype.sqrTo=function(a,c){a.squareTo(c);this.reduce(c)};b.prototype.copyTo=function(a){for(var c=this.t-1;0<=c;--c)a.data[c]=this.data[c];a.t=this.t;a.s=this.s};
354 +function(a){a.divRemTo(this.m,null,a)};m.prototype.mulTo=function(a,c,b){a.multiplyTo(c,b);this.reduce(b)};m.prototype.sqrTo=function(a,c){a.squareTo(c);this.reduce(c)};E.prototype.convert=function(a){var c=d();a.abs().dlShiftTo(this.m.t,c);c.divRemTo(this.m,null,c);0>a.s&&0<c.compareTo(b.ZERO)&&this.m.subTo(c,c);return c};E.prototype.revert=function(a){var c=d();a.copyTo(c);this.reduce(c);return c};E.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var c=0;c<this.m.t;++c){var b=
355 +a.data[c]&32767,d=b*this.mpl+((b*this.mph+(a.data[c]>>15)*this.mpl&this.um)<<15)&a.DM,b=c+this.m.t;for(a.data[b]+=this.m.am(0,d,a,c,0,this.m.t);a.data[b]>=a.DV;)a.data[b]-=a.DV,a.data[++b]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};E.prototype.mulTo=function(a,c,b){a.multiplyTo(c,b);this.reduce(b)};E.prototype.sqrTo=function(a,c){a.squareTo(c);this.reduce(c)};b.prototype.copyTo=function(a){for(var c=this.t-1;0<=c;--c)a.data[c]=this.data[c];a.t=this.t;a.s=this.s};
356 b.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};b.prototype.fromString=function(a,c){var d;if(16==c)d=4;else if(8==c)d=3;else if(256==c)d=8;else if(2==c)d=1;else if(32==c)d=5;else if(4==c)d=2;else{this.fromRadix(a,c);return}this.s=this.t=0;for(var l=a.length,g=!1,e=0;0<=--l;){var f=8==d?a[l]&255:h(a,l);0>f?"-"==a.charAt(l)&&(g=!0):(g=!1,0==e?this.data[this.t++]=f:e+d>this.DB?(this.data[this.t-1]|=(f&(1<<this.DB-e)-1)<<e,this.data[this.t++]=
357 f>>this.DB-e):this.data[this.t-1]|=f<<e,e+=d,e>=this.DB&&(e-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<e&&(this.data[this.t-1]|=(1<<this.DB-e)-1<<e));this.clamp();g&&b.ZERO.subTo(this,this)};b.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};b.prototype.dlShiftTo=function(a,c){var b;for(b=this.t-1;0<=b;--b)c.data[b+a]=this.data[b];for(b=a-1;0<=b;--b)c.data[b]=0;c.t=this.t+a;c.s=this.s};b.prototype.drShiftTo=function(a,c){for(var b=a;b<this.t;++b)c.data[b-
358 a]=this.data[b];c.t=Math.max(this.t-a,0);c.s=this.s};b.prototype.lShiftTo=function(a,c){var b=a%this.DB,d=this.DB-b,l=(1<<d)-1,e=Math.floor(a/this.DB),g=this.s<<b&this.DM,h;for(h=this.t-1;0<=h;--h)c.data[h+e+1]=this.data[h]>>d|g,g=(this.data[h]&l)<<b;for(h=e-1;0<=h;--h)c.data[h]=0;c.data[e]=g;c.t=this.t+e+1;c.s=this.s;c.clamp()};b.prototype.rShiftTo=function(a,c){c.s=this.s;var b=Math.floor(a/this.DB);if(b>=this.t)c.t=0;else{var d=a%this.DB,l=this.DB-d,e=(1<<d)-1;c.data[0]=this.data[b]>>d;for(var g=
359 b+1;g<this.t;++g)c.data[g-b-1]|=(this.data[g]&e)<<l,c.data[g-b]=this.data[g]>>d;0<d&&(c.data[this.t-b-1]|=(this.s&e)<<l);c.t=this.t-b;c.clamp()}};b.prototype.subTo=function(a,c){for(var b=0,d=0,l=Math.min(a.t,this.t);b<l;)d+=this.data[b]-a.data[b],c.data[b++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;b<this.t;)d+=this.data[b],c.data[b++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;b<a.t;)d-=a.data[b],c.data[b++]=d&this.DM,d>>=this.DB;d-=a.s}c.s=0>d?-1:0;-1>d?c.data[b++]=this.DV+d:0<d&&
360 (c.data[b++]=d);c.t=b;c.clamp()};b.prototype.multiplyTo=function(a,c){var d=this.abs(),l=a.abs(),e=d.t;for(c.t=e+l.t;0<=--e;)c.data[e]=0;for(e=0;e<l.t;++e)c.data[e+d.t]=d.am(0,l.data[e],c,e,0,d.t);c.s=0;c.clamp();this.s!=a.s&&b.ZERO.subTo(c,c)};b.prototype.squareTo=function(a){for(var c=this.abs(),b=a.t=2*c.t;0<=--b;)a.data[b]=0;for(b=0;b<c.t-1;++b){var d=c.am(b,c.data[b],a,2*b,0,1);(a.data[b+c.t]+=c.am(b+1,2*c.data[b],a,2*b+1,d,c.t-b-1))>=c.DV&&(a.data[b+c.t]-=c.DV,a.data[b+c.t+1]=1)}0<a.t&&(a.data[a.t-
360 -1]+=c.am(b,c.data[b],a,2*b,0,1));a.s=0;a.clamp()};b.prototype.divRemTo=function(a,c,l){var e=a.abs();if(!(0>=e.t)){var g=this.abs();if(g.t<e.t)null!=c&&c.fromInt(0),null!=l&&this.copyTo(l);else{null==l&&(l=d());var h=d(),f=this.s;a=a.s;var m=this.DB-p(e.data[e.t-1]);0<m?(e.lShiftTo(m,h),g.lShiftTo(m,l)):(e.copyTo(h),g.copyTo(l));e=h.t;g=h.data[e-1];if(0!=g){var x=g*(1<<this.F1)+(1<e?h.data[e-2]>>this.F2:0),q=this.FV/x,x=(1<<this.F1)/x,z=1<<this.F2,C=l.t,v=C-e,n=null==c?d():c;h.dlShiftTo(v,n);0<=l.compareTo(n)&&
361 -(l.data[l.t++]=1,l.subTo(n,l));b.ONE.dlShiftTo(e,n);for(n.subTo(h,h);h.t<e;)h.data[h.t++]=0;for(;0<=--v;){var y=l.data[--C]==g?this.DM:Math.floor(l.data[C]*q+(l.data[C-1]+z)*x);if((l.data[C]+=h.am(0,y,l,v,0,e))<y)for(h.dlShiftTo(v,n),l.subTo(n,l);l.data[C]<--y;)l.subTo(n,l)}null!=c&&(l.drShiftTo(e,c),f!=a&&b.ZERO.subTo(c,c));l.t=e;l.clamp();0<m&&l.rShiftTo(m,l);0>f&&b.ZERO.subTo(l,l)}}}};b.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var c=a&3,c=c*(2-
361 +1]+=c.am(b,c.data[b],a,2*b,0,1));a.s=0;a.clamp()};b.prototype.divRemTo=function(a,c,l){var e=a.abs();if(!(0>=e.t)){var g=this.abs();if(g.t<e.t)null!=c&&c.fromInt(0),null!=l&&this.copyTo(l);else{null==l&&(l=d());var h=d(),f=this.s;a=a.s;var m=this.DB-p(e.data[e.t-1]);0<m?(e.lShiftTo(m,h),g.lShiftTo(m,l)):(e.copyTo(h),g.copyTo(l));e=h.t;g=h.data[e-1];if(0!=g){var y=g*(1<<this.F1)+(1<e?h.data[e-2]>>this.F2:0),q=this.FV/y,y=(1<<this.F1)/y,z=1<<this.F2,C=l.t,u=C-e,n=null==c?d():c;h.dlShiftTo(u,n);0<=l.compareTo(n)&&
362 +(l.data[l.t++]=1,l.subTo(n,l));b.ONE.dlShiftTo(e,n);for(n.subTo(h,h);h.t<e;)h.data[h.t++]=0;for(;0<=--u;){var x=l.data[--C]==g?this.DM:Math.floor(l.data[C]*q+(l.data[C-1]+z)*y);if((l.data[C]+=h.am(0,x,l,u,0,e))<x)for(h.dlShiftTo(u,n),l.subTo(n,l);l.data[C]<--x;)l.subTo(n,l)}null!=c&&(l.drShiftTo(e,c),f!=a&&b.ZERO.subTo(c,c));l.t=e;l.clamp();0<m&&l.rShiftTo(m,l);0>f&&b.ZERO.subTo(l,l)}}}};b.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var c=a&3,c=c*(2-
363 (a&15)*c)&15,c=c*(2-(a&255)*c)&255,c=c*(2-((a&65535)*c&65535))&65535,c=c*(2-a*c%this.DV)%this.DV;return 0<c?this.DV-c:-c};b.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};b.prototype.exp=function(a,c){if(4294967295<a||1>a)return b.ONE;var l=d(),e=d(),g=c.convert(this),h=p(a)-1;for(g.copyTo(l);0<=--h;)if(c.sqrTo(l,e),0<(a&1<<h))c.mulTo(e,g,l);else var f=l,l=e,e=f;return c.revert(l)};b.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
364 4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var c=(1<<a)-1,b,d=!1,l="",e=this.t,g=this.DB-e*this.DB%a;if(0<e--)for(g<this.DB&&0<(b=this.data[e]>>g)&&(d=!0,l="0123456789abcdefghijklmnopqrstuvwxyz".charAt(b));0<=e;)g<a?(b=(this.data[e]&(1<<g)-1)<<a-g,b|=this.data[--e]>>(g+=this.DB-a)):(b=this.data[e]>>(g-=a)&c,0>=g&&(g+=this.DB,--e)),0<b&&(d=!0),d&&(l+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(b));return d?l:"0"};b.prototype.negate=function(){var a=
365 d();b.ZERO.subTo(this,a);return a};b.prototype.abs=function(){return 0>this.s?this.negate():this};b.prototype.compareTo=function(a){var c=this.s-a.s;if(0!=c)return c;var b=this.t,c=b-a.t;if(0!=c)return 0>this.s?-c:c;for(;0<=--b;)if(0!=(c=this.data[b]-a.data[b]))return c;return 0};b.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+p(this.data[this.t-1]^this.s&this.DM)};b.prototype.mod=function(a){var c=d();this.abs().divRemTo(a,null,c);0>this.s&&0<c.compareTo(b.ZERO)&&a.subTo(c,
365 -c);return c};b.prototype.modPowInt=function(a,c){var b;b=256>a||c.isEven()?new m(c):new D(c);return this.exp(a,b)};b.ZERO=g(0);b.ONE=g(1);J.prototype.convert=x;J.prototype.revert=x;J.prototype.mulTo=function(a,c,b){a.multiplyTo(c,b)};J.prototype.sqrTo=function(a,c){a.squareTo(c)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var c=d();a.copyTo(c);this.reduce(c);return c};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
366 +c);return c};b.prototype.modPowInt=function(a,c){var b;b=256>a||c.isEven()?new m(c):new E(c);return this.exp(a,b)};b.ZERO=g(0);b.ONE=g(1);J.prototype.convert=y;J.prototype.revert=y;J.prototype.mulTo=function(a,c,b){a.multiplyTo(c,b)};J.prototype.sqrTo=function(a,c){a.squareTo(c)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var c=d();a.copyTo(c);this.reduce(c);return c};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
367 1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,c,b){a.multiplyTo(c,b);this.reduce(b)};C.prototype.sqrTo=function(a,c){a.squareTo(c);this.reduce(c)};var O=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
368 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],M=67108864/O[O.length-1];b.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};b.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var c=this.chunkSize(a),c=Math.pow(a,
368 -c),b=g(c),l=d(),e=d(),h="";for(this.divRemTo(b,l,e);0<l.signum();)h=(c+e.intValue()).toString(a).substr(1)+h,l.divRemTo(b,l,e);return e.intValue().toString(a)+h};b.prototype.fromRadix=function(a,c){this.fromInt(0);null==c&&(c=10);for(var d=this.chunkSize(c),l=Math.pow(c,d),e=!1,g=0,f=0,m=0;m<a.length;++m){var x=h(a,m);0>x?"-"==a.charAt(m)&&0==this.signum()&&(e=!0):(f=c*f+x,++g>=d&&(this.dMultiply(l),this.dAddOffset(f,0),f=g=0))}0<g&&(this.dMultiply(Math.pow(c,g)),this.dAddOffset(f,0));e&&b.ZERO.subTo(this,
369 +c),b=g(c),l=d(),e=d(),h="";for(this.divRemTo(b,l,e);0<l.signum();)h=(c+e.intValue()).toString(a).substr(1)+h,l.divRemTo(b,l,e);return e.intValue().toString(a)+h};b.prototype.fromRadix=function(a,c){this.fromInt(0);null==c&&(c=10);for(var d=this.chunkSize(c),l=Math.pow(c,d),e=!1,g=0,f=0,m=0;m<a.length;++m){var y=h(a,m);0>y?"-"==a.charAt(m)&&0==this.signum()&&(e=!0):(f=c*f+y,++g>=d&&(this.dMultiply(l),this.dAddOffset(f,0),f=g=0))}0<g&&(this.dMultiply(Math.pow(c,g)),this.dAddOffset(f,0));e&&b.ZERO.subTo(this,
370 this)};b.prototype.fromNumber=function(a,c,d){if("number"==typeof c)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(b.ONE.shiftLeft(a-1),w,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(c);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(b.ONE.shiftLeft(a-1),this);else{d=[];var l=a&7;d.length=(a>>3)+1;c.nextBytes(d);d[0]=0<l?d[0]&(1<<l)-1:0;this.fromString(d,256)}};b.prototype.bitwiseTo=function(a,c,b){var d,l,e=Math.min(a.t,this.t);for(d=
371 0;d<e;++d)b.data[d]=c(this.data[d],a.data[d]);if(a.t<this.t){l=a.s&this.DM;for(d=e;d<this.t;++d)b.data[d]=c(this.data[d],l);b.t=this.t}else{l=this.s&this.DM;for(d=e;d<a.t;++d)b.data[d]=c(l,a.data[d]);b.t=a.t}b.s=c(this.s,a.s);b.clamp()};b.prototype.changeBit=function(a,c){var d=b.ONE.shiftLeft(a);this.bitwiseTo(d,c,d);return d};b.prototype.addTo=function(a,c){for(var b=0,d=0,l=Math.min(a.t,this.t);b<l;)d+=this.data[b]+a.data[b],c.data[b++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;b<this.t;)d+=
372 this.data[b],c.data[b++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;b<a.t;)d+=a.data[b],c.data[b++]=d&this.DM,d>>=this.DB;d+=a.s}c.s=0>d?-1:0;0<d?c.data[b++]=d:-1>d&&(c.data[b++]=this.DV+d);c.t=b;c.clamp()};b.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};b.prototype.dAddOffset=function(a,c){if(0!=a){for(;this.t<=c;)this.data[this.t++]=0;for(this.data[c]+=a;this.data[c]>=this.DV;)this.data[c]-=this.DV,++c>=this.t&&(this.data[this.t++]=
@@ -373,24 +374,24 @@ this.data[b],c.data[b++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;b<a.
374 b)};b.prototype.modInt=function(a){if(0>=a)return 0;var c=this.DV%a,b=0>this.s?a-1:0;if(0<this.t)if(0==c)b=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)b=(c*b+this.data[d])%a;return b};b.prototype.millerRabin=function(a){var c=this.subtract(b.ONE),d=c.getLowestSetBit();if(0>=d)return!1;for(var l=c.shiftRight(d),e=z(),g,h=0;h<a;++h){do g=new b(this.bitLength(),e);while(0>=g.compareTo(b.ONE)||0<=g.compareTo(c));g=g.modPow(l,this);if(0!=g.compareTo(b.ONE)&&0!=g.compareTo(c)){for(var f=1;f++<d&&0!=
375 g.compareTo(c);)if(g=g.modPowInt(2,this),0==g.compareTo(b.ONE))return!1;if(0!=g.compareTo(c))return!1}}return!0};b.prototype.clone=function(){var a=d();this.copyTo(a);return a};b.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};b.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};b.prototype.shortValue=
376 function(){return 0==this.t?this.s:this.data[0]<<16>>16};b.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};b.prototype.toByteArray=function(){var a=this.t,c=[];c[0]=this.s;var b=this.DB-a*this.DB%8,d,l=0;if(0<a--)for(b<this.DB&&(d=this.data[a]>>b)!=(this.s&this.DM)>>b&&(c[l++]=d|this.s<<this.DB-b);0<=a;)if(8>b?(d=(this.data[a]&(1<<b)-1)<<8-b,d|=this.data[--a]>>(b+=this.DB-8)):(d=this.data[a]>>(b-=8)&255,0>=b&&(b+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==l&&
376 -(this.s&128)!=(d&128)&&++l,0<l||d!=this.s)c[l++]=d;return c};b.prototype.equals=function(a){return 0==this.compareTo(a)};b.prototype.min=function(a){return 0>this.compareTo(a)?this:a};b.prototype.max=function(a){return 0<this.compareTo(a)?this:a};b.prototype.and=function(a){var c=d();this.bitwiseTo(a,y,c);return c};b.prototype.or=function(a){var c=d();this.bitwiseTo(a,w,c);return c};b.prototype.xor=function(a){var c=d();this.bitwiseTo(a,r,c);return c};b.prototype.andNot=function(a){var c=d();this.bitwiseTo(a,
377 +(this.s&128)!=(d&128)&&++l,0<l||d!=this.s)c[l++]=d;return c};b.prototype.equals=function(a){return 0==this.compareTo(a)};b.prototype.min=function(a){return 0>this.compareTo(a)?this:a};b.prototype.max=function(a){return 0<this.compareTo(a)?this:a};b.prototype.and=function(a){var c=d();this.bitwiseTo(a,x,c);return c};b.prototype.or=function(a){var c=d();this.bitwiseTo(a,w,c);return c};b.prototype.xor=function(a){var c=d();this.bitwiseTo(a,r,c);return c};b.prototype.andNot=function(a){var c=d();this.bitwiseTo(a,
378 A,c);return c};b.prototype.not=function(){for(var a=d(),c=0;c<this.t;++c)a.data[c]=this.DM&~this.data[c];a.t=this.t;a.s=~this.s;return a};b.prototype.shiftLeft=function(a){var c=d();0>a?this.rShiftTo(-a,c):this.lShiftTo(a,c);return c};b.prototype.shiftRight=function(a){var c=d();0>a?this.lShiftTo(-a,c):this.rShiftTo(a,c);return c};b.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var c=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var b=0;0==(a&65535)&&(a>>=16,b+=16);
379 0==(a&255)&&(a>>=8,b+=8);0==(a&15)&&(a>>=4,b+=4);0==(a&3)&&(a>>=2,b+=2);0==(a&1)&&++b;a=b}return c+a}return 0>this.s?this.t*this.DB:-1};b.prototype.bitCount=function(){for(var a=0,c=this.s&this.DM,b=0;b<this.t;++b){for(var d=this.data[b]^c,l=0;0!=d;)d&=d-1,++l;a+=l}return a};b.prototype.testBit=function(a){var c=Math.floor(a/this.DB);return c>=this.t?0!=this.s:0!=(this.data[c]&1<<a%this.DB)};b.prototype.setBit=function(a){return this.changeBit(a,w)};b.prototype.clearBit=function(a){return this.changeBit(a,
380 A)};b.prototype.flipBit=function(a){return this.changeBit(a,r)};b.prototype.add=function(a){var c=d();this.addTo(a,c);return c};b.prototype.subtract=function(a){var c=d();this.subTo(a,c);return c};b.prototype.multiply=function(a){var c=d();this.multiplyTo(a,c);return c};b.prototype.divide=function(a){var c=d();this.divRemTo(a,c,null);return c};b.prototype.remainder=function(a){var c=d();this.divRemTo(a,null,c);return c};b.prototype.divideAndRemainder=function(a){var c=d(),b=d();this.divRemTo(a,c,
380 -b);return[c,b]};b.prototype.modPow=function(a,c){var b=a.bitLength(),l,e=g(1),h;if(0>=b)return e;l=18>b?1:48>b?3:144>b?4:768>b?5:6;h=8>b?new m(c):c.isEven()?new C(c):new D(c);var f=[],k=3,x=l-1,q=(1<<l)-1;f[1]=h.convert(this);if(1<l)for(b=d(),h.sqrTo(f[1],b);k<=q;)f[k]=d(),h.mulTo(b,f[k-2],f[k]),k+=2;for(var z=a.t-1,v,n=!0,y=d(),b=p(a.data[z])-1;0<=z;){b>=x?v=a.data[z]>>b-x&q:(v=(a.data[z]&(1<<b+1)-1)<<x-b,0<z&&(v|=a.data[z-1]>>this.DB+b-x));for(k=l;0==(v&1);)v>>=1,--k;0>(b-=k)&&(b+=this.DB,--z);
381 -if(n)f[v].copyTo(e),n=!1;else{for(;1<k;)h.sqrTo(e,y),h.sqrTo(y,e),k-=2;0<k?h.sqrTo(e,y):(k=e,e=y,y=k);h.mulTo(y,f[v],e)}for(;0<=z&&0==(a.data[z]&1<<b);)h.sqrTo(e,y),k=e,e=y,y=k,0>--b&&(b=this.DB-1,--z)}return h.revert(e)};b.prototype.modInverse=function(a){var c=a.isEven();if(this.isEven()&&c||0==a.signum())return b.ZERO;for(var d=a.clone(),l=this.clone(),e=g(1),h=g(0),f=g(0),m=g(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),c?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
381 +b);return[c,b]};b.prototype.modPow=function(a,c){var b=a.bitLength(),l,e=g(1),h;if(0>=b)return e;l=18>b?1:48>b?3:144>b?4:768>b?5:6;h=8>b?new m(c):c.isEven()?new C(c):new E(c);var f=[],k=3,y=l-1,q=(1<<l)-1;f[1]=h.convert(this);if(1<l)for(b=d(),h.sqrTo(f[1],b);k<=q;)f[k]=d(),h.mulTo(b,f[k-2],f[k]),k+=2;for(var z=a.t-1,u,n=!0,x=d(),b=p(a.data[z])-1;0<=z;){b>=y?u=a.data[z]>>b-y&q:(u=(a.data[z]&(1<<b+1)-1)<<y-b,0<z&&(u|=a.data[z-1]>>this.DB+b-y));for(k=l;0==(u&1);)u>>=1,--k;0>(b-=k)&&(b+=this.DB,--z);
382 +if(n)f[u].copyTo(e),n=!1;else{for(;1<k;)h.sqrTo(e,x),h.sqrTo(x,e),k-=2;0<k?h.sqrTo(e,x):(k=e,e=x,x=k);h.mulTo(x,f[u],e)}for(;0<=z&&0==(a.data[z]&1<<b);)h.sqrTo(e,x),k=e,e=x,x=k,0>--b&&(b=this.DB-1,--z)}return h.revert(e)};b.prototype.modInverse=function(a){var c=a.isEven();if(this.isEven()&&c||0==a.signum())return b.ZERO;for(var d=a.clone(),l=this.clone(),e=g(1),h=g(0),f=g(0),m=g(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),c?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
383 e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;l.isEven();)l.rShiftTo(1,l),c?(f.isEven()&&m.isEven()||(f.addTo(this,f),m.subTo(a,m)),f.rShiftTo(1,f)):m.isEven()||m.subTo(a,m),m.rShiftTo(1,m);0<=d.compareTo(l)?(d.subTo(l,d),c&&e.subTo(f,e),h.subTo(m,h)):(l.subTo(d,l),c&&f.subTo(e,f),m.subTo(h,m))}if(0!=l.compareTo(b.ONE))return b.ZERO;if(0<=m.compareTo(a))return m.subtract(a);if(0>m.signum())m.addTo(a,m);else return m;return 0>m.signum()?m.add(a):m};b.prototype.pow=function(a){return this.exp(a,
384 new J)};b.prototype.gcd=function(a){var c=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>c.compareTo(a)){var b=c,c=a;a=b}var b=c.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return c;b<d&&(d=b);0<d&&(c.rShiftTo(d,c),a.rShiftTo(d,a));for(;0<c.signum();)0<(b=c.getLowestSetBit())&&c.rShiftTo(b,c),0<(b=a.getLowestSetBit())&&a.rShiftTo(b,a),0<=c.compareTo(a)?(c.subTo(a,c),c.rShiftTo(1,c)):(a.subTo(c,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};b.prototype.isProbablePrime=
385 function(a){var c,b=this.abs();if(1==b.t&&b.data[0]<=O[O.length-1]){for(c=0;c<O.length;++c)if(b.data[0]==O[c])return!0;return!1}if(b.isEven())return!1;for(c=1;c<O.length;){for(var d=O[c],l=c+1;l<O.length&&d<M;)d*=O[l++];for(d=b.modInt(d);c<l;)if(0==d%O[c++])return!1}return b.millerRabin(a)};c.jsbn=c.jsbn||{};c.jsbn.BigInteger=b}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,
386 p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.jsbn)return b.jsbn;b.defined.jsbn=!0;for(var f=0;f<e.length;++f)e[f](b);return b.jsbn}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/jsbn",["require","module"],function(){p.apply(null,Array.prototype.slice.call(arguments,
386 -0))})})();(function(){function a(c){function b(a,d,f){f||(f=c.md.sha1.create());for(var h="",g=Math.ceil(d/f.digestLength),k=0;k<g;++k){var m=String.fromCharCode(k>>24&255,k>>16&255,k>>8&255,k&255);f.start();f.update(a+m);h+=f.digest().getBytes()}return h.substring(0,d)}var d=c.pkcs1=c.pkcs1||{};d.encode_rsa_oaep=function(a,d,f,h,g){var u,m,n,y;"string"===typeof f?(u=f,m=h||void 0,n=g||void 0):f&&(u=f.label||void 0,m=f.seed||void 0,n=f.md||void 0,f.mgf1&&f.mgf1.md&&(y=f.mgf1.md));n?n.start():n=c.md.sha1.create();
387 -y||(y=n);a=Math.ceil(a.n.bitLength()/8);f=a-2*n.digestLength-2;if(d.length>f)throw y=Error("RSAES-OAEP input message length is too long."),y.length=d.length,y.maxLength=f,y;u||(u="");n.update(u,"raw");u=n.digest();h="";f-=d.length;for(g=0;g<f;g++)h+="\x00";d=u.getBytes()+h+"\u0001"+d;if(!m)m=c.random.getBytes(n.digestLength);else if(m.length!==n.digestLength)throw y=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),y.seedLength=m.length,y.digestLength=n.digestLength,
388 -y;a=b(m,a-n.digestLength-1,y);d=c.util.xorBytes(d,a,d.length);n=b(d,n.digestLength,y);return"\x00"+c.util.xorBytes(m,n,m.length)+d};d.decode_rsa_oaep=function(a,d,f,h){var g,u,m;"string"===typeof f?(g=f,u=h||void 0):f&&(g=f.label||void 0,u=f.md||void 0,f.mgf1&&f.mgf1.md&&(m=f.mgf1.md));f=Math.ceil(a.n.bitLength()/8);if(d.length!==f)throw m=Error("RSAES-OAEP encoded message length is invalid."),m.length=d.length,m.expectedLength=f,m;void 0===u?u=c.md.sha1.create():u.start();m||(m=u);if(f<2*u.digestLength+
389 -2)throw Error("RSAES-OAEP key is too short for the hash function.");g||(g="");u.update(g,"raw");g=u.digest().getBytes();a=d.charAt(0);h=d.substring(1,u.digestLength+1);d=d.substring(1+u.digestLength);var n=b(d,u.digestLength,m);h=c.util.xorBytes(h,n,h.length);m=b(h,f-u.digestLength-1,m);d=c.util.xorBytes(d,m,d.length);f=d.substring(0,u.digestLength);m="\x00"!==a;for(a=0;a<u.digestLength;++a)m|=g.charAt(a)!==f.charAt(a);g=1;for(u=a=u.digestLength;u<d.length;u++)f=d.charCodeAt(u),h=f&1^1,m|=f&(g?65534:
387 +0))})})();(function(){function a(c){function b(a,d,f){f||(f=c.md.sha1.create());for(var h="",g=Math.ceil(d/f.digestLength),k=0;k<g;++k){var m=String.fromCharCode(k>>24&255,k>>16&255,k>>8&255,k&255);f.start();f.update(a+m);h+=f.digest().getBytes()}return h.substring(0,d)}var d=c.pkcs1=c.pkcs1||{};d.encode_rsa_oaep=function(a,d,f,h,g){var v,m,n,x;"string"===typeof f?(v=f,m=h||void 0,n=g||void 0):f&&(v=f.label||void 0,m=f.seed||void 0,n=f.md||void 0,f.mgf1&&f.mgf1.md&&(x=f.mgf1.md));n?n.start():n=c.md.sha1.create();
388 +x||(x=n);a=Math.ceil(a.n.bitLength()/8);f=a-2*n.digestLength-2;if(d.length>f)throw x=Error("RSAES-OAEP input message length is too long."),x.length=d.length,x.maxLength=f,x;v||(v="");n.update(v,"raw");v=n.digest();h="";f-=d.length;for(g=0;g<f;g++)h+="\x00";d=v.getBytes()+h+"\u0001"+d;if(!m)m=c.random.getBytes(n.digestLength);else if(m.length!==n.digestLength)throw x=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),x.seedLength=m.length,x.digestLength=n.digestLength,
389 +x;a=b(m,a-n.digestLength-1,x);d=c.util.xorBytes(d,a,d.length);n=b(d,n.digestLength,x);return"\x00"+c.util.xorBytes(m,n,m.length)+d};d.decode_rsa_oaep=function(a,d,f,h){var g,v,m;"string"===typeof f?(g=f,v=h||void 0):f&&(g=f.label||void 0,v=f.md||void 0,f.mgf1&&f.mgf1.md&&(m=f.mgf1.md));f=Math.ceil(a.n.bitLength()/8);if(d.length!==f)throw m=Error("RSAES-OAEP encoded message length is invalid."),m.length=d.length,m.expectedLength=f,m;void 0===v?v=c.md.sha1.create():v.start();m||(m=v);if(f<2*v.digestLength+
390 +2)throw Error("RSAES-OAEP key is too short for the hash function.");g||(g="");v.update(g,"raw");g=v.digest().getBytes();a=d.charAt(0);h=d.substring(1,v.digestLength+1);d=d.substring(1+v.digestLength);var n=b(d,v.digestLength,m);h=c.util.xorBytes(h,n,h.length);m=b(h,f-v.digestLength-1,m);d=c.util.xorBytes(d,m,d.length);f=d.substring(0,v.digestLength);m="\x00"!==a;for(a=0;a<v.digestLength;++a)m|=g.charAt(a)!==f.charAt(a);g=1;for(v=a=v.digestLength;v<d.length;v++)f=d.charCodeAt(v),h=f&1^1,m|=f&(g?65534:
391 0),g&=h,a+=g;if(m||1!==d.charCodeAt(a))throw Error("Invalid RSAES-OAEP padding.");return d.substring(a+1)}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.pkcs1)return b.pkcs1;b.defined.pkcs1=!0;for(var f=0;f<e.length;++f)e[f](b);return b.pkcs1}},
392 r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/pkcs1",["require","module","./util","./random","./sha1"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,c,l,g){return"workers"in l?e(a,c,l,g):d(a,c,l,g)}function d(a,b,e,g){var h=f(a,b),k=0,m=n(h.bitLength());"millerRabinTests"in
392 -e&&(m=e.millerRabinTests);var z=10;"maxBlockTime"in e&&(z=e.maxBlockTime);var G=+new Date;do{h.bitLength()>a&&(h=f(a,b));if(h.isProbablePrime(m))return g(null,h);h.dAddOffset(p[k++%8],0)}while(0>z||+new Date-G<z);c.util.setImmediate(function(){d(a,b,e,g)})}function e(a,b,e,h){function k(){function c(l){if(!u){--e;var k=l.data;if(k.found){for(l=0;l<d.length;++l)d[l].terminate();u=!0;return h(null,new g(k.prime,16))}m.bitLength()>a&&(m=f(a,b));k=m.toString(16);l.target.postMessage({hex:k,workLoad:z});
393 -m.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],l=0;l<C;++l)d[l]=new Worker(p);for(var e=C,l=0;l<C;++l)d[l].addEventListener("message",c);var u=!1}if("undefined"===typeof Worker)return d(a,b,e,h);var m=f(a,b),C=e.workers,z=e.workLoad||100,n=30*z/8,p=e.workerScript||"forge/prime.worker.js";if(-1===C)return c.util.estimateCores(function(a,c){a&&(c=2);C=c-1;k()});k()}function f(a,c){var b=new g(a,c),d=a-1;b.testBit(d)||b.bitwiseTo(g.ONE.shiftLeft(d),r,b);b.dAddOffset(31-b.mod(m).byteValue(),0);return b}
393 +e&&(m=e.millerRabinTests);var z=10;"maxBlockTime"in e&&(z=e.maxBlockTime);var G=+new Date;do{h.bitLength()>a&&(h=f(a,b));if(h.isProbablePrime(m))return g(null,h);h.dAddOffset(p[k++%8],0)}while(0>z||+new Date-G<z);c.util.setImmediate(function(){d(a,b,e,g)})}function e(a,b,e,h){function k(){function c(l){if(!v){--e;var k=l.data;if(k.found){for(l=0;l<d.length;++l)d[l].terminate();v=!0;return h(null,new g(k.prime,16))}m.bitLength()>a&&(m=f(a,b));k=m.toString(16);l.target.postMessage({hex:k,workLoad:z});
394 +m.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],l=0;l<C;++l)d[l]=new Worker(p);for(var e=C,l=0;l<C;++l)d[l].addEventListener("message",c);var v=!1}if("undefined"===typeof Worker)return d(a,b,e,h);var m=f(a,b),C=e.workers,z=e.workLoad||100,n=30*z/8,p=e.workerScript||"forge/prime.worker.js";if(-1===C)return c.util.estimateCores(function(a,c){a&&(c=2);C=c-1;k()});k()}function f(a,c){var b=new g(a,c),d=a-1;b.testBit(d)||b.bitwiseTo(g.ONE.shiftLeft(d),r,b);b.dAddOffset(31-b.mod(m).byteValue(),0);return b}
395 function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!c.prime){var h=c.prime=c.prime||{},g=c.jsbn.BigInteger,p=[6,4,2,4,2,4,6,2],m=new g(null);m.fromInt(30);var r=function(a,c){return a|c};h.generateProbablePrime=function(a,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var g=d.algorithm||"PRIMEINC";"string"===typeof g&&(g={name:g});g.options=g.options||{};var h=d.prng||c.random;d={nextBytes:function(a){for(var c=h.getBytesSync(a.length),
396 b=0;b<a.length;++b)a[b]=c.charCodeAt(b)}};if("PRIMEINC"===g.name)return b(a,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.prime)return b.prime;b.defined.prime=!0;for(var f=
397 0;f<e.length;++f)e[f](b);return b.prime}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/prime",["require","module","./util","./jsbn","./random"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,d,e){var g=c.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(a.length>d-11)throw g=
@@ -399,7 +400,7 @@ typeof g)throw Error("Encryption block is invalid.");e=0;if(0===f)for(e=b-3-g,g=
400 a.q);g(a.qBits,f)})}function g(a,b){c.prime.generateProbablePrime(a,k,b)}function f(c,b){if(c)return d(c);a.q=b;if(0>a.p.compareTo(a.q)){var l=a.p;a.p=a.q;a.q=l}0!==a.p.subtract(h.ONE).gcd(a.e).compareTo(h.ONE)?(a.p=null,e()):0!==a.q.subtract(h.ONE).gcd(a.e).compareTo(h.ONE)?(a.q=null,g(a.qBits,f)):(a.p1=a.p.subtract(h.ONE),a.q1=a.q.subtract(h.ONE),a.phi=a.p1.multiply(a.q1),0!==a.phi.gcd(a.e).compareTo(h.ONE)?(a.p=a.q=null,e()):(a.n=a.p.multiply(a.q),a.n.bitLength()!==a.bits?(a.q=null,g(a.qBits,f)):
401 (l=a.e.modInverse(a.phi),a.keys={privateKey:p.rsa.setPrivateKey(a.n,a.e,l,a.p,a.q,l.mod(a.p1),l.mod(a.q1),a.q.modInverse(a.p)),publicKey:p.rsa.setPublicKey(a.n,a.e)},d(null,a.keys))))}"function"===typeof b&&(d=b,b={});b=b||{};var k={algorithm:{name:b.algorithm||"PRIMEINC",options:{workers:b.workers||2,workLoad:b.workLoad||100,workerScript:b.workerScript}}};"prng"in b&&(k.prng=b.prng);e()}function f(a){a=a.toString(16);"8"<=a[0]&&(a="00"+a);return c.util.hexToBytes(a)}function n(a){return 100>=a?27:
402 150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof h)var h=c.jsbn.BigInteger;var g=c.asn1;c.pki=c.pki||{};c.pki.rsa=c.rsa=c.rsa||{};var p=c.pki,m=[6,4,2,4,2,4,6,2],r={name:"PrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:g.Class.UNIVERSAL,
402 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},y={name:"RSAPrivateKey",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
403 +type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},x={name:"RSAPrivateKey",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
404 tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
405 tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},w={name:"RSAPublicKey",tagClass:g.Class.UNIVERSAL,
406 type:g.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},F=c.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:g.Class.UNIVERSAL,
@@ -414,9 +415,9 @@ null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(
415 g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:p.rsa.setPublicKey(a.n,a.e)});g=+new Date;f+=g-e;e=g}return null!==a.keys};p.rsa.generateKeyPair=function(a,c,b,d){1===arguments.length?"object"===typeof a?(b=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof c?(d=c,c=void 0):"number"!==typeof c&&(b=c,c=void 0):(b=a,d=c,c=a=void 0):3===arguments.length&&("number"===typeof c?"function"===typeof b&&(d=b,b=void 0):(d=b,b=c,c=void 0));b=
416 b||{};void 0===a&&(a=b.bits||2048);void 0===c&&(c=b.e||65537);var l=p.rsa.createKeyPairGenerationState(a,c,b);if(!d)return p.rsa.stepKeyPairGenerationState(l,0),l.keys;e(l,b,d)};p.setRsaPublicKey=p.rsa.setPublicKey=function(a,e){var h={n:a,e:e,encrypt:function(a,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,c,d){return b(a,c,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(a,b){return c.pkcs1.encode_rsa_oaep(b,
417 a,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');a=d.encode(a,h,!0);return p.rsa.encrypt(a,h,!0)},verify:function(a,c,b){"string"===typeof b?b=b.toUpperCase():void 0===b&&(b="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===b)b={verify:function(a,c){c=d(c,h,!0);var b=g.fromDer(c);return a===b.value[1].value}};else if("NONE"===b||"NULL"===b||null===b)b={verify:function(a,c){c=d(c,
417 -h,!0);return a===c}};c=p.rsa.decrypt(c,h,!0,!1);return b.verify(a,c,h.n.bitLength())}};return h};p.setRsaPrivateKey=p.rsa.setPrivateKey=function(a,b,e,g,h,f,k,m){var v={n:a,e:b,d:e,p:g,q:h,dP:f,dQ:k,qInv:m,decrypt:function(a,b,e){"string"===typeof b?b=b.toUpperCase():void 0===b&&(b="RSAES-PKCS1-V1_5");a=p.rsa.decrypt(a,v,!1,!1);if("RSAES-PKCS1-V1_5"===b)b={decode:d};else if("RSA-OAEP"===b||"RSAES-OAEP"===b)b={decode:function(a,b){return c.pkcs1.decode_rsa_oaep(b,a,e)}};else if(-1!==["RAW","NONE",
418 -"NULL",null].indexOf(b))b={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+b+'".');return b.decode(a,v,!1)},sign:function(a,c){var b=!1;"string"===typeof c&&(c=c.toUpperCase());if(void 0===c||"RSASSA-PKCS1-V1_5"===c)c={encode:A},b=1;else if("NONE"===c||"NULL"===c||null===c)c={encode:function(){return a}},b=1;var d=c.encode(a,v.n.bitLength());return p.rsa.encrypt(d,v,b)}};return v};p.wrapRsaPrivateKey=function(a){return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,
419 -[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(0).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(p.oids.rsaEncryption).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")]),g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,g.toDer(a).getBytes())])};p.privateKeyFromAsn1=function(a){var b={},d=[];g.validate(a,r,b,d)&&(a=g.fromDer(c.util.createBuffer(b.privateKey)));b={};d=[];if(!g.validate(a,y,b,d))throw b=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
418 +h,!0);return a===c}};c=p.rsa.decrypt(c,h,!0,!1);return b.verify(a,c,h.n.bitLength())}};return h};p.setRsaPrivateKey=p.rsa.setPrivateKey=function(a,b,e,g,h,f,k,m){var u={n:a,e:b,d:e,p:g,q:h,dP:f,dQ:k,qInv:m,decrypt:function(a,b,e){"string"===typeof b?b=b.toUpperCase():void 0===b&&(b="RSAES-PKCS1-V1_5");a=p.rsa.decrypt(a,u,!1,!1);if("RSAES-PKCS1-V1_5"===b)b={decode:d};else if("RSA-OAEP"===b||"RSAES-OAEP"===b)b={decode:function(a,b){return c.pkcs1.decode_rsa_oaep(b,a,e)}};else if(-1!==["RAW","NONE",
419 +"NULL",null].indexOf(b))b={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+b+'".');return b.decode(a,u,!1)},sign:function(a,c){var b=!1;"string"===typeof c&&(c=c.toUpperCase());if(void 0===c||"RSASSA-PKCS1-V1_5"===c)c={encode:A},b=1;else if("NONE"===c||"NULL"===c||null===c)c={encode:function(){return a}},b=1;var d=c.encode(a,u.n.bitLength());return p.rsa.encrypt(d,u,b)}};return u};p.wrapRsaPrivateKey=function(a){return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,
420 +[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(0).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(p.oids.rsaEncryption).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")]),g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,g.toDer(a).getBytes())])};p.privateKeyFromAsn1=function(a){var b={},d=[];g.validate(a,r,b,d)&&(a=g.fromDer(c.util.createBuffer(b.privateKey)));b={};d=[];if(!g.validate(a,x,b,d))throw b=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
421 b.errors=d,b;var e,f,k,m,u,d=c.util.createBuffer(b.privateKeyModulus).toHex();a=c.util.createBuffer(b.privateKeyPublicExponent).toHex();e=c.util.createBuffer(b.privateKeyPrivateExponent).toHex();f=c.util.createBuffer(b.privateKeyPrime1).toHex();k=c.util.createBuffer(b.privateKeyPrime2).toHex();m=c.util.createBuffer(b.privateKeyExponent1).toHex();u=c.util.createBuffer(b.privateKeyExponent2).toHex();b=c.util.createBuffer(b.privateKeyCoefficient).toHex();return p.setRsaPrivateKey(new h(d,16),new h(a,
422 16),new h(e,16),new h(f,16),new h(k,16),new h(m,16),new h(u,16),new h(b,16))};p.privateKeyToAsn1=p.privateKeyToRSAPrivateKey=function(a){return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(0).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,f(a.n)),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,f(a.e)),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,f(a.d)),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,f(a.p)),g.create(g.Class.UNIVERSAL,
423 g.Type.INTEGER,!1,f(a.q)),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,f(a.dP)),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,f(a.dQ)),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,f(a.qInv))])};p.publicKeyFromAsn1=function(a){var b={},d=[];if(g.validate(a,F,b,d)){d=g.derToOid(b.publicKeyOid);if(d!==p.oids.rsaEncryption)throw b=Error("Cannot read public key. Unknown OID."),b.oid=d,b;a=b.rsaPublicKey}d=[];if(!g.validate(a,w,b,d))throw b=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
@@ -427,25 +428,25 @@ c){return a.start().update(c).digest().getBytes()}if("undefined"===typeof d)var
428 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},g={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
429 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
430 type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},p={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
430 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};f.encryptPrivateKeyInfo=function(a,b,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=c.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),u;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,C;switch(d.algorithm){case "aes128":x=u=16;d=n["aes128-CBC"];C=c.aes.createEncryptionCipher;break;case "aes192":u=24;
431 -x=16;d=n["aes192-CBC"];C=c.aes.createEncryptionCipher;break;case "aes256":u=32;x=16;d=n["aes256-CBC"];C=c.aes.createEncryptionCipher;break;case "des":x=u=8;d=n.desCBC;C=c.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var z=c.pkcs5.pbkdf2(b,g,h,u);b=c.random.getBytesSync(x);h=C(z);h.start(b);h.update(e.toDer(a));h.finish();a=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
431 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};f.encryptPrivateKeyInfo=function(a,b,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=c.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),v;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,C;switch(d.algorithm){case "aes128":y=v=16;d=n["aes128-CBC"];C=c.aes.createEncryptionCipher;break;case "aes192":v=24;
432 +y=16;d=n["aes192-CBC"];C=c.aes.createEncryptionCipher;break;case "aes256":v=32;y=16;d=n["aes256-CBC"];C=c.aes.createEncryptionCipher;break;case "des":y=v=8;d=n.desCBC;C=c.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var z=c.pkcs5.pbkdf2(b,g,h,v);b=c.random.getBytesSync(y);h=C(z);h.start(b);h.update(e.toDer(a));h.finish();a=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
433 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,g),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
433 -e.Type.OCTETSTRING,!1,b)])])])}else if("3des"===d.algorithm)u=24,d=new c.util.ByteBuffer(g),z=f.pbe.generatePkcs12Key(b,d,1,h,u),b=f.pbe.generatePkcs12Key(b,d,2,h,u),h=c.des.createEncryptionCipher(z),h.start(b),h.update(e.toDer(a)),h.finish(),a=h.output.getBytes(),g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
434 +e.Type.OCTETSTRING,!1,b)])])])}else if("3des"===d.algorithm)v=24,d=new c.util.ByteBuffer(g),z=f.pbe.generatePkcs12Key(b,d,1,h,v),b=f.pbe.generatePkcs12Key(b,d,2,h,v),h=c.des.createEncryptionCipher(z),h.start(b),h.update(e.toDer(a)),h.finish(),a=h.output.getBytes(),g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
435 !1,g),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[g,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,a)])};f.decryptPrivateKeyInfo=function(a,b){var d=null,g={},k=[];if(!e.validate(a,h,g,k))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;k=e.derToOid(g.encryptionOid);
436 k=f.pbe.getCipher(k,g.encryptionParams,b);g=c.util.createBuffer(g.encryptedData);k.update(g);k.finish()&&(d=e.fromDer(k.output));return d};f.encryptedPrivateKeyToPem=function(a,b){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(a).getBytes()};return c.pem.encode(d,{maxline:b})};f.encryptedPrivateKeyFromPem=function(a){a=c.pem.decode(a)[0];if("ENCRYPTED PRIVATE KEY"!==a.type){var b=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');b.headerType=
437 a.type;throw b;}if(a.procType&&"ENCRYPTED"===a.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(a.body)};f.encryptRsaPrivateKey=function(a,b,d){d=d||{};if(!d.legacy)return a=f.wrapRsaPrivateKey(f.privateKeyToAsn1(a)),a=f.encryptPrivateKeyInfo(a,b,d),f.encryptedPrivateKeyToPem(a);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=c.random.getBytesSync(16);k=c.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
438 h=24;g=c.random.getBytesSync(16);k=c.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=c.random.getBytesSync(16);k=c.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=c.random.getBytesSync(8);k=c.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=c.random.getBytesSync(8);k=c.des.createEncryptionCipher;break;default:throw a=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),a.algorithm=d.algorithm,a;}b=c.pbe.opensslDeriveBytes(b,
439 g.substr(0,8),h);b=k(b);b.start(g);b.update(e.toDer(f.privateKeyToAsn1(a)));b.finish();a={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:c.util.bytesToHex(g).toUpperCase()},body:b.output.getBytes()};return c.pem.encode(a)};f.decryptRsaPrivateKey=function(a,b){var d=null,g=c.pem.decode(a)[0];if("ENCRYPTED PRIVATE KEY"!==g.type&&"PRIVATE KEY"!==g.type&&"RSA PRIVATE KEY"!==g.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
440 d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=c.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=c.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=c.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=c.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=c.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(a){return c.rc2.createDecryptionCipher(a,40)};break;case "RC2-64-CBC":h=
440 -8;k=function(a){return c.rc2.createDecryptionCipher(a,64)};break;case "RC2-128-CBC":h=16;k=function(a){return c.rc2.createDecryptionCipher(a,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var u=c.util.hexToBytes(g.dekInfo.parameters);h=c.pbe.opensslDeriveBytes(b,u.substr(0,8),h);k=k(h);k.start(u);k.update(c.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
441 -g.body;d="ENCRYPTED PRIVATE KEY"===g.type?f.decryptPrivateKeyInfo(e.fromDer(d),b):e.fromDer(d);null!==d&&(d=f.privateKeyFromAsn1(d));return d};f.pbe.generatePkcs12Key=function(a,b,d,g,e,h){var f,k;if("undefined"===typeof h||null===h)h=c.md.sha1.create();var u=h.digestLength,z=h.blockLength,n=new c.util.ByteBuffer,v=new c.util.ByteBuffer;if(null!==a&&void 0!==a){for(k=0;k<a.length;k++)v.putInt16(a.charCodeAt(k));v.putInt16(0)}a=v.length();var q=b.length(),p=new c.util.ByteBuffer;p.fillWithByte(d,z);
442 -var r=z*Math.ceil(q/z);d=new c.util.ByteBuffer;for(k=0;k<r;k++)d.putByte(b.at(k%q));r=z*Math.ceil(a/z);b=new c.util.ByteBuffer;for(k=0;k<r;k++)b.putByte(v.at(k%a));v=d;v.putBuffer(b);b=Math.ceil(e/u);for(d=1;d<=b;d++){r=new c.util.ByteBuffer;r.putBytes(p.bytes());r.putBytes(v.bytes());for(k=0;k<g;k++)h.start(),h.update(r.getBytes()),r=h.digest();var E=new c.util.ByteBuffer;for(k=0;k<z;k++)E.putByte(r.at(k%u));var B=Math.ceil(q/z)+Math.ceil(a/z),L=new c.util.ByteBuffer;for(f=0;f<B;f++){var W=new c.util.ByteBuffer(v.getBytes(z)),
443 -U=511;for(k=E.length()-1;0<=k;k--)U>>=8,U+=E.at(k)+W.at(k),W.setAt(k,U&255);L.putBuffer(W)}v=L;n.putBuffer(r)}n.truncate(n.length()-e);return n};f.pbe.getCipher=function(a,c,b){switch(a){case f.oids.pkcs5PBES2:return f.pbe.getCipherForPBES2(a,c,b);case f.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case f.oids["pbewithSHAAnd40BitRC2-CBC"]:return f.pbe.getCipherForPKCS12PBE(a,c,b);default:throw c=Error("Cannot read encrypted PBE data block. Unsupported OID."),c.oid=a,c.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
441 +8;k=function(a){return c.rc2.createDecryptionCipher(a,64)};break;case "RC2-128-CBC":h=16;k=function(a){return c.rc2.createDecryptionCipher(a,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var v=c.util.hexToBytes(g.dekInfo.parameters);h=c.pbe.opensslDeriveBytes(b,v.substr(0,8),h);k=k(h);k.start(v);k.update(c.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
442 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?f.decryptPrivateKeyInfo(e.fromDer(d),b):e.fromDer(d);null!==d&&(d=f.privateKeyFromAsn1(d));return d};f.pbe.generatePkcs12Key=function(a,b,d,g,e,h){var f,k;if("undefined"===typeof h||null===h)h=c.md.sha1.create();var v=h.digestLength,n=h.blockLength,u=new c.util.ByteBuffer,p=new c.util.ByteBuffer;if(null!==a&&void 0!==a){for(k=0;k<a.length;k++)p.putInt16(a.charCodeAt(k));p.putInt16(0)}a=p.length();var q=b.length(),r=new c.util.ByteBuffer;r.fillWithByte(d,n);
443 +var D=n*Math.ceil(q/n);d=new c.util.ByteBuffer;for(k=0;k<D;k++)d.putByte(b.at(k%q));D=n*Math.ceil(a/n);b=new c.util.ByteBuffer;for(k=0;k<D;k++)b.putByte(p.at(k%a));p=d;p.putBuffer(b);b=Math.ceil(e/v);for(d=1;d<=b;d++){D=new c.util.ByteBuffer;D.putBytes(r.bytes());D.putBytes(p.bytes());for(k=0;k<g;k++)h.start(),h.update(D.getBytes()),D=h.digest();var B=new c.util.ByteBuffer;for(k=0;k<n;k++)B.putByte(D.at(k%v));var P=Math.ceil(q/n)+Math.ceil(a/n),L=new c.util.ByteBuffer;for(f=0;f<P;f++){var W=new c.util.ByteBuffer(p.getBytes(n)),
444 +U=511;for(k=B.length()-1;0<=k;k--)U>>=8,U+=B.at(k)+W.at(k),W.setAt(k,U&255);L.putBuffer(W)}p=L;u.putBuffer(D)}u.truncate(u.length()-e);return u};f.pbe.getCipher=function(a,c,b){switch(a){case f.oids.pkcs5PBES2:return f.pbe.getCipherForPBES2(a,c,b);case f.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case f.oids["pbewithSHAAnd40BitRC2-CBC"]:return f.pbe.getCipherForPKCS12PBE(a,c,b);default:throw c=Error("Cannot read encrypted PBE data block. Unsupported OID."),c.oid=a,c.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
445 "pbewithSHAAnd40BitRC2-CBC"],c;}};f.pbe.getCipherForPBES2=function(a,b,d){var h={};a=[];if(!e.validate(b,g,h,a)){var k=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");k.errors=a;throw k;}a=e.derToOid(h.kdfOid);if(a!==f.oids.pkcs5PBKDF2)throw k=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),k.oid=a,k.supportedOids=["pkcs5PBKDF2"],k;a=e.derToOid(h.encOid);if(a!==f.oids["aes128-CBC"]&&
445 -a!==f.oids["aes192-CBC"]&&a!==f.oids["aes256-CBC"]&&a!==f.oids["des-EDE3-CBC"]&&a!==f.oids.desCBC)throw k=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),k.oid=a,k.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],k;b=h.kdfSalt;var u=c.util.createBuffer(h.kdfIterationCount),u=u.getInt(u.length()<<3),n;switch(f.oids[a]){case "aes128-CBC":n=16;k=c.aes.createDecryptionCipher;break;case "aes192-CBC":n=24;k=c.aes.createDecryptionCipher;break;
446 -case "aes256-CBC":n=32;k=c.aes.createDecryptionCipher;break;case "des-EDE3-CBC":n=24;k=c.des.createDecryptionCipher;break;case "desCBC":n=8,k=c.des.createDecryptionCipher}a=c.pkcs5.pbkdf2(d,b,u,n);h=h.encIv;k=k(a);k.start(h);return k};f.pbe.getCipherForPKCS12PBE=function(a,b,d){var g={},h=[];if(!e.validate(b,p,g,h))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;var h=c.util.createBuffer(g.salt),g=c.util.createBuffer(g.iterations),
446 +a!==f.oids["aes192-CBC"]&&a!==f.oids["aes256-CBC"]&&a!==f.oids["des-EDE3-CBC"]&&a!==f.oids.desCBC)throw k=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),k.oid=a,k.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],k;b=h.kdfSalt;var v=c.util.createBuffer(h.kdfIterationCount),v=v.getInt(v.length()<<3),n;switch(f.oids[a]){case "aes128-CBC":n=16;k=c.aes.createDecryptionCipher;break;case "aes192-CBC":n=24;k=c.aes.createDecryptionCipher;break;
447 +case "aes256-CBC":n=32;k=c.aes.createDecryptionCipher;break;case "des-EDE3-CBC":n=24;k=c.des.createDecryptionCipher;break;case "desCBC":n=8,k=c.des.createDecryptionCipher}a=c.pkcs5.pbkdf2(d,b,v,n);h=h.encIv;k=k(a);k.start(h);return k};f.pbe.getCipherForPKCS12PBE=function(a,b,d){var g={},h=[];if(!e.validate(b,p,g,h))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;var h=c.util.createBuffer(g.salt),g=c.util.createBuffer(g.iterations),
448 g=g.getInt(g.length()<<3),k;switch(a){case f.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:k=24;b=8;a=c.des.startDecrypting;break;case f.oids["pbewithSHAAnd40BitRC2-CBC"]:k=5;b=8;a=function(a,b){var d=c.rc2.createDecryptionCipher(a,40);d.start(b,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=a,d;}k=f.pbe.generatePkcs12Key(d,h,1,g,k);d=f.pbe.generatePkcs12Key(d,h,2,g,b);return a(k,d)};f.pbe.opensslDeriveBytes=function(a,d,g,e){if("undefined"===
448 -typeof e||null===e)e=c.md.md5.create();null===d&&(d="");for(var h=[b(e,a+d)],f=16,u=1;f<g;++u,f+=16)h.push(b(e,h[u-1]+a+d));return h.join("").substr(0,g)}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.pbe)return b.pbe;b.defined.pbe=!0;for(var f=
449 +typeof e||null===e)e=c.md.md5.create();null===d&&(d="");for(var h=[b(e,a+d)],f=16,n=1;f<g;++n,f+=16)h.push(b(e,h[n-1]+a+d));return h.join("").substr(0,g)}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.pbe)return b.pbe;b.defined.pbe=!0;for(var f=
450 0;f<e.length;++f)e[f](b);return b.pbe}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){var b=c.asn1,d=c.pkcs7asn1=c.pkcs7asn1||{};c.pkcs7=
451 c.pkcs7||{};c.pkcs7.asn1=d;c={name:"ContentInfo",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:b.Class.UNIVERSAL,type:b.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:b.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=c;var e={name:"EncryptedContentInfo",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
452 tagClass:b.Class.UNIVERSAL,type:b.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:b.Class.UNIVERSAL,type:b.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:b.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
@@ -462,10 +463,10 @@ typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){va
463 module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.mgf1)return b.mgf1;b.defined.mgf1=!0;for(var f=0;f<e.length;++f)e[f](b);return b.mgf1}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,
464 Array.prototype.slice.call(arguments,0))};c("js/mgf1",["require","module","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){c.mgf=c.mgf||{};c.mgf.mgf1=c.mgf1}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||
465 {};if(b.defined.mgf)return b.mgf;b.defined.mgf=!0;for(var f=0;f<e.length;++f)e[f](b);return b.mgf}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/mgf",["require","module","./mgf1"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){(c.pss=c.pss||{}).create=function(a){3===arguments.length&&
465 -(a={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var b=a.md,d=a.mgf,f=b.digestLength,n=a.salt||null;"string"===typeof n&&(n=c.util.createBuffer(n));var h;if("saltLength"in a)h=a.saltLength;else if(null!==n)h=n.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==n&&n.length()!==h)throw Error("Given salt length does not match length of given salt.");var g=a.prng||c.random;return{encode:function(a,k){var p,y=k-1,w=Math.ceil(y/8),r=a.digest().getBytes();
466 -if(w<f+h+2)throw Error("Message is too long to encrypt.");var A;A=null===n?g.getBytesSync(h):n.bytes();p=new c.util.ByteBuffer;p.fillWithByte(0,8);p.putBytes(r);p.putBytes(A);b.start();b.update(p.getBytes());r=b.digest().getBytes();p=new c.util.ByteBuffer;p.fillWithByte(0,w-h-f-2);p.putByte(1);p.putBytes(A);var J=p.getBytes(),x=w-f-1,C=d.generate(r,x);A="";for(p=0;p<x;p++)A+=String.fromCharCode(J.charCodeAt(p)^C.charCodeAt(p));y=65280>>8*w-y&255;A=String.fromCharCode(A.charCodeAt(0)&~y)+A.substr(1);
467 -return A+r+String.fromCharCode(188)},verify:function(a,g,k){var n;n=k-1;k=Math.ceil(n/8);g=g.substr(-k);if(k<f+h+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==g.charCodeAt(k-1))throw Error("Encoded message does not end in 0xBC.");var p=k-f-1,r=g.substr(0,p);g=g.substr(p,f);var A=65280>>8*k-n&255;if(0!==(r.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var B=d.generate(g,p),x="";for(n=0;n<p;n++)x+=String.fromCharCode(r.charCodeAt(n)^B.charCodeAt(n));
468 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);k=k-f-h-2;for(n=0;n<k;n++)if(0!==x.charCodeAt(n))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(k))throw Error("Inconsistent PSS signature, 0x01 marker not found");k=x.substr(-h);p=new c.util.ByteBuffer;p.fillWithByte(0,8);p.putBytes(a);p.putBytes(k);b.start();b.update(p.getBytes());a=b.digest().getBytes();return g===a}}}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,
466 +(a={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var b=a.md,d=a.mgf,f=b.digestLength,n=a.salt||null;"string"===typeof n&&(n=c.util.createBuffer(n));var h;if("saltLength"in a)h=a.saltLength;else if(null!==n)h=n.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==n&&n.length()!==h)throw Error("Given salt length does not match length of given salt.");var g=a.prng||c.random;return{encode:function(a,k){var p,x=k-1,w=Math.ceil(x/8),r=a.digest().getBytes();
467 +if(w<f+h+2)throw Error("Message is too long to encrypt.");var A;A=null===n?g.getBytesSync(h):n.bytes();p=new c.util.ByteBuffer;p.fillWithByte(0,8);p.putBytes(r);p.putBytes(A);b.start();b.update(p.getBytes());r=b.digest().getBytes();p=new c.util.ByteBuffer;p.fillWithByte(0,w-h-f-2);p.putByte(1);p.putBytes(A);var J=p.getBytes(),y=w-f-1,C=d.generate(r,y);A="";for(p=0;p<y;p++)A+=String.fromCharCode(J.charCodeAt(p)^C.charCodeAt(p));x=65280>>8*w-x&255;A=String.fromCharCode(A.charCodeAt(0)&~x)+A.substr(1);
468 +return A+r+String.fromCharCode(188)},verify:function(a,g,k){var n;n=k-1;k=Math.ceil(n/8);g=g.substr(-k);if(k<f+h+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==g.charCodeAt(k-1))throw Error("Encoded message does not end in 0xBC.");var p=k-f-1,r=g.substr(0,p);g=g.substr(p,f);var A=65280>>8*k-n&255;if(0!==(r.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var B=d.generate(g,p),y="";for(n=0;n<p;n++)y+=String.fromCharCode(r.charCodeAt(n)^B.charCodeAt(n));
469 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);k=k-f-h-2;for(n=0;n<k;n++)if(0!==y.charCodeAt(n))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(k))throw Error("Inconsistent PSS signature, 0x01 marker not found");k=y.substr(-h);p=new c.util.ByteBuffer;p.fillWithByte(0,8);p.putBytes(a);p.putBytes(k);b.start();b.update(p.getBytes());a=b.digest().getBytes();return g===a}}}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,
470 module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.pss)return b.pss;b.defined.pss=!0;for(var f=0;f<e.length;++f)e[f](b);return b.pss}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/pss",
471 ["require","module","./random","./util"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,c){"string"===typeof c&&(c={shortName:c});for(var d=null,g,e=0;null===d&&e<a.attributes.length;++e)g=a.attributes[e],c.type&&c.type===g.type?d=g:c.name&&c.name===g.name?d=g:c.shortName&&c.shortName===g.shortName&&(d=g);return d}function d(a){var b=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]),e;a=a.attributes;for(var h=0;h<a.length;++h){e=a[h];
472 var f=e.value,k=g.Type.PRINTABLESTRING;"valueTagClass"in e&&(k=e.valueTagClass,k===g.Type.UTF8&&(f=c.util.encodeUtf8(f)));e=g.create(g.Class.UNIVERSAL,g.Type.SET,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(e.type).getBytes()),g.create(g.Class.UNIVERSAL,k,!1,f)])]);b.value.push(e)}return b}function e(a){for(var c,b=0;b<a.length;++b){c=a[b];"undefined"===typeof c.name&&(c.type&&c.type in p.oids?c.name=p.oids[c.type]:c.shortName&&c.shortName in
@@ -478,18 +479,18 @@ null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address
479 d.extension=a,d;return a}function n(a,c){switch(a){case m["RSASSA-PSS"]:var b=[];void 0!==c.hash.algorithmOid&&b.push(g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(c.hash.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")])]));void 0!==c.mgf.algorithmOid&&b.push(g.create(g.Class.CONTEXT_SPECIFIC,1,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,
480 !1,g.oidToDer(c.mgf.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(c.mgf.hash.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")])])]));void 0!==c.saltLength&&b.push(g.create(g.Class.CONTEXT_SPECIFIC,2,!0,[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(c.saltLength).getBytes())]));return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,b);default:return g.create(g.Class.UNIVERSAL,g.Type.NULL,
481 !1,"")}}function h(a){var b=g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===a.attributes.length)return b;a=a.attributes;for(var d=0;d<a.length;++d){var e=a[d],h=e.value,f=g.Type.UTF8;"valueTagClass"in e&&(f=e.valueTagClass);f===g.Type.UTF8&&(h=c.util.encodeUtf8(h));var k=!1;"valueConstructed"in e&&(k=e.valueConstructed);e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(e.type).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SET,!0,[g.create(g.Class.UNIVERSAL,
481 -f,k,h)])]);b.value.push(e)}return b}var g=c.asn1,p=c.pki=c.pki||{},m=p.oids,r={};r.CN=m.commonName;r.commonName="CN";r.C=m.countryName;r.countryName="C";r.L=m.localityName;r.localityName="L";r.ST=m.stateOrProvinceName;r.stateOrProvinceName="ST";r.O=m.organizationName;r.organizationName="O";r.OU=m.organizationalUnitName;r.organizationalUnitName="OU";r.E=m.emailAddress;r.emailAddress="E";var y=c.pki.rsa.publicKeyValidator,w={name:"Certificate",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,
482 +f,k,h)])]);b.value.push(e)}return b}var g=c.asn1,p=c.pki=c.pki||{},m=p.oids,r={};r.CN=m.commonName;r.commonName="CN";r.C=m.countryName;r.countryName="C";r.L=m.localityName;r.localityName="L";r.ST=m.stateOrProvinceName;r.stateOrProvinceName="ST";r.O=m.organizationName;r.organizationName="O";r.OU=m.organizationalUnitName;r.organizationalUnitName="OU";r.E=m.emailAddress;r.emailAddress="E";var x=c.pki.rsa.publicKeyValidator,w={name:"Certificate",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,
483 value:[{name:"Certificate.TBSCertificate",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,
484 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,
485 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:g.Class.UNIVERSAL,type:g.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:g.Class.UNIVERSAL,type:g.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
485 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:g.Class.UNIVERSAL,type:g.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:g.Class.UNIVERSAL,type:g.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},y,{name:"Certificate.TBSCertificate.issuerUniqueID",
486 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:g.Class.UNIVERSAL,type:g.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:g.Class.UNIVERSAL,type:g.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},x,{name:"Certificate.TBSCertificate.issuerUniqueID",
487 tagClass:g.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:g.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
488 {name:"Certificate.TBSCertificate.extensions",tagClass:g.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
489 {name:"Certificate.signatureValue",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},F={name:"rsapss",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:g.Class.UNIVERSAL,type:g.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,
490 type:g.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:g.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:g.Class.UNIVERSAL,type:g.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:g.Class.UNIVERSAL,
491 type:g.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:g.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:g.Class.UNIVERSAL,type:g.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:g.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
492 tagClass:g.Class.UNIVERSAL,type:g.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
492 -tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},y,{name:"CertificationRequestInfo.attributes",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
493 +tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},x,{name:"CertificationRequestInfo.attributes",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
494 tagClass:g.Class.UNIVERSAL,type:g.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:g.Class.UNIVERSAL,
495 type:g.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};p.RDNAttributesAsArray=function(a,c){for(var b=[],d,e,h,l=0;l<a.value.length;++l){d=a.value[l];for(var f=0;f<d.value.length;++f)h={},e=d.value[f],h.type=g.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in m&&(h.name=m[h.type],h.name in r&&(h.shortName=r[h.name])),c&&(c.update(h.type),c.update(h.value)),b.push(h)}return b};p.CRIAttributesAsArray=function(a){for(var c=[],b=0;b<a.length;++b)for(var d=
496 a[b],e=g.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var l={};l.type=e;l.value=d[h].value;l.valueTagClass=d[h].type;l.type in m&&(l.name=m[l.type],l.name in r&&(l.shortName=r[l.name]));if(l.type===m.extensionRequest){l.extensions=[];for(var f=0;f<l.value.length;++f)l.extensions.push(p.certificateExtensionFromAsn1(l.value[f]))}c.push(l)}return c};var J=function(a,c,b){var d={};if(a!==m["RSASSA-PSS"])return d;b&&(d={hash:{algorithmOid:m.sha1},mgf:{algorithmOid:m.mgf1,hash:{algorithmOid:m.sha1}},
@@ -533,26 +534,26 @@ p.getCertificationRequestInfo(a);return g.create(g.Class.UNIVERSAL,g.Type.SEQUEN
534 null}var e={certs:{},getIssuer:function(a){return b(a.issuer)},addCertificate:function(a){"string"===typeof a&&(a=c.pki.certificateFromPem(a));if(!a.subject.hash){var b=c.md.sha1.create();a.subject.attributes=p.RDNAttributesAsArray(d(a.subject),b);a.subject.hash=b.digest().toHex()}a.subject.hash in e.certs?(b=e.certs[a.subject.hash],c.util.isArray(b)||(b=[b]),b.push(a)):e.certs[a.subject.hash]=a},hasCertificate:function(a){var d=b(a.subject);if(!d)return!1;c.util.isArray(d)||(d=[d]);a=g.toDer(p.certificateToAsn1(a)).getBytes();
535 for(var e=0;e<d.length;++e){var h=g.toDer(p.certificateToAsn1(d[e])).getBytes();if(a===h)return!0}return!1}};if(a)for(var h=0;h<a.length;++h)e.addCertificate(a[h]);return e};p.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
536 p.verifyCertificateChain=function(a,b,d){b=b.slice(0);var e=b.slice(0),h=new Date,g=!0,f=null,k=0;do{var m=b.shift(),n=null,u=!1;if(h<m.validity.notBefore||h>m.validity.notAfter)f={message:"Certificate is not valid yet or has expired.",error:p.certificateError.certificate_expired,notBefore:m.validity.notBefore,notAfter:m.validity.notAfter,now:h};if(null===f){n=b[0]||a.getIssuer(m);null===n&&m.isIssuer(m)&&(u=!0,n=m);if(n){var v=n;c.util.isArray(v)||(v=[v]);for(var r=!1;!r&&0<v.length;){n=v.shift();
536 -try{r=n.verify(m)}catch(w){}}r||(f={message:"Certificate signature is invalid.",error:p.certificateError.bad_certificate})}null!==f||n&&!u||a.hasCertificate(m)||(f={message:"Certificate is not trusted.",error:p.certificateError.unknown_ca})}null===f&&n&&!m.isIssuer(n)&&(f={message:"Certificate issuer is invalid.",error:p.certificateError.bad_certificate});if(null===f)for(v={keyUsage:!0,basicConstraints:!0},r=0;null===f&&r<m.extensions.length;++r){var y=m.extensions[r];!y.critical||y.name in v||(f=
537 +try{r=n.verify(m)}catch(w){}}r||(f={message:"Certificate signature is invalid.",error:p.certificateError.bad_certificate})}null!==f||n&&!u||a.hasCertificate(m)||(f={message:"Certificate is not trusted.",error:p.certificateError.unknown_ca})}null===f&&n&&!m.isIssuer(n)&&(f={message:"Certificate issuer is invalid.",error:p.certificateError.bad_certificate});if(null===f)for(v={keyUsage:!0,basicConstraints:!0},r=0;null===f&&r<m.extensions.length;++r){var x=m.extensions[r];!x.critical||x.name in v||(f=
538 {message:"Certificate has an unsupported critical extension.",error:p.certificateError.unsupported_certificate})}null!==f||g&&(0!==b.length||n&&!u)||(g=m.getExtension("basicConstraints"),m=m.getExtension("keyUsage"),null!==m&&(m.keyCertSign&&null!==g||(f={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:p.certificateError.bad_certificate})),
539 null!==f||null===g||g.cA||(f={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:p.certificateError.bad_certificate}),null===f&&null!==m&&"pathLenConstraint"in g&&k-1>g.pathLenConstraint&&(f={message:"Certificate basicConstraints pathLenConstraint violated.",error:p.certificateError.bad_certificate}));m=null===f?!0:f.error;g=d?d(m,k,e):m;if(!0===g)f=null;else{!0===m&&(f={message:"The application rejected the certificate.",error:p.certificateError.bad_certificate});
540 if(g||0===g)"object"!==typeof g||c.util.isArray(g)?"string"===typeof g&&(f.error=g):(g.message&&(f.message=g.message),g.error&&(f.error=g.error));throw f;}g=!1;++k}while(0<b.length);return!0}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.x509)return b.x509;
541 b.defined.x509=!0;for(var f=0;f<e.length;++f)e[f](b);return b.pki}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,c,d,e){for(var g=
542 [],h=0;h<a.length;h++)for(var f=0;f<a[h].safeBags.length;f++){var l=a[h].safeBags[f];if(void 0===e||l.type===e)null===c?g.push(l):void 0!==l.attributes[c]&&0<=l.attributes[c].indexOf(d)&&g.push(l)}return g}function d(a){if(a.composed||a.constructed){for(var b=c.util.createBuffer(),e=0;e<a.value.length;++e)b.putBytes(a.value[e].value);a.composed=a.constructed=!1;a.value=b.getBytes()}return a}function e(a,b,e,k){b=h.fromDer(b,e);if(b.tagClass!==h.Class.UNIVERSAL||b.type!==h.Type.SEQUENCE||!0!==b.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
542 -for(var n=0;n<b.value.length;n++){var p={},r=[];if(!h.validate(b.value[n],m,p,r))throw a=Error("Cannot read ContentInfo."),a.errors=r,a;var r={encrypted:!1},q=null,q=p.content.value[0];switch(h.derToOid(p.contentType)){case g.oids.data:if(q.tagClass!==h.Class.UNIVERSAL||q.type!==h.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case g.oids.encryptedData:var w=k,p={},y=[];if(!h.validate(q,c.pkcs7.asn1.encryptedDataValidator,p,y))throw a=Error("Cannot read EncryptedContentInfo."),
543 -a.errors=y,a;q=h.derToOid(p.contentType);if(q!==g.oids.data)throw a=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),a.oid=q,a;q=h.derToOid(p.encAlgorithm);q=g.pbe.getCipher(q,p.encParameter,w);p=d(p.encryptedContentAsn1);p=c.util.createBuffer(p.value);q.update(p);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();r.encrypted=!0;break;default:throw a=Error("Unsupported PKCS#12 contentType."),a.contentType=h.derToOid(p.contentType),a;}r.safeBags=
544 -f(q,e,k);a.safeContents.push(r)}}function f(a,c,b){if(!c&&0===a.length)return[];a=h.fromDer(a,c);if(a.tagClass!==h.Class.UNIVERSAL||a.type!==h.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var l={},k=[];if(!h.validate(a.value[e],y,l,k))throw a=Error("Cannot read SafeBag."),a.errors=k,a;var m={type:h.derToOid(l.bagId),attributes:n(l.bagAttributes)};d.push(m);var p,u,v=l.bagValue.value[0];switch(m.type){case g.oids.pkcs8ShroudedKeyBag:if(v=
543 +for(var n=0;n<b.value.length;n++){var p={},r=[];if(!h.validate(b.value[n],m,p,r))throw a=Error("Cannot read ContentInfo."),a.errors=r,a;var r={encrypted:!1},q=null,q=p.content.value[0];switch(h.derToOid(p.contentType)){case g.oids.data:if(q.tagClass!==h.Class.UNIVERSAL||q.type!==h.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case g.oids.encryptedData:var w=k,p={},x=[];if(!h.validate(q,c.pkcs7.asn1.encryptedDataValidator,p,x))throw a=Error("Cannot read EncryptedContentInfo."),
544 +a.errors=x,a;q=h.derToOid(p.contentType);if(q!==g.oids.data)throw a=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),a.oid=q,a;q=h.derToOid(p.encAlgorithm);q=g.pbe.getCipher(q,p.encParameter,w);p=d(p.encryptedContentAsn1);p=c.util.createBuffer(p.value);q.update(p);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();r.encrypted=!0;break;default:throw a=Error("Unsupported PKCS#12 contentType."),a.contentType=h.derToOid(p.contentType),a;}r.safeBags=
545 +f(q,e,k);a.safeContents.push(r)}}function f(a,c,b){if(!c&&0===a.length)return[];a=h.fromDer(a,c);if(a.tagClass!==h.Class.UNIVERSAL||a.type!==h.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var l={},k=[];if(!h.validate(a.value[e],x,l,k))throw a=Error("Cannot read SafeBag."),a.errors=k,a;var m={type:h.derToOid(l.bagId),attributes:n(l.bagAttributes)};d.push(m);var p,u,v=l.bagValue.value[0];switch(m.type){case g.oids.pkcs8ShroudedKeyBag:if(v=
546 g.decryptPrivateKeyInfo(v,b),null===v)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case g.oids.keyBag:try{m.key=g.privateKeyFromAsn1(v)}catch(r){m.key=null,m.asn1=v}continue;case g.oids.certBag:p=F;u=function(){if(h.derToOid(l.certId)!==g.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=h.derToOid(l.certId);throw a;}a=h.fromDer(l.cert,c);try{m.cert=g.certificateFromAsn1(a,!0)}catch(b){m.cert=null,m.asn1=a}};break;default:throw a=
547 Error("Unsupported PKCS#12 SafeBag type."),a.oid=m.type,a;}if(void 0!==p&&!h.validate(v,p,l,k))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=k,a;u()}return d}function n(a){var c={};if(void 0!==a)for(var b=0;b<a.length;++b){var d={},e=[];if(!h.validate(a[b],w,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=h.derToOid(d.oid);if(void 0!==g.oids[e]){c[g.oids[e]]=[];for(var f=0;f<d.values.length;++f)c[g.oids[e]].push(d.values[f].value)}}return c}var h=c.asn1,g=c.pki,p=c.pkcs12=
548 c.pkcs12||{},m={name:"ContentInfo",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:h.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},r={name:"PFX",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,capture:"version"},
549 m,{name:"PFX.macData",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
549 -tagClass:h.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:h.Class.UNIVERSAL,type:h.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:h.Class.UNIVERSAL,type:h.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},y={name:"SafeBag",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,
550 +tagClass:h.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:h.Class.UNIVERSAL,type:h.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:h.Class.UNIVERSAL,type:h.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},x={name:"SafeBag",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,
551 value:[{name:"SafeBag.bagId",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:h.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:h.Class.UNIVERSAL,type:h.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},w={name:"Attribute",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,
552 capture:"oid"},{name:"Attribute.attrValues",tagClass:h.Class.UNIVERSAL,type:h.Type.SET,constructed:!0,capture:"values"}]},F={name:"CertBag",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:h.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:h.Class.UNIVERSAL,type:h.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
552 -p.pkcs12FromAsn1=function(a,f,m){"string"===typeof f?(m=f,f=!0):void 0===f&&(f=!0);var n={};if(!h.validate(a,r,n,[]))throw f=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),f.errors=f,f;var v={version:n.version.charCodeAt(0),safeContents:[],getBags:function(a){var d={},e;"localKeyId"in a?e=a.localKeyId:"localKeyIdHex"in a&&(e=c.util.hexToBytes(a.localKeyIdHex));void 0===e&&!("friendlyName"in a)&&"bagType"in a&&(d[a.bagType]=b(v.safeContents,null,null,a.bagType));void 0!==e&&
553 -(d.localKeyId=b(v.safeContents,"localKeyId",e,a.bagType));"friendlyName"in a&&(d.friendlyName=b(v.safeContents,"friendlyName",a.friendlyName,a.bagType));return d},getBagsByFriendlyName:function(a,c){return b(v.safeContents,"friendlyName",a,c)},getBagsByLocalKeyId:function(a,c){return b(v.safeContents,"localKeyId",a,c)}};if(3!==n.version.charCodeAt(0))throw f=Error("PKCS#12 PFX of version other than 3 not supported."),f.version=n.version.charCodeAt(0),f;if(h.derToOid(n.contentType)!==g.oids.data)throw f=
554 -Error("Only PKCS#12 PFX in password integrity mode supported."),f.oid=h.derToOid(n.contentType),f;a=n.content.value[0];if(a.tagClass!==h.Class.UNIVERSAL||a.type!==h.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");a=d(a);if(n.mac){var w=null,y=0,q=h.derToOid(n.macAlgorithm);switch(q){case g.oids.sha1:w=c.md.sha1.create();y=20;break;case g.oids.sha256:w=c.md.sha256.create();y=32;break;case g.oids.sha384:w=c.md.sha384.create();y=48;break;case g.oids.sha512:w=c.md.sha512.create();
555 -y=64;break;case g.oids.md5:w=c.md.md5.create(),y=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new c.util.ByteBuffer(n.macSalt),B="macIterations"in n?parseInt(c.util.bytesToHex(n.macIterations),16):1,y=p.generateKey(m,q,3,B,y,w),q=c.hmac.create();q.start(w,y);q.update(a.value);if(q.getMac().getBytes()!==n.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(v,a.value,f,m);return v};p.toPkcs12Asn1=function(a,b,d,e){e=e||{};e.saltSize=e.saltSize||
553 +p.pkcs12FromAsn1=function(a,f,m){"string"===typeof f?(m=f,f=!0):void 0===f&&(f=!0);var n={};if(!h.validate(a,r,n,[]))throw f=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),f.errors=f,f;var u={version:n.version.charCodeAt(0),safeContents:[],getBags:function(a){var d={},e;"localKeyId"in a?e=a.localKeyId:"localKeyIdHex"in a&&(e=c.util.hexToBytes(a.localKeyIdHex));void 0===e&&!("friendlyName"in a)&&"bagType"in a&&(d[a.bagType]=b(u.safeContents,null,null,a.bagType));void 0!==e&&
554 +(d.localKeyId=b(u.safeContents,"localKeyId",e,a.bagType));"friendlyName"in a&&(d.friendlyName=b(u.safeContents,"friendlyName",a.friendlyName,a.bagType));return d},getBagsByFriendlyName:function(a,c){return b(u.safeContents,"friendlyName",a,c)},getBagsByLocalKeyId:function(a,c){return b(u.safeContents,"localKeyId",a,c)}};if(3!==n.version.charCodeAt(0))throw f=Error("PKCS#12 PFX of version other than 3 not supported."),f.version=n.version.charCodeAt(0),f;if(h.derToOid(n.contentType)!==g.oids.data)throw f=
555 +Error("Only PKCS#12 PFX in password integrity mode supported."),f.oid=h.derToOid(n.contentType),f;a=n.content.value[0];if(a.tagClass!==h.Class.UNIVERSAL||a.type!==h.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");a=d(a);if(n.mac){var w=null,x=0,q=h.derToOid(n.macAlgorithm);switch(q){case g.oids.sha1:w=c.md.sha1.create();x=20;break;case g.oids.sha256:w=c.md.sha256.create();x=32;break;case g.oids.sha384:w=c.md.sha384.create();x=48;break;case g.oids.sha512:w=c.md.sha512.create();
556 +x=64;break;case g.oids.md5:w=c.md.md5.create(),x=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new c.util.ByteBuffer(n.macSalt),B="macIterations"in n?parseInt(c.util.bytesToHex(n.macIterations),16):1,x=p.generateKey(m,q,3,B,x,w),q=c.hmac.create();q.start(w,x);q.update(a.value);if(q.getMac().getBytes()!==n.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(u,a.value,f,m);return u};p.toPkcs12Asn1=function(a,b,d,e){e=e||{};e.saltSize=e.saltSize||
557 8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var f=e.localKeyId,k;if(null!==f)f=c.util.hexToBytes(f);else if(e.generateLocalKeyId)if(b){var m=c.util.isArray(b)?b[0]:b;"string"===typeof m&&(m=g.certificateFromPem(m));f=c.md.sha1.create();f.update(h.toDer(g.certificateToAsn1(m)).getBytes());f=f.digest().getBytes()}else f=c.random.getBytes(20);m=[];null!==
558 f&&m.push(h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(g.oids.localKeyId).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.SET,!0,[h.create(h.Class.UNIVERSAL,h.Type.OCTETSTRING,!1,f)])]));"friendlyName"in e&&m.push(h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(g.oids.friendlyName).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.SET,!0,[h.create(h.Class.UNIVERSAL,h.Type.BMPSTRING,!1,e.friendlyName)])]));
559 0<m.length&&(k=h.create(h.Class.UNIVERSAL,h.Type.SET,!0,m));f=[];m=[];null!==b&&(m=c.util.isArray(b)?b:[b]);for(var n=[],u=0;u<m.length;++u){b=m[u];"string"===typeof b&&(b=g.certificateFromPem(b));var v=0===u?k:void 0;b=g.certificateToAsn1(b);b=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(g.oids.certBag).getBytes()),h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(g.oids.x509Certificate).getBytes()),
@@ -577,11 +578,11 @@ f(b,1));k=d-(k-b.length());if(0<k){for(d=f(b,2);0<d.length();)e.extensions.push(
578 send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.protocol_version}});if(g)a.session.cipherSuite=h.getCipherSuite(e.cipher_suite);else for(d=c.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(a.session.cipherSuite=h.getCipherSuite(d.getBytes(2)),null===a.session.cipherSuite););if(null===a.session.cipherSuite)return a.error(a,{message:"No cipher suites in common.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.handshake_failure},cipherSuite:c.util.bytesToHex(e.cipher_suite)});
579 a.session.compressionMethod=g?e.compression_method:h.CompressionMethod.none}return e};h.createSecurityParameters=function(a,c){var b=a.entity===h.ConnectionEnd.client,d=c.random.bytes(),e=b?a.session.sp.client_random:d,b=b?d:h.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:h.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
580 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:b}};h.handleServerHello=function(a,c,b){c=h.parseHelloMessage(a,c,b);if(!a.fail){if(c.version.minor<=a.version.minor)a.version.minor=c.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.protocol_version}});a.session.version=a.version;b=c.session_id.bytes();0<b.length&&b===a.session.id?
580 -(a.expect=y,a.session.resuming=!0,a.session.sp.server_random=c.random.bytes()):(a.expect=g,a.session.resuming=!1,h.createSecurityParameters(a,c));a.session.id=b;a.process()}};h.handleClientHello=function(a,b,d){b=h.parseHelloMessage(a,b,d);if(!a.fail){var e=b.session_id.bytes();d=null;if(a.sessionCache)if(d=a.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==b.version.major||d.version.minor>b.version.minor)d=null,e="";0===e.length&&(e=c.random.getBytes(32));a.session.id=e;a.session.clientHelloVersion=
581 -b.version;a.session.sp={};if(d)a.version=a.session.version=d.version,a.session.sp=d.sp;else{for(var g,e=1;e<h.SupportedVersions.length&&!(g=h.SupportedVersions[e],g.minor<=b.version.minor);++e);a.version={major:g.major,minor:g.minor};a.session.version=a.version}null!==d?(a.expect=z,a.session.resuming=!0,a.session.sp.client_random=b.random.bytes()):(a.expect=!1!==a.verifyClient?J:x,a.session.resuming=!1,h.createSecurityParameters(a,b));a.open=!0;h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,
581 +(a.expect=x,a.session.resuming=!0,a.session.sp.server_random=c.random.bytes()):(a.expect=g,a.session.resuming=!1,h.createSecurityParameters(a,c));a.session.id=b;a.process()}};h.handleClientHello=function(a,b,d){b=h.parseHelloMessage(a,b,d);if(!a.fail){var e=b.session_id.bytes();d=null;if(a.sessionCache)if(d=a.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==b.version.major||d.version.minor>b.version.minor)d=null,e="";0===e.length&&(e=c.random.getBytes(32));a.session.id=e;a.session.clientHelloVersion=
582 +b.version;a.session.sp={};if(d)a.version=a.session.version=d.version,a.session.sp=d.sp;else{for(var g,e=1;e<h.SupportedVersions.length&&!(g=h.SupportedVersions[e],g.minor<=b.version.minor);++e);a.version={major:g.major,minor:g.minor};a.session.version=a.version}null!==d?(a.expect=z,a.session.resuming=!0,a.session.sp.client_random=b.random.bytes()):(a.expect=!1!==a.verifyClient?J:y,a.session.resuming=!1,h.createSecurityParameters(a,b));a.open=!0;h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,
583 data:h.createServerHello(a)}));a.session.resuming?(h.queue(a,h.createRecord(a,{type:h.ContentType.change_cipher_spec,data:h.createChangeCipherSpec()})),a.state.pending=h.createConnectionState(a),a.state.current.write=a.state.pending.write,h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,data:h.createFinished(a)}))):(h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,data:h.createCertificate(a)})),a.fail||(h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,data:h.createServerKeyExchange(a)})),
584 !1!==a.verifyClient&&h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,data:h.createCertificateRequest(a)})),h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,data:h.createServerHelloDone(a)}))));h.flush(a);a.process()}};h.handleCertificate=function(a,b,d){if(3>d)return a.error(a,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.illegal_parameter}});d=f(b.fragment,3);var e,g;b=[];try{for(;0<d.length();)e=
584 -f(d,3),g=c.asn1.fromDer(e),e=c.pki.certificateFromAsn1(g,!0),b.push(e)}catch(k){return a.error(a,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.bad_certificate}})}e=a.entity===h.ConnectionEnd.client;!e&&!0!==a.verifyClient||0!==b.length?0===b.length?a.expect=e?p:x:(e?a.session.serverCertificate=b[0]:a.session.clientCertificate=b[0],h.verifyCertificateChain(a,b)&&(a.expect=e?p:x)):a.error(a,{message:e?"No server certificate provided.":
585 +f(d,3),g=c.asn1.fromDer(e),e=c.pki.certificateFromAsn1(g,!0),b.push(e)}catch(k){return a.error(a,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.bad_certificate}})}e=a.entity===h.ConnectionEnd.client;!e&&!0!==a.verifyClient||0!==b.length?0===b.length?a.expect=e?p:y:(e?a.session.serverCertificate=b[0]:a.session.clientCertificate=b[0],h.verifyCertificateChain(a,b)&&(a.expect=e?p:y)):a.error(a,{message:e?"No server certificate provided.":
586 "No client certificate provided.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.illegal_parameter}});a.process()};h.handleServerKeyExchange=function(a,c,b){if(0<b)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.unsupported_certificate}});a.expect=m;a.process()};h.handleClientKeyExchange=function(a,b,d){if(48>d)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",
587 send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.unsupported_certificate}});b=f(b.fragment,2).getBytes();d=null;if(a.getPrivateKey)try{d=a.getPrivateKey(a,a.session.serverCertificate),d=c.pki.privateKeyFromPem(d)}catch(e){a.error(a,{message:"Could not get private key.",cause:e,send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.internal_error}})}if(null===d)return a.error(a,{message:"No private key set.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.internal_error}});
588 try{var g=a.session.sp;g.pre_master_secret=d.decrypt(b);var k=a.session.clientHelloVersion;if(k.major!==g.pre_master_secret.charCodeAt(0)||k.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=c.random.getBytes(48)}a.expect=z;null!==a.session.clientCertificate&&(a.expect=C);a.process()};h.handleCertificateRequest=function(a,c,b){if(3>b)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:h.Alert.Level.fatal,
@@ -589,7 +590,7 @@ description:h.Alert.Description.illegal_parameter}});c=c.fragment;c={certificate
590 e.putBuffer(a.session.sha1.digest());e=e.getBytes();try{if(!a.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");a.session.md5.update(b);a.session.sha1.update(b)}catch(g){return a.error(a,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.handshake_failure}})}a.expect=z;a.process()};h.handleServerHelloDone=function(a,b,d){if(0<d)return a.error(a,{message:"Invalid ServerHelloDone message. Invalid length.",
591 send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.record_overflow}});if(null===a.serverCertificate&&(b={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.insufficient_security}},d=a.verify(a,b.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||c.util.isArray(d)?"number"===typeof d&&(b.alert.description=d):(d.message&&(b.message=d.message),d.alert&&(b.alert.description=d.alert));
592 return a.error(a,b)}null!==a.session.certificateRequest&&(b=h.createRecord(a,{type:h.ContentType.handshake,data:h.createCertificate(a)}),h.queue(a,b));b=h.createRecord(a,{type:h.ContentType.handshake,data:h.createClientKeyExchange(a)});h.queue(a,b);a.expect=A;b=function(a,c){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,data:h.createCertificateVerify(a,c)}));h.queue(a,h.createRecord(a,{type:h.ContentType.change_cipher_spec,
592 -data:h.createChangeCipherSpec()}));a.state.pending=h.createConnectionState(a);a.state.current.write=a.state.pending.write;h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,data:h.createFinished(a)}));a.expect=y;h.flush(a);a.process()};if(null===a.session.certificateRequest||null===a.session.clientCertificate)return b(a,null);h.getClientSignature(a,b)};h.handleChangeCipherSpec=function(a,c){if(1!==c.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
593 +data:h.createChangeCipherSpec()}));a.state.pending=h.createConnectionState(a);a.state.current.write=a.state.pending.write;h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,data:h.createFinished(a)}));a.expect=x;h.flush(a);a.process()};if(null===a.session.certificateRequest||null===a.session.clientCertificate)return b(a,null);h.getClientSignature(a,b)};h.handleChangeCipherSpec=function(a,c){if(1!==c.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
594 alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.illegal_parameter}});var b=a.entity===h.ConnectionEnd.client;if(a.session.resuming&&b||!a.session.resuming&&!b)a.state.pending=h.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&b||a.session.resuming&&!b)a.state.pending=null;a.expect=b?w:G;a.process()};h.handleFinished=function(a,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=c.util.createBuffer();e.putBuffer(a.session.md5.digest());
595 e.putBuffer(a.session.sha1.digest());var f=a.entity===h.ConnectionEnd.client;e=b(a.session.sp.master_secret,f?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return a.error(a,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.decrypt_error}});a.session.md5.update(g);a.session.sha1.update(g);if(a.session.resuming&&f||!a.session.resuming&&!f)h.queue(a,h.createRecord(a,{type:h.ContentType.change_cipher_spec,
596 data:h.createChangeCipherSpec()})),a.state.current.write=a.state.pending.write,a.state.pending=null,h.queue(a,h.createRecord(a,{type:h.ContentType.handshake,data:h.createFinished(a)}));a.expect=f?F:X;a.handshaking=!1;++a.handshakes;a.peerCertificate=f?a.session.serverCertificate:a.session.clientCertificate;h.flush(a);a.isConnected=!0;a.connected(a);a.process()};h.handleAlert=function(a,c){var b=c.fragment,b={level:b.getByte(),description:b.getByte()},d;switch(b.description){case h.Alert.Description.close_notify:d=
@@ -599,8 +600,8 @@ data:h.createChangeCipherSpec()})),a.state.current.write=a.state.pending.write,a
600 break;case h.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(b.description===h.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===h.ConnectionEnd.client?"server":"client",alert:b});a.process()};h.handleHandshake=function(a,b){var d=b.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return a.fragmented=b,b.fragment=c.util.createBuffer(),d.read-=4,a.process();a.fragmented=null;d.read-=4;var f=d.bytes(g+
601 4);d.read+=4;e in T[a.entity][a.expect]?(a.entity!==h.ConnectionEnd.server||a.open||a.fail||(a.handshaking=!0,a.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:c.md.md5.create(),sha1:c.md.sha1.create()}),e!==h.HandshakeType.hello_request&&e!==h.HandshakeType.certificate_verify&&e!==h.HandshakeType.finished&&(a.session.md5.update(f),a.session.sha1.update(f)),T[a.entity][a.expect][e](a,b,g)):
602 h.handleUnexpected(a,b)};h.handleApplicationData=function(a,c){a.data.putBuffer(c.fragment);a.dataReady(a);a.process()};h.handleHeartbeat=function(a,b){var d=b.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===h.HeartbeatMessageType.heartbeat_request){if(a.handshaking||g>d.length)return a.process();h.queue(a,h.createRecord(a,{type:h.ContentType.heartbeat,data:h.createHeartbeat(h.HeartbeatMessageType.heartbeat_response,d)}));h.flush(a)}else if(e===h.HeartbeatMessageType.heartbeat_response){if(d!==
602 -a.expectedHeartbeatPayload)return a.process();a.heartbeatReceived&&a.heartbeatReceived(a,c.util.createBuffer(d))}a.process()};var g=1,p=2,m=3,r=4,y=5,w=6,F=7,A=8,J=1,x=2,C=3,z=4,G=5,X=6,q=h.handleUnexpected,O=h.handleChangeCipherSpec,M=h.handleAlert,K=h.handleHandshake,S=h.handleApplicationData,L=h.handleHeartbeat,W=[];W[h.ConnectionEnd.client]=[[q,M,K,q,L],[q,M,K,q,L],[q,M,K,q,L],[q,M,K,q,L],[q,M,K,q,L],[O,M,q,q,L],[q,M,K,q,L],[q,M,K,S,L],[q,M,K,q,L]];W[h.ConnectionEnd.server]=[[q,M,K,q,L],[q,M,
603 -K,q,L],[q,M,K,q,L],[q,M,K,q,L],[O,M,q,q,L],[q,M,K,q,L],[q,M,K,S,L],[q,M,K,q,L]];var O=h.handleHelloRequest,M=h.handleCertificate,K=h.handleServerKeyExchange,S=h.handleCertificateRequest,L=h.handleServerHelloDone,U=h.handleFinished,T=[];T[h.ConnectionEnd.client]=[[q,q,h.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[O,q,q,q,q,q,q,q,q,q,q,M,K,S,L,q,q,q,q,q,q],[O,q,q,q,q,q,q,q,q,q,q,q,K,S,L,q,q,q,q,q,q],[O,q,q,q,q,q,q,q,q,q,q,q,q,S,L,q,q,q,q,q,q],[O,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
603 +a.expectedHeartbeatPayload)return a.process();a.heartbeatReceived&&a.heartbeatReceived(a,c.util.createBuffer(d))}a.process()};var g=1,p=2,m=3,r=4,x=5,w=6,F=7,A=8,J=1,y=2,C=3,z=4,G=5,X=6,q=h.handleUnexpected,O=h.handleChangeCipherSpec,M=h.handleAlert,K=h.handleHandshake,P=h.handleApplicationData,L=h.handleHeartbeat,W=[];W[h.ConnectionEnd.client]=[[q,M,K,q,L],[q,M,K,q,L],[q,M,K,q,L],[q,M,K,q,L],[q,M,K,q,L],[O,M,q,q,L],[q,M,K,q,L],[q,M,K,P,L],[q,M,K,q,L]];W[h.ConnectionEnd.server]=[[q,M,K,q,L],[q,M,
604 +K,q,L],[q,M,K,q,L],[q,M,K,q,L],[O,M,q,q,L],[q,M,K,q,L],[q,M,K,P,L],[q,M,K,q,L]];var O=h.handleHelloRequest,M=h.handleCertificate,K=h.handleServerKeyExchange,P=h.handleCertificateRequest,L=h.handleServerHelloDone,U=h.handleFinished,T=[];T[h.ConnectionEnd.client]=[[q,q,h.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[O,q,q,q,q,q,q,q,q,q,q,M,K,P,L,q,q,q,q,q,q],[O,q,q,q,q,q,q,q,q,q,q,q,K,P,L,q,q,q,q,q,q],[O,q,q,q,q,q,q,q,q,q,q,q,q,P,L,q,q,q,q,q,q],[O,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
605 [O,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[O,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,U],[O,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[O,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];T[h.ConnectionEnd.server]=[[q,h.handleClientHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,M,q,q,q,q,q,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,h.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,h.handleCertificateVerify,q,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[q,q,q,q,q,
606 q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,U],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];h.generateKeys=function(a,c){var d=c.client_random+c.server_random;a.session.resuming||(c.master_secret=b(c.pre_master_secret,"master secret",d,48).bytes(),c.pre_master_secret=null);var d=c.server_random+c.client_random,e=2*c.mac_key_length+2*c.enc_key_length,g=a.version.major===h.Versions.TLS_1_0.major&&a.version.minor===h.Versions.TLS_1_0.minor;g&&(e+=2*c.fixed_iv_length);d=
607 b(c.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(c.mac_key_length),server_write_MAC_key:d.getBytes(c.mac_key_length),client_write_key:d.getBytes(c.enc_key_length),server_write_key:d.getBytes(c.enc_key_length)};g&&(e.client_write_IV=d.getBytes(c.fixed_iv_length),e.server_write_IV=d.getBytes(c.fixed_iv_length));return e};h.createConnectionState=function(a){var c=a.entity===h.ConnectionEnd.client,b=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
@@ -619,10 +620,10 @@ b=e.sign(b,null);d(a,b)};a.getSignature(a,d,b)};h.createCertificateVerify=functi
620 e.putByte(h.HandshakeType.certificate_request);e.putInt24(a);n(e,1,b);n(e,2,d);return e};h.createServerHelloDone=function(a){a=c.util.createBuffer();a.putByte(h.HandshakeType.server_hello_done);a.putInt24(0);return a};h.createChangeCipherSpec=function(){var a=c.util.createBuffer();a.putByte(1);return a};h.createFinished=function(a){var d=c.util.createBuffer();d.putBuffer(a.session.md5.digest());d.putBuffer(a.session.sha1.digest());d=b(a.session.sp.master_secret,a.entity===h.ConnectionEnd.client?"client finished":
621 "server finished",d.getBytes(),12);a=c.util.createBuffer();a.putByte(h.HandshakeType.finished);a.putInt24(d.length());a.putBuffer(d);return a};h.createHeartbeat=function(a,b,d){"undefined"===typeof d&&(d=b.length);var e=c.util.createBuffer();e.putByte(a);e.putInt16(d);e.putBytes(b);a=e.length();e.putBytes(c.random.getBytes(Math.max(16,a-d-3)));return e};h.queue=function(a,b){if(b){if(b.type===h.ContentType.handshake){var d=b.fragment.bytes();a.session.md5.update(d);a.session.sha1.update(d)}if(b.fragment.length()<=
622 h.MaxFragment)d=[b];else{for(var d=[],e=b.fragment.bytes();e.length>h.MaxFragment;)d.push(h.createRecord(a,{type:b.type,data:c.util.createBuffer(e.slice(0,h.MaxFragment))})),e=e.slice(h.MaxFragment);0<e.length&&d.push(h.createRecord(a,{type:b.type,data:c.util.createBuffer(e)}))}for(e=0;e<d.length&&!a.fail;++e){var g=d[e];a.state.current.write.update(a,g)&&a.records.push(g)}}};h.flush=function(a){for(var c=0;c<a.records.length;++c){var b=a.records[c];a.tlsData.putByte(b.type);a.tlsData.putByte(b.version.major);
622 -a.tlsData.putByte(b.version.minor);a.tlsData.putInt16(b.fragment.length());a.tlsData.putBuffer(a.records[c].fragment)}a.records=[];return a.tlsDataReady(a)};var R=function(a){switch(a){case !0:return!0;case c.pki.certificateError.bad_certificate:return h.Alert.Description.bad_certificate;case c.pki.certificateError.unsupported_certificate:return h.Alert.Description.unsupported_certificate;case c.pki.certificateError.certificate_revoked:return h.Alert.Description.certificate_revoked;case c.pki.certificateError.certificate_expired:return h.Alert.Description.certificate_expired;
623 +a.tlsData.putByte(b.version.minor);a.tlsData.putInt16(b.fragment.length());a.tlsData.putBuffer(a.records[c].fragment)}a.records=[];return a.tlsDataReady(a)};var S=function(a){switch(a){case !0:return!0;case c.pki.certificateError.bad_certificate:return h.Alert.Description.bad_certificate;case c.pki.certificateError.unsupported_certificate:return h.Alert.Description.unsupported_certificate;case c.pki.certificateError.certificate_revoked:return h.Alert.Description.certificate_revoked;case c.pki.certificateError.certificate_expired:return h.Alert.Description.certificate_expired;
624 case c.pki.certificateError.certificate_unknown:return h.Alert.Description.certificate_unknown;case c.pki.certificateError.unknown_ca:return h.Alert.Description.unknown_ca;default:return h.Alert.Description.bad_certificate}},V=function(a){switch(a){case !0:return!0;case h.Alert.Description.bad_certificate:return c.pki.certificateError.bad_certificate;case h.Alert.Description.unsupported_certificate:return c.pki.certificateError.unsupported_certificate;case h.Alert.Description.certificate_revoked:return c.pki.certificateError.certificate_revoked;
624 -case h.Alert.Description.certificate_expired:return c.pki.certificateError.certificate_expired;case h.Alert.Description.certificate_unknown:return c.pki.certificateError.certificate_unknown;case h.Alert.Description.unknown_ca:return c.pki.certificateError.unknown_ca;default:return c.pki.certificateError.bad_certificate}};h.verifyCertificateChain=function(a,b){try{c.pki.verifyCertificateChain(a.caStore,b,function(b,d,e){R(b);d=a.verify(a,b,d,e);if(!0!==d){if("object"===typeof d&&!c.util.isArray(d))throw b=
625 -Error("The application rejected the certificate."),b.send=!0,b.alert={level:h.Alert.Level.fatal,description:h.Alert.Description.bad_certificate},d.message&&(b.message=d.message),d.alert&&(b.alert.description=d.alert),b;d!==b&&(d=V(d))}return d})}catch(d){var e=d;if("object"!==typeof e||c.util.isArray(e))e={send:!0,alert:{level:h.Alert.Level.fatal,description:R(d)}};"send"in e||(e.send=!0);"alert"in e||(e.alert={level:h.Alert.Level.fatal,description:R(e.error)});a.error(a,e)}return!a.fail};h.createSessionCache=
625 +case h.Alert.Description.certificate_expired:return c.pki.certificateError.certificate_expired;case h.Alert.Description.certificate_unknown:return c.pki.certificateError.certificate_unknown;case h.Alert.Description.unknown_ca:return c.pki.certificateError.unknown_ca;default:return c.pki.certificateError.bad_certificate}};h.verifyCertificateChain=function(a,b){try{c.pki.verifyCertificateChain(a.caStore,b,function(b,d,e){S(b);d=a.verify(a,b,d,e);if(!0!==d){if("object"===typeof d&&!c.util.isArray(d))throw b=
626 +Error("The application rejected the certificate."),b.send=!0,b.alert={level:h.Alert.Level.fatal,description:h.Alert.Description.bad_certificate},d.message&&(b.message=d.message),d.alert&&(b.alert.description=d.alert),b;d!==b&&(d=V(d))}return d})}catch(d){var e=d;if("object"!==typeof e||c.util.isArray(e))e={send:!0,alert:{level:h.Alert.Level.fatal,description:S(d)}};"send"in e||(e.send=!0);"alert"in e||(e.alert={level:h.Alert.Level.fatal,description:S(e.error)});a.error(a,e)}return!a.fail};h.createSessionCache=
627 function(a,b){var d=null;if(a&&a.getSession&&a.setSession&&a.order)d=a;else{d={};d.cache=a||{};d.capacity=Math.max(b||100,1);d.order=[];for(var e in a)d.order.length<=b?d.order.push(e):delete a[e];d.getSession=function(a){var b=null,e=null;a?e=c.util.bytesToHex(a):0<d.order.length&&(e=d.order[0]);if(null!==e&&e in d.cache){b=d.cache[e];delete d.cache[e];for(var g in d.order)if(d.order[g]===e){d.order.splice(g,1);break}}return b};d.setSession=function(a,b){if(d.order.length===d.capacity){var e=d.order.shift();
628 delete d.cache[e]}e=c.util.bytesToHex(a);d.order.push(e);d.cache[e]=b}}return d};h.createConnection=function(a){var b=null,b=a.caStore?c.util.isArray(a.caStore)?c.pki.createCaStore(a.caStore):a.caStore:c.pki.createCaStore(),d=a.cipherSuites||null;if(null===d){var d=[],e;for(e in h.CipherSuites)d.push(h.CipherSuites[e])}e=a.server?h.ConnectionEnd.server:h.ConnectionEnd.client;var g=a.sessionCache?h.createSessionCache(a.sessionCache):null,f={version:{major:h.Version.major,minor:h.Version.minor},entity:e,
629 sessionId:a.sessionId,caStore:b,sessionCache:g,cipherSuites:d,connected:a.connected,virtualHost:a.virtualHost||null,verifyClient:a.verifyClient||!1,verify:a.verify||function(a,c,b,d){return c},getCertificate:a.getCertificate||null,getPrivateKey:a.getPrivateKey||null,getSignature:a.getSignature||null,input:c.util.createBuffer(),tlsData:c.util.createBuffer(),data:c.util.createBuffer(),tlsDataReady:a.tlsDataReady,dataReady:a.dataReady,heartbeatReceived:a.heartbeatReceived,closed:a.closed,error:function(c,
@@ -633,19 +634,19 @@ function(a){var b=0;a&&f.input.putBytes(a);if(!f.fail){null!==f.record&&f.record
634 alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.protocol_version}}))}if(!f.fail&&null!==f.record&&!f.record.ready){b=f;a=0;var d=b.input,e=d.length();e<b.record.length?a=b.record.length-e:(b.record.fragment.putBytes(d.getBytes(b.record.length)),d.compact(),b.state.current.read.update(b,b.record)&&(null!==b.fragmented&&(b.fragmented.type===b.record.type?(b.fragmented.fragment.putBuffer(b.record.fragment),b.record=b.fragmented):b.error(b,{message:"Invalid fragmented record.",send:!0,
635 alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.unexpected_message}})),b.record.ready=!0));b=a}if(!f.fail&&null!==f.record&&f.record.ready)if(a=f.record,d=a.type-h.ContentType.change_cipher_spec,e=W[f.entity][f.expect],d in e)e[d](f,a);else h.handleUnexpected(f,a)}return b};f.prepare=function(a){h.queue(f,h.createRecord(f,{type:h.ContentType.application_data,data:c.util.createBuffer(a)}));return h.flush(f)};f.prepareHeartbeatRequest=function(a,b){a instanceof c.util.ByteBuffer&&(a=
636 a.bytes());"undefined"===typeof b&&(b=a.length);f.expectedHeartbeatPayload=a;h.queue(f,h.createRecord(f,{type:h.ContentType.heartbeat,data:h.createHeartbeat(h.HeartbeatMessageType.heartbeat_request,a,b)}));return h.flush(f)};f.close=function(a){if(!f.fail&&f.sessionCache&&f.session){var c={id:f.session.id,version:f.session.version,sp:f.session.sp};c.sp.keys=null;f.sessionCache.setSession(c.id,c)}if(f.open){f.open=!1;f.input.clear();if(f.isConnected||f.handshaking)f.isConnected=f.handshaking=!1,h.queue(f,
636 -h.createAlert(f,{level:h.Alert.Level.warning,description:h.Alert.Description.close_notify})),h.flush(f);f.closed(f)}f.reset(a)};return f};c.tls=c.tls||{};for(var P in h)"function"!==typeof h[P]&&(c.tls[P]=h[P]);c.tls.prf_tls1=b;c.tls.hmac_sha1=function(a,b,d){var e=c.hmac.create();e.start("SHA1",a);a=c.util.createBuffer();a.putInt32(b[0]);a.putInt32(b[1]);a.putByte(d.type);a.putByte(d.version.major);a.putByte(d.version.minor);a.putInt16(d.length);a.putBytes(d.fragment.bytes());e.update(a.getBytes());
637 +h.createAlert(f,{level:h.Alert.Level.warning,description:h.Alert.Description.close_notify})),h.flush(f);f.closed(f)}f.reset(a)};return f};c.tls=c.tls||{};for(var R in h)"function"!==typeof h[R]&&(c.tls[R]=h[R]);c.tls.prf_tls1=b;c.tls.hmac_sha1=function(a,b,d){var e=c.hmac.create();e.start("SHA1",a);a=c.util.createBuffer();a.putInt32(b[0]);a.putInt32(b[1]);a.putByte(d.type);a.putByte(d.version.major);a.putByte(d.version.minor);a.putInt16(d.length);a.putBytes(d.fragment.bytes());e.update(a.getBytes());
638 return e.digest().getBytes()};c.tls.createSessionCache=h.createSessionCache;c.tls.createConnection=h.createConnection}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.tls)return b.tls;b.defined.tls=!0;for(var f=0;f<e.length;++f)e[f](b);return b.tls}},
639 r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,e,g){e=e.entity===c.tls.ConnectionEnd.client;a.read.cipherState={init:!1,cipher:c.cipher.createDecipher("AES-CBC",
640 e?g.keys.server_write_key:g.keys.client_write_key),iv:e?g.keys.server_write_IV:g.keys.client_write_IV};a.write.cipherState={init:!1,cipher:c.cipher.createCipher("AES-CBC",e?g.keys.client_write_key:g.keys.server_write_key),iv:e?g.keys.client_write_IV:g.keys.server_write_IV};a.read.cipherFunction=n;a.write.cipherFunction=d;a.read.macLength=a.write.macLength=g.mac_length;a.read.macFunction=a.write.macFunction=h.hmac_sha1}function d(a,b){var g=!1,f=b.macFunction(b.macKey,b.sequenceNumber,a);a.fragment.putBytes(f);
641 b.updateSequenceNumber();f=a.version.minor===h.Versions.TLS_1_0.minor?b.cipherState.init?null:b.cipherState.iv:c.random.getBytesSync(16);b.cipherState.init=!0;var k=b.cipherState.cipher;k.start({iv:f});a.version.minor>=h.Versions.TLS_1_1.minor&&k.output.putBytes(f);k.update(a.fragment);k.finish(e)&&(a.fragment=k.output,a.length=a.fragment.length(),g=!0);return g}function e(a,c,b){b||(a-=c.length()%a,c.fillWithByte(a-1,a));return!0}function f(a,c,b){a=!0;if(b){b=c.length();for(var d=c.last(),e=b-1-
641 -d;e<b-1;++e)a=a&&c.at(e)==d;a&&c.truncate(d+1)}return a}function n(a,b){var d=!1;++g;d=a.version.minor===h.Versions.TLS_1_0.minor?b.cipherState.init?null:b.cipherState.iv:a.fragment.getBytes(16);b.cipherState.init=!0;var e=b.cipherState.cipher;e.start({iv:d});e.update(a.fragment);var d=e.finish(f),k=b.macLength,p=c.random.getBytesSync(k),u=e.output.length();u>=k?(a.fragment=e.output.getBytes(u-k),p=e.output.getBytes(k)):a.fragment=e.output.getBytes();a.fragment=c.util.createBuffer(a.fragment);a.length=
642 -a.fragment.length();k=b.macFunction(b.macKey,b.sequenceNumber,a);b.updateSequenceNumber();e=b.macKey;u=c.hmac.create();u.start("SHA1",e);u.update(p);p=u.digest().getBytes();u.start(null,null);u.update(k);k=u.digest().getBytes();return p===k&&d}var h=c.tls;h.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=h.BulkCipherAlgorithm.aes;a.cipher_type=h.CipherType.block;a.enc_key_length=16;a.block_length=16;
642 +d;e<b-1;++e)a=a&&c.at(e)==d;a&&c.truncate(d+1)}return a}function n(a,b){var d=!1;++g;d=a.version.minor===h.Versions.TLS_1_0.minor?b.cipherState.init?null:b.cipherState.iv:a.fragment.getBytes(16);b.cipherState.init=!0;var e=b.cipherState.cipher;e.start({iv:d});e.update(a.fragment);var d=e.finish(f),k=b.macLength,p=c.random.getBytesSync(k),v=e.output.length();v>=k?(a.fragment=e.output.getBytes(v-k),p=e.output.getBytes(k)):a.fragment=e.output.getBytes();a.fragment=c.util.createBuffer(a.fragment);a.length=
643 +a.fragment.length();k=b.macFunction(b.macKey,b.sequenceNumber,a);b.updateSequenceNumber();e=b.macKey;v=c.hmac.create();v.start("SHA1",e);v.update(p);p=v.digest().getBytes();v.start(null,null);v.update(k);k=v.digest().getBytes();return p===k&&d}var h=c.tls;h.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=h.BulkCipherAlgorithm.aes;a.cipher_type=h.CipherType.block;a.enc_key_length=16;a.block_length=16;
644 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=h.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:b};h.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=h.BulkCipherAlgorithm.aes;a.cipher_type=h.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=h.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
645 20},initConnectionState:b};var g=0}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.aesCipherSuites)return b.aesCipherSuites;b.defined.aesCipherSuites=!0;for(var f=0;f<e.length;++f)e[f](b);return b.aesCipherSuites}},r=c;c=function(a,b){n="string"===
646 typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/aesCipherSuites",["require","module","./aes","./tls"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){c.debug=c.debug||{};c.debug.storage={};c.debug.get=function(a,b){var d;"undefined"===typeof a?d=c.debug.storage:a in c.debug.storage&&(d="undefined"===typeof b?c.debug.storage[a]:
647 c.debug.storage[a][b]);return d};c.debug.set=function(a,b,d){a in c.debug.storage||(c.debug.storage[a]={});c.debug.storage[a][b]=d};c.debug.clear=function(a,b){"undefined"===typeof a?c.debug.storage={}:a in c.debug.storage&&("undefined"===typeof b?delete c.debug.storage[a]:delete c.debug.storage[a][b])}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=
648 function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.debug)return b.debug;b.defined.debug=!0;for(var f=0;f<e.length;++f)e[f](b);return b.debug}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/debug",["require","module"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();
648 -(function(){function a(c){function b(a,d,f,h){a.generate=function(a,b){for(var e=new c.util.ByteBuffer,k=Math.ceil(b/h)+f,n=new c.util.ByteBuffer,p=f;p<k;++p){n.putInt32(p);d.start();d.update(a+n.getBytes());var u=d.digest();e.putBytes(u.getBytes(h))}e.truncate(e.length()-b);return e.getBytes()}}c.kem=c.kem||{};var d=c.jsbn.BigInteger;c.kem.rsa={};c.kem.rsa.create=function(a,b){b=b||{};var f=b.prng||c.random;return{encrypt:function(b,g){var k=Math.ceil(b.n.bitLength()/8),m;do m=(new d(c.util.bytesToHex(f.getBytesSync(k)),
649 +(function(){function a(c){function b(a,d,f,h){a.generate=function(a,b){for(var e=new c.util.ByteBuffer,k=Math.ceil(b/h)+f,n=new c.util.ByteBuffer,p=f;p<k;++p){n.putInt32(p);d.start();d.update(a+n.getBytes());var v=d.digest();e.putBytes(v.getBytes(h))}e.truncate(e.length()-b);return e.getBytes()}}c.kem=c.kem||{};var d=c.jsbn.BigInteger;c.kem.rsa={};c.kem.rsa.create=function(a,b){b=b||{};var f=b.prng||c.random;return{encrypt:function(b,g){var k=Math.ceil(b.n.bitLength()/8),m;do m=(new d(c.util.bytesToHex(f.getBytesSync(k)),
650 16)).mod(b.n);while(m.equals(d.ZERO));m=c.util.hexToBytes(m.toString(16));k-=m.length;0<k&&(m=c.util.fillString(String.fromCharCode(0),k)+m);k=b.encrypt(m,"NONE");m=a.generate(m,g);return{encapsulation:k,key:m}},decrypt:function(c,b,d){c=c.decrypt(b,"NONE");return a.generate(c,d)}}};c.kem.kdf1=function(a,c){b(this,a,0,c||a.digestLength)};c.kem.kdf2=function(a,c){b(this,a,1,c||a.digestLength)}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===
651 typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.kem)return b.kem;b.defined.kem=!0;for(var f=0;f<e.length;++f)e[f](b);return b.kem}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/kem",["require","module","./util","./random",
652 "./jsbn"],function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){c.log=c.log||{};c.log.levels="none error warning info debug verbose max".split(" ");var b={},d=[],e=null;c.log.LEVEL_LOCKED=2;c.log.NO_LEVEL_CHECK=4;c.log.INTERPOLATE=8;for(var f=0;f<c.log.levels.length;++f){var n=c.log.levels[f];b[n]={index:f,name:n.toUpperCase()}}c.log.logMessage=function(a){for(var e=b[a.level].index,f=0;f<d.length;++f){var h=d[f];h.flags&c.log.NO_LEVEL_CHECK?h.f(a):e<=b[h.level].index&&
@@ -673,7 +674,7 @@ g);}b=b.authenticatedAttributes||[];if(0<b.length){for(var h=!1,k=!1,m=0;m<b.len
674 signatureAlgorithm:c.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:b,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof a.content||null===a.contentInfo)if(a.contentInfo=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(c.pki.oids.data).getBytes())]),"content"in a){var b;a.content instanceof c.util.ByteBuffer?b=a.content.bytes():"string"===typeof a.content&&(b=c.util.encodeUtf8(a.content));a.contentInfo.value.push(m.create(m.Class.CONTEXT_SPECIFIC,
675 0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,b)]))}if(0!==a.signers.length){b={};for(var d=0;d<a.signers.length;++d){var e=a.signers[d],g=e.digestAlgorithm;g in b||(b[g]=c.md[c.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?b[g]:c.md[c.pki.oids[g]].create()}a.digestAlgorithmIdentifiers=[];for(g in b)a.digestAlgorithmIdentifiers.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(g).getBytes()),m.create(m.Class.UNIVERSAL,
676 m.Type.NULL,!1,"")]));if(2>a.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=m.derToOid(a.contentInfo.value[0].value),d=a.contentInfo.value[1],d=d.value[0],h=m.toDer(d);h.getByte();m.getBerValueLength(h);var h=h.getBytes(),k;for(k in b)b[k].start().update(h);k=new Date;for(d=0;d<a.signers.length;++d){e=a.signers[d];if(0===e.authenticatedAttributes.length){if(g!==c.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
676 -}else{e.authenticatedAttributesAsn1=m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[]),p=0;p<e.authenticatedAttributes.length;++p){var u=e.authenticatedAttributes[p];u.type===c.pki.oids.messageDigest?u.value=b[e.digestAlgorithm].digest():u.type!==c.pki.oids.signingTime||u.value||(u.value=k);h.value.push(n(u));e.authenticatedAttributesAsn1.value.push(n(u))}h=m.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}b=
677 +}else{e.authenticatedAttributesAsn1=m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[]),p=0;p<e.authenticatedAttributes.length;++p){var r=e.authenticatedAttributes[p];r.type===c.pki.oids.messageDigest?r.value=b[e.digestAlgorithm].digest():r.type!==c.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=m.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}b=
678 a;g=a.signers;k=[];for(d=0;d<g.length;++d)k.push(f(g[d]));b.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(b){"string"===typeof b&&(b=c.pki.certificateFromPem(b));a.certificates.push(b)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};r.createEncryptedData=function(){var a=null;return a={type:c.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:c.pki.oids["aes256-CBC"]},
679 fromAsn1:function(c){g(a,c,r.asn1.encryptedDataValidator)},decrypt:function(c){void 0!==c&&(a.encryptedContent.key=c);p(a)}}};r.createEnvelopedData=function(){var a=null;return a={type:c.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:c.pki.oids["aes256-CBC"]},fromAsn1:function(c){var d=g(a,c,r.asn1.envelopedDataValidator);c=a;for(var d=d.recipientInfos.value,e=[],f=0;f<d.length;++f)e.push(b(d[f]));c.recipients=e},toAsn1:function(){return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
680 !0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(a.type).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(a.version).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,e(a.recipients)),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h(a.encryptedContent))])])])},findRecipient:function(c){for(var b=c.issuer.attributes,d=0;d<a.recipients.length;++d){var e=a.recipients[d],f=e.issuer;if(e.serialNumber===
@@ -683,9 +684,9 @@ c.serialNumber&&f.length===b.length){for(var g=!0,h=0;h<b.length;++h)if(f[h].typ
684 e.update(a.content);if(!e.finish())throw Error("Symmetric encryption failed.");a.encryptedContent.content=e.output}for(e=0;e<a.recipients.length;++e)if(f=a.recipients[e],void 0===f.encryptedContent.content)switch(f.encryptedContent.algorithm){case c.pki.oids.rsaEncryption:f.encryptedContent.content=f.encryptedContent.key.encrypt(a.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+f.encryptedContent.algorithm);}}}}}if("function"!==typeof c)if("object"===typeof module&&
685 module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&(forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.pkcs7)return b.pkcs7;b.defined.pkcs7=!0;for(var f=0;f<e.length;++f)e[f](b);return b.pkcs7}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,
686 Array.prototype.slice.call(arguments,0))};c("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){function b(a,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=c.util.hexToBytes(e);a.putInt32(e.length);a.putBytes(e)}function d(a,c){a.putInt32(c.length);a.putString(c)}function e(){for(var a=c.md.sha1.create(),b=arguments.length,d=0;d<b;++d)a.update(arguments[d]);
686 -return a.digest()}var f=c.ssh=c.ssh||{};f.privateKeyToPutty=function(a,f,g){g=g||"";f=f||"";var n=""===f?"none":"aes256-cbc",m;m="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+n+"\r\n")+("Comment: "+g+"\r\n");var p=c.util.createBuffer();d(p,"ssh-rsa");b(p,a.e);b(p,a.n);var r=c.util.encode64(p.bytes(),64),v=Math.floor(r.length/66)+1;m+="Public-Lines: "+v+"\r\n";m+=r;r=c.util.createBuffer();b(r,a.d);b(r,a.p);b(r,a.q);b(r,a.qInv);f?(v=r.length()+16-1,v-=v%16,a=e(r.bytes()),a.truncate(a.length()-
687 -v+r.length()),r.putBuffer(a),v=c.util.createBuffer(),v.putBuffer(e("\x00\x00\x00\x00",f)),v.putBuffer(e("\x00\x00\x00\u0001",f)),v=c.aes.createEncryptionCipher(v.truncate(8),"CBC"),v.start(c.util.createBuffer().fillWithByte(0,16)),v.update(r.copy()),v.finish(),v=v.output,v.truncate(16),a=c.util.encode64(v.bytes(),64)):a=c.util.encode64(r.bytes(),64);v=Math.floor(a.length/66)+1;m+="\r\nPrivate-Lines: "+v+"\r\n";m+=a;f=e("putty-private-key-file-mac-key",f);v=c.util.createBuffer();d(v,"ssh-rsa");d(v,
688 -n);d(v,g);v.putInt32(p.length());v.putBuffer(p);v.putInt32(r.length());v.putBuffer(r);g=c.hmac.create();g.start("sha1",f);g.update(v.bytes());return m+="\r\nPrivate-MAC: "+g.digest().toHex()+"\r\n"};f.publicKeyToOpenSSH=function(a,e){e=e||"";var f=c.util.createBuffer();d(f,"ssh-rsa");b(f,a.e);b(f,a.n);return"ssh-rsa "+c.util.encode64(f.bytes())+" "+e};f.privateKeyToOpenSSH=function(a,b){return b?c.pki.encryptRsaPrivateKey(a,b,{legacy:!0,algorithm:"aes128"}):c.pki.privateKeyToPem(a)};f.getPublicKeyFingerprint=
687 +return a.digest()}var f=c.ssh=c.ssh||{};f.privateKeyToPutty=function(a,f,g){g=g||"";f=f||"";var n=""===f?"none":"aes256-cbc",m;m="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+n+"\r\n")+("Comment: "+g+"\r\n");var p=c.util.createBuffer();d(p,"ssh-rsa");b(p,a.e);b(p,a.n);var u=c.util.encode64(p.bytes(),64),r=Math.floor(u.length/66)+1;m+="Public-Lines: "+r+"\r\n";m+=u;u=c.util.createBuffer();b(u,a.d);b(u,a.p);b(u,a.q);b(u,a.qInv);f?(r=u.length()+16-1,r-=r%16,a=e(u.bytes()),a.truncate(a.length()-
688 +r+u.length()),u.putBuffer(a),r=c.util.createBuffer(),r.putBuffer(e("\x00\x00\x00\x00",f)),r.putBuffer(e("\x00\x00\x00\u0001",f)),r=c.aes.createEncryptionCipher(r.truncate(8),"CBC"),r.start(c.util.createBuffer().fillWithByte(0,16)),r.update(u.copy()),r.finish(),r=r.output,r.truncate(16),a=c.util.encode64(r.bytes(),64)):a=c.util.encode64(u.bytes(),64);r=Math.floor(a.length/66)+1;m+="\r\nPrivate-Lines: "+r+"\r\n";m+=a;f=e("putty-private-key-file-mac-key",f);r=c.util.createBuffer();d(r,"ssh-rsa");d(r,
689 +n);d(r,g);r.putInt32(p.length());r.putBuffer(p);r.putInt32(u.length());r.putBuffer(u);g=c.hmac.create();g.start("sha1",f);g.update(r.bytes());return m+="\r\nPrivate-MAC: "+g.digest().toHex()+"\r\n"};f.publicKeyToOpenSSH=function(a,e){e=e||"";var f=c.util.createBuffer();d(f,"ssh-rsa");b(f,a.e);b(f,a.n);return"ssh-rsa "+c.util.encode64(f.bytes())+" "+e};f.privateKeyToOpenSSH=function(a,b){return b?c.pki.encryptRsaPrivateKey(a,b,{legacy:!0,algorithm:"aes128"}):c.pki.privateKeyToPem(a)};f.getPublicKeyFingerprint=
690 function(a,e){e=e||{};var f=e.md||c.md.md5.create(),n=c.util.createBuffer();d(n,"ssh-rsa");b(n,a.e);b(n,a.n);f.start();f.update(n.getBytes());f=f.digest();if("hex"===e.encoding)return f=f.toHex(),e.delimiter?f.match(/.{2}/g).join(e.delimiter):f;if("binary"===e.encoding)return f.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return f}}if("function"!==typeof c)if("object"===typeof module&&module.exports){var f=!0;c=function(a,c){c(b,module)}}else return"undefined"===typeof forge&&
691 (forge={}),a(forge);var n,p=function(c,b){b.exports=function(b){var e=n.map(function(a){return c(a)}).concat(a);b=b||{};b.defined=b.defined||{};if(b.defined.ssh)return b.ssh;b.defined.ssh=!0;for(var f=0;f<e.length;++f)e[f](b);return b.ssh}},r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return delete c,r.apply(null,Array.prototype.slice.call(arguments,0));c=r;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
692 function(){p.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function a(c){var b={},d=0;c.debug.set("forge.task","tasks",b);var e={};c.debug.set("forge.task","queues",e);var f={ready:{}};f.ready.stop="ready";f.ready.start="running";f.ready.cancel="done";f.ready.fail="error";f.running={};f.running.stop="ready";f.running.start="running";f.running.block="blocked";f.running.unblock="running";f.running.sleep="sleeping";f.running.wakeup="running";f.running.cancel="done";f.running.fail=
@@ -703,7 +704,7 @@ r=c;c=function(a,b){n="string"===typeof a?b.slice(2):a.slice(2);if(f)return dele
704 return}var f,n=function(a,c){c.exports=function(c){var b=f.map(function(c){return a(c)});c=c||{};c.defined=c.defined||{};if(c.defined.forge)return c.forge;c.defined.forge=!0;for(var d=0;d<b.length;++d)b[d](c);return c};c.exports.disableNativeCode=!0;c.exports(c.exports)},p=c;c=function(b,l){f="string"===typeof b?l.slice(2):b.slice(2);if(a)return delete c,p.apply(null,Array.prototype.slice.call(arguments,0));c=p;return c.apply(null,Array.prototype.slice.call(arguments,0))};c("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
705 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();return b("js/forge")});function amtcert_linkCertPrivateKey(a,b){for(var c in a){var d=a[c];try{if(0==xxCertPrivateKeys.length)break;for(var f=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),n=0;n<b.length;n++)f===b[n].DERKey+"-----END PUBLIC KEY-----"&&(b[n].XCert=d,d.XPrivateKey=b[n])}catch(p){console.log(p)}}}
706 function amtcert_loadP12File(a,b,c){try{var d=window.forge.util.decode64(btoa(a)),f=window.forge.asn1.fromDer(d),n=window.forge.pkcs12.pkcs12FromAsn1(f,b),p=n.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(p[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<p[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var r=p[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,l=window.forge.pki.privateKeyToAsn1(r),k=window.forge.pki.wrapRsaPrivateKey(l);window.forge.asn1.toDer(k).getBytes();
706 -var u=n.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,e=n.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;c(r,u,e);return!0}catch(v){}return!1}function amtcert_signWithCaKey(a,b,c,d,f){b&&null!=b||(b=amtcert_createCertificate(d).key);return amtcert_createCertificate(c,b,a,d,f)}
707 +var v=n.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,e=n.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;c(r,v,e);return!0}catch(u){}return!1}function amtcert_signWithCaKey(a,b,c,d,f){b&&null!=b||(b=amtcert_createCertificate(d).key);return amtcert_createCertificate(c,b,a,d,f)}
708 function amtcert_createCertificate(a,b,c,d,f){var n,p=forge.pki.createCertificate();c?p.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+c+"-----END PUBLIC KEY-----"):(n=forge.pki.rsa.generateKeyPair(2048),p.publicKey=n.publicKey);p.serialNumber=""+Math.floor(1E5*Math.random()+1);p.validity.notBefore=new Date;p.validity.notBefore.setFullYear(p.validity.notBefore.getFullYear()-1);p.validity.notAfter=new Date;p.validity.notAfter.setFullYear(p.validity.notAfter.getFullYear()+30);var r=
709 [];a.CN&&r.push({name:"commonName",value:a.CN});a.C&&r.push({name:"countryName",value:a.C});a.ST&&r.push({shortName:"ST",value:a.ST});a.O&&r.push({name:"organizationName",value:a.O});p.setSubject(r);b?(a=[],d.CN&&a.push({name:"commonName",value:d.CN}),d.C&&a.push({name:"countryName",value:d.C}),d.ST&&a.push({shortName:"ST",value:d.ST}),d.O&&a.push({name:"organizationName",value:d.O}),p.setIssuer(a)):p.setIssuer(r);void 0==b?p.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,
710 emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==f?f={name:"extKeyUsage",serverAuth:!0}:f.name="extKeyUsage",p.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},f,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));b?p.sign(b,forge.md.sha256.create()):p.sign(n.privateKey,forge.md.sha256.create());return c?p:{cert:p,key:n.privateKey}}
@@ -712,26 +713,26 @@ script_functionTable2="encodeuri decodeuri passwordcheck atob btoa hex2str str2h
713 script_functionTableX3=[PullSystemStatus,PullEventLog,PullAuditLog,PullCertificates,PullWatchdog,PullSystemDefense,PullHardware,PullUserInfo,PullRemoteAccess,script_HighlightBlock,,function(a,b){return GetSidString(b)},function(a,b){return GetSidByteArray(b)},PullEventSubscriptions];
714 function script_setup(a,b){var c={startvars:b};if(6>a.length)return console.error("Invalid script length"),null;if(612182341!=ReadInt(a,0))return console.error("Invalid binary script"),null;if(1<ReadShort(a,4))return console.error("Unsupported script version"),null;c.script=a.substring(6);c.reset=function(a){c.stop();c.ip=0;c.variables=b;c.state=1};c.start=function(a){c.stop();c.stepspeed=a;0<a&&(c.timer=setInterval(function(){c.step()},a))};c.stop=function(){null!=c.timer&&clearInterval(c.timer);
715 c.timer=null;c.stepspeed=0};c.getVar=function(a){return void 0==a?void 0:c.getVarEx(a.split("."),c.variables)};c.getVarEx=function(a,b){try{return void 0==a?void 0:0==a.length?b:c.getVarEx(a.slice(1),b[a[0]])}catch(n){return null}};c.setVar=function(a,b){c.setVarEx(a.split("."),c.variables,b)};c.setVarEx=function(a,b,n){1==a.length?b[a[0]]=n:c.setVarEx(a.slice(1),b[a[0]],n)};c.step=function(){if(1==c.state){if(c.ip<c.script.length){var a=ReadShort(c.script,c.ip),b=ReadShort(c.script,c.ip+2),n=ReadShort(c.script,
715 -c.ip+4),p=c.ip+6,r=[],l;for(l in c.variables)l.startsWith("__")&&delete c.variables[l];for(l=0;l<n;l++){var k=ReadShort(c.script,p),u=c.script.substring(p+2,p+2+k),e=u.charCodeAt(0),u=u.substring(1);if(2>e){for(;1<u.split("{").length;)var v=u.split("{").pop().split("}").shift(),u=u.replace("{"+v+"}",c.getVar(v));1==e&&(c.variables["__"+l]=decodeURI(u),u="__"+l);r.push(u)}if(2==e||3==e)c.variables["__"+l]=ReadSInt(u,0),r.push("__"+l);p+=2+k}c.ip+=b;b=[];for(l=0;10>l;l++)b.push(c.getVar(r[l]));var B;
716 +c.ip+4),p=c.ip+6,r=[],l;for(l in c.variables)l.startsWith("__")&&delete c.variables[l];for(l=0;l<n;l++){var k=ReadShort(c.script,p),v=c.script.substring(p+2,p+2+k),e=v.charCodeAt(0),v=v.substring(1);if(2>e){for(;1<v.split("{").length;)var u=v.split("{").pop().split("}").shift(),v=v.replace("{"+u+"}",c.getVar(u));1==e&&(c.variables["__"+l]=decodeURI(v),v="__"+l);r.push(v)}if(2==e||3==e)c.variables["__"+l]=ReadSInt(v,0),r.push("__"+l);p+=2+k}c.ip+=b;b=[];for(l=0;10>l;l++)b.push(c.getVar(r[l]));var B;
717 try{if(1E4>a)switch(a){case 0:break;case 1:if(b[2]){if("<"==b[2]&&b[1]<b[3]||"<="==b[2]&&b[1]<=b[3]||"!="==b[2]&&b[1]!=b[3]||"="==b[2]&&b[1]==b[3]||">="==b[2]&&b[1]>=b[3]||">"==b[2]&&b[1]>b[3])c.ip=b[0]}else c.ip=b[0];break;case 2:void 0==r[1]?delete c.variables[r[0]]:c.setVar(r[0],b[1]);break;case 3:if(c.onConsole)c.onConsole(c.toString(b[0]),c);else console.log(c.toString(b[0]));break;case 4:c.state=2;c.dialog=!0;setDialogMode(11,b[0],b[2],c.xxStepDialogOk,b[1],c);break;case 5:for(l in b[1])b[1][l][b[2]]==
718 b[3]&&(B=l);break;case 6:B=b[1].substr(b[2],b[3]);break;case 7:B=b[1].indexOf(b[2]);break;case 8:B=b[1].split(b[2]);break;case 9:B=b[1].join(b[2]);break;case 10:B=b[1].length;break;case 11:B=JSON.parse(b[1]);break;case 12:B=JSON.stringify(b[1]);break;case 13:B=b[1]+b[2];break;case 14:B=b[1]-b[2];break;case 15:B=parseInt(b[1]);break;case 16:c.state=2;c.amtstack.BatchEnum(b[0],b[1],c.xxWsmanReturn,c);break;case 17:c.state=2;c.amtstack.Put(b[0],b[1],c.xxWsmanReturn,c);break;case 18:c.state=2;c.amtstack.Create(b[0],
719 b[1],c.xxWsmanReturn,c);break;case 19:c.state=2;c.amtstack.Delete(b[0],b[1],c.xxWsmanReturn,c);break;case 20:c.state=2;c.amtstack.Exec(b[0],b[1],b[2],c.xxWsmanReturn,c,0,b[3]);break;case 21:c.stepspeed=b[0];null!=c.timer&&(clearInterval(c.timer),c.timer=setInterval(function(){c.step()},c.stepspeed));break;case 22:c.state=2;c.amtstack.Subscribe(b[0],b[1],b[2],c.xxWsmanReturn,c,0,b[3],b[4],b[5],b[6]);break;case 23:c.state=2;c.amtstack.UnSubscribe(b[0],c.xxWsmanReturn,c,0,b[1]);break;case 24:console.log(b[1],
720 b[2],b[1].charCodeAt(b[2]));B=b[1].charCodeAt(b[2]);break;case 25:c.state=2;amtcert_signWithCaKey(b[0],null,b[1],{CN:"Untrusted Root Certificate"},c.xxSignWithDummyCaReturn);break;default:c.state=9,console.error("Script Error, unknown command: "+a)}else 2E4>a?B=script_functionTableX2[a-1E4](b[1],b[2],b[3],b[4],b[5],b[6]):script_functionTableX3&&script_functionTableX3[a-2E4]&&(B=script_functionTableX3[a-2E4](c,b[1],b[2],b[3],b[4],b[5],b[6]));void 0!=B&&c.setVar(r[0],B)}catch(h){"object"==typeof h&&
721 (h=h.message),c.setVar("_exception",h)}}1==c.state&&c.ip>=c.script.length&&(c.state=0,c.stop());if(c.onStep)c.onStep(c);return c}};c.xxStepDialogOk=function(a){c.variables.DialogSelect=a;c.state=1;c.dialog=!1;if(c.onStep)c.onStep(c)};c.xxWsmanReturn=function(a,b,n,p){c.setVar(b,n);c.setVar("wsman_result",p);c.setVar("wsman_result_str",httpErrorTable[p]?httpErrorTable[p]:"Error #"+p);c.state=1;if(c.onStep)c.onStep(c)};c.xxSignWithDummyCaReturn=function(a){c.setVar("signed_cert",btoa(_arrayBufferToString(a)));
722 c.state=1;if(c.onStep)c.onStep(c)};c.toString=function(a){return"object"==typeof a?JSON.stringify(a):a};c.reset();return c}
722 -function script_compile(a,b){var c="",d=a.split("\n"),f={},n=[],p=[],r;for(r in d){var l=d[r];if(l.startsWith("##SWAP ")){var k=l.split(" ");3==k.length&&(p[k[1]]=k[2])}if("#"!=l[0]&&0!=l.length){for(k in p)l=l.split(k).join(p[k]);var u=l.match(/"[^"]*"|[^\s"]+/g);if(0!=u.length)if(":"==l[0])f[u[0].toUpperCase()]=c.length;else{l=script_functionTable1.indexOf(u[0].toLowerCase());-1==l&&(l=script_functionTable2.indexOf(u[0].toLowerCase()),0<=l&&(l+=1E4));-1==l&&(l=script_functionTable3.indexOf(u[0].toLowerCase()),
723 -0<=l&&(l+=2E4));if(-1==l)return b&&b("Unabled to compile, unknown command: "+u[0]),"";var e=ShortToStr(u.length-1),v;for(v in u)if(0!=v)if(":"==u[v][0])n.push([u[v],c.length+e.length+7]),e+=ShortToStr(5)+String.fromCharCode(3)+IntToStr(4294967295);else var B=parseInt(u[v]),e=B==u[v]?e+(ShortToStr(5)+String.fromCharCode(2)+IntToStr(B)):'"'==u[v][0]&&'"'==u[v][u[v].length-1]?e+(ShortToStr(u[v].length-1)+String.fromCharCode(1)+u[v].substring(1,u[v].length-1)):e+(ShortToStr(u[v].length+1)+String.fromCharCode(0)+
724 -u[v]);e=ShortToStr(l)+ShortToStr(e.length+4)+e;c+=e}}}for(r in n){d=n[r][0].toUpperCase();p=n[r][1];k=f[d];if(void 0==k)return b&&b("Unabled to compile, unknown label: "+d),"";c=c.substr(0,p)+IntToStr(k)+c.substr(p+4)}return IntToStr(612182341)+ShortToStr(1)+c}
725 -function script_decompile(a,b){var c="",d=6,f={};if(0<=b)d=b;else{if(6>a.length)return"# Invalid script length";var n=ReadInt(a,0),p=ReadShort(a,4);if(612182341!=n)return"# Invalid binary script: "+n;if(1!=p)return"# Invalid script version"}for(;d<a.length;){var n=ReadShort(a,d),p=ReadShort(a,d+2),r=ReadShort(a,d+4),l=d+6,k="";0<=b||(c+=":label"+(d-6)+"\n");for(var u=0;u<r;u++){var e=ReadShort(a,l),v=a.substring(l+2,l+2+e),B=v.charCodeAt(0);0==B?k+=" "+v.substring(1):1==B?k+=' "'+v.substring(1)+'"':
726 -2==B?k+=" "+ReadInt(v,1):3==B&&(v=ReadInt(v,1),B=f[v],B||(B=":label"+v,f[B]=v),k+=" "+B);l+=2+e}c=1E4>n?c+(script_functionTable1[n]+k+"\n"):2E4<=n?c+(script_functionTable3[n-2E4]+k+"\n"):c+(script_functionTable2[n-1E4]+k+"\n");d+=p;if(0<=b)return c}d=c.split("\n");c="";for(u in d)n=d[u],":"!=n[0]?c+=n+"\n":f[n]&&(c+=n+"\n");return c}
723 +function script_compile(a,b){var c="",d=a.split("\n"),f={},n=[],p=[],r;for(r in d){var l=d[r];if(l.startsWith("##SWAP ")){var k=l.split(" ");3==k.length&&(p[k[1]]=k[2])}if("#"!=l[0]&&0!=l.length){for(k in p)l=l.split(k).join(p[k]);var v=l.match(/"[^"]*"|[^\s"]+/g);if(0!=v.length)if(":"==l[0])f[v[0].toUpperCase()]=c.length;else{l=script_functionTable1.indexOf(v[0].toLowerCase());-1==l&&(l=script_functionTable2.indexOf(v[0].toLowerCase()),0<=l&&(l+=1E4));-1==l&&(l=script_functionTable3.indexOf(v[0].toLowerCase()),
724 +0<=l&&(l+=2E4));if(-1==l)return b&&b("Unabled to compile, unknown command: "+v[0]),"";var e=ShortToStr(v.length-1),u;for(u in v)if(0!=u)if(":"==v[u][0])n.push([v[u],c.length+e.length+7]),e+=ShortToStr(5)+String.fromCharCode(3)+IntToStr(4294967295);else var B=parseInt(v[u]),e=B==v[u]?e+(ShortToStr(5)+String.fromCharCode(2)+IntToStr(B)):'"'==v[u][0]&&'"'==v[u][v[u].length-1]?e+(ShortToStr(v[u].length-1)+String.fromCharCode(1)+v[u].substring(1,v[u].length-1)):e+(ShortToStr(v[u].length+1)+String.fromCharCode(0)+
725 +v[u]);e=ShortToStr(l)+ShortToStr(e.length+4)+e;c+=e}}}for(r in n){d=n[r][0].toUpperCase();p=n[r][1];k=f[d];if(void 0==k)return b&&b("Unabled to compile, unknown label: "+d),"";c=c.substr(0,p)+IntToStr(k)+c.substr(p+4)}return IntToStr(612182341)+ShortToStr(1)+c}
726 +function script_decompile(a,b){var c="",d=6,f={};if(0<=b)d=b;else{if(6>a.length)return"# Invalid script length";var n=ReadInt(a,0),p=ReadShort(a,4);if(612182341!=n)return"# Invalid binary script: "+n;if(1!=p)return"# Invalid script version"}for(;d<a.length;){var n=ReadShort(a,d),p=ReadShort(a,d+2),r=ReadShort(a,d+4),l=d+6,k="";0<=b||(c+=":label"+(d-6)+"\n");for(var v=0;v<r;v++){var e=ReadShort(a,l),u=a.substring(l+2,l+2+e),B=u.charCodeAt(0);0==B?k+=" "+u.substring(1):1==B?k+=' "'+u.substring(1)+'"':
727 +2==B?k+=" "+ReadInt(u,1):3==B&&(u=ReadInt(u,1),B=f[u],B||(B=":label"+u,f[B]=u),k+=" "+B);l+=2+e}c=1E4>n?c+(script_functionTable1[n]+k+"\n"):2E4<=n?c+(script_functionTable3[n-2E4]+k+"\n"):c+(script_functionTable2[n-1E4]+k+"\n");d+=p;if(0<=b)return c}d=c.split("\n");c="";for(v in d)n=d[v],":"!=n[0]?c+=n+"\n":f[n]&&(c+=n+"\n");return c}
728 var saveAs=saveAs||function(a){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document.createElementNS("http://www.w3.org/1999/xhtml","a"),c="download"in b,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),f=a.webkitRequestFileSystem,n=a.requestFileSystem||f||a.mozRequestFileSystem,p=function(b){(a.setImmediate||a.setTimeout)(function(){throw b;},0)},r=0,l=function(b){var c=function(){"string"===typeof b?(a.URL||a.webkitURL||a).revokeObjectURL(b):b.remove()};
728 -a.chrome?c():setTimeout(c,500)},k=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(f){p(f)}}},u=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},e=function(e,h,g){g||(e=u(e));var p=this;g=e.type;var m=!1,v,y,w=function(){k(p,["writestart","progress","write","writeend"])},F=function(){if(y&&d&&"undefined"!==typeof FileReader){var b=
729 -new FileReader;b.onloadend=function(){var a=b.result;y.location.href="data:attachment/file"+a.slice(a.search(/[,;]/));p.readyState=p.DONE;w()};b.readAsDataURL(e);p.readyState=p.INIT}else{if(m||!v)v=(a.URL||a.webkitURL||a).createObjectURL(e);y?y.location.href=v:void 0==a.open(v,"_blank")&&d&&(a.location.href=v);p.readyState=p.DONE;w();l(v)}},A=function(a){return function(){if(p.readyState!==p.DONE)return a.apply(this,arguments)}},J={create:!0,exclusive:!1},x;p.readyState=p.INIT;h||(h="download");if(c)v=
730 -(a.URL||a.webkitURL||a).createObjectURL(e),b.href=v,b.download=h,setTimeout(function(){var a=new MouseEvent("click");b.dispatchEvent(a);w();l(v);p.readyState=p.DONE});else{a.chrome&&g&&"application/octet-stream"!==g&&(x=e.slice||e.webkitSlice,e=x.call(e,0,e.size,"application/octet-stream"),m=!0);f&&"download"!==h&&(h+=".download");if("application/octet-stream"===g||f)y=a;n?(r+=e.size,n(a.TEMPORARY,r,A(function(a){a.root.getDirectory("saved",J,A(function(a){var b=function(){a.getFile(h,J,A(function(a){a.createWriter(A(function(b){b.onwriteend=
731 -function(b){y.location.href=a.toURL();p.readyState=p.DONE;k(p,"writeend",b);l(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&F()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=p["on"+a]});b.write(e);p.abort=function(){b.abort();p.readyState=p.DONE};p.readyState=p.WRITING}),F)}),F)};a.getFile(h,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():F()}))}),F)}),F)):F()}},v=e.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
732 -b,c){c||(a=u(a));return navigator.msSaveOrOpenBlob(a,b||"download")};v.abort=function(){this.readyState=this.DONE;k(this,"abort")};v.readyState=v.INIT=0;v.WRITING=1;v.DONE=2;v.error=v.onwritestart=v.onprogress=v.onwrite=v.onabort=v.onerror=v.onwriteend=null;return function(a,b,c){return new e(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
729 +a.chrome?c():setTimeout(c,500)},k=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(f){p(f)}}},v=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},e=function(e,h,g){g||(e=v(e));var p=this;g=e.type;var m=!1,u,x,w=function(){k(p,["writestart","progress","write","writeend"])},F=function(){if(x&&d&&"undefined"!==typeof FileReader){var b=
730 +new FileReader;b.onloadend=function(){var a=b.result;x.location.href="data:attachment/file"+a.slice(a.search(/[,;]/));p.readyState=p.DONE;w()};b.readAsDataURL(e);p.readyState=p.INIT}else{if(m||!u)u=(a.URL||a.webkitURL||a).createObjectURL(e);x?x.location.href=u:void 0==a.open(u,"_blank")&&d&&(a.location.href=u);p.readyState=p.DONE;w();l(u)}},A=function(a){return function(){if(p.readyState!==p.DONE)return a.apply(this,arguments)}},J={create:!0,exclusive:!1},y;p.readyState=p.INIT;h||(h="download");if(c)u=
731 +(a.URL||a.webkitURL||a).createObjectURL(e),b.href=u,b.download=h,setTimeout(function(){var a=new MouseEvent("click");b.dispatchEvent(a);w();l(u);p.readyState=p.DONE});else{a.chrome&&g&&"application/octet-stream"!==g&&(y=e.slice||e.webkitSlice,e=y.call(e,0,e.size,"application/octet-stream"),m=!0);f&&"download"!==h&&(h+=".download");if("application/octet-stream"===g||f)x=a;n?(r+=e.size,n(a.TEMPORARY,r,A(function(a){a.root.getDirectory("saved",J,A(function(a){var b=function(){a.getFile(h,J,A(function(a){a.createWriter(A(function(b){b.onwriteend=
732 +function(b){x.location.href=a.toURL();p.readyState=p.DONE;k(p,"writeend",b);l(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&F()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=p["on"+a]});b.write(e);p.abort=function(){b.abort();p.readyState=p.DONE};p.readyState=p.WRITING}),F)}),F)};a.getFile(h,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():F()}))}),F)}),F)):F()}},u=e.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
733 +b,c){c||(a=v(a));return navigator.msSaveOrOpenBlob(a,b||"download")};u.abort=function(){this.readyState=this.DONE;k(this,"abort")};u.readyState=u.INIT=0;u.WRITING=1;u.DONE=2;u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null;return function(a,b,c){return new e(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
734 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
734 -var version="0.6.8",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
735 +var version="0.6.9",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
736 null,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Loading...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar EventLog EventSubscriptions FileSaver HardwareInfo Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Scripting Scripting-Editor Storage SystemDefense VersionWarning Wireless WsmanBrowser".split(" "),
737 StatusStrs=["Disconnected","Connecting...","Setup...","Connected"],scriptstate,t,t2,rsepass=null;
738 function startup(){var a=document.getElementsByTagName("input");for(t=0;t<a.length;t++)a[t].id&&(window[a[t].id]=a[t]);urlvars=getUrlVars();for(var b in AllWsman)a=document.createElement("option"),a.text=AllWsman[b],a.id="WSB-"+AllWsman[b],Q(22).add(a);document.addEventListener("dragover",haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",
@@ -764,8 +765,8 @@ d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radi
765 b="Enabled each "+n.DDNSPeriodicUpdateInterval+" minutes, TTL is "+n.DDNSTTL+" minutes":1==n.DDNSUpdateByDHCPServerEnabled&&(b="Update by DHCP server");d+=TableEntry("Dynamic DNS",addLinkConditional(b,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(c in amtsysstate.AMT_EthernetPortSettings.responses){b=amtsysstate.AMT_EthernetPortSettings.responses[c];if(b.WLANLinkProtectionLevel||1==c)amtwirelessif=c;if(0!=c||amtwirelessif==c||"00-00-00-00-00-00"!=b.MACAddress){0==c&&a++;d+="<br><h2>"+
766 (amtwirelessif==c?"Wireless":"Wired")+" Interface</h2>";d+=TableStart();d+=TableEntry("Link state",1==b.LinkIsUp?"Link is up":"Link is down");"00-00-00-00-00-00"!=b.MACAddress&&(d+=TableEntry("MAC address",b.MACAddress));amtwirelessif==c&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("State",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Radio State",
767 xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>None</i>")));amtwirelessif!=c&&(d+=TableEntry("Respond to ping",addLinkConditional(["Disabled","ICMP response","RMCP response","ICMP & RMCP response"][n.PingResponseEnabled+(n.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),d+=TableEntry("IPv4 state",addLinkConditional(1==b.DHCPEnabled?"Automatic using DHCP server":"Static IP address","showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4 address",
767 -isIpAddress(b.IPAddress,"None"));isIpAddress(b.DefaultGateway)&&(d+=TableEntry("IPv4 gateway / Mask",b.DefaultGateway+" / "+isIpAddress(b.SubnetMask,"None")));f=b.PrimaryDNS;isIpAddress(f)&&(b.SecondaryDNS&&(f+=" / "+b.SecondaryDNS),d+=TableEntry("IPv4 domain name server",f));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){b=amtsysstate.IPS_IPv6PortSettings.responses[c];for(var r="Disabled",u,f=amtsysstate.CIM_ElementSettingData.responses,p=0;p<f.length;p++)f[p].SettingData&&f[p].SettingData.ReferenceParameters.SelectorSet.Selector.Value==
768 -"Intel(r) IPS IPv6 Settings "+c&&(u=1==f[p].IsCurrent);1==u&&(f=isIpAddress(b.IPv6Address)||isIpAddress(b.DefaultRouter)||isIpAddress(b.PrimaryDNS)||isIpAddress(b.SecondaryDNS),r="Enabled, Automatic "+(f?"& manual":"")+" addresses");d+=TableEntry("IPv6 state",addLinkConditional(r,"showIPv6StateDlg("+c+","+u+")",xxAccountAdminName));if(1==u){if(b.CurrentAddressInfo&&0<b.CurrentAddressInfo.length){b.CurrentAddressInfo=MakeToArray(b.CurrentAddressInfo);ipv6addr="";for(p=0;p<b.CurrentAddressInfo.length;p++)0<
768 +isIpAddress(b.IPAddress,"None"));isIpAddress(b.DefaultGateway)&&(d+=TableEntry("IPv4 gateway / Mask",b.DefaultGateway+" / "+isIpAddress(b.SubnetMask,"None")));f=b.PrimaryDNS;isIpAddress(f)&&(b.SecondaryDNS&&(f+=" / "+b.SecondaryDNS),d+=TableEntry("IPv4 domain name server",f));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){b=amtsysstate.IPS_IPv6PortSettings.responses[c];for(var r="Disabled",v,f=amtsysstate.CIM_ElementSettingData.responses,p=0;p<f.length;p++)f[p].SettingData&&f[p].SettingData.ReferenceParameters.SelectorSet.Selector.Value==
769 +"Intel(r) IPS IPv6 Settings "+c&&(v=1==f[p].IsCurrent);1==v&&(f=isIpAddress(b.IPv6Address)||isIpAddress(b.DefaultRouter)||isIpAddress(b.PrimaryDNS)||isIpAddress(b.SecondaryDNS),r="Enabled, Automatic "+(f?"& manual":"")+" addresses");d+=TableEntry("IPv6 state",addLinkConditional(r,"showIPv6StateDlg("+c+","+v+")",xxAccountAdminName));if(1==v){if(b.CurrentAddressInfo&&0<b.CurrentAddressInfo.length){b.CurrentAddressInfo=MakeToArray(b.CurrentAddressInfo);ipv6addr="";for(p=0;p<b.CurrentAddressInfo.length;p++)0<
770 ipv6addr.length&&(ipv6addr+=", "),ipv6addr+=b.CurrentAddressInfo[p].split(",")[0];d+=TableEntry("IPv6 address",addLink(ipv6addr,"showIPv6AddrDlg("+c+',"'+b.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6 address","None");isIpAddress(b.CurrentDefaultRouter)&&(d+=TableEntry("IPv6 default router",b.CurrentDefaultRouter));isIpAddress(b.CurrentPrimaryDNS)&&(f=b.CurrentPrimaryDNS,isIpAddress(b.CurrentSecondaryDNS)&&(f+=" / "+b.CurrentSecondaryDNS),d+=TableEntry("IPv6 domain name server",f))}}d+=TableEnd()}}-1!=
771 amtwirelessif&&0==(amtFirstPull&2)&&PullWireless();QH(19,d);1==a&&0==(amtFirstPull&4)&&PullSystemDefense();0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage();0==currentView&&go(1,1)}}function isIpAddress(a,b){return a&&null!=a&&0<a.length&&"::"!=a&&"::0"!=a?a:b}var IntelAmtEntireState,IntelAmtEntireStateCalls;
772 function saveEntireAmtState(){if(!xxdialogMode){var a="",b=new Date;amtsysstate&&(a="-"+amtsysstate.AMT_GeneralSettings.response.HostName);a+="-"+b.getFullYear()+"-"+("0"+(b.getMonth()+1)).slice(-2)+"-"+("0"+b.getDate()).slice(-2)+"-"+("0"+b.getHours()).slice(-2)+"-"+("0"+b.getMinutes()).slice(-2);c18.value="amtstate"+a+".json";setDialogMode(19,"Save Entire Intel&reg; AMT State",3,saveEntireAmtStateOk)}}
@@ -938,15 +939,16 @@ function showUserDetails(a){if(!xxdialogMode){var b=xxAccountRealmInfo[a],c="<di
939 function wsmanQuery(){QH(24,"");var a=getSelectedOptions(Q(22)),b=[],c;for(c in a)""==QS("WSB-"+a[c]).display&&b.push(a[c]);0!=b.length&&(QE(23,!1),b&&0<b.length&&amtstack.BatchEnum("Browser",b,browserResponse,null,!0))}
940 function browserResponse(a,b,c,d){QE(23,!0);a="";for(var f in c)b=c[f],a+="<h2>"+f+"</h2><div style=margin-left:20px>",a=200==b.status?0==b.responses.length?a+"<br>(Empty)":a+ObjectToString(b.responses).replace(/Intel\(r\)/g,"Intel&reg"):a+("<br><div style=color:red>Error #"+b.status+"</div>"),a+="</div><br>";QH(24,a)}
941 function wsmanFilter(){var a=c0.value.toLowerCase(),b;for(b in AllWsman)QV("WSB-"+AllWsman[b],""==a||0<=AllWsman[b].toLowerCase().indexOf(a))}var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"Disabled",32769:"BIOS enabled",32770:"OS enable",32771:"BIOS & OS enabled"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
941 -function PullRemoteAccess(){amtstack.BatchEnum(null,"*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" "),processRemote1)}
942 +function PullRemoteAccess(){var a="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&a.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,a,processRemote1)}
943 function processRemote1(a,b,c,d){if(400!=d&&!errcheck(d,a)&&void 0!=c.AMT_UserInitiatedConnectionService&&void 0!=c.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=c;xxEnvironementDetection=c.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=c.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=c.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=
944 c.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=c.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(var f in c.AMT_RemoteAccessPolicyAppliesToMPS.responses)b=c.AMT_RemoteAccessPolicyAppliesToMPS.responses[f],a=getItem(xxCiraServers,"Name",getItem(b.ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value),b=getItem(b.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[b].push(a);
945 updateRemoteAccess()}}
945 -function updateRemoteAccess(){if(null!=xxEnvironementDetection){var a,b="Disabled";xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(b="Enabled, "+xxEnvironementDetection.DetectionStrings.length+" domain"+(1<xxEnvironementDetection.DetectionStrings.length?"s":""));a=""+TableStart();a+=TableEntry("Environment detection",addLink(b,"editEnvironmentDetection()"));a+=TableEntry("User initiation options",addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",
946 -xxAccountAdminName));b="<i>None</i>";if(0<xxPolicies.User.length){var b="",c;for(c in xxPolicies.User)0<b.length&&(b+=", "),b+=xxPolicies.User[c].AccessInfo}a+=TableEntry("User initiated connection",addLinkConditional(b,'editMpsPolicy("User")',xxAccountAdminName));b="<i>None</i>";if(0<xxPolicies.Alert.length)for(c in b="",xxPolicies.Alert)0<b.length&&(b+=", "),b+=xxPolicies.Alert[c].AccessInfo;a+=TableEntry("Alert initiated connection",addLinkConditional(b,'editMpsPolicy("Alert")',xxAccountAdminName));
947 -b="<i>None</i>";if(0<xxPolicies.Periodic.length)for(c in b="",xxPolicies.Periodic)0<b.length&&(b+=", "),b+=xxPolicies.Periodic[c].AccessInfo;var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName","Periodic");if(d){var f=atob(d.ExtendedData);0==ReadInt(f,0)&&(b+=", each "+ReadInt(f,4)+" seconds");1==ReadInt(f,0)&&(d=ReadInt(f,4),f=ReadInt(f,8),10>f&&(f="0"+f),b+=", at "+d+":"+f+" daily")}a+=TableEntry("Periodic connection",addLinkConditional(b,'editMpsPolicy("Periodic")',
948 -xxAccountAdminName));a+=TableEnd();a=a+"<br>"+TableStart2();a+="<tr><td class=r1 style=padding-left:15px><br>Manage Intel&reg; AMT remote management servers.<br><br>";if(0==xxCiraServers.length)a+="<div style=padding-left:15px><br><i>No remote servers found.</i></div><br>";else for(c in xxCiraServers)b=":"+xxCiraServers[c].Port,xxCiraServers[c].CN&&(b+=", "+xxCiraServers[c].CN),a+="<div class=itemBar onclick=showServerDetails("+c+")><div style=padding-top:3px><b>"+xxCiraServers[c].AccessInfo+"</b>"+
949 -EscapeHtml(b)+"</div></div>";c="";xxAccountAdminName&&(c=AddButton("Add Server...","AddRemoteAccessServer()"));a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+c);QH(28,a)}}var xxEditMpsPolicyType;
946 +function updateRemoteAccess(){if(null!=xxEnvironementDetection){var a,b="Disabled",c=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(b="Enabled, "+xxEnvironementDetection.DetectionStrings.length+" domain"+(1<xxEnvironementDetection.DetectionStrings.length?"s":""));a=""+TableStart();a+=TableEntry("Environment detection",addLink(b,"editEnvironmentDetection()"));a+=TableEntry("User initiation options",
947 +addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));b="<i>None</i>";if(0<xxPolicies.User.length){var b="",d;for(d in xxPolicies.User)0<b.length&&(b+=", "),b+=xxPolicies.User[d].AccessInfo}a+=TableEntry("User initiated connection",addLinkConditional(b,'editMpsPolicy("User")',xxAccountAdminName));b="<i>None</i>";if(0<xxPolicies.Alert.length)for(d in b="",xxPolicies.Alert)0<b.length&&(b+=", "),b+=xxPolicies.Alert[d].AccessInfo;
948 +a+=TableEntry("Alert initiated connection",addLinkConditional(b,'editMpsPolicy("Alert")',xxAccountAdminName));b="<i>None</i>";if(0<xxPolicies.Periodic.length)for(d in b="",xxPolicies.Periodic)0<b.length&&(b+=", "),b+=xxPolicies.Periodic[d].AccessInfo;var f=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName","Periodic");if(f){var n=atob(f.ExtendedData);0==ReadInt(n,0)&&(b+=", each "+ReadInt(n,4)+" seconds");1==ReadInt(n,0)&&(f=ReadInt(n,4),n=ReadInt(n,8),10>n&&(n="0"+n),b+=
949 +", at "+f+":"+n+" daily")}a+=TableEntry("Periodic connection",addLinkConditional(b,'editMpsPolicy("Periodic")',xxAccountAdminName));a+=TableEnd();a=a+"<br>"+TableStart2();a+="<tr><td class=r1 style=padding-left:15px><br>Manage Intel&reg; AMT remote management servers.<br><br>";if(0==xxCiraServers.length)a+="<div style=padding-left:15px><br><i>No remote servers found.</i></div><br>";else for(d in xxCiraServers)b=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(b+=", "+xxCiraServers[d].CN),a+="<div class=itemBar onclick=showServerDetails("+
950 +d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(b)+"</div></div>";if(c)if(a+="<br>Manage HTTP proxies used for management connections.<br><br>",b=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,0==b.length)a+="<div style=padding-left:15px><br><i>No proxies configured.</i></div><br>";else for(d in b)a+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(b[d].AccessInfo)+":"+b[d].Port+"</b> / "+EscapeHtml(b[d].NetworkDnsSuffix)+
951 +"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Add Server...","AddRemoteAccessServer()"),c&&(d+=AddButton("Add Proxy...","AddRemoteAccessProxy()")));a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(28,a)}}var xxEditMpsPolicyType;
952 function editMpsPolicy(a){var b="",c=xxEditMpsPolicyType=a;"User"==c&&(c="User Initiated");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",c),b=b+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(None)",f;for(f in xxCiraServers)b+="<option value="+f+""+(xxPolicies[a][0]&&xxPolicies[a][0].Name==xxCiraServers[f].Name?" selected":"")+">"+xxCiraServers[f].AccessInfo;b+="</select><div>Primary server</div></div>";
953 if(1<xxCiraServers.length){b+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";b+="<option value=-1>(None)";for(f in xxCiraServers)b+="<option value="+f+""+(xxPolicies[a][1]&&xxPolicies[a][1].Name==xxCiraServers[f].Name?" selected":"")+">"+xxCiraServers[f].AccessInfo;b+="</select><div>Secondary server</div></div>"}c=0;d&&(c=d.TunnelLifeTime);b+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+
954 c+">";b+="<div>Tunnel lifetime (Seconds)</div></div>";"Periodic"==a&&(f=0,c=3600,d&&(d=atob(d.ExtendedData),f=ReadInt(d,0),c=ReadInt(d,4),1==f&&(d=ReadInt(d,8),10>d&&(d="0"+d),c+=":"+d)),b+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",b+="<option value=0"+(0==f?" selected":"")+">Periodic, time interval<option value=1"+(1==f?" selected":"")+">Time of day, once a day",b+="</select><div>Trigger type</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+
@@ -966,8 +968,14 @@ function showServerDetails(a){xxShowServerDetailsHandle=a;var b=xxCiraServers[a]
968 b).RemoteID)):(c+=addHtmlValue("Authentication Type","Certificate / Mutual-Auth TLS"),b=getInstance(xxCertificates,b),c+=addHtmlValue("Certificate Name",parseCertName(b.Subject).CN));b=1;xxAccountAdminName&&(b=5);setDialogMode(11,"Remote Server #"+(a+1),b,showServerDetailsOk,c)}
969 function getElementWithContextSelectorValue(a,b){for(var c in a){a[c].ElementProvidingContext.ReferenceParameters.SelectorSet.Selector=MakeToArray(a[c].ElementProvidingContext.ReferenceParameters.SelectorSet.Selector);for(var d in a[c].ElementProvidingContext.ReferenceParameters.SelectorSet.Selector)if(a[c].ElementProvidingContext.ReferenceParameters.SelectorSet.Selector[d].Value==b)return a[c]}return null}
970 function showServerDetailsOk(a){2==a&&amtstack.Delete("AMT_ManagementPresenceRemoteSAP",{Name:xxCiraServers[xxShowServerDetailsHandle].Name},showServerDetailsOk2)}function showServerDetailsOk2(a,b,c,d){408==d?messagebox("Remote Server Removal","Unable to remove server, access denied."):PullRemoteAccess()}function parseCertName(a){var b={},c=a.split(","),d;for(d in c)a=c[d].indexOf("="),b[c[d].substring(0,a)]=c[d].substring(a+1);return b}
969 -function AddRemoteAccessServer(){var a=[],b;for(b in xxCertificates)xxCertificates[b].XPrivateKey&&a.push(xxCertificates[b]);var c;c="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>Hostname FQDN<option value=3>IPv4 address</select><div>Connection Type</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";c+='<div style=height:26px><input id=d2port onkeypress="return (event.charCode == 0 || (event.charCode >= 48 && event.charCode <= 57))" style=float:right;width:200px value=4433 onkeyup=AddRemoteAccessServerUpdate()><div>Server port</div></div>';
970 -c+="<div style=height:26px id=d2ucn><input id=d2cn style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Server Common Name</div></div>";c+="<div style=height:26px><select id=d2auth style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()>";0<a.length&&(c+="<option value=1>Certificate");c+="<option value=2>Username/Password</select><div>Authentication Type</div></div>";c+="<span id=d2utype>";c+="<div style=height:26px><input id=d2user style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Username</div></div>";
971 +function showProxyDetails(a){var b=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[a],c=addHtmlValue("Access name",b.AccessInfo+":"+b.ProxyPort),c=c+addHtmlValue("DNS suffex",b.NetworkDnsSuffix),c=c+addHtmlValue("Proxy type",["Administrator","Operating system"][b.Type]),b=1;xxAccountAdminName&&(b=5);setDialogMode(11,"HTTP Proxy #"+(a+1),b,showProxyDetailsOk,c,a)}
972 +function showProxyDetailsOk(a,b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[b];2==a&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:c.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(a,b,c,d){408==d?messagebox("HTTP Proxy Removal","Unable to remove HTTP proxy, access denied."):PullRemoteAccess()}
973 +function AddRemoteAccessProxy(){var a;a='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>Hostname FQDN<option value=3>IPv4 address<option value=4>IPv6 address</select><div>Connection type</div></div><div style=height:26px><input id=d2host style=float:right;width:200px maxlength=255 onkeyup=AddRemoteAccessProxyUpdate()><div id=d2typespan></div></div><div style=height:26px><input id=d2port onkeypress="return (event.charCode == 0 || (event.charCode >= 48 && event.charCode <= 57))" style=float:right;width:200px onkeyup=AddRemoteAccessProxyUpdate()><div>Port</div></div>';a+=
974 +"<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>DNS suffix</div></div>";setDialogMode(11,"Add HTTP Proxy",3,AddRemoteAccessProxyOk,a);AddRemoteAccessProxyUpdate()}
975 +function AddRemoteAccessProxyUpdate(){var a=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))a=!1;QE("c37",a);QH("d2typespan",["","","FQDN / hostname","IPv4 address","IPv6 address"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
976 +function AddRemoteAccessProxyOk2(a,b,c,d){200!=d?messagebox("Add Proxy Server","Failed to add proxy, status "+d):0!=c.Body.ReturnValue?messagebox("Add Proxy Server",c.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
977 +function AddRemoteAccessServer(){var a=[],b;for(b in xxCertificates)xxCertificates[b].XPrivateKey&&a.push(xxCertificates[b]);var c;c="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>Hostname FQDN<option value=3>IPv4 address</select><div>Connection type</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";c+='<div style=height:26px><input id=d2port onkeypress="return (event.charCode == 0 || (event.charCode >= 48 && event.charCode <= 57))" style=float:right;width:200px value=4433 onkeyup=AddRemoteAccessServerUpdate()><div>Server port</div></div>';
978 +c+="<div style=height:26px id=d2ucn><input id=d2cn style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Server Common Name</div></div>";c+="<div style=height:26px><select id=d2auth style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()>";0<a.length&&(c+="<option value=1>Certificate");c+="<option value=2>Username/Password</select><div>Authentication type</div></div>";c+="<span id=d2utype>";c+="<div style=height:26px><input id=d2user style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Username</div></div>";
979 c+="<div style=height:26px><input id=d2pass style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Strong Password</div></div>";c+="</span>";c+="<span id=d2ctype>";c+="<div style=height:26px><select id=d2cert style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()>";for(b in a)c+="<option value="+a[b].InstanceID.substring(34)+">"+parseCertName(a[b].Subject).CN;c+="</select><div>Certificate</div></div></span>";setDialogMode(11,"Add Remote Server",3,AddRemoteAccessServerOk,
980 c);AddRemoteAccessServerUpdate()}
981 function AddRemoteAccessServerOk(){var a,b,c,d;1==Q("d2auth").value?a='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT Certificate: Handle: '+Q("d2cert").value+
@@ -995,14 +1003,15 @@ function showIPSetupDlg(){if(!xxdialogMode){var a=amtsysstate.AMT_EthernetPortSe
1003 "");c22.value=isIpAddress(a.PrimaryDNS,"");c23.value=isIpAddress(a.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4 Settings",3,showIPSetupDlgOk)}}function updateIPSetupDlg(){c19.disabled=c20.disabled=c21.disabled=c22.disabled=c23.disabled=!d21o2.checked}
1004 function showIPSetupDlgOk(){var a=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);a.DHCPEnabled=d21o1.checked;delete a.IPAddress;delete a.SubnetMask;delete a.DefaultGateway;delete a.PrimaryDNS;delete a.SecondaryDNS;0==d21o1.checked&&(a.IPAddress=c19.value,a.SubnetMask=c20.value,a.DefaultGateway=c21.value,""!=c22.value&&(a.PrimaryDNS=c22.value),""!=c23.value&&(a.SecondaryDNS=c23.value));amtstack.Put("AMT_EthernetPortSettings",
1005 a,showIPSetupDlgDone,0,1)}function showIPSetupDlgDone(a,b,c,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4 Settings","Unable to set network parameters, error "+d)}amtPowerBootCapabilities=null;function showPowerActionDlg(){xxdialogMode||(statusbox("Power Actions","Checking capabilities..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
998 -function powerActionResponse00(a,b,c,d){amtPowerBootCapabilities=c.Body;QH("d5actionSelect","");addOption("d5actionSelect","Power up",2);addOption("d5actionSelect","Power cycle",5);addOption("d5actionSelect","Power down",8);addOption("d5actionSelect","Reset",10);1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(addOption("d5actionSelect","Power on to diagnostic",300),addOption("d5actionSelect","Reset to diagnostic",301));9<amtversion&&(addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect",
999 -"Soft-reset",14),addOption("d5actionSelect","Sleep",4),addOption("d5actionSelect","Hibernate",7));1==amtPowerBootCapabilities.BIOSSetup&&(addOption("d5actionSelect","Power up to BIOS",100),addOption("d5actionSelect","Reset to BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(addOption("d5actionSelect","Power up to Secure Erase",104),addOption("d5actionSelect","Reset to Secure Erase",105));addOption("d5actionSelect","Reset to PXE",400);addOption("d5actionSelect","Power on to PXE",401);addOption("d5actionSelect",
1000 -"Custom action...",999);5<amtversion&&addOption("d5actionSelect","User consent...",998);setDialogMode(5,"Power Actions",3,powerActionDlgCheck)}
1006 +function powerActionResponse00(a,b,c,d){200==d?(amtPowerBootCapabilities=c.Body,QH("d5actionSelect",""),addOption("d5actionSelect","Power up",2),addOption("d5actionSelect","Power cycle",5),addOption("d5actionSelect","Power down",8),addOption("d5actionSelect","Reset",10),1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(addOption("d5actionSelect","Power on to diagnostic",300),addOption("d5actionSelect","Reset to diagnostic",301)),9<amtversion&&(addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect",
1007 +"Soft-reset",14),addOption("d5actionSelect","Sleep",4),addOption("d5actionSelect","Hibernate",7)),1==amtPowerBootCapabilities.BIOSSetup&&(addOption("d5actionSelect","Power up to BIOS",100),addOption("d5actionSelect","Reset to BIOS",101)),1==amtPowerBootCapabilities.SecureErase&&(addOption("d5actionSelect","Power up to Secure Erase",104),addOption("d5actionSelect","Reset to Secure Erase",105)),addOption("d5actionSelect","Reset to PXE",400),addOption("d5actionSelect","Power on to PXE",401),addOption("d5actionSelect",
1008 +"Custom action...",999),5<amtversion&&addOption("d5actionSelect","User consent...",998),setDialogMode(5,"Power Actions",3,powerActionDlgCheck)):messagebox("Power Action","Unable to get system capabilities, error "+d)}
1009 function powerActionDlgCheck(){var a=d5actionSelect.value;104==a||105==a?(a="Confirm execution of Intel&reg Remote Secure Erase?<br>Enter Secure Erase password if required.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Password</div></div><br><div style=color:red><b>WARNING:</b> This will wipe data on the remote system.</div>",rsepass=1,setDialogMode(11,"Power Actions",3,powerActionDlg,a)):powerActionDlg()}
1010 function powerActionDlg(){var a=d5actionSelect.value;if(999==a)showAdvPowerDlg();else if(998==a)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{statusbox("Power Action","Checking state...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var b=!0;6>amtversion&&(b=!1);13==currentView&&8==a&&(b=!1);13!=currentView&&10>=a&&(b=!1);b?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1011 function showAdvPowerDlg(){QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("d24dForceProgressEvents",1==amtPowerBootCapabilities.ForcedProgressEvents);QV("d24dUseIDER",1==amtPowerBootCapabilities.IDER);QV("d24dLockKeyboard",1==amtPowerBootCapabilities.KeyboardLock);QV("d24dLockPowerButton",1==amtPowerBootCapabilities.PowerButtonLock);QV("d24dLockResetButton",1==amtPowerBootCapabilities.ResetButtonLock);
1012 QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);QV("c33",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c34",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c35",1==amtPowerBootCapabilities.VerbosityScreenBlank);setDialogMode(24,"Custom Power Action",
1005 -3,showAdvPowerDlgOk);showAdvPowerDlgChange()}function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1)}
1013 +3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1014 +function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var a="d24BiosPause d24BiosSetup d24ForceProgressEvents d24LockPowerButton d24LockResetButton d24LockSleepButton d24LockKeyboard d24UserPasswordBypass d24ReflashBios d24SafeMode d24UseIDER d24SerialOverLan d24SecureErase".split(" ");if(0<c29.value)for(var b in a)Q(a[b]).checked=!1;for(b in a)QE(a[b],0==c29.value)}
1015 function showAdvPowerDlgOk(){AvdPowerDlg={};AvdPowerDlg.Action=Q("c27").value;AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked;AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked;AvdPowerDlg.BootMediaIndex=Q("c30").value;AvdPowerDlg.FirmwareVerbosity=Q("c32").value;AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked;AvdPowerDlg.IDERBootDevice=Q("c31").value;AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked;AvdPowerDlg.LockPowerButton=
1016 Q("d24LockPowerButton").checked;AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked;AvdPowerDlg.LockSleepButton=Q("d24LockSleepButton").checked;AvdPowerDlg.ReflashBIOS=Q("d24ReflashBios").checked;AvdPowerDlg.UseIDER=Q("d24UseIDER").checked;AvdPowerDlg.UseSOL=Q("d24SerialOverLan").checked;AvdPowerDlg.UseSafeMode=Q("d24SafeMode").checked;AvdPowerDlg.UserPasswordBypass=Q("d24UserPasswordBypass").checked;AvdPowerDlg.SecureErase=Q("d24SecureErase").checked;!0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&
1017 (AvdPowerDlg.RSEPassword=Q("d24rsepass").value);statusbox("Power Action","Checking state...");amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)}
@@ -1013,8 +1022,8 @@ amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}function powerAction
1022 function powerActionResponseC2(a,b,c,d){200!=d?messagebox("Power Action","Error #"+d):0!=c.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):998==d5actionSelect.value?messagebox("User Consent","User consent succesful."):(statusbox("Power Action","Checking state..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1023 function powerActionResponse1(a,b,c,d){200!=d?messagebox("Power Action","Error #"+d):(a=d5actionSelect.value,c=c.Body,c.ConfigurationDataReset=!1,999==a?(c.BIOSPause=AvdPowerDlg.BIOSPause,c.BIOSSetup=AvdPowerDlg.BIOSSetup,c.BootMediaIndex=AvdPowerDlg.BootMediaIndex,c.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,c.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,c.IDERBootDevice=AvdPowerDlg.IDERBootDevice,c.LockKeyboard=AvdPowerDlg.LockKeyboard,c.LockPowerButton=AvdPowerDlg.LockPowerButton,
1024 c.LockResetButton=AvdPowerDlg.LockResetButton,c.LockSleepButton=AvdPowerDlg.LockSleepButton,c.ReflashBIOS=AvdPowerDlg.ReflashBIOS,c.UseIDER=AvdPowerDlg.UseIDER,c.UseSOL=AvdPowerDlg.UseSOL,c.UseSafeMode=AvdPowerDlg.UseSafeMode,c.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=c.SecureErase&&(c.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==c.SecureErase&&AvdPowerDlg.RSEPassword&&(c.RSEPassword=AvdPowerDlg.RSEPassword))):(c.BIOSPause=!1,c.BIOSSetup=99<a&&104>
1016 -a,c.BootMediaIndex=0,c.FirmwareVerbosity=0,c.ForcedProgressEvents=!1,c.IDERBootDevice=202==a||203==a?1:0,c.LockKeyboard=!1,c.LockPowerButton=!1,c.LockResetButton=!1,c.LockSleepButton=!1,c.ReflashBIOS=!1,c.UseIDER=199<a&&300>a,c.UseSOL=13==currentView&&8!=a,c.UseSafeMode=!1,c.UserPasswordBypass=!1,null!=c.SecureErase&&(c.SecureErase=(104==a||105==a)&&1==amtPowerBootCapabilities.SecureErase,!0===c.SecureErase&&0<rsepass.length&&(c.RSEPassword=rsepass)),rsepass=null),console.log("Boot Action: "+a),console.log("Setting Boot Settings: "+
1017 -ObjectToString2(c)),statusbox("Power Action","Setting boot settings..."),amtstack.Put("AMT_BootSettingData",c,powerActionResponse2,c,1))}function powerActionResponse2(a,b,c,d,f){200!=d?(messagebox("Power Action","PUT AMT_BootSettingData, Error #"+d),console.log(f)):(statusbox("Power Action","Setting next boot..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1025 +a,c.BootMediaIndex=0,c.FirmwareVerbosity=0,c.ForcedProgressEvents=!1,c.IDERBootDevice=202==a||203==a?1:0,c.LockKeyboard=!1,c.LockPowerButton=!1,c.LockResetButton=!1,c.LockSleepButton=!1,c.ReflashBIOS=!1,c.UseIDER=199<a&&300>a,c.UseSOL=13==currentView&&8!=a&&300>a,c.UseSafeMode=!1,c.UserPasswordBypass=!1,null!=c.SecureErase&&(c.SecureErase=(104==a||105==a)&&1==amtPowerBootCapabilities.SecureErase,!0===c.SecureErase&&0<rsepass.length&&(c.RSEPassword=rsepass)),rsepass=null),console.log("Boot Action: "+
1026 +a),console.log("Setting Boot Settings: "+ObjectToString2(c)),statusbox("Power Action","Setting boot settings..."),amtstack.Put("AMT_BootSettingData",c,powerActionResponse2,c,1))}function powerActionResponse2(a,b,c,d,f){200!=d?(messagebox("Power Action","PUT AMT_BootSettingData, Error #"+d),console.log(f)):(statusbox("Power Action","Setting next boot..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1027 function powerActionResponse3x(a,b,c,d){a=d5actionSelect.value;b=null;if(999==a)0<c29.value&&(b=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c29.value-1]);else{if(300==a||301==a)b="Force Diagnostic Boot";if(400==a||401==a)b="Force PXE Boot"}console.log("ChangeBootOrder: "+b);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==b?b:'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootSourceSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: '+
1028 b+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1029 function powerActionResponse3(a,b,c,d){console.log("powerActionResponse3("+b+","+c+","+d+")");if(!errcheck(d,a)){statusbox("Power Action","Performing power action...");a=d5actionSelect.value;if(100==a||201==a||203==a||300==a||401==a)a=2;if(101==a||200==a||202==a||301==a||400==a)a=10;104==a&&(a=2);105==a&&(a=10);999==a&&(a=AvdPowerDlg.Action);targetPowerAction=a;11==a&&(a=10);999>a?(console.log("RequestPowerStateChange("+a+")"),amtstack.RequestPowerStateChange(a,powerActionResponse4)):messagebox("Power Action",
@@ -1022,9 +1031,9 @@ function powerActionResponse3(a,b,c,d){console.log("powerActionResponse3("+b+","
1031 function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1032 function checkConsentDisplayResponse1(a,b,c,d){200==d&&(c.Body.DefaultScreen&&(c.Body.DefaultScreen=parseInt(c.Body.DefaultScreen)),c.Body.NumberOfScreens&&(c.Body.NumberOfScreens=parseInt(c.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,c.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",c.Body,checkConsentDisplayResponse1)):(d6Display.value=c.Body.DefaultScreen,QV("d6ThirdDisplay",2<c.Body.NumberOfScreens)))}
1033 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1025 -function PullStorageResponse(a,b,c){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==b){QV("go21",!0);for(b=0;32>b;b++){do c=a.length,a=a.replace(String.fromCharCode(b),"");while(c>a.length)}try{xxStorage=JSON.parse(a)}catch(v){return}xxStorageVendors=[];xxStorageApplications=[];a=xxStorage.content;if(Array.isArray(a)){c={};for(b in a){var d=a[b].vendor?a[b].vendor:"";c[d]||(c[d]={});var f=a[b].app?a[b].app:"";c[d][f]||(c[d][f]={});a[b].name&&(c[d][f][a[b].name]=a[b])}xxStorage.content=
1026 -a=c}else{if(a["index.htm"]||a["logon.htm"])a[""]={"":{}};a["index.htm"]&&(a[""][""]["index.htm"]=a["index.htm"],delete a["index.htm"]);a["logon.htm"]&&(a[""][""]["logon.htm"]=a["logon.htm"],delete a["logon.htm"])}c=0;var d=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Manage Intel&reg; AMT storage for this computer.<br><br>",n,p,f="";for(b in a){var r=0,l;for(l in a[b]){r++;var k=0,u;for(u in a[b][l]){k++;if(b!=n||l!=p)""!=f&&(d+=f,f="<br>"),n=b,p=l,f=""!=b?f+EscapeHtml(b+" / "+l):f+
1027 -"Root";var e='"'+b+(""!=b?"/":"")+l+(""!=l?"/":"")+u+'"',f=f+('<div class=itemBar onclick=showStorageDetails("'+b+'","'+l+'","'+u+'",'+e+")><div style=float:right>"),f=f+(" "+AddButton2("Download","DownloadFromStorage("+e+',"'+u+'",event)')),f=f+("</div><div style=padding-top:3px><b>"+EscapeHtml(u)+"</b>, <i>"+a[b][l][u].size+" bytes</i></div></div>");c++;-1==xxStorageVendors.indexOf(b)&&xxStorageVendors.push(b);-1==xxStorageApplications.indexOf(l)&&xxStorageApplications.push(l)}0==k&&wsstack.comm.PerformAjax("",
1034 +function PullStorageResponse(a,b,c){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==b){QV("go21",!0);for(b=0;32>b;b++){do c=a.length,a=a.replace(String.fromCharCode(b),"");while(c>a.length)}try{xxStorage=JSON.parse(a)}catch(u){return}xxStorageVendors=[];xxStorageApplications=[];a=xxStorage.content;if(Array.isArray(a)){c={};for(b in a){var d=a[b].vendor?a[b].vendor:"";c[d]||(c[d]={});var f=a[b].app?a[b].app:"";c[d][f]||(c[d][f]={});a[b].name&&(c[d][f][a[b].name]=a[b])}xxStorage.content=
1035 +a=c}else{if(a["index.htm"]||a["logon.htm"])a[""]={"":{}};a["index.htm"]&&(a[""][""]["index.htm"]=a["index.htm"],delete a["index.htm"]);a["logon.htm"]&&(a[""][""]["logon.htm"]=a["logon.htm"],delete a["logon.htm"])}c=0;var d=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Manage Intel&reg; AMT storage for this computer.<br><br>",n,p,f="";for(b in a){var r=0,l;for(l in a[b]){r++;var k=0,v;for(v in a[b][l]){k++;if(b!=n||l!=p)""!=f&&(d+=f,f="<br>"),n=b,p=l,f=""!=b?f+EscapeHtml(b+" / "+l):f+
1036 +"Root";var e='"'+b+(""!=b?"/":"")+l+(""!=l?"/":"")+v+'"',f=f+('<div class=itemBar onclick=showStorageDetails("'+b+'","'+l+'","'+v+'",'+e+")><div style=float:right>"),f=f+(" "+AddButton2("Download","DownloadFromStorage("+e+',"'+v+'",event)')),f=f+("</div><div style=padding-top:3px><b>"+EscapeHtml(v)+"</b>, <i>"+a[b][l][v].size+" bytes</i></div></div>");c++;-1==xxStorageVendors.indexOf(b)&&xxStorageVendors.push(b);-1==xxStorageApplications.indexOf(l)&&xxStorageApplications.push(l)}0==k&&wsstack.comm.PerformAjax("",
1037 function(){},null,0,"/amt-storage/"+b+"/"+l,"DELETE")}0==r&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+b,"DELETE")}""!=f&&(d+=f);0==c&&(d+="<div style=padding-left:15px><br><i>No files found.</i></div><br>");d+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+AddButton("Upload...","UploadToStorage()"));QH(31,d)}else QH(31,"Unable to load storage data...<br/>"+AddButton("Refresh","PullStorage()"))}
1038 function showStorageDetails(a,b,c,d){if(!xxdialogMode){var f="",n=xxStorage.content[a][b][c];""!=a&&(f+=addHtmlValue("Vendor",a));""!=b&&(f+=addHtmlValue("Application",b));f+=addHtmlValue("Name",c);f+=addHtmlValue("Size",n.size+" bytes");n.link&&(f+=addHtmlValue("Link",n.link));setDialogMode(11,"Storage Item",5,showStorageDetailsEx,f,d)}}function showStorageDetailsEx(a,b){2==a&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+b,"DELETE")}
1039 function storageDeleteResponse(a,b){200!=b?messagebox("Storage","Unable to delete file (ERR"+b+"), check that the computer is powered on."):PullStorage()}function DownloadFromStorage(a,b,c){xxdialogMode||(haltEvent(c),wsstack.comm.PerformAjax("",DownloadFromStorageEx,b,0,"/amt-storage/"+a,"GET"))}function DownloadFromStorageEx(a,b,c){200!=b||null==a?console.log(b,"Data = null"):saveAs(data2blob(a),c)}
views/default.handlebars
+2 -2
@@ -2181,11 +2181,11 @@
2181
2182 if (serverinfo.https == true) {
2183 var portStr = (serverinfo.port == 443)?'':(":" + serverinfo.port);
2184 - Q('agins_linux_area').value = "wget -q https://" + servername + portStr + "/meshagents?script=1 --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://" + servername + portStr + " " + meshid.split('/')[2] + "\r\n";
2184 + Q('agins_linux_area').value = "wget -q https://" + servername + portStr + "/meshagents?script=1 --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://" + servername + portStr + " '" + meshid.split('/')[2] + "'\r\n";
2185 Q('agins_linux_area_un').value = "wget -q https://" + servername + portStr + "/meshagents?script=1 --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n";
2186 } else {
2187 var portStr = (serverinfo.port == 80)?'':(":" + serverinfo.port);
2188 - Q('agins_linux_area').value = "wget -q http://" + servername + portStr + "/meshagents?script=1 -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://" + servername + portStr + " " + meshid.split('/')[2] + "\r\n";
2188 + Q('agins_linux_area').value = "wget -q http://" + servername + portStr + "/meshagents?script=1 -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://" + servername + portStr + " '" + meshid.split('/')[2] + "'\r\n";
2189 Q('agins_linux_area_un').value = "wget -q http://" + servername + portStr + "/meshagents?script=1 -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n";
2190 }
2191 Q('aginsSelect').focus();